From bebfc0803af2adde86377819093478a6516f31bc Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:06:33 +0100 Subject: [PATCH 01/83] add preview --- .vscode/settings.json | 7 +- config/tsconfig.build.json | 2 +- config/tsconfig.json | 2 +- package-lock.json | 2327 ++++++++++++++--- package.json | 12 +- src/components/formcomponents/date/time.tsx | 11 +- src/components/index.tsx | 20 +- src/preview/App.tsx | 25 + src/preview/FormFillerPreview.tsx | 72 + src/preview/FormFillerSidebar.tsx | 45 + src/preview/Select/Select.css | 42 + src/preview/Select/Select.tsx | 34 + src/preview/helpers/index.ts | 102 + src/preview/index.html | 14 + src/preview/init.js | 2 + src/preview/main.tsx | 16 + src/preview/resources/referoResources.tsx | 307 +++ .../resources/referoSidebarResources.tsx | 43 + src/preview/skjema/kun_qest.json | 617 +++++ src/preview/styles/_variables.scss | 99 + src/preview/styles/fieldset.scss | 66 + src/preview/styles/formFillerPreview.css | 29 + src/preview/styles/formFillerSidebar.css | 16 + src/preview/styles/helpbutton.scss | 57 + src/preview/styles/navigator.scss | 65 + src/preview/styles/refero.scss | 371 +++ src/preview/styles/sidebar.scss | 433 +++ src/preview/styles/skjemautfyller.scss | 378 +++ src/preview/vite-env.d.ts | 1 + tsconfig.vite.json | 19 + tsconfig.vite.node.json | 10 + vite.config.ts | 41 + 32 files changed, 4864 insertions(+), 421 deletions(-) create mode 100644 src/preview/App.tsx create mode 100644 src/preview/FormFillerPreview.tsx create mode 100644 src/preview/FormFillerSidebar.tsx create mode 100644 src/preview/Select/Select.css create mode 100644 src/preview/Select/Select.tsx create mode 100644 src/preview/helpers/index.ts create mode 100644 src/preview/index.html create mode 100644 src/preview/init.js create mode 100644 src/preview/main.tsx create mode 100644 src/preview/resources/referoResources.tsx create mode 100644 src/preview/resources/referoSidebarResources.tsx create mode 100644 src/preview/skjema/kun_qest.json create mode 100644 src/preview/styles/_variables.scss create mode 100644 src/preview/styles/fieldset.scss create mode 100644 src/preview/styles/formFillerPreview.css create mode 100644 src/preview/styles/formFillerSidebar.css create mode 100644 src/preview/styles/helpbutton.scss create mode 100644 src/preview/styles/navigator.scss create mode 100644 src/preview/styles/refero.scss create mode 100644 src/preview/styles/sidebar.scss create mode 100644 src/preview/styles/skjemautfyller.scss create mode 100644 src/preview/vite-env.d.ts create mode 100644 tsconfig.vite.json create mode 100644 tsconfig.vite.node.json create mode 100644 vite.config.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 2dbb21a7..140a8836 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -23,7 +23,12 @@ "titleBar.inactiveForeground": "#15202b99", "statusBar.background": "#5dc9e2", "statusBarItem.hoverBackground": "#32bbda", - "statusBar.foreground": "#15202b" + "statusBar.foreground": "#15202b", + "activityBar.activeBackground": "#88d7ea", + "commandCenter.border": "#15202b99", + "sash.hoverBorder": "#88d7ea", + "statusBarItem.remoteBackground": "#5dc9e2", + "statusBarItem.remoteForeground": "#15202b" }, "peacock.color": "#5dc9e2", "eslint.runtime": "node" diff --git a/config/tsconfig.build.json b/config/tsconfig.build.json index 58e5bbba..970739d1 100644 --- a/config/tsconfig.build.json +++ b/config/tsconfig.build.json @@ -25,5 +25,5 @@ "importHelpers": true }, "include": ["../src/**/*.tsx", "../src/**/*.ts"], - "exclude": ["../**/node_modules", "../src/**/__tests__*", "../lib/**/*.*"] + "exclude": ["../**/node_modules", "../src/**/__tests__*", "../lib/**/*.*", "../src/preview"] } diff --git a/config/tsconfig.json b/config/tsconfig.json index 45d06ef2..8593297c 100644 --- a/config/tsconfig.json +++ b/config/tsconfig.json @@ -23,5 +23,5 @@ "importHelpers": true }, "include": ["../src/**/*.tsx", "../src/**/*.ts"], - "exclude": ["../**/node_modules", "../src/**/__tests__*", "../lib/**/*.*"] + "exclude": ["../**/node_modules", "../src/**/__tests__*", "../lib/**/*.*", "../src/preview"] } diff --git a/package-lock.json b/package-lock.json index 08f5bf5e..d50e5196 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,6 +51,7 @@ "@types/yargs": "^17.0.24", "@typescript-eslint/eslint-plugin": "^5.12.0", "@typescript-eslint/parser": "^5.12.0", + "@vitejs/plugin-react": "^4.2.1", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "babel-jest": "^27.4.2", "babel-loader": "^8.2.3", @@ -90,8 +91,12 @@ "redux-thunk": "^2.4.2", "resolve": "^1.22.2", "rimraf": "^3.0.2", + "sass": "^1.69.0", "tabbable": "^6.2.0", "typescript": "^4.8.3", + "vite": "^4.4.5", + "vite-plugin-require": "^1.1.13", + "vite-tsconfig-paths": "^4.2.1", "whatwg-fetch": "^2.0.4", "xml2js": "^0.6.2", "yargs": "^17.7.2" @@ -143,12 +148,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" @@ -164,25 +170,25 @@ } }, "node_modules/@babel/core": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz", - "integrity": "sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.5.tgz", + "integrity": "sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.5", + "@babel/parser": "^7.23.5", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", + "json5": "^2.2.3", "semver": "^6.3.1" }, "engines": { @@ -193,13 +199,19 @@ "url": "https://opencollective.com/babel" } }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/@babel/generator": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz", - "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz", + "integrity": "sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5", + "@babel/types": "^7.23.5", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -248,22 +260,19 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz", - "integrity": "sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, "dependencies": { "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", + "@babel/helper-validator-option": "^7.22.15", "browserslist": "^4.21.9", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { @@ -338,9 +347,9 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -359,13 +368,13 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -396,28 +405,28 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", - "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", "@babel/helper-simple-access": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" @@ -439,9 +448,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz", - "integrity": "sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true, "engines": { "node": ">=6.9.0" @@ -514,27 +523,27 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, "engines": { "node": ">=6.9.0" @@ -556,27 +565,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz", - "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz", + "integrity": "sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -584,9 +593,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", - "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", + "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1240,6 +1249,15 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-classes/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/plugin-transform-computed-properties": { "version": "7.17.12", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.17.12.tgz", @@ -1591,6 +1609,36 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.23.3.tgz", + "integrity": "sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.23.3.tgz", + "integrity": "sha512-91RS0MDnAWDNvGC6Wio5XYkyWI39FMFO+JK9+4AlgaTH+yWwVTsw7/sn6LK0lH7c5F+TFkpv/3LfCJ1Ydwof/g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-react-pure-annotations": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.7.tgz", @@ -1935,33 +1983,33 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", - "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz", + "integrity": "sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", + "@babel/parser": "^7.23.5", + "@babel/types": "^7.23.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1969,14 +2017,23 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", + "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1989,6 +2046,358 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -2042,21 +2451,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2069,18 +2463,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@eslint/js": { "version": "8.46.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", @@ -3000,7 +3382,6 @@ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz", "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==", "dev": true, - "peer": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -3011,7 +3392,6 @@ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, - "peer": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -3366,13 +3746,13 @@ "dev": true }, "node_modules/@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" @@ -3475,7 +3855,6 @@ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.2.tgz", "integrity": "sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA==", "dev": true, - "peer": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -3486,7 +3865,6 @@ "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", "dev": true, - "peer": true, "dependencies": { "@types/eslint": "*", "@types/estree": "*" @@ -3496,8 +3874,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@types/fs-extra": { "version": "9.0.13", @@ -4023,12 +4400,88 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@vitejs/plugin-react": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz", + "integrity": "sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.5", + "@babel/plugin-transform-react-jsx-self": "^7.23.3", + "@babel/plugin-transform-react-jsx-source": "^7.23.3", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0" + } + }, + "node_modules/@vue/component-compiler-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz", + "integrity": "sha512-97sfH2mYNU+2PzGrmK2haqffDpVASuib9/w2/noxiFi31Z54hW+q3izKQXXQZSNhtiUpAI36uSuYepeBe4wpHQ==", + "dev": true, + "dependencies": { + "consolidate": "^0.15.1", + "hash-sum": "^1.0.2", + "lru-cache": "^4.1.2", + "merge-source-map": "^1.1.0", + "postcss": "^7.0.36", + "postcss-selector-parser": "^6.0.2", + "source-map": "~0.6.1", + "vue-template-es2015-compiler": "^1.9.0" + }, + "optionalDependencies": { + "prettier": "^1.18.2 || ^2.0.0" + } + }, + "node_modules/@vue/component-compiler-utils/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/@vue/component-compiler-utils/node_modules/picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "node_modules/@vue/component-compiler-utils/node_modules/postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "dependencies": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/@vue/component-compiler-utils/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/@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", "dev": true, - "peer": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -4038,29 +4491,25 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, - "peer": true, "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -4071,15 +4520,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", "dev": true, - "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -4092,7 +4539,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, - "peer": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -4102,7 +4548,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, - "peer": true, "dependencies": { "@xtuc/long": "4.2.2" } @@ -4111,15 +4556,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", "dev": true, - "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -4136,7 +4579,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", "dev": true, - "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -4150,7 +4592,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", "dev": true, - "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -4163,7 +4604,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", "dev": true, - "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -4178,7 +4618,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", "dev": true, - "peer": true, "dependencies": { "@webassemblyjs/ast": "1.11.6", "@xtuc/long": "4.2.2" @@ -4228,15 +4667,13 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/abab": { "version": "2.0.6", @@ -4283,7 +4720,6 @@ "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "dev": true, - "peer": true, "peerDependencies": { "acorn": "^8" } @@ -4958,6 +5394,15 @@ "node": "*" } }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -5228,12 +5673,50 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", "dev": true, - "peer": true, "engines": { "node": ">=6.0" } @@ -5321,6 +5804,19 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "node_modules/consolidate": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", + "integrity": "sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==", + "deprecated": "Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog", + "dev": true, + "dependencies": { + "bluebird": "^3.1.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/consolidated-events": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/consolidated-events/-/consolidated-events-2.0.2.tgz", @@ -5418,6 +5914,49 @@ "node": ">= 8" } }, + "node_modules/css-loader": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.8.1.tgz", + "integrity": "sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==", + "dev": true, + "peer": true, + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.21", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.3", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.3.8" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/css-loader/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, + "peer": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/css-select": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", @@ -5452,6 +5991,18 @@ "integrity": "sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=", "dev": true }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/cssom": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", @@ -5820,7 +6371,6 @@ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz", "integrity": "sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==", "dev": true, - "peer": true, "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -5979,8 +6529,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz", "integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==", - "dev": true, - "peer": true + "dev": true }, "node_modules/es-set-tostringtag": { "version": "2.0.1", @@ -6028,6 +6577,43 @@ "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", "dev": true }, + "node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -6676,21 +7262,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -6769,18 +7340,6 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/esm": { "version": "3.2.25", "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", @@ -6866,7 +7425,6 @@ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "dev": true, - "peer": true, "engines": { "node": ">=0.8.x" } @@ -7315,8 +7873,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/global-cache": { "version": "1.2.1", @@ -7332,12 +7889,30 @@ } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { @@ -7375,6 +7950,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true + }, "node_modules/glub": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/glub/-/glub-1.0.3.tgz", @@ -7499,6 +8080,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==", + "dev": true + }, "node_modules/history": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/history/-/history-5.3.0.tgz", @@ -7651,6 +8238,19 @@ "node": ">=0.10.0" } }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "peer": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, "node_modules/identity-obj-proxy": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz", @@ -7681,6 +8281,12 @@ "url": "https://opencollective.com/immer" } }, + "node_modules/immutable": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", + "dev": true + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -7804,6 +8410,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -10510,7 +11128,6 @@ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", "dev": true, - "peer": true, "engines": { "node": ">=6.11.5" } @@ -10676,6 +11293,15 @@ "node": ">= 0.10.0" } }, + "node_modules/merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "dependencies": { + "source-map": "^0.6.1" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -10807,6 +11433,24 @@ "node": ">=8" } }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -10839,8 +11483,7 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/nice-try": { "version": "1.0.5", @@ -11466,6 +12109,117 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/postcss": { + "version": "8.4.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", + "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true, + "peer": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz", + "integrity": "sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==", + "dev": true, + "peer": true, + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "peer": true, + "dependencies": { + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "peer": true, + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.13", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", + "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "peer": true + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -11732,6 +12486,12 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": 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.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", @@ -11810,7 +12570,6 @@ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "peer": true, "dependencies": { "safe-buffer": "^5.1.0" } @@ -11996,6 +12755,15 @@ "redux": "^4.0.0" } }, + "node_modules/react-refresh": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", + "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react-shallow-renderer": { "version": "16.15.0", "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz", @@ -12173,6 +12941,18 @@ "util-deprecate": "~1.0.1" } }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -12426,6 +13206,22 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rollup": { + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/rst-selector-parser": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", @@ -12502,12 +13298,29 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sass": { + "version": "1.69.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.0.tgz", + "integrity": "sha512-l3bbFpfTOGgQZCLU/gvm1lbsQ5mC/WnLz3djL2v4WCJBDrWm58PO+jgngcGRNnKUh6wSsdm50YaovTqskZ0xDQ==", + "dev": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -12574,7 +13387,6 @@ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", "dev": true, - "peer": true, "dependencies": { "randombytes": "^2.1.0" } @@ -12656,6 +13468,15 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -13000,7 +13821,6 @@ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -13026,7 +13846,6 @@ "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.7.tgz", "integrity": "sha512-/bi0Zm2C6VAexlGgLlVxA0P2lru/sdLyfCVaRMfKVo9nWxbmz7f/sD8VPybPeSUJaJcwmCJis9pBIhcVcG1QcQ==", "dev": true, - "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -13045,7 +13864,6 @@ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", "dev": true, - "peer": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", @@ -13080,7 +13898,6 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", "dev": true, - "peer": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -13208,6 +14025,26 @@ "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", "dev": true }, + "node_modules/tsconfck": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-2.1.2.tgz", + "integrity": "sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==", + "dev": true, + "bin": { + "tsconfck": "bin/tsconfck.js" + }, + "engines": { + "node": "^14.13.1 || ^16 || >=18" + }, + "peerDependencies": { + "typescript": "^4.3.5 || ^5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", @@ -13537,6 +14374,151 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/vite": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.5.tgz", + "integrity": "sha512-4m5kEtAWHYr0O1Fu7rZp64CfO1PsRGZlD3TAB32UmQlpd7qg15VF7ROqGN5CyqN7HFuwr7ICNM2+fDWRqFEKaA==", + "dev": true, + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.26", + "rollup": "^3.25.2" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-plugin-require": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/vite-plugin-require/-/vite-plugin-require-1.1.13.tgz", + "integrity": "sha512-oJ2MtDoaNArlE33Iu9swZH54oWn4dk4acIYhd5eiZ5d1WyshoHGVyF7O7TPVYprAqOEU0s9+57LCbeuVO5pWFg==", + "dev": true, + "dependencies": { + "@babel/generator": "^7.15.4", + "@babel/parser": "^7.15.6", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.10.3", + "vue-loader": "^15.9.8", + "webpack": "^4.46.0 || ^5.0.0" + }, + "engines": { + "node": ">=8", + "npm": ">=5" + }, + "peerDependencies": { + "vite": "latest" + } + }, + "node_modules/vite-tsconfig-paths": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.2.1.tgz", + "integrity": "sha512-GNUI6ZgPqT3oervkvzU+qtys83+75N/OuDaQl7HmOqFTb0pjZsuARrRipsyJhJ3enqV8beI1xhGbToR4o78nSQ==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "globrex": "^0.1.2", + "tsconfck": "^2.1.0" + }, + "peerDependencies": { + "vite": "*" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/vue-hot-reload-api": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", + "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==", + "dev": true + }, + "node_modules/vue-loader": { + "version": "15.11.1", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz", + "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==", + "dev": true, + "dependencies": { + "@vue/component-compiler-utils": "^3.1.0", + "hash-sum": "^1.0.2", + "loader-utils": "^1.1.0", + "vue-hot-reload-api": "^2.3.0", + "vue-style-loader": "^4.1.0" + }, + "peerDependencies": { + "css-loader": "*", + "webpack": "^3.0.0 || ^4.1.0 || ^5.0.0-0" + }, + "peerDependenciesMeta": { + "cache-loader": { + "optional": true + }, + "prettier": { + "optional": true + }, + "vue-template-compiler": { + "optional": true + } + } + }, + "node_modules/vue-style-loader": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", + "integrity": "sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg==", + "dev": true, + "dependencies": { + "hash-sum": "^1.0.2", + "loader-utils": "^1.0.2" + } + }, + "node_modules/vue-template-es2015-compiler": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz", + "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", + "dev": true + }, "node_modules/w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -13572,7 +14554,6 @@ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, - "peer": true, "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -13595,7 +14576,6 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.85.1.tgz", "integrity": "sha512-xTb7MRf4LY8Z5rzn7aIx4TDrwYJrjcHnIfU1TqtyZOoObyuGSpAUwIvVuqq5wPnv7WEgQr8UvO1q/dgoGG4HjA==", "dev": true, - "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", @@ -13643,7 +14623,6 @@ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true, - "peer": true, "engines": { "node": ">=10.13.0" } @@ -13653,7 +14632,6 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", "dev": true, - "peer": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -14007,12 +14985,13 @@ } }, "@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "requires": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" } }, "@babel/compat-data": { @@ -14022,35 +15001,43 @@ "dev": true }, "@babel/core": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz", - "integrity": "sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.5.tgz", + "integrity": "sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g==", "dev": true, "requires": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.9", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.5", + "@babel/parser": "^7.23.5", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", + "json5": "^2.2.3", "semver": "^6.3.1" + }, + "dependencies": { + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + } } }, "@babel/generator": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz", - "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz", + "integrity": "sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==", "dev": true, "requires": { - "@babel/types": "^7.22.5", + "@babel/types": "^7.23.5", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -14089,13 +15076,13 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz", - "integrity": "sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, "requires": { "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", + "@babel/helper-validator-option": "^7.22.15", "browserslist": "^4.21.9", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -14160,9 +15147,9 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-explode-assignable-expression": { @@ -14175,13 +15162,13 @@ } }, "@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { @@ -14203,25 +15190,25 @@ } }, "@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, "requires": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.22.15" } }, "@babel/helper-module-transforms": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", - "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", "@babel/helper-simple-access": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" + "@babel/helper-validator-identifier": "^7.22.20" } }, "@babel/helper-optimise-call-expression": { @@ -14234,9 +15221,9 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz", - "integrity": "sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true }, "@babel/helper-remap-async-to-generator": { @@ -14291,21 +15278,21 @@ } }, "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true }, "@babel/helper-wrap-function": { @@ -14321,31 +15308,31 @@ } }, "@babel/helpers": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz", - "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz", + "integrity": "sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg==", "dev": true, "requires": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5" } }, "@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.22.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", - "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", + "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { @@ -14772,6 +15759,14 @@ "@babel/helper-replace-supers": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7", "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } } }, "@babel/plugin-transform-computed-properties": { @@ -14993,6 +15988,24 @@ "@babel/plugin-transform-react-jsx": "^7.16.7" } }, + "@babel/plugin-transform-react-jsx-self": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.23.3.tgz", + "integrity": "sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-react-jsx-source": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.23.3.tgz", + "integrity": "sha512-91RS0MDnAWDNvGC6Wio5XYkyWI39FMFO+JK9+4AlgaTH+yWwVTsw7/sn6LK0lH7c5F+TFkpv/3LfCJ1Ydwof/g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, "@babel/plugin-transform-react-pure-annotations": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.7.tgz", @@ -15241,42 +16254,50 @@ } }, "@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.22.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", - "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz", + "integrity": "sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", + "@babel/parser": "^7.23.5", + "@babel/types": "^7.23.5", "debug": "^4.1.0", "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } } }, "@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", + "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -15286,6 +16307,160 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "dev": true, + "optional": true + }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -15324,15 +16499,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -15341,12 +16507,6 @@ "requires": { "argparse": "^2.0.1" } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true } } }, @@ -16040,7 +17200,6 @@ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz", "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==", "dev": true, - "peer": true, "requires": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -16051,7 +17210,6 @@ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, - "peer": true, "requires": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -16332,13 +17490,13 @@ "dev": true }, "@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" @@ -16442,7 +17600,6 @@ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.2.tgz", "integrity": "sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA==", "dev": true, - "peer": true, "requires": { "@types/estree": "*", "@types/json-schema": "*" @@ -16453,7 +17610,6 @@ "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", "dev": true, - "peer": true, "requires": { "@types/eslint": "*", "@types/estree": "*" @@ -16463,8 +17619,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", - "dev": true, - "peer": true + "dev": true }, "@types/fs-extra": { "version": "9.0.13", @@ -16896,12 +18051,75 @@ "eslint-visitor-keys": "^3.0.0" } }, + "@vitejs/plugin-react": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz", + "integrity": "sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==", + "dev": true, + "requires": { + "@babel/core": "^7.23.5", + "@babel/plugin-transform-react-jsx-self": "^7.23.3", + "@babel/plugin-transform-react-jsx-source": "^7.23.3", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.0" + } + }, + "@vue/component-compiler-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz", + "integrity": "sha512-97sfH2mYNU+2PzGrmK2haqffDpVASuib9/w2/noxiFi31Z54hW+q3izKQXXQZSNhtiUpAI36uSuYepeBe4wpHQ==", + "dev": true, + "requires": { + "consolidate": "^0.15.1", + "hash-sum": "^1.0.2", + "lru-cache": "^4.1.2", + "merge-source-map": "^1.1.0", + "postcss": "^7.0.36", + "postcss-selector-parser": "^6.0.2", + "prettier": "^1.18.2 || ^2.0.0", + "source-map": "~0.6.1", + "vue-template-es2015-compiler": "^1.9.0" + }, + "dependencies": { + "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, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "requires": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + } + }, + "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 + } + } + }, "@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", "dev": true, - "peer": true, "requires": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -16911,29 +18129,25 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true, - "peer": true + "dev": true }, "@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true, - "peer": true + "dev": true }, "@webassemblyjs/helper-buffer": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true, - "peer": true + "dev": true }, "@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, - "peer": true, "requires": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -16944,15 +18158,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true, - "peer": true + "dev": true }, "@webassemblyjs/helper-wasm-section": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", "dev": true, - "peer": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -16965,7 +18177,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, - "peer": true, "requires": { "@xtuc/ieee754": "^1.2.0" } @@ -16975,7 +18186,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, - "peer": true, "requires": { "@xtuc/long": "4.2.2" } @@ -16984,15 +18194,13 @@ "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true, - "peer": true + "dev": true }, "@webassemblyjs/wasm-edit": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", "dev": true, - "peer": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -17009,7 +18217,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", "dev": true, - "peer": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -17023,7 +18230,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", "dev": true, - "peer": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -17036,7 +18242,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", "dev": true, - "peer": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -17051,7 +18256,6 @@ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", "dev": true, - "peer": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@xtuc/long": "4.2.2" @@ -17087,15 +18291,13 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true, - "peer": true + "dev": true }, "@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true, - "peer": true + "dev": true }, "abab": { "version": "2.0.6", @@ -17132,7 +18334,6 @@ "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "dev": true, - "peer": true, "requires": {} }, "acorn-jsx": { @@ -17641,6 +18842,12 @@ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -17824,12 +19031,38 @@ "domutils": "^2.8.0" } }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, "chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, - "peer": true + "dev": true }, "cjs-module-lexer": { "version": "1.2.2", @@ -17907,6 +19140,15 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "consolidate": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", + "integrity": "sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==", + "dev": true, + "requires": { + "bluebird": "^3.1.1" + } + }, "consolidated-events": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/consolidated-events/-/consolidated-events-2.0.2.tgz", @@ -17985,6 +19227,35 @@ "which": "^2.0.1" } }, + "css-loader": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.8.1.tgz", + "integrity": "sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==", + "dev": true, + "peer": true, + "requires": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.21", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.3", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.3.8" + }, + "dependencies": { + "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, + "peer": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, "css-select": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", @@ -18010,6 +19281,12 @@ "integrity": "sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=", "dev": true }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, "cssom": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", @@ -18297,7 +19574,6 @@ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz", "integrity": "sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==", "dev": true, - "peer": true, "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -18434,8 +19710,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz", "integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==", - "dev": true, - "peer": true + "dev": true }, "es-set-tostringtag": { "version": "2.0.1", @@ -18474,6 +19749,36 @@ "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", "dev": true }, + "esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -18656,15 +19961,6 @@ "path-exists": "^4.0.0" } }, - "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -18715,12 +20011,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true } } }, @@ -19058,8 +20348,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "peer": true + "dev": true }, "exit": { "version": "0.1.2", @@ -19406,8 +20695,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "peer": true + "dev": true }, "global-cache": { "version": "1.2.1", @@ -19420,10 +20708,21 @@ } }, "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + }, + "dependencies": { + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } }, "globalthis": { "version": "1.0.3", @@ -19448,6 +20747,12 @@ "slash": "^3.0.0" } }, + "globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true + }, "glub": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/glub/-/glub-1.0.3.tgz", @@ -19536,6 +20841,12 @@ "has-symbols": "^1.0.2" } }, + "hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==", + "dev": true + }, "history": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/history/-/history-5.3.0.tgz", @@ -19653,6 +20964,14 @@ "safer-buffer": ">= 2.1.2 < 3.0.0" } }, + "icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "peer": true, + "requires": {} + }, "identity-obj-proxy": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz", @@ -19673,6 +20992,12 @@ "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.14.tgz", "integrity": "sha512-ubBeqQutOSLIFCUBN03jGeOS6a3DoYlSYwYJTa+gSKEZKU5redJIqkIdZ3JVv/4RZpfcXdAWH5zCNLWPRv2WDw==" }, + "immutable": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", + "dev": true + }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -19765,6 +21090,15 @@ "has-bigints": "^1.0.1" } }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -21782,8 +23116,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "peer": true + "dev": true }, "loader-utils": { "version": "1.4.2", @@ -21915,6 +23248,15 @@ "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", "dev": true }, + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -22016,6 +23358,12 @@ "minimatch": "^3.0.4" } }, + "nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -22038,8 +23386,7 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true, - "peer": true + "dev": true }, "nice-try": { "version": "1.0.5", @@ -22504,6 +23851,74 @@ "dev": true, "peer": true }, + "postcss": { + "version": "8.4.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", + "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", + "dev": true, + "requires": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true, + "peer": true, + "requires": {} + }, + "postcss-modules-local-by-default": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz", + "integrity": "sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==", + "dev": true, + "peer": true, + "requires": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + } + }, + "postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "peer": true, + "requires": { + "postcss-selector-parser": "^6.0.4" + } + }, + "postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "peer": true, + "requires": { + "icss-utils": "^5.0.0" + } + }, + "postcss-selector-parser": { + "version": "6.0.13", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", + "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "peer": true + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -22701,6 +24116,12 @@ "reflect.ownkeys": "^0.2.0" } }, + "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 + }, "psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", @@ -22759,7 +24180,6 @@ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "peer": true, "requires": { "safe-buffer": "^5.1.0" } @@ -22904,6 +24324,12 @@ } } }, + "react-refresh": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", + "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", + "dev": true + }, "react-shallow-renderer": { "version": "16.15.0", "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz", @@ -23051,6 +24477,15 @@ "util-deprecate": "~1.0.1" } }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, "redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -23242,6 +24677,15 @@ } } }, + "rollup": { + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, "rst-selector-parser": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", @@ -23303,6 +24747,17 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "sass": { + "version": "1.69.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.0.tgz", + "integrity": "sha512-l3bbFpfTOGgQZCLU/gvm1lbsQ5mC/WnLz3djL2v4WCJBDrWm58PO+jgngcGRNnKUh6wSsdm50YaovTqskZ0xDQ==", + "dev": true, + "requires": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + } + }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -23356,7 +24811,6 @@ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", "dev": true, - "peer": true, "requires": { "randombytes": "^2.1.0" } @@ -23423,6 +24877,12 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + }, "source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -23698,8 +25158,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "peer": true + "dev": true }, "terminal-link": { "version": "2.1.1", @@ -23716,7 +25175,6 @@ "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.7.tgz", "integrity": "sha512-/bi0Zm2C6VAexlGgLlVxA0P2lru/sdLyfCVaRMfKVo9nWxbmz7f/sD8VPybPeSUJaJcwmCJis9pBIhcVcG1QcQ==", "dev": true, - "peer": true, "requires": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -23729,7 +25187,6 @@ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", "dev": true, - "peer": true, "requires": { "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", @@ -23743,7 +25200,6 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", "dev": true, - "peer": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -23847,6 +25303,13 @@ "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", "dev": true }, + "tsconfck": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-2.1.2.tgz", + "integrity": "sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==", + "dev": true, + "requires": {} + }, "tsconfig-paths": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", @@ -24086,6 +25549,78 @@ "spdx-expression-parse": "^3.0.0" } }, + "vite": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.5.tgz", + "integrity": "sha512-4m5kEtAWHYr0O1Fu7rZp64CfO1PsRGZlD3TAB32UmQlpd7qg15VF7ROqGN5CyqN7HFuwr7ICNM2+fDWRqFEKaA==", + "dev": true, + "requires": { + "esbuild": "^0.18.10", + "fsevents": "~2.3.2", + "postcss": "^8.4.26", + "rollup": "^3.25.2" + } + }, + "vite-plugin-require": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/vite-plugin-require/-/vite-plugin-require-1.1.13.tgz", + "integrity": "sha512-oJ2MtDoaNArlE33Iu9swZH54oWn4dk4acIYhd5eiZ5d1WyshoHGVyF7O7TPVYprAqOEU0s9+57LCbeuVO5pWFg==", + "dev": true, + "requires": { + "@babel/generator": "^7.15.4", + "@babel/parser": "^7.15.6", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.10.3", + "vue-loader": "^15.9.8", + "webpack": "^4.46.0 || ^5.0.0" + } + }, + "vite-tsconfig-paths": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.2.1.tgz", + "integrity": "sha512-GNUI6ZgPqT3oervkvzU+qtys83+75N/OuDaQl7HmOqFTb0pjZsuARrRipsyJhJ3enqV8beI1xhGbToR4o78nSQ==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "globrex": "^0.1.2", + "tsconfck": "^2.1.0" + } + }, + "vue-hot-reload-api": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", + "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==", + "dev": true + }, + "vue-loader": { + "version": "15.11.1", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz", + "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==", + "dev": true, + "requires": { + "@vue/component-compiler-utils": "^3.1.0", + "hash-sum": "^1.0.2", + "loader-utils": "^1.1.0", + "vue-hot-reload-api": "^2.3.0", + "vue-style-loader": "^4.1.0" + } + }, + "vue-style-loader": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", + "integrity": "sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg==", + "dev": true, + "requires": { + "hash-sum": "^1.0.2", + "loader-utils": "^1.0.2" + } + }, + "vue-template-es2015-compiler": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz", + "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", + "dev": true + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -24118,7 +25653,6 @@ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, - "peer": true, "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -24135,7 +25669,6 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.85.1.tgz", "integrity": "sha512-xTb7MRf4LY8Z5rzn7aIx4TDrwYJrjcHnIfU1TqtyZOoObyuGSpAUwIvVuqq5wPnv7WEgQr8UvO1q/dgoGG4HjA==", "dev": true, - "peer": true, "requires": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", @@ -24168,7 +25701,6 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", "dev": true, - "peer": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -24181,8 +25713,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "peer": true + "dev": true }, "whatwg-encoding": { "version": "2.0.0", diff --git a/package.json b/package.json index dc6f653d..0470b9e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.2", + "version": "13.2.2-beta01", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" @@ -22,7 +22,8 @@ "build:lib": "npm-run-all build:js build:copy-files", "prebuild:lib": "rimraf lib", "prepare": "npm run build:lib", - "test": "jest --config config/jest.config.js" + "test": "jest --config config/jest.config.js", + "dev": "vite" }, "husky": { "hooks": { @@ -116,9 +117,14 @@ "rimraf": "^3.0.2", "tabbable": "^6.2.0", "typescript": "^4.8.3", + "vite": "^4.4.5", + "vite-plugin-require": "^1.1.13", + "vite-tsconfig-paths": "^4.2.1", "whatwg-fetch": "^2.0.4", "xml2js": "^0.6.2", - "yargs": "^17.7.2" + "yargs": "^17.7.2", + "@vitejs/plugin-react": "^4.2.1", + "sass": "^1.69.0" }, "dependencies": { "@types/react-collapse": "^5.0.1", diff --git a/src/components/formcomponents/date/time.tsx b/src/components/formcomponents/date/time.tsx index 14c99677..0c505c87 100644 --- a/src/components/formcomponents/date/time.tsx +++ b/src/components/formcomponents/date/time.tsx @@ -8,7 +8,7 @@ import { QuestionnaireItem, QuestionnaireResponseItemAnswer, QuestionnaireRespon import TimeInput from '@helsenorge/date-time/components/time-input'; import { parseDate } from '@helsenorge/date-time/components/time-input/date-core'; -import DateTimeConstants from '@helsenorge/date-time/constants/datetime'; +import * as DateTimeConstants from '@helsenorge/date-time/constants/datetime'; import { ValidationProps } from '@helsenorge/form/components/form/validation'; import Validation from '@helsenorge/form/components/form/validation'; @@ -62,7 +62,7 @@ class Time extends React.Component { this.getValue = this.getValue.bind(this); } - convertAnswerToString(answer: QuestionnaireResponseItemAnswer): string { + convertAnswerToString(answer: QuestionnaireResponseItemAnswer): string { if (answer && answer.valueTime) { return answer.valueTime; } @@ -73,7 +73,7 @@ class Time extends React.Component { return this.getTimeStringFromDate(parseDate(String(answer.valueDateTime))); } return ''; - }; + } getValue(): string | undefined { const { value, answer } = this.props; @@ -83,7 +83,7 @@ class Time extends React.Component { if (Array.isArray(answer)) { return answer.map(m => this.convertAnswerToString(m)).join(', '); } - return this.convertAnswerToString(answer); + return this.convertAnswerToString(answer); } getPDFValue(): string { @@ -221,7 +221,8 @@ class Time extends React.Component { if (renderFieldset) { return ( { const actions: Array = []; for (const linkId in scores) { @@ -173,20 +169,20 @@ class Refero extends React.Component | undefined { const { formDefinition, resources, formData, promptLoginMessage } = this.props; diff --git a/src/preview/App.tsx b/src/preview/App.tsx new file mode 100644 index 00000000..2e4224a4 --- /dev/null +++ b/src/preview/App.tsx @@ -0,0 +1,25 @@ +import React, { useState } from 'react'; +import './styles/skjemautfyller.scss'; +import './styles/sidebar.scss'; +import './styles/refero.scss'; +// import './styles/formFillerPreview.css'; +// import './styles/formFillerSidebar.css'; + +import FormFillerPreview from './FormFillerPreview'; + +// eslint-disable-next-line @typescript-eslint/explicit-function-return-type +function App() { + const [show, setShow] = useState(true); + return ( + <> + {/*eslint-disable-next-line*/} + { + setShow(prevState => !prevState); + }} + /> + + ); +} + +export default App; diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx new file mode 100644 index 00000000..2ea99b33 --- /dev/null +++ b/src/preview/FormFillerPreview.tsx @@ -0,0 +1,72 @@ +import React, { useState } from 'react'; + +import { Provider } from 'react-redux'; +import { Store, createStore, applyMiddleware } from 'redux'; +import thunk from 'redux-thunk'; + +import { QuestionnaireResponse } from '../types/fhir'; + +import FormFillerSidebar from './FormFillerSidebar'; +import { emptyPropertyReplacer } from './helpers'; +import { getResources } from './resources/referoResources'; +import skjema from './skjema/kun_qest.json'; +// import { getResources } from './resources/referoResources'; +import { ReferoContainer } from '../components'; +import rootReducer from '../reducers'; +import { Resources } from '../util/resources'; + +type Props = { + showFormFiller: () => void; +}; + +const FormFillerPreview = ({ showFormFiller }: Props): JSX.Element => { + const store: Store = createStore(rootReducer, applyMiddleware(thunk)); + + const questionnaireForPreview = JSON.parse(JSON.stringify(skjema ?? {}, emptyPropertyReplacer)); + const [questionnaireResponse, setQuestionnaireResponse] = useState(); + const [showResponse, setShowResponse] = useState(false); + return ( + +
+
+
+

{'Preview'}

+
+ + +
+ {!showResponse ? ( +
+ { + setQuestionnaireResponse(questionnaireResponse); + setShowResponse(true); + }} + // eslint-disable-next-line no-console + onSubmit={(): void => console.log('onSubmit')} + authorized={true} + resources={getResources('') as unknown as Resources} + sticky={true} + saveButtonDisabled={false} + loginButton={} + syncQuestionnaireResponse + validateScriptInjection + /> +
+ ) : ( +
+

{JSON.stringify(questionnaireResponse)}

+ +
+ )} +
+
+
+
+ ); +}; + +export default FormFillerPreview; diff --git a/src/preview/FormFillerSidebar.tsx b/src/preview/FormFillerSidebar.tsx new file mode 100644 index 00000000..07207459 --- /dev/null +++ b/src/preview/FormFillerSidebar.tsx @@ -0,0 +1,45 @@ +import React from 'react'; + +import { Questionnaire } from '../types/fhir'; + +import { generateSectionContent, getSidebarElements } from './resources/referoSidebarResources'; + +type Props = { + questionnaire: Questionnaire; +}; + +const FormFillerSidebar = ({ questionnaire }: Props): JSX.Element => { + const [isSidebarViewEnabled, setIsSidebarViewEnabled] = React.useState(false); + const sidebarData = getSidebarElements(questionnaire); + + return ( +
+ + {isSidebarViewEnabled && ( +
+ {generateSectionContent('Alternativer for utfylling', sidebarData['SOT-1'])} + {generateSectionContent('Veiledning og ansvarlig', sidebarData['SOT-2'])} + {generateSectionContent('Behandling hos mottaker', sidebarData['SOT-3'])} +
+ )} +
+ ); +}; + +export default FormFillerSidebar; diff --git a/src/preview/Select/Select.css b/src/preview/Select/Select.css new file mode 100644 index 00000000..6d6c258d --- /dev/null +++ b/src/preview/Select/Select.css @@ -0,0 +1,42 @@ +.selector { + position: relative; +} + +.selector img { + position: absolute; + right: 12px; + top: 15px; + z-index: 1; + pointer-events: none; +} + +.selector select { + font-size: 14px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + width: 100%; + z-index: 2; +} + +.compact select { + padding-top: 0; + padding-bottom: 0; +} + +.down-arrow-icon{ + height: 25px; + width: 25px; + background: url("../../images/icons/chevron-down-outline.svg") no-repeat center; + position: absolute; + right: 12px; + top: 15px; + z-index: 1; + pointer-events: none; +} + +.select-display-value { + font-size: 12px; + color: #696969; + margin: 4px; +} \ No newline at end of file diff --git a/src/preview/Select/Select.tsx b/src/preview/Select/Select.tsx new file mode 100644 index 00000000..25aabcdc --- /dev/null +++ b/src/preview/Select/Select.tsx @@ -0,0 +1,34 @@ +import React from 'react'; + +import './Select.css'; +import { ValueSetComposeIncludeConcept } from '../../types/fhir'; + +type Props = { + options: ValueSetComposeIncludeConcept[]; + onChange: (event: React.ChangeEvent) => void; + value?: string; + placeholder?: string; + compact?: boolean; +}; + +const Select = ({ options, onChange, value, placeholder, compact }: Props): JSX.Element => { + return ( +
+ + +
+ ); +}; + +export default Select; diff --git a/src/preview/helpers/index.ts b/src/preview/helpers/index.ts new file mode 100644 index 00000000..9fadd79d --- /dev/null +++ b/src/preview/helpers/index.ts @@ -0,0 +1,102 @@ +import { Extension, QuestionnaireItem } from '../../types/fhir'; + +type Language = { + code: string; + display: string; + localDisplay: string; +}; +export interface CodeStringValue { + [code: string]: string; +} +export interface ContainedTranslation { + concepts: CodeStringValue; +} + +export interface ContainedTranslations { + [id: string]: ContainedTranslation; +} +export interface ItemTranslation { + answerOptions?: CodeStringValue; + entryFormatText?: string; + initial?: string; + text?: string; + validationText?: string; + sublabel?: string; + repeatsText?: string; + prefix?: string; +} +export interface ItemTranslations { + [linkId: string]: ItemTranslation; +} +export interface SidebarItemTranslation { + markdown: string; +} + +export interface MetadataTranslations { + [key: string]: string; +} + +export interface SidebarItemTranslation { + markdown: string; +} + +export interface SidebarItemTranslations { + [linkId: string]: SidebarItemTranslation; +} + +export interface SettingTranslations { + [key: string]: Extension; +} +export interface OrderItem { + linkId: string; + items: Array; +} +export interface Translation { + items: ItemTranslations; + sidebarItems: SidebarItemTranslations; + metaData: MetadataTranslations; + contained: ContainedTranslations; + settings: SettingTranslations; +} +export interface Items { + [linkId: string]: QuestionnaireItem; +} +export interface Languages { + [key: string]: Translation; +} + +export const INITIAL_LANGUAGE: Language = { code: 'nb-NO', display: 'Bokmål', localDisplay: 'Bokmål' }; +export const supportedLanguages: Language[] = [ + INITIAL_LANGUAGE, + { code: 'nn-NO', display: 'Nynorsk', localDisplay: 'Nynorsk' }, + { code: 'se-NO', display: 'Samisk', localDisplay: 'Davvisámegillii' }, + { code: 'en-GB', display: 'Engelsk', localDisplay: 'English' }, + { code: 'pl-PL', display: 'Polsk', localDisplay: 'Polskie' }, + { code: 'ro-RO', display: 'Rumensk', localDisplay: 'Română' }, + { code: 'lt-LT', display: 'Litauisk', localDisplay: 'Lietuvis' }, + { code: 'ru-RU', display: 'Russisk', localDisplay: 'русский' }, + { code: 'fr-FR', display: 'Fransk', localDisplay: 'Français' }, +]; + +const isEmptyObject = (value: unknown): boolean => { + return typeof value === 'object' && Object.keys(>value).length === 0; +}; + +export const getLanguageFromCode = (languageCode: string): Language | undefined => { + return supportedLanguages.find(x => x.code.toLowerCase() === languageCode.toLowerCase()); +}; + +export const emptyPropertyReplacer = (_key: string, value: unknown): unknown => { + if (value === undefined || value === null || value === '') { + return undefined; + } + if (Array.isArray(value)) { + // remove empty objects from array (to avoid null values in arrays) + const filteredValue = value.filter(x => !isEmptyObject(x)); + return filteredValue.length === 0 ? undefined : filteredValue; + } + if (isEmptyObject(value)) { + return undefined; + } + return value; +}; diff --git a/src/preview/index.html b/src/preview/index.html new file mode 100644 index 00000000..d9b19ce8 --- /dev/null +++ b/src/preview/index.html @@ -0,0 +1,14 @@ + + + + + + Preview schema + + +
+ + + diff --git a/src/preview/init.js b/src/preview/init.js new file mode 100644 index 00000000..94ec7ad4 --- /dev/null +++ b/src/preview/init.js @@ -0,0 +1,2 @@ +// init.js +window.global ||= window; diff --git a/src/preview/main.tsx b/src/preview/main.tsx new file mode 100644 index 00000000..c89ba216 --- /dev/null +++ b/src/preview/main.tsx @@ -0,0 +1,16 @@ +import './init'; +import React from 'react'; + +import ReactDOM from 'react-dom'; + +import App from './App'; + +const container = document.getElementById('root'); +container?.classList.add('root'); + +ReactDOM.render( + + + , + container +); diff --git a/src/preview/resources/referoResources.tsx b/src/preview/resources/referoResources.tsx new file mode 100644 index 00000000..cf186a38 --- /dev/null +++ b/src/preview/resources/referoResources.tsx @@ -0,0 +1,307 @@ +export const getResources = (language: string) => { + if (language === 'en-GB') { + return { + deleteButtonText: 'Delete', + validationSummaryHeader: 'Check that the following are filled in correctly:', + validationFileMax: 'File size must be less than 25MB', + validationFileType: 'The file type must be jpeg, png, or pdf', + supportedFileFormats: 'Valid file formats are jpeg, png and pdf', + selectDefaultPlaceholder: 'Select one of the options.', + resetTime: 'Reset time', + errorAfterMaxDate: 'Date cannot be after maximum date', + errorBeforeMinDate: 'Date cannot be before minimum date', + dateRequired: 'Select date, or enter date as follows: dd.mm.yyyy.', + oppgiTid: ' Enter time', + ugyldigTid: 'Invalid time', + ugyldigDatoTid: 'Invalid date and time', + oppgiVerdi: 'Select one of the options.', + oppgiGyldigVerdi: 'Please enter a valid value', + formCancel: 'Cancel', + formSend: 'Submit', + formSave: 'Show QuestionnaireResponse', + formError: 'Check that everything is filled in correctly.', + formOptional: '(optional)', + formRequired: '(required)', + repeatButtonText: 'Add', + avsluttSkjema: 'Discard changes', + fortsett: 'Continue editing', + confirmDeleteButtonText: 'Delete row', + confirmDeleteCancelButtonText: 'Discard changes', + confirmDeleteHeading: 'There are unsaved changes', + confirmDeleteDescription: 'If you delete the row, your changes will be discarded.', + minutePlaceholder: 'mm', + hourPlaceholder: 'hh', + ikkeBesvart: 'Not answered', + uploadButtonText: 'Upload file', + filterDateCalendarButton: 'Select date', + filterDateNavigateBackward: 'Back', + filterDateNavigateForward: 'Forward', + filterDateErrorDateFormat: 'The date is entered in the wrong format', + filterDateErrorBeforeMinDate: 'From date can not be earlier than before date', + filterDateErrorAfterMaxDate: 'From date can not be later than to date', + validationNotAllowed: 'is not allowed', + formRequiredErrorMessage: 'This field is required', + deleteAttachmentText: 'Delete', + autoSuggestLoadError: 'Technical error', + autosuggestNoSuggestions: 'No results found for "{0}". Try another word or check for spelling errors.', + stringOverMaxLengthError: 'You have typed too many characters. Make the text shorter.', + maxLengthText: 'Maximum {0} characters', + chooseFilesText: 'Select files', + skipLinkText: 'Go to navigator', + clearDate: 'Remove date', + calendarLabel: 'Calendar', + closeDatePicker: 'Close', + focusStartDate: 'Use the calendar and select a date', + jumpToPrevMonth: 'Go backward to last month', + jumpToNextMonth: 'Go forward to next month', + keyboardShortcuts: 'Keyboard shortcuts', + showKeyboardShortcutsPanel: 'Open the keyboard shortcuts panel', + hideKeyboardShortcutsPanel: 'Close the keyboard shortcut panel', + enterKey: 'Enter key', + leftArrowRightArrow: 'Right and left arrow keys', + upArrowDownArrow: 'Up and down arrow keys', + pageUpPageDown: 'Page up and Page down key', + homeEnd: 'Home and End key', + escape: 'Escape key', + questionMark: 'Question mark', + openThisPanel: 'Open this panel', + selectFocusedDate: 'Select the date that has focus', + moveFocusByOneDay: 'Move one day backward (left) and forward (right)', + moveFocusByOneWeek: 'Move one week backward (up) and forward (down)', + moveFocusByOneMonth: 'Change month', + moveFocustoStartAndEndOfWeek: 'Go to the first or last day of the week', + returnFocusToInput: 'Return to the date in the input field', + year_field_invalid: 'Enter a valid value for the year field', + year_field_maxdate: 'The latest year you can choose is', + year_field_mindate: 'The earliest year you can choose is', + year_field_required: 'Year is required', + yearmonth_field_invalid: 'Invalid value', + yearmonth_field_invalid_year: 'You must enter a valid year', + yearmonth_field_maxdate: 'The latest time you can choose is', + yearmonth_field_mindate: 'The earliest time you can choose is', + yearmonth_field_month_placeholder: 'Choose month', + yearmonth_field_required: 'Year and month is required', + yearmonth_field_year_placeholder: 'Choose year', + adresseKomponent_header: 'Who is the recipient?', + adresseKomponent_skjemaSendesTil: 'Questionnaire will be sent to:', + adresseKomponent_sublabel: 'You must select recipient before submitting the questionnaire.', + adresseKomponent_velgAvdeling: 'Select department', + adresseKomponent_velgHelseforetak: 'Select health company', + adresseKomponent_velgHelseregion: 'Select health region', + adresseKomponent_velgSykehus: 'Select hospital', + adresseKomponent_velgKlinikk: 'Select clinic', + adresseKomponent_velgSeksjon: 'Select section', + adresseKomponent_velgSengepost: 'Select bed post', + adresseKomponent_velgPoliklinikk: 'Select polyclinic', + adresseKomponent_velgTjeneste: 'Select place of treatment', + adresseKomponent_feilmelding: 'You must select a recipient.', + adresseKomponent_loadError: 'Technical error. Could not load recipients.', + linkOpensInNewTab: 'Opens in new tab', + nextStep: 'Next', + previousStep: 'Previous', + }; + } + if (language === 'fr-FR') { + return { + deleteButtonText: 'Supprimer', + validationSummaryHeader: 'Vérifiez que les éléments suivants sont bien remplis:', + validationFileMax: 'La taille des fichiers doit être inférieure à 25MB', + validationFileType: 'Le type de fichier doit être jpeg, png, or pdf', + supportedFileFormats: 'Les formats de fichier valides sont jpeg, png and pdf', + selectDefaultPlaceholder: 'Sélectionnez une des options.', + resetTime: 'Temps de réinitialisation', + errorAfterMaxDate: 'La date ne peut pas être après la date maximum', + errorBeforeMinDate: 'La date ne peut pas être avant la date minimum', + dateRequired: 'Sélectionnez une date, ou entrez la date comme suit: jj.mm.aaaa.', + oppgiTid: " Entrez l'heure", + ugyldigTid: 'Heure invalide', + ugyldigDatoTid: 'Date et heure invalides', + oppgiVerdi: 'Sélectionnez une des options.', + oppgiGyldigVerdi: 'Merci de entrer une valeur valide', + formCancel: 'Annuler', + formSend: 'Valider', + formSave: 'Afficher QuestionnaireResponse', + formError: 'Vérifiez que tout soit rempli correctement.', + formOptional: '(optionnel)', + formRequired: '(requis)', + repeatButtonText: 'Ajouter', + avsluttSkjema: 'Annuler les modifications', + fortsett: "Continuer l'édition", + confirmDeleteButtonText: 'Supprimer la ligne', + confirmDeleteCancelButtonText: 'Annuler les modifications', + confirmDeleteHeading: 'Il y a des modifications non sauvegardées', + confirmDeleteDescription: 'Si vous supprimez la ligne, vos modifications seront annuéles.', + minutePlaceholder: 'mm', + hourPlaceholder: 'hh', + ikkeBesvart: 'Non répondu', + uploadButtonText: 'Charger un fichier', + filterDateCalendarButton: 'Sélectionner une date', + filterDateNavigateBackward: 'Précédent', + filterDateNavigateForward: 'Suivant', + filterDateErrorDateFormat: 'Le format de la date est incorrect', + filterDateErrorBeforeMinDate: 'La date ne peut pas être une date située avant la date minimale', + filterDateErrorAfterMaxDate: 'La date ne peut pas être une date située après la date maximale', + validationNotAllowed: "n'est pas permis", + formRequiredErrorMessage: 'Ce champ est requis', + deleteAttachmentText: 'Supprimer', + autoSuggestLoadError: 'Erreur technique', + autosuggestNoSuggestions: 'Pas de résultat pour "{0}". Essayez un autre mot ou vérifiez son orthographe.', + stringOverMaxLengthError: 'Vous avez entré trop de caractères. Réduisez le texte.', + maxLengthText: 'Maximum {0} caractères', + chooseFilesText: 'Selectionnez les fichiers', + skipLinkText: 'Allez au navigateur', + clearDate: 'Supprimer la date', + calendarLabel: 'Calendrier', + closeDatePicker: 'Fermer', + focusStartDate: 'Utilisez le calendrier et sélectionnez une date', + jumpToPrevMonth: 'Aller au mois précédent', + jumpToNextMonth: 'Aller au mois suivant', + keyboardShortcuts: 'Raccourcis clavier', + showKeyboardShortcutsPanel: 'Ouvrir le menu des raccourcis clavier', + hideKeyboardShortcutsPanel: 'Fermer le menu des raccourcis clavier', + enterKey: 'Entrez la touche', + leftArrowRightArrow: 'Flèches gauche et droite', + upArrowDownArrow: 'Flèches haut et bas', + pageUpPageDown: 'Touches page haut/bas', + homeEnd: 'Touche fin', + escape: 'Touche échap', + questionMark: "Point d'interrogation", + openThisPanel: 'Ouvrir ce menu', + selectFocusedDate: 'Selectionnez la date choisie', + moveFocusByOneDay: "Reculer (gauche) ou avancer (droite) d'un jour", + moveFocusByOneWeek: "Reculer (haut) ou avancer (bas) d'une semaine", + moveFocusByOneMonth: 'Changer de mois', + moveFocustoStartAndEndOfWeek: 'Aller au premier ou dernier jour de la semaine', + returnFocusToInput: 'Retourner à la date saisie', + year_field_invalid: "Entrez une valeur valide pour l'année", + year_field_maxdate: "Le dernier choix d'année possible est", + year_field_mindate: "Le premier choix d'année possible est", + year_field_required: "L'année est requise", + yearmonth_field_invalid: 'Valeur invalide', + yearmonth_field_invalid_year: 'Vous devez entrer une année valide', + yearmonth_field_maxdate: 'La dernière heure que vous pouvez choisir est', + yearmonth_field_mindate: 'La première heure que vous pouvez choisir est', + yearmonth_field_month_placeholder: 'Choisissez le mois', + yearmonth_field_required: "L'année et le mois sont requis", + yearmonth_field_year_placeholder: "Choisissez l'année'", + adresseKomponent_header: 'Qui est le destinataire ?', + adresseKomponent_skjemaSendesTil: 'Le Questionnaire sera envoyé à :', + adresseKomponent_sublabel: "Vous devez sélectionner un destinataire avant d'envoyer le questionnaire.", + adresseKomponent_velgAvdeling: 'Sélectionnez le département', + adresseKomponent_velgHelseforetak: "Sélectionnez l'entreprise", + adresseKomponent_velgHelseregion: 'Sélectionnez la région', + adresseKomponent_velgSykehus: "Sélectionnez l'hopital", + adresseKomponent_velgKlinikk: 'Sélectionnez la clinique', + adresseKomponent_velgSeksjon: 'Sélectionnez la section', + adresseKomponent_velgSengepost: 'Sélectionnez le lit', + adresseKomponent_velgPoliklinikk: 'Sélectionnez la polyclinique', + adresseKomponent_velgTjeneste: 'Sélectionnez le lieu de soin', + adresseKomponent_feilmelding: 'Vous devez sélectionner un destinataire.', + adresseKomponent_loadError: 'Erreur technique. Impossible de charger les destinataires.', + linkOpensInNewTab: `S'ouvre dans un nouvel onglet`, + nextStep: 'Suivant', + previousStep: 'Précédent', + }; + } + return { + deleteButtonText: 'Slett', + validationSummaryHeader: 'Sjekk at følgende er riktig utfylt:', + validationFileMax: 'Filstørrelsen må være mindre enn 25MB', + validationFileType: 'Filtypen må være jpeg, png, eller pdf', + supportedFileFormats: 'Gyldige filformater er jpeg, png og pdf', + selectDefaultPlaceholder: 'Velg...', + resetTime: 'Nullstill tidspunkt', + errorAfterMaxDate: 'Dato kan ikke være etter maksimum dato', + errorBeforeMinDate: 'Dato kan ikke være før minimums dato', + dateRequired: 'Oppgi en dato', + oppgiTid: ' Oppgi tid', + ugyldigTid: 'Ugyldig tid', + oppgiDatoTid: 'oppgi dato og tid', + ugyldigDatoTid: 'Ugyldig dato og tid', + oppgiVerdi: 'Oppgi en verdi', + oppgiGyldigVerdi: 'Oppgi en gyldig verdi', + formCancel: 'Avbryt', + formSend: 'Fullfør', + formSave: 'Vis QuestionnaireResponse', + formError: 'Sjekk at alt er riktig utfylt.', + formOptional: '(valgfritt)', + formRequired: '(må fylles ut)', + repeatButtonText: 'Legg til', + avsluttSkjema: 'Avslutt skjema', + fortsett: 'Fortsett', + confirmDeleteButtonText: 'Forkast endringer', + confirmDeleteCancelButtonText: 'Avbryt', + confirmDeleteHeading: 'Det finnes endringer', + confirmDeleteDescription: 'Hvis du sletter, vil du miste endringene.', + minutePlaceholder: 'mm', + hourPlaceholder: 'tt', + ikkeBesvart: 'Ikke besvart', + uploadButtonText: 'Last opp fil', + filterDateCalendarButton: 'Velg dato', + filterDateNavigateBackward: 'Tilbake', + filterDateNavigateForward: 'Fram', + filterDateErrorDateFormat: 'Datoen er oppgitt på feil format', + filterDateErrorBeforeMinDate: 'Fra-dato kan ikke være senere enn til-dato', + filterDateErrorAfterMaxDate: 'Fra-dato kan ikke være senere enn til-dato', + validationNotAllowed: 'er ikke tillatt', + formRequiredErrorMessage: 'Du må fylle ut dette feltet', + deleteAttachmentText: 'Slett', + autoSuggestLoadError: 'Teknisk feil', + autosuggestNoSuggestions: 'Ingen treff på "{0}". Prøv med et annet ord eller sjekk for skrivefeil.', + stringOverMaxLengthError: 'Du har skrevet for mange tegn. Gjør teksten kortere.', + maxLengthText: 'Maksimum {0} tegn', + chooseFilesText: 'Velg filer', + skipLinkText: 'Hopp til navigator', + clearDate: 'Fjern dato', + calendarLabel: 'Kalender', + closeDatePicker: 'Lukk', + focusStartDate: 'Bruk kalenderen og velg dato.', + jumpToPrevMonth: 'Gå bakover til forrige måned', + jumpToNextMonth: 'Gå fremover til neste måned', + keyboardShortcuts: 'Tastatursnarveier', + showKeyboardShortcutsPanel: 'Åpne panelet med tastatursnarveier', + hideKeyboardShortcutsPanel: 'Lukk panelet med tastatursnarveier', + enterKey: 'Enter tast', + leftArrowRightArrow: 'Høyre og venstre piltast', + upArrowDownArrow: 'Opp og ned piltast', + pageUpPageDown: 'Side opp og Side ned tast', + homeEnd: 'Hjem og Slutt tast', + escape: 'Escape tast', + questionMark: 'Spørsmålstegn', + openThisPanel: 'Åpne dette panelet', + selectFocusedDate: 'Velg datoen som har fokus', + moveFocusByOneDay: 'Flytt en dag bakover (venstre) og fremover (høyre)', + moveFocusByOneWeek: 'Flytt en uke bakover (opp) og fremover (ned)', + moveFocusByOneMonth: 'Skifte måned', + moveFocustoStartAndEndOfWeek: 'Gå til første eller siste dag av uken', + returnFocusToInput: 'Gå tilbake til datoen i inputfeltet', + year_field_invalid: 'Du må skrive inn et gyldig årstall', + year_field_maxdate: 'Årstall er etter det eldste tillatte år', + year_field_mindate: 'Årstall er før det minste tillatte år', + year_field_required: 'Årstall er påkrevd', + yearmonth_field_invalid: 'Ugyldig verdi', + yearmonth_field_invalid_year: 'Du må skrive inn et gyldig årstall', + yearmonth_field_maxdate: 'Tidspunkt er etter eldste tillatte tidspunkt', + yearmonth_field_mindate: 'Tidspunkt er før minste tillatte tidspunkt', + yearmonth_field_month_placeholder: 'Velg måned', + yearmonth_field_required: 'Årstall og måned er påkrevd', + yearmonth_field_year_placeholder: 'Velg år', + adresseKomponent_header: 'Hvem er mottaker av skjemaet?', + adresseKomponent_skjemaSendesTil: 'Skjemaet sendes til:', + adresseKomponent_sublabel: 'Du må velge mottaker før du sender skjemaet.', + adresseKomponent_velgAvdeling: 'Velg avdeling', + adresseKomponent_velgHelseforetak: 'Velg helseforetak', + adresseKomponent_velgHelseregion: 'Velg helseregion', + adresseKomponent_velgSykehus: 'Velg sykehus', + adresseKomponent_velgKlinikk: 'Velg klinikk', + adresseKomponent_velgSeksjon: 'Velg seksjon', + adresseKomponent_velgSengepost: 'Velg sengepost', + adresseKomponent_velgPoliklinikk: 'Velg poliklinikk', + adresseKomponent_velgTjeneste: 'Velg behandlingssted', + adresseKomponent_feilmelding: 'Du må velge en mottaker', + adresseKomponent_loadError: 'Teknisk feil: kunne ikke laste liste over mottakere', + linkOpensInNewTab: 'Åpnes i ny fane', + nextStep: 'Neste', + previousStep: 'Forrige', + }; +}; diff --git a/src/preview/resources/referoSidebarResources.tsx b/src/preview/resources/referoSidebarResources.tsx new file mode 100644 index 00000000..4065a628 --- /dev/null +++ b/src/preview/resources/referoSidebarResources.tsx @@ -0,0 +1,43 @@ +import React from 'react'; + +import { Questionnaire } from '../../types/fhir'; + +import { getSidebarSections } from '../../util/extension'; + +export const generateSectionContent = (header: string, content: string[]): JSX.Element | null => { + return content.length > 0 ? ( + <> +

{header}

+
+ {content.map((x, index) => ( +

+ ))} +
+ + ) : null; +}; + +export const getSidebarElements = (questionnaire: Questionnaire): { [id: string]: string[] } => { + const sidebarData = getSidebarSections(questionnaire as Questionnaire); + + const seksjonerFraSkjema: { [id: string]: string[] } = { + 'SOT-1': [], + 'SOT-2': [], + 'SOT-3': [], + }; + + sidebarData.forEach(x => { + if (x.item.code && x.item.code.length > 0 && x.item.code[0].code) { + if (seksjonerFraSkjema[x.item.code[0].code]) { + seksjonerFraSkjema[x.item.code[0].code].push(x.markdownText); + } + } + }); + + return seksjonerFraSkjema; +}; diff --git a/src/preview/skjema/kun_qest.json b/src/preview/skjema/kun_qest.json new file mode 100644 index 00000000..008a67bd --- /dev/null +++ b/src/preview/skjema/kun_qest.json @@ -0,0 +1,617 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "1000", + "name": "NHN_Skaring", + "title": "Test skåring og utregning gammel og ny", + "version": "0.1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Norsk bokmål" }], + "security": [{ "code": "3", "display": "Helsehjelp", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }] + }, + "useContext": [ + { + "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "valueCodeableConcept": { + "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "code": "P", "display": "Test skåring og utregning gammel og ny" }] + } + } + ], + "contact": [{ "name": "Kontakt Kim ved spørsmål " }], + "subjectType": ["Person"], + "extension": [ + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1000" } }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-authenticationrequirement", + "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/AuthenticationRequirement", "code": "2" } + }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-accessibilitytoresponse", + "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/AccessibilityToResponse", "code": "1" } + }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-canbeperformedby", + "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/CanBePerformedBy", "code": "2" } + }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-discretion", + "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/Discretion", "code": "2" } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatenarrative", "valueBoolean": true }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-presentationbuttons", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/presentationbuttons", "code": "sticky" } + } + ], + "copyright": "Kim Hoel Halvorsen RN MI", + "date": "2023-06-09T00:00:00+02:00", + "item": [ + { "linkId": "1", "text": "Testskjema for kalkulering med seksjonsum, totalsum og eksplisitt angitt sum", "type": "display" }, + { + "linkId": "92971daa-c72b-49a3-82f5-3f5c6c696c31", + "type": "group", + "text": "Dagens løsnings som fortsatt skal virke med rar quantity", + "item": [ + { + "linkId": "2", + "text": "Symptomer", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ], + "linkId": "2.2", + "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], + "text": "Kryss av om noen av disse tilstandene gjelder deg", + "type": "choice", + "required": false, + "repeats": false, + "readOnly": false, + "answerOption": [ + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "code": "1", + "display": "Svært medtatt, vansker med å ta til deg væske eller næring" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "code": "50", + "display": "Alvorlige pustevansker" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "code": "3", + "display": "Brått fall i allmenntilstand" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "code": "4", + "display": "Petekkier (utslett som ikke lar seg avbleke)" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "code": "5", + "display": "Nyoppståtte brystsmerter" + } + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ], + "linkId": "2.3", + "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], + "text": "Har du noen av følgende sykdommer?", + "type": "choice", + "required": false, + "repeats": false, + "readOnly": false, + "answerOption": [ + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "code": "1", + "display": "Astma" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "code": "2", + "display": "Kols" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "code": "3", + "display": "Annen lungesykdom" + } + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ], + "linkId": "2.4", + "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], + "text": "Har du noen av disse plagene?", + "type": "choice", + "required": false, + "repeats": false, + "readOnly": false, + "answerOption": [ + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 10 }], + "code": "1", + "display": "Feber" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 10 }], + "code": "2", + "display": "Tørrhoste" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 10 }], + "code": "3", + "display": "Tungpust" + } + } + ] + }, + { + "linkId": "2.5", + "text": "Beskriv eventuelle andre luftveisplager du har", + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "system": "http://ehelse.no/Score", "code": "score", "display": "score" } + } + ], + "linkId": "2.99", + "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "SS", "display": "Section score" }], + "text": "Seksjonssum gruppe 1", + "type": "quantity", + "required": false, + "repeats": false, + "readOnly": true + } + ] + }, + { + "linkId": "4", + "text": "Resultat", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "system": "http://ehelse.no/Score", "code": "score", "display": "score" } + } + ], + "linkId": "4.1", + "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "TS", "display": "Totalscore" }], + "text": "Totalsum fra alle grupper, om det er seksjonsnummer som skal legges sammen", + "type": "quantity", + "required": false, + "repeats": false, + "readOnly": true + } + ] + }, + { + "linkId": "359430f4-66a4-4545-862a-74c5b38344bc", + "type": "group", + "text": "Utregninger", + "required": false, + "item": [ + { + "linkId": "Value1", + "type": "quantity", + "text": "Verdi 1", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "tallverdi", "display": "Verdi", "system": "urn:uuid:ddc33019-a2f2-41e4-df8f-203f9d221e9c" } + } + ] + }, + { + "linkId": "Value2", + "type": "quantity", + "text": "Verdi 2", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "Tallverdi", "display": " Verdi", "system": "urn:uuid:8bac9130-217f-4080-8357-5c67cec2f3af" } + } + ] + }, + { + "linkId": "2ed78bbb-cdae-4c9c-9b41-573e0d42cc16", + "type": "quantity", + "text": "Sum", + "extension": [ + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='Value1').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value2').answer.value.value)" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "Score", "display": "Sum", "system": "http://ehelse.no/Score" } + } + ], + "required": false, + "readOnly": true + } + ] + } + ], + "required": false + }, + { + "linkId": "c9f0d5c2-1aed-42c2-9ace-66a6603d6cdc", + "type": "group", + "text": "Ny løsning uten rar quantity", + "item": [ + { + "linkId": "b357cc7d-b5df-4709-81a9-026fff6780b7", + "type": "group", + "text": "Skåring gruppe 1 ny versjon uten rar quantity", + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ], + "linkId": "efcdeceb-61dc-40b0-8c49-15aaf061e867", + "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], + "text": "Kryss av om noen av disse tilstandene gjelder deg", + "type": "choice", + "required": false, + "repeats": false, + "readOnly": false, + "answerOption": [ + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "code": "1", + "display": "Svært medtatt, vansker med å ta til deg væske eller næring" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "code": "50", + "display": "Alvorlige pustevansker" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "code": "3", + "display": "Brått fall i allmenntilstand" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "code": "4", + "display": "Petekkier (utslett som ikke lar seg avbleke)" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "code": "5", + "display": "Nyoppståtte brystsmerter" + } + } + ] + }, + { + "linkId": "7ffa61e2-5d00-4a30-dc3e-99432c31402a", + "type": "integer", + "text": "Seksjonssum integer", + "code": [ + { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "402c75be-0e28-49ba-fbbe-ba7cd9d02945" }, + { + "code": "SS", + "display": "Section score", + "system": "http://ehelse.no/scoringFormulas", + "id": "b2987e06-e1d0-450d-f251-ce792f9f6248" + } + ], + "required": false + }, + { + "linkId": "2e609204-273e-41ed-c636-6f77412b530d", + "type": "decimal", + "code": [ + { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "440289ab-ea48-4e49-8f48-7677131575a3" }, + { + "code": "SS", + "display": "Section Score", + "system": "http://ehelse.no/scoringFormulas", + "id": "c0c2385d-4f9e-4790-88b0-dfeb6d4e2885" + } + ], + "required": false, + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], + "text": "Sectionscore Decimal" + } + ], + "required": false + }, + { + "linkId": "f662ec21-e972-45d4-9ef3-38bd146a6bd3", + "type": "group", + "text": "Skåring gruppe 2 uten rar quantity", + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ], + "linkId": "4ef04b21-372a-4c9f-8a1d-c68228fc2be3", + "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], + "text": "Har du noen av følgende sykdommer?", + "type": "choice", + "required": false, + "repeats": false, + "readOnly": false, + "answerOption": [ + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "code": "1", + "display": "Astma" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "code": "2", + "display": "Kols" + } + }, + { + "valueCoding": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "code": "3", + "display": "Annen lungesykdom" + } + } + ] + }, + { + "linkId": "617bce03-06ae-48d5-876b-47633d982a88", + "type": "integer", + "text": "Seksjonssum integer", + "code": [ + { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "402c75be-0e28-49ba-fbbe-ba7cd9d02945" }, + { + "code": "SS", + "display": "Section score", + "system": "http://ehelse.no/scoringFormulas", + "id": "a4cf45d0-3909-479d-cf48-43c7fc57068e" + } + ], + "required": false + }, + { + "linkId": "ff07eed8-064a-47eb-8fbe-10fb91e56124", + "type": "decimal", + "code": [ + { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "440289ab-ea48-4e49-8f48-7677131575a3" }, + { + "code": "SS", + "display": "Section Score", + "system": "http://ehelse.no/scoringFormulas", + "id": "c0c2385d-4f9e-4790-88b0-dfeb6d4e2885" + } + ], + "required": false, + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], + "text": "Sectionscore Decimal" + } + ], + "required": false + }, + { + "linkId": "05ade39f-ddf5-452f-835a-064a9d2c6007", + "text": "Totalsum uten rar quantity", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "521d336d-528a-4fea-97cb-a0ff8ad99313", + "type": "integer", + "text": "Totalsum integer", + "code": [ + { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "402c75be-0e28-49ba-fbbe-ba7cd9d02945" }, + { + "code": "TS", + "display": "Total score", + "system": "http://ehelse.no/scoringFormulas", + "id": "a4cf45d0-3909-479d-cf48-43c7fc57068e" + } + ], + "required": false + }, + { + "linkId": "a9e6cd53-9598-4f1c-c233-5a71eb4593ac", + "type": "decimal", + "code": [ + { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "440289ab-ea48-4e49-8f48-7677131575a3" }, + { + "code": "TS", + "display": "Total Score", + "system": "http://ehelse.no/scoringFormulas", + "id": "c0c2385d-4f9e-4790-88b0-dfeb6d4e2885" + } + ], + "required": false, + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], + "text": "Totalscore Decimal" + } + ] + }, + { + "linkId": "ce8a5997-a926-4f72-cc7f-e1ca8c589852", + "type": "group", + "text": "Utregninger", + "required": false, + "item": [ + { "linkId": "Value3", "type": "integer", "text": "Verdi 3 Integer", "required": false }, + { "linkId": "Value4", "type": "integer", "text": "Verdi 4 Integer", "required": false }, + { + "linkId": "545e17e5-0719-42e8-892c-0da3a8af6ac6", + "type": "integer", + "text": "Summeringsfelt Integer", + "code": [ + { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "3555cebe-8e65-4e4a-8047-40edff07fdf5" } + ], + "required": false, + "extension": [ + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='Value3').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value4').answer.value.value)" + } + ] + }, + { + "linkId": "Value5", + "type": "decimal", + "text": "Verdi 5 Decimal", + "required": false, + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }] + }, + { + "linkId": "Value6", + "type": "decimal", + "text": "Verdi 6 Decimal", + "required": false, + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }] + }, + { + "linkId": "4308af3f-3cdb-422f-d719-7543def7a64f", + "type": "decimal", + "required": false, + "extension": [ + { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='Value5').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value6').answer.value.value)" + } + ], + "text": "Decimal summeringsfelt", + "code": [ + { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "2a37bfbd-f334-4227-8f07-76424668a854" } + ] + }, + { + "linkId": "Value7", + "type": "quantity", + "text": "Verdi 7 Quantity ", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + } + ], + "required": false + }, + { + "linkId": "Value8", + "type": "quantity", + "text": "Verdi 8 Quantity ", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + } + ], + "required": false + }, + { + "linkId": "a655638d-ebc5-416e-88fe-22a8e3657c62", + "type": "quantity", + "text": "Nytt quantityfelt med en egen enhet der man feks skal regne sammen to cm felt", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='Value7').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value8').answer.value.value)" + } + ], + "code": [ + { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "8282dc31-ee08-4741-b86e-0ec90b9fead8" } + ], + "required": false + } + ] + } + ], + "required": false + } + ] +} diff --git a/src/preview/styles/_variables.scss b/src/preview/styles/_variables.scss new file mode 100644 index 00000000..fb6469ad --- /dev/null +++ b/src/preview/styles/_variables.scss @@ -0,0 +1,99 @@ +@import '@helsenorge/designsystem-react/scss/palette'; + +/* ------------------------------------------------------------------------ */ + +/* COLOR VARIABLES -------------------------------------------------------- */ + +/* ------------------------------------------------------------------------ */ + +// Primary colors +$color-primary-5: $blueberry700; +$color-primary-5-5: $blueberry900; +$color-primary-7: $blueberry100; +$color-primary-8: $blueberry200; +$color-primary-8-1: $blueberry50; + +// Base colours +$color-base-0: $white; +$color-base-1: $black; +$color-base-2: $neutral900; +$color-base-3: $neutral800; +$color-base-3-1: $neutral800; +$color-base-3-5: $neutral700; +$color-base-4: $neutral600; +$color-base-4-1: $neutral500; +$color-base-4-2: $neutral300; +$color-base-4-2-5: $neutral400; +$color-base-4-5: $neutral200; +$color-base-4-6: $neutral100; +$color-base-5: $neutral100; +$color-base-5-5: $neutral100; +$color-base-6: $neutral100; +$color-base-6-1: $neutral50; +$color-base-6-2: $neutral50; +$color-base-6-5: $white; +$color-base-7: $black; + +// Status colours +$color-functional-1: $kiwi900; +$color-functional-1-lighter: $kiwi700; +$color-functional-2: $banana400; +$color-functional-3: $cherry600; +$color-functional-3-lighter: $cherry500; + +// Helpsystem and presentation colours +$color-pres-1: $blueberry100; +$color-pres-2: $blueberry200; +$color-pres-3: $blueberry50; +$color-help-inverse: $blueberry600; +$color-highlight-text: $banana50; + +// Message Box Colors +$color-info-fill: $kiwi50; +$color-info-border: $kiwi100; +$color-alert-fill: $banana50; +$color-alert-border: $banana100; +$color-alert-background: $banana50; +$color-error-fill: $cherry100; +$color-error-border: $cherry200; + +// Gamle deprecated tjenesterfarge +$color-primary-1: #a61e7b; +$color-primary-2: #c52390; +$color-primary-3: #7c145c; +$color-primary-10: #fdebf7; +$color-help: #e38b21; +$color-help-transparency: rgb(227 139 33 / 70%); +$color-help-uu-to-white: #cd7b1c; + +/* ------------------------------------------------------------------------ */ + +/* HOVER/FOCUS VARIABLES -------------------------------------------------- */ + +/* ------------------------------------------------------------------------ */ + +// Outline for hover and focus +$outline-box-shadow-thin: 0 0 0 4px $neutral400; +$outline-box-shadow: 0 0 0 8px $neutral400; + +// Hover +$hover-box-shadow-underline: 0 4px 0 0 $neutral400; +$hover-box-shadow-inset: 0 0 0 4px $neutral400 inset; + +// Focus +$focus-background-color: $color-primary-8-1; //same as rgba($color-primary-5, 0.1) but makes sure that it also works when the background is not white +$focux-box-shadow-left: -4px 0 0 $neutral400; +$focux-box-shadow-right: 4px 0 0 $neutral400; +$focus-box-shadow-over: 0 -4px 0 $neutral400; +$focux-box-shadow-under: 0 4px 0 $neutral400; +$focus-box-shadow-over-and-under: 0 -4px 0 $neutral400, 0 4px 0 $neutral400; +$focux-box-shadow-over-and-left: 0 -4px 0 $neutral400, -4px -4px 0 $neutral400, -4px 0 0 0 $neutral400; +$focux-box-shadow-over-and-right: 0 -4px 0 $neutral400, 4px -4px 0 $neutral400, 4px 0 0 0 $neutral400; +$focux-box-shadow-under-and-left: 0 4px 0 $neutral400, -4px 4px 0 $neutral400, -4px 0 0 0 $neutral400; +$focux-box-shadow-under-and-right: 0 4px 0 $neutral400, 4px 4px 0 $neutral400, 4px 0 0 0 $neutral400; +$focux-box-shadow-left-and-right: -4px 4px 0 $neutral400, 4px 4px 0 $neutral400; +$focux-box-shadow-left-right-and-under: -4px 0 0 $neutral400, 4px 0 0 $neutral400, 0 4px 0 $neutral400, 4px 4px 0 $neutral400, + -4px 4px 0 $neutral400; +$focus-box-shadow-over-and-under: 0 -4px 0 $neutral400, 0 4px 0 $neutral400; +$focux-box-shadow-over-under-and-left: 0 -4px 0 $neutral400, -4px -4px 0 $neutral400, -4px 4px 0 $neutral400, 0 4px 0 $neutral400; +$focux-box-shadow-over-under-and-right: 0 -4px 0 $neutral400, 4px 4px 0 $neutral400, 0 4px 0 $neutral400, 4px -4px 0 $neutral400; diff --git a/src/preview/styles/fieldset.scss b/src/preview/styles/fieldset.scss new file mode 100644 index 00000000..c01f041f --- /dev/null +++ b/src/preview/styles/fieldset.scss @@ -0,0 +1,66 @@ +.page_refero__component legend { + font-weight: 500; + font-size: 18px; + line-height: 1.666666; + padding: 0.5rem 0; + + em { + font-weight: 500; + color: #333; + } +} + +.page_refero__component > fieldset { + border: 0; + margin: 0; + padding: 0; + position: relative; + min-width: inherit; + + legend, + .nested-fieldset { + @extend legend; + } +} + +//nested +.page_refero__component { + .nested-fieldset { + padding-left: 2.5rem; + position: relative; + overflow: inherit; + + &:before { + content: ''; + position: absolute; + top: 0; + left: 0.5rem; + bottom: 0; + border-left: 4px solid #333; + } + + // Dersom fieldset ikke har legend, la streken gå høyere opp. + label:first-of-type { + position: relative; + } + + label:first-of-type:before { + content: ''; + position: absolute; + top: 0.5rem; + left: -2rem; + height: 1.5rem; + border-left: 4px solid #333; + } + + //ikke mer padding på nøsting > 2 + fieldset, + .nested-fieldset { + padding-left: 0; + + &:before { + content: none; + } + } + } +} diff --git a/src/preview/styles/formFillerPreview.css b/src/preview/styles/formFillerPreview.css new file mode 100644 index 00000000..2587a8dc --- /dev/null +++ b/src/preview/styles/formFillerPreview.css @@ -0,0 +1,29 @@ +@import './formFillerSidebar.css'; + + +.preview-window { + font-family: Source Sans Pro, Arial, Verdana, sans-serif; + background-color: #f5f3f3; + position: fixed; + top: 20px; + left: 50%; + transform: translateX(-50%); + width: 90%; + overflow: hidden; +} + +.preview-window h2 { + color: black; + margin-top: 70px; + text-align: left; + font-size: 42px; + padding-left: 20px; + font-weight: 700; +} + +.referoContainer-div { + padding: 20px; + max-height: calc(100vh - 10rem); + overflow: scroll; + text-align: initial; +} diff --git a/src/preview/styles/formFillerSidebar.css b/src/preview/styles/formFillerSidebar.css new file mode 100644 index 00000000..3deccfd4 --- /dev/null +++ b/src/preview/styles/formFillerSidebar.css @@ -0,0 +1,16 @@ +.formFillerSidebar-button { + position: absolute; + top: 0; + left: -38px; + padding: 0 9px; + font-size: 32px; + background-color: #fff; + border: 2px #aaa solid; + border-right-width: 0; + cursor: pointer; +} + +.formFillerSidebar-content { + overflow: auto; + height: 100%; +} diff --git a/src/preview/styles/helpbutton.scss b/src/preview/styles/helpbutton.scss new file mode 100644 index 00000000..f9836cdc --- /dev/null +++ b/src/preview/styles/helpbutton.scss @@ -0,0 +1,57 @@ +$featureColor1: #5b22a6; + +.page_refero__helpComponent { + background-color: #efe4fd; + padding: 25px; + margin-bottom: 20px; + visibility: hidden; + + &--open { + visibility: visible; + } +} + +.page_refero__helpButton { + margin-left: 1rem; + + .atom_inline-functionbutton { + position: relative; + border: 0; + cursor: pointer; + font-size: 1rem; + font-weight: 400; + height: 34px; + width: 34px; + border-radius: 50%; + background-color: #bf98f3; + vertical-align: middle; + padding: 0; + + &[aria-expanded='true'] { + background-color: $featureColor1; + } + } + + .atom_inline-functionbutton:before { + content: '?'; + display: block; + line-height: 1.5rem; + background-color: $featureColor1; + color: white; + border-radius: 50%; + font-family: Arial; + font-size: 18px; + margin: 15%; + width: 70%; + height: 70%; + } + + .atom_inline-functionbutton:hover, + .atom_inline-functionbutton:focus { + box-shadow: 0 0 0 4px #adadad; + } + + .atom_inline-functionbutton:focus { + outline: none; + } +} diff --git a/src/preview/styles/navigator.scss b/src/preview/styles/navigator.scss new file mode 100644 index 00000000..3bd5acdb --- /dev/null +++ b/src/preview/styles/navigator.scss @@ -0,0 +1,65 @@ +@import '@helsenorge/designsystem-react/scss/_spacers.scss'; +@import '@helsenorge/designsystem-react/scss/_breakpoints.scss'; + +#navigator_blindzone { + height: 1px; +} + +.page_refero__navigator { + position: fixed; + top: -1px; + left: 0; + right: 0; + margin: 0 auto; + z-index: 100; + + .page_refero__navigatorheader { + background-color: #afdae3; + padding: 1rem 1.5rem; + display: flex; + width: 100%; + text-align: left; + border: none; + cursor: pointer; + + &:hover, + &:focus { + box-shadow: 0 0 0px 4px #aaa8a6 inset; + } + + &:focus { + text-decoration: underline; + outline: 0; + } + } + + .page_refero__navigatorheader-text { + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-weight: 600; + font-size: 1.5rem; + } + + .page_refero__navigatormenu { + background-color: #e4f7f9; + padding: 0.25rem 1.5rem 2em 1.5rem; + max-height: 16rem; + overflow: auto; + position: absolute; + right: 0; + left: 0; + margin: 0 0.75rem; + box-shadow: rgba(0, 0, 0, 0.16) 0px 0.3rem 0.6rem -0.1rem; + } + + .page_refero__navmenubutton { + min-height: auto; + text-align: left; + } +} + +.page_refero__navigator-scroll-offset { + scroll-padding-top: 62px; // navigator er 62px høy på desktop +} diff --git a/src/preview/styles/refero.scss b/src/preview/styles/refero.scss new file mode 100644 index 00000000..547a058f --- /dev/null +++ b/src/preview/styles/refero.scss @@ -0,0 +1,371 @@ +@import './_variables.scss'; +@import '@helsenorge/designsystem-react/scss/_spacers.scss'; +@import '@helsenorge/designsystem-react/scss/_breakpoints.scss'; +@import './fieldset'; +@import './helpbutton.scss'; +@import './navigator.scss'; +@import './formFillerPreview.css'; + +.page_refero__fixed-scroll-offset { + scroll-padding-bottom: 70px; +} + +.page_refero { + // Tilbakestill padding + label, + legend, + .nested-fieldset .atom_fieldset > legend { + padding-top: 0; + } + + legend > span:first-of-type { + font-weight: 600; + } + + p { + padding: 0; + } + form.mol_form { + margin-top: 1rem; + } + br + br { + display: none; + } + + div > label:first-child { + display: inline-block; + padding: 0.625rem 0 0.625rem 0; + } + + .page_refero__component_choice_autosuggest { + .page_refero__no-suggestions { + font-size: 1rem; + max-width: 22rem; + line-height: 1.25rem; + } + + .atom_spinner { + position: absolute; + } + + .page_refero__autosuggest div[role='combobox'] { + max-width: 36rem; + } + } + + .page_refero__component_readonlytext { + white-space: pre-line; + } + + .page_refero__heading { + display: inline-block; + } + + // Tilbakestill margin + .mol_validation { + margin-top: 0; + margin-bottom: 0; + } + + .nested-fieldset { + margin-top: 1rem; + + &:empty { + margin-top: 0; + } + } + + section section + .page_refero__component, + section section + section { + margin-top: 2rem; + } + + //EDGE fix + @supports (-ms-ime-align: auto) { + section section + section:last-of-type { + padding-bottom: 6rem; + } + } + + .page_refero__component:last-of-type { + margin-bottom: 0; + } + .page_refero__component:last-of-type + section { + margin-top: 1.5rem; + } + + .page_refero__markdown p { + padding: 0.5rem 0; + } + + // Heading spacing + .page_refero__content h2 { + margin-top: 1rem; + margin-bottom: 1.5rem; + } + + &.page_refero__markdown h2 { + margin-top: 1.5rem; + margin-bottom: 1rem; + } + + &.page_refero h3, + &.page_refero h4 { + margin-top: 0; + margin-bottom: 1rem; + } + + &.page_refero__markdown h3, + &.page_refero__markdown h4 { + margin-top: 0.8rem; + } + + &.page_refero section + section > h4, + &.page_refero .page_refero__repeatbutton + section > h4, + &.page_refero .page_refero__component + section > h4 { + margin-top: 2.5rem; + } + + // Disse kan dukke opp under label eller legend, derfor må de være mindre + .nested-fieldset h3, + .nested-fieldset h4 { + font-size: 1.125rem; + } + + .page_refero__repeatbutton { + margin: 1rem 1rem 1rem 0; + } + + .page_refero__deletebutton-wrapper + .page_refero__repeatbutton-wrapper { + margin-top: 2rem; + } + + .page_refero__deletebutton--margin-top { + margin-top: 1rem; + margin-right: 1rem; + } + + .page_refero__formtitlewrapper { + margin: 3rem 0 2rem; + padding-right: 3rem; + + .atom_helptrigger-button { + left: 0.5rem !important; + } + } + + h1.page_refero__formtitle { + display: inline; + } + + &__sublabel p { + margin: 0; + } + + &__component { + padding: 1rem; + background-color: $color-base-6-2; + border: 1px solid $color-base-5-5; + margin-bottom: 1rem; + + @media (min-width: map-get($grid-breakpoints, md)) { + padding: 1.75rem 2rem; + } + .page_refero__component { + background: 0; + border: 0; + padding: 0; + margin-bottom: 2rem; + } + } + + .char-counter { + background: 0; + margin-right: 0.5rem; + } + + .char-counter, + .atom_textarea { + max-width: 38rem; + } + + &__hidden_buttons &__saveblock { + display: none; + } + + .mol_validation-summary { + margin-bottom: 2rem; + margin-top: 2rem; + } + + .mol_validation__formerrortext { + display: none; + } + + .nested-fieldset .mol_validation { + &:before { + left: -2rem; + width: 2rem; + } + + &:after { + left: -2rem; + } + } + + &__spinnerspacing { + height: 12rem; + display: flex; + align-items: center; + justify-content: center; + + @media (min-width: map-get($grid-breakpoints, sm)) { + height: 20rem; + } + } + + .page_refero__component_quantity .page_refero__quantity { + display: inline-block; + } + + &__unit { + margin-left: 1rem; + vertical-align: bottom; + } + + .page_refero__buttonwrapper { + margin-top: 1rem; + + & .atom_displaybutton { + margin-right: 1rem; + margin-bottom: 0.5rem; + } + } + + .page_refero__buttonspacer { + margin-right: 24px; + } + + .page_refero__buttonspacer--left { + margin-left: 1.5rem; + } + + // Hide labels for first item in grid-cell (item and group) + .page_refero__grid--cell > div:first-child > div:first-child label, + .page_refero__grid--cell > section:first-child > .page_refero__heading { + display: none; + } + + // Remove padding for grid-cell components + .page_refero__grid--cell > .page_refero__component:first-child { + padding: 0; + } + + .page_refero__component_highlight { + background-color: #efe4fd; + padding: 1.75rem 2rem; + } +} + +.extra_savebutton_wrapper { + position: relative; + + @media (min-width: map-get($grid-breakpoints, sm)) { + display: none; + } + + .extra_savebutton { + position: absolute; + bottom: 0; + right: 0; + + &:not([disabled]) { + background-color: #f5f3f3; + } + + > svg { + margin: 0 -1rem 0 0.5rem; + min-width: 2rem; + max-width: 2rem; + } + } +} + +.page_refero__stickybar + .extra_savebutton_wrapper { + position: sticky; + bottom: 0.5rem; + z-index: 2; +} + +.page_refero__saveblock .atom_displaybutton:only-child { + width: auto; + padding: 0 2rem; +} + +.extra_savebutton_wrapper, +.page_refero__saveblock { + .atom_displaybutton { + padding: 0; + width: 33%; + margin: 0; + + @media (min-width: map-get($grid-breakpoints, sm)) { + padding: 0 2rem; + margin-right: 1rem; + width: auto; + } + } + + .page_refero__pausebutton { + display: none; + + @media (min-width: map-get($grid-breakpoints, sm)) { + display: inline-block; + } + } +} + +.page_refero__stickybar .page_refero__saveblock { + @media (min-width: map-get($grid-breakpoints, sm)) { + position: sticky; + bottom: 0; + background-color: #fff; + padding: 0.5rem 1rem; + z-index: 2; + box-shadow: 0px -1px 5px 0px rgba(0, 0, 0, 0.15); + } +} + +.page_refero__languge-selector { + margin-top: 1.5rem; + padding-bottom: 0; +} + +.page_refero__topmessage .atom_helptrigger-container { + display: inline-block; + width: 35px; + + .org_helptrigger { + top: -10px; + left: -8px; + } + .atom_helptrigger-button { + transform: scale(0.5); + } +} + +.page_refero .page_refero__receivercomponent { + h2 { + margin: 0; + } + + .page_refero__sublabel { + margin-bottom: 2rem; + } +} + +.page_refero__receiverselect .atom_select { + margin-bottom: 2rem; + max-width: 30rem; + width: 100%; +} diff --git a/src/preview/styles/sidebar.scss b/src/preview/styles/sidebar.scss new file mode 100644 index 00000000..fa201578 --- /dev/null +++ b/src/preview/styles/sidebar.scss @@ -0,0 +1,433 @@ +@import '@helsenorge/designsystem-react/scss/_spacers.scss'; +@import '@helsenorge/designsystem-react/scss/_breakpoints.scss'; +@import './_variables.scss'; + +$helpdrawer-font: 'Georgia, Source Sans Pro, _sans-serif'; + +.skjemasidebar { + z-index: 1100001; + width: 100%; + position: fixed; + top: 0; + right: 0; + transform: translateX(100%); + left: auto; + bottom: 0; + background: #6a2abf; + padding-left: 0.5rem; + transition: transform 0.5s ease; + + &.open { + transform: translateX(0); + .skjemasidebar__contents { + animation: none; + } + + .skjemasidebar__controlbutton { + &:hover, + &:focus { + svg:nth-child(2) { + transform: rotate(180deg); + } + } + } + } +} + +.skjemasidebar__control { + display: block; + padding: 0; + position: absolute; + top: 50vh; + left: -2.8rem; + + &::before, + &::after { + content: ' '; + position: absolute; + height: 100rem; + width: 1rem; + border-left: 1px solid $color-base-0; + bottom: 0; + right: -3.8rem; + } + + &::before { + box-shadow: rgba(0, 0, 0, 0.25) -1px -3px 8px 0px; + } + + &::after { + top: 1.55rem; + box-shadow: rgba(0, 0, 0, 0.25) -1px 3px 8px 0px; + } +} + +.skjemasidebar__controlbutton { + position: absolute; + left: 1.875rem; + top: -1.55rem; + height: 3.1rem; + width: 2.4rem; + cursor: pointer; + display: block; + padding: 0; + background: #6a2abf; + border: 1px; + border-style: solid; + border-color: $color-base-0; + border-radius: 1rem 0 0 1rem; + box-shadow: rgba(0, 0, 0, 0.05) -1px 0 0 1px, rgba(0, 0, 0, 0.05) -2px 1px 0 2px, rgba(0, 0, 0, 0.05) -3px -1px 0 2px, + rgba(0, 0, 0, 0.05) -3px -2px 0 3px, rgba(0, 0, 0, 0.05) -3px 2px 0 3px; + + &:before { + position: absolute; + content: ''; + top: 0; + right: 0; + left: -0.625rem; + bottom: 0; + } + + .svgicon { + display: none; + } + + &:hover, + &:focus { + box-shadow: -4px -4px 0 4px #9153e2, -4px 4px 0 4px #9153e2; + } + + &:focus { + outline: none; + } +} + +.skjemasidebar__contents { + animation: hide-contents 0.4s; + animation-fill-mode: forwards; + display: block; + background: $color-base-0; + height: 100%; + position: absolute; + overflow-y: auto; + top: 0; + left: 0.5rem; + right: 0; +} + +.skjemasidebar__drawerheader { + display: flex; + vertical-align: middle; + justify-content: space-between; + background: #6a2abf; + + .skjemasidebar__title-wrap { + display: flex; + align-items: center; + } + + .skjemasidebar__title-wrap:focus { + outline: none; + } + + .skjemasidebar__title-wrap > svg { + display: inline-flex; + margin: 0 0.75rem; + vertical-align: middle; + } + + .skjemasidebar__title { + display: inline-flex; + position: relative; + padding: 0.5rem 0; + margin: 0; + font-family: $helpdrawer-font; + font-size: 1.25rem; + font-weight: 400; + color: $color-base-0; + vertical-align: middle; + } + + .atom_functionbutton.atom_functionbutton--close { + display: block; + position: absolute; + top: 0.4rem; + right: 0.4rem; + + svg { + color: $color-base-0; + border-color: transparent; + } + + &:hover, + &:focus { + svg { + border-color: $color-base-0; + } + } + } +} + +.skjemasidebar__draweraccordion { + padding: 0.5rem; +} + +.skjemasidebar__draweraccordionstepheader { + display: block; + position: relative; + + h2 { + display: inline-flex; + margin: 0; + padding: 0.5rem 1.5rem 0.5rem 1rem; + font-family: $helpdrawer-font; + font-weight: 500; + font-size: 1.375rem; + line-height: 2.5rem; + color: $color-help-inverse; + } +} + +.skjemasidebar__draweraccordionsteptitle { + display: flex; + padding: 0 2.5rem 0 0.5rem; + text-align: left; + width: 100%; + border: none; + border-bottom: 1px solid $color-base-4-1; + min-height: 3rem; + background-color: transparent; + cursor: pointer; + + .svgicon { + display: inline-flex; + border-radius: 1.5rem; + padding: 0.25rem; + margin: 1rem 0.5rem 0.7rem 0.5rem; + vertical-align: middle; + pointer-events: none; + } + + &:hover, + &:focus { + svg { + box-shadow: $outline-box-shadow-thin; + } + } + + &:focus { + background-color: $focus-background-color; + outline: none; + } +} + +.skjemasidebar__draweraccordiondeletestep { + position: absolute; + cursor: pointer; + top: -0.275rem; + right: 0.4rem; +} + +.skjemasidebar__draweraccordionstepcontents { + display: block; + padding: 0.6rem 0.5rem 0.6rem 2rem; + font-family: $helpdrawer-font; + font-size: 1.125rem; + font-weight: 500; + line-height: 1.4rem; + + p { + font-family: $helpdrawer-font; + font-size: 1.125rem; + font-weight: 500; + line-height: 1.75rem; + -webkit-font-smoothing: antialiased; + margin: 0; + white-space: pre-line; + } + + a { + font-size: 1.125rem; + } + + h1, + h2, + h3, + h4, + h5 { + font-family: $helpdrawer-font; + font-weight: 600; + font-size: 18px; + line-height: 1.333333; + margin-bottom: 0.55rem; + margin-top: 2.2rem; + color: $color-base-7; + } + + h4, + h5 { + font-size: 1.125rem; + } + + ul { + padding-left: 1rem; + } + + ul li { + font-family: $helpdrawer-font; + margin-bottom: 0.5rem; + font-weight: 400; + font-size: 1.125rem; + line-height: 1.4; + color: $color-base-7; + list-style: disc; + list-style-position: outside; + padding-left: 0.4rem; + text-indent: 0; + } + + dl { + margin: 1rem 0; + border-top: 1px solid $color-base-4-5; + border-bottom: 1px solid $color-base-4-5; + padding-top: 1rem; + padding-bottom: 0.5rem; + + dt { + font-size: 1.25rem; + font-weight: 600; + margin-bottom: 0.25rem; + font-variant: small-caps; + text-transform: lowercase; + } + + dd { + margin-bottom: 1rem; + } + } +} + +/* for fixed sections (no expand/collapse) .steptitle is placed directly on h2 instead of button */ +h2.skjemasidebar__draweraccordionsteptitle { + background: none; + &:hover { + box-shadow: none; + cursor: inherit; + } + padding: 0.5rem 2rem; +} + +.skjemasidebar__draweraccordion .step { + padding: 0; + margin: 0; + + .hlpctr-container { + overflow: hidden; + transition: height 0.5s ease; + } +} + +/* ---------------------------------------------------------------------------------------------------------- */ + +@media (min-width: map-get($grid-breakpoints, sm)) { + .skjemasidebar { + width: 27.5rem; + left: auto; + } + + .skjemasidebar__drawerheader .skjemasidebar__title { + font-size: 1.5rem; + } + + .skjemasidebar__draweraccordion { + padding: 0.5rem; + + .step { + padding: 0; + margin: 0; + } + } + + .skjemasidebar__draweraccordionstepheader { + display: block; + position: relative; + } + + .skjemasidebar__draweraccordionsteptitle { + min-height: 3rem; + } + + h2.skjemasidebar__draweraccordionsteptitle { + padding: 0.5rem 2.5rem 0.5rem 0.5rem; + } + + .skjemasidebar__draweraccordionstepcontents { + padding: 1.6rem 0.5rem 0.6rem 4rem; + font-size: 1.125rem; + line-height: 1.5rem; + + ul li { + line-height: 1.5rem; + padding-left: 0.6rem; + } + } +} + +/* ---------------------------------------------------------------------------------------------------------- */ + +@media (min-width: map-get($grid-breakpoints, md)) { + .skjemasidebar__control { + top: 9rem; + + &::before { + bottom: 0; + } + + &::after { + top: 6rem; + } + } + + .skjemasidebar__controlbutton { + left: 0; + top: 0; + height: 6rem; + width: 2.8rem; + border: 1px; + border-style: solid; + border-color: $color-base-0; + border-right: none; + border-radius: 1rem 0 0 1rem; + + .svgicon { + display: inline-block; + margin-top: 0.25rem; + pointer-events: none; + &:first-child { + width: 2rem; + height: 2rem; + } + &:focus { + outline: none; + } + } + + &:hover, + &:focus { + outline: none; + box-shadow: -4px -4px 0 4px #9153e2, -4px 4px 0 4px #9153e2; + } + } +} + +@keyframes hide-contents { + 100% { + visibility: hidden; + } +} + +@media print { + .skjemasidebar { + display: none; + } +} diff --git a/src/preview/styles/skjemautfyller.scss b/src/preview/styles/skjemautfyller.scss new file mode 100644 index 00000000..ac2369fd --- /dev/null +++ b/src/preview/styles/skjemautfyller.scss @@ -0,0 +1,378 @@ +@import './_variables.scss'; +@import '@helsenorge/designsystem-react/scss/_spacers.scss'; +@import '@helsenorge/designsystem-react/scss/_breakpoints.scss'; +@import './sidebar'; +@import './fieldset'; +@import './helpbutton.scss'; +@import './navigator.scss'; + +.page_refero__fixed-scroll-offset { + scroll-padding-bottom: 70px; +} + +.page_refero { + // Tilbakestill padding + label, + legend, + .nested-fieldset .atom_fieldset > legend { + padding-top: 0; + } + + legend > span:first-of-type { + font-weight: 600; + } + + p { + padding: 0; + } + form.mol_form { + margin-top: 1rem; + } + br + br { + display: none; + } + + div > label:first-child { + display: inline-block; + padding: 0.625rem 0 0.625rem 0; + } + + .page_refero__component_choice_autosuggest { + .page_refero__no-suggestions { + font-size: 1rem; + max-width: 22rem; + line-height: 1.25rem; + } + + .atom_spinner { + position: absolute; + } + + .page_refero__autosuggest div[role='combobox'] { + max-width: 36rem; + } + } + + .page_refero__component_readonlytext { + white-space: pre-line; + overflow-wrap: break-word; + } + + .page_refero__heading { + display: inline-block; + } + + // Tilbakestill margin + .mol_validation { + margin-top: 0; + margin-bottom: 0; + } + + .nested-fieldset { + margin-top: 1rem; + + &:empty { + margin-top: 0; + } + } + + section section + .page_refero__component, + section section + section { + margin-top: 2rem; + } + + //EDGE fix + @supports (-ms-ime-align: auto) { + section section + section:last-of-type { + padding-bottom: 6rem; + } + } + + .page_refero__component:last-of-type + section { + margin-top: 1.5rem; + } + + .page_refero__markdown p { + padding: 0.5rem 0; + } + + // Heading spacing + .page_refero__content h2 { + margin-top: 1rem; + margin-bottom: 1.5rem; + } + + &.page_refero__markdown h2 { + margin-top: 1.5rem; + margin-bottom: 1rem; + } + + &.page_refero h3, + &.page_refero h4 { + margin-top: 0; + margin-bottom: 1rem; + } + + &.page_refero__markdown h3, + &.page_refero__markdown h4 { + margin-top: 0.8rem; + } + + &.page_refero section + section > h4, + &.page_refero .page_refero__repeatbutton + section > h4, + &.page_refero .page_refero__component + section > h4 { + margin-top: 2.5rem; + } + + // Disse kan dukke opp under label eller legend, derfor må de være mindre + .nested-fieldset h3, + .nested-fieldset h4 { + font-size: 1.125rem; + } + + .page_refero__repeatbutton { + margin: 1rem 1rem 1rem 0; + } + + .page_refero__deletebutton-wrapper + .page_refero__repeatbutton-wrapper { + margin-top: 2rem; + } + + .page_refero__deletebutton--margin-top { + margin-top: 1rem; + margin-right: 1rem; + } + + .page_refero__formtitlewrapper { + margin: 3rem 0 2rem; + padding-right: 3rem; + + .atom_helptrigger-button { + left: 0.5rem !important; + } + } + + h1.page_refero__formtitle { + display: inline; + } + + &__sublabel p { + margin: 0; + } + + &__component { + padding: 1rem; + background-color: $color-base-6-2; + border: 1px solid $color-base-5-5; + margin-bottom: 1rem; + + @media (min-width: map-get($grid-breakpoints, md)) { + padding: 1.75rem 2rem; + } + .page_refero__component { + background: 0; + border: 0; + padding: 0; + margin-bottom: 2rem; + } + } + + .char-counter { + background: 0; + margin-right: 0.5rem; + } + + .char-counter, + .atom_textarea { + max-width: 38rem; + } + + &__hidden_buttons &__saveblock { + display: none; + } + + .mol_validation-summary { + margin-bottom: 2rem; + margin-top: 2rem; + } + + .mol_validation__formerrortext { + display: none; + } + + .nested-fieldset .mol_validation { + &:before { + left: -2rem; + width: 2rem; + } + + &:after { + left: -2rem; + } + } + + &__spinnerspacing { + height: 12rem; + display: flex; + align-items: center; + justify-content: center; + + @media (min-width: map-get($grid-breakpoints, sm)) { + height: 20rem; + } + } + + .page_refero__component_quantity .page_refero__quantity { + display: inline-block; + } + + &__unit { + margin-left: 1rem; + vertical-align: bottom; + } + + .page_refero__buttonwrapper { + margin-top: 1rem; + + & .atom_displaybutton { + margin-right: 1rem; + margin-bottom: 0.5rem; + } + } + + .page_refero__buttonspacer { + margin-right: 24px; + } + + .page_refero__buttonspacer--left { + margin-left: 1.5rem; + } + + // Hide labels for first item in grid-cell (item and group) + .page_refero__grid--cell > div:first-child > div:first-child label, + .page_refero__grid--cell > section:first-child > .page_refero__heading { + display: none; + } + + // Remove padding for grid-cell components + .page_refero__grid--cell > .page_refero__component:first-child { + padding: 0; + } + + .page_refero__component_highlight { + background-color: #efe4fd; + padding: 1.75rem 2rem; + } +} + +.extra_savebutton_wrapper { + position: relative; + + @media (min-width: map-get($grid-breakpoints, sm)) { + display: none; + } + + .extra_savebutton { + position: absolute; + bottom: 8px; + right: 0; + padding: 0; + + &:not([disabled]) { + background-color: #f5f3f3; + } + + > svg { + margin: 0 -1rem 0 0.5rem; + min-width: 2rem; + max-width: 2rem; + } + } +} + +.page_refero__stickybar + .extra_savebutton_wrapper { + position: sticky; + bottom: 0.5rem; + z-index: 2; +} + +.page_refero__saveblock .atom_displaybutton:only-child { + width: auto; + padding: 0 2rem; +} + +.extra_savebutton_wrapper, +.page_refero__saveblock { + .atom_displaybutton { + padding: 0; + width: 33%; + margin: 0; + + @media (min-width: map-get($grid-breakpoints, sm)) { + padding: 0 2rem; + margin-right: 1rem; + width: auto; + } + } + + .page_refero__pausebutton { + display: none; + + @media (min-width: map-get($grid-breakpoints, sm)) { + display: inline-block; + } + } + + .page_refero__pausebutton_stepView { + display: flex; + + @media (min-width: map-get($grid-breakpoints, sm)) { + display: inline-block; + } + } +} + +.page_refero__stickybar .page_refero__saveblock { + @media (min-width: map-get($grid-breakpoints, sm)) { + position: sticky; + bottom: 0; + background-color: #fff; + padding: 0.5rem 1rem; + z-index: 2; + box-shadow: 0px -1px 5px 0px rgba(0, 0, 0, 0.15); + } +} + +.page_refero__languge-selector { + margin-top: 1.5rem; + padding-bottom: 0; +} + +.page_refero__topmessage .atom_helptrigger-container { + display: inline-block; + width: 35px; + + .org_helptrigger { + top: -10px; + left: -8px; + } + .atom_helptrigger-button { + transform: scale(0.5); + } +} + +.page_refero .page_refero__receivercomponent { + h2 { + margin: 0; + } + + .page_refero__sublabel { + margin-bottom: 2rem; + } +} + +.page_refero__receiverselect .atom_select { + margin-bottom: 2rem; + max-width: 30rem; + width: 100%; +} diff --git a/src/preview/vite-env.d.ts b/src/preview/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/src/preview/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/tsconfig.vite.json b/tsconfig.vite.json new file mode 100644 index 00000000..92ced121 --- /dev/null +++ b/tsconfig.vite.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ESNext", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "allowJs": true, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "ESNext", + "moduleResolution": "Node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx" + }, + "include": ["src"] +} diff --git a/tsconfig.vite.node.json b/tsconfig.vite.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/tsconfig.vite.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 00000000..e09517cb --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,41 @@ +import path from 'path'; + +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; +import vitePluginRequire from 'vite-plugin-require'; +import tsconfigPaths from 'vite-tsconfig-paths'; + +// https://vitejs.dev/config/ +export default defineConfig({ + root: path.join(__dirname, 'src/preview'), + css: { + preprocessorOptions: { + scss: { + includePaths: ['node_modules'], + }, + }, + }, + resolve: { + alias: [ + { + // this is required for the SCSS modules + find: /^~(.*)$/, + replacement: '$1', + }, + ], + }, + build: { + outDir: 'dist', + manifest: true, + commonjsOptions: { + transformMixedEsModules: true, + }, + }, + plugins: [ + tsconfigPaths({ + projects: [path.resolve(__dirname, 'tsconfig.vite.json')], + }), + react(), + vitePluginRequire({ fileRegex: /(.jsx?|.tsx?|.ts)$/ }), + ], +}); From 1f3ef626150b4853056d89d264e2379e3377848c Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:08:40 +0100 Subject: [PATCH 02/83] changelog --- CHANGES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index b169ed41..84d45e7b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.2-beta01 + +--- + +- Added a preview for refero using vite. + ## 13.2.2 --- From 42312d482f929d980db50d12d71875d8eccff99e Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:55:55 +0100 Subject: [PATCH 03/83] table-hn2 --- package-lock.json | 40 +- src/components/formcomponents/date/date.tsx | 16 +- src/components/formcomponents/date/time.tsx | 2 +- src/components/formcomponents/group/AsPdf.tsx | 11 + src/components/formcomponents/group/group.tsx | 151 +- .../formcomponents/group/helpers.ts | 66 + src/components/formcomponents/table/Table.tsx | 135 ++ .../formcomponents/table/tables/TableHn1.tsx | 52 + .../formcomponents/table/tables/TableHn2.tsx | 69 + .../formcomponents/table/tables/helpers.ts | 87 ++ src/components/index.tsx | 29 +- src/components/renderForm.tsx | 7 +- src/components/with-common-functions.tsx | 16 +- src/constants/codingsystems.ts | 12 +- src/constants/tableTypes.ts | 3 + src/preview/skjema/kun_qest.json | 1281 ++++++++++++----- src/util/extension.ts | 23 + src/util/fhirpathHelper.ts | 27 +- src/util/index.ts | 44 +- src/util/map-props.ts | 34 +- src/util/refero-core.ts | 14 +- src/util/scoringCalculator.ts | 7 +- 22 files changed, 1556 insertions(+), 570 deletions(-) create mode 100644 src/components/formcomponents/group/AsPdf.tsx create mode 100644 src/components/formcomponents/group/helpers.ts create mode 100644 src/components/formcomponents/table/Table.tsx create mode 100644 src/components/formcomponents/table/tables/TableHn1.tsx create mode 100644 src/components/formcomponents/table/tables/TableHn2.tsx create mode 100644 src/components/formcomponents/table/tables/helpers.ts create mode 100644 src/constants/tableTypes.ts diff --git a/package-lock.json b/package-lock.json index d50e5196..549e0129 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@helsenorge/refero", - "version": "13.2.2", + "version": "13.2.2-beta01", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@helsenorge/refero", - "version": "13.2.2", + "version": "13.2.2-beta01", "license": "MIT", "dependencies": { "@types/react-collapse": "^5.0.1", @@ -3915,9 +3915,9 @@ } }, "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", - "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", + "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", "dev": true, "dependencies": { "@types/react": "*", @@ -12719,9 +12719,9 @@ } }, "node_modules/react-redux": { - "version": "7.2.8", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.8.tgz", - "integrity": "sha512-6+uDjhs3PSIclqoCk0kd6iX74gzrGc3W5zcAjbrFgEdIjRSQObdIwfx80unTkVUYvbQ95Y8Av3OvFHq1w5EOUw==", + "version": "7.2.9", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz", + "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.15.4", @@ -12744,9 +12744,9 @@ } }, "node_modules/react-redux/node_modules/@types/react-redux": { - "version": "7.1.24", - "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.24.tgz", - "integrity": "sha512-7FkurKcS1k0FHZEtdbbgN8Oc6b+stGSfZYjQGicofJ0j4U0qIn/jaSvnP2pLwZKiai3/17xqqxkkrxTgN8UNbQ==", + "version": "7.1.33", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.33.tgz", + "integrity": "sha512-NF8m5AjWCkert+fosDsN3hAlHzpjSiXlVy9EgQEmLoBhaNXbmyeGs/aj5dQzKuF+/q+S7JQagorGDW8pJ28Hmg==", "dev": true, "dependencies": { "@types/hoist-non-react-statics": "^3.3.0", @@ -17659,9 +17659,9 @@ } }, "@types/hoist-non-react-statics": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", - "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", + "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", "dev": true, "requires": { "@types/react": "*", @@ -24297,9 +24297,9 @@ } }, "react-redux": { - "version": "7.2.8", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.8.tgz", - "integrity": "sha512-6+uDjhs3PSIclqoCk0kd6iX74gzrGc3W5zcAjbrFgEdIjRSQObdIwfx80unTkVUYvbQ95Y8Av3OvFHq1w5EOUw==", + "version": "7.2.9", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz", + "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", "dev": true, "requires": { "@babel/runtime": "^7.15.4", @@ -24311,9 +24311,9 @@ }, "dependencies": { "@types/react-redux": { - "version": "7.1.24", - "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.24.tgz", - "integrity": "sha512-7FkurKcS1k0FHZEtdbbgN8Oc6b+stGSfZYjQGicofJ0j4U0qIn/jaSvnP2pLwZKiai3/17xqqxkkrxTgN8UNbQ==", + "version": "7.1.33", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.33.tgz", + "integrity": "sha512-NF8m5AjWCkert+fosDsN3hAlHzpjSiXlVy9EgQEmLoBhaNXbmyeGs/aj5dQzKuF+/q+S7JQagorGDW8pJ28Hmg==", "dev": true, "requires": { "@types/hoist-non-react-statics": "^3.3.0", diff --git a/src/components/formcomponents/date/date.tsx b/src/components/formcomponents/date/date.tsx index 65a11493..51b25b1c 100644 --- a/src/components/formcomponents/date/date.tsx +++ b/src/components/formcomponents/date/date.tsx @@ -1,12 +1,19 @@ import * as React from 'react'; + import moment, { Moment } from 'moment'; import { connect } from 'react-redux'; import { ThunkDispatch } from 'redux-thunk'; + import { QuestionnaireItem, QuestionnaireResponseItemAnswer, QuestionnaireResponseItem, Questionnaire } from '../../../types/fhir'; + import { LanguageLocales } from '@helsenorge/core-utils/constants/languages'; import { DateRangePicker } from '@helsenorge/date-time/components/date-range-picker'; import { parseDate } from '@helsenorge/date-time/components/time-input/date-core'; import { ValidationProps } from '@helsenorge/form/components/form/validation'; + +import { DateDayInput } from './date-day-input'; +import { DateYearMonthInput } from './date-month-input'; +import { DateYearInput } from './date-year-input'; import { NewValueAction, newDateValueAsync } from '../../../actions/newValue'; import ExtensionConstants from '../../../constants/extensions'; import itemControlConstants from '../../../constants/itemcontrol'; @@ -15,14 +22,11 @@ import { getExtension, getItemControlExtensionValue } from '../../../util/extens import { evaluateFhirpathExpressionToGetDate } from '../../../util/fhirpathHelper'; import { getSublabelText } from '../../../util/index'; import { mapStateToProps, mergeProps, mapDispatchToProps } from '../../../util/map-props'; -import { Resources } from '../../../util/resources'; import { Path } from '../../../util/refero-core'; +import { Resources } from '../../../util/resources'; import withCommonFunctions from '../../with-common-functions'; import Label from '../label'; import SubLabel from '../sublabel'; -import { DateDayInput } from './date-day-input'; -import { DateYearMonthInput } from './date-month-input'; -import { DateYearInput } from './date-year-input'; export interface Props { item: QuestionnaireItem; @@ -133,7 +137,7 @@ class DateComponent extends React.Component { return responseItemHasChanged || helpItemHasChanged || resourcesHasChanged || repeats || answerHasChanged; } - render(): JSX.Element | null { + render(): JSX.Element | null { const subLabelText = getSublabelText(this.props.item, this.props.onRenderMarkdown, this.props.questionnaire, this.props.resources); const itemControls = getItemControlExtensionValue(this.props.item); @@ -172,7 +176,7 @@ class DateComponent extends React.Component { helpElement={this.props.renderHelpElement()} onDateValueChange={this.onDateValueChange} maxDate={this.getMaxDate()} - minDate={this.getMinDate()} + minDate={this.getMinDate()} {...this.props} /> ); diff --git a/src/components/formcomponents/date/time.tsx b/src/components/formcomponents/date/time.tsx index 0c505c87..48b2c4fb 100644 --- a/src/components/formcomponents/date/time.tsx +++ b/src/components/formcomponents/date/time.tsx @@ -18,8 +18,8 @@ import { GlobalState } from '../../../reducers'; import { getExtension, getValidationTextExtension } from '../../../util/extension'; import { isReadOnly, isRequired, getId, getSublabelText } from '../../../util/index'; import { mapStateToProps, mergeProps, mapDispatchToProps } from '../../../util/map-props'; -import { Resources } from '../../../util/resources'; import { Path } from '../../../util/refero-core'; +import { Resources } from '../../../util/resources'; import withCommonFunctions from '../../with-common-functions'; import Label from '../label'; import SubLabel from '../sublabel'; diff --git a/src/components/formcomponents/group/AsPdf.tsx b/src/components/formcomponents/group/AsPdf.tsx new file mode 100644 index 00000000..b17b2cb5 --- /dev/null +++ b/src/components/formcomponents/group/AsPdf.tsx @@ -0,0 +1,11 @@ +import React, { ReactNode } from 'react'; + +type Props = { + pdf: boolean; + children: ReactNode; +}; + +const AsPdf = ({ pdf, children }: Props): JSX.Element => { + return <>{pdf ?
{children}
: children}; +}; +export default AsPdf; diff --git a/src/components/formcomponents/group/group.tsx b/src/components/formcomponents/group/group.tsx index 3e25f96c..275ff784 100644 --- a/src/components/formcomponents/group/group.tsx +++ b/src/components/formcomponents/group/group.tsx @@ -8,15 +8,16 @@ import { QuestionnaireItem, QuestionnaireResponseItemAnswer, QuestionnaireRespon import AnchorLink from '@helsenorge/designsystem-react/components/AnchorLink'; +import AsPdf from './AsPdf'; +import { getClassNames, getColumns, getHeaderText, getLocalRenderContextType, isDirectChildOfRenderContextOwner } from './helpers'; import { NewValueAction } from '../../../actions/newValue'; import { RenderContextType } from '../../../constants/renderContextType'; import { GlobalState } from '../../../reducers'; -import { getGroupItemControl } from '../../../util/group-item-control'; -import { renderPrefix, getText, getId } from '../../../util/index'; +import { getText, getId } from '../../../util/index'; import { mapStateToProps, mergeProps, mapDispatchToProps } from '../../../util/map-props'; +import { Path } from '../../../util/refero-core'; import { RenderContext } from '../../../util/renderContext'; import { Resources } from '../../../util/resources'; -import { Path } from '../../../util/refero-core'; import withCommonFunctions from '../../with-common-functions'; export interface Props { @@ -49,7 +50,6 @@ export class Group extends React.Component { constructor(props: Props) { super(props); } - shouldComponentUpdate(nextProps: Props): boolean { const responseItemHasChanged = this.props.responseItem !== nextProps.responseItem; const helpItemHasChanged = this.props.isHelpOpen !== nextProps.isHelpOpen; @@ -58,7 +58,6 @@ export class Group extends React.Component { const resourcesHasChanged = JSON.stringify(this.props.resources) !== JSON.stringify(nextProps.resources); const repeats = this.props.item.repeats ?? false; - return ( responseItemHasChanged || helpItemHasChanged || @@ -69,9 +68,9 @@ export class Group extends React.Component { ); } - renderAllItems = (): JSX.Element => { - const { renderContext } = this.props; - const localRenderContextType = this.getLocalRenderContextType(); + renderAllItems = (item: QuestionnaireItem): JSX.Element => { + const { path, renderContext } = this.props; + const localRenderContextType = getLocalRenderContextType(item); if (localRenderContextType) { switch (localRenderContextType) { @@ -82,24 +81,12 @@ export class Group extends React.Component { switch (renderContext.RenderContextType) { case RenderContextType.Grid: - return this.isDirectChildOfRenderContextOwner() ? this.renderContextTypeGridRow() : this.renderGroup(); + return isDirectChildOfRenderContextOwner(path, item, renderContext) ? this.renderContextTypeGridRow() : this.renderGroup(); default: return this.renderGroup(); } }; - isDirectChildOfRenderContextOwner = (): boolean => { - const { path, item, renderContext } = this.props; - - const myIndex = path.findIndex(p => p.linkId === item.linkId); - if (myIndex > 0) { - const directParentLinkId = path[myIndex - 1].linkId; - return directParentLinkId === renderContext.Owner; - } - - return false; - }; - renderContextTypeGridRow = (): JSX.Element => { const { renderContext, item } = this.props; @@ -137,125 +124,81 @@ export class Group extends React.Component { }; renderContextTypeGrid = (): JSX.Element => { - const { item } = this.props; + const { item, renderChildrenItems, repeatButton, renderDeleteButton, id } = this.props; - const columns = this.getColumns(); + const columns = getColumns(item); const headers = columns.map(c => {c}); headers.unshift({item.text ? item.text : ''}); const newRenderContext = new RenderContext(RenderContextType.Grid, item.linkId, columns); return ( - - + <> +
{headers} - {this.props.renderChildrenItems(newRenderContext)} + {renderChildrenItems(newRenderContext)}
- {this.props.renderDeleteButton('page_refero__deletebutton--margin-top')} - {this.props.repeatButton} -
+ {renderDeleteButton('page_refero__deletebutton--margin-top')} + {repeatButton} + ); }; renderGroup = (): JSX.Element => { + const { + repeatButton, + id, + includeSkipLink, + path, + renderDeleteButton, + item, + questionnaire, + onRenderMarkdown, + resources, + renderHelpElement, + renderChildrenItems, + } = this.props; return ( -
+
{this.renderGroupHeader()} - {this.props.renderHelpElement()} -
- {this.props.renderChildrenItems(new RenderContext())} + {renderHelpElement()} +
+ {renderChildrenItems(new RenderContext())}
- {this.props.includeSkipLink && this.props.path.length === 1 && ( + {includeSkipLink && path.length === 1 && ( - {this.props.resources?.skipLinkText} + {resources?.skipLinkText} )} - {this.props.renderDeleteButton('page_refero__deletebutton--margin-top')} - {this.props.repeatButton} + {renderDeleteButton('page_refero__deletebutton--margin-top')} + {repeatButton}
); }; - getColumns = (): Array => { - const item = this.props.item; - const seenColumns = {}; - const columns: Array = []; - if (!item.item || item.item.length === 0) return columns; - for (const group of item.item) { - if (group.item && group.item.length > 0) { - for (const cell of group.item) { - const key = cell.text || ''; - if (key in seenColumns) continue; - - columns.push(key); - seenColumns[key] = 1; - } - } - } - - return columns; - }; - - getLocalRenderContextType = (): RenderContextType => { - const coding = getGroupItemControl(this.props.item); - if (coding.length > 0) { - switch (coding[0].code) { - case 'grid': - return RenderContextType.Grid; - } - } - return RenderContextType.None; - }; - - getClassNames = (): string => { - const classNames = ['page_refero__component', 'page_refero__component_group']; - const coding = getGroupItemControl(this.props.item); - if (coding.length > 0) { - classNames.push('page_refero__itemControl_' + coding[0].code); - } - - return classNames.join(' '); - }; - - getComponentToValidate = (): undefined => { - return undefined; - }; - - getHeaderText = (): string => { - return ( - renderPrefix(this.props.item) + - ' ' + - getText(this.props.item, this.props.onRenderMarkdown, this.props.questionnaire, this.props.resources) - ); - }; - renderGroupHeader = (): JSX.Element | null => { - if (!getText(this.props.item, this.props.onRenderMarkdown)) { + const { item, questionnaire, onRenderMarkdown, resources, headerTag, renderHelpButton } = this.props; + + if (!getText(item, onRenderMarkdown)) { return null; } - const HeaderTag = `h${this.props.headerTag}` as 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; - const headerText = DOMPurify.sanitize(this.getHeaderText(), { + const HeaderTag = `h${headerTag}` as 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; + const headerText = DOMPurify.sanitize(getHeaderText(item, questionnaire, resources, onRenderMarkdown), { RETURN_TRUSTED_TYPE: true, ADD_ATTR: ['target'], }) as unknown as string; return ( - + <> - {this.props.renderHelpButton()} - + {renderHelpButton()} + ); }; - render(): JSX.Element | null { - const { pdf } = this.props; - - if (pdf) { - return
{this.renderAllItems()}
; - } - - return this.renderAllItems(); + const { pdf, item } = this.props; + return {this.renderAllItems(item)}; } } const withCommonFunctionsComponent = withCommonFunctions(Group); diff --git a/src/components/formcomponents/group/helpers.ts b/src/components/formcomponents/group/helpers.ts new file mode 100644 index 00000000..602cd1f5 --- /dev/null +++ b/src/components/formcomponents/group/helpers.ts @@ -0,0 +1,66 @@ +import { RenderContextType } from '../../../constants/renderContextType'; +import { Questionnaire, QuestionnaireItem } from '../../../types/fhir'; +import { getText, renderPrefix } from '../../../util'; +import { getGroupItemControl } from '../../../util/group-item-control'; +import { Path } from '../../../util/refero-core'; +import { RenderContext } from '../../../util/renderContext'; +import { Resources } from '../../../util/resources'; + +export const getColumns = (item: QuestionnaireItem): Array => { + const seenColumns = {}; + const columns: Array = []; + if (!item.item || item.item.length === 0) return columns; + for (const group of item.item) { + if (group.item && group.item.length > 0) { + for (const cell of group.item) { + const key = cell.text || ''; + if (key in seenColumns) continue; + + columns.push(key); + seenColumns[key] = 1; + } + } + } + + return columns; +}; + +export const getLocalRenderContextType = (item: QuestionnaireItem): RenderContextType => { + const coding = getGroupItemControl(item); + if (coding.length > 0) { + switch (coding[0].code) { + case 'grid': + return RenderContextType.Grid; + } + } + return RenderContextType.None; +}; + +export const isDirectChildOfRenderContextOwner = (path: Path[], item: QuestionnaireItem, renderContext: RenderContext): boolean => { + const myIndex = path.findIndex(p => p.linkId === item.linkId); + if (myIndex > 0) { + const directParentLinkId = path[myIndex - 1].linkId; + return directParentLinkId === renderContext.Owner; + } + + return false; +}; + +export const getClassNames = (item: QuestionnaireItem): string => { + const classNames = ['page_refero__component', 'page_refero__component_group']; + const coding = getGroupItemControl(item); + if (coding.length > 0) { + classNames.push('page_refero__itemControl_' + coding[0].code); + } + + return classNames.join(' '); +}; + +export const getHeaderText = ( + item: QuestionnaireItem, + questionnaire?: Questionnaire, + resources?: Resources, + onRenderMarkdown?: ((item: QuestionnaireItem, markdown: string) => string) | undefined +): string => { + return renderPrefix(item) + ' ' + getText(item, onRenderMarkdown, questionnaire, resources); +}; diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx new file mode 100644 index 00000000..106edbc8 --- /dev/null +++ b/src/components/formcomponents/table/Table.tsx @@ -0,0 +1,135 @@ +import React from 'react'; + +import { connect } from 'react-redux'; +import { ThunkDispatch } from 'redux-thunk'; + +import { + Coding, + Questionnaire, + QuestionnaireItem, + QuestionnaireResponse, + QuestionnaireResponseItem, + QuestionnaireResponseItemAnswer, +} from '../../../types/fhir'; + +import TableHn1 from './tables/TableHn1'; +import { NewValueAction } from '../../../actions/newValue'; +import { TableCodes } from '../../../constants/tableTypes'; +import { GlobalState } from '../../../reducers'; +import { getFormData } from '../../../reducers/form'; +import { getCodingTextTableValues } from '../../../util/extension'; +import { mapStateToProps as mstp } from '../../../util/map-props'; +import { Path } from '../../../util/refero-core'; +import { RenderContext } from '../../../util/renderContext'; +import { Resources } from '../../../util/resources'; +import { Props as MstpProps } from '../../with-common-functions'; +import TableHn2 from './tables/TableHn2'; + +export interface Props { + item: QuestionnaireItem; + questionnaire?: Questionnaire; + answer: QuestionnaireResponseItemAnswer; + responseItem: QuestionnaireResponseItem; + dispatch?: ThunkDispatch; + path: Array; + pdf?: boolean; + includeSkipLink?: boolean; + className?: string; + resources?: Resources; + headerTag?: number; + attachmentErrorMessage?: string; + repeatButton: JSX.Element; + id?: string; + renderContext: RenderContext; + renderHelpButton: () => JSX.Element; + renderHelpElement: () => JSX.Element; + isHelpOpen?: boolean; + onRenderMarkdown?: (item: QuestionnaireItem, markdown: string) => string; +} + +interface EnhancedProps { + headline: string; + tableCodes: Coding[]; + items: QuestionnaireItem[]; + tableType: TableCodes; + questionnaireResponse?: QuestionnaireResponse | null; +} + +const Table = ({ tableCodes, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { + { + switch (tableType) { + case 'table-hn1': + return ( + <> +

{headline}

+ + + ); + case 'table-HN2': + return ( + <> +

{headline}

+ + + ); + default: + return <>{'Nothing found'}; + } + } +}; + +const mapStateToProps = (state: GlobalState, props: Props): MstpProps & EnhancedProps => { + const group = props.item; + //TODO: Fix undefine and null checks + const tableType = getCodingTextTableValues(group)[0]; + + console.log('group', group); + const groupChildren = group.item; + console.log('groupChildren', groupChildren); + + const mappedProps = mstp(state, props); + return { + ...mappedProps, + headline: group.text ?? '', + tableCodes: group.code ?? [], + items: group.item ?? [], + tableType, + questionnaireResponse: getFormData(state)?.Content, + }; +}; +export default connect(mapStateToProps)(Table); +// const renderItem = (item: QuestionnaireItem, tableCodes: Coding[], headline: string): Array => { +// if (isHelpItem(item)) return []; +// if (isHiddenItem(item)) return []; + +// const Comp = getComponentForItem(item.type, getCodingTextTableValues(item)); + +// if (!Comp) { +// return []; +// } + +// let response: Array | undefined; + +// if (responseItem) { +// const childItem = responseItem.item; +// const childAnswer = responseItem.answer; +// const linkId = item.linkId; +// // console.log('childItem', childItem); + +// if (childItem) { +// response = getItemWithIdFromResponseItemArray(linkId, childItem); +// // console.log('response', response); +// } else if (childAnswer) { +// // console.log('childAnswer', childAnswer); + +// response = getItemWithIdFromResponseItemArray(linkId, childAnswer[0].item); +// } +// } +// const renderedItems: Array = []; +// if (response && response.length > 0) { +// response.forEach((responseItem, index) => { +// console.log(responseItem); +// }); +// } +// return renderedItems; +// }; diff --git a/src/components/formcomponents/table/tables/TableHn1.tsx b/src/components/formcomponents/table/tables/TableHn1.tsx new file mode 100644 index 00000000..6f716395 --- /dev/null +++ b/src/components/formcomponents/table/tables/TableHn1.tsx @@ -0,0 +1,52 @@ +import React from 'react'; + +import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; + +import { + HeaderCategory, + Table as HnTable, + SortDirection, + TableBody, + TableCell, + TableHead, + TableHeadCell, + TableRow, +} from '@helsenorge/designsystem-react/components/Table'; + +import { findCodeForColumnToSortBy, getColumnNames, getValueIfDataReceiver } from './helpers'; + +interface Props { + tableCodes: Coding[]; + items: QuestionnaireItem[]; + questionnaireResponse?: QuestionnaireResponse | null; +} +const TableHn1 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { + const res = getValueIfDataReceiver(items[2], questionnaireResponse); + const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); + console.log('questionnaireResponse', questionnaireResponse); + console.log('tableCodes', tableCodes); + console.log('getValueIfDataReceiver', res); + console.log('item', items[2]); + return ( + + + + {getColumnNames(tableCodes).map(column => ( + + {`here ${column}`} + + ))} + + + + {items.map(item => ( + + {item.linkId} + + ))} + + + ); +}; + +export default TableHn1; diff --git a/src/components/formcomponents/table/tables/TableHn2.tsx b/src/components/formcomponents/table/tables/TableHn2.tsx new file mode 100644 index 00000000..34625795 --- /dev/null +++ b/src/components/formcomponents/table/tables/TableHn2.tsx @@ -0,0 +1,69 @@ +import React, { useState } from 'react'; +import ItemType from '../../../../constants/itemType'; +import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; + +import { + HeaderCategory, + Table as HnTable, + SortDirection, + TableBody, + TableCell, + TableHead, + TableHeadCell, + TableRow, +} from '@helsenorge/designsystem-react/components/Table'; + +import { findCodeForColumnToSortBy, getColumnNames, getValueIfDataReceiver } from './helpers'; + +interface Props { + tableCodes: Coding[]; + items: QuestionnaireItem[]; + questionnaireResponse?: QuestionnaireResponse | null; +} +const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { + const [sortDir, setSortDir] = useState(SortDirection.asc); + const res = getValueIfDataReceiver(items[2], questionnaireResponse); + const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); + console.log('questionnaireResponse', questionnaireResponse); + console.log('tableCodes', tableCodes); + console.log('getValueIfDataReceiver', res); + console.log('item', items[2]); + console.log('items', items); + + const handleSort = (): void => { + setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); + }; + return ( + + + + {getColumnNames(tableCodes).map(column => ( + + {column} + + ))} + + + + {items.map(item => { + return item.type === ItemType.DISPLAY ? ( + + {item.text} + + ) : ( + + {item.text} + + ); + })} + + + ); +}; + +export default TableHn2; diff --git a/src/components/formcomponents/table/tables/helpers.ts b/src/components/formcomponents/table/tables/helpers.ts new file mode 100644 index 00000000..710859d9 --- /dev/null +++ b/src/components/formcomponents/table/tables/helpers.ts @@ -0,0 +1,87 @@ +import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItemAnswer } from '../../../../types/fhir'; + +import ItemType from '../../../../constants/itemType'; +import { FormData } from '../../../../reducers/form'; +import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; +import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; +import CodingSystems, { CodeSystemValues, CodeSystems, TableColumnName, TableOrderingColum } from '../../../../constants/codingsystems'; + +export function getQuestionnaireResponseItemAnswer( + type: string, + result: any +): QuestionnaireResponseItemAnswer | Array { + const answerArray: Array = []; + if (type === ItemType.BOOLEAN) { + return { valueBoolean: result[0] }; + } + + result.forEach((answer: any) => { + switch (String(type)) { + case ItemType.TEXT: + case ItemType.STRING: + answerArray.push({ valueString: answer }); + break; + case ItemType.INTEGER: + answerArray.push({ valueInteger: answer }); + break; + case ItemType.DECIMAL: + answerArray.push({ valueDecimal: answer }); + break; + case ItemType.QUANTITY: + answerArray.push({ valueQuantity: answer }); + break; + case ItemType.DATETIME: + answerArray.push({ valueDateTime: answer }); + break; + case ItemType.DATE: + answerArray.push({ valueDate: answer }); + break; + case ItemType.TIME: + answerArray.push({ valueTime: answer }); + break; + default: { + if (typeof answer === 'string') { + answerArray.push({ valueString: answer }); + } else { + answerArray.push({ valueCoding: answer }); + } + } + } + }); + return answerArray; +} +export const getValueIfDataReceiver = ( + item: QuestionnaireItem, + questionnaireResponse?: QuestionnaireResponse | null +): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined => { + const extension = getCopyExtension(item); + if (extension) { + let result = evaluateFhirpathExpressionToGetString(extension, questionnaireResponse); + + if (!!getCalculatedExpressionExtension(item)) { + result = result.map((m: any) => m.value as number); + } + 3; + + return getQuestionnaireResponseItemAnswer(item.type, result); + } + return undefined; +}; + +export const findCodeBySystem = (coding: Coding[], system?: CodeSystemValues): Coding[] => { + return coding?.filter(code => code?.system === system) ?? []; +}; + +export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined => { + const code = findCodeBySystem(coding, TableOrderingColum); + const columnsToDisplay = coding?.filter(codeElement => codeElement.system === CodingSystems.TableColumnName); + const codeForSortedColumn = code[0]?.code; + const columnToSortBy = columnsToDisplay?.find(coding => coding?.code === codeForSortedColumn); + return columnToSortBy; +}; + +export const getColumnNames = (coding: Coding[]): string[] => { + return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); +}; + +export const getTableHN1bodyObject = (items: QuestionnaireItem[]) => {}; diff --git a/src/components/index.tsx b/src/components/index.tsx index 14c83b48..82803138 100644 --- a/src/components/index.tsx +++ b/src/components/index.tsx @@ -3,6 +3,7 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { ThunkDispatch } from 'redux-thunk'; +import { DispatchProps } from '../types/dispatchProps'; import { QuestionnaireResponseItem, Questionnaire, @@ -13,13 +14,12 @@ import { } from '../types/fhir'; import { ReferoProps } from '../types/referoProps'; import { State } from '../types/state'; -import { DispatchProps } from '../types/dispatchProps'; +import RenderForm from './renderForm'; +import StepView from './stepView'; import { setSkjemaDefinition } from '../actions/form'; import { NewValueAction, newQuantityValue, newDecimalValue, newIntegerValue } from '../actions/newValue'; import RepeatButton from '../components/formcomponents/repeat/repeat-button'; -import RenderForm from './renderForm'; -import StepView from './stepView'; import Constants, { NAVIGATOR_BLINDZONE_ID } from '../constants/index'; import ItemType from '../constants/itemType'; import { PresentationButtonsType } from '../constants/presentationButtonsType'; @@ -27,12 +27,16 @@ import { GlobalState } from '../reducers'; import { getFormDefinition, getFormData } from '../reducers/form'; import { FormDefinition, FormData } from '../reducers/form'; import { ActionRequester } from '../util/actionRequester'; -import { getQuestionnaireUnitExtensionValue, getPresentationButtonsExtension, getNavigatorExtension } from '../util/extension'; -import { getComponentForItem, shouldRenderRepeatButton, isHiddenItem, getDecimalValue } from '../util/index'; +import { + getQuestionnaireUnitExtensionValue, + getPresentationButtonsExtension, + getNavigatorExtension, + getCodingTextTableValues, +} from '../util/extension'; +import { getTopLevelElements } from '../util/getTopLevelElements'; import { IE11HackToWorkAroundBug187484 } from '../util/hacks'; +import { getComponentForItem, shouldRenderRepeatButton, isHiddenItem, getDecimalValue } from '../util/index'; import { QuestionniareInspector } from '../util/questionnaireInspector'; -import { RenderContext } from '../util/renderContext'; -import { ScoringCalculator } from '../util/scoringCalculator'; import { getRootQuestionnaireResponseItemFromData, Path, @@ -43,8 +47,9 @@ import { getQuestionnaireDefinitionItem, getResponseItemAndPathWithLinkId, } from '../util/refero-core'; +import { RenderContext } from '../util/renderContext'; +import { ScoringCalculator } from '../util/scoringCalculator'; import { shouldFormBeDisplayedAsStepView } from '../util/shouldFormBeDisplayedAsStepView'; -import { getTopLevelElements } from '../util/getTopLevelElements'; interface StateProps { formDefinition?: FormDefinition | null; @@ -96,7 +101,6 @@ class Refero extends React.Component, item: QuestionnaireItem, answer: QuestionnaireResponseItemAnswer): void => { if (this.props.onChange && newState.refero.form.FormDefinition.Content && newState.refero.form.FormData.Content) { const actionRequester = new ActionRequester(newState.refero.form.FormDefinition.Content, newState.refero.form.FormData.Content); @@ -200,8 +204,7 @@ class Refero extends React.Component { if (isHiddenItem(item)) return []; - - const Comp = getComponentForItem(item.type); + const Comp = getComponentForItem(item.type, getCodingTextTableValues(item)); if (!Comp) { return undefined; } @@ -232,7 +235,9 @@ class Refero extends React.Component
); } - + // console.log('responseItem - index', item); + // if (ItemType.GROUP === item.type && getCodingTextTableValues(item) && isTableCode(getCodingTextTableValues(item))) { + // } renderedItems.push( { +}: RenderFormProps): JSX.Element => { const displayPauseButtonInNormalView = referoProps.onSave ? onSave : undefined; const displayPauseButtonInStepView = displayPreviousButton ? previousStep : undefined; diff --git a/src/components/with-common-functions.tsx b/src/components/with-common-functions.tsx index 3bed535e..2a267d18 100644 --- a/src/components/with-common-functions.tsx +++ b/src/components/with-common-functions.tsx @@ -1,8 +1,7 @@ import * as React from 'react'; -import DOMPurify from 'dompurify'; - import classNames from 'classnames'; +import DOMPurify from 'dompurify'; import { Collapse } from 'react-collapse'; import { ThunkDispatch } from 'redux-thunk'; @@ -26,10 +25,14 @@ import { UploadedFile } from '@helsenorge/file-upload/components/dropzone'; import { FormChild } from '@helsenorge/form/components/form'; import { ValidationProps } from '@helsenorge/form/components/form/validation'; +import DeleteButton from './formcomponents/repeat/delete-button'; +import RepeatButton from './formcomponents/repeat/repeat-button'; +import HelpButton from './help-button/help-button'; import { NewValueAction } from '../actions/newValue'; import itemControlConstants from '../constants/itemcontrol'; import itemType from '../constants/itemType'; import { GlobalState } from '../reducers'; +import { getCodingTextTableValues } from '../util/extension'; import { findHelpItem, isHelpItem, getHelpItemType } from '../util/help'; import { getComponentForItem, getChildHeaderTag, shouldRenderRepeatButton, getText, isHiddenItem } from '../util/index'; import { @@ -42,9 +45,6 @@ import { } from '../util/refero-core'; import { RenderContext } from '../util/renderContext'; import { Resources } from '../util/resources'; -import DeleteButton from './formcomponents/repeat/delete-button'; -import RepeatButton from './formcomponents/repeat/repeat-button'; -import HelpButton from './help-button/help-button'; export interface Props { resources?: Resources; @@ -244,7 +244,7 @@ export default function withCommonFunctions(WrappedComponent: React.Component
@@ -256,7 +256,8 @@ export default function withCommonFunctions(WrappedComponent: React.Component if (isHelpItem(item)) return []; if (isHiddenItem(item)) return []; - const Comp = getComponentForItem(item.type); + const Comp = getComponentForItem(item.type, getCodingTextTableValues(item)); + if (!Comp) { return []; } @@ -267,6 +268,7 @@ export default function withCommonFunctions(WrappedComponent: React.Component const childItem = responseItem.item; const childAnswer = responseItem.answer; const linkId = item.linkId; + // console.log(childAnswer); if (childItem) { response = getItemWithIdFromResponseItemArray(linkId, childItem); diff --git a/src/constants/codingsystems.ts b/src/constants/codingsystems.ts index b6c8eef4..996af202 100644 --- a/src/constants/codingsystems.ts +++ b/src/constants/codingsystems.ts @@ -1,3 +1,13 @@ -export default { +export const TableColumnName = 'http://helsenorge.no/fhir/CodeSystem/TableColumnName'; +export const TableOrderingColum = 'http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn'; +export const TableOrderingFunctions = 'http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions'; + +const codeSystems = { RenderingOptions: 'http://helsenorge.no/fhir/CodeSystem/RenderOptions', + TableColumnName: 'http://helsenorge.no/fhir/CodeSystem/TableColumnName', + TableOrderingColum: 'http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn', + TableOrderingFunctions: 'http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions', }; +export type CodeSystems = keyof typeof codeSystems; +export type CodeSystemValues = typeof codeSystems[keyof typeof codeSystems]; +export default codeSystems; diff --git a/src/constants/tableTypes.ts b/src/constants/tableTypes.ts new file mode 100644 index 00000000..09e5a29b --- /dev/null +++ b/src/constants/tableTypes.ts @@ -0,0 +1,3 @@ +export type TableCodes = 'table-hn' | 'gtable' | 'table' | 'table-hn1' | 'table-HN2'; + +export const TABLE_CODES_VALUES: TableCodes[] = ['table-hn', 'gtable', 'table', 'table-hn1', 'table-HN2']; diff --git a/src/preview/skjema/kun_qest.json b/src/preview/skjema/kun_qest.json index 008a67bd..85b59321 100644 --- a/src/preview/skjema/kun_qest.json +++ b/src/preview/skjema/kun_qest.json @@ -1,617 +1,1154 @@ { "resourceType": "Questionnaire", "language": "nb-NO", - "id": "1000", - "name": "NHN_Skaring", - "title": "Test skåring og utregning gammel og ny", + "id": "1c90d68d-78d8-4c7b-b5fb-44c165babbcc", + "name": "NHN_Test_tableHN2", + "title": "tableHN2", + "description": "Skjema før time for nyrepasient", "version": "0.1", "status": "draft", "publisher": "NHN", "meta": { "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Norsk bokmål" }], - "security": [{ "code": "3", "display": "Helsehjelp", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }] + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + }, + { + "code": "1", + "display": "Kun innbygger selv", + "system": "http://helsenorge.no/fhir/KanUtforesAv" + } + ] }, "useContext": [ { - "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "code": { + "system": "http://hl7.org/fhir/ValueSet/usage-context-type", + "code": "focus", + "display": "Clinical Focus" + }, "valueCodeableConcept": { - "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "code": "P", "display": "Test skåring og utregning gammel og ny" }] + "coding": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1.8655", + "display": "tableHN2" + } + ] } } ], - "contact": [{ "name": "Kontakt Kim ved spørsmål " }], - "subjectType": ["Person"], + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], "extension": [ - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1000" } }, { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-authenticationrequirement", - "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/AuthenticationRequirement", "code": "2" } + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } }, { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-accessibilitytoresponse", - "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/AccessibilityToResponse", "code": "1" } + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } }, { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-canbeperformedby", - "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/CanBePerformedBy", "code": "2" } + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", + "valueReference": { + "reference": "Endpoint/1" + } }, { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-discretion", - "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/Discretion", "code": "2" } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatenarrative", "valueBoolean": true }, + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-presentationbuttons", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/presentationbuttons", "code": "sticky" } + "resourceType": "ValueSet", + "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", + "version": "1.0", + "name": "Viktighet", + "title": "Viktighet", + "date": "2023-03-29T13:43:26.881Z", + "status": "draft", + "publisher": "Viktighet", + "compose": { + "include": [ + { + "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", + "concept": [ + { + "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", + "code": "0", + "display": "0" + }, + { + "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", + "code": "1", + "display": "1" + }, + { + "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", + "code": "2", + "display": "2" + }, + { + "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", + "code": "3", + "display": "3" + }, + { + "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", + "code": "4", + "display": "4" + }, + { + "id": "50e5f8f0-db46-45f9-8fda-67039933756e", + "code": "5", + "display": "5" + }, + { + "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", + "code": "6", + "display": "6" + }, + { + "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", + "code": "7", + "display": "7" + }, + { + "id": "dc888467-ab8b-4412-82ca-0312edcc0695", + "code": "8", + "display": "8" + }, + { + "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", + "code": "9", + "display": "9" + }, + { + "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", + "code": "10", + "display": "10" + } + ] + } + ] + } } ], - "copyright": "Kim Hoel Halvorsen RN MI", - "date": "2023-06-09T00:00:00+02:00", "item": [ - { "linkId": "1", "text": "Testskjema for kalkulering med seksjonsum, totalsum og eksplisitt angitt sum", "type": "display" }, { - "linkId": "92971daa-c72b-49a3-82f5-3f5c6c696c31", + "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", "type": "group", - "text": "Dagens løsnings som fortsatt skal virke med rar quantity", + "text": "Data inn", + "required": false, "item": [ { - "linkId": "2", - "text": "Symptomer", - "type": "group", - "repeats": false, + "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", + "type": "boolean", + "text": "Hoven i beina", + "required": false, "item": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } - } - ], - "linkId": "2.2", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], - "text": "Kryss av om noen av disse tilstandene gjelder deg", + "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", "type": "choice", - "required": false, - "repeats": false, - "readOnly": false, + "text": "Hvor alvorlig er det?", + "required": true, "answerOption": [ { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", "code": "1", - "display": "Svært medtatt, vansker med å ta til deg væske eller næring" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], - "code": "50", - "display": "Alvorlige pustevansker" + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", "code": "3", - "display": "Brått fall i allmenntilstand" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", "code": "4", - "display": "Petekkier (utslett som ikke lar seg avbleke)" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", "code": "5", - "display": "Nyoppståtte brystsmerter" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" } } + ], + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } ] }, { + "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "type": "choice", + "text": "Viktighet Hoven i beina", "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" } ], - "linkId": "2.3", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], - "text": "Har du noen av følgende sykdommer?", + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] + } + ] + }, + { + "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "type": "boolean", + "text": "Kløe i huden", + "required": false, + "item": [ + { + "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", "type": "choice", - "required": false, - "repeats": false, - "readOnly": false, + "text": "Hvor alvorlig er det?", + "required": true, "answerOption": [ { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", "code": "1", - "display": "Astma" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", "code": "2", - "display": "Kols" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", "code": "3", - "display": "Annen lungesykdom" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } - } - ], - "linkId": "2.4", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], - "text": "Har du noen av disse plagene?", - "type": "choice", - "required": false, - "repeats": false, - "readOnly": false, - "answerOption": [ - { - "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 10 }], - "code": "1", - "display": "Feber" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 10 }], - "code": "2", - "display": "Tørrhoste" + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 10 }], - "code": "3", - "display": "Tungpust" + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" } } + ], + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } ] }, { - "linkId": "2.5", - "text": "Beskriv eventuelle andre luftveisplager du har", - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { + "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "type": "choice", + "text": "Viktighet kløe i huden", "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "system": "http://ehelse.no/Score", "code": "score", "display": "score" } + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" } ], - "linkId": "2.99", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "SS", "display": "Section score" }], - "text": "Seksjonssum gruppe 1", - "type": "quantity", - "required": false, - "repeats": false, - "readOnly": true - } - ] - }, - { - "linkId": "4", - "text": "Resultat", - "type": "group", - "repeats": false, - "item": [ - { - "extension": [ + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "system": "http://ehelse.no/Score", "code": "score", "display": "score" } + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true } - ], - "linkId": "4.1", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "TS", "display": "Totalscore" }], - "text": "Totalsum fra alle grupper, om det er seksjonsnummer som skal legges sammen", - "type": "quantity", - "required": false, - "repeats": false, - "readOnly": true + ] } ] - }, + } + ] + }, + { + "linkId": "85bcab33-b84b-4f9f-cd98-6bfa6dedc8c7", + "type": "group", + "text": "Oppsummering med grupper. Innrykk trenger en ikke ta hensyn til, da data blir presentert i tabell. Gruppe benyttes kun til å få inn en verdi i kolonne 1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } + ] + } + } + ], + "required": false, + "code": [ { - "linkId": "359430f4-66a4-4545-862a-74c5b38344bc", + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "c87dc79b-afd8-4ef5-8ebf-1b9d3a6a4d9f" + } + ], + "item": [ + { + "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", "type": "group", - "text": "Utregninger", + "text": "Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn2" + } + ] + } + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" + }, + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" + }, + { + "code": "DESC", + "display": "Descending", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" + } + ], "item": [ { - "linkId": "Value1", - "type": "quantity", - "text": "Verdi 1", - "required": false, - "extension": [ + "linkId": "268a7080-0067-4cbb-8a4d-8bea26b46296", + "type": "display", + "text": "Hoven i beina", + "code": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "tallverdi", "display": "Verdi", "system": "urn:uuid:ddc33019-a2f2-41e4-df8f-203f9d221e9c" } + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403", + "code": "1" } - ] - }, - { - "linkId": "Value2", - "type": "quantity", - "text": "Verdi 2", + ], "required": false, - "extension": [ + "enableWhen": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "Tallverdi", "display": " Verdi", "system": "urn:uuid:8bac9130-217f-4080-8357-5c67cec2f3af" } + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true } ] }, { - "linkId": "2ed78bbb-cdae-4c9c-9b41-573e0d42cc16", - "type": "quantity", - "text": "Sum", + "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", + "type": "choice", "extension": [ { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='Value1').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value2').answer.value.value)" + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "Score", "display": "Sum", "system": "http://ehelse.no/Score" } - } - ], - "required": false, - "readOnly": true - } - ] - } - ], - "required": false - }, - { - "linkId": "c9f0d5c2-1aed-42c2-9ace-66a6603d6cdc", - "type": "group", - "text": "Ny løsning uten rar quantity", - "item": [ - { - "linkId": "b357cc7d-b5df-4709-81a9-026fff6780b7", - "type": "group", - "text": "Skåring gruppe 1 ny versjon uten rar quantity", - "item": [ - { - "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "operator": "exists" } ], - "linkId": "efcdeceb-61dc-40b0-8c49-15aaf061e867", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], - "text": "Kryss av om noen av disse tilstandene gjelder deg", + "text": "Viktighet", + "code": [ + { + "code": "2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "941622c1-0a8d-487d-8214-b7cf9cba6210" + } + ] + }, + { + "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", "type": "choice", "required": false, - "repeats": false, - "readOnly": false, "answerOption": [ { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", "code": "1", - "display": "Svært medtatt, vansker med å ta til deg væske eller næring" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], - "code": "50", - "display": "Alvorlige pustevansker" + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", "code": "3", - "display": "Brått fall i allmenntilstand" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", "code": "4", - "display": "Petekkier (utslett som ikke lar seg avbleke)" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", "code": "5", - "display": "Nyoppståtte brystsmerter" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "answerBoolean": true, + "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "operator": "exists" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "code": [ + { + "code": "3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "4a7d5ffd-54ed-433e-8d40-0173a9dbbfbc" } ] }, { - "linkId": "7ffa61e2-5d00-4a30-dc3e-99432c31402a", - "type": "integer", - "text": "Seksjonssum integer", - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "402c75be-0e28-49ba-fbbe-ba7cd9d02945" }, + "linkId": "cc502a45-030f-4729-8ac8-3c982a43e379", + "type": "display", + "text": "Kløe i huden", + "required": false, + "enableWhen": [ { - "code": "SS", - "display": "Section score", - "system": "http://ehelse.no/scoringFormulas", - "id": "b2987e06-e1d0-450d-f251-ce792f9f6248" + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true } ], - "required": false - }, - { - "linkId": "2e609204-273e-41ed-c636-6f77412b530d", - "type": "decimal", "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "440289ab-ea48-4e49-8f48-7677131575a3" }, { - "code": "SS", - "display": "Section Score", - "system": "http://ehelse.no/scoringFormulas", - "id": "c0c2385d-4f9e-4790-88b0-dfeb6d4e2885" + "code": "1", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "7c01e07f-58d2-43b0-8c87-0ddf595d49e9" } - ], - "required": false, - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], - "text": "Sectionscore Decimal" - } - ], - "required": false - }, - { - "linkId": "f662ec21-e972-45d4-9ef3-38bd146a6bd3", - "type": "group", - "text": "Skåring gruppe 2 uten rar quantity", - "item": [ + ] + }, { + "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", + "type": "choice", "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "operator": "exists" } ], - "linkId": "4ef04b21-372a-4c9f-8a1d-c68228fc2be3", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], - "text": "Har du noen av følgende sykdommer?", + "text": "Viktiget", + "code": [ + { + "code": "2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "9bd380fc-8ca3-4fba-8a32-8d44f62a5645" + } + ] + }, + { + "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", "type": "choice", "required": false, - "repeats": false, - "readOnly": false, "answerOption": [ { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", "code": "1", - "display": "Astma" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", "code": "2", - "display": "Kols" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", "code": "3", - "display": "Annen lungesykdom" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" } - } - ] - }, - { - "linkId": "617bce03-06ae-48d5-876b-47633d982a88", - "type": "integer", - "text": "Seksjonssum integer", - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "402c75be-0e28-49ba-fbbe-ba7cd9d02945" }, + }, { - "code": "SS", - "display": "Section score", - "system": "http://ehelse.no/scoringFormulas", - "id": "a4cf45d0-3909-479d-cf48-43c7fc57068e" + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } } ], - "required": false - }, - { - "linkId": "ff07eed8-064a-47eb-8fbe-10fb91e56124", - "type": "decimal", - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "440289ab-ea48-4e49-8f48-7677131575a3" }, + "enableWhen": [ { - "code": "SS", - "display": "Section Score", - "system": "http://ehelse.no/scoringFormulas", - "id": "c0c2385d-4f9e-4790-88b0-dfeb6d4e2885" + "answerBoolean": true, + "question": "926cc2a7-1853-46e6-8e98-cb3405730292", + "operator": "exists" } ], - "required": false, - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], - "text": "Sectionscore Decimal" - } - ], - "required": false - }, - { - "linkId": "05ade39f-ddf5-452f-835a-064a9d2c6007", - "text": "Totalsum uten rar quantity", - "type": "group", - "repeats": false, - "item": [ - { - "linkId": "521d336d-528a-4fea-97cb-a0ff8ad99313", - "type": "integer", - "text": "Totalsum integer", - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "402c75be-0e28-49ba-fbbe-ba7cd9d02945" }, + "extension": [ { - "code": "TS", - "display": "Total score", - "system": "http://ehelse.no/scoringFormulas", - "id": "a4cf45d0-3909-479d-cf48-43c7fc57068e" + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" } ], - "required": false - }, - { - "linkId": "a9e6cd53-9598-4f1c-c233-5a71eb4593ac", - "type": "decimal", + "readOnly": true, + "text": "Alvorlighet", "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "440289ab-ea48-4e49-8f48-7677131575a3" }, { - "code": "TS", - "display": "Total Score", - "system": "http://ehelse.no/scoringFormulas", - "id": "c0c2385d-4f9e-4790-88b0-dfeb6d4e2885" + "code": "3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "6344dcf1-ff0b-4dd0-8f07-3b9c54172155" } - ], - "required": false, - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], - "text": "Totalscore Decimal" + ] } ] - }, + } + ] + }, + { + "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", + "type": "group", + "text": "Oppsummering med uten grupper, men display?", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } + ] + } + } + ], + "required": false, + "code": [ { - "linkId": "ce8a5997-a926-4f72-cc7f-e1ca8c589852", + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", "type": "group", - "text": "Utregninger", + "text": "Oppsummering Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-HN2" + } + ] + } + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" + }, + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" + }, + { + "code": "ND", + "display": "NumericDescending", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" + }, + { + "code": "2", + "display": "Column 2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "id": "02f9fe7f-515f-4b0a-c7c3-e4a1b1bf0231" + } + ], "item": [ - { "linkId": "Value3", "type": "integer", "text": "Verdi 3 Integer", "required": false }, - { "linkId": "Value4", "type": "integer", "text": "Verdi 4 Integer", "required": false }, { - "linkId": "545e17e5-0719-42e8-892c-0da3a8af6ac6", - "type": "integer", - "text": "Summeringsfelt Integer", + "linkId": "d2efd364-d243-4967-d4cb-b1e9d1c280d7", + "type": "display", + "text": "Hoven i beina", "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "3555cebe-8e65-4e4a-8047-40edff07fdf5" } + { + "system": "urn:uuid:8c5cd387-b773-4c60-8f2b-cd9d343cc4f9", + "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403" + } ], "required": false, - "extension": [ + "enableWhen": [ { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='Value3').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value4').answer.value.value)" + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true } ] }, { - "linkId": "Value5", - "type": "decimal", - "text": "Verdi 5 Decimal", - "required": false, - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }] + "linkId": "de7218bb-b70c-421c-c582-529c4d4acecb", + "type": "choice", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "operator": "exists" + }, + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ], + "text": "Viktighet", + "enableBehavior": "all" }, { - "linkId": "Value6", - "type": "decimal", - "text": "Verdi 6 Decimal", + "linkId": "d5425b30-bb33-43f3-8431-4470500b924d", + "type": "choice", "required": false, - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }] + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "answerBoolean": true, + "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "operator": "exists" + }, + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "enableBehavior": "all" }, { - "linkId": "4308af3f-3cdb-422f-d719-7543def7a64f", - "type": "decimal", + "linkId": "8fa24260-704e-466a-820e-ef9e413eec0f", + "type": "display", + "text": "Kløe i huden", "required": false, - "extension": [ - { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, + "enableWhen": [ { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='Value5').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value6').answer.value.value)" + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true } - ], - "text": "Decimal summeringsfelt", - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "2a37bfbd-f334-4227-8f07-76424668a854" } ] }, { - "linkId": "Value7", - "type": "quantity", - "text": "Verdi 7 Quantity ", + "linkId": "f6ca7b70-9e2d-4268-85e4-6e4808df3363", + "type": "choice", "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" } ], - "required": false - }, - { - "linkId": "Value8", - "type": "quantity", - "text": "Verdi 8 Quantity ", - "extension": [ + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "operator": "exists" + }, { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true } ], - "required": false + "text": "Viktiget" }, { - "linkId": "a655638d-ebc5-416e-88fe-22a8e3657c62", - "type": "quantity", - "text": "Nytt quantityfelt med en egen enhet der man feks skal regne sammen to cm felt", - "extension": [ + "linkId": "2869b482-0477-4004-f13c-f17f0ec6e5b2", + "type": "choice", + "required": false, + "answerOption": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } }, { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='Value7').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value8').answer.value.value)" + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } } ], - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "8282dc31-ee08-4741-b86e-0ec90b9fead8" } + "enableWhen": [ + { + "answerBoolean": true, + "question": "926cc2a7-1853-46e6-8e98-cb3405730292", + "operator": "exists" + }, + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } ], - "required": false + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "enableBehavior": "all" } ] } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-2", + "display": "SOT-2" + } + ], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-3", + "display": "SOT-3" + } ], - "required": false + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false } ] } diff --git a/src/util/extension.ts b/src/util/extension.ts index 6e9ba7d3..5b8ce8a5 100644 --- a/src/util/extension.ts +++ b/src/util/extension.ts @@ -6,6 +6,7 @@ import itemControlConstants from '../constants/itemcontrol'; import itemType from '../constants/itemType'; import { PresentationButtonsType } from '../constants/presentationButtonsType'; import { getText } from '../util/index'; +import { TABLE_CODES_VALUES, TableCodes } from '../constants/tableTypes'; export function getValidationTextExtension(item: QuestionnaireItem): string | undefined { const validationTextExtension = getExtension(ExtensionConstants.VALIDATIONTEXT_URL, item); @@ -70,6 +71,10 @@ export function isItemSidebar(item: QuestionnaireItem): boolean { return itemControls !== undefined && itemControls.some(itemControl => itemControl.code === itemControlConstants.SIDEBAR); } +export function getExtensions(item: QuestionnaireItem): Extension[] { + return item.extension ?? []; +} + export function getExtension(url: string, item: QuestionnaireItem | Element | Questionnaire): Extension | undefined { if (!item || !item.extension || item.extension.length === 0) { return undefined; @@ -173,6 +178,24 @@ export function getItemControlExtensionValue(item: QuestionnaireItem): Coding[] return itemControlExtension.valueCodeableConcept.coding; } +const hasCode = (code: string | undefined): code is string => { + return !!code; +}; + +const isTableCode = (code: string): code is TableCodes => { + return TABLE_CODES_VALUES.includes(code as TableCodes); +}; + +export const getCodingTextTableValues = (item: QuestionnaireItem): TableCodes[] => { + const extension = getItemControlExtensionValue(item); + const codeValues = + extension + ?.map(x => x.code) + .filter(hasCode) + .filter(isTableCode) || []; + return codeValues; +}; + export function getMarkdownExtensionValue(item: QuestionnaireItem | Element): string | undefined { const markdownExtension = getExtension(ExtensionConstants.MARKDOWN_URL, item); if (!markdownExtension || !markdownExtension.valueMarkdown) { diff --git a/src/util/fhirpathHelper.ts b/src/util/fhirpathHelper.ts index 796638e9..cbc15b3c 100644 --- a/src/util/fhirpathHelper.ts +++ b/src/util/fhirpathHelper.ts @@ -15,9 +15,26 @@ export function evaluateFhirpathExpressionToGetDate(item: QuestionnaireItem, fhi return; } -export function evaluateFhirpathExpressionToGetString( - questionnare: QuestionnaireResponse | null | undefined, - fhirExtension: Extension -): any { - return fhirpath.evaluate(questionnare, fhirExtension.valueString, null, fhirpath_r4_model); +export function evaluateFhirpathExpressionToGetString(fhirExtension: Extension, questionnare?: QuestionnaireResponse | null): any { + const qCopy = structuredClone(questionnare); + return fhirpath.evaluate(qCopy, fhirExtension.valueString, null, fhirpath_r4_model); +} + +export function evaluateExtension(path: string | object, questionnare?: QuestionnaireResponse | null, context?: 'object'): any { + const qCopy = structuredClone(questionnare); + /** + * Evaluates the "path" FHIRPath expression on the given resource or part of the resource, + * using data from "context" for variables mentioned in the "path" expression. + * @param {(object|object[])} fhirData - FHIR resource, part of a resource (in this case + * path.base should be provided), bundle as js object or array of resources. + * This object/array will be modified by this function to add type information. + * @param {string|object} path - string with fhirpath expression, sample 'Patient.name.given', + * or object, if fhirData represents the part of the FHIR resource: + * @param {string} path.base - base path in resource from which fhirData was extracted + * @param {string} path.expression - fhirpath expression relative to path.base + * @param {object} context - a hash of variable name/value pairs. + * @param {object} model - The "model" data object specific to a domain, e.g. R4. + * For example, you could pass in the result of require("fhirpath/fhir-context/r4"); + */ + return fhirpath.evaluate(qCopy, path, context, fhirpath_r4_model); } diff --git a/src/util/index.ts b/src/util/index.ts index 019945aa..02a71554 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -1,9 +1,21 @@ +import marked from 'marked'; import * as uuid from 'uuid'; import { Questionnaire, QuestionnaireResponseItem, QuestionnaireItem, QuestionnaireResponseItemAnswer } from '../types/fhir'; import { isValid, invalidNodes } from '@helsenorge/core-utils/string-utils'; +import { getQuestionnaireItemCodeValue } from './codingsystem'; +import { + getMaxOccursExtensionValue, + getMarkdownExtensionValue, + getValidationTextExtension, + getQuestionnaireHiddenExtensionValue, + getExtension, + getSublabelExtensionValue, + getHyperlinkExtensionValue, + getCopyExtension, +} from './extension'; import Attachment from '../components/formcomponents/attachment/attachment'; import Boolean from '../components/formcomponents/boolean/boolean'; import Choice from '../components/formcomponents/choice/choice'; @@ -17,26 +29,17 @@ import Integer from '../components/formcomponents/integer/integer'; import OpenChoice from '../components/formcomponents/open-choice/open-choice'; import Quantity from '../components/formcomponents/quantity/quantity'; import StringComponent from '../components/formcomponents/string/string'; +import Table from '../components/formcomponents/table/Table'; import Text from '../components/formcomponents/text/text'; +import CodingSystemConstants from '../constants/codingsystems'; import ExtensionConstants from '../constants/extensions'; -import { RenderOptionCode } from '../constants/renderOptionCode'; import { HyperlinkTarget } from '../constants/hyperlinkTarget'; -import CodingSystemConstants from '../constants/codingsystems'; import Constants from '../constants/index'; import ItemType from '../constants/itemType'; +import itemType from '../constants/itemType'; +import { RenderOptionCode } from '../constants/renderOptionCode'; +import { TABLE_CODES_VALUES } from '../constants/tableTypes'; import { Resources } from '../util/resources'; -import { - getMaxOccursExtensionValue, - getMarkdownExtensionValue, - getValidationTextExtension, - getQuestionnaireHiddenExtensionValue, - getExtension, - getSublabelExtensionValue, - getHyperlinkExtensionValue, - getCopyExtension, -} from './extension'; -import { getQuestionnaireItemCodeValue } from './codingsystem'; -import marked from 'marked'; function openNewIfAbsolute(url: string): string { const regex = new RegExp('^(([a-z][a-z0-9+.-]*):.*)'); @@ -45,10 +48,17 @@ function openNewIfAbsolute(url: string): string { } return '_self'; } - +export const isTableCode = (extensionCode: string | string[]): boolean => { + const isTable = TABLE_CODES_VALUES.some(value => { + return extensionCode.indexOf(value) === -1 ? false : true; + }); + return isTable; +}; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function getComponentForItem(type: string) { - if (String(type) === ItemType.GROUP) { +export function getComponentForItem(type: string, extensionCode?: string | string[]) { + if (String(type) === itemType.GROUP && !!extensionCode && isTableCode(extensionCode)) { + return Table; + } else if (String(type) === ItemType.GROUP) { return Group; } if (String(type) === ItemType.DISPLAY) { diff --git a/src/util/map-props.ts b/src/util/map-props.ts index 1aa990aa..2b90e3be 100644 --- a/src/util/map-props.ts +++ b/src/util/map-props.ts @@ -7,22 +7,27 @@ import { QuestionnaireResponseItemAnswer, } from '../types/fhir'; +import { enableWhenMatchesAnswer, getQuestionnaireResponseItemWithLinkid, getResponseItems, Path, isInGroupContext } from './refero-core'; import { NewValueAction } from '../actions/newValue'; import { Props } from '../components/with-common-functions'; +import ItemType from '../constants/itemType'; import { getFormData } from '../reducers/form'; import { GlobalState } from '../reducers/index'; -import { enableWhenMatchesAnswer, getQuestionnaireResponseItemWithLinkid, getResponseItems, Path, isInGroupContext } from './refero-core'; import { getCopyExtension, getCalculatedExpressionExtension } from '../util/extension'; import { evaluateFhirpathExpressionToGetString } from '../util/fhirpathHelper'; -import ItemType from '../constants/itemType'; export function mapStateToProps(state: GlobalState, originalProps: Props): Props { - getValueIfDataReceiver(state, originalProps); + // if (originalProps.item?.type === 'group') { + // console.log('map-props, originalProps.item', originalProps.item); + // console.log('map-props, originalProps.responseItem', originalProps.responseItem); + // } + const newAnswer = getValueIfDataReceiver(state, originalProps); if (!originalProps.item || !originalProps.item.enableWhen) { - return { ...originalProps, enable: true } as Props; + return { ...originalProps, enable: true, ...(newAnswer !== undefined && { answer: newAnswer }) } as Props; } const enable = isEnableWhenEnabled(originalProps.item.enableWhen, originalProps.item.enableBehavior, originalProps.path || [], state); - return { ...originalProps, enable } as Props; + + return { ...originalProps, enable, ...(newAnswer !== undefined && { answer: newAnswer }) } as Props; } function isEnableWhenEnabled( @@ -56,27 +61,32 @@ function isEnableWhenEnabled( : enableMatches.some(x => x === true); } -function getValueIfDataReceiver(state: GlobalState, originalProps: Props): void { +function getValueIfDataReceiver( + state: GlobalState, + originalProps: Props +): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined { if (originalProps.item) { const extension = getCopyExtension(originalProps.item); if (extension) { const formData = getFormData(state); - let result = evaluateFhirpathExpressionToGetString(formData?.Content, extension); + let result = evaluateFhirpathExpressionToGetString(extension, formData?.Content); if (!!getCalculatedExpressionExtension(originalProps.item)) { result = result.map((m: any) => m.value as number); } - originalProps.answer = getQuestionnaireResponseItemAnswer(originalProps.item.type, result); + return getQuestionnaireResponseItemAnswer(originalProps.item.type, result); } + return undefined; } + return undefined; } function getQuestionnaireResponseItemAnswer( type: string, result: any ): QuestionnaireResponseItemAnswer | Array { - let answerArray: Array = []; + const answerArray: Array = []; if (type === ItemType.BOOLEAN) { return { valueBoolean: result[0] }; } @@ -102,11 +112,11 @@ function getQuestionnaireResponseItemAnswer( case ItemType.DATE: answerArray.push({ valueDate: answer }); break; - case ItemType.TIME: + case ItemType.TIME: answerArray.push({ valueTime: answer }); break; default: { - if ((typeof answer) === 'string') { + if (typeof answer === 'string') { answerArray.push({ valueString: answer }); } else { answerArray.push({ valueCoding: answer }); @@ -114,7 +124,7 @@ function getQuestionnaireResponseItemAnswer( } } }); - return answerArray; + return answerArray; } export function mergeProps(stateProps: Props, dispatchProps: Props, ownProps: Props): Props { diff --git a/src/util/refero-core.ts b/src/util/refero-core.ts index 0fd525dc..fe0e54e6 100644 --- a/src/util/refero-core.ts +++ b/src/util/refero-core.ts @@ -7,10 +7,10 @@ import { QuestionnaireEnableOperator, } from '../types/fhir'; +import { getMinOccursExtensionValue } from './extension'; import ItemType from '../constants/itemType'; import { FormData, FormDefinition } from '../reducers/form'; import { enableWhenMatches } from '../util/enableWhenMatcher'; -import { getMinOccursExtensionValue } from './extension'; export function getRootQuestionnaireResponseItemFromData( definitionLinkId: string, @@ -84,7 +84,7 @@ export function getQuestionnaireResponseItemsWithLinkId( if (!responseItems) { return []; } - + let itemsWithLinkId = getItemsWithIdFromResponseItemArray(linkId, responseItems, recursive); if (itemsWithLinkId && itemsWithLinkId.length > 0) { return itemsWithLinkId; @@ -548,7 +548,11 @@ function getQuestionnaireItemWithIdFromArray( return filteredItems; } -export function getQuestionnaireItemsWithType(type: string, items: Array | undefined, itemsWithType?: Array): Array | undefined { +export function getQuestionnaireItemsWithType( + type: string, + items: Array | undefined, + itemsWithType?: Array +): Array | undefined { if (items === undefined) return; if (!itemsWithType) itemsWithType = []; @@ -559,8 +563,6 @@ export function getQuestionnaireItemsWithType(type: string, items: Array): void { if (items !== undefined) { - items - .filter(f => f.type === type) - .forEach(f => itemsWithType.push(f)); + items.filter(f => f.type === type).forEach(f => itemsWithType.push(f)); } } diff --git a/src/util/scoringCalculator.ts b/src/util/scoringCalculator.ts index 88657205..224ed96e 100644 --- a/src/util/scoringCalculator.ts +++ b/src/util/scoringCalculator.ts @@ -202,14 +202,11 @@ export class ScoringCalculator { } } - private valueOfQuestionFhirpathScoreItem( - item: QuestionnaireItem, - questionnaireResponse: QuestionnaireResponse, - ): number | undefined { + private valueOfQuestionFhirpathScoreItem(item: QuestionnaireItem, questionnaireResponse: QuestionnaireResponse): number | undefined { const expressionExtension = getCalculatedExpressionExtension(item); let value: number | undefined = undefined; if (expressionExtension) { - const result = evaluateFhirpathExpressionToGetString(questionnaireResponse, expressionExtension); + const result = evaluateFhirpathExpressionToGetString(expressionExtension, questionnaireResponse); if (result.length) { value = (result[0] as number) ?? 0; // Round up decimal to integer From a9ff24eb9af30bca9548e5304e75343fe7d8415d Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Sat, 30 Dec 2023 21:54:41 +0100 Subject: [PATCH 04/83] table-hn2 display, sorting --- src/components/formcomponents/table/Table.tsx | 47 +-- .../formcomponents/table/tables/TableHn1.tsx | 10 +- .../formcomponents/table/tables/TableHn2.tsx | 33 +- .../formcomponents/table/tables/helpers.ts | 91 ++++- src/preview/skjema/kun_qest_hn1.json | 311 ++++++++++++++++++ src/util/extension.ts | 2 +- src/util/fhirpathHelper.ts | 2 +- 7 files changed, 425 insertions(+), 71 deletions(-) create mode 100644 src/preview/skjema/kun_qest_hn1.json diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx index 106edbc8..571a68b4 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/Table.tsx @@ -13,17 +13,15 @@ import { } from '../../../types/fhir'; import TableHn1 from './tables/TableHn1'; +import TableHn2 from './tables/TableHn2'; import { NewValueAction } from '../../../actions/newValue'; import { TableCodes } from '../../../constants/tableTypes'; import { GlobalState } from '../../../reducers'; import { getFormData } from '../../../reducers/form'; import { getCodingTextTableValues } from '../../../util/extension'; -import { mapStateToProps as mstp } from '../../../util/map-props'; import { Path } from '../../../util/refero-core'; import { RenderContext } from '../../../util/renderContext'; import { Resources } from '../../../util/resources'; -import { Props as MstpProps } from '../../with-common-functions'; -import TableHn2 from './tables/TableHn2'; export interface Props { item: QuestionnaireItem; @@ -78,18 +76,12 @@ const Table = ({ tableCodes, items, headline, tableType, questionnaireResponse } } }; -const mapStateToProps = (state: GlobalState, props: Props): MstpProps & EnhancedProps => { +const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { const group = props.item; //TODO: Fix undefine and null checks const tableType = getCodingTextTableValues(group)[0]; - console.log('group', group); - const groupChildren = group.item; - console.log('groupChildren', groupChildren); - - const mappedProps = mstp(state, props); return { - ...mappedProps, headline: group.text ?? '', tableCodes: group.code ?? [], items: group.item ?? [], @@ -98,38 +90,3 @@ const mapStateToProps = (state: GlobalState, props: Props): MstpProps & Enhanced }; }; export default connect(mapStateToProps)(Table); -// const renderItem = (item: QuestionnaireItem, tableCodes: Coding[], headline: string): Array => { -// if (isHelpItem(item)) return []; -// if (isHiddenItem(item)) return []; - -// const Comp = getComponentForItem(item.type, getCodingTextTableValues(item)); - -// if (!Comp) { -// return []; -// } - -// let response: Array | undefined; - -// if (responseItem) { -// const childItem = responseItem.item; -// const childAnswer = responseItem.answer; -// const linkId = item.linkId; -// // console.log('childItem', childItem); - -// if (childItem) { -// response = getItemWithIdFromResponseItemArray(linkId, childItem); -// // console.log('response', response); -// } else if (childAnswer) { -// // console.log('childAnswer', childAnswer); - -// response = getItemWithIdFromResponseItemArray(linkId, childAnswer[0].item); -// } -// } -// const renderedItems: Array = []; -// if (response && response.length > 0) { -// response.forEach((responseItem, index) => { -// console.log(responseItem); -// }); -// } -// return renderedItems; -// }; diff --git a/src/components/formcomponents/table/tables/TableHn1.tsx b/src/components/formcomponents/table/tables/TableHn1.tsx index 6f716395..4b7f44fd 100644 --- a/src/components/formcomponents/table/tables/TableHn1.tsx +++ b/src/components/formcomponents/table/tables/TableHn1.tsx @@ -13,7 +13,7 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { findCodeForColumnToSortBy, getColumnNames, getValueIfDataReceiver } from './helpers'; +import { findCodeForColumnToSortBy, getColumnNames, getTableHN1bodyObject, getValueIfDataReceiver } from './helpers'; interface Props { tableCodes: Coding[]; @@ -23,10 +23,12 @@ interface Props { const TableHn1 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { const res = getValueIfDataReceiver(items[2], questionnaireResponse); const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); - console.log('questionnaireResponse', questionnaireResponse); - console.log('tableCodes', tableCodes); + // console.log('questionnaireResponse', questionnaireResponse); + // console.log('tableCodes', tableCodes); console.log('getValueIfDataReceiver', res); - console.log('item', items[2]); + // console.log('item', items[2]); + const answerValues = getTableHN1bodyObject(items); + console.log('answerValues', answerValues); return ( diff --git a/src/components/formcomponents/table/tables/TableHn2.tsx b/src/components/formcomponents/table/tables/TableHn2.tsx index 34625795..801212a0 100644 --- a/src/components/formcomponents/table/tables/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/TableHn2.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import ItemType from '../../../../constants/itemType'; import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; @@ -13,7 +13,7 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { findCodeForColumnToSortBy, getColumnNames, getValueIfDataReceiver } from './helpers'; +import { TableH2, findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject, getValueIfDataReceiver } from './helpers'; interface Props { tableCodes: Coding[]; @@ -22,17 +22,18 @@ interface Props { } const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { const [sortDir, setSortDir] = useState(SortDirection.asc); - const res = getValueIfDataReceiver(items[2], questionnaireResponse); const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); - console.log('questionnaireResponse', questionnaireResponse); - console.log('tableCodes', tableCodes); - console.log('getValueIfDataReceiver', res); - console.log('item', items[2]); - console.log('items', items); + //TODO: find index to sort by + const [responseItems, setResponseItems] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); const handleSort = (): void => { setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); }; + + useEffect(() => { + setResponseItems(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); + }, [sortDir, items, questionnaireResponse]); + return ( @@ -50,15 +51,15 @@ const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Elem - {items.map(item => { - return item.type === ItemType.DISPLAY ? ( - - {item.text} + {responseItems.map(item => { + return ( + + {item.row.map(row => ( + + {row.text} + + ))} - ) : ( - - {item.text} - ); })} diff --git a/src/components/formcomponents/table/tables/helpers.ts b/src/components/formcomponents/table/tables/helpers.ts index 710859d9..9a4c351a 100644 --- a/src/components/formcomponents/table/tables/helpers.ts +++ b/src/components/formcomponents/table/tables/helpers.ts @@ -1,10 +1,17 @@ -import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItemAnswer } from '../../../../types/fhir'; +import * as uuid from 'uuid'; +import { + Coding, + QuestionnaireItem, + QuestionnaireResponse, + QuestionnaireResponseItem, + QuestionnaireResponseItemAnswer, +} from '../../../../types/fhir'; +import CodingSystems, { CodeSystemValues, TableColumnName, TableOrderingColum } from '../../../../constants/codingsystems'; import ItemType from '../../../../constants/itemType'; -import { FormData } from '../../../../reducers/form'; import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; -import CodingSystems, { CodeSystemValues, CodeSystems, TableColumnName, TableOrderingColum } from '../../../../constants/codingsystems'; +import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; export function getQuestionnaireResponseItemAnswer( type: string, @@ -84,4 +91,80 @@ export const getColumnNames = (coding: Coding[]): string[] => { return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); }; -export const getTableHN1bodyObject = (items: QuestionnaireItem[]) => {}; +type TableH2Row = { + id: string; + text: string; +}; + +export type TableH2 = { + id: string; + row: TableH2Row[]; +}; + +const sortTableRows = (table: TableH2[], columnIndex: number, sortOrder: SortDirection): TableH2[] => { + return table.sort((a, b) => { + const aValue = a.row.length > columnIndex ? a.row[columnIndex]?.text || '' : ''; + const bValue = b.row.length > columnIndex ? b.row[columnIndex]?.text || '' : ''; + + return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + }); +}; + +export const getTableHN2bodyObject = ( + items: QuestionnaireItem[], + questionnaireResponse?: QuestionnaireResponse | null, + sortColumnIndex?: number, + sortOrder: SortDirection = SortDirection.asc +): TableH2[] => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + const table = items.reduce((acc: TableH2[], item) => { + const isDisplayType = item.type === ItemType.DISPLAY; + const newRow: TableH2Row = { + id: item.linkId, + text: isDisplayType ? item.text ?? '' : '', + }; + + if (isDisplayType) { + if (acc.length && acc[acc.length - 1].row.length !== 0) { + acc.push({ id: item.id ?? uuid.v4(), row: [newRow] }); + } else if (!acc.length || acc[acc.length - 1].row.length === 0) { + if (!acc.length) { + acc.push({ id: item.id ?? uuid.v4(), row: [] }); + } + acc[acc.length - 1].row.push(newRow); + } + } else { + const res = getValueIfDataReceiver(item, questionnaireResponse); + if (res) { + acc[acc.length - 1].row.push({ + id: item.linkId, + text: Array.isArray(res) ? res[0]?.valueCoding?.code ?? '' : res?.valueCoding?.code ?? '', + }); + } + } + + return acc; + }, []); + return sortColumnIndex ? sortTableRows(table, sortColumnIndex, sortOrder) : table; +}; +export const getTableHN1bodyObject = ( + items: QuestionnaireItem[], + questionnaireResponse?: QuestionnaireResponse | null +): QuestionnaireResponseItem[] => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + const returnItems: QuestionnaireResponseItem[] = items.map(item => { + const res = getValueIfDataReceiver(item, questionnaireResponse); + const responseItem: QuestionnaireResponseItem = structuredClone(item); + if (!Array.isArray(res) && res !== undefined) { + responseItem.answer = [res]; + } else { + responseItem.answer = res; + } + return responseItem; + }); + return returnItems; +}; diff --git a/src/preview/skjema/kun_qest_hn1.json b/src/preview/skjema/kun_qest_hn1.json new file mode 100644 index 00000000..74c72f2d --- /dev/null +++ b/src/preview/skjema/kun_qest_hn1.json @@ -0,0 +1,311 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "292c4322-20d3-4893-a249-a6753994dadd", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + } + ] + }, + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + } + ] + } + } + ], + "item": [ + { + "linkId": "4233cb23-aff4-4e72-8c89-41cdc44f8939", + "type": "group", + "text": "Personalia", + "required": false, + "item": [ + { + "linkId": "855afb10-1dd5-46d4-ab56-d8b8587323a4", + "type": "string", + "text": "Hva heter du?", + "required": false + }, + { + "linkId": "314166c1-cb72-4c67-b0a9-d90581d658ad", + "type": "string", + "text": "Hvor gammel er du?", + "required": false + } + ] + }, + { + "linkId": "f6764114-86d9-402d-8e05-aca25f980f5f", + "type": "group", + "text": "Sykdommer", + "required": false, + "item": [ + { + "linkId": "3cf13e1a-a775-42cc-8182-babde16743aa", + "type": "string", + "text": "Har du hjertesykdom?", + "required": false + }, + { + "linkId": "e32a3b49-42df-4394-9560-2cf48155e182", + "type": "string", + "text": "Hvilken sykdom har du?", + "required": false + }, + { + "linkId": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", + "type": "string", + "text": "Kan du si litt mer om sykdommen din?", + "required": false + } + ] + }, + { + "linkId": "2e71aeb8-aa1c-4bc4-b3a9-b82ed16acc28", + "type": "group", + "text": "Oppsummering", + "required": false, + "item": [ + { + "linkId": "2f566ffe-3f0c-4b3b-8b55-bdcb8aaea08b", + "type": "group", + "text": "Oppsummering Table-HN1", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn1" + } + ] + } + } + ], + "item": [ + { + "linkId": "b0c00973-36bd-49ad-92cf-887bbcf6f9b6", + "type": "group", + "text": "Personalia", + "required": false, + "item": [ + { + "linkId": "fd70929b-7421-4f59-8c0d-d86366d260c7", + "type": "string", + "text": "Hva heter du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='855afb10-1dd5-46d4-ab56-d8b8587323a4').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "855afb10-1dd5-46d4-ab56-d8b8587323a4", + "operator": "exists" + } + ] + }, + { + "linkId": "5a85ef28-51a0-45d7-899f-c87f7384a03e", + "type": "string", + "text": "Hvor gammel er du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='314166c1-cb72-4c67-b0a9-d90581d658ad').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "314166c1-cb72-4c67-b0a9-d90581d658ad", + "operator": "exists" + } + ] + } + ] + }, + { + "linkId": "765cc891-f702-4361-8a5f-719bcb26ec34", + "type": "group", + "text": "Sykdommer", + "required": false, + "item": [ + { + "linkId": "0388ed83-02a8-4660-80e3-d05208bb1dea", + "type": "string", + "text": "Har du hjertesykdom?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='3cf13e1a-a775-42cc-8182-babde16743aa').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "3cf13e1a-a775-42cc-8182-babde16743aa", + "operator": "exists" + } + ] + }, + { + "linkId": "de1df328-4b5d-4831-90c0-e2fd7993067a", + "type": "string", + "text": "Hvilken sykdom har du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e32a3b49-42df-4394-9560-2cf48155e182').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "e32a3b49-42df-4394-9560-2cf48155e182", + "operator": "exists" + } + ] + }, + { + "linkId": "7789abe2-0594-4896-d930-e271972d13cd", + "type": "string", + "text": "Kan du si litt mer om sykdommen din?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='8caedfdb-dee1-47eb-8ee0-9c451fb4fb57').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", + "operator": "exists" + } + ] + } + ] + } + ] + } + ] + } + ] +} diff --git a/src/util/extension.ts b/src/util/extension.ts index 5b8ce8a5..3e3e1848 100644 --- a/src/util/extension.ts +++ b/src/util/extension.ts @@ -5,8 +5,8 @@ import ExtensionConstants from '../constants/extensions'; import itemControlConstants from '../constants/itemcontrol'; import itemType from '../constants/itemType'; import { PresentationButtonsType } from '../constants/presentationButtonsType'; -import { getText } from '../util/index'; import { TABLE_CODES_VALUES, TableCodes } from '../constants/tableTypes'; +import { getText } from '../util/index'; export function getValidationTextExtension(item: QuestionnaireItem): string | undefined { const validationTextExtension = getExtension(ExtensionConstants.VALIDATIONTEXT_URL, item); diff --git a/src/util/fhirpathHelper.ts b/src/util/fhirpathHelper.ts index cbc15b3c..8f8dfec0 100644 --- a/src/util/fhirpathHelper.ts +++ b/src/util/fhirpathHelper.ts @@ -20,7 +20,7 @@ export function evaluateFhirpathExpressionToGetString(fhirExtension: Extension, return fhirpath.evaluate(qCopy, fhirExtension.valueString, null, fhirpath_r4_model); } -export function evaluateExtension(path: string | object, questionnare?: QuestionnaireResponse | null, context?: 'object'): any { +export function evaluateExtension(path: string | object, questionnare?: QuestionnaireResponse | null, context?: 'object'): unknown { const qCopy = structuredClone(questionnare); /** * Evaluates the "path" FHIRPath expression on the given resource or part of the resource, From 5a738b784253d188d073620ed8fd579985883dad Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Mon, 1 Jan 2024 12:45:09 +0100 Subject: [PATCH 05/83] get values from datareciver as string for table --- .../formcomponents/table/tables/TableHn2.tsx | 6 +- .../formcomponents/table/tables/helpers.ts | 86 ++++++++++++++++--- 2 files changed, 76 insertions(+), 16 deletions(-) diff --git a/src/components/formcomponents/table/tables/TableHn2.tsx b/src/components/formcomponents/table/tables/TableHn2.tsx index 801212a0..4f63a2c0 100644 --- a/src/components/formcomponents/table/tables/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/TableHn2.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import ItemType from '../../../../constants/itemType'; + import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; import { @@ -13,7 +13,7 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { TableH2, findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject, getValueIfDataReceiver } from './helpers'; +import { ITableH2, findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject } from './helpers'; interface Props { tableCodes: Coding[]; @@ -24,7 +24,7 @@ const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Elem const [sortDir, setSortDir] = useState(SortDirection.asc); const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); //TODO: find index to sort by - const [responseItems, setResponseItems] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); + const [responseItems, setResponseItems] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); const handleSort = (): void => { setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); diff --git a/src/components/formcomponents/table/tables/helpers.ts b/src/components/formcomponents/table/tables/helpers.ts index 9a4c351a..f2e0520c 100644 --- a/src/components/formcomponents/table/tables/helpers.ts +++ b/src/components/formcomponents/table/tables/helpers.ts @@ -1,17 +1,20 @@ import * as uuid from 'uuid'; + import { Coding, + Quantity, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, } from '../../../../types/fhir'; +import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; + import CodingSystems, { CodeSystemValues, TableColumnName, TableOrderingColum } from '../../../../constants/codingsystems'; import ItemType from '../../../../constants/itemType'; import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; -import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; export function getQuestionnaireResponseItemAnswer( type: string, @@ -64,9 +67,8 @@ export const getValueIfDataReceiver = ( const extension = getCopyExtension(item); if (extension) { let result = evaluateFhirpathExpressionToGetString(extension, questionnaireResponse); - if (!!getCalculatedExpressionExtension(item)) { - result = result.map((m: any) => m.value as number); + result = result.map((m: { value: number }) => m.value); } 3; @@ -91,17 +93,17 @@ export const getColumnNames = (coding: Coding[]): string[] => { return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); }; -type TableH2Row = { +interface ITableH2Row { id: string; text: string; -}; +} -export type TableH2 = { +export interface ITableH2 { id: string; - row: TableH2Row[]; -}; + row: ITableH2Row[]; +} -const sortTableRows = (table: TableH2[], columnIndex: number, sortOrder: SortDirection): TableH2[] => { +const sortTableRows = (table: ITableH2[], columnIndex: number, sortOrder: SortDirection): ITableH2[] => { return table.sort((a, b) => { const aValue = a.row.length > columnIndex ? a.row[columnIndex]?.text || '' : ''; const bValue = b.row.length > columnIndex ? b.row[columnIndex]?.text || '' : ''; @@ -110,18 +112,76 @@ const sortTableRows = (table: TableH2[], columnIndex: number, sortOrder: SortDir }); }; +const getStringFromItemType = ( + type: typeof ItemType[keyof typeof ItemType], + res: QuestionnaireResponseItemAnswer +): string | number | Quantity => { + switch (type) { + case ItemType.TEXT: + case ItemType.STRING: + return res.valueString ?? ''; + case ItemType.INTEGER: + return res.valueInteger ?? 0; + case ItemType.DECIMAL: + return res.valueDecimal ?? 0; + case ItemType.QUANTITY: + return res.valueQuantity ?? ''; + case ItemType.DATETIME: + return res.valueDateTime ?? ''; + case ItemType.DATE: + return res.valueDate ?? ''; + case ItemType.TIME: + return res.valueTime ?? ''; + case ItemType.CHOICE: + return res.valueCoding?.display ?? ''; + default: { + return ''; + } + } +}; +const getValueFromDataReciever = ( + type: typeof ItemType[keyof typeof ItemType], + questionnaireAnswer?: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] +): Array => { + if (questionnaireAnswer === undefined) { + return []; + } + const answerArray: Array = []; + if (Array.isArray(questionnaireAnswer)) { + questionnaireAnswer.forEach(answer => { + const primetiveAnswerValue = getStringFromItemType(type, answer); + answerArray.push(primetiveAnswerValue); + }); + } else { + const primetiveAnswerValue = getStringFromItemType(type, questionnaireAnswer); + answerArray.push(primetiveAnswerValue); + } + return answerArray; +}; + +const transformAnswersToString = ( + type: typeof ItemType[keyof typeof ItemType], + answer: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] +): string => { + const value = getValueFromDataReciever(type, answer); + if (value.length === 0) { + return ''; + } + return getValueFromDataReciever(type, answer)[0].toString(); +}; + export const getTableHN2bodyObject = ( items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null, sortColumnIndex?: number, sortOrder: SortDirection = SortDirection.asc -): TableH2[] => { +): ITableH2[] => { if (!questionnaireResponse || items.length === 0) { return []; } - const table = items.reduce((acc: TableH2[], item) => { + const table = items.reduce((acc: ITableH2[], item) => { const isDisplayType = item.type === ItemType.DISPLAY; - const newRow: TableH2Row = { + const newRow: ITableH2Row = { id: item.linkId, text: isDisplayType ? item.text ?? '' : '', }; @@ -140,7 +200,7 @@ export const getTableHN2bodyObject = ( if (res) { acc[acc.length - 1].row.push({ id: item.linkId, - text: Array.isArray(res) ? res[0]?.valueCoding?.code ?? '' : res?.valueCoding?.code ?? '', + text: transformAnswersToString(item.type, res), }); } } From 275a357fdb073eb2afa129b691caf81dcbd9863a Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Mon, 1 Jan 2024 21:43:22 +0100 Subject: [PATCH 06/83] started on enable when --- .../formcomponents/table/tables/helpers.ts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/components/formcomponents/table/tables/helpers.ts b/src/components/formcomponents/table/tables/helpers.ts index f2e0520c..15e0f77c 100644 --- a/src/components/formcomponents/table/tables/helpers.ts +++ b/src/components/formcomponents/table/tables/helpers.ts @@ -4,6 +4,8 @@ import { Coding, Quantity, QuestionnaireItem, + QuestionnaireItemEnableBehaviorCodes, + QuestionnaireItemEnableWhen, QuestionnaireResponse, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, @@ -15,6 +17,37 @@ import CodingSystems, { CodeSystemValues, TableColumnName, TableOrderingColum } import ItemType from '../../../../constants/itemType'; import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; +import { Path, enableWhenMatchesAnswer, getQuestionnaireResponseItemWithLinkid, isInGroupContext } from '../../../../util/refero-core'; + +function isEnableWhenEnabled( + enableWhen: QuestionnaireItemEnableWhen[], + enableBehavior: string | undefined, + path: Path[], + responseItems: QuestionnaireResponseItem[] +): boolean { + const enableMatches: Array = []; + enableWhen.forEach((enableWhen: QuestionnaireItemEnableWhen) => { + const enableWhenQuestion = enableWhen.question; + for (let i = 0; responseItems && i < responseItems.length; i++) { + let responseItem: QuestionnaireResponseItem | undefined = responseItems[i]; + if (!isInGroupContext(path, responseItem, responseItems)) { + continue; + } + if (responseItem.linkId !== enableWhen.question) { + responseItem = getQuestionnaireResponseItemWithLinkid(enableWhenQuestion, responseItems[i], path); + } + if (!responseItem) { + continue; + } + + const matchesAnswer = enableWhenMatchesAnswer(enableWhen, responseItem.answer); + enableMatches.push(matchesAnswer); + } + }); + return enableBehavior === QuestionnaireItemEnableBehaviorCodes.ALL + ? enableMatches.every(x => x === true) + : enableMatches.some(x => x === true); +} export function getQuestionnaireResponseItemAnswer( type: string, From d7f7b7dfb0a3e5a86f008855ba287cd03941a851 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 2 Jan 2024 14:49:07 +0100 Subject: [PATCH 07/83] hn1-table --- src/components/formcomponents/table/Table.tsx | 30 +- .../formcomponents/table/tables/TableHn1.tsx | 34 +- .../formcomponents/table/tables/TableHn2.tsx | 9 +- .../formcomponents/table/tables/helpers.ts | 286 ++-- src/constants/codingsystems.ts | 3 +- src/constants/tableTypes.ts | 10 +- src/preview/skjema/kun_qest.json | 1241 +++-------------- src/util/extension.ts | 8 +- src/util/index.ts | 12 +- 9 files changed, 444 insertions(+), 1189 deletions(-) diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx index 571a68b4..1030cf55 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/Table.tsx @@ -15,7 +15,7 @@ import { import TableHn1 from './tables/TableHn1'; import TableHn2 from './tables/TableHn2'; import { NewValueAction } from '../../../actions/newValue'; -import { TableCodes } from '../../../constants/tableTypes'; +import { TABLE_CODES_VALUES, TableCodes } from '../../../constants/tableTypes'; import { GlobalState } from '../../../reducers'; import { getFormData } from '../../../reducers/form'; import { getCodingTextTableValues } from '../../../util/extension'; @@ -47,27 +47,39 @@ export interface Props { interface EnhancedProps { headline: string; - tableCodes: Coding[]; + tableCodesCoding: Coding[]; items: QuestionnaireItem[]; - tableType: TableCodes; + tableType: TABLE_CODES_VALUES; questionnaireResponse?: QuestionnaireResponse | null; } -const Table = ({ tableCodes, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { +const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { { switch (tableType) { - case 'table-hn1': + case TableCodes.tableHn1: return ( <>

{headline}

- + ); - case 'table-HN2': + case TableCodes.tableHn2: + return ( + <> +

{headline}

+ + + ); + case TableCodes.gtable: + return ( + <> +

{headline}

+ + ); + case TableCodes.table: return ( <>

{headline}

- ); default: @@ -83,7 +95,7 @@ const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { return { headline: group.text ?? '', - tableCodes: group.code ?? [], + tableCodesCoding: group.code ?? [], items: group.item ?? [], tableType, questionnaireResponse: getFormData(state)?.Content, diff --git a/src/components/formcomponents/table/tables/TableHn1.tsx b/src/components/formcomponents/table/tables/TableHn1.tsx index 4b7f44fd..7c3dc45e 100644 --- a/src/components/formcomponents/table/tables/TableHn1.tsx +++ b/src/components/formcomponents/table/tables/TableHn1.tsx @@ -13,37 +13,37 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { findCodeForColumnToSortBy, getColumnNames, getTableHN1bodyObject, getValueIfDataReceiver } from './helpers'; +import { TABLE_HN1_TABLE_TYPES, findCodeForColumnToSortBy, getColumnNames, getTableHN1bodyObject } from './helpers'; interface Props { - tableCodes: Coding[]; + tableCodesCoding: Coding[]; items: QuestionnaireItem[]; questionnaireResponse?: QuestionnaireResponse | null; } -const TableHn1 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { - const res = getValueIfDataReceiver(items[2], questionnaireResponse); - const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); - // console.log('questionnaireResponse', questionnaireResponse); - // console.log('tableCodes', tableCodes); - console.log('getValueIfDataReceiver', res); - // console.log('item', items[2]); - const answerValues = getTableHN1bodyObject(items); - console.log('answerValues', answerValues); +const TableHn1 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { + const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); + const answerValues = getTableHN1bodyObject(items, questionnaireResponse); return ( - + {/* - {getColumnNames(tableCodes).map(column => ( + {getColumnNames(tableCodesCoding).map(column => ( {`here ${column}`} ))} - + */} - {items.map(item => ( - - {item.linkId} + {answerValues.map(item => ( + + {item.columns.map(({ value, id, type }) => ( + + + {value} + + + ))} ))} diff --git a/src/components/formcomponents/table/tables/TableHn2.tsx b/src/components/formcomponents/table/tables/TableHn2.tsx index 4f63a2c0..1aa33199 100644 --- a/src/components/formcomponents/table/tables/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/TableHn2.tsx @@ -16,16 +16,15 @@ import { import { ITableH2, findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject } from './helpers'; interface Props { - tableCodes: Coding[]; + tableCodesCoding: Coding[]; items: QuestionnaireItem[]; questionnaireResponse?: QuestionnaireResponse | null; } -const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { +const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { const [sortDir, setSortDir] = useState(SortDirection.asc); - const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); + const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); //TODO: find index to sort by const [responseItems, setResponseItems] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); - const handleSort = (): void => { setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); }; @@ -38,7 +37,7 @@ const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Elem - {getColumnNames(tableCodes).map(column => ( + {getColumnNames(tableCodesCoding).map(column => ( = []; - enableWhen.forEach((enableWhen: QuestionnaireItemEnableWhen) => { - const enableWhenQuestion = enableWhen.question; - for (let i = 0; responseItems && i < responseItems.length; i++) { - let responseItem: QuestionnaireResponseItem | undefined = responseItems[i]; - if (!isInGroupContext(path, responseItem, responseItems)) { - continue; - } - if (responseItem.linkId !== enableWhen.question) { - responseItem = getQuestionnaireResponseItemWithLinkid(enableWhenQuestion, responseItems[i], path); - } - if (!responseItem) { - continue; - } - - const matchesAnswer = enableWhenMatchesAnswer(enableWhen, responseItem.answer); - enableMatches.push(matchesAnswer); - } - }); - return enableBehavior === QuestionnaireItemEnableBehaviorCodes.ALL - ? enableMatches.every(x => x === true) - : enableMatches.some(x => x === true); -} +const answerKeyMap = { + [ItemType.TEXT]: 'valueString', + [ItemType.STRING]: 'valueString', + [ItemType.INTEGER]: 'valueInteger', + [ItemType.DECIMAL]: 'valueDecimal', + [ItemType.QUANTITY]: 'valueQuantity', + [ItemType.DATETIME]: 'valueDateTime', + [ItemType.DATE]: 'valueDate', + [ItemType.TIME]: 'valueTime', +}; export function getQuestionnaireResponseItemAnswer( type: string, result: any ): QuestionnaireResponseItemAnswer | Array { - const answerArray: Array = []; if (type === ItemType.BOOLEAN) { return { valueBoolean: result[0] }; + } else if (type === ItemType.CHOICE) { + return { + //TODO: map Coding + valueCoding: result[0].display ?? '', + }; } - result.forEach((answer: any) => { - switch (String(type)) { - case ItemType.TEXT: - case ItemType.STRING: - answerArray.push({ valueString: answer }); - break; - case ItemType.INTEGER: - answerArray.push({ valueInteger: answer }); - break; - case ItemType.DECIMAL: - answerArray.push({ valueDecimal: answer }); - break; - case ItemType.QUANTITY: - answerArray.push({ valueQuantity: answer }); - break; - case ItemType.DATETIME: - answerArray.push({ valueDateTime: answer }); - break; - case ItemType.DATE: - answerArray.push({ valueDate: answer }); - break; - case ItemType.TIME: - answerArray.push({ valueTime: answer }); - break; - default: { - if (typeof answer === 'string') { - answerArray.push({ valueString: answer }); - } else { - answerArray.push({ valueCoding: answer }); - } - } - } - }); - return answerArray; + return result.map((answer: any) => ({ + [answerKeyMap[type] || 'defaultKey']: answer, + })); } export const getValueIfDataReceiver = ( item: QuestionnaireItem, @@ -103,17 +57,14 @@ export const getValueIfDataReceiver = ( if (!!getCalculatedExpressionExtension(item)) { result = result.map((m: { value: number }) => m.value); } - 3; - return getQuestionnaireResponseItemAnswer(item.type, result); } return undefined; }; -export const findCodeBySystem = (coding: Coding[], system?: CodeSystemValues): Coding[] => { - return coding?.filter(code => code?.system === system) ?? []; -}; - +export function findCodeBySystem(coding: T[], system?: string): T[] { + return coding.filter(code => code.system === system); +} export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined => { const code = findCodeBySystem(coding, TableOrderingColum); const columnsToDisplay = coding?.filter(codeElement => codeElement.system === CodingSystems.TableColumnName); @@ -126,26 +77,7 @@ export const getColumnNames = (coding: Coding[]): string[] => { return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); }; -interface ITableH2Row { - id: string; - text: string; -} - -export interface ITableH2 { - id: string; - row: ITableH2Row[]; -} - -const sortTableRows = (table: ITableH2[], columnIndex: number, sortOrder: SortDirection): ITableH2[] => { - return table.sort((a, b) => { - const aValue = a.row.length > columnIndex ? a.row[columnIndex]?.text || '' : ''; - const bValue = b.row.length > columnIndex ? b.row[columnIndex]?.text || '' : ''; - - return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); - }); -}; - -const getStringFromItemType = ( +const getPrimetiveValueFromItemType = ( type: typeof ItemType[keyof typeof ItemType], res: QuestionnaireResponseItemAnswer ): string | number | Quantity => { @@ -172,6 +104,8 @@ const getStringFromItemType = ( } } }; +const convertePrimitiveValueToStrings = (value: Array): string[] => value.map(answer => answer.toString()); + const getValueFromDataReciever = ( type: typeof ItemType[keyof typeof ItemType], questionnaireAnswer?: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] @@ -182,11 +116,11 @@ const getValueFromDataReciever = ( const answerArray: Array = []; if (Array.isArray(questionnaireAnswer)) { questionnaireAnswer.forEach(answer => { - const primetiveAnswerValue = getStringFromItemType(type, answer); + const primetiveAnswerValue = getPrimetiveValueFromItemType(type, answer); answerArray.push(primetiveAnswerValue); }); } else { - const primetiveAnswerValue = getStringFromItemType(type, questionnaireAnswer); + const primetiveAnswerValue = getPrimetiveValueFromItemType(type, questionnaireAnswer); answerArray.push(primetiveAnswerValue); } return answerArray; @@ -195,14 +129,65 @@ const getValueFromDataReciever = ( const transformAnswersToString = ( type: typeof ItemType[keyof typeof ItemType], answer: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] -): string => { +): string[] => { const value = getValueFromDataReciever(type, answer); if (value.length === 0) { - return ''; + return []; } - return getValueFromDataReciever(type, answer)[0].toString(); + return convertePrimitiveValueToStrings(value); +}; + +function isEnableWhenEnabled( + enableWhen: QuestionnaireItemEnableWhen[], + enableBehavior: string | undefined, + path: Path[], + responseItems: QuestionnaireResponseItem[] +): boolean { + const enableMatches: Array = []; + enableWhen.forEach((enableWhen: QuestionnaireItemEnableWhen) => { + const enableWhenQuestion = enableWhen.question; + for (let i = 0; responseItems && i < responseItems.length; i++) { + let responseItem: QuestionnaireResponseItem | undefined = responseItems[i]; + if (!isInGroupContext(path, responseItem, responseItems)) { + continue; + } + if (responseItem.linkId !== enableWhen.question) { + responseItem = getQuestionnaireResponseItemWithLinkid(enableWhenQuestion, responseItems[i], path); + } + if (!responseItem) { + continue; + } + + const matchesAnswer = enableWhenMatchesAnswer(enableWhen, responseItem.answer); + enableMatches.push(matchesAnswer); + } + }); + return enableBehavior === QuestionnaireItemEnableBehaviorCodes.ALL + ? enableMatches.every(x => x === true) + : enableMatches.some(x => x === true); +} + +/* SORTING */ +const sortTableRows = (table: ITableH2[], columnIndex: number, sortOrder: SortDirection): ITableH2[] => { + return table.sort((a, b) => { + const aValue = a?.row.length > columnIndex ? a?.row[columnIndex]?.text || '' : ''; + const bValue = b?.row.length > columnIndex ? b?.row[columnIndex]?.text || '' : ''; + + return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + }); }; +/* TABLE - HN2 */ +interface ITableH2Row { + id: string; + text: string; +} + +export interface ITableH2 { + id: string; + row: ITableH2Row[]; +} + export const getTableHN2bodyObject = ( items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null, @@ -220,20 +205,20 @@ export const getTableHN2bodyObject = ( }; if (isDisplayType) { - if (acc.length && acc[acc.length - 1].row.length !== 0) { + if (acc.length && acc[acc.length - 1]?.row.length !== 0) { acc.push({ id: item.id ?? uuid.v4(), row: [newRow] }); - } else if (!acc.length || acc[acc.length - 1].row.length === 0) { + } else if (!acc.length || acc[acc.length - 1]?.row.length === 0) { if (!acc.length) { acc.push({ id: item.id ?? uuid.v4(), row: [] }); } - acc[acc.length - 1].row.push(newRow); + acc[acc.length - 1]?.row.push(newRow); } } else { const res = getValueIfDataReceiver(item, questionnaireResponse); if (res) { - acc[acc.length - 1].row.push({ + acc[acc.length - 1]?.row.push({ id: item.linkId, - text: transformAnswersToString(item.type, res), + text: transformAnswersToString(item.type, res).toString(), }); } } @@ -242,22 +227,113 @@ export const getTableHN2bodyObject = ( }, []); return sortColumnIndex ? sortTableRows(table, sortColumnIndex, sortOrder) : table; }; -export const getTableHN1bodyObject = ( + +/* TABLE - HN1 */ +export const TABLE_HN1_TABLE_TYPES = { HEADER: 'HEADER', VALUE: 'VALUE' }; +type TableHn1ColumnTypesKey = keyof typeof TABLE_HN1_TABLE_TYPES; +type TableHn1ColumnTypesValue = typeof TABLE_HN1_TABLE_TYPES[TableHn1ColumnTypesKey]; +export interface ITableH1Column { + value?: string; + type: TableHn1ColumnTypesValue; + id: string; +} +export interface ITableH1Row { + id: string; + columns: ITableH1Column[]; +} +export type ITableH1 = ITableH1Row[]; + +const createColumnsFromAnswers = (item: QuestionnaireResponseItem, maxColumns: number): ITableH1Column[] => { + const answerColumns = + item.answer?.map(ans => ({ + value: getPrimetiveValueFromItemType((item as QuestionnaireItem).type, ans).toString(), + type: TABLE_HN1_TABLE_TYPES.VALUE, + id: item.linkId, + })) ?? []; + + const emptyColumnsCount = maxColumns - (answerColumns.length + 1); + + const emptyColumns = Array.from({ length: emptyColumnsCount }, (_, index) => ({ + id: `empty-${item.linkId}-${index + answerColumns.length + 1}`, + type: TABLE_HN1_TABLE_TYPES.VALUE, + value: '', + })); + + return [ + { + id: `${item.linkId}-question`, + type: (item as QuestionnaireItem).type === ItemType.GROUP ? TABLE_HN1_TABLE_TYPES.HEADER : TABLE_HN1_TABLE_TYPES.VALUE, + value: item.text || '', + }, + ...answerColumns, + ...emptyColumns, + ]; +}; + +const transformItemToHN1Row = (item: QuestionnaireResponseItem, maxColumns: number): ITableH1Row => { + const columns = createColumnsFromAnswers(item, maxColumns); + + return { + id: item.linkId, + columns: columns, + }; +}; + +export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): ITableH1 => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + + const answerItems = addAnswerToItems(items, questionnaireResponse); + const maxColumns = findMaxColumns(answerItems); + + const processItems = (items: QuestionnaireResponseItem[], maxColumns: number): ITableH1Row[] => { + return items.reduce((acc: ITableH1Row[], item) => { + const row = transformItemToHN1Row(item, maxColumns); + const newAcc = acc.concat(row); + + const nestedRows = item.item ? processItems(item.item, maxColumns) : []; + return newAcc.concat(nestedRows); + }, []); + }; + + return processItems(answerItems, maxColumns); +}; + +const addAnswerToItems = ( items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null ): QuestionnaireResponseItem[] => { if (!questionnaireResponse || items.length === 0) { return []; } - const returnItems: QuestionnaireResponseItem[] = items.map(item => { + + const processItem = (item: QuestionnaireItem): QuestionnaireResponseItem => { const res = getValueIfDataReceiver(item, questionnaireResponse); const responseItem: QuestionnaireResponseItem = structuredClone(item); + if (!Array.isArray(res) && res !== undefined) { responseItem.answer = [res]; } else { responseItem.answer = res; } + + if (item.item && item.item.length > 0) { + responseItem.item = addAnswerToItems(item.item, questionnaireResponse); + } + return responseItem; - }); - return returnItems; + }; + + return items.map(processItem); +}; + +const findMaxColumns = (items: QuestionnaireResponseItem[]): number => { + const countColumns = (item: QuestionnaireResponseItem): number => { + const columns = 1 + (item.answer?.length || 0); + const maxNestedColumns = item.item?.reduce((max, subItem) => Math.max(max, countColumns(subItem)), 0) || 0; + return Math.max(columns, maxNestedColumns); + }; + + return items.reduce((max, item) => Math.max(max, countColumns(item)), 0); }; diff --git a/src/constants/codingsystems.ts b/src/constants/codingsystems.ts index 996af202..27ea743d 100644 --- a/src/constants/codingsystems.ts +++ b/src/constants/codingsystems.ts @@ -8,6 +8,5 @@ const codeSystems = { TableOrderingColum: 'http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn', TableOrderingFunctions: 'http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions', }; -export type CodeSystems = keyof typeof codeSystems; -export type CodeSystemValues = typeof codeSystems[keyof typeof codeSystems]; + export default codeSystems; diff --git a/src/constants/tableTypes.ts b/src/constants/tableTypes.ts index 09e5a29b..44366257 100644 --- a/src/constants/tableTypes.ts +++ b/src/constants/tableTypes.ts @@ -1,3 +1,9 @@ -export type TableCodes = 'table-hn' | 'gtable' | 'table' | 'table-hn1' | 'table-HN2'; +export const TableCodes = { + gtable: 'gtable', + table: 'table', + tableHn1: 'table-hn1', + tableHn2: 'table-hn2', +} as const; -export const TABLE_CODES_VALUES: TableCodes[] = ['table-hn', 'gtable', 'table', 'table-hn1', 'table-HN2']; +export type TABLE_CODES_KEYS = keyof typeof TableCodes; +export type TABLE_CODES_VALUES = typeof TableCodes[TABLE_CODES_KEYS]; diff --git a/src/preview/skjema/kun_qest.json b/src/preview/skjema/kun_qest.json index 85b59321..fb9e7b03 100644 --- a/src/preview/skjema/kun_qest.json +++ b/src/preview/skjema/kun_qest.json @@ -1,11 +1,6 @@ { "resourceType": "Questionnaire", "language": "nb-NO", - "id": "1c90d68d-78d8-4c7b-b5fb-44c165babbcc", - "name": "NHN_Test_tableHN2", - "title": "tableHN2", - "description": "Skjema før time for nyrepasient", - "version": "0.1", "status": "draft", "publisher": "NHN", "meta": { @@ -22,31 +17,9 @@ "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - }, - { - "code": "1", - "display": "Kun innbygger selv", - "system": "http://helsenorge.no/fhir/KanUtforesAv" } ] }, - "useContext": [ - { - "code": { - "system": "http://hl7.org/fhir/ValueSet/usage-context-type", - "code": "focus", - "display": "Clinical Focus" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1.8655", - "display": "tableHN2" - } - ] - } - } - ], "contact": [ { "name": "http://www.nhn.no" @@ -68,12 +41,6 @@ "code": "1" } }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", - "valueReference": { - "reference": "Endpoint/1" - } - }, { "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", "valueCodeableConcept": { @@ -87,676 +54,68 @@ "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-sublabel", "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "resourceType": "ValueSet", - "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", - "version": "1.0", - "name": "Viktighet", - "title": "Viktighet", - "date": "2023-03-29T13:43:26.881Z", - "status": "draft", - "publisher": "Viktighet", - "compose": { - "include": [ - { - "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", - "concept": [ - { - "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", - "code": "0", - "display": "0" - }, - { - "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", - "code": "1", - "display": "1" - }, - { - "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", - "code": "2", - "display": "2" - }, - { - "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", - "code": "3", - "display": "3" - }, - { - "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", - "code": "4", - "display": "4" - }, - { - "id": "50e5f8f0-db46-45f9-8fda-67039933756e", - "code": "5", - "display": "5" - }, - { - "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", - "code": "6", - "display": "6" - }, - { - "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", - "code": "7", - "display": "7" - }, - { - "id": "dc888467-ab8b-4412-82ca-0312edcc0695", - "code": "8", - "display": "8" - }, - { - "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", - "code": "9", - "display": "9" - }, - { - "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", - "code": "10", - "display": "10" - } - ] } ] } } ], + "id": "292c4322-20d3-4893-a249-a6753994dadd", "item": [ { - "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", + "linkId": "4233cb23-aff4-4e72-8c89-41cdc44f8939", "type": "group", - "text": "Data inn", - "required": false, + "text": "Personalia", "item": [ { - "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", - "type": "boolean", - "text": "Hoven i beina", - "required": false, - "item": [ - { - "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "type": "choice", - "text": "Viktighet Hoven i beina", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - } - ] + "linkId": "855afb10-1dd5-46d4-ab56-d8b8587323a4", + "type": "string", + "text": "Hva heter du?", + "required": false }, { - "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "type": "boolean", - "text": "Kløe i huden", - "required": false, - "item": [ - { - "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "type": "choice", - "text": "Viktighet kløe i huden", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] - } - ] + "linkId": "314166c1-cb72-4c67-b0a9-d90581d658ad", + "type": "string", + "text": "Hvor gammel er du?", + "required": false } - ] + ], + "required": false }, { - "linkId": "85bcab33-b84b-4f9f-cd98-6bfa6dedc8c7", + "linkId": "f6764114-86d9-402d-8e05-aca25f980f5f", "type": "group", - "text": "Oppsummering med grupper. Innrykk trenger en ikke ta hensyn til, da data blir presentert i tabell. Gruppe benyttes kun til å få inn en verdi i kolonne 1", - "extension": [ + "text": "Sykdommer", + "item": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary-container" - } - ] - } - } - ], - "required": false, - "code": [ + "linkId": "3cf13e1a-a775-42cc-8182-babde16743aa", + "type": "string", + "text": "Har du hjertesykdommer?", + "required": false + }, { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "c87dc79b-afd8-4ef5-8ebf-1b9d3a6a4d9f" - } - ], - "item": [ + "linkId": "e32a3b49-42df-4394-9560-2cf48155e182", + "type": "string", + "text": "Hvilke sykdommer har du?", + "required": false + }, { - "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", - "type": "group", - "text": "Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-hn2" - } - ] - } - } - ], - "code": [ - { - "code": "1", - "display": "Sykdom", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" - }, - { - "code": "3", - "display": "Alvorlighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" - }, - { - "code": "DESC", - "display": "Descending", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" - } - ], - "item": [ - { - "linkId": "268a7080-0067-4cbb-8a4d-8bea26b46296", - "type": "display", - "text": "Hoven i beina", - "code": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403", - "code": "1" - } - ], - "required": false, - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "operator": "exists" - } - ], - "text": "Viktighet", - "code": [ - { - "code": "2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "941622c1-0a8d-487d-8214-b7cf9cba6210" - } - ] - }, - { - "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet", - "code": [ - { - "code": "3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "4a7d5ffd-54ed-433e-8d40-0173a9dbbfbc" - } - ] - }, - { - "linkId": "cc502a45-030f-4729-8ac8-3c982a43e379", - "type": "display", - "text": "Kløe i huden", - "required": false, - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ], - "code": [ - { - "code": "1", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "7c01e07f-58d2-43b0-8c87-0ddf595d49e9" - } - ] - }, - { - "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "operator": "exists" - } - ], - "text": "Viktiget", - "code": [ - { - "code": "2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "9bd380fc-8ca3-4fba-8a32-8d44f62a5645" - } - ] - }, - { - "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "926cc2a7-1853-46e6-8e98-cb3405730292", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet", - "code": [ - { - "code": "3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "6344dcf1-ff0b-4dd0-8f07-3b9c54172155" - } - ] - } - ] + "linkId": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", + "type": "string", + "text": "Kan du si litt mer om sykdommen din?", + "required": false } - ] + ], + "required": false }, { - "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", + "linkId": "2e71aeb8-aa1c-4bc4-b3a9-b82ed16acc28", "type": "group", - "text": "Oppsummering med uten grupper, men display?", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary-container" - } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], + "text": "Oppsummering", "item": [ { - "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", + "linkId": "2f566ffe-3f0c-4b3b-8b55-bdcb8aaea08b", "type": "group", - "text": "Oppsummering Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", - "required": false, + "text": "Oppsummering Table-HN1", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", @@ -764,391 +123,189 @@ "coding": [ { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-HN2" + "code": "table-hn1" } ] } } ], - "code": [ - { - "code": "1", - "display": "Sykdom", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" - }, - { - "code": "3", - "display": "Alvorlighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" - }, - { - "code": "ND", - "display": "NumericDescending", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" - }, - { - "code": "2", - "display": "Column 2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "id": "02f9fe7f-515f-4b0a-c7c3-e4a1b1bf0231" - } - ], "item": [ { - "linkId": "d2efd364-d243-4967-d4cb-b1e9d1c280d7", - "type": "display", - "text": "Hoven i beina", - "code": [ - { - "system": "urn:uuid:8c5cd387-b773-4c60-8f2b-cd9d343cc4f9", - "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403" - } - ], - "required": false, - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "de7218bb-b70c-421c-c582-529c4d4acecb", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" + "linkId": "b0c00973-36bd-49ad-92cf-887bbcf6f9b6", + "type": "group", + "text": "Personalia", + "item": [ + { + "linkId": "fd70929b-7421-4f59-8c0d-d86366d260c7", + "type": "string", + "text": "Hva heter du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "operator": "exists" - }, - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ], - "text": "Viktighet", - "enableBehavior": "all" - }, - { - "linkId": "d5425b30-bb33-43f3-8431-4470500b924d", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "operator": "exists" - }, - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='855afb10-1dd5-46d4-ab56-d8b8587323a4').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "855afb10-1dd5-46d4-ab56-d8b8587323a4", + "operator": "exists" + } + ] + }, + { + "linkId": "5a85ef28-51a0-45d7-899f-c87f7384a03e", + "type": "string", + "text": "Hvor gammel er du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='314166c1-cb72-4c67-b0a9-d90581d658ad').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "314166c1-cb72-4c67-b0a9-d90581d658ad", + "operator": "exists" + } + ] } ], - "readOnly": true, - "text": "Alvorlighet", - "enableBehavior": "all" - }, - { - "linkId": "8fa24260-704e-466a-820e-ef9e413eec0f", - "type": "display", - "text": "Kløe i huden", - "required": false, - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] + "required": false }, { - "linkId": "f6ca7b70-9e2d-4268-85e4-6e4808df3363", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" + "linkId": "765cc891-f702-4361-8a5f-719bcb26ec34", + "type": "group", + "text": "Sykdommer", + "item": [ + { + "linkId": "0388ed83-02a8-4660-80e3-d05208bb1dea", + "type": "string", + "text": "Har du hjertesykdommer?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "operator": "exists" - }, - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ], - "text": "Viktiget" - }, - { - "linkId": "2869b482-0477-4004-f13c-f17f0ec6e5b2", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "926cc2a7-1853-46e6-8e98-cb3405730292", - "operator": "exists" - }, - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='3cf13e1a-a775-42cc-8182-babde16743aa').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "3cf13e1a-a775-42cc-8182-babde16743aa", + "operator": "exists" + } + ] + }, + { + "linkId": "de1df328-4b5d-4831-90c0-e2fd7993067a", + "type": "string", + "text": "Hvilke sykdommer har du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e32a3b49-42df-4394-9560-2cf48155e182').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "e32a3b49-42df-4394-9560-2cf48155e182", + "operator": "exists" + } + ] + }, + { + "linkId": "7789abe2-0594-4896-d930-e271972d13cd", + "type": "string", + "text": "Kan du si litt mer om sykdommen din?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='8caedfdb-dee1-47eb-8ee0-9c451fb4fb57').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", + "operator": "exists" + } + ] } ], - "readOnly": true, - "text": "Alvorlighet", - "enableBehavior": "all" + "required": false } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-2", - "display": "SOT-2" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-3", - "display": "SOT-3" + ], + "required": false } ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false + "required": false } ] } diff --git a/src/util/extension.ts b/src/util/extension.ts index 3e3e1848..85c3752c 100644 --- a/src/util/extension.ts +++ b/src/util/extension.ts @@ -182,15 +182,15 @@ const hasCode = (code: string | undefined): code is string => { return !!code; }; -const isTableCode = (code: string): code is TableCodes => { - return TABLE_CODES_VALUES.includes(code as TableCodes); +const isTableCode = (code: TABLE_CODES_VALUES): code is TABLE_CODES_VALUES => { + return Object.values(TableCodes).includes(code); }; -export const getCodingTextTableValues = (item: QuestionnaireItem): TableCodes[] => { +export const getCodingTextTableValues = (item: QuestionnaireItem): TABLE_CODES_VALUES[] => { const extension = getItemControlExtensionValue(item); const codeValues = extension - ?.map(x => x.code) + ?.map(x => x.code as TABLE_CODES_VALUES) .filter(hasCode) .filter(isTableCode) || []; return codeValues; diff --git a/src/util/index.ts b/src/util/index.ts index 02a71554..07ee8c09 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -38,7 +38,7 @@ import Constants from '../constants/index'; import ItemType from '../constants/itemType'; import itemType from '../constants/itemType'; import { RenderOptionCode } from '../constants/renderOptionCode'; -import { TABLE_CODES_VALUES } from '../constants/tableTypes'; +import { TableCodes } from '../constants/tableTypes'; import { Resources } from '../util/resources'; function openNewIfAbsolute(url: string): string { @@ -49,8 +49,14 @@ function openNewIfAbsolute(url: string): string { return '_self'; } export const isTableCode = (extensionCode: string | string[]): boolean => { - const isTable = TABLE_CODES_VALUES.some(value => { - return extensionCode.indexOf(value) === -1 ? false : true; + let lowerCode: string | string[] = ''; + if (Array.isArray(extensionCode)) { + lowerCode = extensionCode.map(code => code.toLocaleLowerCase()); + } else { + lowerCode = extensionCode.toLowerCase(); + } + const isTable = Object.values(TableCodes).some(value => { + return lowerCode.indexOf(value.toLocaleLowerCase()) === -1 ? false : true; }); return isTable; }; From 75e7350158b9a935d7d7a7417ef3281c537e68d9 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:35:25 +0100 Subject: [PATCH 08/83] table-hn1 and table-hn2 --- src/components/formcomponents/table/Table.tsx | 17 +- .../formcomponents/table/tables/TableHn1.tsx | 54 - .../formcomponents/table/tables/constants.ts | 4 + .../formcomponents/table/tables/helpers.ts | 339 ----- .../table/tables/table-hn1/TableHn1.tsx | 35 + .../table/tables/table-hn1/interface.ts | 13 + .../table/tables/table-hn1/utils.ts | 53 + .../table/tables/{ => table-hn2}/TableHn2.tsx | 31 +- .../table/tables/table-hn2/interface.ts | 14 + .../table/tables/table-hn2/utils.ts | 85 ++ .../formcomponents/table/tables/utils.ts | 295 +++++ src/components/index.tsx | 3 - src/constants/codingsystems.ts | 4 + src/preview/FormFillerPreview.tsx | 7 +- src/preview/resources/referoResources.tsx | 1 + src/preview/skjema/kun_qest.json | 55 +- src/preview/skjema/kun_qest_hn2.json | 1146 +++++++++++++++++ src/preview/skjema/kun_qest_repeatable.json | 619 +++++++++ src/preview/styles/skjemautfyller.scss | 10 + src/util/fhirpathHelper.ts | 6 +- src/util/index.ts | 6 +- src/util/map-props.ts | 4 - 22 files changed, 2364 insertions(+), 437 deletions(-) delete mode 100644 src/components/formcomponents/table/tables/TableHn1.tsx create mode 100644 src/components/formcomponents/table/tables/constants.ts delete mode 100644 src/components/formcomponents/table/tables/helpers.ts create mode 100644 src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx create mode 100644 src/components/formcomponents/table/tables/table-hn1/interface.ts create mode 100644 src/components/formcomponents/table/tables/table-hn1/utils.ts rename src/components/formcomponents/table/tables/{ => table-hn2}/TableHn2.tsx (67%) create mode 100644 src/components/formcomponents/table/tables/table-hn2/interface.ts create mode 100644 src/components/formcomponents/table/tables/table-hn2/utils.ts create mode 100644 src/components/formcomponents/table/tables/utils.ts create mode 100644 src/preview/skjema/kun_qest_hn2.json create mode 100644 src/preview/skjema/kun_qest_repeatable.json diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx index 1030cf55..686abc42 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/Table.tsx @@ -7,13 +7,16 @@ import { Coding, Questionnaire, QuestionnaireItem, + QuestionnaireItemEnableWhen, QuestionnaireResponse, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, } from '../../../types/fhir'; -import TableHn1 from './tables/TableHn1'; -import TableHn2 from './tables/TableHn2'; +import LanguageLocales from '@helsenorge/core-utils/constants/languages'; + +import TableHn1 from './tables/table-hn1/TableHn1'; +import TableHn2 from './tables/table-hn2/TableHn2'; import { NewValueAction } from '../../../actions/newValue'; import { TABLE_CODES_VALUES, TableCodes } from '../../../constants/tableTypes'; import { GlobalState } from '../../../reducers'; @@ -25,8 +28,8 @@ import { Resources } from '../../../util/resources'; export interface Props { item: QuestionnaireItem; - questionnaire?: Questionnaire; - answer: QuestionnaireResponseItemAnswer; + questionnaire?: Questionnaire | null; + answer?: QuestionnaireResponseItemAnswer | null; responseItem: QuestionnaireResponseItem; dispatch?: ThunkDispatch; path: Array; @@ -36,7 +39,7 @@ export interface Props { resources?: Resources; headerTag?: number; attachmentErrorMessage?: string; - repeatButton: JSX.Element; + repeatButton?: JSX.Element; id?: string; renderContext: RenderContext; renderHelpButton: () => JSX.Element; @@ -51,6 +54,7 @@ interface EnhancedProps { items: QuestionnaireItem[]; tableType: TABLE_CODES_VALUES; questionnaireResponse?: QuestionnaireResponse | null; + language: LanguageLocales; } const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { @@ -60,7 +64,7 @@ const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResp return ( <>

{headline}

- + ); case TableCodes.tableHn2: @@ -99,6 +103,7 @@ const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { items: group.item ?? [], tableType, questionnaireResponse: getFormData(state)?.Content, + language: (state.refero.form.Language as LanguageLocales) || LanguageLocales.NORWEGIAN, }; }; export default connect(mapStateToProps)(Table); diff --git a/src/components/formcomponents/table/tables/TableHn1.tsx b/src/components/formcomponents/table/tables/TableHn1.tsx deleted file mode 100644 index 7c3dc45e..00000000 --- a/src/components/formcomponents/table/tables/TableHn1.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import React from 'react'; - -import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; - -import { - HeaderCategory, - Table as HnTable, - SortDirection, - TableBody, - TableCell, - TableHead, - TableHeadCell, - TableRow, -} from '@helsenorge/designsystem-react/components/Table'; - -import { TABLE_HN1_TABLE_TYPES, findCodeForColumnToSortBy, getColumnNames, getTableHN1bodyObject } from './helpers'; - -interface Props { - tableCodesCoding: Coding[]; - items: QuestionnaireItem[]; - questionnaireResponse?: QuestionnaireResponse | null; -} -const TableHn1 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { - const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); - const answerValues = getTableHN1bodyObject(items, questionnaireResponse); - return ( - - {/* - - {getColumnNames(tableCodesCoding).map(column => ( - - {`here ${column}`} - - ))} - - */} - - {answerValues.map(item => ( - - {item.columns.map(({ value, id, type }) => ( - - - {value} - - - ))} - - ))} - - - ); -}; - -export default TableHn1; diff --git a/src/components/formcomponents/table/tables/constants.ts b/src/components/formcomponents/table/tables/constants.ts new file mode 100644 index 00000000..b201add3 --- /dev/null +++ b/src/components/formcomponents/table/tables/constants.ts @@ -0,0 +1,4 @@ +export const DATEFORMATS = { + DATE: 'LL', + DATETIME: 'LLL', +}; diff --git a/src/components/formcomponents/table/tables/helpers.ts b/src/components/formcomponents/table/tables/helpers.ts deleted file mode 100644 index 62edd21d..00000000 --- a/src/components/formcomponents/table/tables/helpers.ts +++ /dev/null @@ -1,339 +0,0 @@ -import * as uuid from 'uuid'; - -import { - Coding, - Quantity, - QuestionnaireItem, - QuestionnaireItemEnableBehaviorCodes, - QuestionnaireItemEnableWhen, - QuestionnaireResponse, - QuestionnaireResponseItem, - QuestionnaireResponseItemAnswer, -} from '../../../../types/fhir'; - -import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; - -import CodingSystems, { TableColumnName, TableOrderingColum } from '../../../../constants/codingsystems'; -import ItemType from '../../../../constants/itemType'; -import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; -import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; -import { Path, enableWhenMatchesAnswer, getQuestionnaireResponseItemWithLinkid, isInGroupContext } from '../../../../util/refero-core'; - -const answerKeyMap = { - [ItemType.TEXT]: 'valueString', - [ItemType.STRING]: 'valueString', - [ItemType.INTEGER]: 'valueInteger', - [ItemType.DECIMAL]: 'valueDecimal', - [ItemType.QUANTITY]: 'valueQuantity', - [ItemType.DATETIME]: 'valueDateTime', - [ItemType.DATE]: 'valueDate', - [ItemType.TIME]: 'valueTime', -}; - -export function getQuestionnaireResponseItemAnswer( - type: string, - result: any -): QuestionnaireResponseItemAnswer | Array { - if (type === ItemType.BOOLEAN) { - return { valueBoolean: result[0] }; - } else if (type === ItemType.CHOICE) { - return { - //TODO: map Coding - valueCoding: result[0].display ?? '', - }; - } - - return result.map((answer: any) => ({ - [answerKeyMap[type] || 'defaultKey']: answer, - })); -} -export const getValueIfDataReceiver = ( - item: QuestionnaireItem, - questionnaireResponse?: QuestionnaireResponse | null -): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined => { - const extension = getCopyExtension(item); - if (extension) { - let result = evaluateFhirpathExpressionToGetString(extension, questionnaireResponse); - if (!!getCalculatedExpressionExtension(item)) { - result = result.map((m: { value: number }) => m.value); - } - return getQuestionnaireResponseItemAnswer(item.type, result); - } - return undefined; -}; - -export function findCodeBySystem(coding: T[], system?: string): T[] { - return coding.filter(code => code.system === system); -} -export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined => { - const code = findCodeBySystem(coding, TableOrderingColum); - const columnsToDisplay = coding?.filter(codeElement => codeElement.system === CodingSystems.TableColumnName); - const codeForSortedColumn = code[0]?.code; - const columnToSortBy = columnsToDisplay?.find(coding => coding?.code === codeForSortedColumn); - return columnToSortBy; -}; - -export const getColumnNames = (coding: Coding[]): string[] => { - return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); -}; - -const getPrimetiveValueFromItemType = ( - type: typeof ItemType[keyof typeof ItemType], - res: QuestionnaireResponseItemAnswer -): string | number | Quantity => { - switch (type) { - case ItemType.TEXT: - case ItemType.STRING: - return res.valueString ?? ''; - case ItemType.INTEGER: - return res.valueInteger ?? 0; - case ItemType.DECIMAL: - return res.valueDecimal ?? 0; - case ItemType.QUANTITY: - return res.valueQuantity ?? ''; - case ItemType.DATETIME: - return res.valueDateTime ?? ''; - case ItemType.DATE: - return res.valueDate ?? ''; - case ItemType.TIME: - return res.valueTime ?? ''; - case ItemType.CHOICE: - return res.valueCoding?.display ?? ''; - default: { - return ''; - } - } -}; -const convertePrimitiveValueToStrings = (value: Array): string[] => value.map(answer => answer.toString()); - -const getValueFromDataReciever = ( - type: typeof ItemType[keyof typeof ItemType], - questionnaireAnswer?: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] -): Array => { - if (questionnaireAnswer === undefined) { - return []; - } - const answerArray: Array = []; - if (Array.isArray(questionnaireAnswer)) { - questionnaireAnswer.forEach(answer => { - const primetiveAnswerValue = getPrimetiveValueFromItemType(type, answer); - answerArray.push(primetiveAnswerValue); - }); - } else { - const primetiveAnswerValue = getPrimetiveValueFromItemType(type, questionnaireAnswer); - answerArray.push(primetiveAnswerValue); - } - return answerArray; -}; - -const transformAnswersToString = ( - type: typeof ItemType[keyof typeof ItemType], - answer: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] -): string[] => { - const value = getValueFromDataReciever(type, answer); - if (value.length === 0) { - return []; - } - return convertePrimitiveValueToStrings(value); -}; - -function isEnableWhenEnabled( - enableWhen: QuestionnaireItemEnableWhen[], - enableBehavior: string | undefined, - path: Path[], - responseItems: QuestionnaireResponseItem[] -): boolean { - const enableMatches: Array = []; - enableWhen.forEach((enableWhen: QuestionnaireItemEnableWhen) => { - const enableWhenQuestion = enableWhen.question; - for (let i = 0; responseItems && i < responseItems.length; i++) { - let responseItem: QuestionnaireResponseItem | undefined = responseItems[i]; - if (!isInGroupContext(path, responseItem, responseItems)) { - continue; - } - if (responseItem.linkId !== enableWhen.question) { - responseItem = getQuestionnaireResponseItemWithLinkid(enableWhenQuestion, responseItems[i], path); - } - if (!responseItem) { - continue; - } - - const matchesAnswer = enableWhenMatchesAnswer(enableWhen, responseItem.answer); - enableMatches.push(matchesAnswer); - } - }); - return enableBehavior === QuestionnaireItemEnableBehaviorCodes.ALL - ? enableMatches.every(x => x === true) - : enableMatches.some(x => x === true); -} - -/* SORTING */ -const sortTableRows = (table: ITableH2[], columnIndex: number, sortOrder: SortDirection): ITableH2[] => { - return table.sort((a, b) => { - const aValue = a?.row.length > columnIndex ? a?.row[columnIndex]?.text || '' : ''; - const bValue = b?.row.length > columnIndex ? b?.row[columnIndex]?.text || '' : ''; - - return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); - }); -}; - -/* TABLE - HN2 */ -interface ITableH2Row { - id: string; - text: string; -} - -export interface ITableH2 { - id: string; - row: ITableH2Row[]; -} - -export const getTableHN2bodyObject = ( - items: QuestionnaireItem[], - questionnaireResponse?: QuestionnaireResponse | null, - sortColumnIndex?: number, - sortOrder: SortDirection = SortDirection.asc -): ITableH2[] => { - if (!questionnaireResponse || items.length === 0) { - return []; - } - const table = items.reduce((acc: ITableH2[], item) => { - const isDisplayType = item.type === ItemType.DISPLAY; - const newRow: ITableH2Row = { - id: item.linkId, - text: isDisplayType ? item.text ?? '' : '', - }; - - if (isDisplayType) { - if (acc.length && acc[acc.length - 1]?.row.length !== 0) { - acc.push({ id: item.id ?? uuid.v4(), row: [newRow] }); - } else if (!acc.length || acc[acc.length - 1]?.row.length === 0) { - if (!acc.length) { - acc.push({ id: item.id ?? uuid.v4(), row: [] }); - } - acc[acc.length - 1]?.row.push(newRow); - } - } else { - const res = getValueIfDataReceiver(item, questionnaireResponse); - if (res) { - acc[acc.length - 1]?.row.push({ - id: item.linkId, - text: transformAnswersToString(item.type, res).toString(), - }); - } - } - - return acc; - }, []); - return sortColumnIndex ? sortTableRows(table, sortColumnIndex, sortOrder) : table; -}; - -/* TABLE - HN1 */ -export const TABLE_HN1_TABLE_TYPES = { HEADER: 'HEADER', VALUE: 'VALUE' }; -type TableHn1ColumnTypesKey = keyof typeof TABLE_HN1_TABLE_TYPES; -type TableHn1ColumnTypesValue = typeof TABLE_HN1_TABLE_TYPES[TableHn1ColumnTypesKey]; -export interface ITableH1Column { - value?: string; - type: TableHn1ColumnTypesValue; - id: string; -} -export interface ITableH1Row { - id: string; - columns: ITableH1Column[]; -} -export type ITableH1 = ITableH1Row[]; - -const createColumnsFromAnswers = (item: QuestionnaireResponseItem, maxColumns: number): ITableH1Column[] => { - const answerColumns = - item.answer?.map(ans => ({ - value: getPrimetiveValueFromItemType((item as QuestionnaireItem).type, ans).toString(), - type: TABLE_HN1_TABLE_TYPES.VALUE, - id: item.linkId, - })) ?? []; - - const emptyColumnsCount = maxColumns - (answerColumns.length + 1); - - const emptyColumns = Array.from({ length: emptyColumnsCount }, (_, index) => ({ - id: `empty-${item.linkId}-${index + answerColumns.length + 1}`, - type: TABLE_HN1_TABLE_TYPES.VALUE, - value: '', - })); - - return [ - { - id: `${item.linkId}-question`, - type: (item as QuestionnaireItem).type === ItemType.GROUP ? TABLE_HN1_TABLE_TYPES.HEADER : TABLE_HN1_TABLE_TYPES.VALUE, - value: item.text || '', - }, - ...answerColumns, - ...emptyColumns, - ]; -}; - -const transformItemToHN1Row = (item: QuestionnaireResponseItem, maxColumns: number): ITableH1Row => { - const columns = createColumnsFromAnswers(item, maxColumns); - - return { - id: item.linkId, - columns: columns, - }; -}; - -export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): ITableH1 => { - if (!questionnaireResponse || items.length === 0) { - return []; - } - - const answerItems = addAnswerToItems(items, questionnaireResponse); - const maxColumns = findMaxColumns(answerItems); - - const processItems = (items: QuestionnaireResponseItem[], maxColumns: number): ITableH1Row[] => { - return items.reduce((acc: ITableH1Row[], item) => { - const row = transformItemToHN1Row(item, maxColumns); - const newAcc = acc.concat(row); - - const nestedRows = item.item ? processItems(item.item, maxColumns) : []; - return newAcc.concat(nestedRows); - }, []); - }; - - return processItems(answerItems, maxColumns); -}; - -const addAnswerToItems = ( - items: QuestionnaireItem[], - questionnaireResponse?: QuestionnaireResponse | null -): QuestionnaireResponseItem[] => { - if (!questionnaireResponse || items.length === 0) { - return []; - } - - const processItem = (item: QuestionnaireItem): QuestionnaireResponseItem => { - const res = getValueIfDataReceiver(item, questionnaireResponse); - const responseItem: QuestionnaireResponseItem = structuredClone(item); - - if (!Array.isArray(res) && res !== undefined) { - responseItem.answer = [res]; - } else { - responseItem.answer = res; - } - - if (item.item && item.item.length > 0) { - responseItem.item = addAnswerToItems(item.item, questionnaireResponse); - } - - return responseItem; - }; - - return items.map(processItem); -}; - -const findMaxColumns = (items: QuestionnaireResponseItem[]): number => { - const countColumns = (item: QuestionnaireResponseItem): number => { - const columns = 1 + (item.answer?.length || 0); - const maxNestedColumns = item.item?.reduce((max, subItem) => Math.max(max, countColumns(subItem)), 0) || 0; - return Math.max(columns, maxNestedColumns); - }; - - return items.reduce((max, item) => Math.max(max, countColumns(item)), 0); -}; diff --git a/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx b/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx new file mode 100644 index 00000000..60ea8a57 --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx @@ -0,0 +1,35 @@ +import React from 'react'; + +import { QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; + +import { Table as HnTable, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; + +import { TABLE_HN1_TABLE_TYPES } from './interface'; +import { getTableHN1bodyObject } from './utils'; + +interface Props { + items: QuestionnaireItem[]; + questionnaireResponse?: QuestionnaireResponse | null; +} +const TableHn1 = ({ items, questionnaireResponse }: Props): JSX.Element => { + const answerValues = getTableHN1bodyObject(items, questionnaireResponse); + return ( + + + {answerValues.map(item => ( + + {item.columns.map(({ value, id, type }) => ( + + + {value ?? ''} + + + ))} + + ))} + + + ); +}; + +export default TableHn1; diff --git a/src/components/formcomponents/table/tables/table-hn1/interface.ts b/src/components/formcomponents/table/tables/table-hn1/interface.ts new file mode 100644 index 00000000..6b9fd5b2 --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn1/interface.ts @@ -0,0 +1,13 @@ +export const TABLE_HN1_TABLE_TYPES = { HEADER: 'HEADER', VALUE: 'VALUE' }; +type TableHn1ColumnTypesKey = keyof typeof TABLE_HN1_TABLE_TYPES; +type TableHn1ColumnTypesValue = typeof TABLE_HN1_TABLE_TYPES[TableHn1ColumnTypesKey]; +export interface ITableH1Column { + value?: string; + type: TableHn1ColumnTypesValue; + id: string; +} +export interface ITableH1Row { + id: string; + columns: ITableH1Column[]; +} +export type ITableH1 = ITableH1Row[]; diff --git a/src/components/formcomponents/table/tables/table-hn1/utils.ts b/src/components/formcomponents/table/tables/table-hn1/utils.ts new file mode 100644 index 00000000..5dfd4ed2 --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn1/utils.ts @@ -0,0 +1,53 @@ +import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from '../../../../../types/fhir'; + +import { ITableH1, ITableH1Column, ITableH1Row, TABLE_HN1_TABLE_TYPES } from './interface'; +import ItemType from '../../../../../constants/itemType'; +import { addAnswerToItems, filterEnabledQuestionnaireItems, transformAnswersToListOfStrings } from '../utils'; + +export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): ITableH1 => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); + + const answerItems = addAnswerToItems(itemsToShow, questionnaireResponse); + + const processItems = (items: QuestionnaireResponseItem[]): ITableH1Row[] => { + return items.reduce((acc: ITableH1Row[], item) => { + const row = transformItemToHN1Row(item); + const newAcc = acc.concat(row); + + const nestedRows = item.item ? processItems(item.item) : []; + return newAcc.concat(nestedRows); + }, []); + }; + + return processItems(answerItems); +}; + +const createColumnsFromAnswers = (item: QuestionnaireResponseItem): ITableH1Column[] => { + const combinedAnswer = transformAnswersToListOfStrings((item as QuestionnaireItem).type, item.answer || []).join(', '); + + const columns: ITableH1Column[] = [ + { + id: `${item.linkId}-question`, + type: (item as QuestionnaireItem).type === ItemType.GROUP ? TABLE_HN1_TABLE_TYPES.HEADER : TABLE_HN1_TABLE_TYPES.VALUE, + value: item.text || '', + }, + { + value: combinedAnswer, + type: TABLE_HN1_TABLE_TYPES.VALUE, + id: `${item.linkId}-answer`, + }, + ]; + + return columns; +}; +const transformItemToHN1Row = (item: QuestionnaireResponseItem): ITableH1Row => { + const columns = createColumnsFromAnswers(item); + + return { + id: item.linkId, + columns: columns, + }; +}; diff --git a/src/components/formcomponents/table/tables/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx similarity index 67% rename from src/components/formcomponents/table/tables/TableHn2.tsx rename to src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 1aa33199..0ff247be 100644 --- a/src/components/formcomponents/table/tables/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react'; -import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; import { HeaderCategory, @@ -13,7 +13,8 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { ITableH2, findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject } from './helpers'; +import { ITableH2Row } from './interface'; +import { findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject } from './utils'; interface Props { tableCodesCoding: Coding[]; @@ -23,21 +24,21 @@ interface Props { const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { const [sortDir, setSortDir] = useState(SortDirection.asc); const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); + const tableHeader = getColumnNames(tableCodesCoding); + //TODO: find index to sort by - const [responseItems, setResponseItems] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); + const [rows, setRows] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); const handleSort = (): void => { setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); }; - useEffect(() => { - setResponseItems(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); - }, [sortDir, items, questionnaireResponse]); - - return ( - + setRows(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); + }, [sortDir, items, questionnaireResponse, tableHeader.length]); + return rows.length ? ( + - {getColumnNames(tableCodesCoding).map(column => ( + {tableHeader.map(column => ( - {responseItems.map(item => { + {rows.map(item => { return ( - {item.row.map(row => ( - - {row.text} + {item.columns.map(column => ( + + {column.text} ))} @@ -63,6 +64,8 @@ const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JS })} + ) : ( + <> ); }; diff --git a/src/components/formcomponents/table/tables/table-hn2/interface.ts b/src/components/formcomponents/table/tables/table-hn2/interface.ts new file mode 100644 index 00000000..9cf04a5d --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn2/interface.ts @@ -0,0 +1,14 @@ +export interface ITableH2Column { + id: string; + text: string; + index: number; +} + +export interface ITableH2Row { + id: string; + columns: ITableH2Column[]; +} + +export interface ITableH2 { + rows: ITableH2Row; +} diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts new file mode 100644 index 00000000..cbfcaf3d --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -0,0 +1,85 @@ +import * as uuid from 'uuid'; + +import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; + +import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; + +import { ITableH2Row } from './interface'; +import CodingSystems, { TableColumnName, TableOrderingColum } from '../../../../../constants/codingsystems'; +import codeSystems from '../../../../../constants/codingsystems'; +import ItemType from '../../../../../constants/itemType'; +import { filterEnabledQuestionnaireItems, findIndexByCode, getValueIfDataReceiver, transformAnswersToListOfStrings } from '../utils'; + +const getNumberOfColums = (items: QuestionnaireItem[]): number => + Math.max(...items.map(item => findIndexByCode(item, codeSystems.TableColumn))); + +export const getTableHN2bodyObject = ( + items: QuestionnaireItem[], + questionnaireResponse?: QuestionnaireResponse | null, + sortColumnIndex?: number, + sortOrder?: SortDirection +): ITableH2Row[] => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + + const maxColumns = getNumberOfColums(items); + + const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); + + const tableRows: ITableH2Row[] = itemsToShow.reduce((acc, item) => { + const columnIndex = findIndexByCode(item, codeSystems.TableColumn) - 1; + const answer = getValueIfDataReceiver(item, questionnaireResponse) || []; + const columnText = item.type === ItemType.DISPLAY ? item.text || '' : transformAnswersToListOfStrings(item.type, answer).join(', '); + + let row = acc.find(r => r.columns[columnIndex]?.text === ''); + if (!row) { + row = { + id: uuid.v4(), + columns: Array.from({ length: maxColumns }, (_, colIdx) => ({ + id: `empty-${colIdx}`, + text: '', + index: colIdx + 1, + })), + }; + acc.push(row); + } + + row.columns[columnIndex] = { + id: item.linkId, + text: columnText, + index: columnIndex + 1, + }; + + return acc; + }, []); + if (!!sortColumnIndex && !!sortOrder) { + return sortTableRows(tableRows, sortColumnIndex, sortOrder); + } + + return tableRows; +}; + +/* SORTING */ +export const sortTableRows = (table: ITableH2Row[], columnIndex: number, sortOrder: SortDirection): ITableH2Row[] => { + return table.sort((a, b) => { + const aValue = a?.columns.length > columnIndex ? a?.columns[columnIndex]?.text || '' : ''; + const bValue = b?.columns.length > columnIndex ? b?.columns[columnIndex]?.text || '' : ''; + + return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + }); +}; +export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined => { + const code = findCodeBySystem(coding, TableOrderingColum); + const columnsToDisplay = coding?.filter(codeElement => codeElement.system === CodingSystems.TableColumnName); + const codeForSortedColumn = code[0]?.code; + const columnToSortBy = columnsToDisplay?.find(coding => coding?.code === codeForSortedColumn); + return columnToSortBy; +}; +export const getColumnNames = (coding: Coding[]): string[] => { + return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); +}; +//TODO: Dette finnes fra før, kan bruke eksisterende funksjonalitet +export function findCodeBySystem(coding: T[], system?: string): T[] { + return coding.filter(code => code.system === system); +} diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts new file mode 100644 index 00000000..218bd7f0 --- /dev/null +++ b/src/components/formcomponents/table/tables/utils.ts @@ -0,0 +1,295 @@ +import moment from 'moment'; + +import { + Attachment, + Coding, + Quantity, + QuestionnaireItem, + QuestionnaireItemEnableBehaviorCodes, + QuestionnaireItemEnableWhen, + QuestionnaireResponse, + QuestionnaireResponseItem, + QuestionnaireResponseItemAnswer, +} from '../../../../types/fhir'; + +import { parseDate } from '@helsenorge/date-time/components/time-input/date-core'; +import * as DateTimeConstants from '@helsenorge/date-time/constants/datetime'; + +import { DATEFORMATS } from './constants'; +import { CodeSystems } from '../../../../constants/codingsystems'; +import ItemType from '../../../../constants/itemType'; +import { getQuestionnaireItemCodeValue } from '../../../../util/codingsystem'; +import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; +import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; +import { Path, enableWhenMatchesAnswer, getQuestionnaireResponseItemsWithLinkId, isInGroupContext } from '../../../../util/refero-core'; + +function extractValueFromCoding(coding: Coding | undefined, field: keyof Pick = 'display'): string { + if (!coding) return ''; + return coding[field] ?? ''; +} +function extractValueFromQuantity( + quantity: Quantity | undefined, + field: keyof Pick = 'value' +): string | number { + if (!quantity) return ''; + switch (field) { + case 'value': + return quantity.value ?? 0; + case 'unit': + return quantity.unit ?? ''; + case 'system': + return quantity.system ?? ''; + case 'code': + return quantity.code ?? ''; + default: + return ''; + } +} +const extractValueFromDate = (inputValue?: string): string => { + if (!inputValue) { + return ''; + } + const date = parseDate(String(inputValue)); + //TODO: Check if we can use language from state here + return moment(date).locale('nb').format(DATEFORMATS.DATE); +}; +const extractValueFromTime = (inputDate?: string): string => { + if (!inputDate) { + return ''; + } + const date = parseDate(String(inputDate)); + const momentDate = moment(date); + return `${momentDate.hours()}${DateTimeConstants.TIME_SEPARATOR}${momentDate.minutes()}`; +}; +const extractValueFromDateTime = (inputValue?: string): string => { + if (!inputValue) { + return ''; + } + const date = parseDate(String(inputValue)); + //TODO: Check if we can use language from state here + return moment(date).locale('nb').format(DATEFORMATS.DATETIME); +}; + +//TODO: make more cases +const extractValueFromAttachment = ( + inputValue?: Attachment, + field: keyof Pick = 'url' +): string | number => { + if (inputValue) { + switch (field) { + case 'data': + return inputValue.data ?? ''; + case 'url': + return inputValue.url ?? ''; + case 'title': + return inputValue.title ?? ''; + case 'size': + return inputValue.size ?? 0; + case 'contentType': + return inputValue.contentType ?? ''; + case 'language': + return inputValue.language ?? ''; + case 'id': + return inputValue.id ?? ''; + case 'hash': + return inputValue.hash ?? ''; + case 'creation': + return inputValue.creation ?? ''; + + default: + return ''; + } + } else { + return ''; + } +}; + +export const getPrimitiveValueFromItemType = ( + type: typeof ItemType[keyof typeof ItemType], + res: QuestionnaireResponseItemAnswer +): string | number | never => { + switch (type) { + case ItemType.STRING: + case ItemType.TEXT: + return res.valueString ?? ''; + case ItemType.INTEGER: + return res.valueInteger ?? 0; + case ItemType.DECIMAL: + return res.valueDecimal ?? 0; + case ItemType.BOOLEAN: + return res.valueBoolean === true ? 'Ja' : 'Nei' ?? false; + case ItemType.DATE: + return extractValueFromDate(res.valueDate); + case ItemType.DATETIME: + return extractValueFromDateTime(res.valueDateTime); + case ItemType.TIME: + return extractValueFromTime(res.valueTime); + case ItemType.CHOICE: + case ItemType.OPENCHOICE: + return extractValueFromCoding(res.valueCoding, 'display'); + case ItemType.QUANTITY: + return extractValueFromQuantity(res.valueQuantity); + case ItemType.ATTATCHMENT: + return extractValueFromAttachment(res.valueAttachment, 'data'); + default: + return ''; + } +}; +export function getQuestionnaireResponseItemAnswer( + type: typeof ItemType[keyof typeof ItemType], + result: never[] +): QuestionnaireResponseItemAnswer | Array { + switch (type) { + case ItemType.BOOLEAN: + return result.map(bool => ({ valueBoolean: bool })); + case ItemType.CHOICE: + case ItemType.OPENCHOICE: + return result.map(coding => ({ valueCoding: coding })); + case ItemType.QUANTITY: + return result.map(quantity => ({ valueQuantity: quantity })); + case ItemType.TEXT: + case ItemType.STRING: + return result.map(text => ({ valueString: text })); + case ItemType.INTEGER: + return result.map(integer => ({ valueInteger: integer })); + case ItemType.DECIMAL: + return result.map(decimal => ({ valueDecimal: decimal })); + case ItemType.DATETIME: + return result.map(dateTime => ({ valueDateTime: dateTime })); + case ItemType.DATE: + return result.map(date => ({ valueDate: date })); + case ItemType.TIME: + return result.map(time => ({ valueTime: time })); + case ItemType.ATTATCHMENT: + return result.map(attachment => ({ valueAttachment: attachment })); + default: + return []; + } +} + +export const getAnswerFromDisplayType = ( + item: QuestionnaireItem +): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined => { + return { valueString: item.text }; +}; + +export const getValueIfDataReceiver = ( + item: QuestionnaireItem, + questionnaireResponse?: QuestionnaireResponse | null +): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined => { + const extension = getCopyExtension(item); + + if (extension) { + let result = evaluateFhirpathExpressionToGetString(extension, questionnaireResponse); + if (!!getCalculatedExpressionExtension(item)) { + result = result.map((m: { value: number }) => m.value); + } + return getQuestionnaireResponseItemAnswer(item.type, result); + } + return undefined; +}; + +export const convertValuesToStrings = (values: Array): string[] => values.map(value => value.toString()); + +export const extractValuesFromAnswer = ( + type: typeof ItemType[keyof typeof ItemType], + questionnaireAnswer?: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] +): Array => { + if (questionnaireAnswer === undefined) { + return []; + } + + return Array.isArray(questionnaireAnswer) + ? questionnaireAnswer.map(answer => getPrimitiveValueFromItemType(type, answer)) + : [getPrimitiveValueFromItemType(type, questionnaireAnswer)]; +}; + +export const transformAnswersToListOfStrings = ( + type: typeof ItemType[keyof typeof ItemType], + answer: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] +): string[] => { + const value = extractValuesFromAnswer(type, answer); + if (value.length === 0) { + return []; + } + return convertValuesToStrings(value); +}; + +export const findIndexByCode = (item: QuestionnaireItem, codesystem: CodeSystems['TableColumn']): number => { + const index = getQuestionnaireItemCodeValue(item, codesystem); + return index ? Number(index) : -1; +}; + +/* ENABLE WHEN */ +export const filterEnabledQuestionnaireItems = (items: QuestionnaireItem[], response: QuestionnaireResponse): QuestionnaireItem[] => { + const responseItems = response.item || []; + + const checkItemEnabled = (item: QuestionnaireItem, currentPath: Path[]): boolean => { + if (!item.enableWhen) { + return true; + } + return isConditionEnabled(item.enableWhen, item.enableBehavior, currentPath, responseItems); + }; + + const recursivelyFilterItems = (currentItems: QuestionnaireItem[], currentPath: Path[] = []): QuestionnaireItem[] => { + return currentItems.reduce((filteredItems: QuestionnaireItem[], currentItem: QuestionnaireItem, index) => { + const newPath = currentPath.concat([{ linkId: currentItem.linkId, index }]); + const isCurrentItemEnabled = checkItemEnabled(currentItem, newPath); + + const filteredNestedItems = currentItem.item ? recursivelyFilterItems(currentItem.item, newPath) : []; + + return isCurrentItemEnabled + ? filteredItems.concat([{ ...currentItem, item: filteredNestedItems }]) + : filteredItems.concat(filteredNestedItems); + }, []); + }; + + return recursivelyFilterItems(items); +}; + +export const isConditionEnabled = ( + conditions: QuestionnaireItemEnableWhen[], + behavior: string | undefined, + currentPath: Path[], + responseItems: QuestionnaireResponseItem[] +): boolean => { + const isSingleConditionMet = (condition: QuestionnaireItemEnableWhen): boolean => { + const matchingResponseItem = getQuestionnaireResponseItemsWithLinkId(condition.question, responseItems, true).find(item => + isInGroupContext(currentPath, item, responseItems) + ); + + return matchingResponseItem ? enableWhenMatchesAnswer(condition, matchingResponseItem.answer) : false; + }; + + const conditionMatches = conditions.map(isSingleConditionMet); + return behavior === QuestionnaireItemEnableBehaviorCodes.ALL ? conditionMatches.every(Boolean) : conditionMatches.some(Boolean); +}; + +export const addAnswerToItems = ( + items: QuestionnaireItem[], + questionnaireResponse?: QuestionnaireResponse | null +): QuestionnaireResponseItem[] => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + const processItem = (item: QuestionnaireItem): QuestionnaireResponseItem => { + const res = getValueIfDataReceiver(item, questionnaireResponse); + const clonedItems = structuredClone(item); + const questionnaireResponseItem: QuestionnaireResponseItem = { + ...clonedItems, + }; + if (!Array.isArray(res) && res !== undefined) { + questionnaireResponseItem.answer = [res]; + } else { + questionnaireResponseItem.answer = res; + } + + if (item.item && item.item.length > 0) { + questionnaireResponseItem.item = addAnswerToItems(item.item, questionnaireResponse); + } + + return questionnaireResponseItem; + }; + + return items.map(processItem); +}; diff --git a/src/components/index.tsx b/src/components/index.tsx index 82803138..f636e8ea 100644 --- a/src/components/index.tsx +++ b/src/components/index.tsx @@ -235,9 +235,6 @@ class Refero extends React.Component); } - // console.log('responseItem - index', item); - // if (ItemType.GROUP === item.type && getCodingTextTableValues(item) && isTableCode(getCodingTextTableValues(item))) { - // } renderedItems.push( { loginButton={} syncQuestionnaireResponse validateScriptInjection + language={LanguageLocales.NORWEGIAN} />
) : ( diff --git a/src/preview/resources/referoResources.tsx b/src/preview/resources/referoResources.tsx index cf186a38..195425a5 100644 --- a/src/preview/resources/referoResources.tsx +++ b/src/preview/resources/referoResources.tsx @@ -303,5 +303,6 @@ export const getResources = (language: string) => { linkOpensInNewTab: 'Åpnes i ny fane', nextStep: 'Neste', previousStep: 'Forrige', + openChoiceOption: 'Annet', }; }; diff --git a/src/preview/skjema/kun_qest.json b/src/preview/skjema/kun_qest.json index fb9e7b03..6d0ceba1 100644 --- a/src/preview/skjema/kun_qest.json +++ b/src/preview/skjema/kun_qest.json @@ -1,6 +1,7 @@ { "resourceType": "Questionnaire", "language": "nb-NO", + "id": "292c4322-20d3-4893-a249-a6753994dadd", "status": "draft", "publisher": "NHN", "meta": { @@ -59,12 +60,12 @@ } } ], - "id": "292c4322-20d3-4893-a249-a6753994dadd", "item": [ { "linkId": "4233cb23-aff4-4e72-8c89-41cdc44f8939", "type": "group", "text": "Personalia", + "required": false, "item": [ { "linkId": "855afb10-1dd5-46d4-ab56-d8b8587323a4", @@ -78,13 +79,13 @@ "text": "Hvor gammel er du?", "required": false } - ], - "required": false + ] }, { "linkId": "f6764114-86d9-402d-8e05-aca25f980f5f", "type": "group", "text": "Sykdommer", + "required": false, "item": [ { "linkId": "3cf13e1a-a775-42cc-8182-babde16743aa", @@ -104,13 +105,13 @@ "text": "Kan du si litt mer om sykdommen din?", "required": false } - ], - "required": false + ] }, { "linkId": "2e71aeb8-aa1c-4bc4-b3a9-b82ed16acc28", "type": "group", "text": "Oppsummering", + "required": false, "item": [ { "linkId": "2f566ffe-3f0c-4b3b-8b55-bdcb8aaea08b", @@ -129,11 +130,25 @@ } } ], + "required": false, "item": [ { "linkId": "b0c00973-36bd-49ad-92cf-887bbcf6f9b6", "type": "group", "text": "Personalia", + "required": false, + "enableWhen": [ + { + "question": "855afb10-1dd5-46d4-ab56-d8b8587323a4", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "314166c1-cb72-4c67-b0a9-d90581d658ad", + "operator": "exists", + "answerBoolean": true + } + ], "item": [ { "linkId": "fd70929b-7421-4f59-8c0d-d86366d260c7", @@ -197,13 +212,30 @@ } ] } - ], - "required": false + ] }, { "linkId": "765cc891-f702-4361-8a5f-719bcb26ec34", "type": "group", "text": "Sykdommer", + "required": false, + "enableWhen": [ + { + "question": "3cf13e1a-a775-42cc-8182-babde16743aa", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "e32a3b49-42df-4394-9560-2cf48155e182", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", + "operator": "exists", + "answerBoolean": true + } + ], "item": [ { "linkId": "0388ed83-02a8-4660-80e3-d05208bb1dea", @@ -298,14 +330,11 @@ } ] } - ], - "required": false + ] } - ], - "required": false + ] } - ], - "required": false + ] } ] } diff --git a/src/preview/skjema/kun_qest_hn2.json b/src/preview/skjema/kun_qest_hn2.json new file mode 100644 index 00000000..4f43175c --- /dev/null +++ b/src/preview/skjema/kun_qest_hn2.json @@ -0,0 +1,1146 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "1c90d68d-78d8-4c7b-b5fb-44c165babbcc", + "name": "NHN_Test_tableHN2", + "title": "tableHN2", + "description": "Skjema før time for nyrepasient", + "version": "0.1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + }, + { + "code": "1", + "display": "Kun innbygger selv", + "system": "http://helsenorge.no/fhir/KanUtforesAv" + } + ] + }, + "useContext": [ + { + "code": { + "system": "http://hl7.org/fhir/ValueSet/usage-context-type", + "code": "focus", + "display": "Clinical Focus" + }, + "valueCodeableConcept": { + "coding": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1.8655", + "display": "tableHN2" + } + ] + } + } + ], + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", + "valueReference": { + "reference": "Endpoint/1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ + { + "resourceType": "ValueSet", + "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", + "version": "1.0", + "name": "Viktighet", + "title": "Viktighet", + "date": "2023-03-29T13:43:26.881Z", + "status": "draft", + "publisher": "Viktighet", + "compose": { + "include": [ + { + "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", + "concept": [ + { + "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", + "code": "0", + "display": "0" + }, + { + "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", + "code": "1", + "display": "1" + }, + { + "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", + "code": "2", + "display": "2" + }, + { + "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", + "code": "3", + "display": "3" + }, + { + "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", + "code": "4", + "display": "4" + }, + { + "id": "50e5f8f0-db46-45f9-8fda-67039933756e", + "code": "5", + "display": "5" + }, + { + "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", + "code": "6", + "display": "6" + }, + { + "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", + "code": "7", + "display": "7" + }, + { + "id": "dc888467-ab8b-4412-82ca-0312edcc0695", + "code": "8", + "display": "8" + }, + { + "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", + "code": "9", + "display": "9" + }, + { + "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", + "code": "10", + "display": "10" + } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", + "type": "group", + "text": "Data inn", + "required": false, + "item": [ + { + "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", + "type": "boolean", + "text": "Hoven i beina", + "required": false, + "item": [ + { + "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "type": "choice", + "text": "Viktighet Hoven i beina", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] + } + ] + }, + { + "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "type": "boolean", + "text": "Kløe i huden", + "required": false, + "item": [ + { + "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "type": "choice", + "text": "Viktighet kløe i huden", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } + ] + } + ] + } + ] + }, + { + "linkId": "85bcab33-b84b-4f9f-cd98-6bfa6dedc8c7", + "type": "group", + "text": "Oppsummering med grupper. Innrykk trenger en ikke ta hensyn til, da data blir presentert i tabell. Gruppe benyttes kun til å få inn en verdi i kolonne 1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "c87dc79b-afd8-4ef5-8ebf-1b9d3a6a4d9f" + } + ], + "item": [ + { + "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", + "type": "group", + "text": "Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn2" + } + ] + } + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" + }, + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" + }, + { + "code": "DESC", + "display": "Descending", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" + } + ], + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "exists", + "answerBoolean": true + } + ], + "item": [ + { + "linkId": "268a7080-0067-4cbb-8a4d-8bea26b46296", + "type": "display", + "text": "Hoven i beina", + "code": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403", + "code": "1", + "display": "Sykdom" + } + ], + "required": false, + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", + "type": "choice", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "operator": "exists" + } + ], + "text": "Viktighet", + "code": [ + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "941622c1-0a8d-487d-8214-b7cf9cba6210" + } + ] + }, + { + "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", + "type": "choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "answerBoolean": true, + "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "operator": "exists" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "code": [ + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "4a7d5ffd-54ed-433e-8d40-0173a9dbbfbc" + } + ] + }, + { + "linkId": "cc502a45-030f-4729-8ac8-3c982a43e379", + "type": "display", + "text": "Kløe i huden", + "required": false, + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "7c01e07f-58d2-43b0-8c87-0ddf595d49e9" + } + ] + }, + { + "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", + "type": "choice", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "operator": "exists" + } + ], + "text": "Viktiget", + "code": [ + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "9bd380fc-8ca3-4fba-8a32-8d44f62a5645" + } + ] + }, + { + "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", + "type": "choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "answerBoolean": true, + "question": "926cc2a7-1853-46e6-8e98-cb3405730292", + "operator": "exists" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "code": [ + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "6344dcf1-ff0b-4dd0-8f07-3b9c54172155" + } + ] + } + ] + } + ] + }, + { + "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", + "type": "group", + "text": "Oppsummering med uten grupper, men display?", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "076fe6bd-a31f-47fd-b471-593005d9e25c", + "type": "boolean", + "text": "Hoven i beina", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='147ab493-0186-4a4e-8167-c10c829c09ca').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=" + } + ] + }, + { + "linkId": "94205f06-49ee-4f90-8c7d-5239753f3968", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "question": "076fe6bd-a31f-47fd-b471-593005d9e25c", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "operator": "exists" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "97604dcd-38c1-456d-8f3c-586e59199d58", + "type": "choice", + "text": "Viktighet Hoven i beina", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ + { + "question": "076fe6bd-a31f-47fd-b471-593005d9e25c", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "operator": "exists" + } + ], + "readOnly": true + }, + { + "linkId": "76ef29bc-ab50-4446-9fbd-5c7e67417659", + "type": "boolean", + "text": "Kløe i huden", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='c6cedf0b-70be-40ce-cc41-cff3cbcabc17').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=" + } + ] + }, + { + "linkId": "95541265-2a26-4ad6-8d4a-7f4990fb74e3", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "question": "76ef29bc-ab50-4446-9fbd-5c7e67417659", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "926cc2a7-1853-46e6-8e98-cb3405730292", + "operator": "exists" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "95ba859c-84a8-456f-8f9e-2d95ac75d1ed", + "type": "choice", + "text": "Viktighet kløe i huden", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ + { + "question": "76ef29bc-ab50-4446-9fbd-5c7e67417659", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "operator": "exists" + } + ], + "readOnly": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-2", + "display": "SOT-2" + } + ], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-3", + "display": "SOT-3" + } + ], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + } + ] +} diff --git a/src/preview/skjema/kun_qest_repeatable.json b/src/preview/skjema/kun_qest_repeatable.json new file mode 100644 index 00000000..5593de9a --- /dev/null +++ b/src/preview/skjema/kun_qest_repeatable.json @@ -0,0 +1,619 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "7c79c08e-492d-47fd-bc09-4964645974b5", + "name": "Table_HN1_MultiSvar", + "title": "Mutisvar Table-HN1 Oppsummering", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + } + ] + }, + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + } + ] + } + } + ], + "item": [ + { + "linkId": "e849303c-293b-41c9-9900-1ea3e12b7492", + "type": "group", + "text": "Informasjon", + "required": false, + "item": [ + { + "linkId": "4ced67ca-c9e4-44fd-9339-26c3fe2741bf", + "type": "string", + "text": "Har du barn?", + "required": false + }, + { + "linkId": "b8e63b95-baef-41bb-c141-19ccc1ebb5e2", + "type": "integer", + "text": "Hvor mange barn har du?", + "required": false + }, + { + "linkId": "dc998a35-ee55-4715-85df-e68f117ece30", + "type": "string", + "text": "Skriv navn til barna?", + "required": false, + "repeats": true + }, + { + "linkId": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "type": "boolean", + "text": "Spiser dere grønnsaker?", + "required": false + }, + { + "linkId": "70760537-890f-452e-aa60-07f8534088b0", + "type": "open-choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "d3b04993-a61f-47c9-d5ba-3c5e539f6c47", + "code": "frukt", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Frukt" + } + }, + { + "valueCoding": { + "id": "e95b7df4-0d53-4a16-c677-79dbaf6ab5f1", + "code": "salat", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Salat" + } + }, + { + "valueCoding": { + "id": "e36d6229-1aea-4826-81f7-4dafce056165", + "code": "asparges", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Asparges" + } + }, + { + "valueCoding": { + "id": "9b5f2c33-1d12-4874-8157-07ad382721c1", + "code": "gresskar", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gresskar" + } + }, + { + "valueCoding": { + "id": "40a50872-07af-4ee9-9985-5c0670fed596", + "code": "gulrot", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gulrot" + } + } + ], + "enableWhen": [ + { + "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "operator": "=", + "answerBoolean": true + } + ], + "text": "Hvilke grønnsaker spiser dere?", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ] + } + ] + }, + { + "linkId": "aff40185-28d7-4529-81c9-e73ed058c4c6", + "type": "group", + "text": "Oppsummering", + "required": false, + "item": [ + { + "linkId": "9194f78d-7a87-46ba-815d-44d884139778", + "type": "group", + "text": "Table Oppsummering", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn1" + } + ] + } + } + ], + "item": [ + { + "linkId": "a8d836c1-f893-43ff-a287-393057af2988", + "type": "string", + "text": "Har du barn?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='4ced67ca-c9e4-44fd-9339-26c3fe2741bf').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "4ced67ca-c9e4-44fd-9339-26c3fe2741bf", + "operator": "exists" + } + ] + }, + { + "linkId": "c2e09551-a465-4a1d-832d-0d0130a8665e", + "type": "integer", + "text": "Hvor mange barn har du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='b8e63b95-baef-41bb-c141-19ccc1ebb5e2').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "b8e63b95-baef-41bb-c141-19ccc1ebb5e2", + "operator": "exists" + } + ] + }, + { + "linkId": "93864380-1c99-489d-87c5-1e7e7af3a55d", + "type": "string", + "text": "Skriv navn til barna?", + "required": false, + "repeats": true, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='dc998a35-ee55-4715-85df-e68f117ece30').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "dc998a35-ee55-4715-85df-e68f117ece30", + "operator": "exists" + } + ] + }, + { + "linkId": "5e7bd964-bdc0-4152-a6f8-a9a2e698b45a", + "type": "boolean", + "text": "Spiser dere grønnsaker?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "operator": "=" + } + ] + }, + { + "linkId": "8b86be37-902e-4d6c-8af9-b7625f28c0df", + "type": "open-choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "d3b04993-a61f-47c9-d5ba-3c5e539f6c47", + "code": "frukt", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Frukt" + } + }, + { + "valueCoding": { + "id": "e95b7df4-0d53-4a16-c677-79dbaf6ab5f1", + "code": "salat", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Salat" + } + }, + { + "valueCoding": { + "id": "e36d6229-1aea-4826-81f7-4dafce056165", + "code": "asparges", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Asparges" + } + }, + { + "valueCoding": { + "id": "9b5f2c33-1d12-4874-8157-07ad382721c1", + "code": "gresskar", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gresskar" + } + }, + { + "valueCoding": { + "id": "40a50872-07af-4ee9-9985-5c0670fed596", + "code": "gulrot", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gulrot" + } + } + ], + "enableWhen": [ + { + "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "70760537-890f-452e-aa60-07f8534088b0", + "operator": "exists" + } + ], + "text": "Hvilke grønnsaker spiser dere?", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='70760537-890f-452e-aa60-07f8534088b0').answer.value" + } + ], + "readOnly": true + } + ] + } + ] + }, + { + "linkId": "d9e5938b-f7fc-4f9e-8ba7-fd2e678f77e1", + "type": "group", + "text": "Vanlig oppsummering", + "required": false, + "item": [ + { + "linkId": "5e8bfa58-f5fc-43f2-cadb-460ae03f7886", + "type": "string", + "text": "Har du barn?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='4ced67ca-c9e4-44fd-9339-26c3fe2741bf').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "4ced67ca-c9e4-44fd-9339-26c3fe2741bf", + "operator": "exists" + } + ] + }, + { + "linkId": "54b75fe6-883e-43be-814e-b3b512fbb670", + "type": "integer", + "text": "Hvor mange barn har du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='b8e63b95-baef-41bb-c141-19ccc1ebb5e2').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "b8e63b95-baef-41bb-c141-19ccc1ebb5e2", + "operator": "exists" + } + ] + }, + { + "linkId": "d42eaddb-9233-4c48-f157-4898c1024cbf", + "type": "string", + "text": "Skriv navn til barna?", + "required": false, + "repeats": true, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='dc998a35-ee55-4715-85df-e68f117ece30').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "dc998a35-ee55-4715-85df-e68f117ece30", + "operator": "exists" + } + ] + }, + { + "linkId": "0f8f98c2-a329-4121-94ea-b0f176aad236", + "type": "boolean", + "text": "Spiser dere grønnsaker?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "operator": "=" + } + ] + }, + { + "linkId": "defe3dc7-8780-47ee-9f0e-b3e4640399fc", + "type": "open-choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "d3b04993-a61f-47c9-d5ba-3c5e539f6c47", + "code": "frukt", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Frukt" + } + }, + { + "valueCoding": { + "id": "e95b7df4-0d53-4a16-c677-79dbaf6ab5f1", + "code": "salat", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Salat" + } + }, + { + "valueCoding": { + "id": "e36d6229-1aea-4826-81f7-4dafce056165", + "code": "asparges", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Asparges" + } + }, + { + "valueCoding": { + "id": "9b5f2c33-1d12-4874-8157-07ad382721c1", + "code": "gresskar", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gresskar" + } + }, + { + "valueCoding": { + "id": "40a50872-07af-4ee9-9985-5c0670fed596", + "code": "gulrot", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gulrot" + } + } + ], + "enableWhen": [ + { + "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "70760537-890f-452e-aa60-07f8534088b0", + "operator": "exists" + } + ], + "text": "Hvilke grønnsaker spiser dere?", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='70760537-890f-452e-aa60-07f8534088b0').answer.value" + } + ], + "readOnly": true + } + ] + } + ] +} diff --git a/src/preview/styles/skjemautfyller.scss b/src/preview/styles/skjemautfyller.scss index ac2369fd..bef97053 100644 --- a/src/preview/styles/skjemautfyller.scss +++ b/src/preview/styles/skjemautfyller.scss @@ -263,6 +263,16 @@ background-color: #efe4fd; padding: 1.75rem 2rem; } + &__table_hn1 { + &__heading { + font-weight: bold; + } + } + &__table_hn2 { + &__heading { + font-weight: bold; + } + } } .extra_savebutton_wrapper { diff --git a/src/util/fhirpathHelper.ts b/src/util/fhirpathHelper.ts index 8f8dfec0..2d1d04ba 100644 --- a/src/util/fhirpathHelper.ts +++ b/src/util/fhirpathHelper.ts @@ -17,7 +17,11 @@ export function evaluateFhirpathExpressionToGetDate(item: QuestionnaireItem, fhi export function evaluateFhirpathExpressionToGetString(fhirExtension: Extension, questionnare?: QuestionnaireResponse | null): any { const qCopy = structuredClone(questionnare); - return fhirpath.evaluate(qCopy, fhirExtension.valueString, null, fhirpath_r4_model); + try { + return fhirpath.evaluate(qCopy, fhirExtension.valueString, null, fhirpath_r4_model); + } catch (error) { + return []; + } } export function evaluateExtension(path: string | object, questionnare?: QuestionnaireResponse | null, context?: 'object'): unknown { diff --git a/src/util/index.ts b/src/util/index.ts index 07ee8c09..86140a6c 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -1,9 +1,11 @@ import marked from 'marked'; +import { ComponentClass } from 'react-redux'; import * as uuid from 'uuid'; import { Questionnaire, QuestionnaireResponseItem, QuestionnaireItem, QuestionnaireResponseItemAnswer } from '../types/fhir'; import { isValid, invalidNodes } from '@helsenorge/core-utils/string-utils'; +import { ValidationProps } from '@helsenorge/form/components/form/validation'; import { getQuestionnaireItemCodeValue } from './codingsystem'; import { @@ -31,6 +33,7 @@ import Quantity from '../components/formcomponents/quantity/quantity'; import StringComponent from '../components/formcomponents/string/string'; import Table from '../components/formcomponents/table/Table'; import Text from '../components/formcomponents/text/text'; +import { Props } from '../components/with-common-functions'; import CodingSystemConstants from '../constants/codingsystems'; import ExtensionConstants from '../constants/extensions'; import { HyperlinkTarget } from '../constants/hyperlinkTarget'; @@ -60,10 +63,11 @@ export const isTableCode = (extensionCode: string | string[]): boolean => { }); return isTable; }; + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function getComponentForItem(type: string, extensionCode?: string | string[]) { if (String(type) === itemType.GROUP && !!extensionCode && isTableCode(extensionCode)) { - return Table; + return Table as ComponentClass & Props>; } else if (String(type) === ItemType.GROUP) { return Group; } diff --git a/src/util/map-props.ts b/src/util/map-props.ts index 2b90e3be..bbf6358c 100644 --- a/src/util/map-props.ts +++ b/src/util/map-props.ts @@ -17,10 +17,6 @@ import { getCopyExtension, getCalculatedExpressionExtension } from '../util/exte import { evaluateFhirpathExpressionToGetString } from '../util/fhirpathHelper'; export function mapStateToProps(state: GlobalState, originalProps: Props): Props { - // if (originalProps.item?.type === 'group') { - // console.log('map-props, originalProps.item', originalProps.item); - // console.log('map-props, originalProps.responseItem', originalProps.responseItem); - // } const newAnswer = getValueIfDataReceiver(state, originalProps); if (!originalProps.item || !originalProps.item.enableWhen) { return { ...originalProps, enable: true, ...(newAnswer !== undefined && { answer: newAnswer }) } as Props; From 77ff0f8dd70b314c5a2472b993391c8312852818 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:37:07 +0100 Subject: [PATCH 09/83] updated changes and version in package.json --- CHANGES | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 84d45e7b..5681d20b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.2-beta02 + +--- + +- Added support for table-hn2 and table-hn1 code in summary. + ## 13.2.2-beta01 --- diff --git a/package.json b/package.json index 0470b9e6..f17f8d52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.2-beta01", + "version": "13.2.2-beta02", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 1fcb85f66d06451ce87ced470a9c39106cf925f5 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:04:53 +0100 Subject: [PATCH 10/83] version --- CHANGES | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 5681d20b..d41c3f3f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -## 13.2.2-beta02 +## 13.2.2-beta04 --- diff --git a/package.json b/package.json index f17f8d52..7cb22906 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.2-beta02", + "version": "13.2.2-beta04", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From fb9e8ed4d309f6bab5b8b6c81bd2513f1cf6b655 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:07:42 +0100 Subject: [PATCH 11/83] version --- CHANGES | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d41c3f3f..5fa58edc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.2-beta05 + +--- + +- correct version + ## 13.2.2-beta04 --- diff --git a/package.json b/package.json index 7cb22906..6bac3d56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.2-beta04", + "version": "13.2.2-beta05", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 6c1231bb998d43b66c47860cbbf857f3b8744a79 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:15:54 +0100 Subject: [PATCH 12/83] fixed missing mock in tests --- CHANGES | 6 ++++++ config/setupTests.js | 2 ++ package-lock.json | 17 +++++++++++++++-- package.json | 3 ++- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 5fa58edc..76370f33 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.2-beta06 + +--- + +- added package to mock structuredClone in tests + ## 13.2.2-beta05 --- diff --git a/config/setupTests.js b/config/setupTests.js index 8987c1f4..7a717932 100644 --- a/config/setupTests.js +++ b/config/setupTests.js @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/no-var-requires */ 'use strict'; +import structuredClone from '@ungap/structured-clone'; // eslint-disable-next-line @typescript-eslint/no-empty-function global.define = () => {}; @@ -14,3 +15,4 @@ var _enzymeAdapterReact2 = _interopRequireDefault(_enzymeAdapterReact); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +global.structuredClone = global.structuredClone || structuredClone; diff --git a/package-lock.json b/package-lock.json index 549e0129..1a0b1626 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@helsenorge/refero", - "version": "13.2.2-beta01", + "version": "13.2.2-beta05", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@helsenorge/refero", - "version": "13.2.2-beta01", + "version": "13.2.2-beta05", "license": "MIT", "dependencies": { "@types/react-collapse": "^5.0.1", @@ -51,6 +51,7 @@ "@types/yargs": "^17.0.24", "@typescript-eslint/eslint-plugin": "^5.12.0", "@typescript-eslint/parser": "^5.12.0", + "@ungap/structured-clone": "^1.2.0", "@vitejs/plugin-react": "^4.2.1", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "babel-jest": "^27.4.2", @@ -4400,6 +4401,12 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/@vitejs/plugin-react": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz", @@ -18051,6 +18058,12 @@ "eslint-visitor-keys": "^3.0.0" } }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "@vitejs/plugin-react": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz", diff --git a/package.json b/package.json index 6bac3d56..725833ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.2-beta05", + "version": "13.2.2-beta06", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" @@ -76,6 +76,7 @@ "@types/yargs": "^17.0.24", "@typescript-eslint/eslint-plugin": "^5.12.0", "@typescript-eslint/parser": "^5.12.0", + "@ungap/structured-clone": "^1.2.0", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "babel-jest": "^27.4.2", "babel-loader": "^8.2.3", From c3f48b285fc1173f981c9fb3e9817bc77020361c Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:30:17 +0100 Subject: [PATCH 13/83] Tests for table --- src/components/formcomponents/table/Table.tsx | 1 - .../table/tables/__tests__/utils-spec.ts | 345 ++++++++++++++++++ .../table-hn1/__tests__/hn1-utils-spec.ts | 166 +++++++++ .../table/tables/table-hn1/utils.ts | 4 +- .../table/tables/table-hn2/TableHeadHn2.tsx | 40 ++ .../table/tables/table-hn2/TableHn2.tsx | 44 +-- .../table/tables/table-hn2/utils.ts | 26 +- .../formcomponents/table/tables/utils.ts | 5 +- src/preview/FormFillerPreview.tsx | 2 +- 9 files changed, 588 insertions(+), 45 deletions(-) create mode 100644 src/components/formcomponents/table/tables/__tests__/utils-spec.ts create mode 100644 src/components/formcomponents/table/tables/table-hn1/__tests__/hn1-utils-spec.ts create mode 100644 src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx index 686abc42..895d9eac 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/Table.tsx @@ -7,7 +7,6 @@ import { Coding, Questionnaire, QuestionnaireItem, - QuestionnaireItemEnableWhen, QuestionnaireResponse, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, diff --git a/src/components/formcomponents/table/tables/__tests__/utils-spec.ts b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts new file mode 100644 index 00000000..3dd29a9d --- /dev/null +++ b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts @@ -0,0 +1,345 @@ +import { + QuestionnaireResponseItemAnswer, + QuestionnaireItemEnableWhen, + QuestionnaireItemEnableBehaviorCodes, + QuestionnaireItem, + QuestionnaireResponse, +} from '../../../../../types/fhir'; +import ItemType from '../../../../../constants/itemType'; +import { extractValuesFromAnswer, getPrimitiveValueFromItemType, getQuestionnaireResponseItemAnswer, isConditionEnabled } from '../utils'; +import * as questionnaireFunctions from '../utils'; + +import * as fhirUtils from '../../../../../util/refero-core'; + +jest.mock('../../../../../util/refero-core'); + +describe('getPrimitiveValueFromItemType', () => { + it('Should return value based on type', () => { + const answer: QuestionnaireResponseItemAnswer = { valueString: 'test' }; + const response = getPrimitiveValueFromItemType(ItemType.TEXT, answer); + expect(response).toEqual('test'); + }); +}); +describe('getQuestionnaireResponseItemAnswer', () => { + it('Should return QuestionnaireResponseItemAnswer based on type and result', () => { + // @ts-ignore + const answer: never[] = ['test']; + const response = getQuestionnaireResponseItemAnswer(ItemType.TEXT, answer); + const expected: QuestionnaireResponseItemAnswer[] = [{ valueString: 'test' }]; + expect(response).toEqual(expected); + }); +}); + +// Mocks for dependent functions + +describe('isConditionEnabled', () => { + beforeEach(() => { + jest.clearAllMocks(); + (fhirUtils.getQuestionnaireResponseItemsWithLinkId as jest.Mock).mockImplementation(() => [ + { linkId: 'e32a3b49-42df-4394-9560-2cf48155e182', text: 'Hvilken sykdom har du?', answer: [{ valueString: 'dfg' }] }, + ]); + (fhirUtils.isInGroupContext as jest.Mock).mockImplementation(() => true); + (fhirUtils.enableWhenMatchesAnswer as jest.Mock).mockImplementation(() => true); + }); + + it('should return true if single condition is met and behavior is ANY', () => { + const conditions: QuestionnaireItemEnableWhen[] = [ + { answerBoolean: true, question: 'e32a3b49-42df-4394-9560-2cf48155e182', operator: 'exists' } as QuestionnaireItemEnableWhen, + ]; + + const behavior = QuestionnaireItemEnableBehaviorCodes.ANY; + const currentPath: fhirUtils.Path[] = []; + const responseItems = [ + { + linkId: '4233cb23-aff4-4e72-8c89-41cdc44f8939', + text: 'Personalia', + item: [ + { linkId: '855afb10-1dd5-46d4-ab56-d8b8587323a4', text: 'Hva heter du?', answer: [{ valueString: 'sdf' }] }, + { linkId: '314166c1-cb72-4c67-b0a9-d90581d658ad', text: 'Hvor gammel er du?', answer: [{ valueString: 'sdf' }] }, + ], + }, + { + linkId: 'f6764114-86d9-402d-8e05-aca25f980f5f', + text: 'Sykdommer', + item: [ + { linkId: '3cf13e1a-a775-42cc-8182-babde16743aa', text: 'Har du hjertesykdom?', answer: [{ valueString: 'dfgd' }] }, + { linkId: 'e32a3b49-42df-4394-9560-2cf48155e182', text: 'Hvilken sykdom har du?', answer: [{ valueString: 'dfg' }] }, + { linkId: '8caedfdb-dee1-47eb-8ee0-9c451fb4fb57', text: 'Kan du si litt mer om sykdommen din?' }, + ], + }, + { + linkId: '2e71aeb8-aa1c-4bc4-b3a9-b82ed16acc28', + text: 'Oppsummering', + item: [ + { + linkId: '2f566ffe-3f0c-4b3b-8b55-bdcb8aaea08b', + text: 'Oppsummering Table-HN1', + item: [ + { + linkId: 'b0c00973-36bd-49ad-92cf-887bbcf6f9b6', + text: 'Personalia', + item: [ + { linkId: 'fd70929b-7421-4f59-8c0d-d86366d260c7', text: 'Hva heter du?' }, + { linkId: '5a85ef28-51a0-45d7-899f-c87f7384a03e', text: 'Hvor gammel er du?' }, + ], + }, + { + linkId: '765cc891-f702-4361-8a5f-719bcb26ec34', + text: 'Sykdommer', + item: [ + { linkId: '0388ed83-02a8-4660-80e3-d05208bb1dea', text: 'Har du hjertesykdom?' }, + { linkId: 'de1df328-4b5d-4831-90c0-e2fd7993067a', text: 'Hvilken sykdom har du?' }, + { linkId: '7789abe2-0594-4896-d930-e271972d13cd', text: 'Kan du si litt mer om sykdommen din?' }, + ], + }, + ], + }, + ], + }, + ]; + + const result = isConditionEnabled(conditions, behavior, currentPath, responseItems); + expect(result).toBe(true); + }); +}); + +describe('extractValuesFromAnswer', () => { + // Test for single answer + it('should extract value from a single answer correctly', () => { + const type = ItemType.STRING; + const singleAnswer: QuestionnaireResponseItemAnswer = { valueString: 'Test Answer' }; + + const result = extractValuesFromAnswer(type, singleAnswer); + + expect(result).toEqual(['Test Answer']); + }); + + it('should extract values from an array of answers correctly', () => { + const type = ItemType.INTEGER; // Another example type + const arrayOfAnswers: QuestionnaireResponseItemAnswer[] = [{ valueInteger: 1 }, { valueInteger: 2 }]; + + const result = extractValuesFromAnswer(type, arrayOfAnswers); + + expect(result).toEqual([1, 2]); + }); + + it('should return an empty array if questionnaireAnswer is undefined', () => { + const type = ItemType.STRING; // Example type + + const result = extractValuesFromAnswer(type, undefined); + + expect(result).toEqual([]); + }); + it('should extract string value correctly', () => { + const type = ItemType.STRING; + const singleAnswer: QuestionnaireResponseItemAnswer = { valueString: 'Test String' }; + + const result = extractValuesFromAnswer(type, singleAnswer); + + expect(result).toEqual(['Test String']); + }); + + it('should extract integer values from an array of answers correctly', () => { + const type = ItemType.INTEGER; + const arrayOfAnswers: QuestionnaireResponseItemAnswer[] = [{ valueInteger: 1 }, { valueInteger: 2 }]; + + const result = extractValuesFromAnswer(type, arrayOfAnswers); + + expect(result).toEqual([1, 2]); + }); + + it('should extract boolean values correctly', () => { + const type = ItemType.BOOLEAN; + const singleAnswer: QuestionnaireResponseItemAnswer = { valueBoolean: true }; + + const result = extractValuesFromAnswer(type, singleAnswer); + + expect(result).toEqual(['Ja']); // Assuming true maps to 'Ja' + }); + + it('should extract date value correctly', () => { + const type = ItemType.DATE; + const singleAnswer: QuestionnaireResponseItemAnswer = { valueDate: '2021-01-01' }; + + const result = extractValuesFromAnswer(type, singleAnswer); + + expect(result).toEqual(['1. januar 2021']); + }); + + it('should extract choice value correctly', () => { + const type = ItemType.CHOICE; + const singleAnswer: QuestionnaireResponseItemAnswer = { valueCoding: { display: 'Choice1' } }; + + const result = extractValuesFromAnswer(type, singleAnswer); + + expect(result).toEqual(['Choice1']); + }); + + it('should return an empty array if questionnaireAnswer is undefined', () => { + const type = ItemType.STRING; + + const result = extractValuesFromAnswer(type, undefined); + + expect(result).toEqual([]); + }); +}); + +describe('addAnswerToItems', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should process single item correctly', () => { + const mockItem: QuestionnaireItem = { + linkId: '1', + text: 'How are you feeling today?', + type: ItemType.STRING, + extension: [ + { + url: 'http://hl7.org/fhir/StructureDefinition/cqf-expression', + valueString: "QuestionnaireResponse.descendants().where(linkId='1').answer.value", + }, + { + url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl', + valueCodeableConcept: { + coding: [ + { + code: 'data-receiver', + system: 'http://hl7.org/fhir/ValueSet/questionnaire-item-control', + }, + ], + }, + }, + ], + }; + const mockResponse: QuestionnaireResponse = { + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { + linkId: '1', + answer: [ + { + valueString: 'I feel good.', + }, + ], + }, + ], + }; + + const result = questionnaireFunctions.addAnswerToItems([mockItem], mockResponse); + + expect(result[0].answer).toEqual([{ valueString: 'I feel good.' }]); + }); + + it('should handle an array of answers correctly', () => { + const mockItem: QuestionnaireItem = { + linkId: '1', + text: 'How are you feeling today?', + type: ItemType.STRING, + extension: [ + { + url: 'http://hl7.org/fhir/StructureDefinition/cqf-expression', + valueString: "QuestionnaireResponse.descendants().where(linkId='1').answer.value", + }, + { + url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl', + valueCodeableConcept: { + coding: [ + { + code: 'data-receiver', + system: 'http://hl7.org/fhir/ValueSet/questionnaire-item-control', + }, + ], + }, + }, + ], + }; + const mockResponse: QuestionnaireResponse = { + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { + linkId: '1', + answer: [{ valueString: 'First Answer' }, { valueString: 'Second Answer' }], + }, + ], + }; + + const result = questionnaireFunctions.addAnswerToItems([mockItem], mockResponse); + + expect(result[0].answer).toEqual([{ valueString: 'First Answer' }, { valueString: 'Second Answer' }]); + }); + + it('should return empty answer array when getValueIfDataReceiver returns undefined', () => { + const mockItem: QuestionnaireItem = { + linkId: '1', + text: 'How are you feeling today?', + type: ItemType.STRING, + extension: [ + { + url: 'http://hl7.org/fhir/StructureDefinition/cqf-expression', + valueString: "QuestionnaireResponse.descendants().where(linkId='1').answer.value", + }, + { + url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl', + valueCodeableConcept: { + coding: [ + { + code: 'data-receiver', + system: 'http://hl7.org/fhir/ValueSet/questionnaire-item-control', + }, + ], + }, + }, + ], + }; + const mockResponse: QuestionnaireResponse = { + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { + linkId: '2', + answer: [{ valueString: 'First Answer' }, { valueString: 'Second Answer' }], + }, + ], + }; + + const result = questionnaireFunctions.addAnswerToItems([mockItem], mockResponse); + + expect(result[0].answer).toEqual([]); + }); +}); + +describe('findIndexByCode', () => { + it('should return index of item with given code', () => { + const item: QuestionnaireItem = { + linkId: '1', + text: 'How are you feeling today?', + type: ItemType.STRING, + code: [ + { + system: 'http://helsenorge.no/fhir/CodeSystem/TableColumn', + code: '1', + display: 'Column 1', + }, + ], + }; + + const result = questionnaireFunctions.findIndexByCode(item, 'http://helsenorge.no/fhir/CodeSystem/TableColumn'); + + expect(result).toEqual(1); + }); + it('should return -1 if not found', () => { + const item: QuestionnaireItem = { + linkId: '1', + text: 'How are you feeling today?', + type: ItemType.STRING, + code: [], + }; + + const result = questionnaireFunctions.findIndexByCode(item, 'http://helsenorge.no/fhir/CodeSystem/TableColumn'); + + expect(result).toEqual(-1); + }); +}); diff --git a/src/components/formcomponents/table/tables/table-hn1/__tests__/hn1-utils-spec.ts b/src/components/formcomponents/table/tables/table-hn1/__tests__/hn1-utils-spec.ts new file mode 100644 index 00000000..105b4205 --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn1/__tests__/hn1-utils-spec.ts @@ -0,0 +1,166 @@ +import itemType from '../../../../../../constants/itemType'; +import { QuestionnaireItem, QuestionnaireResponse } from '../../../../../../types/fhir'; +import { ITableH1Column, TABLE_HN1_TABLE_TYPES } from '../interface'; +import * as hn1Utils from '../utils'; + +describe('HN1 - Utils ', () => { + describe('createColumnsFromAnswers', () => { + it('should return an array of columns from items', () => { + const item = { + linkId: '1', + text: 'text', + type: itemType.GROUP, + answer: [ + { + valueString: 'valueString', + }, + ], + }; + const expected: ITableH1Column[] = [ + { + id: '1-question', + type: TABLE_HN1_TABLE_TYPES.HEADER, + value: 'text', + }, + { + id: '1-answer', + type: TABLE_HN1_TABLE_TYPES.VALUE, + value: '', + }, + ]; + const result = hn1Utils.createColumnsFromAnswers(item); + expect(result).toEqual(expected); + }); + }); + describe('transformItemToHN1Row', () => { + it('should create a table row from items', () => { + const item = { + linkId: '1', + text: 'text', + type: itemType.GROUP, + answer: [ + { + valueString: 'valueString', + }, + ], + }; + const expected = { + id: '1', + columns: [ + { + id: '1-question', + type: TABLE_HN1_TABLE_TYPES.HEADER, + value: 'text', + }, + { + id: '1-answer', + type: TABLE_HN1_TABLE_TYPES.VALUE, + value: '', + }, + ], + }; + const result = hn1Utils.transformItemToHN1Row(item); + expect(result).toEqual(expected); + }); + }); + describe('getTableHN1bodyObject', () => { + it('should return an empty array if no questionnaireResponse', () => { + const items: QuestionnaireItem[] = []; + const questionnaireResponse = null; + const result = hn1Utils.getTableHN1bodyObject(items, questionnaireResponse); + expect(result).toEqual([]); + }); + it('should return an empty array if no items', () => { + const items: QuestionnaireItem[] = []; + const questionnaireResponse: QuestionnaireResponse = { + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { + linkId: '1', + text: 'text', + answer: [ + { + valueString: 'valueString', + }, + ], + }, + ], + }; + const result = hn1Utils.getTableHN1bodyObject(items, questionnaireResponse); + expect(result).toEqual([]); + }); + it('should return an array of rows', () => { + const items: QuestionnaireItem[] = [ + { + linkId: '1', + text: 'text', + type: itemType.GROUP, + }, + { + linkId: '2', + text: 'text 2', + type: itemType.GROUP, + }, + ]; + const questionnaireResponse: QuestionnaireResponse = { + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { + linkId: '1', + text: 'text', + answer: [ + { + valueString: 'valueString', + }, + ], + }, + { + linkId: '2', + text: 'text 2', + answer: [ + { + valueInteger: 12, + }, + ], + }, + ], + }; + const expected = [ + { + id: '1', + columns: [ + { + id: '1-question', + type: TABLE_HN1_TABLE_TYPES.HEADER, + value: 'text', + }, + { + id: '1-answer', + type: TABLE_HN1_TABLE_TYPES.VALUE, + value: '', + }, + ], + }, + { + id: '2', + columns: [ + { + id: '2-question', + type: TABLE_HN1_TABLE_TYPES.HEADER, + value: 'text 2', + }, + { + id: '2-answer', + type: TABLE_HN1_TABLE_TYPES.VALUE, + value: '', + }, + ], + }, + ]; + const result = hn1Utils.getTableHN1bodyObject(items, questionnaireResponse); + expect(result).toEqual(expected); + }); + }); +}); diff --git a/src/components/formcomponents/table/tables/table-hn1/utils.ts b/src/components/formcomponents/table/tables/table-hn1/utils.ts index 5dfd4ed2..4935885f 100644 --- a/src/components/formcomponents/table/tables/table-hn1/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn1/utils.ts @@ -25,7 +25,7 @@ export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireR return processItems(answerItems); }; -const createColumnsFromAnswers = (item: QuestionnaireResponseItem): ITableH1Column[] => { +export const createColumnsFromAnswers = (item: QuestionnaireResponseItem): ITableH1Column[] => { const combinedAnswer = transformAnswersToListOfStrings((item as QuestionnaireItem).type, item.answer || []).join(', '); const columns: ITableH1Column[] = [ @@ -43,7 +43,7 @@ const createColumnsFromAnswers = (item: QuestionnaireResponseItem): ITableH1Colu return columns; }; -const transformItemToHN1Row = (item: QuestionnaireResponseItem): ITableH1Row => { +export const transformItemToHN1Row = (item: QuestionnaireResponseItem): ITableH1Row => { const columns = createColumnsFromAnswers(item); return { diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx new file mode 100644 index 00000000..aa691cf7 --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx @@ -0,0 +1,40 @@ +import React from 'react'; + +import { Coding } from '../../../../../types/fhir'; + +import { HeaderCategory, SortDirection, TableHead, TableHeadCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; + +import { findCodeForColumnToSortBy, getHeaderColumns } from './utils'; + +type Props = { + tableCodesCoding: Coding[]; + sortDir?: SortDirection; + setSortDir: React.Dispatch>; + sortable: boolean; +}; + +const TableHeadHn2 = ({ tableCodesCoding, sortDir, setSortDir, sortable }: Props): JSX.Element => { + const tableHeader = getHeaderColumns(tableCodesCoding); + const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); + const handleSort = (): void => { + setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); + }; + + return ( + + + {tableHeader.map(column => ( + + {column.display} + + ))} + + + ); +}; +export default TableHeadHn2; diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 0ff247be..8ad01338 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -2,19 +2,11 @@ import React, { useEffect, useState } from 'react'; import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; -import { - HeaderCategory, - Table as HnTable, - SortDirection, - TableBody, - TableCell, - TableHead, - TableHeadCell, - TableRow, -} from '@helsenorge/designsystem-react/components/Table'; +import { Table as HnTable, SortDirection, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; import { ITableH2Row } from './interface'; -import { findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject } from './utils'; +import TableHeadHn2 from './TableHeadHn2'; +import { getIndexToSortBy, getTableHN2bodyObject, transformCodingToSortDirection } from './utils'; interface Props { tableCodesCoding: Coding[]; @@ -22,34 +14,16 @@ interface Props { questionnaireResponse?: QuestionnaireResponse | null; } const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { - const [sortDir, setSortDir] = useState(SortDirection.asc); - const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); - const tableHeader = getColumnNames(tableCodesCoding); + const sortIndex = getIndexToSortBy(tableCodesCoding); + const [sortDir, setSortDir] = useState(transformCodingToSortDirection(tableCodesCoding)); + const [rows, setRows] = useState(getTableHN2bodyObject(items, questionnaireResponse, sortIndex, sortDir)); - //TODO: find index to sort by - const [rows, setRows] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); - const handleSort = (): void => { - setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); - }; useEffect(() => { - setRows(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); - }, [sortDir, items, questionnaireResponse, tableHeader.length]); + setRows(getTableHN2bodyObject(items, questionnaireResponse, sortIndex, sortDir)); + }, [sortDir, items, questionnaireResponse]); return rows.length ? ( - - - {tableHeader.map(column => ( - - {column} - - ))} - - + {rows.map(item => { return ( diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index cbfcaf3d..28d8b558 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -61,6 +61,7 @@ export const getTableHN2bodyObject = ( }; /* SORTING */ + export const sortTableRows = (table: ITableH2Row[], columnIndex: number, sortOrder: SortDirection): ITableH2Row[] => { return table.sort((a, b) => { const aValue = a?.columns.length > columnIndex ? a?.columns[columnIndex]?.text || '' : ''; @@ -76,10 +77,31 @@ export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined const columnToSortBy = columnsToDisplay?.find(coding => coding?.code === codeForSortedColumn); return columnToSortBy; }; -export const getColumnNames = (coding: Coding[]): string[] => { - return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); + +type HeaderColumn = { display: string; code?: string }; + +export const getHeaderColumns = (coding: Coding[]): HeaderColumn[] => { + return findCodeBySystem(coding, TableColumnName).map(code => ({ + display: code.display || '', + code: code.code, + })); +}; +export const getCodeFromCodingSystem = (coding: Coding[], codingSystem: string): string | undefined => { + const code = findCodeBySystem(coding, codingSystem); + return code[0]?.code; }; //TODO: Dette finnes fra før, kan bruke eksisterende funksjonalitet export function findCodeBySystem(coding: T[], system?: string): T[] { return coding.filter(code => code.system === system); } + +/* TABLE HEADER */ +export const transformCodingToSortDirection = (coding: Coding[]): SortDirection | undefined => { + const code = getCodeFromCodingSystem(coding, codeSystems.TableOrderingFunctions); + return !!code ? (code === 'ASC' ? SortDirection.asc : SortDirection.desc) : undefined; +}; + +export const getIndexToSortBy = (coding: Coding[]): number | undefined => { + const sortCode = getCodeFromCodingSystem(coding, codeSystems.TableOrderingColum); + return sortCode ? Number(sortCode) - 1 : undefined; +}; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 218bd7f0..e1efcb0e 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -70,8 +70,7 @@ const extractValueFromDateTime = (inputValue?: string): string => { return moment(date).locale('nb').format(DATEFORMATS.DATETIME); }; -//TODO: make more cases -const extractValueFromAttachment = ( +export const extractValueFromAttachment = ( inputValue?: Attachment, field: keyof Pick = 'url' ): string | number => { @@ -198,7 +197,6 @@ export const extractValuesFromAnswer = ( if (questionnaireAnswer === undefined) { return []; } - return Array.isArray(questionnaireAnswer) ? questionnaireAnswer.map(answer => getPrimitiveValueFromItemType(type, answer)) : [getPrimitiveValueFromItemType(type, questionnaireAnswer)]; @@ -223,7 +221,6 @@ export const findIndexByCode = (item: QuestionnaireItem, codesystem: CodeSystems /* ENABLE WHEN */ export const filterEnabledQuestionnaireItems = (items: QuestionnaireItem[], response: QuestionnaireResponse): QuestionnaireItem[] => { const responseItems = response.item || []; - const checkItemEnabled = (item: QuestionnaireItem, currentPath: Path[]): boolean => { if (!item.enableWhen) { return true; diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 0a280076..072fd190 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/kun_qest_repeatable.json'; +import skjema from './skjema/kun_qest_hn2.json'; // import { getResources } from './resources/referoResources'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; From bf9cd062cf0166a7b4bf8b8d187f2c4d2f1320ec Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:44:19 +0100 Subject: [PATCH 14/83] install --- package-lock.json | 147 ++++++++++++++++++++++++++++++++++++- src/util/fhirpathHelper.ts | 3 +- 2 files changed, 146 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2d30dbb..69c48b65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@helsenorge/refero", - "version": "13.2.3-beta01", + "version": "13.2.2-beta06", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@helsenorge/refero", - "version": "13.2.3-beta01", + "version": "13.2.2-beta06", "license": "MIT", "dependencies": { "@types/react-collapse": "^5.0.1", @@ -51,8 +51,8 @@ "@types/yargs": "^17.0.24", "@typescript-eslint/eslint-plugin": "^5.12.0", "@typescript-eslint/parser": "^5.12.0", - "@vitejs/plugin-react": "^4.2.1", "@ungap/structured-clone": "^1.2.0", + "@vitejs/plugin-react": "^4.2.1", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "babel-jest": "^27.4.2", "babel-loader": "^8.2.3", @@ -4407,6 +4407,83 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "node_modules/@vitejs/plugin-react": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz", + "integrity": "sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.5", + "@babel/plugin-transform-react-jsx-self": "^7.23.3", + "@babel/plugin-transform-react-jsx-source": "^7.23.3", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0" + } + }, + "node_modules/@vue/component-compiler-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz", + "integrity": "sha512-97sfH2mYNU+2PzGrmK2haqffDpVASuib9/w2/noxiFi31Z54hW+q3izKQXXQZSNhtiUpAI36uSuYepeBe4wpHQ==", + "dev": true, + "dependencies": { + "consolidate": "^0.15.1", + "hash-sum": "^1.0.2", + "lru-cache": "^4.1.2", + "merge-source-map": "^1.1.0", + "postcss": "^7.0.36", + "postcss-selector-parser": "^6.0.2", + "source-map": "~0.6.1", + "vue-template-es2015-compiler": "^1.9.0" + }, + "optionalDependencies": { + "prettier": "^1.18.2 || ^2.0.0" + } + }, + "node_modules/@vue/component-compiler-utils/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/@vue/component-compiler-utils/node_modules/picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "node_modules/@vue/component-compiler-utils/node_modules/postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "dependencies": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/@vue/component-compiler-utils/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/@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", @@ -17987,6 +18064,70 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "@vitejs/plugin-react": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz", + "integrity": "sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==", + "dev": true, + "requires": { + "@babel/core": "^7.23.5", + "@babel/plugin-transform-react-jsx-self": "^7.23.3", + "@babel/plugin-transform-react-jsx-source": "^7.23.3", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.0" + } + }, + "@vue/component-compiler-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz", + "integrity": "sha512-97sfH2mYNU+2PzGrmK2haqffDpVASuib9/w2/noxiFi31Z54hW+q3izKQXXQZSNhtiUpAI36uSuYepeBe4wpHQ==", + "dev": true, + "requires": { + "consolidate": "^0.15.1", + "hash-sum": "^1.0.2", + "lru-cache": "^4.1.2", + "merge-source-map": "^1.1.0", + "postcss": "^7.0.36", + "postcss-selector-parser": "^6.0.2", + "prettier": "^1.18.2 || ^2.0.0", + "source-map": "~0.6.1", + "vue-template-es2015-compiler": "^1.9.0" + }, + "dependencies": { + "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, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "requires": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + } + }, + "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 + } + } + }, "@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", diff --git a/src/util/fhirpathHelper.ts b/src/util/fhirpathHelper.ts index 2d1d04ba..582f054b 100644 --- a/src/util/fhirpathHelper.ts +++ b/src/util/fhirpathHelper.ts @@ -17,8 +17,9 @@ export function evaluateFhirpathExpressionToGetDate(item: QuestionnaireItem, fhi export function evaluateFhirpathExpressionToGetString(fhirExtension: Extension, questionnare?: QuestionnaireResponse | null): any { const qCopy = structuredClone(questionnare); + const qExt = structuredClone(fhirExtension); try { - return fhirpath.evaluate(qCopy, fhirExtension.valueString, null, fhirpath_r4_model); + return fhirpath.evaluate(qCopy, qExt.valueString, null, fhirpath_r4_model); } catch (error) { return []; } From af32e8492152b954adcec91952947f8e26d00e2e Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:55:55 +0100 Subject: [PATCH 15/83] table-hn2 --- package-lock.json | 36 +- src/components/formcomponents/date/date.tsx | 16 +- src/components/formcomponents/date/time.tsx | 2 +- src/components/formcomponents/group/AsPdf.tsx | 11 + src/components/formcomponents/group/group.tsx | 151 +- .../formcomponents/group/helpers.ts | 66 + src/components/formcomponents/table/Table.tsx | 135 ++ .../formcomponents/table/tables/TableHn1.tsx | 52 + .../formcomponents/table/tables/TableHn2.tsx | 69 + .../formcomponents/table/tables/helpers.ts | 87 ++ src/components/index.tsx | 29 +- src/components/renderForm.tsx | 7 +- src/components/with-common-functions.tsx | 16 +- src/constants/codingsystems.ts | 12 +- src/constants/tableTypes.ts | 3 + src/preview/skjema/kun_qest.json | 1281 ++++++++++++----- src/util/extension.ts | 23 + src/util/fhirpathHelper.ts | 34 +- src/util/index.ts | 44 +- src/util/map-props.ts | 34 +- src/util/refero-core.ts | 14 +- src/util/scoringCalculator.ts | 7 +- 22 files changed, 1552 insertions(+), 577 deletions(-) create mode 100644 src/components/formcomponents/group/AsPdf.tsx create mode 100644 src/components/formcomponents/group/helpers.ts create mode 100644 src/components/formcomponents/table/Table.tsx create mode 100644 src/components/formcomponents/table/tables/TableHn1.tsx create mode 100644 src/components/formcomponents/table/tables/TableHn2.tsx create mode 100644 src/components/formcomponents/table/tables/helpers.ts create mode 100644 src/constants/tableTypes.ts diff --git a/package-lock.json b/package-lock.json index 8c4ff6aa..b2d30dbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3916,9 +3916,9 @@ } }, "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", - "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", + "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", "dev": true, "dependencies": { "@types/react": "*", @@ -12649,9 +12649,9 @@ } }, "node_modules/react-redux": { - "version": "7.2.8", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.8.tgz", - "integrity": "sha512-6+uDjhs3PSIclqoCk0kd6iX74gzrGc3W5zcAjbrFgEdIjRSQObdIwfx80unTkVUYvbQ95Y8Av3OvFHq1w5EOUw==", + "version": "7.2.9", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz", + "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.15.4", @@ -12674,9 +12674,9 @@ } }, "node_modules/react-redux/node_modules/@types/react-redux": { - "version": "7.1.24", - "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.24.tgz", - "integrity": "sha512-7FkurKcS1k0FHZEtdbbgN8Oc6b+stGSfZYjQGicofJ0j4U0qIn/jaSvnP2pLwZKiai3/17xqqxkkrxTgN8UNbQ==", + "version": "7.1.33", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.33.tgz", + "integrity": "sha512-NF8m5AjWCkert+fosDsN3hAlHzpjSiXlVy9EgQEmLoBhaNXbmyeGs/aj5dQzKuF+/q+S7JQagorGDW8pJ28Hmg==", "dev": true, "dependencies": { "@types/hoist-non-react-statics": "^3.3.0", @@ -17589,9 +17589,9 @@ } }, "@types/hoist-non-react-statics": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", - "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", + "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", "dev": true, "requires": { "@types/react": "*", @@ -24169,9 +24169,9 @@ } }, "react-redux": { - "version": "7.2.8", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.8.tgz", - "integrity": "sha512-6+uDjhs3PSIclqoCk0kd6iX74gzrGc3W5zcAjbrFgEdIjRSQObdIwfx80unTkVUYvbQ95Y8Av3OvFHq1w5EOUw==", + "version": "7.2.9", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz", + "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", "dev": true, "requires": { "@babel/runtime": "^7.15.4", @@ -24183,9 +24183,9 @@ }, "dependencies": { "@types/react-redux": { - "version": "7.1.24", - "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.24.tgz", - "integrity": "sha512-7FkurKcS1k0FHZEtdbbgN8Oc6b+stGSfZYjQGicofJ0j4U0qIn/jaSvnP2pLwZKiai3/17xqqxkkrxTgN8UNbQ==", + "version": "7.1.33", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.33.tgz", + "integrity": "sha512-NF8m5AjWCkert+fosDsN3hAlHzpjSiXlVy9EgQEmLoBhaNXbmyeGs/aj5dQzKuF+/q+S7JQagorGDW8pJ28Hmg==", "dev": true, "requires": { "@types/hoist-non-react-statics": "^3.3.0", diff --git a/src/components/formcomponents/date/date.tsx b/src/components/formcomponents/date/date.tsx index 65a11493..51b25b1c 100644 --- a/src/components/formcomponents/date/date.tsx +++ b/src/components/formcomponents/date/date.tsx @@ -1,12 +1,19 @@ import * as React from 'react'; + import moment, { Moment } from 'moment'; import { connect } from 'react-redux'; import { ThunkDispatch } from 'redux-thunk'; + import { QuestionnaireItem, QuestionnaireResponseItemAnswer, QuestionnaireResponseItem, Questionnaire } from '../../../types/fhir'; + import { LanguageLocales } from '@helsenorge/core-utils/constants/languages'; import { DateRangePicker } from '@helsenorge/date-time/components/date-range-picker'; import { parseDate } from '@helsenorge/date-time/components/time-input/date-core'; import { ValidationProps } from '@helsenorge/form/components/form/validation'; + +import { DateDayInput } from './date-day-input'; +import { DateYearMonthInput } from './date-month-input'; +import { DateYearInput } from './date-year-input'; import { NewValueAction, newDateValueAsync } from '../../../actions/newValue'; import ExtensionConstants from '../../../constants/extensions'; import itemControlConstants from '../../../constants/itemcontrol'; @@ -15,14 +22,11 @@ import { getExtension, getItemControlExtensionValue } from '../../../util/extens import { evaluateFhirpathExpressionToGetDate } from '../../../util/fhirpathHelper'; import { getSublabelText } from '../../../util/index'; import { mapStateToProps, mergeProps, mapDispatchToProps } from '../../../util/map-props'; -import { Resources } from '../../../util/resources'; import { Path } from '../../../util/refero-core'; +import { Resources } from '../../../util/resources'; import withCommonFunctions from '../../with-common-functions'; import Label from '../label'; import SubLabel from '../sublabel'; -import { DateDayInput } from './date-day-input'; -import { DateYearMonthInput } from './date-month-input'; -import { DateYearInput } from './date-year-input'; export interface Props { item: QuestionnaireItem; @@ -133,7 +137,7 @@ class DateComponent extends React.Component { return responseItemHasChanged || helpItemHasChanged || resourcesHasChanged || repeats || answerHasChanged; } - render(): JSX.Element | null { + render(): JSX.Element | null { const subLabelText = getSublabelText(this.props.item, this.props.onRenderMarkdown, this.props.questionnaire, this.props.resources); const itemControls = getItemControlExtensionValue(this.props.item); @@ -172,7 +176,7 @@ class DateComponent extends React.Component { helpElement={this.props.renderHelpElement()} onDateValueChange={this.onDateValueChange} maxDate={this.getMaxDate()} - minDate={this.getMinDate()} + minDate={this.getMinDate()} {...this.props} /> ); diff --git a/src/components/formcomponents/date/time.tsx b/src/components/formcomponents/date/time.tsx index 0c505c87..48b2c4fb 100644 --- a/src/components/formcomponents/date/time.tsx +++ b/src/components/formcomponents/date/time.tsx @@ -18,8 +18,8 @@ import { GlobalState } from '../../../reducers'; import { getExtension, getValidationTextExtension } from '../../../util/extension'; import { isReadOnly, isRequired, getId, getSublabelText } from '../../../util/index'; import { mapStateToProps, mergeProps, mapDispatchToProps } from '../../../util/map-props'; -import { Resources } from '../../../util/resources'; import { Path } from '../../../util/refero-core'; +import { Resources } from '../../../util/resources'; import withCommonFunctions from '../../with-common-functions'; import Label from '../label'; import SubLabel from '../sublabel'; diff --git a/src/components/formcomponents/group/AsPdf.tsx b/src/components/formcomponents/group/AsPdf.tsx new file mode 100644 index 00000000..b17b2cb5 --- /dev/null +++ b/src/components/formcomponents/group/AsPdf.tsx @@ -0,0 +1,11 @@ +import React, { ReactNode } from 'react'; + +type Props = { + pdf: boolean; + children: ReactNode; +}; + +const AsPdf = ({ pdf, children }: Props): JSX.Element => { + return <>{pdf ?
{children}
: children}; +}; +export default AsPdf; diff --git a/src/components/formcomponents/group/group.tsx b/src/components/formcomponents/group/group.tsx index 3e25f96c..275ff784 100644 --- a/src/components/formcomponents/group/group.tsx +++ b/src/components/formcomponents/group/group.tsx @@ -8,15 +8,16 @@ import { QuestionnaireItem, QuestionnaireResponseItemAnswer, QuestionnaireRespon import AnchorLink from '@helsenorge/designsystem-react/components/AnchorLink'; +import AsPdf from './AsPdf'; +import { getClassNames, getColumns, getHeaderText, getLocalRenderContextType, isDirectChildOfRenderContextOwner } from './helpers'; import { NewValueAction } from '../../../actions/newValue'; import { RenderContextType } from '../../../constants/renderContextType'; import { GlobalState } from '../../../reducers'; -import { getGroupItemControl } from '../../../util/group-item-control'; -import { renderPrefix, getText, getId } from '../../../util/index'; +import { getText, getId } from '../../../util/index'; import { mapStateToProps, mergeProps, mapDispatchToProps } from '../../../util/map-props'; +import { Path } from '../../../util/refero-core'; import { RenderContext } from '../../../util/renderContext'; import { Resources } from '../../../util/resources'; -import { Path } from '../../../util/refero-core'; import withCommonFunctions from '../../with-common-functions'; export interface Props { @@ -49,7 +50,6 @@ export class Group extends React.Component { constructor(props: Props) { super(props); } - shouldComponentUpdate(nextProps: Props): boolean { const responseItemHasChanged = this.props.responseItem !== nextProps.responseItem; const helpItemHasChanged = this.props.isHelpOpen !== nextProps.isHelpOpen; @@ -58,7 +58,6 @@ export class Group extends React.Component { const resourcesHasChanged = JSON.stringify(this.props.resources) !== JSON.stringify(nextProps.resources); const repeats = this.props.item.repeats ?? false; - return ( responseItemHasChanged || helpItemHasChanged || @@ -69,9 +68,9 @@ export class Group extends React.Component { ); } - renderAllItems = (): JSX.Element => { - const { renderContext } = this.props; - const localRenderContextType = this.getLocalRenderContextType(); + renderAllItems = (item: QuestionnaireItem): JSX.Element => { + const { path, renderContext } = this.props; + const localRenderContextType = getLocalRenderContextType(item); if (localRenderContextType) { switch (localRenderContextType) { @@ -82,24 +81,12 @@ export class Group extends React.Component { switch (renderContext.RenderContextType) { case RenderContextType.Grid: - return this.isDirectChildOfRenderContextOwner() ? this.renderContextTypeGridRow() : this.renderGroup(); + return isDirectChildOfRenderContextOwner(path, item, renderContext) ? this.renderContextTypeGridRow() : this.renderGroup(); default: return this.renderGroup(); } }; - isDirectChildOfRenderContextOwner = (): boolean => { - const { path, item, renderContext } = this.props; - - const myIndex = path.findIndex(p => p.linkId === item.linkId); - if (myIndex > 0) { - const directParentLinkId = path[myIndex - 1].linkId; - return directParentLinkId === renderContext.Owner; - } - - return false; - }; - renderContextTypeGridRow = (): JSX.Element => { const { renderContext, item } = this.props; @@ -137,125 +124,81 @@ export class Group extends React.Component { }; renderContextTypeGrid = (): JSX.Element => { - const { item } = this.props; + const { item, renderChildrenItems, repeatButton, renderDeleteButton, id } = this.props; - const columns = this.getColumns(); + const columns = getColumns(item); const headers = columns.map(c => {c}); headers.unshift({item.text ? item.text : ''}); const newRenderContext = new RenderContext(RenderContextType.Grid, item.linkId, columns); return ( - - + <> +
{headers} - {this.props.renderChildrenItems(newRenderContext)} + {renderChildrenItems(newRenderContext)}
- {this.props.renderDeleteButton('page_refero__deletebutton--margin-top')} - {this.props.repeatButton} -
+ {renderDeleteButton('page_refero__deletebutton--margin-top')} + {repeatButton} + ); }; renderGroup = (): JSX.Element => { + const { + repeatButton, + id, + includeSkipLink, + path, + renderDeleteButton, + item, + questionnaire, + onRenderMarkdown, + resources, + renderHelpElement, + renderChildrenItems, + } = this.props; return ( -
+
{this.renderGroupHeader()} - {this.props.renderHelpElement()} -
- {this.props.renderChildrenItems(new RenderContext())} + {renderHelpElement()} +
+ {renderChildrenItems(new RenderContext())}
- {this.props.includeSkipLink && this.props.path.length === 1 && ( + {includeSkipLink && path.length === 1 && ( - {this.props.resources?.skipLinkText} + {resources?.skipLinkText} )} - {this.props.renderDeleteButton('page_refero__deletebutton--margin-top')} - {this.props.repeatButton} + {renderDeleteButton('page_refero__deletebutton--margin-top')} + {repeatButton}
); }; - getColumns = (): Array => { - const item = this.props.item; - const seenColumns = {}; - const columns: Array = []; - if (!item.item || item.item.length === 0) return columns; - for (const group of item.item) { - if (group.item && group.item.length > 0) { - for (const cell of group.item) { - const key = cell.text || ''; - if (key in seenColumns) continue; - - columns.push(key); - seenColumns[key] = 1; - } - } - } - - return columns; - }; - - getLocalRenderContextType = (): RenderContextType => { - const coding = getGroupItemControl(this.props.item); - if (coding.length > 0) { - switch (coding[0].code) { - case 'grid': - return RenderContextType.Grid; - } - } - return RenderContextType.None; - }; - - getClassNames = (): string => { - const classNames = ['page_refero__component', 'page_refero__component_group']; - const coding = getGroupItemControl(this.props.item); - if (coding.length > 0) { - classNames.push('page_refero__itemControl_' + coding[0].code); - } - - return classNames.join(' '); - }; - - getComponentToValidate = (): undefined => { - return undefined; - }; - - getHeaderText = (): string => { - return ( - renderPrefix(this.props.item) + - ' ' + - getText(this.props.item, this.props.onRenderMarkdown, this.props.questionnaire, this.props.resources) - ); - }; - renderGroupHeader = (): JSX.Element | null => { - if (!getText(this.props.item, this.props.onRenderMarkdown)) { + const { item, questionnaire, onRenderMarkdown, resources, headerTag, renderHelpButton } = this.props; + + if (!getText(item, onRenderMarkdown)) { return null; } - const HeaderTag = `h${this.props.headerTag}` as 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; - const headerText = DOMPurify.sanitize(this.getHeaderText(), { + const HeaderTag = `h${headerTag}` as 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; + const headerText = DOMPurify.sanitize(getHeaderText(item, questionnaire, resources, onRenderMarkdown), { RETURN_TRUSTED_TYPE: true, ADD_ATTR: ['target'], }) as unknown as string; return ( - + <> - {this.props.renderHelpButton()} - + {renderHelpButton()} + ); }; - render(): JSX.Element | null { - const { pdf } = this.props; - - if (pdf) { - return
{this.renderAllItems()}
; - } - - return this.renderAllItems(); + const { pdf, item } = this.props; + return {this.renderAllItems(item)}; } } const withCommonFunctionsComponent = withCommonFunctions(Group); diff --git a/src/components/formcomponents/group/helpers.ts b/src/components/formcomponents/group/helpers.ts new file mode 100644 index 00000000..602cd1f5 --- /dev/null +++ b/src/components/formcomponents/group/helpers.ts @@ -0,0 +1,66 @@ +import { RenderContextType } from '../../../constants/renderContextType'; +import { Questionnaire, QuestionnaireItem } from '../../../types/fhir'; +import { getText, renderPrefix } from '../../../util'; +import { getGroupItemControl } from '../../../util/group-item-control'; +import { Path } from '../../../util/refero-core'; +import { RenderContext } from '../../../util/renderContext'; +import { Resources } from '../../../util/resources'; + +export const getColumns = (item: QuestionnaireItem): Array => { + const seenColumns = {}; + const columns: Array = []; + if (!item.item || item.item.length === 0) return columns; + for (const group of item.item) { + if (group.item && group.item.length > 0) { + for (const cell of group.item) { + const key = cell.text || ''; + if (key in seenColumns) continue; + + columns.push(key); + seenColumns[key] = 1; + } + } + } + + return columns; +}; + +export const getLocalRenderContextType = (item: QuestionnaireItem): RenderContextType => { + const coding = getGroupItemControl(item); + if (coding.length > 0) { + switch (coding[0].code) { + case 'grid': + return RenderContextType.Grid; + } + } + return RenderContextType.None; +}; + +export const isDirectChildOfRenderContextOwner = (path: Path[], item: QuestionnaireItem, renderContext: RenderContext): boolean => { + const myIndex = path.findIndex(p => p.linkId === item.linkId); + if (myIndex > 0) { + const directParentLinkId = path[myIndex - 1].linkId; + return directParentLinkId === renderContext.Owner; + } + + return false; +}; + +export const getClassNames = (item: QuestionnaireItem): string => { + const classNames = ['page_refero__component', 'page_refero__component_group']; + const coding = getGroupItemControl(item); + if (coding.length > 0) { + classNames.push('page_refero__itemControl_' + coding[0].code); + } + + return classNames.join(' '); +}; + +export const getHeaderText = ( + item: QuestionnaireItem, + questionnaire?: Questionnaire, + resources?: Resources, + onRenderMarkdown?: ((item: QuestionnaireItem, markdown: string) => string) | undefined +): string => { + return renderPrefix(item) + ' ' + getText(item, onRenderMarkdown, questionnaire, resources); +}; diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx new file mode 100644 index 00000000..106edbc8 --- /dev/null +++ b/src/components/formcomponents/table/Table.tsx @@ -0,0 +1,135 @@ +import React from 'react'; + +import { connect } from 'react-redux'; +import { ThunkDispatch } from 'redux-thunk'; + +import { + Coding, + Questionnaire, + QuestionnaireItem, + QuestionnaireResponse, + QuestionnaireResponseItem, + QuestionnaireResponseItemAnswer, +} from '../../../types/fhir'; + +import TableHn1 from './tables/TableHn1'; +import { NewValueAction } from '../../../actions/newValue'; +import { TableCodes } from '../../../constants/tableTypes'; +import { GlobalState } from '../../../reducers'; +import { getFormData } from '../../../reducers/form'; +import { getCodingTextTableValues } from '../../../util/extension'; +import { mapStateToProps as mstp } from '../../../util/map-props'; +import { Path } from '../../../util/refero-core'; +import { RenderContext } from '../../../util/renderContext'; +import { Resources } from '../../../util/resources'; +import { Props as MstpProps } from '../../with-common-functions'; +import TableHn2 from './tables/TableHn2'; + +export interface Props { + item: QuestionnaireItem; + questionnaire?: Questionnaire; + answer: QuestionnaireResponseItemAnswer; + responseItem: QuestionnaireResponseItem; + dispatch?: ThunkDispatch; + path: Array; + pdf?: boolean; + includeSkipLink?: boolean; + className?: string; + resources?: Resources; + headerTag?: number; + attachmentErrorMessage?: string; + repeatButton: JSX.Element; + id?: string; + renderContext: RenderContext; + renderHelpButton: () => JSX.Element; + renderHelpElement: () => JSX.Element; + isHelpOpen?: boolean; + onRenderMarkdown?: (item: QuestionnaireItem, markdown: string) => string; +} + +interface EnhancedProps { + headline: string; + tableCodes: Coding[]; + items: QuestionnaireItem[]; + tableType: TableCodes; + questionnaireResponse?: QuestionnaireResponse | null; +} + +const Table = ({ tableCodes, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { + { + switch (tableType) { + case 'table-hn1': + return ( + <> +

{headline}

+ + + ); + case 'table-HN2': + return ( + <> +

{headline}

+ + + ); + default: + return <>{'Nothing found'}; + } + } +}; + +const mapStateToProps = (state: GlobalState, props: Props): MstpProps & EnhancedProps => { + const group = props.item; + //TODO: Fix undefine and null checks + const tableType = getCodingTextTableValues(group)[0]; + + console.log('group', group); + const groupChildren = group.item; + console.log('groupChildren', groupChildren); + + const mappedProps = mstp(state, props); + return { + ...mappedProps, + headline: group.text ?? '', + tableCodes: group.code ?? [], + items: group.item ?? [], + tableType, + questionnaireResponse: getFormData(state)?.Content, + }; +}; +export default connect(mapStateToProps)(Table); +// const renderItem = (item: QuestionnaireItem, tableCodes: Coding[], headline: string): Array => { +// if (isHelpItem(item)) return []; +// if (isHiddenItem(item)) return []; + +// const Comp = getComponentForItem(item.type, getCodingTextTableValues(item)); + +// if (!Comp) { +// return []; +// } + +// let response: Array | undefined; + +// if (responseItem) { +// const childItem = responseItem.item; +// const childAnswer = responseItem.answer; +// const linkId = item.linkId; +// // console.log('childItem', childItem); + +// if (childItem) { +// response = getItemWithIdFromResponseItemArray(linkId, childItem); +// // console.log('response', response); +// } else if (childAnswer) { +// // console.log('childAnswer', childAnswer); + +// response = getItemWithIdFromResponseItemArray(linkId, childAnswer[0].item); +// } +// } +// const renderedItems: Array = []; +// if (response && response.length > 0) { +// response.forEach((responseItem, index) => { +// console.log(responseItem); +// }); +// } +// return renderedItems; +// }; diff --git a/src/components/formcomponents/table/tables/TableHn1.tsx b/src/components/formcomponents/table/tables/TableHn1.tsx new file mode 100644 index 00000000..6f716395 --- /dev/null +++ b/src/components/formcomponents/table/tables/TableHn1.tsx @@ -0,0 +1,52 @@ +import React from 'react'; + +import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; + +import { + HeaderCategory, + Table as HnTable, + SortDirection, + TableBody, + TableCell, + TableHead, + TableHeadCell, + TableRow, +} from '@helsenorge/designsystem-react/components/Table'; + +import { findCodeForColumnToSortBy, getColumnNames, getValueIfDataReceiver } from './helpers'; + +interface Props { + tableCodes: Coding[]; + items: QuestionnaireItem[]; + questionnaireResponse?: QuestionnaireResponse | null; +} +const TableHn1 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { + const res = getValueIfDataReceiver(items[2], questionnaireResponse); + const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); + console.log('questionnaireResponse', questionnaireResponse); + console.log('tableCodes', tableCodes); + console.log('getValueIfDataReceiver', res); + console.log('item', items[2]); + return ( + + + + {getColumnNames(tableCodes).map(column => ( + + {`here ${column}`} + + ))} + + + + {items.map(item => ( + + {item.linkId} + + ))} + + + ); +}; + +export default TableHn1; diff --git a/src/components/formcomponents/table/tables/TableHn2.tsx b/src/components/formcomponents/table/tables/TableHn2.tsx new file mode 100644 index 00000000..34625795 --- /dev/null +++ b/src/components/formcomponents/table/tables/TableHn2.tsx @@ -0,0 +1,69 @@ +import React, { useState } from 'react'; +import ItemType from '../../../../constants/itemType'; +import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; + +import { + HeaderCategory, + Table as HnTable, + SortDirection, + TableBody, + TableCell, + TableHead, + TableHeadCell, + TableRow, +} from '@helsenorge/designsystem-react/components/Table'; + +import { findCodeForColumnToSortBy, getColumnNames, getValueIfDataReceiver } from './helpers'; + +interface Props { + tableCodes: Coding[]; + items: QuestionnaireItem[]; + questionnaireResponse?: QuestionnaireResponse | null; +} +const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { + const [sortDir, setSortDir] = useState(SortDirection.asc); + const res = getValueIfDataReceiver(items[2], questionnaireResponse); + const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); + console.log('questionnaireResponse', questionnaireResponse); + console.log('tableCodes', tableCodes); + console.log('getValueIfDataReceiver', res); + console.log('item', items[2]); + console.log('items', items); + + const handleSort = (): void => { + setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); + }; + return ( + + + + {getColumnNames(tableCodes).map(column => ( + + {column} + + ))} + + + + {items.map(item => { + return item.type === ItemType.DISPLAY ? ( + + {item.text} + + ) : ( + + {item.text} + + ); + })} + + + ); +}; + +export default TableHn2; diff --git a/src/components/formcomponents/table/tables/helpers.ts b/src/components/formcomponents/table/tables/helpers.ts new file mode 100644 index 00000000..710859d9 --- /dev/null +++ b/src/components/formcomponents/table/tables/helpers.ts @@ -0,0 +1,87 @@ +import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItemAnswer } from '../../../../types/fhir'; + +import ItemType from '../../../../constants/itemType'; +import { FormData } from '../../../../reducers/form'; +import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; +import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; +import CodingSystems, { CodeSystemValues, CodeSystems, TableColumnName, TableOrderingColum } from '../../../../constants/codingsystems'; + +export function getQuestionnaireResponseItemAnswer( + type: string, + result: any +): QuestionnaireResponseItemAnswer | Array { + const answerArray: Array = []; + if (type === ItemType.BOOLEAN) { + return { valueBoolean: result[0] }; + } + + result.forEach((answer: any) => { + switch (String(type)) { + case ItemType.TEXT: + case ItemType.STRING: + answerArray.push({ valueString: answer }); + break; + case ItemType.INTEGER: + answerArray.push({ valueInteger: answer }); + break; + case ItemType.DECIMAL: + answerArray.push({ valueDecimal: answer }); + break; + case ItemType.QUANTITY: + answerArray.push({ valueQuantity: answer }); + break; + case ItemType.DATETIME: + answerArray.push({ valueDateTime: answer }); + break; + case ItemType.DATE: + answerArray.push({ valueDate: answer }); + break; + case ItemType.TIME: + answerArray.push({ valueTime: answer }); + break; + default: { + if (typeof answer === 'string') { + answerArray.push({ valueString: answer }); + } else { + answerArray.push({ valueCoding: answer }); + } + } + } + }); + return answerArray; +} +export const getValueIfDataReceiver = ( + item: QuestionnaireItem, + questionnaireResponse?: QuestionnaireResponse | null +): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined => { + const extension = getCopyExtension(item); + if (extension) { + let result = evaluateFhirpathExpressionToGetString(extension, questionnaireResponse); + + if (!!getCalculatedExpressionExtension(item)) { + result = result.map((m: any) => m.value as number); + } + 3; + + return getQuestionnaireResponseItemAnswer(item.type, result); + } + return undefined; +}; + +export const findCodeBySystem = (coding: Coding[], system?: CodeSystemValues): Coding[] => { + return coding?.filter(code => code?.system === system) ?? []; +}; + +export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined => { + const code = findCodeBySystem(coding, TableOrderingColum); + const columnsToDisplay = coding?.filter(codeElement => codeElement.system === CodingSystems.TableColumnName); + const codeForSortedColumn = code[0]?.code; + const columnToSortBy = columnsToDisplay?.find(coding => coding?.code === codeForSortedColumn); + return columnToSortBy; +}; + +export const getColumnNames = (coding: Coding[]): string[] => { + return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); +}; + +export const getTableHN1bodyObject = (items: QuestionnaireItem[]) => {}; diff --git a/src/components/index.tsx b/src/components/index.tsx index 14c83b48..82803138 100644 --- a/src/components/index.tsx +++ b/src/components/index.tsx @@ -3,6 +3,7 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { ThunkDispatch } from 'redux-thunk'; +import { DispatchProps } from '../types/dispatchProps'; import { QuestionnaireResponseItem, Questionnaire, @@ -13,13 +14,12 @@ import { } from '../types/fhir'; import { ReferoProps } from '../types/referoProps'; import { State } from '../types/state'; -import { DispatchProps } from '../types/dispatchProps'; +import RenderForm from './renderForm'; +import StepView from './stepView'; import { setSkjemaDefinition } from '../actions/form'; import { NewValueAction, newQuantityValue, newDecimalValue, newIntegerValue } from '../actions/newValue'; import RepeatButton from '../components/formcomponents/repeat/repeat-button'; -import RenderForm from './renderForm'; -import StepView from './stepView'; import Constants, { NAVIGATOR_BLINDZONE_ID } from '../constants/index'; import ItemType from '../constants/itemType'; import { PresentationButtonsType } from '../constants/presentationButtonsType'; @@ -27,12 +27,16 @@ import { GlobalState } from '../reducers'; import { getFormDefinition, getFormData } from '../reducers/form'; import { FormDefinition, FormData } from '../reducers/form'; import { ActionRequester } from '../util/actionRequester'; -import { getQuestionnaireUnitExtensionValue, getPresentationButtonsExtension, getNavigatorExtension } from '../util/extension'; -import { getComponentForItem, shouldRenderRepeatButton, isHiddenItem, getDecimalValue } from '../util/index'; +import { + getQuestionnaireUnitExtensionValue, + getPresentationButtonsExtension, + getNavigatorExtension, + getCodingTextTableValues, +} from '../util/extension'; +import { getTopLevelElements } from '../util/getTopLevelElements'; import { IE11HackToWorkAroundBug187484 } from '../util/hacks'; +import { getComponentForItem, shouldRenderRepeatButton, isHiddenItem, getDecimalValue } from '../util/index'; import { QuestionniareInspector } from '../util/questionnaireInspector'; -import { RenderContext } from '../util/renderContext'; -import { ScoringCalculator } from '../util/scoringCalculator'; import { getRootQuestionnaireResponseItemFromData, Path, @@ -43,8 +47,9 @@ import { getQuestionnaireDefinitionItem, getResponseItemAndPathWithLinkId, } from '../util/refero-core'; +import { RenderContext } from '../util/renderContext'; +import { ScoringCalculator } from '../util/scoringCalculator'; import { shouldFormBeDisplayedAsStepView } from '../util/shouldFormBeDisplayedAsStepView'; -import { getTopLevelElements } from '../util/getTopLevelElements'; interface StateProps { formDefinition?: FormDefinition | null; @@ -96,7 +101,6 @@ class Refero extends React.Component, item: QuestionnaireItem, answer: QuestionnaireResponseItemAnswer): void => { if (this.props.onChange && newState.refero.form.FormDefinition.Content && newState.refero.form.FormData.Content) { const actionRequester = new ActionRequester(newState.refero.form.FormDefinition.Content, newState.refero.form.FormData.Content); @@ -200,8 +204,7 @@ class Refero extends React.Component { if (isHiddenItem(item)) return []; - - const Comp = getComponentForItem(item.type); + const Comp = getComponentForItem(item.type, getCodingTextTableValues(item)); if (!Comp) { return undefined; } @@ -232,7 +235,9 @@ class Refero extends React.Component
); } - + // console.log('responseItem - index', item); + // if (ItemType.GROUP === item.type && getCodingTextTableValues(item) && isTableCode(getCodingTextTableValues(item))) { + // } renderedItems.push( { +}: RenderFormProps): JSX.Element => { const displayPauseButtonInNormalView = referoProps.onSave ? onSave : undefined; const displayPauseButtonInStepView = displayPreviousButton ? previousStep : undefined; diff --git a/src/components/with-common-functions.tsx b/src/components/with-common-functions.tsx index 3bed535e..2a267d18 100644 --- a/src/components/with-common-functions.tsx +++ b/src/components/with-common-functions.tsx @@ -1,8 +1,7 @@ import * as React from 'react'; -import DOMPurify from 'dompurify'; - import classNames from 'classnames'; +import DOMPurify from 'dompurify'; import { Collapse } from 'react-collapse'; import { ThunkDispatch } from 'redux-thunk'; @@ -26,10 +25,14 @@ import { UploadedFile } from '@helsenorge/file-upload/components/dropzone'; import { FormChild } from '@helsenorge/form/components/form'; import { ValidationProps } from '@helsenorge/form/components/form/validation'; +import DeleteButton from './formcomponents/repeat/delete-button'; +import RepeatButton from './formcomponents/repeat/repeat-button'; +import HelpButton from './help-button/help-button'; import { NewValueAction } from '../actions/newValue'; import itemControlConstants from '../constants/itemcontrol'; import itemType from '../constants/itemType'; import { GlobalState } from '../reducers'; +import { getCodingTextTableValues } from '../util/extension'; import { findHelpItem, isHelpItem, getHelpItemType } from '../util/help'; import { getComponentForItem, getChildHeaderTag, shouldRenderRepeatButton, getText, isHiddenItem } from '../util/index'; import { @@ -42,9 +45,6 @@ import { } from '../util/refero-core'; import { RenderContext } from '../util/renderContext'; import { Resources } from '../util/resources'; -import DeleteButton from './formcomponents/repeat/delete-button'; -import RepeatButton from './formcomponents/repeat/repeat-button'; -import HelpButton from './help-button/help-button'; export interface Props { resources?: Resources; @@ -244,7 +244,7 @@ export default function withCommonFunctions(WrappedComponent: React.Component
@@ -256,7 +256,8 @@ export default function withCommonFunctions(WrappedComponent: React.Component if (isHelpItem(item)) return []; if (isHiddenItem(item)) return []; - const Comp = getComponentForItem(item.type); + const Comp = getComponentForItem(item.type, getCodingTextTableValues(item)); + if (!Comp) { return []; } @@ -267,6 +268,7 @@ export default function withCommonFunctions(WrappedComponent: React.Component const childItem = responseItem.item; const childAnswer = responseItem.answer; const linkId = item.linkId; + // console.log(childAnswer); if (childItem) { response = getItemWithIdFromResponseItemArray(linkId, childItem); diff --git a/src/constants/codingsystems.ts b/src/constants/codingsystems.ts index b6c8eef4..996af202 100644 --- a/src/constants/codingsystems.ts +++ b/src/constants/codingsystems.ts @@ -1,3 +1,13 @@ -export default { +export const TableColumnName = 'http://helsenorge.no/fhir/CodeSystem/TableColumnName'; +export const TableOrderingColum = 'http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn'; +export const TableOrderingFunctions = 'http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions'; + +const codeSystems = { RenderingOptions: 'http://helsenorge.no/fhir/CodeSystem/RenderOptions', + TableColumnName: 'http://helsenorge.no/fhir/CodeSystem/TableColumnName', + TableOrderingColum: 'http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn', + TableOrderingFunctions: 'http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions', }; +export type CodeSystems = keyof typeof codeSystems; +export type CodeSystemValues = typeof codeSystems[keyof typeof codeSystems]; +export default codeSystems; diff --git a/src/constants/tableTypes.ts b/src/constants/tableTypes.ts new file mode 100644 index 00000000..09e5a29b --- /dev/null +++ b/src/constants/tableTypes.ts @@ -0,0 +1,3 @@ +export type TableCodes = 'table-hn' | 'gtable' | 'table' | 'table-hn1' | 'table-HN2'; + +export const TABLE_CODES_VALUES: TableCodes[] = ['table-hn', 'gtable', 'table', 'table-hn1', 'table-HN2']; diff --git a/src/preview/skjema/kun_qest.json b/src/preview/skjema/kun_qest.json index 008a67bd..85b59321 100644 --- a/src/preview/skjema/kun_qest.json +++ b/src/preview/skjema/kun_qest.json @@ -1,617 +1,1154 @@ { "resourceType": "Questionnaire", "language": "nb-NO", - "id": "1000", - "name": "NHN_Skaring", - "title": "Test skåring og utregning gammel og ny", + "id": "1c90d68d-78d8-4c7b-b5fb-44c165babbcc", + "name": "NHN_Test_tableHN2", + "title": "tableHN2", + "description": "Skjema før time for nyrepasient", "version": "0.1", "status": "draft", "publisher": "NHN", "meta": { "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Norsk bokmål" }], - "security": [{ "code": "3", "display": "Helsehjelp", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }] + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + }, + { + "code": "1", + "display": "Kun innbygger selv", + "system": "http://helsenorge.no/fhir/KanUtforesAv" + } + ] }, "useContext": [ { - "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "code": { + "system": "http://hl7.org/fhir/ValueSet/usage-context-type", + "code": "focus", + "display": "Clinical Focus" + }, "valueCodeableConcept": { - "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "code": "P", "display": "Test skåring og utregning gammel og ny" }] + "coding": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1.8655", + "display": "tableHN2" + } + ] } } ], - "contact": [{ "name": "Kontakt Kim ved spørsmål " }], - "subjectType": ["Person"], + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], "extension": [ - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1000" } }, { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-authenticationrequirement", - "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/AuthenticationRequirement", "code": "2" } + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } }, { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-accessibilitytoresponse", - "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/AccessibilityToResponse", "code": "1" } + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } }, { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-canbeperformedby", - "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/CanBePerformedBy", "code": "2" } + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", + "valueReference": { + "reference": "Endpoint/1" + } }, { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-discretion", - "valueCoding": { "system": "http://ehelse.no/fhir/ValueSet/Discretion", "code": "2" } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatenarrative", "valueBoolean": true }, + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-presentationbuttons", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/presentationbuttons", "code": "sticky" } + "resourceType": "ValueSet", + "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", + "version": "1.0", + "name": "Viktighet", + "title": "Viktighet", + "date": "2023-03-29T13:43:26.881Z", + "status": "draft", + "publisher": "Viktighet", + "compose": { + "include": [ + { + "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", + "concept": [ + { + "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", + "code": "0", + "display": "0" + }, + { + "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", + "code": "1", + "display": "1" + }, + { + "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", + "code": "2", + "display": "2" + }, + { + "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", + "code": "3", + "display": "3" + }, + { + "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", + "code": "4", + "display": "4" + }, + { + "id": "50e5f8f0-db46-45f9-8fda-67039933756e", + "code": "5", + "display": "5" + }, + { + "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", + "code": "6", + "display": "6" + }, + { + "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", + "code": "7", + "display": "7" + }, + { + "id": "dc888467-ab8b-4412-82ca-0312edcc0695", + "code": "8", + "display": "8" + }, + { + "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", + "code": "9", + "display": "9" + }, + { + "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", + "code": "10", + "display": "10" + } + ] + } + ] + } } ], - "copyright": "Kim Hoel Halvorsen RN MI", - "date": "2023-06-09T00:00:00+02:00", "item": [ - { "linkId": "1", "text": "Testskjema for kalkulering med seksjonsum, totalsum og eksplisitt angitt sum", "type": "display" }, { - "linkId": "92971daa-c72b-49a3-82f5-3f5c6c696c31", + "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", "type": "group", - "text": "Dagens løsnings som fortsatt skal virke med rar quantity", + "text": "Data inn", + "required": false, "item": [ { - "linkId": "2", - "text": "Symptomer", - "type": "group", - "repeats": false, + "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", + "type": "boolean", + "text": "Hoven i beina", + "required": false, "item": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } - } - ], - "linkId": "2.2", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], - "text": "Kryss av om noen av disse tilstandene gjelder deg", + "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", "type": "choice", - "required": false, - "repeats": false, - "readOnly": false, + "text": "Hvor alvorlig er det?", + "required": true, "answerOption": [ { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", "code": "1", - "display": "Svært medtatt, vansker med å ta til deg væske eller næring" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], - "code": "50", - "display": "Alvorlige pustevansker" + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", "code": "3", - "display": "Brått fall i allmenntilstand" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", "code": "4", - "display": "Petekkier (utslett som ikke lar seg avbleke)" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", "code": "5", - "display": "Nyoppståtte brystsmerter" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" } } + ], + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } ] }, { + "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "type": "choice", + "text": "Viktighet Hoven i beina", "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" } ], - "linkId": "2.3", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], - "text": "Har du noen av følgende sykdommer?", + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] + } + ] + }, + { + "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "type": "boolean", + "text": "Kløe i huden", + "required": false, + "item": [ + { + "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", "type": "choice", - "required": false, - "repeats": false, - "readOnly": false, + "text": "Hvor alvorlig er det?", + "required": true, "answerOption": [ { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", "code": "1", - "display": "Astma" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", "code": "2", - "display": "Kols" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", "code": "3", - "display": "Annen lungesykdom" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } - } - ], - "linkId": "2.4", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], - "text": "Har du noen av disse plagene?", - "type": "choice", - "required": false, - "repeats": false, - "readOnly": false, - "answerOption": [ - { - "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 10 }], - "code": "1", - "display": "Feber" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 10 }], - "code": "2", - "display": "Tørrhoste" + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 10 }], - "code": "3", - "display": "Tungpust" + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" } } + ], + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } ] }, { - "linkId": "2.5", - "text": "Beskriv eventuelle andre luftveisplager du har", - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { + "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "type": "choice", + "text": "Viktighet kløe i huden", "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "system": "http://ehelse.no/Score", "code": "score", "display": "score" } + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" } ], - "linkId": "2.99", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "SS", "display": "Section score" }], - "text": "Seksjonssum gruppe 1", - "type": "quantity", - "required": false, - "repeats": false, - "readOnly": true - } - ] - }, - { - "linkId": "4", - "text": "Resultat", - "type": "group", - "repeats": false, - "item": [ - { - "extension": [ + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "system": "http://ehelse.no/Score", "code": "score", "display": "score" } + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true } - ], - "linkId": "4.1", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "TS", "display": "Totalscore" }], - "text": "Totalsum fra alle grupper, om det er seksjonsnummer som skal legges sammen", - "type": "quantity", - "required": false, - "repeats": false, - "readOnly": true + ] } ] - }, + } + ] + }, + { + "linkId": "85bcab33-b84b-4f9f-cd98-6bfa6dedc8c7", + "type": "group", + "text": "Oppsummering med grupper. Innrykk trenger en ikke ta hensyn til, da data blir presentert i tabell. Gruppe benyttes kun til å få inn en verdi i kolonne 1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } + ] + } + } + ], + "required": false, + "code": [ { - "linkId": "359430f4-66a4-4545-862a-74c5b38344bc", + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "c87dc79b-afd8-4ef5-8ebf-1b9d3a6a4d9f" + } + ], + "item": [ + { + "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", "type": "group", - "text": "Utregninger", + "text": "Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn2" + } + ] + } + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" + }, + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" + }, + { + "code": "DESC", + "display": "Descending", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" + } + ], "item": [ { - "linkId": "Value1", - "type": "quantity", - "text": "Verdi 1", - "required": false, - "extension": [ + "linkId": "268a7080-0067-4cbb-8a4d-8bea26b46296", + "type": "display", + "text": "Hoven i beina", + "code": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "tallverdi", "display": "Verdi", "system": "urn:uuid:ddc33019-a2f2-41e4-df8f-203f9d221e9c" } + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403", + "code": "1" } - ] - }, - { - "linkId": "Value2", - "type": "quantity", - "text": "Verdi 2", + ], "required": false, - "extension": [ + "enableWhen": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "Tallverdi", "display": " Verdi", "system": "urn:uuid:8bac9130-217f-4080-8357-5c67cec2f3af" } + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true } ] }, { - "linkId": "2ed78bbb-cdae-4c9c-9b41-573e0d42cc16", - "type": "quantity", - "text": "Sum", + "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", + "type": "choice", "extension": [ { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='Value1').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value2').answer.value.value)" + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "Score", "display": "Sum", "system": "http://ehelse.no/Score" } - } - ], - "required": false, - "readOnly": true - } - ] - } - ], - "required": false - }, - { - "linkId": "c9f0d5c2-1aed-42c2-9ace-66a6603d6cdc", - "type": "group", - "text": "Ny løsning uten rar quantity", - "item": [ - { - "linkId": "b357cc7d-b5df-4709-81a9-026fff6780b7", - "type": "group", - "text": "Skåring gruppe 1 ny versjon uten rar quantity", - "item": [ - { - "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "operator": "exists" } ], - "linkId": "efcdeceb-61dc-40b0-8c49-15aaf061e867", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], - "text": "Kryss av om noen av disse tilstandene gjelder deg", + "text": "Viktighet", + "code": [ + { + "code": "2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "941622c1-0a8d-487d-8214-b7cf9cba6210" + } + ] + }, + { + "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", "type": "choice", "required": false, - "repeats": false, - "readOnly": false, "answerOption": [ { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", "code": "1", - "display": "Svært medtatt, vansker med å ta til deg væske eller næring" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], - "code": "50", - "display": "Alvorlige pustevansker" + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", "code": "3", - "display": "Brått fall i allmenntilstand" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", "code": "4", - "display": "Petekkier (utslett som ikke lar seg avbleke)" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 50 }], + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", "code": "5", - "display": "Nyoppståtte brystsmerter" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "answerBoolean": true, + "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "operator": "exists" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "code": [ + { + "code": "3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "4a7d5ffd-54ed-433e-8d40-0173a9dbbfbc" } ] }, { - "linkId": "7ffa61e2-5d00-4a30-dc3e-99432c31402a", - "type": "integer", - "text": "Seksjonssum integer", - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "402c75be-0e28-49ba-fbbe-ba7cd9d02945" }, + "linkId": "cc502a45-030f-4729-8ac8-3c982a43e379", + "type": "display", + "text": "Kløe i huden", + "required": false, + "enableWhen": [ { - "code": "SS", - "display": "Section score", - "system": "http://ehelse.no/scoringFormulas", - "id": "b2987e06-e1d0-450d-f251-ce792f9f6248" + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true } ], - "required": false - }, - { - "linkId": "2e609204-273e-41ed-c636-6f77412b530d", - "type": "decimal", "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "440289ab-ea48-4e49-8f48-7677131575a3" }, { - "code": "SS", - "display": "Section Score", - "system": "http://ehelse.no/scoringFormulas", - "id": "c0c2385d-4f9e-4790-88b0-dfeb6d4e2885" + "code": "1", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "7c01e07f-58d2-43b0-8c87-0ddf595d49e9" } - ], - "required": false, - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], - "text": "Sectionscore Decimal" - } - ], - "required": false - }, - { - "linkId": "f662ec21-e972-45d4-9ef3-38bd146a6bd3", - "type": "group", - "text": "Skåring gruppe 2 uten rar quantity", - "item": [ + ] + }, { + "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", + "type": "choice", "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "operator": "exists" } ], - "linkId": "4ef04b21-372a-4c9f-8a1d-c68228fc2be3", - "code": [{ "system": "http://ehelse.no/scoringFormulas", "code": "QS", "display": "QuestionScore" }], - "text": "Har du noen av følgende sykdommer?", + "text": "Viktiget", + "code": [ + { + "code": "2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "9bd380fc-8ca3-4fba-8a32-8d44f62a5645" + } + ] + }, + { + "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", "type": "choice", "required": false, - "repeats": false, - "readOnly": false, "answerOption": [ { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", "code": "1", - "display": "Astma" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", "code": "2", - "display": "Kols" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" } }, { "valueCoding": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue", "valueDecimal": 25 }], + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", "code": "3", - "display": "Annen lungesykdom" + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" } - } - ] - }, - { - "linkId": "617bce03-06ae-48d5-876b-47633d982a88", - "type": "integer", - "text": "Seksjonssum integer", - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "402c75be-0e28-49ba-fbbe-ba7cd9d02945" }, + }, { - "code": "SS", - "display": "Section score", - "system": "http://ehelse.no/scoringFormulas", - "id": "a4cf45d0-3909-479d-cf48-43c7fc57068e" + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } } ], - "required": false - }, - { - "linkId": "ff07eed8-064a-47eb-8fbe-10fb91e56124", - "type": "decimal", - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "440289ab-ea48-4e49-8f48-7677131575a3" }, + "enableWhen": [ { - "code": "SS", - "display": "Section Score", - "system": "http://ehelse.no/scoringFormulas", - "id": "c0c2385d-4f9e-4790-88b0-dfeb6d4e2885" + "answerBoolean": true, + "question": "926cc2a7-1853-46e6-8e98-cb3405730292", + "operator": "exists" } ], - "required": false, - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], - "text": "Sectionscore Decimal" - } - ], - "required": false - }, - { - "linkId": "05ade39f-ddf5-452f-835a-064a9d2c6007", - "text": "Totalsum uten rar quantity", - "type": "group", - "repeats": false, - "item": [ - { - "linkId": "521d336d-528a-4fea-97cb-a0ff8ad99313", - "type": "integer", - "text": "Totalsum integer", - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "402c75be-0e28-49ba-fbbe-ba7cd9d02945" }, + "extension": [ { - "code": "TS", - "display": "Total score", - "system": "http://ehelse.no/scoringFormulas", - "id": "a4cf45d0-3909-479d-cf48-43c7fc57068e" + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" } ], - "required": false - }, - { - "linkId": "a9e6cd53-9598-4f1c-c233-5a71eb4593ac", - "type": "decimal", + "readOnly": true, + "text": "Alvorlighet", "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "440289ab-ea48-4e49-8f48-7677131575a3" }, { - "code": "TS", - "display": "Total Score", - "system": "http://ehelse.no/scoringFormulas", - "id": "c0c2385d-4f9e-4790-88b0-dfeb6d4e2885" + "code": "3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "6344dcf1-ff0b-4dd0-8f07-3b9c54172155" } - ], - "required": false, - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], - "text": "Totalscore Decimal" + ] } ] - }, + } + ] + }, + { + "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", + "type": "group", + "text": "Oppsummering med uten grupper, men display?", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } + ] + } + } + ], + "required": false, + "code": [ { - "linkId": "ce8a5997-a926-4f72-cc7f-e1ca8c589852", + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", "type": "group", - "text": "Utregninger", + "text": "Oppsummering Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-HN2" + } + ] + } + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" + }, + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" + }, + { + "code": "ND", + "display": "NumericDescending", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" + }, + { + "code": "2", + "display": "Column 2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "id": "02f9fe7f-515f-4b0a-c7c3-e4a1b1bf0231" + } + ], "item": [ - { "linkId": "Value3", "type": "integer", "text": "Verdi 3 Integer", "required": false }, - { "linkId": "Value4", "type": "integer", "text": "Verdi 4 Integer", "required": false }, { - "linkId": "545e17e5-0719-42e8-892c-0da3a8af6ac6", - "type": "integer", - "text": "Summeringsfelt Integer", + "linkId": "d2efd364-d243-4967-d4cb-b1e9d1c280d7", + "type": "display", + "text": "Hoven i beina", "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "3555cebe-8e65-4e4a-8047-40edff07fdf5" } + { + "system": "urn:uuid:8c5cd387-b773-4c60-8f2b-cd9d343cc4f9", + "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403" + } ], "required": false, - "extension": [ + "enableWhen": [ { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='Value3').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value4').answer.value.value)" + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true } ] }, { - "linkId": "Value5", - "type": "decimal", - "text": "Verdi 5 Decimal", - "required": false, - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }] + "linkId": "de7218bb-b70c-421c-c582-529c4d4acecb", + "type": "choice", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "operator": "exists" + }, + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ], + "text": "Viktighet", + "enableBehavior": "all" }, { - "linkId": "Value6", - "type": "decimal", - "text": "Verdi 6 Decimal", + "linkId": "d5425b30-bb33-43f3-8431-4470500b924d", + "type": "choice", "required": false, - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }] + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "answerBoolean": true, + "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "operator": "exists" + }, + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "enableBehavior": "all" }, { - "linkId": "4308af3f-3cdb-422f-d719-7543def7a64f", - "type": "decimal", + "linkId": "8fa24260-704e-466a-820e-ef9e413eec0f", + "type": "display", + "text": "Kløe i huden", "required": false, - "extension": [ - { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, + "enableWhen": [ { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='Value5').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value6').answer.value.value)" + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true } - ], - "text": "Decimal summeringsfelt", - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "2a37bfbd-f334-4227-8f07-76424668a854" } ] }, { - "linkId": "Value7", - "type": "quantity", - "text": "Verdi 7 Quantity ", + "linkId": "f6ca7b70-9e2d-4268-85e4-6e4808df3363", + "type": "choice", "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" } ], - "required": false - }, - { - "linkId": "Value8", - "type": "quantity", - "text": "Verdi 8 Quantity ", - "extension": [ + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "operator": "exists" + }, { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true } ], - "required": false + "text": "Viktiget" }, { - "linkId": "a655638d-ebc5-416e-88fe-22a8e3657c62", - "type": "quantity", - "text": "Nytt quantityfelt med en egen enhet der man feks skal regne sammen to cm felt", - "extension": [ + "linkId": "2869b482-0477-4004-f13c-f17f0ec6e5b2", + "type": "choice", + "required": false, + "answerOption": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } }, { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='Value7').answer.value.value + QuestionnaireResponse.descendants().where(linkId='Value8').answer.value.value)" + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } } ], - "code": [ - { "code": "score", "display": "score", "system": "http://ehelse.no/Score", "id": "8282dc31-ee08-4741-b86e-0ec90b9fead8" } + "enableWhen": [ + { + "answerBoolean": true, + "question": "926cc2a7-1853-46e6-8e98-cb3405730292", + "operator": "exists" + }, + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } ], - "required": false + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "enableBehavior": "all" } ] } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-2", + "display": "SOT-2" + } + ], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-3", + "display": "SOT-3" + } ], - "required": false + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false } ] } diff --git a/src/util/extension.ts b/src/util/extension.ts index 6e9ba7d3..5b8ce8a5 100644 --- a/src/util/extension.ts +++ b/src/util/extension.ts @@ -6,6 +6,7 @@ import itemControlConstants from '../constants/itemcontrol'; import itemType from '../constants/itemType'; import { PresentationButtonsType } from '../constants/presentationButtonsType'; import { getText } from '../util/index'; +import { TABLE_CODES_VALUES, TableCodes } from '../constants/tableTypes'; export function getValidationTextExtension(item: QuestionnaireItem): string | undefined { const validationTextExtension = getExtension(ExtensionConstants.VALIDATIONTEXT_URL, item); @@ -70,6 +71,10 @@ export function isItemSidebar(item: QuestionnaireItem): boolean { return itemControls !== undefined && itemControls.some(itemControl => itemControl.code === itemControlConstants.SIDEBAR); } +export function getExtensions(item: QuestionnaireItem): Extension[] { + return item.extension ?? []; +} + export function getExtension(url: string, item: QuestionnaireItem | Element | Questionnaire): Extension | undefined { if (!item || !item.extension || item.extension.length === 0) { return undefined; @@ -173,6 +178,24 @@ export function getItemControlExtensionValue(item: QuestionnaireItem): Coding[] return itemControlExtension.valueCodeableConcept.coding; } +const hasCode = (code: string | undefined): code is string => { + return !!code; +}; + +const isTableCode = (code: string): code is TableCodes => { + return TABLE_CODES_VALUES.includes(code as TableCodes); +}; + +export const getCodingTextTableValues = (item: QuestionnaireItem): TableCodes[] => { + const extension = getItemControlExtensionValue(item); + const codeValues = + extension + ?.map(x => x.code) + .filter(hasCode) + .filter(isTableCode) || []; + return codeValues; +}; + export function getMarkdownExtensionValue(item: QuestionnaireItem | Element): string | undefined { const markdownExtension = getExtension(ExtensionConstants.MARKDOWN_URL, item); if (!markdownExtension || !markdownExtension.valueMarkdown) { diff --git a/src/util/fhirpathHelper.ts b/src/util/fhirpathHelper.ts index 3c45d644..cbc15b3c 100644 --- a/src/util/fhirpathHelper.ts +++ b/src/util/fhirpathHelper.ts @@ -15,20 +15,26 @@ export function evaluateFhirpathExpressionToGetDate(item: QuestionnaireItem, fhi return; } -export function evaluateFhirpathExpressionToGetString( - questionnare: QuestionnaireResponse | null | undefined, - fhirExtension: Extension - // eslint-disable-next-line @typescript-eslint/no-explicit-any -): any { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let result: any; +export function evaluateFhirpathExpressionToGetString(fhirExtension: Extension, questionnare?: QuestionnaireResponse | null): any { const qCopy = structuredClone(questionnare); - const extCopy = structuredClone(fhirExtension); - try { - result = fhirpath.evaluate(qCopy, extCopy.valueString, null, fhirpath_r4_model); - } catch (e) { - return []; - } + return fhirpath.evaluate(qCopy, fhirExtension.valueString, null, fhirpath_r4_model); +} - return result; +export function evaluateExtension(path: string | object, questionnare?: QuestionnaireResponse | null, context?: 'object'): any { + const qCopy = structuredClone(questionnare); + /** + * Evaluates the "path" FHIRPath expression on the given resource or part of the resource, + * using data from "context" for variables mentioned in the "path" expression. + * @param {(object|object[])} fhirData - FHIR resource, part of a resource (in this case + * path.base should be provided), bundle as js object or array of resources. + * This object/array will be modified by this function to add type information. + * @param {string|object} path - string with fhirpath expression, sample 'Patient.name.given', + * or object, if fhirData represents the part of the FHIR resource: + * @param {string} path.base - base path in resource from which fhirData was extracted + * @param {string} path.expression - fhirpath expression relative to path.base + * @param {object} context - a hash of variable name/value pairs. + * @param {object} model - The "model" data object specific to a domain, e.g. R4. + * For example, you could pass in the result of require("fhirpath/fhir-context/r4"); + */ + return fhirpath.evaluate(qCopy, path, context, fhirpath_r4_model); } diff --git a/src/util/index.ts b/src/util/index.ts index 019945aa..02a71554 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -1,9 +1,21 @@ +import marked from 'marked'; import * as uuid from 'uuid'; import { Questionnaire, QuestionnaireResponseItem, QuestionnaireItem, QuestionnaireResponseItemAnswer } from '../types/fhir'; import { isValid, invalidNodes } from '@helsenorge/core-utils/string-utils'; +import { getQuestionnaireItemCodeValue } from './codingsystem'; +import { + getMaxOccursExtensionValue, + getMarkdownExtensionValue, + getValidationTextExtension, + getQuestionnaireHiddenExtensionValue, + getExtension, + getSublabelExtensionValue, + getHyperlinkExtensionValue, + getCopyExtension, +} from './extension'; import Attachment from '../components/formcomponents/attachment/attachment'; import Boolean from '../components/formcomponents/boolean/boolean'; import Choice from '../components/formcomponents/choice/choice'; @@ -17,26 +29,17 @@ import Integer from '../components/formcomponents/integer/integer'; import OpenChoice from '../components/formcomponents/open-choice/open-choice'; import Quantity from '../components/formcomponents/quantity/quantity'; import StringComponent from '../components/formcomponents/string/string'; +import Table from '../components/formcomponents/table/Table'; import Text from '../components/formcomponents/text/text'; +import CodingSystemConstants from '../constants/codingsystems'; import ExtensionConstants from '../constants/extensions'; -import { RenderOptionCode } from '../constants/renderOptionCode'; import { HyperlinkTarget } from '../constants/hyperlinkTarget'; -import CodingSystemConstants from '../constants/codingsystems'; import Constants from '../constants/index'; import ItemType from '../constants/itemType'; +import itemType from '../constants/itemType'; +import { RenderOptionCode } from '../constants/renderOptionCode'; +import { TABLE_CODES_VALUES } from '../constants/tableTypes'; import { Resources } from '../util/resources'; -import { - getMaxOccursExtensionValue, - getMarkdownExtensionValue, - getValidationTextExtension, - getQuestionnaireHiddenExtensionValue, - getExtension, - getSublabelExtensionValue, - getHyperlinkExtensionValue, - getCopyExtension, -} from './extension'; -import { getQuestionnaireItemCodeValue } from './codingsystem'; -import marked from 'marked'; function openNewIfAbsolute(url: string): string { const regex = new RegExp('^(([a-z][a-z0-9+.-]*):.*)'); @@ -45,10 +48,17 @@ function openNewIfAbsolute(url: string): string { } return '_self'; } - +export const isTableCode = (extensionCode: string | string[]): boolean => { + const isTable = TABLE_CODES_VALUES.some(value => { + return extensionCode.indexOf(value) === -1 ? false : true; + }); + return isTable; +}; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function getComponentForItem(type: string) { - if (String(type) === ItemType.GROUP) { +export function getComponentForItem(type: string, extensionCode?: string | string[]) { + if (String(type) === itemType.GROUP && !!extensionCode && isTableCode(extensionCode)) { + return Table; + } else if (String(type) === ItemType.GROUP) { return Group; } if (String(type) === ItemType.DISPLAY) { diff --git a/src/util/map-props.ts b/src/util/map-props.ts index 1aa990aa..2b90e3be 100644 --- a/src/util/map-props.ts +++ b/src/util/map-props.ts @@ -7,22 +7,27 @@ import { QuestionnaireResponseItemAnswer, } from '../types/fhir'; +import { enableWhenMatchesAnswer, getQuestionnaireResponseItemWithLinkid, getResponseItems, Path, isInGroupContext } from './refero-core'; import { NewValueAction } from '../actions/newValue'; import { Props } from '../components/with-common-functions'; +import ItemType from '../constants/itemType'; import { getFormData } from '../reducers/form'; import { GlobalState } from '../reducers/index'; -import { enableWhenMatchesAnswer, getQuestionnaireResponseItemWithLinkid, getResponseItems, Path, isInGroupContext } from './refero-core'; import { getCopyExtension, getCalculatedExpressionExtension } from '../util/extension'; import { evaluateFhirpathExpressionToGetString } from '../util/fhirpathHelper'; -import ItemType from '../constants/itemType'; export function mapStateToProps(state: GlobalState, originalProps: Props): Props { - getValueIfDataReceiver(state, originalProps); + // if (originalProps.item?.type === 'group') { + // console.log('map-props, originalProps.item', originalProps.item); + // console.log('map-props, originalProps.responseItem', originalProps.responseItem); + // } + const newAnswer = getValueIfDataReceiver(state, originalProps); if (!originalProps.item || !originalProps.item.enableWhen) { - return { ...originalProps, enable: true } as Props; + return { ...originalProps, enable: true, ...(newAnswer !== undefined && { answer: newAnswer }) } as Props; } const enable = isEnableWhenEnabled(originalProps.item.enableWhen, originalProps.item.enableBehavior, originalProps.path || [], state); - return { ...originalProps, enable } as Props; + + return { ...originalProps, enable, ...(newAnswer !== undefined && { answer: newAnswer }) } as Props; } function isEnableWhenEnabled( @@ -56,27 +61,32 @@ function isEnableWhenEnabled( : enableMatches.some(x => x === true); } -function getValueIfDataReceiver(state: GlobalState, originalProps: Props): void { +function getValueIfDataReceiver( + state: GlobalState, + originalProps: Props +): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined { if (originalProps.item) { const extension = getCopyExtension(originalProps.item); if (extension) { const formData = getFormData(state); - let result = evaluateFhirpathExpressionToGetString(formData?.Content, extension); + let result = evaluateFhirpathExpressionToGetString(extension, formData?.Content); if (!!getCalculatedExpressionExtension(originalProps.item)) { result = result.map((m: any) => m.value as number); } - originalProps.answer = getQuestionnaireResponseItemAnswer(originalProps.item.type, result); + return getQuestionnaireResponseItemAnswer(originalProps.item.type, result); } + return undefined; } + return undefined; } function getQuestionnaireResponseItemAnswer( type: string, result: any ): QuestionnaireResponseItemAnswer | Array { - let answerArray: Array = []; + const answerArray: Array = []; if (type === ItemType.BOOLEAN) { return { valueBoolean: result[0] }; } @@ -102,11 +112,11 @@ function getQuestionnaireResponseItemAnswer( case ItemType.DATE: answerArray.push({ valueDate: answer }); break; - case ItemType.TIME: + case ItemType.TIME: answerArray.push({ valueTime: answer }); break; default: { - if ((typeof answer) === 'string') { + if (typeof answer === 'string') { answerArray.push({ valueString: answer }); } else { answerArray.push({ valueCoding: answer }); @@ -114,7 +124,7 @@ function getQuestionnaireResponseItemAnswer( } } }); - return answerArray; + return answerArray; } export function mergeProps(stateProps: Props, dispatchProps: Props, ownProps: Props): Props { diff --git a/src/util/refero-core.ts b/src/util/refero-core.ts index 0fd525dc..fe0e54e6 100644 --- a/src/util/refero-core.ts +++ b/src/util/refero-core.ts @@ -7,10 +7,10 @@ import { QuestionnaireEnableOperator, } from '../types/fhir'; +import { getMinOccursExtensionValue } from './extension'; import ItemType from '../constants/itemType'; import { FormData, FormDefinition } from '../reducers/form'; import { enableWhenMatches } from '../util/enableWhenMatcher'; -import { getMinOccursExtensionValue } from './extension'; export function getRootQuestionnaireResponseItemFromData( definitionLinkId: string, @@ -84,7 +84,7 @@ export function getQuestionnaireResponseItemsWithLinkId( if (!responseItems) { return []; } - + let itemsWithLinkId = getItemsWithIdFromResponseItemArray(linkId, responseItems, recursive); if (itemsWithLinkId && itemsWithLinkId.length > 0) { return itemsWithLinkId; @@ -548,7 +548,11 @@ function getQuestionnaireItemWithIdFromArray( return filteredItems; } -export function getQuestionnaireItemsWithType(type: string, items: Array | undefined, itemsWithType?: Array): Array | undefined { +export function getQuestionnaireItemsWithType( + type: string, + items: Array | undefined, + itemsWithType?: Array +): Array | undefined { if (items === undefined) return; if (!itemsWithType) itemsWithType = []; @@ -559,8 +563,6 @@ export function getQuestionnaireItemsWithType(type: string, items: Array): void { if (items !== undefined) { - items - .filter(f => f.type === type) - .forEach(f => itemsWithType.push(f)); + items.filter(f => f.type === type).forEach(f => itemsWithType.push(f)); } } diff --git a/src/util/scoringCalculator.ts b/src/util/scoringCalculator.ts index 88657205..224ed96e 100644 --- a/src/util/scoringCalculator.ts +++ b/src/util/scoringCalculator.ts @@ -202,14 +202,11 @@ export class ScoringCalculator { } } - private valueOfQuestionFhirpathScoreItem( - item: QuestionnaireItem, - questionnaireResponse: QuestionnaireResponse, - ): number | undefined { + private valueOfQuestionFhirpathScoreItem(item: QuestionnaireItem, questionnaireResponse: QuestionnaireResponse): number | undefined { const expressionExtension = getCalculatedExpressionExtension(item); let value: number | undefined = undefined; if (expressionExtension) { - const result = evaluateFhirpathExpressionToGetString(questionnaireResponse, expressionExtension); + const result = evaluateFhirpathExpressionToGetString(expressionExtension, questionnaireResponse); if (result.length) { value = (result[0] as number) ?? 0; // Round up decimal to integer From b427c997c3635088e52cc2e179422dee69242936 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Sat, 30 Dec 2023 21:54:41 +0100 Subject: [PATCH 16/83] table-hn2 display, sorting --- src/components/formcomponents/table/Table.tsx | 47 +-- .../formcomponents/table/tables/TableHn1.tsx | 10 +- .../formcomponents/table/tables/TableHn2.tsx | 33 +- .../formcomponents/table/tables/helpers.ts | 91 ++++- src/preview/skjema/kun_qest_hn1.json | 311 ++++++++++++++++++ src/util/extension.ts | 2 +- src/util/fhirpathHelper.ts | 2 +- 7 files changed, 425 insertions(+), 71 deletions(-) create mode 100644 src/preview/skjema/kun_qest_hn1.json diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx index 106edbc8..571a68b4 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/Table.tsx @@ -13,17 +13,15 @@ import { } from '../../../types/fhir'; import TableHn1 from './tables/TableHn1'; +import TableHn2 from './tables/TableHn2'; import { NewValueAction } from '../../../actions/newValue'; import { TableCodes } from '../../../constants/tableTypes'; import { GlobalState } from '../../../reducers'; import { getFormData } from '../../../reducers/form'; import { getCodingTextTableValues } from '../../../util/extension'; -import { mapStateToProps as mstp } from '../../../util/map-props'; import { Path } from '../../../util/refero-core'; import { RenderContext } from '../../../util/renderContext'; import { Resources } from '../../../util/resources'; -import { Props as MstpProps } from '../../with-common-functions'; -import TableHn2 from './tables/TableHn2'; export interface Props { item: QuestionnaireItem; @@ -78,18 +76,12 @@ const Table = ({ tableCodes, items, headline, tableType, questionnaireResponse } } }; -const mapStateToProps = (state: GlobalState, props: Props): MstpProps & EnhancedProps => { +const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { const group = props.item; //TODO: Fix undefine and null checks const tableType = getCodingTextTableValues(group)[0]; - console.log('group', group); - const groupChildren = group.item; - console.log('groupChildren', groupChildren); - - const mappedProps = mstp(state, props); return { - ...mappedProps, headline: group.text ?? '', tableCodes: group.code ?? [], items: group.item ?? [], @@ -98,38 +90,3 @@ const mapStateToProps = (state: GlobalState, props: Props): MstpProps & Enhanced }; }; export default connect(mapStateToProps)(Table); -// const renderItem = (item: QuestionnaireItem, tableCodes: Coding[], headline: string): Array => { -// if (isHelpItem(item)) return []; -// if (isHiddenItem(item)) return []; - -// const Comp = getComponentForItem(item.type, getCodingTextTableValues(item)); - -// if (!Comp) { -// return []; -// } - -// let response: Array | undefined; - -// if (responseItem) { -// const childItem = responseItem.item; -// const childAnswer = responseItem.answer; -// const linkId = item.linkId; -// // console.log('childItem', childItem); - -// if (childItem) { -// response = getItemWithIdFromResponseItemArray(linkId, childItem); -// // console.log('response', response); -// } else if (childAnswer) { -// // console.log('childAnswer', childAnswer); - -// response = getItemWithIdFromResponseItemArray(linkId, childAnswer[0].item); -// } -// } -// const renderedItems: Array = []; -// if (response && response.length > 0) { -// response.forEach((responseItem, index) => { -// console.log(responseItem); -// }); -// } -// return renderedItems; -// }; diff --git a/src/components/formcomponents/table/tables/TableHn1.tsx b/src/components/formcomponents/table/tables/TableHn1.tsx index 6f716395..4b7f44fd 100644 --- a/src/components/formcomponents/table/tables/TableHn1.tsx +++ b/src/components/formcomponents/table/tables/TableHn1.tsx @@ -13,7 +13,7 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { findCodeForColumnToSortBy, getColumnNames, getValueIfDataReceiver } from './helpers'; +import { findCodeForColumnToSortBy, getColumnNames, getTableHN1bodyObject, getValueIfDataReceiver } from './helpers'; interface Props { tableCodes: Coding[]; @@ -23,10 +23,12 @@ interface Props { const TableHn1 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { const res = getValueIfDataReceiver(items[2], questionnaireResponse); const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); - console.log('questionnaireResponse', questionnaireResponse); - console.log('tableCodes', tableCodes); + // console.log('questionnaireResponse', questionnaireResponse); + // console.log('tableCodes', tableCodes); console.log('getValueIfDataReceiver', res); - console.log('item', items[2]); + // console.log('item', items[2]); + const answerValues = getTableHN1bodyObject(items); + console.log('answerValues', answerValues); return ( diff --git a/src/components/formcomponents/table/tables/TableHn2.tsx b/src/components/formcomponents/table/tables/TableHn2.tsx index 34625795..801212a0 100644 --- a/src/components/formcomponents/table/tables/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/TableHn2.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import ItemType from '../../../../constants/itemType'; import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; @@ -13,7 +13,7 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { findCodeForColumnToSortBy, getColumnNames, getValueIfDataReceiver } from './helpers'; +import { TableH2, findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject, getValueIfDataReceiver } from './helpers'; interface Props { tableCodes: Coding[]; @@ -22,17 +22,18 @@ interface Props { } const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { const [sortDir, setSortDir] = useState(SortDirection.asc); - const res = getValueIfDataReceiver(items[2], questionnaireResponse); const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); - console.log('questionnaireResponse', questionnaireResponse); - console.log('tableCodes', tableCodes); - console.log('getValueIfDataReceiver', res); - console.log('item', items[2]); - console.log('items', items); + //TODO: find index to sort by + const [responseItems, setResponseItems] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); const handleSort = (): void => { setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); }; + + useEffect(() => { + setResponseItems(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); + }, [sortDir, items, questionnaireResponse]); + return ( @@ -50,15 +51,15 @@ const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Elem - {items.map(item => { - return item.type === ItemType.DISPLAY ? ( - - {item.text} + {responseItems.map(item => { + return ( + + {item.row.map(row => ( + + {row.text} + + ))} - ) : ( - - {item.text} - ); })} diff --git a/src/components/formcomponents/table/tables/helpers.ts b/src/components/formcomponents/table/tables/helpers.ts index 710859d9..9a4c351a 100644 --- a/src/components/formcomponents/table/tables/helpers.ts +++ b/src/components/formcomponents/table/tables/helpers.ts @@ -1,10 +1,17 @@ -import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItemAnswer } from '../../../../types/fhir'; +import * as uuid from 'uuid'; +import { + Coding, + QuestionnaireItem, + QuestionnaireResponse, + QuestionnaireResponseItem, + QuestionnaireResponseItemAnswer, +} from '../../../../types/fhir'; +import CodingSystems, { CodeSystemValues, TableColumnName, TableOrderingColum } from '../../../../constants/codingsystems'; import ItemType from '../../../../constants/itemType'; -import { FormData } from '../../../../reducers/form'; import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; -import CodingSystems, { CodeSystemValues, CodeSystems, TableColumnName, TableOrderingColum } from '../../../../constants/codingsystems'; +import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; export function getQuestionnaireResponseItemAnswer( type: string, @@ -84,4 +91,80 @@ export const getColumnNames = (coding: Coding[]): string[] => { return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); }; -export const getTableHN1bodyObject = (items: QuestionnaireItem[]) => {}; +type TableH2Row = { + id: string; + text: string; +}; + +export type TableH2 = { + id: string; + row: TableH2Row[]; +}; + +const sortTableRows = (table: TableH2[], columnIndex: number, sortOrder: SortDirection): TableH2[] => { + return table.sort((a, b) => { + const aValue = a.row.length > columnIndex ? a.row[columnIndex]?.text || '' : ''; + const bValue = b.row.length > columnIndex ? b.row[columnIndex]?.text || '' : ''; + + return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + }); +}; + +export const getTableHN2bodyObject = ( + items: QuestionnaireItem[], + questionnaireResponse?: QuestionnaireResponse | null, + sortColumnIndex?: number, + sortOrder: SortDirection = SortDirection.asc +): TableH2[] => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + const table = items.reduce((acc: TableH2[], item) => { + const isDisplayType = item.type === ItemType.DISPLAY; + const newRow: TableH2Row = { + id: item.linkId, + text: isDisplayType ? item.text ?? '' : '', + }; + + if (isDisplayType) { + if (acc.length && acc[acc.length - 1].row.length !== 0) { + acc.push({ id: item.id ?? uuid.v4(), row: [newRow] }); + } else if (!acc.length || acc[acc.length - 1].row.length === 0) { + if (!acc.length) { + acc.push({ id: item.id ?? uuid.v4(), row: [] }); + } + acc[acc.length - 1].row.push(newRow); + } + } else { + const res = getValueIfDataReceiver(item, questionnaireResponse); + if (res) { + acc[acc.length - 1].row.push({ + id: item.linkId, + text: Array.isArray(res) ? res[0]?.valueCoding?.code ?? '' : res?.valueCoding?.code ?? '', + }); + } + } + + return acc; + }, []); + return sortColumnIndex ? sortTableRows(table, sortColumnIndex, sortOrder) : table; +}; +export const getTableHN1bodyObject = ( + items: QuestionnaireItem[], + questionnaireResponse?: QuestionnaireResponse | null +): QuestionnaireResponseItem[] => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + const returnItems: QuestionnaireResponseItem[] = items.map(item => { + const res = getValueIfDataReceiver(item, questionnaireResponse); + const responseItem: QuestionnaireResponseItem = structuredClone(item); + if (!Array.isArray(res) && res !== undefined) { + responseItem.answer = [res]; + } else { + responseItem.answer = res; + } + return responseItem; + }); + return returnItems; +}; diff --git a/src/preview/skjema/kun_qest_hn1.json b/src/preview/skjema/kun_qest_hn1.json new file mode 100644 index 00000000..74c72f2d --- /dev/null +++ b/src/preview/skjema/kun_qest_hn1.json @@ -0,0 +1,311 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "292c4322-20d3-4893-a249-a6753994dadd", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + } + ] + }, + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + } + ] + } + } + ], + "item": [ + { + "linkId": "4233cb23-aff4-4e72-8c89-41cdc44f8939", + "type": "group", + "text": "Personalia", + "required": false, + "item": [ + { + "linkId": "855afb10-1dd5-46d4-ab56-d8b8587323a4", + "type": "string", + "text": "Hva heter du?", + "required": false + }, + { + "linkId": "314166c1-cb72-4c67-b0a9-d90581d658ad", + "type": "string", + "text": "Hvor gammel er du?", + "required": false + } + ] + }, + { + "linkId": "f6764114-86d9-402d-8e05-aca25f980f5f", + "type": "group", + "text": "Sykdommer", + "required": false, + "item": [ + { + "linkId": "3cf13e1a-a775-42cc-8182-babde16743aa", + "type": "string", + "text": "Har du hjertesykdom?", + "required": false + }, + { + "linkId": "e32a3b49-42df-4394-9560-2cf48155e182", + "type": "string", + "text": "Hvilken sykdom har du?", + "required": false + }, + { + "linkId": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", + "type": "string", + "text": "Kan du si litt mer om sykdommen din?", + "required": false + } + ] + }, + { + "linkId": "2e71aeb8-aa1c-4bc4-b3a9-b82ed16acc28", + "type": "group", + "text": "Oppsummering", + "required": false, + "item": [ + { + "linkId": "2f566ffe-3f0c-4b3b-8b55-bdcb8aaea08b", + "type": "group", + "text": "Oppsummering Table-HN1", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn1" + } + ] + } + } + ], + "item": [ + { + "linkId": "b0c00973-36bd-49ad-92cf-887bbcf6f9b6", + "type": "group", + "text": "Personalia", + "required": false, + "item": [ + { + "linkId": "fd70929b-7421-4f59-8c0d-d86366d260c7", + "type": "string", + "text": "Hva heter du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='855afb10-1dd5-46d4-ab56-d8b8587323a4').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "855afb10-1dd5-46d4-ab56-d8b8587323a4", + "operator": "exists" + } + ] + }, + { + "linkId": "5a85ef28-51a0-45d7-899f-c87f7384a03e", + "type": "string", + "text": "Hvor gammel er du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='314166c1-cb72-4c67-b0a9-d90581d658ad').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "314166c1-cb72-4c67-b0a9-d90581d658ad", + "operator": "exists" + } + ] + } + ] + }, + { + "linkId": "765cc891-f702-4361-8a5f-719bcb26ec34", + "type": "group", + "text": "Sykdommer", + "required": false, + "item": [ + { + "linkId": "0388ed83-02a8-4660-80e3-d05208bb1dea", + "type": "string", + "text": "Har du hjertesykdom?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='3cf13e1a-a775-42cc-8182-babde16743aa').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "3cf13e1a-a775-42cc-8182-babde16743aa", + "operator": "exists" + } + ] + }, + { + "linkId": "de1df328-4b5d-4831-90c0-e2fd7993067a", + "type": "string", + "text": "Hvilken sykdom har du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e32a3b49-42df-4394-9560-2cf48155e182').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "e32a3b49-42df-4394-9560-2cf48155e182", + "operator": "exists" + } + ] + }, + { + "linkId": "7789abe2-0594-4896-d930-e271972d13cd", + "type": "string", + "text": "Kan du si litt mer om sykdommen din?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='8caedfdb-dee1-47eb-8ee0-9c451fb4fb57').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", + "operator": "exists" + } + ] + } + ] + } + ] + } + ] + } + ] +} diff --git a/src/util/extension.ts b/src/util/extension.ts index 5b8ce8a5..3e3e1848 100644 --- a/src/util/extension.ts +++ b/src/util/extension.ts @@ -5,8 +5,8 @@ import ExtensionConstants from '../constants/extensions'; import itemControlConstants from '../constants/itemcontrol'; import itemType from '../constants/itemType'; import { PresentationButtonsType } from '../constants/presentationButtonsType'; -import { getText } from '../util/index'; import { TABLE_CODES_VALUES, TableCodes } from '../constants/tableTypes'; +import { getText } from '../util/index'; export function getValidationTextExtension(item: QuestionnaireItem): string | undefined { const validationTextExtension = getExtension(ExtensionConstants.VALIDATIONTEXT_URL, item); diff --git a/src/util/fhirpathHelper.ts b/src/util/fhirpathHelper.ts index cbc15b3c..8f8dfec0 100644 --- a/src/util/fhirpathHelper.ts +++ b/src/util/fhirpathHelper.ts @@ -20,7 +20,7 @@ export function evaluateFhirpathExpressionToGetString(fhirExtension: Extension, return fhirpath.evaluate(qCopy, fhirExtension.valueString, null, fhirpath_r4_model); } -export function evaluateExtension(path: string | object, questionnare?: QuestionnaireResponse | null, context?: 'object'): any { +export function evaluateExtension(path: string | object, questionnare?: QuestionnaireResponse | null, context?: 'object'): unknown { const qCopy = structuredClone(questionnare); /** * Evaluates the "path" FHIRPath expression on the given resource or part of the resource, From ae85fc8c8284c82b2eda4f7f50d38263b2770de3 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Mon, 1 Jan 2024 12:45:09 +0100 Subject: [PATCH 17/83] get values from datareciver as string for table --- .../formcomponents/table/tables/TableHn2.tsx | 6 +- .../formcomponents/table/tables/helpers.ts | 86 ++++++++++++++++--- 2 files changed, 76 insertions(+), 16 deletions(-) diff --git a/src/components/formcomponents/table/tables/TableHn2.tsx b/src/components/formcomponents/table/tables/TableHn2.tsx index 801212a0..4f63a2c0 100644 --- a/src/components/formcomponents/table/tables/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/TableHn2.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import ItemType from '../../../../constants/itemType'; + import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; import { @@ -13,7 +13,7 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { TableH2, findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject, getValueIfDataReceiver } from './helpers'; +import { ITableH2, findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject } from './helpers'; interface Props { tableCodes: Coding[]; @@ -24,7 +24,7 @@ const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Elem const [sortDir, setSortDir] = useState(SortDirection.asc); const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); //TODO: find index to sort by - const [responseItems, setResponseItems] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); + const [responseItems, setResponseItems] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); const handleSort = (): void => { setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); diff --git a/src/components/formcomponents/table/tables/helpers.ts b/src/components/formcomponents/table/tables/helpers.ts index 9a4c351a..f2e0520c 100644 --- a/src/components/formcomponents/table/tables/helpers.ts +++ b/src/components/formcomponents/table/tables/helpers.ts @@ -1,17 +1,20 @@ import * as uuid from 'uuid'; + import { Coding, + Quantity, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, } from '../../../../types/fhir'; +import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; + import CodingSystems, { CodeSystemValues, TableColumnName, TableOrderingColum } from '../../../../constants/codingsystems'; import ItemType from '../../../../constants/itemType'; import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; -import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; export function getQuestionnaireResponseItemAnswer( type: string, @@ -64,9 +67,8 @@ export const getValueIfDataReceiver = ( const extension = getCopyExtension(item); if (extension) { let result = evaluateFhirpathExpressionToGetString(extension, questionnaireResponse); - if (!!getCalculatedExpressionExtension(item)) { - result = result.map((m: any) => m.value as number); + result = result.map((m: { value: number }) => m.value); } 3; @@ -91,17 +93,17 @@ export const getColumnNames = (coding: Coding[]): string[] => { return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); }; -type TableH2Row = { +interface ITableH2Row { id: string; text: string; -}; +} -export type TableH2 = { +export interface ITableH2 { id: string; - row: TableH2Row[]; -}; + row: ITableH2Row[]; +} -const sortTableRows = (table: TableH2[], columnIndex: number, sortOrder: SortDirection): TableH2[] => { +const sortTableRows = (table: ITableH2[], columnIndex: number, sortOrder: SortDirection): ITableH2[] => { return table.sort((a, b) => { const aValue = a.row.length > columnIndex ? a.row[columnIndex]?.text || '' : ''; const bValue = b.row.length > columnIndex ? b.row[columnIndex]?.text || '' : ''; @@ -110,18 +112,76 @@ const sortTableRows = (table: TableH2[], columnIndex: number, sortOrder: SortDir }); }; +const getStringFromItemType = ( + type: typeof ItemType[keyof typeof ItemType], + res: QuestionnaireResponseItemAnswer +): string | number | Quantity => { + switch (type) { + case ItemType.TEXT: + case ItemType.STRING: + return res.valueString ?? ''; + case ItemType.INTEGER: + return res.valueInteger ?? 0; + case ItemType.DECIMAL: + return res.valueDecimal ?? 0; + case ItemType.QUANTITY: + return res.valueQuantity ?? ''; + case ItemType.DATETIME: + return res.valueDateTime ?? ''; + case ItemType.DATE: + return res.valueDate ?? ''; + case ItemType.TIME: + return res.valueTime ?? ''; + case ItemType.CHOICE: + return res.valueCoding?.display ?? ''; + default: { + return ''; + } + } +}; +const getValueFromDataReciever = ( + type: typeof ItemType[keyof typeof ItemType], + questionnaireAnswer?: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] +): Array => { + if (questionnaireAnswer === undefined) { + return []; + } + const answerArray: Array = []; + if (Array.isArray(questionnaireAnswer)) { + questionnaireAnswer.forEach(answer => { + const primetiveAnswerValue = getStringFromItemType(type, answer); + answerArray.push(primetiveAnswerValue); + }); + } else { + const primetiveAnswerValue = getStringFromItemType(type, questionnaireAnswer); + answerArray.push(primetiveAnswerValue); + } + return answerArray; +}; + +const transformAnswersToString = ( + type: typeof ItemType[keyof typeof ItemType], + answer: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] +): string => { + const value = getValueFromDataReciever(type, answer); + if (value.length === 0) { + return ''; + } + return getValueFromDataReciever(type, answer)[0].toString(); +}; + export const getTableHN2bodyObject = ( items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null, sortColumnIndex?: number, sortOrder: SortDirection = SortDirection.asc -): TableH2[] => { +): ITableH2[] => { if (!questionnaireResponse || items.length === 0) { return []; } - const table = items.reduce((acc: TableH2[], item) => { + const table = items.reduce((acc: ITableH2[], item) => { const isDisplayType = item.type === ItemType.DISPLAY; - const newRow: TableH2Row = { + const newRow: ITableH2Row = { id: item.linkId, text: isDisplayType ? item.text ?? '' : '', }; @@ -140,7 +200,7 @@ export const getTableHN2bodyObject = ( if (res) { acc[acc.length - 1].row.push({ id: item.linkId, - text: Array.isArray(res) ? res[0]?.valueCoding?.code ?? '' : res?.valueCoding?.code ?? '', + text: transformAnswersToString(item.type, res), }); } } From 999b7715565feb48e67cd9b28f497cc6d8631663 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Mon, 1 Jan 2024 21:43:22 +0100 Subject: [PATCH 18/83] started on enable when --- .../formcomponents/table/tables/helpers.ts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/components/formcomponents/table/tables/helpers.ts b/src/components/formcomponents/table/tables/helpers.ts index f2e0520c..15e0f77c 100644 --- a/src/components/formcomponents/table/tables/helpers.ts +++ b/src/components/formcomponents/table/tables/helpers.ts @@ -4,6 +4,8 @@ import { Coding, Quantity, QuestionnaireItem, + QuestionnaireItemEnableBehaviorCodes, + QuestionnaireItemEnableWhen, QuestionnaireResponse, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, @@ -15,6 +17,37 @@ import CodingSystems, { CodeSystemValues, TableColumnName, TableOrderingColum } import ItemType from '../../../../constants/itemType'; import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; +import { Path, enableWhenMatchesAnswer, getQuestionnaireResponseItemWithLinkid, isInGroupContext } from '../../../../util/refero-core'; + +function isEnableWhenEnabled( + enableWhen: QuestionnaireItemEnableWhen[], + enableBehavior: string | undefined, + path: Path[], + responseItems: QuestionnaireResponseItem[] +): boolean { + const enableMatches: Array = []; + enableWhen.forEach((enableWhen: QuestionnaireItemEnableWhen) => { + const enableWhenQuestion = enableWhen.question; + for (let i = 0; responseItems && i < responseItems.length; i++) { + let responseItem: QuestionnaireResponseItem | undefined = responseItems[i]; + if (!isInGroupContext(path, responseItem, responseItems)) { + continue; + } + if (responseItem.linkId !== enableWhen.question) { + responseItem = getQuestionnaireResponseItemWithLinkid(enableWhenQuestion, responseItems[i], path); + } + if (!responseItem) { + continue; + } + + const matchesAnswer = enableWhenMatchesAnswer(enableWhen, responseItem.answer); + enableMatches.push(matchesAnswer); + } + }); + return enableBehavior === QuestionnaireItemEnableBehaviorCodes.ALL + ? enableMatches.every(x => x === true) + : enableMatches.some(x => x === true); +} export function getQuestionnaireResponseItemAnswer( type: string, From 73f11ff641e9887d04f71dbe63411fc5a7324923 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 2 Jan 2024 14:49:07 +0100 Subject: [PATCH 19/83] hn1-table --- src/components/formcomponents/table/Table.tsx | 30 +- .../formcomponents/table/tables/TableHn1.tsx | 34 +- .../formcomponents/table/tables/TableHn2.tsx | 9 +- .../formcomponents/table/tables/helpers.ts | 286 ++-- src/constants/codingsystems.ts | 3 +- src/constants/tableTypes.ts | 10 +- src/preview/skjema/kun_qest.json | 1241 +++-------------- src/util/extension.ts | 8 +- src/util/index.ts | 12 +- 9 files changed, 444 insertions(+), 1189 deletions(-) diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx index 571a68b4..1030cf55 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/Table.tsx @@ -15,7 +15,7 @@ import { import TableHn1 from './tables/TableHn1'; import TableHn2 from './tables/TableHn2'; import { NewValueAction } from '../../../actions/newValue'; -import { TableCodes } from '../../../constants/tableTypes'; +import { TABLE_CODES_VALUES, TableCodes } from '../../../constants/tableTypes'; import { GlobalState } from '../../../reducers'; import { getFormData } from '../../../reducers/form'; import { getCodingTextTableValues } from '../../../util/extension'; @@ -47,27 +47,39 @@ export interface Props { interface EnhancedProps { headline: string; - tableCodes: Coding[]; + tableCodesCoding: Coding[]; items: QuestionnaireItem[]; - tableType: TableCodes; + tableType: TABLE_CODES_VALUES; questionnaireResponse?: QuestionnaireResponse | null; } -const Table = ({ tableCodes, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { +const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { { switch (tableType) { - case 'table-hn1': + case TableCodes.tableHn1: return ( <>

{headline}

- + ); - case 'table-HN2': + case TableCodes.tableHn2: + return ( + <> +

{headline}

+ + + ); + case TableCodes.gtable: + return ( + <> +

{headline}

+ + ); + case TableCodes.table: return ( <>

{headline}

- ); default: @@ -83,7 +95,7 @@ const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { return { headline: group.text ?? '', - tableCodes: group.code ?? [], + tableCodesCoding: group.code ?? [], items: group.item ?? [], tableType, questionnaireResponse: getFormData(state)?.Content, diff --git a/src/components/formcomponents/table/tables/TableHn1.tsx b/src/components/formcomponents/table/tables/TableHn1.tsx index 4b7f44fd..7c3dc45e 100644 --- a/src/components/formcomponents/table/tables/TableHn1.tsx +++ b/src/components/formcomponents/table/tables/TableHn1.tsx @@ -13,37 +13,37 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { findCodeForColumnToSortBy, getColumnNames, getTableHN1bodyObject, getValueIfDataReceiver } from './helpers'; +import { TABLE_HN1_TABLE_TYPES, findCodeForColumnToSortBy, getColumnNames, getTableHN1bodyObject } from './helpers'; interface Props { - tableCodes: Coding[]; + tableCodesCoding: Coding[]; items: QuestionnaireItem[]; questionnaireResponse?: QuestionnaireResponse | null; } -const TableHn1 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { - const res = getValueIfDataReceiver(items[2], questionnaireResponse); - const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); - // console.log('questionnaireResponse', questionnaireResponse); - // console.log('tableCodes', tableCodes); - console.log('getValueIfDataReceiver', res); - // console.log('item', items[2]); - const answerValues = getTableHN1bodyObject(items); - console.log('answerValues', answerValues); +const TableHn1 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { + const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); + const answerValues = getTableHN1bodyObject(items, questionnaireResponse); return ( - + {/* - {getColumnNames(tableCodes).map(column => ( + {getColumnNames(tableCodesCoding).map(column => ( {`here ${column}`} ))} - + */} - {items.map(item => ( - - {item.linkId} + {answerValues.map(item => ( + + {item.columns.map(({ value, id, type }) => ( + + + {value} + + + ))} ))} diff --git a/src/components/formcomponents/table/tables/TableHn2.tsx b/src/components/formcomponents/table/tables/TableHn2.tsx index 4f63a2c0..1aa33199 100644 --- a/src/components/formcomponents/table/tables/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/TableHn2.tsx @@ -16,16 +16,15 @@ import { import { ITableH2, findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject } from './helpers'; interface Props { - tableCodes: Coding[]; + tableCodesCoding: Coding[]; items: QuestionnaireItem[]; questionnaireResponse?: QuestionnaireResponse | null; } -const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Element => { +const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { const [sortDir, setSortDir] = useState(SortDirection.asc); - const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodes); + const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); //TODO: find index to sort by const [responseItems, setResponseItems] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); - const handleSort = (): void => { setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); }; @@ -38,7 +37,7 @@ const TableHn2 = ({ tableCodes, items, questionnaireResponse }: Props): JSX.Elem - {getColumnNames(tableCodes).map(column => ( + {getColumnNames(tableCodesCoding).map(column => ( = []; - enableWhen.forEach((enableWhen: QuestionnaireItemEnableWhen) => { - const enableWhenQuestion = enableWhen.question; - for (let i = 0; responseItems && i < responseItems.length; i++) { - let responseItem: QuestionnaireResponseItem | undefined = responseItems[i]; - if (!isInGroupContext(path, responseItem, responseItems)) { - continue; - } - if (responseItem.linkId !== enableWhen.question) { - responseItem = getQuestionnaireResponseItemWithLinkid(enableWhenQuestion, responseItems[i], path); - } - if (!responseItem) { - continue; - } - - const matchesAnswer = enableWhenMatchesAnswer(enableWhen, responseItem.answer); - enableMatches.push(matchesAnswer); - } - }); - return enableBehavior === QuestionnaireItemEnableBehaviorCodes.ALL - ? enableMatches.every(x => x === true) - : enableMatches.some(x => x === true); -} +const answerKeyMap = { + [ItemType.TEXT]: 'valueString', + [ItemType.STRING]: 'valueString', + [ItemType.INTEGER]: 'valueInteger', + [ItemType.DECIMAL]: 'valueDecimal', + [ItemType.QUANTITY]: 'valueQuantity', + [ItemType.DATETIME]: 'valueDateTime', + [ItemType.DATE]: 'valueDate', + [ItemType.TIME]: 'valueTime', +}; export function getQuestionnaireResponseItemAnswer( type: string, result: any ): QuestionnaireResponseItemAnswer | Array { - const answerArray: Array = []; if (type === ItemType.BOOLEAN) { return { valueBoolean: result[0] }; + } else if (type === ItemType.CHOICE) { + return { + //TODO: map Coding + valueCoding: result[0].display ?? '', + }; } - result.forEach((answer: any) => { - switch (String(type)) { - case ItemType.TEXT: - case ItemType.STRING: - answerArray.push({ valueString: answer }); - break; - case ItemType.INTEGER: - answerArray.push({ valueInteger: answer }); - break; - case ItemType.DECIMAL: - answerArray.push({ valueDecimal: answer }); - break; - case ItemType.QUANTITY: - answerArray.push({ valueQuantity: answer }); - break; - case ItemType.DATETIME: - answerArray.push({ valueDateTime: answer }); - break; - case ItemType.DATE: - answerArray.push({ valueDate: answer }); - break; - case ItemType.TIME: - answerArray.push({ valueTime: answer }); - break; - default: { - if (typeof answer === 'string') { - answerArray.push({ valueString: answer }); - } else { - answerArray.push({ valueCoding: answer }); - } - } - } - }); - return answerArray; + return result.map((answer: any) => ({ + [answerKeyMap[type] || 'defaultKey']: answer, + })); } export const getValueIfDataReceiver = ( item: QuestionnaireItem, @@ -103,17 +57,14 @@ export const getValueIfDataReceiver = ( if (!!getCalculatedExpressionExtension(item)) { result = result.map((m: { value: number }) => m.value); } - 3; - return getQuestionnaireResponseItemAnswer(item.type, result); } return undefined; }; -export const findCodeBySystem = (coding: Coding[], system?: CodeSystemValues): Coding[] => { - return coding?.filter(code => code?.system === system) ?? []; -}; - +export function findCodeBySystem(coding: T[], system?: string): T[] { + return coding.filter(code => code.system === system); +} export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined => { const code = findCodeBySystem(coding, TableOrderingColum); const columnsToDisplay = coding?.filter(codeElement => codeElement.system === CodingSystems.TableColumnName); @@ -126,26 +77,7 @@ export const getColumnNames = (coding: Coding[]): string[] => { return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); }; -interface ITableH2Row { - id: string; - text: string; -} - -export interface ITableH2 { - id: string; - row: ITableH2Row[]; -} - -const sortTableRows = (table: ITableH2[], columnIndex: number, sortOrder: SortDirection): ITableH2[] => { - return table.sort((a, b) => { - const aValue = a.row.length > columnIndex ? a.row[columnIndex]?.text || '' : ''; - const bValue = b.row.length > columnIndex ? b.row[columnIndex]?.text || '' : ''; - - return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); - }); -}; - -const getStringFromItemType = ( +const getPrimetiveValueFromItemType = ( type: typeof ItemType[keyof typeof ItemType], res: QuestionnaireResponseItemAnswer ): string | number | Quantity => { @@ -172,6 +104,8 @@ const getStringFromItemType = ( } } }; +const convertePrimitiveValueToStrings = (value: Array): string[] => value.map(answer => answer.toString()); + const getValueFromDataReciever = ( type: typeof ItemType[keyof typeof ItemType], questionnaireAnswer?: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] @@ -182,11 +116,11 @@ const getValueFromDataReciever = ( const answerArray: Array = []; if (Array.isArray(questionnaireAnswer)) { questionnaireAnswer.forEach(answer => { - const primetiveAnswerValue = getStringFromItemType(type, answer); + const primetiveAnswerValue = getPrimetiveValueFromItemType(type, answer); answerArray.push(primetiveAnswerValue); }); } else { - const primetiveAnswerValue = getStringFromItemType(type, questionnaireAnswer); + const primetiveAnswerValue = getPrimetiveValueFromItemType(type, questionnaireAnswer); answerArray.push(primetiveAnswerValue); } return answerArray; @@ -195,14 +129,65 @@ const getValueFromDataReciever = ( const transformAnswersToString = ( type: typeof ItemType[keyof typeof ItemType], answer: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] -): string => { +): string[] => { const value = getValueFromDataReciever(type, answer); if (value.length === 0) { - return ''; + return []; } - return getValueFromDataReciever(type, answer)[0].toString(); + return convertePrimitiveValueToStrings(value); +}; + +function isEnableWhenEnabled( + enableWhen: QuestionnaireItemEnableWhen[], + enableBehavior: string | undefined, + path: Path[], + responseItems: QuestionnaireResponseItem[] +): boolean { + const enableMatches: Array = []; + enableWhen.forEach((enableWhen: QuestionnaireItemEnableWhen) => { + const enableWhenQuestion = enableWhen.question; + for (let i = 0; responseItems && i < responseItems.length; i++) { + let responseItem: QuestionnaireResponseItem | undefined = responseItems[i]; + if (!isInGroupContext(path, responseItem, responseItems)) { + continue; + } + if (responseItem.linkId !== enableWhen.question) { + responseItem = getQuestionnaireResponseItemWithLinkid(enableWhenQuestion, responseItems[i], path); + } + if (!responseItem) { + continue; + } + + const matchesAnswer = enableWhenMatchesAnswer(enableWhen, responseItem.answer); + enableMatches.push(matchesAnswer); + } + }); + return enableBehavior === QuestionnaireItemEnableBehaviorCodes.ALL + ? enableMatches.every(x => x === true) + : enableMatches.some(x => x === true); +} + +/* SORTING */ +const sortTableRows = (table: ITableH2[], columnIndex: number, sortOrder: SortDirection): ITableH2[] => { + return table.sort((a, b) => { + const aValue = a?.row.length > columnIndex ? a?.row[columnIndex]?.text || '' : ''; + const bValue = b?.row.length > columnIndex ? b?.row[columnIndex]?.text || '' : ''; + + return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + }); }; +/* TABLE - HN2 */ +interface ITableH2Row { + id: string; + text: string; +} + +export interface ITableH2 { + id: string; + row: ITableH2Row[]; +} + export const getTableHN2bodyObject = ( items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null, @@ -220,20 +205,20 @@ export const getTableHN2bodyObject = ( }; if (isDisplayType) { - if (acc.length && acc[acc.length - 1].row.length !== 0) { + if (acc.length && acc[acc.length - 1]?.row.length !== 0) { acc.push({ id: item.id ?? uuid.v4(), row: [newRow] }); - } else if (!acc.length || acc[acc.length - 1].row.length === 0) { + } else if (!acc.length || acc[acc.length - 1]?.row.length === 0) { if (!acc.length) { acc.push({ id: item.id ?? uuid.v4(), row: [] }); } - acc[acc.length - 1].row.push(newRow); + acc[acc.length - 1]?.row.push(newRow); } } else { const res = getValueIfDataReceiver(item, questionnaireResponse); if (res) { - acc[acc.length - 1].row.push({ + acc[acc.length - 1]?.row.push({ id: item.linkId, - text: transformAnswersToString(item.type, res), + text: transformAnswersToString(item.type, res).toString(), }); } } @@ -242,22 +227,113 @@ export const getTableHN2bodyObject = ( }, []); return sortColumnIndex ? sortTableRows(table, sortColumnIndex, sortOrder) : table; }; -export const getTableHN1bodyObject = ( + +/* TABLE - HN1 */ +export const TABLE_HN1_TABLE_TYPES = { HEADER: 'HEADER', VALUE: 'VALUE' }; +type TableHn1ColumnTypesKey = keyof typeof TABLE_HN1_TABLE_TYPES; +type TableHn1ColumnTypesValue = typeof TABLE_HN1_TABLE_TYPES[TableHn1ColumnTypesKey]; +export interface ITableH1Column { + value?: string; + type: TableHn1ColumnTypesValue; + id: string; +} +export interface ITableH1Row { + id: string; + columns: ITableH1Column[]; +} +export type ITableH1 = ITableH1Row[]; + +const createColumnsFromAnswers = (item: QuestionnaireResponseItem, maxColumns: number): ITableH1Column[] => { + const answerColumns = + item.answer?.map(ans => ({ + value: getPrimetiveValueFromItemType((item as QuestionnaireItem).type, ans).toString(), + type: TABLE_HN1_TABLE_TYPES.VALUE, + id: item.linkId, + })) ?? []; + + const emptyColumnsCount = maxColumns - (answerColumns.length + 1); + + const emptyColumns = Array.from({ length: emptyColumnsCount }, (_, index) => ({ + id: `empty-${item.linkId}-${index + answerColumns.length + 1}`, + type: TABLE_HN1_TABLE_TYPES.VALUE, + value: '', + })); + + return [ + { + id: `${item.linkId}-question`, + type: (item as QuestionnaireItem).type === ItemType.GROUP ? TABLE_HN1_TABLE_TYPES.HEADER : TABLE_HN1_TABLE_TYPES.VALUE, + value: item.text || '', + }, + ...answerColumns, + ...emptyColumns, + ]; +}; + +const transformItemToHN1Row = (item: QuestionnaireResponseItem, maxColumns: number): ITableH1Row => { + const columns = createColumnsFromAnswers(item, maxColumns); + + return { + id: item.linkId, + columns: columns, + }; +}; + +export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): ITableH1 => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + + const answerItems = addAnswerToItems(items, questionnaireResponse); + const maxColumns = findMaxColumns(answerItems); + + const processItems = (items: QuestionnaireResponseItem[], maxColumns: number): ITableH1Row[] => { + return items.reduce((acc: ITableH1Row[], item) => { + const row = transformItemToHN1Row(item, maxColumns); + const newAcc = acc.concat(row); + + const nestedRows = item.item ? processItems(item.item, maxColumns) : []; + return newAcc.concat(nestedRows); + }, []); + }; + + return processItems(answerItems, maxColumns); +}; + +const addAnswerToItems = ( items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null ): QuestionnaireResponseItem[] => { if (!questionnaireResponse || items.length === 0) { return []; } - const returnItems: QuestionnaireResponseItem[] = items.map(item => { + + const processItem = (item: QuestionnaireItem): QuestionnaireResponseItem => { const res = getValueIfDataReceiver(item, questionnaireResponse); const responseItem: QuestionnaireResponseItem = structuredClone(item); + if (!Array.isArray(res) && res !== undefined) { responseItem.answer = [res]; } else { responseItem.answer = res; } + + if (item.item && item.item.length > 0) { + responseItem.item = addAnswerToItems(item.item, questionnaireResponse); + } + return responseItem; - }); - return returnItems; + }; + + return items.map(processItem); +}; + +const findMaxColumns = (items: QuestionnaireResponseItem[]): number => { + const countColumns = (item: QuestionnaireResponseItem): number => { + const columns = 1 + (item.answer?.length || 0); + const maxNestedColumns = item.item?.reduce((max, subItem) => Math.max(max, countColumns(subItem)), 0) || 0; + return Math.max(columns, maxNestedColumns); + }; + + return items.reduce((max, item) => Math.max(max, countColumns(item)), 0); }; diff --git a/src/constants/codingsystems.ts b/src/constants/codingsystems.ts index 996af202..27ea743d 100644 --- a/src/constants/codingsystems.ts +++ b/src/constants/codingsystems.ts @@ -8,6 +8,5 @@ const codeSystems = { TableOrderingColum: 'http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn', TableOrderingFunctions: 'http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions', }; -export type CodeSystems = keyof typeof codeSystems; -export type CodeSystemValues = typeof codeSystems[keyof typeof codeSystems]; + export default codeSystems; diff --git a/src/constants/tableTypes.ts b/src/constants/tableTypes.ts index 09e5a29b..44366257 100644 --- a/src/constants/tableTypes.ts +++ b/src/constants/tableTypes.ts @@ -1,3 +1,9 @@ -export type TableCodes = 'table-hn' | 'gtable' | 'table' | 'table-hn1' | 'table-HN2'; +export const TableCodes = { + gtable: 'gtable', + table: 'table', + tableHn1: 'table-hn1', + tableHn2: 'table-hn2', +} as const; -export const TABLE_CODES_VALUES: TableCodes[] = ['table-hn', 'gtable', 'table', 'table-hn1', 'table-HN2']; +export type TABLE_CODES_KEYS = keyof typeof TableCodes; +export type TABLE_CODES_VALUES = typeof TableCodes[TABLE_CODES_KEYS]; diff --git a/src/preview/skjema/kun_qest.json b/src/preview/skjema/kun_qest.json index 85b59321..fb9e7b03 100644 --- a/src/preview/skjema/kun_qest.json +++ b/src/preview/skjema/kun_qest.json @@ -1,11 +1,6 @@ { "resourceType": "Questionnaire", "language": "nb-NO", - "id": "1c90d68d-78d8-4c7b-b5fb-44c165babbcc", - "name": "NHN_Test_tableHN2", - "title": "tableHN2", - "description": "Skjema før time for nyrepasient", - "version": "0.1", "status": "draft", "publisher": "NHN", "meta": { @@ -22,31 +17,9 @@ "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - }, - { - "code": "1", - "display": "Kun innbygger selv", - "system": "http://helsenorge.no/fhir/KanUtforesAv" } ] }, - "useContext": [ - { - "code": { - "system": "http://hl7.org/fhir/ValueSet/usage-context-type", - "code": "focus", - "display": "Clinical Focus" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1.8655", - "display": "tableHN2" - } - ] - } - } - ], "contact": [ { "name": "http://www.nhn.no" @@ -68,12 +41,6 @@ "code": "1" } }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", - "valueReference": { - "reference": "Endpoint/1" - } - }, { "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", "valueCodeableConcept": { @@ -87,676 +54,68 @@ "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-sublabel", "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "resourceType": "ValueSet", - "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", - "version": "1.0", - "name": "Viktighet", - "title": "Viktighet", - "date": "2023-03-29T13:43:26.881Z", - "status": "draft", - "publisher": "Viktighet", - "compose": { - "include": [ - { - "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", - "concept": [ - { - "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", - "code": "0", - "display": "0" - }, - { - "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", - "code": "1", - "display": "1" - }, - { - "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", - "code": "2", - "display": "2" - }, - { - "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", - "code": "3", - "display": "3" - }, - { - "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", - "code": "4", - "display": "4" - }, - { - "id": "50e5f8f0-db46-45f9-8fda-67039933756e", - "code": "5", - "display": "5" - }, - { - "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", - "code": "6", - "display": "6" - }, - { - "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", - "code": "7", - "display": "7" - }, - { - "id": "dc888467-ab8b-4412-82ca-0312edcc0695", - "code": "8", - "display": "8" - }, - { - "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", - "code": "9", - "display": "9" - }, - { - "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", - "code": "10", - "display": "10" - } - ] } ] } } ], + "id": "292c4322-20d3-4893-a249-a6753994dadd", "item": [ { - "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", + "linkId": "4233cb23-aff4-4e72-8c89-41cdc44f8939", "type": "group", - "text": "Data inn", - "required": false, + "text": "Personalia", "item": [ { - "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", - "type": "boolean", - "text": "Hoven i beina", - "required": false, - "item": [ - { - "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "type": "choice", - "text": "Viktighet Hoven i beina", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - } - ] + "linkId": "855afb10-1dd5-46d4-ab56-d8b8587323a4", + "type": "string", + "text": "Hva heter du?", + "required": false }, { - "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "type": "boolean", - "text": "Kløe i huden", - "required": false, - "item": [ - { - "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "type": "choice", - "text": "Viktighet kløe i huden", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] - } - ] + "linkId": "314166c1-cb72-4c67-b0a9-d90581d658ad", + "type": "string", + "text": "Hvor gammel er du?", + "required": false } - ] + ], + "required": false }, { - "linkId": "85bcab33-b84b-4f9f-cd98-6bfa6dedc8c7", + "linkId": "f6764114-86d9-402d-8e05-aca25f980f5f", "type": "group", - "text": "Oppsummering med grupper. Innrykk trenger en ikke ta hensyn til, da data blir presentert i tabell. Gruppe benyttes kun til å få inn en verdi i kolonne 1", - "extension": [ + "text": "Sykdommer", + "item": [ { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary-container" - } - ] - } - } - ], - "required": false, - "code": [ + "linkId": "3cf13e1a-a775-42cc-8182-babde16743aa", + "type": "string", + "text": "Har du hjertesykdommer?", + "required": false + }, { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "c87dc79b-afd8-4ef5-8ebf-1b9d3a6a4d9f" - } - ], - "item": [ + "linkId": "e32a3b49-42df-4394-9560-2cf48155e182", + "type": "string", + "text": "Hvilke sykdommer har du?", + "required": false + }, { - "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", - "type": "group", - "text": "Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-hn2" - } - ] - } - } - ], - "code": [ - { - "code": "1", - "display": "Sykdom", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" - }, - { - "code": "3", - "display": "Alvorlighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" - }, - { - "code": "DESC", - "display": "Descending", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" - } - ], - "item": [ - { - "linkId": "268a7080-0067-4cbb-8a4d-8bea26b46296", - "type": "display", - "text": "Hoven i beina", - "code": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403", - "code": "1" - } - ], - "required": false, - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "operator": "exists" - } - ], - "text": "Viktighet", - "code": [ - { - "code": "2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "941622c1-0a8d-487d-8214-b7cf9cba6210" - } - ] - }, - { - "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet", - "code": [ - { - "code": "3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "4a7d5ffd-54ed-433e-8d40-0173a9dbbfbc" - } - ] - }, - { - "linkId": "cc502a45-030f-4729-8ac8-3c982a43e379", - "type": "display", - "text": "Kløe i huden", - "required": false, - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ], - "code": [ - { - "code": "1", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "7c01e07f-58d2-43b0-8c87-0ddf595d49e9" - } - ] - }, - { - "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "operator": "exists" - } - ], - "text": "Viktiget", - "code": [ - { - "code": "2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "9bd380fc-8ca3-4fba-8a32-8d44f62a5645" - } - ] - }, - { - "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "926cc2a7-1853-46e6-8e98-cb3405730292", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet", - "code": [ - { - "code": "3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "6344dcf1-ff0b-4dd0-8f07-3b9c54172155" - } - ] - } - ] + "linkId": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", + "type": "string", + "text": "Kan du si litt mer om sykdommen din?", + "required": false } - ] + ], + "required": false }, { - "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", + "linkId": "2e71aeb8-aa1c-4bc4-b3a9-b82ed16acc28", "type": "group", - "text": "Oppsummering med uten grupper, men display?", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary-container" - } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], + "text": "Oppsummering", "item": [ { - "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", + "linkId": "2f566ffe-3f0c-4b3b-8b55-bdcb8aaea08b", "type": "group", - "text": "Oppsummering Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", - "required": false, + "text": "Oppsummering Table-HN1", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", @@ -764,391 +123,189 @@ "coding": [ { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-HN2" + "code": "table-hn1" } ] } } ], - "code": [ - { - "code": "1", - "display": "Sykdom", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" - }, - { - "code": "3", - "display": "Alvorlighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" - }, - { - "code": "ND", - "display": "NumericDescending", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" - }, - { - "code": "2", - "display": "Column 2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "id": "02f9fe7f-515f-4b0a-c7c3-e4a1b1bf0231" - } - ], "item": [ { - "linkId": "d2efd364-d243-4967-d4cb-b1e9d1c280d7", - "type": "display", - "text": "Hoven i beina", - "code": [ - { - "system": "urn:uuid:8c5cd387-b773-4c60-8f2b-cd9d343cc4f9", - "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403" - } - ], - "required": false, - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "de7218bb-b70c-421c-c582-529c4d4acecb", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" + "linkId": "b0c00973-36bd-49ad-92cf-887bbcf6f9b6", + "type": "group", + "text": "Personalia", + "item": [ + { + "linkId": "fd70929b-7421-4f59-8c0d-d86366d260c7", + "type": "string", + "text": "Hva heter du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "operator": "exists" - }, - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ], - "text": "Viktighet", - "enableBehavior": "all" - }, - { - "linkId": "d5425b30-bb33-43f3-8431-4470500b924d", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "operator": "exists" - }, - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='855afb10-1dd5-46d4-ab56-d8b8587323a4').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "855afb10-1dd5-46d4-ab56-d8b8587323a4", + "operator": "exists" + } + ] + }, + { + "linkId": "5a85ef28-51a0-45d7-899f-c87f7384a03e", + "type": "string", + "text": "Hvor gammel er du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='314166c1-cb72-4c67-b0a9-d90581d658ad').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "314166c1-cb72-4c67-b0a9-d90581d658ad", + "operator": "exists" + } + ] } ], - "readOnly": true, - "text": "Alvorlighet", - "enableBehavior": "all" - }, - { - "linkId": "8fa24260-704e-466a-820e-ef9e413eec0f", - "type": "display", - "text": "Kløe i huden", - "required": false, - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] + "required": false }, { - "linkId": "f6ca7b70-9e2d-4268-85e4-6e4808df3363", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" + "linkId": "765cc891-f702-4361-8a5f-719bcb26ec34", + "type": "group", + "text": "Sykdommer", + "item": [ + { + "linkId": "0388ed83-02a8-4660-80e3-d05208bb1dea", + "type": "string", + "text": "Har du hjertesykdommer?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "operator": "exists" - }, - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ], - "text": "Viktiget" - }, - { - "linkId": "2869b482-0477-4004-f13c-f17f0ec6e5b2", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "926cc2a7-1853-46e6-8e98-cb3405730292", - "operator": "exists" - }, - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='3cf13e1a-a775-42cc-8182-babde16743aa').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "3cf13e1a-a775-42cc-8182-babde16743aa", + "operator": "exists" + } + ] + }, + { + "linkId": "de1df328-4b5d-4831-90c0-e2fd7993067a", + "type": "string", + "text": "Hvilke sykdommer har du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e32a3b49-42df-4394-9560-2cf48155e182').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "e32a3b49-42df-4394-9560-2cf48155e182", + "operator": "exists" + } + ] + }, + { + "linkId": "7789abe2-0594-4896-d930-e271972d13cd", + "type": "string", + "text": "Kan du si litt mer om sykdommen din?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='8caedfdb-dee1-47eb-8ee0-9c451fb4fb57').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", + "operator": "exists" + } + ] } ], - "readOnly": true, - "text": "Alvorlighet", - "enableBehavior": "all" + "required": false } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-2", - "display": "SOT-2" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-3", - "display": "SOT-3" + ], + "required": false } ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false + "required": false } ] } diff --git a/src/util/extension.ts b/src/util/extension.ts index 3e3e1848..85c3752c 100644 --- a/src/util/extension.ts +++ b/src/util/extension.ts @@ -182,15 +182,15 @@ const hasCode = (code: string | undefined): code is string => { return !!code; }; -const isTableCode = (code: string): code is TableCodes => { - return TABLE_CODES_VALUES.includes(code as TableCodes); +const isTableCode = (code: TABLE_CODES_VALUES): code is TABLE_CODES_VALUES => { + return Object.values(TableCodes).includes(code); }; -export const getCodingTextTableValues = (item: QuestionnaireItem): TableCodes[] => { +export const getCodingTextTableValues = (item: QuestionnaireItem): TABLE_CODES_VALUES[] => { const extension = getItemControlExtensionValue(item); const codeValues = extension - ?.map(x => x.code) + ?.map(x => x.code as TABLE_CODES_VALUES) .filter(hasCode) .filter(isTableCode) || []; return codeValues; diff --git a/src/util/index.ts b/src/util/index.ts index 02a71554..07ee8c09 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -38,7 +38,7 @@ import Constants from '../constants/index'; import ItemType from '../constants/itemType'; import itemType from '../constants/itemType'; import { RenderOptionCode } from '../constants/renderOptionCode'; -import { TABLE_CODES_VALUES } from '../constants/tableTypes'; +import { TableCodes } from '../constants/tableTypes'; import { Resources } from '../util/resources'; function openNewIfAbsolute(url: string): string { @@ -49,8 +49,14 @@ function openNewIfAbsolute(url: string): string { return '_self'; } export const isTableCode = (extensionCode: string | string[]): boolean => { - const isTable = TABLE_CODES_VALUES.some(value => { - return extensionCode.indexOf(value) === -1 ? false : true; + let lowerCode: string | string[] = ''; + if (Array.isArray(extensionCode)) { + lowerCode = extensionCode.map(code => code.toLocaleLowerCase()); + } else { + lowerCode = extensionCode.toLowerCase(); + } + const isTable = Object.values(TableCodes).some(value => { + return lowerCode.indexOf(value.toLocaleLowerCase()) === -1 ? false : true; }); return isTable; }; From f8997f67421fe24379fed1545cff0b5dc81e9fd3 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:35:25 +0100 Subject: [PATCH 20/83] table-hn1 and table-hn2 --- src/components/formcomponents/table/Table.tsx | 17 +- .../formcomponents/table/tables/TableHn1.tsx | 54 - .../formcomponents/table/tables/constants.ts | 4 + .../formcomponents/table/tables/helpers.ts | 339 ----- .../table/tables/table-hn1/TableHn1.tsx | 35 + .../table/tables/table-hn1/interface.ts | 13 + .../table/tables/table-hn1/utils.ts | 53 + .../table/tables/{ => table-hn2}/TableHn2.tsx | 31 +- .../table/tables/table-hn2/interface.ts | 14 + .../table/tables/table-hn2/utils.ts | 85 ++ .../formcomponents/table/tables/utils.ts | 295 +++++ src/components/index.tsx | 3 - src/constants/codingsystems.ts | 4 + src/preview/FormFillerPreview.tsx | 7 +- src/preview/resources/referoResources.tsx | 1 + src/preview/skjema/kun_qest.json | 55 +- src/preview/skjema/kun_qest_hn2.json | 1146 +++++++++++++++++ src/preview/skjema/kun_qest_repeatable.json | 619 +++++++++ src/preview/styles/skjemautfyller.scss | 10 + src/util/fhirpathHelper.ts | 6 +- src/util/index.ts | 6 +- src/util/map-props.ts | 4 - 22 files changed, 2364 insertions(+), 437 deletions(-) delete mode 100644 src/components/formcomponents/table/tables/TableHn1.tsx create mode 100644 src/components/formcomponents/table/tables/constants.ts delete mode 100644 src/components/formcomponents/table/tables/helpers.ts create mode 100644 src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx create mode 100644 src/components/formcomponents/table/tables/table-hn1/interface.ts create mode 100644 src/components/formcomponents/table/tables/table-hn1/utils.ts rename src/components/formcomponents/table/tables/{ => table-hn2}/TableHn2.tsx (67%) create mode 100644 src/components/formcomponents/table/tables/table-hn2/interface.ts create mode 100644 src/components/formcomponents/table/tables/table-hn2/utils.ts create mode 100644 src/components/formcomponents/table/tables/utils.ts create mode 100644 src/preview/skjema/kun_qest_hn2.json create mode 100644 src/preview/skjema/kun_qest_repeatable.json diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx index 1030cf55..686abc42 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/Table.tsx @@ -7,13 +7,16 @@ import { Coding, Questionnaire, QuestionnaireItem, + QuestionnaireItemEnableWhen, QuestionnaireResponse, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, } from '../../../types/fhir'; -import TableHn1 from './tables/TableHn1'; -import TableHn2 from './tables/TableHn2'; +import LanguageLocales from '@helsenorge/core-utils/constants/languages'; + +import TableHn1 from './tables/table-hn1/TableHn1'; +import TableHn2 from './tables/table-hn2/TableHn2'; import { NewValueAction } from '../../../actions/newValue'; import { TABLE_CODES_VALUES, TableCodes } from '../../../constants/tableTypes'; import { GlobalState } from '../../../reducers'; @@ -25,8 +28,8 @@ import { Resources } from '../../../util/resources'; export interface Props { item: QuestionnaireItem; - questionnaire?: Questionnaire; - answer: QuestionnaireResponseItemAnswer; + questionnaire?: Questionnaire | null; + answer?: QuestionnaireResponseItemAnswer | null; responseItem: QuestionnaireResponseItem; dispatch?: ThunkDispatch; path: Array; @@ -36,7 +39,7 @@ export interface Props { resources?: Resources; headerTag?: number; attachmentErrorMessage?: string; - repeatButton: JSX.Element; + repeatButton?: JSX.Element; id?: string; renderContext: RenderContext; renderHelpButton: () => JSX.Element; @@ -51,6 +54,7 @@ interface EnhancedProps { items: QuestionnaireItem[]; tableType: TABLE_CODES_VALUES; questionnaireResponse?: QuestionnaireResponse | null; + language: LanguageLocales; } const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { @@ -60,7 +64,7 @@ const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResp return ( <>

{headline}

- + ); case TableCodes.tableHn2: @@ -99,6 +103,7 @@ const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { items: group.item ?? [], tableType, questionnaireResponse: getFormData(state)?.Content, + language: (state.refero.form.Language as LanguageLocales) || LanguageLocales.NORWEGIAN, }; }; export default connect(mapStateToProps)(Table); diff --git a/src/components/formcomponents/table/tables/TableHn1.tsx b/src/components/formcomponents/table/tables/TableHn1.tsx deleted file mode 100644 index 7c3dc45e..00000000 --- a/src/components/formcomponents/table/tables/TableHn1.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import React from 'react'; - -import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; - -import { - HeaderCategory, - Table as HnTable, - SortDirection, - TableBody, - TableCell, - TableHead, - TableHeadCell, - TableRow, -} from '@helsenorge/designsystem-react/components/Table'; - -import { TABLE_HN1_TABLE_TYPES, findCodeForColumnToSortBy, getColumnNames, getTableHN1bodyObject } from './helpers'; - -interface Props { - tableCodesCoding: Coding[]; - items: QuestionnaireItem[]; - questionnaireResponse?: QuestionnaireResponse | null; -} -const TableHn1 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { - const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); - const answerValues = getTableHN1bodyObject(items, questionnaireResponse); - return ( - - {/* - - {getColumnNames(tableCodesCoding).map(column => ( - - {`here ${column}`} - - ))} - - */} - - {answerValues.map(item => ( - - {item.columns.map(({ value, id, type }) => ( - - - {value} - - - ))} - - ))} - - - ); -}; - -export default TableHn1; diff --git a/src/components/formcomponents/table/tables/constants.ts b/src/components/formcomponents/table/tables/constants.ts new file mode 100644 index 00000000..b201add3 --- /dev/null +++ b/src/components/formcomponents/table/tables/constants.ts @@ -0,0 +1,4 @@ +export const DATEFORMATS = { + DATE: 'LL', + DATETIME: 'LLL', +}; diff --git a/src/components/formcomponents/table/tables/helpers.ts b/src/components/formcomponents/table/tables/helpers.ts deleted file mode 100644 index 62edd21d..00000000 --- a/src/components/formcomponents/table/tables/helpers.ts +++ /dev/null @@ -1,339 +0,0 @@ -import * as uuid from 'uuid'; - -import { - Coding, - Quantity, - QuestionnaireItem, - QuestionnaireItemEnableBehaviorCodes, - QuestionnaireItemEnableWhen, - QuestionnaireResponse, - QuestionnaireResponseItem, - QuestionnaireResponseItemAnswer, -} from '../../../../types/fhir'; - -import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; - -import CodingSystems, { TableColumnName, TableOrderingColum } from '../../../../constants/codingsystems'; -import ItemType from '../../../../constants/itemType'; -import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; -import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; -import { Path, enableWhenMatchesAnswer, getQuestionnaireResponseItemWithLinkid, isInGroupContext } from '../../../../util/refero-core'; - -const answerKeyMap = { - [ItemType.TEXT]: 'valueString', - [ItemType.STRING]: 'valueString', - [ItemType.INTEGER]: 'valueInteger', - [ItemType.DECIMAL]: 'valueDecimal', - [ItemType.QUANTITY]: 'valueQuantity', - [ItemType.DATETIME]: 'valueDateTime', - [ItemType.DATE]: 'valueDate', - [ItemType.TIME]: 'valueTime', -}; - -export function getQuestionnaireResponseItemAnswer( - type: string, - result: any -): QuestionnaireResponseItemAnswer | Array { - if (type === ItemType.BOOLEAN) { - return { valueBoolean: result[0] }; - } else if (type === ItemType.CHOICE) { - return { - //TODO: map Coding - valueCoding: result[0].display ?? '', - }; - } - - return result.map((answer: any) => ({ - [answerKeyMap[type] || 'defaultKey']: answer, - })); -} -export const getValueIfDataReceiver = ( - item: QuestionnaireItem, - questionnaireResponse?: QuestionnaireResponse | null -): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined => { - const extension = getCopyExtension(item); - if (extension) { - let result = evaluateFhirpathExpressionToGetString(extension, questionnaireResponse); - if (!!getCalculatedExpressionExtension(item)) { - result = result.map((m: { value: number }) => m.value); - } - return getQuestionnaireResponseItemAnswer(item.type, result); - } - return undefined; -}; - -export function findCodeBySystem(coding: T[], system?: string): T[] { - return coding.filter(code => code.system === system); -} -export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined => { - const code = findCodeBySystem(coding, TableOrderingColum); - const columnsToDisplay = coding?.filter(codeElement => codeElement.system === CodingSystems.TableColumnName); - const codeForSortedColumn = code[0]?.code; - const columnToSortBy = columnsToDisplay?.find(coding => coding?.code === codeForSortedColumn); - return columnToSortBy; -}; - -export const getColumnNames = (coding: Coding[]): string[] => { - return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); -}; - -const getPrimetiveValueFromItemType = ( - type: typeof ItemType[keyof typeof ItemType], - res: QuestionnaireResponseItemAnswer -): string | number | Quantity => { - switch (type) { - case ItemType.TEXT: - case ItemType.STRING: - return res.valueString ?? ''; - case ItemType.INTEGER: - return res.valueInteger ?? 0; - case ItemType.DECIMAL: - return res.valueDecimal ?? 0; - case ItemType.QUANTITY: - return res.valueQuantity ?? ''; - case ItemType.DATETIME: - return res.valueDateTime ?? ''; - case ItemType.DATE: - return res.valueDate ?? ''; - case ItemType.TIME: - return res.valueTime ?? ''; - case ItemType.CHOICE: - return res.valueCoding?.display ?? ''; - default: { - return ''; - } - } -}; -const convertePrimitiveValueToStrings = (value: Array): string[] => value.map(answer => answer.toString()); - -const getValueFromDataReciever = ( - type: typeof ItemType[keyof typeof ItemType], - questionnaireAnswer?: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] -): Array => { - if (questionnaireAnswer === undefined) { - return []; - } - const answerArray: Array = []; - if (Array.isArray(questionnaireAnswer)) { - questionnaireAnswer.forEach(answer => { - const primetiveAnswerValue = getPrimetiveValueFromItemType(type, answer); - answerArray.push(primetiveAnswerValue); - }); - } else { - const primetiveAnswerValue = getPrimetiveValueFromItemType(type, questionnaireAnswer); - answerArray.push(primetiveAnswerValue); - } - return answerArray; -}; - -const transformAnswersToString = ( - type: typeof ItemType[keyof typeof ItemType], - answer: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] -): string[] => { - const value = getValueFromDataReciever(type, answer); - if (value.length === 0) { - return []; - } - return convertePrimitiveValueToStrings(value); -}; - -function isEnableWhenEnabled( - enableWhen: QuestionnaireItemEnableWhen[], - enableBehavior: string | undefined, - path: Path[], - responseItems: QuestionnaireResponseItem[] -): boolean { - const enableMatches: Array = []; - enableWhen.forEach((enableWhen: QuestionnaireItemEnableWhen) => { - const enableWhenQuestion = enableWhen.question; - for (let i = 0; responseItems && i < responseItems.length; i++) { - let responseItem: QuestionnaireResponseItem | undefined = responseItems[i]; - if (!isInGroupContext(path, responseItem, responseItems)) { - continue; - } - if (responseItem.linkId !== enableWhen.question) { - responseItem = getQuestionnaireResponseItemWithLinkid(enableWhenQuestion, responseItems[i], path); - } - if (!responseItem) { - continue; - } - - const matchesAnswer = enableWhenMatchesAnswer(enableWhen, responseItem.answer); - enableMatches.push(matchesAnswer); - } - }); - return enableBehavior === QuestionnaireItemEnableBehaviorCodes.ALL - ? enableMatches.every(x => x === true) - : enableMatches.some(x => x === true); -} - -/* SORTING */ -const sortTableRows = (table: ITableH2[], columnIndex: number, sortOrder: SortDirection): ITableH2[] => { - return table.sort((a, b) => { - const aValue = a?.row.length > columnIndex ? a?.row[columnIndex]?.text || '' : ''; - const bValue = b?.row.length > columnIndex ? b?.row[columnIndex]?.text || '' : ''; - - return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); - }); -}; - -/* TABLE - HN2 */ -interface ITableH2Row { - id: string; - text: string; -} - -export interface ITableH2 { - id: string; - row: ITableH2Row[]; -} - -export const getTableHN2bodyObject = ( - items: QuestionnaireItem[], - questionnaireResponse?: QuestionnaireResponse | null, - sortColumnIndex?: number, - sortOrder: SortDirection = SortDirection.asc -): ITableH2[] => { - if (!questionnaireResponse || items.length === 0) { - return []; - } - const table = items.reduce((acc: ITableH2[], item) => { - const isDisplayType = item.type === ItemType.DISPLAY; - const newRow: ITableH2Row = { - id: item.linkId, - text: isDisplayType ? item.text ?? '' : '', - }; - - if (isDisplayType) { - if (acc.length && acc[acc.length - 1]?.row.length !== 0) { - acc.push({ id: item.id ?? uuid.v4(), row: [newRow] }); - } else if (!acc.length || acc[acc.length - 1]?.row.length === 0) { - if (!acc.length) { - acc.push({ id: item.id ?? uuid.v4(), row: [] }); - } - acc[acc.length - 1]?.row.push(newRow); - } - } else { - const res = getValueIfDataReceiver(item, questionnaireResponse); - if (res) { - acc[acc.length - 1]?.row.push({ - id: item.linkId, - text: transformAnswersToString(item.type, res).toString(), - }); - } - } - - return acc; - }, []); - return sortColumnIndex ? sortTableRows(table, sortColumnIndex, sortOrder) : table; -}; - -/* TABLE - HN1 */ -export const TABLE_HN1_TABLE_TYPES = { HEADER: 'HEADER', VALUE: 'VALUE' }; -type TableHn1ColumnTypesKey = keyof typeof TABLE_HN1_TABLE_TYPES; -type TableHn1ColumnTypesValue = typeof TABLE_HN1_TABLE_TYPES[TableHn1ColumnTypesKey]; -export interface ITableH1Column { - value?: string; - type: TableHn1ColumnTypesValue; - id: string; -} -export interface ITableH1Row { - id: string; - columns: ITableH1Column[]; -} -export type ITableH1 = ITableH1Row[]; - -const createColumnsFromAnswers = (item: QuestionnaireResponseItem, maxColumns: number): ITableH1Column[] => { - const answerColumns = - item.answer?.map(ans => ({ - value: getPrimetiveValueFromItemType((item as QuestionnaireItem).type, ans).toString(), - type: TABLE_HN1_TABLE_TYPES.VALUE, - id: item.linkId, - })) ?? []; - - const emptyColumnsCount = maxColumns - (answerColumns.length + 1); - - const emptyColumns = Array.from({ length: emptyColumnsCount }, (_, index) => ({ - id: `empty-${item.linkId}-${index + answerColumns.length + 1}`, - type: TABLE_HN1_TABLE_TYPES.VALUE, - value: '', - })); - - return [ - { - id: `${item.linkId}-question`, - type: (item as QuestionnaireItem).type === ItemType.GROUP ? TABLE_HN1_TABLE_TYPES.HEADER : TABLE_HN1_TABLE_TYPES.VALUE, - value: item.text || '', - }, - ...answerColumns, - ...emptyColumns, - ]; -}; - -const transformItemToHN1Row = (item: QuestionnaireResponseItem, maxColumns: number): ITableH1Row => { - const columns = createColumnsFromAnswers(item, maxColumns); - - return { - id: item.linkId, - columns: columns, - }; -}; - -export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): ITableH1 => { - if (!questionnaireResponse || items.length === 0) { - return []; - } - - const answerItems = addAnswerToItems(items, questionnaireResponse); - const maxColumns = findMaxColumns(answerItems); - - const processItems = (items: QuestionnaireResponseItem[], maxColumns: number): ITableH1Row[] => { - return items.reduce((acc: ITableH1Row[], item) => { - const row = transformItemToHN1Row(item, maxColumns); - const newAcc = acc.concat(row); - - const nestedRows = item.item ? processItems(item.item, maxColumns) : []; - return newAcc.concat(nestedRows); - }, []); - }; - - return processItems(answerItems, maxColumns); -}; - -const addAnswerToItems = ( - items: QuestionnaireItem[], - questionnaireResponse?: QuestionnaireResponse | null -): QuestionnaireResponseItem[] => { - if (!questionnaireResponse || items.length === 0) { - return []; - } - - const processItem = (item: QuestionnaireItem): QuestionnaireResponseItem => { - const res = getValueIfDataReceiver(item, questionnaireResponse); - const responseItem: QuestionnaireResponseItem = structuredClone(item); - - if (!Array.isArray(res) && res !== undefined) { - responseItem.answer = [res]; - } else { - responseItem.answer = res; - } - - if (item.item && item.item.length > 0) { - responseItem.item = addAnswerToItems(item.item, questionnaireResponse); - } - - return responseItem; - }; - - return items.map(processItem); -}; - -const findMaxColumns = (items: QuestionnaireResponseItem[]): number => { - const countColumns = (item: QuestionnaireResponseItem): number => { - const columns = 1 + (item.answer?.length || 0); - const maxNestedColumns = item.item?.reduce((max, subItem) => Math.max(max, countColumns(subItem)), 0) || 0; - return Math.max(columns, maxNestedColumns); - }; - - return items.reduce((max, item) => Math.max(max, countColumns(item)), 0); -}; diff --git a/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx b/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx new file mode 100644 index 00000000..60ea8a57 --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx @@ -0,0 +1,35 @@ +import React from 'react'; + +import { QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; + +import { Table as HnTable, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; + +import { TABLE_HN1_TABLE_TYPES } from './interface'; +import { getTableHN1bodyObject } from './utils'; + +interface Props { + items: QuestionnaireItem[]; + questionnaireResponse?: QuestionnaireResponse | null; +} +const TableHn1 = ({ items, questionnaireResponse }: Props): JSX.Element => { + const answerValues = getTableHN1bodyObject(items, questionnaireResponse); + return ( + + + {answerValues.map(item => ( + + {item.columns.map(({ value, id, type }) => ( + + + {value ?? ''} + + + ))} + + ))} + + + ); +}; + +export default TableHn1; diff --git a/src/components/formcomponents/table/tables/table-hn1/interface.ts b/src/components/formcomponents/table/tables/table-hn1/interface.ts new file mode 100644 index 00000000..6b9fd5b2 --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn1/interface.ts @@ -0,0 +1,13 @@ +export const TABLE_HN1_TABLE_TYPES = { HEADER: 'HEADER', VALUE: 'VALUE' }; +type TableHn1ColumnTypesKey = keyof typeof TABLE_HN1_TABLE_TYPES; +type TableHn1ColumnTypesValue = typeof TABLE_HN1_TABLE_TYPES[TableHn1ColumnTypesKey]; +export interface ITableH1Column { + value?: string; + type: TableHn1ColumnTypesValue; + id: string; +} +export interface ITableH1Row { + id: string; + columns: ITableH1Column[]; +} +export type ITableH1 = ITableH1Row[]; diff --git a/src/components/formcomponents/table/tables/table-hn1/utils.ts b/src/components/formcomponents/table/tables/table-hn1/utils.ts new file mode 100644 index 00000000..5dfd4ed2 --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn1/utils.ts @@ -0,0 +1,53 @@ +import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from '../../../../../types/fhir'; + +import { ITableH1, ITableH1Column, ITableH1Row, TABLE_HN1_TABLE_TYPES } from './interface'; +import ItemType from '../../../../../constants/itemType'; +import { addAnswerToItems, filterEnabledQuestionnaireItems, transformAnswersToListOfStrings } from '../utils'; + +export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): ITableH1 => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); + + const answerItems = addAnswerToItems(itemsToShow, questionnaireResponse); + + const processItems = (items: QuestionnaireResponseItem[]): ITableH1Row[] => { + return items.reduce((acc: ITableH1Row[], item) => { + const row = transformItemToHN1Row(item); + const newAcc = acc.concat(row); + + const nestedRows = item.item ? processItems(item.item) : []; + return newAcc.concat(nestedRows); + }, []); + }; + + return processItems(answerItems); +}; + +const createColumnsFromAnswers = (item: QuestionnaireResponseItem): ITableH1Column[] => { + const combinedAnswer = transformAnswersToListOfStrings((item as QuestionnaireItem).type, item.answer || []).join(', '); + + const columns: ITableH1Column[] = [ + { + id: `${item.linkId}-question`, + type: (item as QuestionnaireItem).type === ItemType.GROUP ? TABLE_HN1_TABLE_TYPES.HEADER : TABLE_HN1_TABLE_TYPES.VALUE, + value: item.text || '', + }, + { + value: combinedAnswer, + type: TABLE_HN1_TABLE_TYPES.VALUE, + id: `${item.linkId}-answer`, + }, + ]; + + return columns; +}; +const transformItemToHN1Row = (item: QuestionnaireResponseItem): ITableH1Row => { + const columns = createColumnsFromAnswers(item); + + return { + id: item.linkId, + columns: columns, + }; +}; diff --git a/src/components/formcomponents/table/tables/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx similarity index 67% rename from src/components/formcomponents/table/tables/TableHn2.tsx rename to src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 1aa33199..0ff247be 100644 --- a/src/components/formcomponents/table/tables/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react'; -import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; import { HeaderCategory, @@ -13,7 +13,8 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { ITableH2, findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject } from './helpers'; +import { ITableH2Row } from './interface'; +import { findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject } from './utils'; interface Props { tableCodesCoding: Coding[]; @@ -23,21 +24,21 @@ interface Props { const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { const [sortDir, setSortDir] = useState(SortDirection.asc); const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); + const tableHeader = getColumnNames(tableCodesCoding); + //TODO: find index to sort by - const [responseItems, setResponseItems] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); + const [rows, setRows] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); const handleSort = (): void => { setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); }; - useEffect(() => { - setResponseItems(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); - }, [sortDir, items, questionnaireResponse]); - - return ( - + setRows(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); + }, [sortDir, items, questionnaireResponse, tableHeader.length]); + return rows.length ? ( + - {getColumnNames(tableCodesCoding).map(column => ( + {tableHeader.map(column => ( - {responseItems.map(item => { + {rows.map(item => { return ( - {item.row.map(row => ( - - {row.text} + {item.columns.map(column => ( + + {column.text} ))} @@ -63,6 +64,8 @@ const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JS })} + ) : ( + <> ); }; diff --git a/src/components/formcomponents/table/tables/table-hn2/interface.ts b/src/components/formcomponents/table/tables/table-hn2/interface.ts new file mode 100644 index 00000000..9cf04a5d --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn2/interface.ts @@ -0,0 +1,14 @@ +export interface ITableH2Column { + id: string; + text: string; + index: number; +} + +export interface ITableH2Row { + id: string; + columns: ITableH2Column[]; +} + +export interface ITableH2 { + rows: ITableH2Row; +} diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts new file mode 100644 index 00000000..cbfcaf3d --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -0,0 +1,85 @@ +import * as uuid from 'uuid'; + +import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; + +import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; + +import { ITableH2Row } from './interface'; +import CodingSystems, { TableColumnName, TableOrderingColum } from '../../../../../constants/codingsystems'; +import codeSystems from '../../../../../constants/codingsystems'; +import ItemType from '../../../../../constants/itemType'; +import { filterEnabledQuestionnaireItems, findIndexByCode, getValueIfDataReceiver, transformAnswersToListOfStrings } from '../utils'; + +const getNumberOfColums = (items: QuestionnaireItem[]): number => + Math.max(...items.map(item => findIndexByCode(item, codeSystems.TableColumn))); + +export const getTableHN2bodyObject = ( + items: QuestionnaireItem[], + questionnaireResponse?: QuestionnaireResponse | null, + sortColumnIndex?: number, + sortOrder?: SortDirection +): ITableH2Row[] => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + + const maxColumns = getNumberOfColums(items); + + const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); + + const tableRows: ITableH2Row[] = itemsToShow.reduce((acc, item) => { + const columnIndex = findIndexByCode(item, codeSystems.TableColumn) - 1; + const answer = getValueIfDataReceiver(item, questionnaireResponse) || []; + const columnText = item.type === ItemType.DISPLAY ? item.text || '' : transformAnswersToListOfStrings(item.type, answer).join(', '); + + let row = acc.find(r => r.columns[columnIndex]?.text === ''); + if (!row) { + row = { + id: uuid.v4(), + columns: Array.from({ length: maxColumns }, (_, colIdx) => ({ + id: `empty-${colIdx}`, + text: '', + index: colIdx + 1, + })), + }; + acc.push(row); + } + + row.columns[columnIndex] = { + id: item.linkId, + text: columnText, + index: columnIndex + 1, + }; + + return acc; + }, []); + if (!!sortColumnIndex && !!sortOrder) { + return sortTableRows(tableRows, sortColumnIndex, sortOrder); + } + + return tableRows; +}; + +/* SORTING */ +export const sortTableRows = (table: ITableH2Row[], columnIndex: number, sortOrder: SortDirection): ITableH2Row[] => { + return table.sort((a, b) => { + const aValue = a?.columns.length > columnIndex ? a?.columns[columnIndex]?.text || '' : ''; + const bValue = b?.columns.length > columnIndex ? b?.columns[columnIndex]?.text || '' : ''; + + return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + }); +}; +export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined => { + const code = findCodeBySystem(coding, TableOrderingColum); + const columnsToDisplay = coding?.filter(codeElement => codeElement.system === CodingSystems.TableColumnName); + const codeForSortedColumn = code[0]?.code; + const columnToSortBy = columnsToDisplay?.find(coding => coding?.code === codeForSortedColumn); + return columnToSortBy; +}; +export const getColumnNames = (coding: Coding[]): string[] => { + return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); +}; +//TODO: Dette finnes fra før, kan bruke eksisterende funksjonalitet +export function findCodeBySystem(coding: T[], system?: string): T[] { + return coding.filter(code => code.system === system); +} diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts new file mode 100644 index 00000000..218bd7f0 --- /dev/null +++ b/src/components/formcomponents/table/tables/utils.ts @@ -0,0 +1,295 @@ +import moment from 'moment'; + +import { + Attachment, + Coding, + Quantity, + QuestionnaireItem, + QuestionnaireItemEnableBehaviorCodes, + QuestionnaireItemEnableWhen, + QuestionnaireResponse, + QuestionnaireResponseItem, + QuestionnaireResponseItemAnswer, +} from '../../../../types/fhir'; + +import { parseDate } from '@helsenorge/date-time/components/time-input/date-core'; +import * as DateTimeConstants from '@helsenorge/date-time/constants/datetime'; + +import { DATEFORMATS } from './constants'; +import { CodeSystems } from '../../../../constants/codingsystems'; +import ItemType from '../../../../constants/itemType'; +import { getQuestionnaireItemCodeValue } from '../../../../util/codingsystem'; +import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; +import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; +import { Path, enableWhenMatchesAnswer, getQuestionnaireResponseItemsWithLinkId, isInGroupContext } from '../../../../util/refero-core'; + +function extractValueFromCoding(coding: Coding | undefined, field: keyof Pick = 'display'): string { + if (!coding) return ''; + return coding[field] ?? ''; +} +function extractValueFromQuantity( + quantity: Quantity | undefined, + field: keyof Pick = 'value' +): string | number { + if (!quantity) return ''; + switch (field) { + case 'value': + return quantity.value ?? 0; + case 'unit': + return quantity.unit ?? ''; + case 'system': + return quantity.system ?? ''; + case 'code': + return quantity.code ?? ''; + default: + return ''; + } +} +const extractValueFromDate = (inputValue?: string): string => { + if (!inputValue) { + return ''; + } + const date = parseDate(String(inputValue)); + //TODO: Check if we can use language from state here + return moment(date).locale('nb').format(DATEFORMATS.DATE); +}; +const extractValueFromTime = (inputDate?: string): string => { + if (!inputDate) { + return ''; + } + const date = parseDate(String(inputDate)); + const momentDate = moment(date); + return `${momentDate.hours()}${DateTimeConstants.TIME_SEPARATOR}${momentDate.minutes()}`; +}; +const extractValueFromDateTime = (inputValue?: string): string => { + if (!inputValue) { + return ''; + } + const date = parseDate(String(inputValue)); + //TODO: Check if we can use language from state here + return moment(date).locale('nb').format(DATEFORMATS.DATETIME); +}; + +//TODO: make more cases +const extractValueFromAttachment = ( + inputValue?: Attachment, + field: keyof Pick = 'url' +): string | number => { + if (inputValue) { + switch (field) { + case 'data': + return inputValue.data ?? ''; + case 'url': + return inputValue.url ?? ''; + case 'title': + return inputValue.title ?? ''; + case 'size': + return inputValue.size ?? 0; + case 'contentType': + return inputValue.contentType ?? ''; + case 'language': + return inputValue.language ?? ''; + case 'id': + return inputValue.id ?? ''; + case 'hash': + return inputValue.hash ?? ''; + case 'creation': + return inputValue.creation ?? ''; + + default: + return ''; + } + } else { + return ''; + } +}; + +export const getPrimitiveValueFromItemType = ( + type: typeof ItemType[keyof typeof ItemType], + res: QuestionnaireResponseItemAnswer +): string | number | never => { + switch (type) { + case ItemType.STRING: + case ItemType.TEXT: + return res.valueString ?? ''; + case ItemType.INTEGER: + return res.valueInteger ?? 0; + case ItemType.DECIMAL: + return res.valueDecimal ?? 0; + case ItemType.BOOLEAN: + return res.valueBoolean === true ? 'Ja' : 'Nei' ?? false; + case ItemType.DATE: + return extractValueFromDate(res.valueDate); + case ItemType.DATETIME: + return extractValueFromDateTime(res.valueDateTime); + case ItemType.TIME: + return extractValueFromTime(res.valueTime); + case ItemType.CHOICE: + case ItemType.OPENCHOICE: + return extractValueFromCoding(res.valueCoding, 'display'); + case ItemType.QUANTITY: + return extractValueFromQuantity(res.valueQuantity); + case ItemType.ATTATCHMENT: + return extractValueFromAttachment(res.valueAttachment, 'data'); + default: + return ''; + } +}; +export function getQuestionnaireResponseItemAnswer( + type: typeof ItemType[keyof typeof ItemType], + result: never[] +): QuestionnaireResponseItemAnswer | Array { + switch (type) { + case ItemType.BOOLEAN: + return result.map(bool => ({ valueBoolean: bool })); + case ItemType.CHOICE: + case ItemType.OPENCHOICE: + return result.map(coding => ({ valueCoding: coding })); + case ItemType.QUANTITY: + return result.map(quantity => ({ valueQuantity: quantity })); + case ItemType.TEXT: + case ItemType.STRING: + return result.map(text => ({ valueString: text })); + case ItemType.INTEGER: + return result.map(integer => ({ valueInteger: integer })); + case ItemType.DECIMAL: + return result.map(decimal => ({ valueDecimal: decimal })); + case ItemType.DATETIME: + return result.map(dateTime => ({ valueDateTime: dateTime })); + case ItemType.DATE: + return result.map(date => ({ valueDate: date })); + case ItemType.TIME: + return result.map(time => ({ valueTime: time })); + case ItemType.ATTATCHMENT: + return result.map(attachment => ({ valueAttachment: attachment })); + default: + return []; + } +} + +export const getAnswerFromDisplayType = ( + item: QuestionnaireItem +): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined => { + return { valueString: item.text }; +}; + +export const getValueIfDataReceiver = ( + item: QuestionnaireItem, + questionnaireResponse?: QuestionnaireResponse | null +): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined => { + const extension = getCopyExtension(item); + + if (extension) { + let result = evaluateFhirpathExpressionToGetString(extension, questionnaireResponse); + if (!!getCalculatedExpressionExtension(item)) { + result = result.map((m: { value: number }) => m.value); + } + return getQuestionnaireResponseItemAnswer(item.type, result); + } + return undefined; +}; + +export const convertValuesToStrings = (values: Array): string[] => values.map(value => value.toString()); + +export const extractValuesFromAnswer = ( + type: typeof ItemType[keyof typeof ItemType], + questionnaireAnswer?: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] +): Array => { + if (questionnaireAnswer === undefined) { + return []; + } + + return Array.isArray(questionnaireAnswer) + ? questionnaireAnswer.map(answer => getPrimitiveValueFromItemType(type, answer)) + : [getPrimitiveValueFromItemType(type, questionnaireAnswer)]; +}; + +export const transformAnswersToListOfStrings = ( + type: typeof ItemType[keyof typeof ItemType], + answer: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] +): string[] => { + const value = extractValuesFromAnswer(type, answer); + if (value.length === 0) { + return []; + } + return convertValuesToStrings(value); +}; + +export const findIndexByCode = (item: QuestionnaireItem, codesystem: CodeSystems['TableColumn']): number => { + const index = getQuestionnaireItemCodeValue(item, codesystem); + return index ? Number(index) : -1; +}; + +/* ENABLE WHEN */ +export const filterEnabledQuestionnaireItems = (items: QuestionnaireItem[], response: QuestionnaireResponse): QuestionnaireItem[] => { + const responseItems = response.item || []; + + const checkItemEnabled = (item: QuestionnaireItem, currentPath: Path[]): boolean => { + if (!item.enableWhen) { + return true; + } + return isConditionEnabled(item.enableWhen, item.enableBehavior, currentPath, responseItems); + }; + + const recursivelyFilterItems = (currentItems: QuestionnaireItem[], currentPath: Path[] = []): QuestionnaireItem[] => { + return currentItems.reduce((filteredItems: QuestionnaireItem[], currentItem: QuestionnaireItem, index) => { + const newPath = currentPath.concat([{ linkId: currentItem.linkId, index }]); + const isCurrentItemEnabled = checkItemEnabled(currentItem, newPath); + + const filteredNestedItems = currentItem.item ? recursivelyFilterItems(currentItem.item, newPath) : []; + + return isCurrentItemEnabled + ? filteredItems.concat([{ ...currentItem, item: filteredNestedItems }]) + : filteredItems.concat(filteredNestedItems); + }, []); + }; + + return recursivelyFilterItems(items); +}; + +export const isConditionEnabled = ( + conditions: QuestionnaireItemEnableWhen[], + behavior: string | undefined, + currentPath: Path[], + responseItems: QuestionnaireResponseItem[] +): boolean => { + const isSingleConditionMet = (condition: QuestionnaireItemEnableWhen): boolean => { + const matchingResponseItem = getQuestionnaireResponseItemsWithLinkId(condition.question, responseItems, true).find(item => + isInGroupContext(currentPath, item, responseItems) + ); + + return matchingResponseItem ? enableWhenMatchesAnswer(condition, matchingResponseItem.answer) : false; + }; + + const conditionMatches = conditions.map(isSingleConditionMet); + return behavior === QuestionnaireItemEnableBehaviorCodes.ALL ? conditionMatches.every(Boolean) : conditionMatches.some(Boolean); +}; + +export const addAnswerToItems = ( + items: QuestionnaireItem[], + questionnaireResponse?: QuestionnaireResponse | null +): QuestionnaireResponseItem[] => { + if (!questionnaireResponse || items.length === 0) { + return []; + } + const processItem = (item: QuestionnaireItem): QuestionnaireResponseItem => { + const res = getValueIfDataReceiver(item, questionnaireResponse); + const clonedItems = structuredClone(item); + const questionnaireResponseItem: QuestionnaireResponseItem = { + ...clonedItems, + }; + if (!Array.isArray(res) && res !== undefined) { + questionnaireResponseItem.answer = [res]; + } else { + questionnaireResponseItem.answer = res; + } + + if (item.item && item.item.length > 0) { + questionnaireResponseItem.item = addAnswerToItems(item.item, questionnaireResponse); + } + + return questionnaireResponseItem; + }; + + return items.map(processItem); +}; diff --git a/src/components/index.tsx b/src/components/index.tsx index 82803138..f636e8ea 100644 --- a/src/components/index.tsx +++ b/src/components/index.tsx @@ -235,9 +235,6 @@ class Refero extends React.Component); } - // console.log('responseItem - index', item); - // if (ItemType.GROUP === item.type && getCodingTextTableValues(item) && isTableCode(getCodingTextTableValues(item))) { - // } renderedItems.push( { loginButton={} syncQuestionnaireResponse validateScriptInjection + language={LanguageLocales.NORWEGIAN} />
) : ( diff --git a/src/preview/resources/referoResources.tsx b/src/preview/resources/referoResources.tsx index cf186a38..195425a5 100644 --- a/src/preview/resources/referoResources.tsx +++ b/src/preview/resources/referoResources.tsx @@ -303,5 +303,6 @@ export const getResources = (language: string) => { linkOpensInNewTab: 'Åpnes i ny fane', nextStep: 'Neste', previousStep: 'Forrige', + openChoiceOption: 'Annet', }; }; diff --git a/src/preview/skjema/kun_qest.json b/src/preview/skjema/kun_qest.json index fb9e7b03..6d0ceba1 100644 --- a/src/preview/skjema/kun_qest.json +++ b/src/preview/skjema/kun_qest.json @@ -1,6 +1,7 @@ { "resourceType": "Questionnaire", "language": "nb-NO", + "id": "292c4322-20d3-4893-a249-a6753994dadd", "status": "draft", "publisher": "NHN", "meta": { @@ -59,12 +60,12 @@ } } ], - "id": "292c4322-20d3-4893-a249-a6753994dadd", "item": [ { "linkId": "4233cb23-aff4-4e72-8c89-41cdc44f8939", "type": "group", "text": "Personalia", + "required": false, "item": [ { "linkId": "855afb10-1dd5-46d4-ab56-d8b8587323a4", @@ -78,13 +79,13 @@ "text": "Hvor gammel er du?", "required": false } - ], - "required": false + ] }, { "linkId": "f6764114-86d9-402d-8e05-aca25f980f5f", "type": "group", "text": "Sykdommer", + "required": false, "item": [ { "linkId": "3cf13e1a-a775-42cc-8182-babde16743aa", @@ -104,13 +105,13 @@ "text": "Kan du si litt mer om sykdommen din?", "required": false } - ], - "required": false + ] }, { "linkId": "2e71aeb8-aa1c-4bc4-b3a9-b82ed16acc28", "type": "group", "text": "Oppsummering", + "required": false, "item": [ { "linkId": "2f566ffe-3f0c-4b3b-8b55-bdcb8aaea08b", @@ -129,11 +130,25 @@ } } ], + "required": false, "item": [ { "linkId": "b0c00973-36bd-49ad-92cf-887bbcf6f9b6", "type": "group", "text": "Personalia", + "required": false, + "enableWhen": [ + { + "question": "855afb10-1dd5-46d4-ab56-d8b8587323a4", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "314166c1-cb72-4c67-b0a9-d90581d658ad", + "operator": "exists", + "answerBoolean": true + } + ], "item": [ { "linkId": "fd70929b-7421-4f59-8c0d-d86366d260c7", @@ -197,13 +212,30 @@ } ] } - ], - "required": false + ] }, { "linkId": "765cc891-f702-4361-8a5f-719bcb26ec34", "type": "group", "text": "Sykdommer", + "required": false, + "enableWhen": [ + { + "question": "3cf13e1a-a775-42cc-8182-babde16743aa", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "e32a3b49-42df-4394-9560-2cf48155e182", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", + "operator": "exists", + "answerBoolean": true + } + ], "item": [ { "linkId": "0388ed83-02a8-4660-80e3-d05208bb1dea", @@ -298,14 +330,11 @@ } ] } - ], - "required": false + ] } - ], - "required": false + ] } - ], - "required": false + ] } ] } diff --git a/src/preview/skjema/kun_qest_hn2.json b/src/preview/skjema/kun_qest_hn2.json new file mode 100644 index 00000000..4f43175c --- /dev/null +++ b/src/preview/skjema/kun_qest_hn2.json @@ -0,0 +1,1146 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "1c90d68d-78d8-4c7b-b5fb-44c165babbcc", + "name": "NHN_Test_tableHN2", + "title": "tableHN2", + "description": "Skjema før time for nyrepasient", + "version": "0.1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + }, + { + "code": "1", + "display": "Kun innbygger selv", + "system": "http://helsenorge.no/fhir/KanUtforesAv" + } + ] + }, + "useContext": [ + { + "code": { + "system": "http://hl7.org/fhir/ValueSet/usage-context-type", + "code": "focus", + "display": "Clinical Focus" + }, + "valueCodeableConcept": { + "coding": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1.8655", + "display": "tableHN2" + } + ] + } + } + ], + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", + "valueReference": { + "reference": "Endpoint/1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ + { + "resourceType": "ValueSet", + "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", + "version": "1.0", + "name": "Viktighet", + "title": "Viktighet", + "date": "2023-03-29T13:43:26.881Z", + "status": "draft", + "publisher": "Viktighet", + "compose": { + "include": [ + { + "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", + "concept": [ + { + "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", + "code": "0", + "display": "0" + }, + { + "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", + "code": "1", + "display": "1" + }, + { + "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", + "code": "2", + "display": "2" + }, + { + "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", + "code": "3", + "display": "3" + }, + { + "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", + "code": "4", + "display": "4" + }, + { + "id": "50e5f8f0-db46-45f9-8fda-67039933756e", + "code": "5", + "display": "5" + }, + { + "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", + "code": "6", + "display": "6" + }, + { + "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", + "code": "7", + "display": "7" + }, + { + "id": "dc888467-ab8b-4412-82ca-0312edcc0695", + "code": "8", + "display": "8" + }, + { + "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", + "code": "9", + "display": "9" + }, + { + "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", + "code": "10", + "display": "10" + } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", + "type": "group", + "text": "Data inn", + "required": false, + "item": [ + { + "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", + "type": "boolean", + "text": "Hoven i beina", + "required": false, + "item": [ + { + "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "type": "choice", + "text": "Viktighet Hoven i beina", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] + } + ] + }, + { + "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "type": "boolean", + "text": "Kløe i huden", + "required": false, + "item": [ + { + "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "type": "choice", + "text": "Viktighet kløe i huden", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } + ] + } + ] + } + ] + }, + { + "linkId": "85bcab33-b84b-4f9f-cd98-6bfa6dedc8c7", + "type": "group", + "text": "Oppsummering med grupper. Innrykk trenger en ikke ta hensyn til, da data blir presentert i tabell. Gruppe benyttes kun til å få inn en verdi i kolonne 1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "c87dc79b-afd8-4ef5-8ebf-1b9d3a6a4d9f" + } + ], + "item": [ + { + "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", + "type": "group", + "text": "Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn2" + } + ] + } + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" + }, + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" + }, + { + "code": "DESC", + "display": "Descending", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" + } + ], + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "exists", + "answerBoolean": true + } + ], + "item": [ + { + "linkId": "268a7080-0067-4cbb-8a4d-8bea26b46296", + "type": "display", + "text": "Hoven i beina", + "code": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403", + "code": "1", + "display": "Sykdom" + } + ], + "required": false, + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", + "type": "choice", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "operator": "exists" + } + ], + "text": "Viktighet", + "code": [ + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "941622c1-0a8d-487d-8214-b7cf9cba6210" + } + ] + }, + { + "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", + "type": "choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "answerBoolean": true, + "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "operator": "exists" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "code": [ + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "4a7d5ffd-54ed-433e-8d40-0173a9dbbfbc" + } + ] + }, + { + "linkId": "cc502a45-030f-4729-8ac8-3c982a43e379", + "type": "display", + "text": "Kløe i huden", + "required": false, + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "7c01e07f-58d2-43b0-8c87-0ddf595d49e9" + } + ] + }, + { + "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", + "type": "choice", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "operator": "exists" + } + ], + "text": "Viktiget", + "code": [ + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "9bd380fc-8ca3-4fba-8a32-8d44f62a5645" + } + ] + }, + { + "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", + "type": "choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "answerBoolean": true, + "question": "926cc2a7-1853-46e6-8e98-cb3405730292", + "operator": "exists" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "code": [ + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "6344dcf1-ff0b-4dd0-8f07-3b9c54172155" + } + ] + } + ] + } + ] + }, + { + "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", + "type": "group", + "text": "Oppsummering med uten grupper, men display?", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "076fe6bd-a31f-47fd-b471-593005d9e25c", + "type": "boolean", + "text": "Hoven i beina", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='147ab493-0186-4a4e-8167-c10c829c09ca').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=" + } + ] + }, + { + "linkId": "94205f06-49ee-4f90-8c7d-5239753f3968", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "question": "076fe6bd-a31f-47fd-b471-593005d9e25c", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "operator": "exists" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "97604dcd-38c1-456d-8f3c-586e59199d58", + "type": "choice", + "text": "Viktighet Hoven i beina", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ + { + "question": "076fe6bd-a31f-47fd-b471-593005d9e25c", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "operator": "exists" + } + ], + "readOnly": true + }, + { + "linkId": "76ef29bc-ab50-4446-9fbd-5c7e67417659", + "type": "boolean", + "text": "Kløe i huden", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='c6cedf0b-70be-40ce-cc41-cff3cbcabc17').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=" + } + ] + }, + { + "linkId": "95541265-2a26-4ad6-8d4a-7f4990fb74e3", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [ + { + "question": "76ef29bc-ab50-4446-9fbd-5c7e67417659", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "926cc2a7-1853-46e6-8e98-cb3405730292", + "operator": "exists" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "95ba859c-84a8-456f-8f9e-2d95ac75d1ed", + "type": "choice", + "text": "Viktighet kløe i huden", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [ + { + "question": "76ef29bc-ab50-4446-9fbd-5c7e67417659", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "operator": "exists" + } + ], + "readOnly": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-2", + "display": "SOT-2" + } + ], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-3", + "display": "SOT-3" + } + ], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + } + ] +} diff --git a/src/preview/skjema/kun_qest_repeatable.json b/src/preview/skjema/kun_qest_repeatable.json new file mode 100644 index 00000000..5593de9a --- /dev/null +++ b/src/preview/skjema/kun_qest_repeatable.json @@ -0,0 +1,619 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "7c79c08e-492d-47fd-bc09-4964645974b5", + "name": "Table_HN1_MultiSvar", + "title": "Mutisvar Table-HN1 Oppsummering", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + } + ] + }, + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + } + ] + } + } + ], + "item": [ + { + "linkId": "e849303c-293b-41c9-9900-1ea3e12b7492", + "type": "group", + "text": "Informasjon", + "required": false, + "item": [ + { + "linkId": "4ced67ca-c9e4-44fd-9339-26c3fe2741bf", + "type": "string", + "text": "Har du barn?", + "required": false + }, + { + "linkId": "b8e63b95-baef-41bb-c141-19ccc1ebb5e2", + "type": "integer", + "text": "Hvor mange barn har du?", + "required": false + }, + { + "linkId": "dc998a35-ee55-4715-85df-e68f117ece30", + "type": "string", + "text": "Skriv navn til barna?", + "required": false, + "repeats": true + }, + { + "linkId": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "type": "boolean", + "text": "Spiser dere grønnsaker?", + "required": false + }, + { + "linkId": "70760537-890f-452e-aa60-07f8534088b0", + "type": "open-choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "d3b04993-a61f-47c9-d5ba-3c5e539f6c47", + "code": "frukt", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Frukt" + } + }, + { + "valueCoding": { + "id": "e95b7df4-0d53-4a16-c677-79dbaf6ab5f1", + "code": "salat", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Salat" + } + }, + { + "valueCoding": { + "id": "e36d6229-1aea-4826-81f7-4dafce056165", + "code": "asparges", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Asparges" + } + }, + { + "valueCoding": { + "id": "9b5f2c33-1d12-4874-8157-07ad382721c1", + "code": "gresskar", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gresskar" + } + }, + { + "valueCoding": { + "id": "40a50872-07af-4ee9-9985-5c0670fed596", + "code": "gulrot", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gulrot" + } + } + ], + "enableWhen": [ + { + "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "operator": "=", + "answerBoolean": true + } + ], + "text": "Hvilke grønnsaker spiser dere?", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ] + } + ] + }, + { + "linkId": "aff40185-28d7-4529-81c9-e73ed058c4c6", + "type": "group", + "text": "Oppsummering", + "required": false, + "item": [ + { + "linkId": "9194f78d-7a87-46ba-815d-44d884139778", + "type": "group", + "text": "Table Oppsummering", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn1" + } + ] + } + } + ], + "item": [ + { + "linkId": "a8d836c1-f893-43ff-a287-393057af2988", + "type": "string", + "text": "Har du barn?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='4ced67ca-c9e4-44fd-9339-26c3fe2741bf').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "4ced67ca-c9e4-44fd-9339-26c3fe2741bf", + "operator": "exists" + } + ] + }, + { + "linkId": "c2e09551-a465-4a1d-832d-0d0130a8665e", + "type": "integer", + "text": "Hvor mange barn har du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='b8e63b95-baef-41bb-c141-19ccc1ebb5e2').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "b8e63b95-baef-41bb-c141-19ccc1ebb5e2", + "operator": "exists" + } + ] + }, + { + "linkId": "93864380-1c99-489d-87c5-1e7e7af3a55d", + "type": "string", + "text": "Skriv navn til barna?", + "required": false, + "repeats": true, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='dc998a35-ee55-4715-85df-e68f117ece30').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "dc998a35-ee55-4715-85df-e68f117ece30", + "operator": "exists" + } + ] + }, + { + "linkId": "5e7bd964-bdc0-4152-a6f8-a9a2e698b45a", + "type": "boolean", + "text": "Spiser dere grønnsaker?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "operator": "=" + } + ] + }, + { + "linkId": "8b86be37-902e-4d6c-8af9-b7625f28c0df", + "type": "open-choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "d3b04993-a61f-47c9-d5ba-3c5e539f6c47", + "code": "frukt", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Frukt" + } + }, + { + "valueCoding": { + "id": "e95b7df4-0d53-4a16-c677-79dbaf6ab5f1", + "code": "salat", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Salat" + } + }, + { + "valueCoding": { + "id": "e36d6229-1aea-4826-81f7-4dafce056165", + "code": "asparges", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Asparges" + } + }, + { + "valueCoding": { + "id": "9b5f2c33-1d12-4874-8157-07ad382721c1", + "code": "gresskar", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gresskar" + } + }, + { + "valueCoding": { + "id": "40a50872-07af-4ee9-9985-5c0670fed596", + "code": "gulrot", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gulrot" + } + } + ], + "enableWhen": [ + { + "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "70760537-890f-452e-aa60-07f8534088b0", + "operator": "exists" + } + ], + "text": "Hvilke grønnsaker spiser dere?", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='70760537-890f-452e-aa60-07f8534088b0').answer.value" + } + ], + "readOnly": true + } + ] + } + ] + }, + { + "linkId": "d9e5938b-f7fc-4f9e-8ba7-fd2e678f77e1", + "type": "group", + "text": "Vanlig oppsummering", + "required": false, + "item": [ + { + "linkId": "5e8bfa58-f5fc-43f2-cadb-460ae03f7886", + "type": "string", + "text": "Har du barn?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='4ced67ca-c9e4-44fd-9339-26c3fe2741bf').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "4ced67ca-c9e4-44fd-9339-26c3fe2741bf", + "operator": "exists" + } + ] + }, + { + "linkId": "54b75fe6-883e-43be-814e-b3b512fbb670", + "type": "integer", + "text": "Hvor mange barn har du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='b8e63b95-baef-41bb-c141-19ccc1ebb5e2').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "b8e63b95-baef-41bb-c141-19ccc1ebb5e2", + "operator": "exists" + } + ] + }, + { + "linkId": "d42eaddb-9233-4c48-f157-4898c1024cbf", + "type": "string", + "text": "Skriv navn til barna?", + "required": false, + "repeats": true, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='dc998a35-ee55-4715-85df-e68f117ece30').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "dc998a35-ee55-4715-85df-e68f117ece30", + "operator": "exists" + } + ] + }, + { + "linkId": "0f8f98c2-a329-4121-94ea-b0f176aad236", + "type": "boolean", + "text": "Spiser dere grønnsaker?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "operator": "=" + } + ] + }, + { + "linkId": "defe3dc7-8780-47ee-9f0e-b3e4640399fc", + "type": "open-choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "d3b04993-a61f-47c9-d5ba-3c5e539f6c47", + "code": "frukt", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Frukt" + } + }, + { + "valueCoding": { + "id": "e95b7df4-0d53-4a16-c677-79dbaf6ab5f1", + "code": "salat", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Salat" + } + }, + { + "valueCoding": { + "id": "e36d6229-1aea-4826-81f7-4dafce056165", + "code": "asparges", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Asparges" + } + }, + { + "valueCoding": { + "id": "9b5f2c33-1d12-4874-8157-07ad382721c1", + "code": "gresskar", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gresskar" + } + }, + { + "valueCoding": { + "id": "40a50872-07af-4ee9-9985-5c0670fed596", + "code": "gulrot", + "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", + "display": "Gulrot" + } + } + ], + "enableWhen": [ + { + "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", + "operator": "=", + "answerBoolean": true + }, + { + "answerBoolean": true, + "question": "70760537-890f-452e-aa60-07f8534088b0", + "operator": "exists" + } + ], + "text": "Hvilke grønnsaker spiser dere?", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='70760537-890f-452e-aa60-07f8534088b0').answer.value" + } + ], + "readOnly": true + } + ] + } + ] +} diff --git a/src/preview/styles/skjemautfyller.scss b/src/preview/styles/skjemautfyller.scss index ac2369fd..bef97053 100644 --- a/src/preview/styles/skjemautfyller.scss +++ b/src/preview/styles/skjemautfyller.scss @@ -263,6 +263,16 @@ background-color: #efe4fd; padding: 1.75rem 2rem; } + &__table_hn1 { + &__heading { + font-weight: bold; + } + } + &__table_hn2 { + &__heading { + font-weight: bold; + } + } } .extra_savebutton_wrapper { diff --git a/src/util/fhirpathHelper.ts b/src/util/fhirpathHelper.ts index 8f8dfec0..2d1d04ba 100644 --- a/src/util/fhirpathHelper.ts +++ b/src/util/fhirpathHelper.ts @@ -17,7 +17,11 @@ export function evaluateFhirpathExpressionToGetDate(item: QuestionnaireItem, fhi export function evaluateFhirpathExpressionToGetString(fhirExtension: Extension, questionnare?: QuestionnaireResponse | null): any { const qCopy = structuredClone(questionnare); - return fhirpath.evaluate(qCopy, fhirExtension.valueString, null, fhirpath_r4_model); + try { + return fhirpath.evaluate(qCopy, fhirExtension.valueString, null, fhirpath_r4_model); + } catch (error) { + return []; + } } export function evaluateExtension(path: string | object, questionnare?: QuestionnaireResponse | null, context?: 'object'): unknown { diff --git a/src/util/index.ts b/src/util/index.ts index 07ee8c09..86140a6c 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -1,9 +1,11 @@ import marked from 'marked'; +import { ComponentClass } from 'react-redux'; import * as uuid from 'uuid'; import { Questionnaire, QuestionnaireResponseItem, QuestionnaireItem, QuestionnaireResponseItemAnswer } from '../types/fhir'; import { isValid, invalidNodes } from '@helsenorge/core-utils/string-utils'; +import { ValidationProps } from '@helsenorge/form/components/form/validation'; import { getQuestionnaireItemCodeValue } from './codingsystem'; import { @@ -31,6 +33,7 @@ import Quantity from '../components/formcomponents/quantity/quantity'; import StringComponent from '../components/formcomponents/string/string'; import Table from '../components/formcomponents/table/Table'; import Text from '../components/formcomponents/text/text'; +import { Props } from '../components/with-common-functions'; import CodingSystemConstants from '../constants/codingsystems'; import ExtensionConstants from '../constants/extensions'; import { HyperlinkTarget } from '../constants/hyperlinkTarget'; @@ -60,10 +63,11 @@ export const isTableCode = (extensionCode: string | string[]): boolean => { }); return isTable; }; + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function getComponentForItem(type: string, extensionCode?: string | string[]) { if (String(type) === itemType.GROUP && !!extensionCode && isTableCode(extensionCode)) { - return Table; + return Table as ComponentClass & Props>; } else if (String(type) === ItemType.GROUP) { return Group; } diff --git a/src/util/map-props.ts b/src/util/map-props.ts index 2b90e3be..bbf6358c 100644 --- a/src/util/map-props.ts +++ b/src/util/map-props.ts @@ -17,10 +17,6 @@ import { getCopyExtension, getCalculatedExpressionExtension } from '../util/exte import { evaluateFhirpathExpressionToGetString } from '../util/fhirpathHelper'; export function mapStateToProps(state: GlobalState, originalProps: Props): Props { - // if (originalProps.item?.type === 'group') { - // console.log('map-props, originalProps.item', originalProps.item); - // console.log('map-props, originalProps.responseItem', originalProps.responseItem); - // } const newAnswer = getValueIfDataReceiver(state, originalProps); if (!originalProps.item || !originalProps.item.enableWhen) { return { ...originalProps, enable: true, ...(newAnswer !== undefined && { answer: newAnswer }) } as Props; From 0e5145345ef81242584fb53cc2ea880abb62fe76 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:37:07 +0100 Subject: [PATCH 21/83] updated changes and version in package.json --- CHANGES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index 84d45e7b..5681d20b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.2-beta02 + +--- + +- Added support for table-hn2 and table-hn1 code in summary. + ## 13.2.2-beta01 --- From 16a3810e64d83d43eba23578cc24a5bcf046b52a Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:04:53 +0100 Subject: [PATCH 22/83] version --- CHANGES | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 5681d20b..d41c3f3f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -## 13.2.2-beta02 +## 13.2.2-beta04 --- diff --git a/package.json b/package.json index 0974d5b3..2ff99f78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.3-beta01", + "version": "13.2.2-beta04", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From f170f7a93a0722461b5193841d0c7aff4b587c7b Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:07:42 +0100 Subject: [PATCH 23/83] version --- CHANGES | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d41c3f3f..5fa58edc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.2-beta05 + +--- + +- correct version + ## 13.2.2-beta04 --- diff --git a/package.json b/package.json index 2ff99f78..8cc7638f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.2-beta04", + "version": "13.2.2-beta05", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 4302d4489c4b984d7c4a4d809fc9fa2d8e7f9a09 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:15:54 +0100 Subject: [PATCH 24/83] fixed missing mock in tests --- CHANGES | 6 ++ package-lock.json | 142 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 149 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 5fa58edc..76370f33 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.2-beta06 + +--- + +- added package to mock structuredClone in tests + ## 13.2.2-beta05 --- diff --git a/package-lock.json b/package-lock.json index b2d30dbb..c087dd74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,6 +51,7 @@ "@types/yargs": "^17.0.24", "@typescript-eslint/eslint-plugin": "^5.12.0", "@typescript-eslint/parser": "^5.12.0", + "@ungap/structured-clone": "^1.2.0", "@vitejs/plugin-react": "^4.2.1", "@ungap/structured-clone": "^1.2.0", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", @@ -4407,6 +4408,83 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "node_modules/@vitejs/plugin-react": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz", + "integrity": "sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.5", + "@babel/plugin-transform-react-jsx-self": "^7.23.3", + "@babel/plugin-transform-react-jsx-source": "^7.23.3", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0" + } + }, + "node_modules/@vue/component-compiler-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz", + "integrity": "sha512-97sfH2mYNU+2PzGrmK2haqffDpVASuib9/w2/noxiFi31Z54hW+q3izKQXXQZSNhtiUpAI36uSuYepeBe4wpHQ==", + "dev": true, + "dependencies": { + "consolidate": "^0.15.1", + "hash-sum": "^1.0.2", + "lru-cache": "^4.1.2", + "merge-source-map": "^1.1.0", + "postcss": "^7.0.36", + "postcss-selector-parser": "^6.0.2", + "source-map": "~0.6.1", + "vue-template-es2015-compiler": "^1.9.0" + }, + "optionalDependencies": { + "prettier": "^1.18.2 || ^2.0.0" + } + }, + "node_modules/@vue/component-compiler-utils/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/@vue/component-compiler-utils/node_modules/picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "node_modules/@vue/component-compiler-utils/node_modules/postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "dependencies": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/@vue/component-compiler-utils/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/@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", @@ -17987,6 +18065,70 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "@vitejs/plugin-react": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz", + "integrity": "sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==", + "dev": true, + "requires": { + "@babel/core": "^7.23.5", + "@babel/plugin-transform-react-jsx-self": "^7.23.3", + "@babel/plugin-transform-react-jsx-source": "^7.23.3", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.0" + } + }, + "@vue/component-compiler-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz", + "integrity": "sha512-97sfH2mYNU+2PzGrmK2haqffDpVASuib9/w2/noxiFi31Z54hW+q3izKQXXQZSNhtiUpAI36uSuYepeBe4wpHQ==", + "dev": true, + "requires": { + "consolidate": "^0.15.1", + "hash-sum": "^1.0.2", + "lru-cache": "^4.1.2", + "merge-source-map": "^1.1.0", + "postcss": "^7.0.36", + "postcss-selector-parser": "^6.0.2", + "prettier": "^1.18.2 || ^2.0.0", + "source-map": "~0.6.1", + "vue-template-es2015-compiler": "^1.9.0" + }, + "dependencies": { + "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, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "requires": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + } + }, + "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 + } + } + }, "@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", diff --git a/package.json b/package.json index 8cc7638f..725833ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.2-beta05", + "version": "13.2.2-beta06", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From bb941c4ddbba89d1062e2eadca1e45b973514e36 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:30:17 +0100 Subject: [PATCH 25/83] Tests for table --- src/components/formcomponents/table/Table.tsx | 1 - .../table/tables/__tests__/utils-spec.ts | 345 ++++++++++++++++++ .../table-hn1/__tests__/hn1-utils-spec.ts | 166 +++++++++ .../table/tables/table-hn1/utils.ts | 4 +- .../table/tables/table-hn2/TableHeadHn2.tsx | 40 ++ .../table/tables/table-hn2/TableHn2.tsx | 44 +-- .../table/tables/table-hn2/utils.ts | 26 +- .../formcomponents/table/tables/utils.ts | 5 +- src/preview/FormFillerPreview.tsx | 2 +- 9 files changed, 588 insertions(+), 45 deletions(-) create mode 100644 src/components/formcomponents/table/tables/__tests__/utils-spec.ts create mode 100644 src/components/formcomponents/table/tables/table-hn1/__tests__/hn1-utils-spec.ts create mode 100644 src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx index 686abc42..895d9eac 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/Table.tsx @@ -7,7 +7,6 @@ import { Coding, Questionnaire, QuestionnaireItem, - QuestionnaireItemEnableWhen, QuestionnaireResponse, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, diff --git a/src/components/formcomponents/table/tables/__tests__/utils-spec.ts b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts new file mode 100644 index 00000000..3dd29a9d --- /dev/null +++ b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts @@ -0,0 +1,345 @@ +import { + QuestionnaireResponseItemAnswer, + QuestionnaireItemEnableWhen, + QuestionnaireItemEnableBehaviorCodes, + QuestionnaireItem, + QuestionnaireResponse, +} from '../../../../../types/fhir'; +import ItemType from '../../../../../constants/itemType'; +import { extractValuesFromAnswer, getPrimitiveValueFromItemType, getQuestionnaireResponseItemAnswer, isConditionEnabled } from '../utils'; +import * as questionnaireFunctions from '../utils'; + +import * as fhirUtils from '../../../../../util/refero-core'; + +jest.mock('../../../../../util/refero-core'); + +describe('getPrimitiveValueFromItemType', () => { + it('Should return value based on type', () => { + const answer: QuestionnaireResponseItemAnswer = { valueString: 'test' }; + const response = getPrimitiveValueFromItemType(ItemType.TEXT, answer); + expect(response).toEqual('test'); + }); +}); +describe('getQuestionnaireResponseItemAnswer', () => { + it('Should return QuestionnaireResponseItemAnswer based on type and result', () => { + // @ts-ignore + const answer: never[] = ['test']; + const response = getQuestionnaireResponseItemAnswer(ItemType.TEXT, answer); + const expected: QuestionnaireResponseItemAnswer[] = [{ valueString: 'test' }]; + expect(response).toEqual(expected); + }); +}); + +// Mocks for dependent functions + +describe('isConditionEnabled', () => { + beforeEach(() => { + jest.clearAllMocks(); + (fhirUtils.getQuestionnaireResponseItemsWithLinkId as jest.Mock).mockImplementation(() => [ + { linkId: 'e32a3b49-42df-4394-9560-2cf48155e182', text: 'Hvilken sykdom har du?', answer: [{ valueString: 'dfg' }] }, + ]); + (fhirUtils.isInGroupContext as jest.Mock).mockImplementation(() => true); + (fhirUtils.enableWhenMatchesAnswer as jest.Mock).mockImplementation(() => true); + }); + + it('should return true if single condition is met and behavior is ANY', () => { + const conditions: QuestionnaireItemEnableWhen[] = [ + { answerBoolean: true, question: 'e32a3b49-42df-4394-9560-2cf48155e182', operator: 'exists' } as QuestionnaireItemEnableWhen, + ]; + + const behavior = QuestionnaireItemEnableBehaviorCodes.ANY; + const currentPath: fhirUtils.Path[] = []; + const responseItems = [ + { + linkId: '4233cb23-aff4-4e72-8c89-41cdc44f8939', + text: 'Personalia', + item: [ + { linkId: '855afb10-1dd5-46d4-ab56-d8b8587323a4', text: 'Hva heter du?', answer: [{ valueString: 'sdf' }] }, + { linkId: '314166c1-cb72-4c67-b0a9-d90581d658ad', text: 'Hvor gammel er du?', answer: [{ valueString: 'sdf' }] }, + ], + }, + { + linkId: 'f6764114-86d9-402d-8e05-aca25f980f5f', + text: 'Sykdommer', + item: [ + { linkId: '3cf13e1a-a775-42cc-8182-babde16743aa', text: 'Har du hjertesykdom?', answer: [{ valueString: 'dfgd' }] }, + { linkId: 'e32a3b49-42df-4394-9560-2cf48155e182', text: 'Hvilken sykdom har du?', answer: [{ valueString: 'dfg' }] }, + { linkId: '8caedfdb-dee1-47eb-8ee0-9c451fb4fb57', text: 'Kan du si litt mer om sykdommen din?' }, + ], + }, + { + linkId: '2e71aeb8-aa1c-4bc4-b3a9-b82ed16acc28', + text: 'Oppsummering', + item: [ + { + linkId: '2f566ffe-3f0c-4b3b-8b55-bdcb8aaea08b', + text: 'Oppsummering Table-HN1', + item: [ + { + linkId: 'b0c00973-36bd-49ad-92cf-887bbcf6f9b6', + text: 'Personalia', + item: [ + { linkId: 'fd70929b-7421-4f59-8c0d-d86366d260c7', text: 'Hva heter du?' }, + { linkId: '5a85ef28-51a0-45d7-899f-c87f7384a03e', text: 'Hvor gammel er du?' }, + ], + }, + { + linkId: '765cc891-f702-4361-8a5f-719bcb26ec34', + text: 'Sykdommer', + item: [ + { linkId: '0388ed83-02a8-4660-80e3-d05208bb1dea', text: 'Har du hjertesykdom?' }, + { linkId: 'de1df328-4b5d-4831-90c0-e2fd7993067a', text: 'Hvilken sykdom har du?' }, + { linkId: '7789abe2-0594-4896-d930-e271972d13cd', text: 'Kan du si litt mer om sykdommen din?' }, + ], + }, + ], + }, + ], + }, + ]; + + const result = isConditionEnabled(conditions, behavior, currentPath, responseItems); + expect(result).toBe(true); + }); +}); + +describe('extractValuesFromAnswer', () => { + // Test for single answer + it('should extract value from a single answer correctly', () => { + const type = ItemType.STRING; + const singleAnswer: QuestionnaireResponseItemAnswer = { valueString: 'Test Answer' }; + + const result = extractValuesFromAnswer(type, singleAnswer); + + expect(result).toEqual(['Test Answer']); + }); + + it('should extract values from an array of answers correctly', () => { + const type = ItemType.INTEGER; // Another example type + const arrayOfAnswers: QuestionnaireResponseItemAnswer[] = [{ valueInteger: 1 }, { valueInteger: 2 }]; + + const result = extractValuesFromAnswer(type, arrayOfAnswers); + + expect(result).toEqual([1, 2]); + }); + + it('should return an empty array if questionnaireAnswer is undefined', () => { + const type = ItemType.STRING; // Example type + + const result = extractValuesFromAnswer(type, undefined); + + expect(result).toEqual([]); + }); + it('should extract string value correctly', () => { + const type = ItemType.STRING; + const singleAnswer: QuestionnaireResponseItemAnswer = { valueString: 'Test String' }; + + const result = extractValuesFromAnswer(type, singleAnswer); + + expect(result).toEqual(['Test String']); + }); + + it('should extract integer values from an array of answers correctly', () => { + const type = ItemType.INTEGER; + const arrayOfAnswers: QuestionnaireResponseItemAnswer[] = [{ valueInteger: 1 }, { valueInteger: 2 }]; + + const result = extractValuesFromAnswer(type, arrayOfAnswers); + + expect(result).toEqual([1, 2]); + }); + + it('should extract boolean values correctly', () => { + const type = ItemType.BOOLEAN; + const singleAnswer: QuestionnaireResponseItemAnswer = { valueBoolean: true }; + + const result = extractValuesFromAnswer(type, singleAnswer); + + expect(result).toEqual(['Ja']); // Assuming true maps to 'Ja' + }); + + it('should extract date value correctly', () => { + const type = ItemType.DATE; + const singleAnswer: QuestionnaireResponseItemAnswer = { valueDate: '2021-01-01' }; + + const result = extractValuesFromAnswer(type, singleAnswer); + + expect(result).toEqual(['1. januar 2021']); + }); + + it('should extract choice value correctly', () => { + const type = ItemType.CHOICE; + const singleAnswer: QuestionnaireResponseItemAnswer = { valueCoding: { display: 'Choice1' } }; + + const result = extractValuesFromAnswer(type, singleAnswer); + + expect(result).toEqual(['Choice1']); + }); + + it('should return an empty array if questionnaireAnswer is undefined', () => { + const type = ItemType.STRING; + + const result = extractValuesFromAnswer(type, undefined); + + expect(result).toEqual([]); + }); +}); + +describe('addAnswerToItems', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should process single item correctly', () => { + const mockItem: QuestionnaireItem = { + linkId: '1', + text: 'How are you feeling today?', + type: ItemType.STRING, + extension: [ + { + url: 'http://hl7.org/fhir/StructureDefinition/cqf-expression', + valueString: "QuestionnaireResponse.descendants().where(linkId='1').answer.value", + }, + { + url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl', + valueCodeableConcept: { + coding: [ + { + code: 'data-receiver', + system: 'http://hl7.org/fhir/ValueSet/questionnaire-item-control', + }, + ], + }, + }, + ], + }; + const mockResponse: QuestionnaireResponse = { + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { + linkId: '1', + answer: [ + { + valueString: 'I feel good.', + }, + ], + }, + ], + }; + + const result = questionnaireFunctions.addAnswerToItems([mockItem], mockResponse); + + expect(result[0].answer).toEqual([{ valueString: 'I feel good.' }]); + }); + + it('should handle an array of answers correctly', () => { + const mockItem: QuestionnaireItem = { + linkId: '1', + text: 'How are you feeling today?', + type: ItemType.STRING, + extension: [ + { + url: 'http://hl7.org/fhir/StructureDefinition/cqf-expression', + valueString: "QuestionnaireResponse.descendants().where(linkId='1').answer.value", + }, + { + url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl', + valueCodeableConcept: { + coding: [ + { + code: 'data-receiver', + system: 'http://hl7.org/fhir/ValueSet/questionnaire-item-control', + }, + ], + }, + }, + ], + }; + const mockResponse: QuestionnaireResponse = { + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { + linkId: '1', + answer: [{ valueString: 'First Answer' }, { valueString: 'Second Answer' }], + }, + ], + }; + + const result = questionnaireFunctions.addAnswerToItems([mockItem], mockResponse); + + expect(result[0].answer).toEqual([{ valueString: 'First Answer' }, { valueString: 'Second Answer' }]); + }); + + it('should return empty answer array when getValueIfDataReceiver returns undefined', () => { + const mockItem: QuestionnaireItem = { + linkId: '1', + text: 'How are you feeling today?', + type: ItemType.STRING, + extension: [ + { + url: 'http://hl7.org/fhir/StructureDefinition/cqf-expression', + valueString: "QuestionnaireResponse.descendants().where(linkId='1').answer.value", + }, + { + url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl', + valueCodeableConcept: { + coding: [ + { + code: 'data-receiver', + system: 'http://hl7.org/fhir/ValueSet/questionnaire-item-control', + }, + ], + }, + }, + ], + }; + const mockResponse: QuestionnaireResponse = { + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { + linkId: '2', + answer: [{ valueString: 'First Answer' }, { valueString: 'Second Answer' }], + }, + ], + }; + + const result = questionnaireFunctions.addAnswerToItems([mockItem], mockResponse); + + expect(result[0].answer).toEqual([]); + }); +}); + +describe('findIndexByCode', () => { + it('should return index of item with given code', () => { + const item: QuestionnaireItem = { + linkId: '1', + text: 'How are you feeling today?', + type: ItemType.STRING, + code: [ + { + system: 'http://helsenorge.no/fhir/CodeSystem/TableColumn', + code: '1', + display: 'Column 1', + }, + ], + }; + + const result = questionnaireFunctions.findIndexByCode(item, 'http://helsenorge.no/fhir/CodeSystem/TableColumn'); + + expect(result).toEqual(1); + }); + it('should return -1 if not found', () => { + const item: QuestionnaireItem = { + linkId: '1', + text: 'How are you feeling today?', + type: ItemType.STRING, + code: [], + }; + + const result = questionnaireFunctions.findIndexByCode(item, 'http://helsenorge.no/fhir/CodeSystem/TableColumn'); + + expect(result).toEqual(-1); + }); +}); diff --git a/src/components/formcomponents/table/tables/table-hn1/__tests__/hn1-utils-spec.ts b/src/components/formcomponents/table/tables/table-hn1/__tests__/hn1-utils-spec.ts new file mode 100644 index 00000000..105b4205 --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn1/__tests__/hn1-utils-spec.ts @@ -0,0 +1,166 @@ +import itemType from '../../../../../../constants/itemType'; +import { QuestionnaireItem, QuestionnaireResponse } from '../../../../../../types/fhir'; +import { ITableH1Column, TABLE_HN1_TABLE_TYPES } from '../interface'; +import * as hn1Utils from '../utils'; + +describe('HN1 - Utils ', () => { + describe('createColumnsFromAnswers', () => { + it('should return an array of columns from items', () => { + const item = { + linkId: '1', + text: 'text', + type: itemType.GROUP, + answer: [ + { + valueString: 'valueString', + }, + ], + }; + const expected: ITableH1Column[] = [ + { + id: '1-question', + type: TABLE_HN1_TABLE_TYPES.HEADER, + value: 'text', + }, + { + id: '1-answer', + type: TABLE_HN1_TABLE_TYPES.VALUE, + value: '', + }, + ]; + const result = hn1Utils.createColumnsFromAnswers(item); + expect(result).toEqual(expected); + }); + }); + describe('transformItemToHN1Row', () => { + it('should create a table row from items', () => { + const item = { + linkId: '1', + text: 'text', + type: itemType.GROUP, + answer: [ + { + valueString: 'valueString', + }, + ], + }; + const expected = { + id: '1', + columns: [ + { + id: '1-question', + type: TABLE_HN1_TABLE_TYPES.HEADER, + value: 'text', + }, + { + id: '1-answer', + type: TABLE_HN1_TABLE_TYPES.VALUE, + value: '', + }, + ], + }; + const result = hn1Utils.transformItemToHN1Row(item); + expect(result).toEqual(expected); + }); + }); + describe('getTableHN1bodyObject', () => { + it('should return an empty array if no questionnaireResponse', () => { + const items: QuestionnaireItem[] = []; + const questionnaireResponse = null; + const result = hn1Utils.getTableHN1bodyObject(items, questionnaireResponse); + expect(result).toEqual([]); + }); + it('should return an empty array if no items', () => { + const items: QuestionnaireItem[] = []; + const questionnaireResponse: QuestionnaireResponse = { + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { + linkId: '1', + text: 'text', + answer: [ + { + valueString: 'valueString', + }, + ], + }, + ], + }; + const result = hn1Utils.getTableHN1bodyObject(items, questionnaireResponse); + expect(result).toEqual([]); + }); + it('should return an array of rows', () => { + const items: QuestionnaireItem[] = [ + { + linkId: '1', + text: 'text', + type: itemType.GROUP, + }, + { + linkId: '2', + text: 'text 2', + type: itemType.GROUP, + }, + ]; + const questionnaireResponse: QuestionnaireResponse = { + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { + linkId: '1', + text: 'text', + answer: [ + { + valueString: 'valueString', + }, + ], + }, + { + linkId: '2', + text: 'text 2', + answer: [ + { + valueInteger: 12, + }, + ], + }, + ], + }; + const expected = [ + { + id: '1', + columns: [ + { + id: '1-question', + type: TABLE_HN1_TABLE_TYPES.HEADER, + value: 'text', + }, + { + id: '1-answer', + type: TABLE_HN1_TABLE_TYPES.VALUE, + value: '', + }, + ], + }, + { + id: '2', + columns: [ + { + id: '2-question', + type: TABLE_HN1_TABLE_TYPES.HEADER, + value: 'text 2', + }, + { + id: '2-answer', + type: TABLE_HN1_TABLE_TYPES.VALUE, + value: '', + }, + ], + }, + ]; + const result = hn1Utils.getTableHN1bodyObject(items, questionnaireResponse); + expect(result).toEqual(expected); + }); + }); +}); diff --git a/src/components/formcomponents/table/tables/table-hn1/utils.ts b/src/components/formcomponents/table/tables/table-hn1/utils.ts index 5dfd4ed2..4935885f 100644 --- a/src/components/formcomponents/table/tables/table-hn1/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn1/utils.ts @@ -25,7 +25,7 @@ export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireR return processItems(answerItems); }; -const createColumnsFromAnswers = (item: QuestionnaireResponseItem): ITableH1Column[] => { +export const createColumnsFromAnswers = (item: QuestionnaireResponseItem): ITableH1Column[] => { const combinedAnswer = transformAnswersToListOfStrings((item as QuestionnaireItem).type, item.answer || []).join(', '); const columns: ITableH1Column[] = [ @@ -43,7 +43,7 @@ const createColumnsFromAnswers = (item: QuestionnaireResponseItem): ITableH1Colu return columns; }; -const transformItemToHN1Row = (item: QuestionnaireResponseItem): ITableH1Row => { +export const transformItemToHN1Row = (item: QuestionnaireResponseItem): ITableH1Row => { const columns = createColumnsFromAnswers(item); return { diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx new file mode 100644 index 00000000..aa691cf7 --- /dev/null +++ b/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx @@ -0,0 +1,40 @@ +import React from 'react'; + +import { Coding } from '../../../../../types/fhir'; + +import { HeaderCategory, SortDirection, TableHead, TableHeadCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; + +import { findCodeForColumnToSortBy, getHeaderColumns } from './utils'; + +type Props = { + tableCodesCoding: Coding[]; + sortDir?: SortDirection; + setSortDir: React.Dispatch>; + sortable: boolean; +}; + +const TableHeadHn2 = ({ tableCodesCoding, sortDir, setSortDir, sortable }: Props): JSX.Element => { + const tableHeader = getHeaderColumns(tableCodesCoding); + const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); + const handleSort = (): void => { + setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); + }; + + return ( + + + {tableHeader.map(column => ( + + {column.display} + + ))} + + + ); +}; +export default TableHeadHn2; diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 0ff247be..8ad01338 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -2,19 +2,11 @@ import React, { useEffect, useState } from 'react'; import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; -import { - HeaderCategory, - Table as HnTable, - SortDirection, - TableBody, - TableCell, - TableHead, - TableHeadCell, - TableRow, -} from '@helsenorge/designsystem-react/components/Table'; +import { Table as HnTable, SortDirection, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; import { ITableH2Row } from './interface'; -import { findCodeForColumnToSortBy, getColumnNames, getTableHN2bodyObject } from './utils'; +import TableHeadHn2 from './TableHeadHn2'; +import { getIndexToSortBy, getTableHN2bodyObject, transformCodingToSortDirection } from './utils'; interface Props { tableCodesCoding: Coding[]; @@ -22,34 +14,16 @@ interface Props { questionnaireResponse?: QuestionnaireResponse | null; } const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { - const [sortDir, setSortDir] = useState(SortDirection.asc); - const codeForColumnToSortBy = findCodeForColumnToSortBy(tableCodesCoding); - const tableHeader = getColumnNames(tableCodesCoding); + const sortIndex = getIndexToSortBy(tableCodesCoding); + const [sortDir, setSortDir] = useState(transformCodingToSortDirection(tableCodesCoding)); + const [rows, setRows] = useState(getTableHN2bodyObject(items, questionnaireResponse, sortIndex, sortDir)); - //TODO: find index to sort by - const [rows, setRows] = useState(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); - const handleSort = (): void => { - setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); - }; useEffect(() => { - setRows(getTableHN2bodyObject(items, questionnaireResponse, 1, sortDir)); - }, [sortDir, items, questionnaireResponse, tableHeader.length]); + setRows(getTableHN2bodyObject(items, questionnaireResponse, sortIndex, sortDir)); + }, [sortDir, items, questionnaireResponse]); return rows.length ? ( - - - {tableHeader.map(column => ( - - {column} - - ))} - - + {rows.map(item => { return ( diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index cbfcaf3d..28d8b558 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -61,6 +61,7 @@ export const getTableHN2bodyObject = ( }; /* SORTING */ + export const sortTableRows = (table: ITableH2Row[], columnIndex: number, sortOrder: SortDirection): ITableH2Row[] => { return table.sort((a, b) => { const aValue = a?.columns.length > columnIndex ? a?.columns[columnIndex]?.text || '' : ''; @@ -76,10 +77,31 @@ export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined const columnToSortBy = columnsToDisplay?.find(coding => coding?.code === codeForSortedColumn); return columnToSortBy; }; -export const getColumnNames = (coding: Coding[]): string[] => { - return findCodeBySystem(coding, TableColumnName).map(code => code.display ?? ''); + +type HeaderColumn = { display: string; code?: string }; + +export const getHeaderColumns = (coding: Coding[]): HeaderColumn[] => { + return findCodeBySystem(coding, TableColumnName).map(code => ({ + display: code.display || '', + code: code.code, + })); +}; +export const getCodeFromCodingSystem = (coding: Coding[], codingSystem: string): string | undefined => { + const code = findCodeBySystem(coding, codingSystem); + return code[0]?.code; }; //TODO: Dette finnes fra før, kan bruke eksisterende funksjonalitet export function findCodeBySystem(coding: T[], system?: string): T[] { return coding.filter(code => code.system === system); } + +/* TABLE HEADER */ +export const transformCodingToSortDirection = (coding: Coding[]): SortDirection | undefined => { + const code = getCodeFromCodingSystem(coding, codeSystems.TableOrderingFunctions); + return !!code ? (code === 'ASC' ? SortDirection.asc : SortDirection.desc) : undefined; +}; + +export const getIndexToSortBy = (coding: Coding[]): number | undefined => { + const sortCode = getCodeFromCodingSystem(coding, codeSystems.TableOrderingColum); + return sortCode ? Number(sortCode) - 1 : undefined; +}; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 218bd7f0..e1efcb0e 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -70,8 +70,7 @@ const extractValueFromDateTime = (inputValue?: string): string => { return moment(date).locale('nb').format(DATEFORMATS.DATETIME); }; -//TODO: make more cases -const extractValueFromAttachment = ( +export const extractValueFromAttachment = ( inputValue?: Attachment, field: keyof Pick = 'url' ): string | number => { @@ -198,7 +197,6 @@ export const extractValuesFromAnswer = ( if (questionnaireAnswer === undefined) { return []; } - return Array.isArray(questionnaireAnswer) ? questionnaireAnswer.map(answer => getPrimitiveValueFromItemType(type, answer)) : [getPrimitiveValueFromItemType(type, questionnaireAnswer)]; @@ -223,7 +221,6 @@ export const findIndexByCode = (item: QuestionnaireItem, codesystem: CodeSystems /* ENABLE WHEN */ export const filterEnabledQuestionnaireItems = (items: QuestionnaireItem[], response: QuestionnaireResponse): QuestionnaireItem[] => { const responseItems = response.item || []; - const checkItemEnabled = (item: QuestionnaireItem, currentPath: Path[]): boolean => { if (!item.enableWhen) { return true; diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 0a280076..072fd190 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/kun_qest_repeatable.json'; +import skjema from './skjema/kun_qest_hn2.json'; // import { getResources } from './resources/referoResources'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; From dd24f7999e27f6f9fef81cc1772a0b73289a59de Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:44:19 +0100 Subject: [PATCH 26/83] install --- package-lock.json | 5 +++-- src/util/fhirpathHelper.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c087dd74..3aff7cc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@helsenorge/refero", - "version": "13.2.3-beta01", + "version": "13.2.2-beta06", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@helsenorge/refero", - "version": "13.2.3-beta01", + "version": "13.2.2-beta06", "license": "MIT", "dependencies": { "@types/react-collapse": "^5.0.1", @@ -54,6 +54,7 @@ "@ungap/structured-clone": "^1.2.0", "@vitejs/plugin-react": "^4.2.1", "@ungap/structured-clone": "^1.2.0", + "@vitejs/plugin-react": "^4.2.1", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "babel-jest": "^27.4.2", "babel-loader": "^8.2.3", diff --git a/src/util/fhirpathHelper.ts b/src/util/fhirpathHelper.ts index 2d1d04ba..582f054b 100644 --- a/src/util/fhirpathHelper.ts +++ b/src/util/fhirpathHelper.ts @@ -17,8 +17,9 @@ export function evaluateFhirpathExpressionToGetDate(item: QuestionnaireItem, fhi export function evaluateFhirpathExpressionToGetString(fhirExtension: Extension, questionnare?: QuestionnaireResponse | null): any { const qCopy = structuredClone(questionnare); + const qExt = structuredClone(fhirExtension); try { - return fhirpath.evaluate(qCopy, fhirExtension.valueString, null, fhirpath_r4_model); + return fhirpath.evaluate(qCopy, qExt.valueString, null, fhirpath_r4_model); } catch (error) { return []; } From 02fde3d8a245c4c362a90d7d5fd21b558ebb3cd0 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:34:16 +0100 Subject: [PATCH 27/83] gtable --- .../table/tables/gtable/GTable.tsx | 19 + .../table/tables/gtable/utils.ts | 63 ++ src/preview/skjema/multitable-skjema.json | 683 ++++++++++++++++++ 3 files changed, 765 insertions(+) create mode 100644 src/components/formcomponents/table/tables/gtable/GTable.tsx create mode 100644 src/components/formcomponents/table/tables/gtable/utils.ts create mode 100644 src/preview/skjema/multitable-skjema.json diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx new file mode 100644 index 00000000..193bf375 --- /dev/null +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + +import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; + +import { getGtablebodyObject } from './utils'; + +interface Props { + items: QuestionnaireItem[]; + questionnaireResponse?: QuestionnaireResponse | null; + tableCodesCoding: Coding[]; +} + +const GTable = ({ items, questionnaireResponse, tableCodesCoding }: Props): JSX.Element => { + const itemsToShow = getGtablebodyObject(items, questionnaireResponse); + console.log(itemsToShow); + return <>{questionnaireResponse?.item?.map(x => x.text + ' ')}; +}; + +export default GTable; diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts new file mode 100644 index 00000000..a80b44e1 --- /dev/null +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -0,0 +1,63 @@ +import { + QuestionnaireItem, + QuestionnaireResponse, + QuestionnaireResponseItem, + QuestionnaireResponseItemAnswer, +} from '../../../../../types/fhir'; + +import * as uuid from 'uuid'; + +import { addAnswerToItems, extractValuesFromAnswer, filterEnabledQuestionnaireItems, findFirstDefinedProperty } from '../utils'; +import ItemType from '../../../../../constants/itemType'; + +interface IGTable { + id: string; + headerRow?: IGTableHeaderItem[]; + rows: IGTableRow[]; +} +interface IGTableHeaderItem { + id: string; + value: string; +} + +interface IGTableRow { + id: string; + columns: IGTableColumn[]; +} + +interface IGTableColumn { + id: string; + value: string; +} + +export const getGtablebodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): IGTable => { + if (!questionnaireResponse || items.length === 0) { + return { + id: uuid.v4(), + rows: [], + }; + } + + const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); + const answerItems = addAnswerToItems(itemsToShow, questionnaireResponse); + const rows = answerItems.reduce((acc, item) => { + const row = { + id: item.linkId, + columns: + item.answer?.map(answer => ({ + id: uuid.v4(), + value: findFirstDefinedProperty(answer)?.toString() || '', + })) || [], + }; + return acc.concat(row); + }, []); + + return { + id: uuid.v4(), + headerRow: answerItems.map(item => ({ + id: item.linkId, + value: item.text || '', + })), + rows: rows, + }; +}; diff --git a/src/preview/skjema/multitable-skjema.json b/src/preview/skjema/multitable-skjema.json new file mode 100644 index 00000000..d7747882 --- /dev/null +++ b/src/preview/skjema/multitable-skjema.json @@ -0,0 +1,683 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "e2f65f93-9d90-43f7-9fee-976b8fd9374b", + "name": "Multi_Table_Skjema", + "title": "Multi Table Skjema", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + } + ] + }, + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + } + ] + } + } + ], + "contained": [ + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1101", + "version": "1.0", + "name": "urn:oid:1101", + "title": "Ja / Nei (structor)", + "status": "draft", + "publisher": "NHN", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1101", + "concept": [ + { + "code": "1", + "display": "Ja" + }, + { + "code": "2", + "display": "Nei" + } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "c839b4d4-c865-40a8-f637-c7fdef8b6c20", + "type": "group", + "text": "Helse", + "required": false, + "item": [ + { + "linkId": "2bbbd7d8-573f-4d48-dfaf-a3f755a964bf", + "type": "open-choice", + "text": "Hvilken av disse spiser du flest av?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "answerOption": [ + { + "valueCoding": { + "id": "db536210-abf9-455a-cddb-ab23eeba00f2", + "code": "kylling", + "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", + "display": "Kylling" + } + }, + { + "valueCoding": { + "id": "917ef708-6451-471f-8245-944041ceab1a", + "code": "fisk", + "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", + "display": "Fisk" + } + }, + { + "valueCoding": { + "id": "5681fe75-ece0-4727-82c1-8a51eba2fea9", + "code": "svin", + "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", + "display": "Svin" + } + }, + { + "valueCoding": { + "id": "a5d385f8-ed8d-4d22-82f3-1923379b7967", + "code": "sau", + "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", + "display": "Sau" + } + }, + { + "valueCoding": { + "id": "967cc0aa-5d8b-497b-e66c-57c908fc4c5a", + "code": "storfe", + "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", + "display": "Storfe" + } + } + ] + }, + { + "linkId": "a3eecb63-afbc-4902-dae6-aced13e18e23", + "type": "choice", + "text": "Hvilken av disse spiser du flest av?", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "c9c31623-8040-42a1-a48a-c7ab6c97e6ee", + "code": "epler", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Epler" + } + }, + { + "valueCoding": { + "id": "5a768e83-6540-4158-848d-7241d186481d", + "code": "pæree", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Pæree" + } + }, + { + "valueCoding": { + "id": "18a495a2-02f2-4e67-c117-1d906639d12e", + "code": "kirsebær", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Kirsebær" + } + }, + { + "valueCoding": { + "id": "bcd05afa-5e58-4641-9c9c-4ced67cb140c", + "code": "rips", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Rips" + } + }, + { + "valueCoding": { + "id": "85f54af8-7e5f-4506-bd1c-d3bd15fbdb79", + "code": "solbær", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Solbær" + } + }, + { + "valueCoding": { + "id": "3323bbff-8941-41d9-e015-cedfae35104b", + "code": "jordbær", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Jordbær" + } + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ] + } + ] + }, + { + "linkId": "2d97ba20-b090-46f9-891c-8e5c86a333f4", + "type": "group", + "text": "Skjenner du bær", + "required": false, + "item": [ + { + "linkId": "544cac98-2fff-449e-95f9-f07b91d948f3", + "type": "choice", + "text": "Er jordbær et bær?\n", + "required": false, + "answerValueSet": "#1101" + }, + { + "linkId": "62e20b07-e7fe-4cdf-85dc-ef3e984751e0", + "type": "choice", + "required": false, + "text": "Er bjørnebær et bær?", + "answerValueSet": "#1101" + }, + { + "linkId": "e3d7f6d9-14dd-4b7c-cf59-68963d7ccb1f", + "type": "choice", + "text": "Er eple et bær?", + "required": false, + "answerValueSet": "#1101" + } + ] + }, + { + "linkId": "f38043c0-0a55-4631-e75e-6405360b9a2e", + "type": "group", + "text": "Mat", + "required": false, + "repeats": true, + "item": [ + { + "linkId": "cbd5a104-144d-4776-f4aa-46f4cd900106", + "type": "string", + "text": "Kan du nevne hva du spiser?", + "required": false + }, + { + "linkId": "653bbd50-dd1b-4957-8262-0158696a1346", + "type": "integer", + "text": "Hvor mange ganger per uke spiser du dette?", + "required": false + } + ] + }, + { + "linkId": "8377fcae-7633-4c28-8f68-c0a052bed789", + "type": "group", + "text": "Oppsummering", + "required": false, + "item": [ + { + "linkId": "94aaa25e-ef6d-41b1-cb1a-0873d9ec442c", + "type": "group", + "text": "Oppsummering Table-HN1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn1" + } + ] + } + } + ], + "required": false, + "item": [ + { + "linkId": "81547f29-47bd-402d-845c-f0b1fef9c0a2", + "type": "open-choice", + "text": "Hvilken av disse spiser du flest av?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='2bbbd7d8-573f-4d48-dfaf-a3f755a964bf').answer.value" + } + ], + "answerOption": [ + { + "valueCoding": { + "id": "db536210-abf9-455a-cddb-ab23eeba00f2", + "code": "kylling", + "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", + "display": "Kylling" + } + }, + { + "valueCoding": { + "id": "917ef708-6451-471f-8245-944041ceab1a", + "code": "fisk", + "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", + "display": "Fisk" + } + }, + { + "valueCoding": { + "id": "5681fe75-ece0-4727-82c1-8a51eba2fea9", + "code": "svin", + "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", + "display": "Svin" + } + }, + { + "valueCoding": { + "id": "a5d385f8-ed8d-4d22-82f3-1923379b7967", + "code": "sau", + "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", + "display": "Sau" + } + }, + { + "valueCoding": { + "id": "967cc0aa-5d8b-497b-e66c-57c908fc4c5a", + "code": "storfe", + "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", + "display": "Storfe" + } + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "2bbbd7d8-573f-4d48-dfaf-a3f755a964bf", + "operator": "exists" + } + ] + }, + { + "linkId": "f19834f5-f210-4d09-8481-3d77dc5549ce", + "type": "choice", + "text": "Hvilken av disse spiser du flest av?", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "c9c31623-8040-42a1-a48a-c7ab6c97e6ee", + "code": "epler", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Epler" + } + }, + { + "valueCoding": { + "id": "5a768e83-6540-4158-848d-7241d186481d", + "code": "pæree", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Pæree" + } + }, + { + "valueCoding": { + "id": "18a495a2-02f2-4e67-c117-1d906639d12e", + "code": "kirsebær", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Kirsebær" + } + }, + { + "valueCoding": { + "id": "bcd05afa-5e58-4641-9c9c-4ced67cb140c", + "code": "rips", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Rips" + } + }, + { + "valueCoding": { + "id": "85f54af8-7e5f-4506-bd1c-d3bd15fbdb79", + "code": "solbær", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Solbær" + } + }, + { + "valueCoding": { + "id": "3323bbff-8941-41d9-e015-cedfae35104b", + "code": "jordbær", + "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", + "display": "Jordbær" + } + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='a3eecb63-afbc-4902-dae6-aced13e18e23').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "a3eecb63-afbc-4902-dae6-aced13e18e23", + "operator": "exists" + } + ] + } + ] + }, + { + "linkId": "f0e7e687-3ef0-40ca-ee38-a4099d169fee", + "type": "group", + "text": "Oppsummering Table", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table" + } + ] + } + } + ], + "required": false, + "item": [ + { + "linkId": "9bd8be7b-564b-4d77-ec03-37d56e7dc24f", + "type": "choice", + "text": "Er jordbær et bær?\n", + "required": false, + "answerValueSet": "#1101", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='544cac98-2fff-449e-95f9-f07b91d948f3').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "544cac98-2fff-449e-95f9-f07b91d948f3", + "operator": "exists" + } + ] + }, + { + "linkId": "88af9a85-e3ac-4ff8-8ad5-58eb717fd9dc", + "type": "choice", + "required": false, + "text": "Er bjørnebær et bær?", + "answerValueSet": "#1101", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='62e20b07-e7fe-4cdf-85dc-ef3e984751e0').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "62e20b07-e7fe-4cdf-85dc-ef3e984751e0", + "operator": "exists" + } + ] + }, + { + "linkId": "37346692-cb61-4235-c2f4-ac8584d51765", + "type": "choice", + "text": "Er eple et bær?", + "required": false, + "answerValueSet": "#1101", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e3d7f6d9-14dd-4b7c-cf59-68963d7ccb1f').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "e3d7f6d9-14dd-4b7c-cf59-68963d7ccb1f", + "operator": "exists" + } + ] + } + ] + }, + { + "linkId": "ce52673d-2a4b-4ff5-8dba-7537942225c9", + "type": "group", + "text": "Oppsummering GTable som vises på top", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "gtable" + } + ] + } + } + ], + "required": false, + "item": [ + { + "linkId": "9a61b084-8623-4624-8ff4-a63e361e9a86", + "type": "string", + "text": "Kan du nevne hva du spiser?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='cbd5a104-144d-4776-f4aa-46f4cd900106').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "cbd5a104-144d-4776-f4aa-46f4cd900106", + "operator": "exists" + } + ] + }, + { + "linkId": "ae841515-4539-4fa7-cd98-a2c1a8a729bb", + "type": "integer", + "text": "Hvor mange ganger per uke spiser du dette?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='653bbd50-dd1b-4957-8262-0158696a1346').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "653bbd50-dd1b-4957-8262-0158696a1346", + "operator": "exists" + } + ] + } + ] + } + ] + } + ] +} From a12281a53216a2d61224088bfa148e1cec280651 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:36:47 +0100 Subject: [PATCH 28/83] gtable --- src/components/formcomponents/table/Table.tsx | 3 +- .../table/tables/table-hn1/utils.ts | 2 -- .../table/tables/table-hn2/TableHn2.tsx | 2 +- .../formcomponents/table/tables/utils.ts | 35 +++++++++++++++---- src/constants/index.ts | 3 +- src/preview/FormFillerPreview.tsx | 2 +- 6 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx index 895d9eac..7a200de3 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/Table.tsx @@ -14,6 +14,7 @@ import { import LanguageLocales from '@helsenorge/core-utils/constants/languages'; +import GTable from './tables/gtable/GTable'; import TableHn1 from './tables/table-hn1/TableHn1'; import TableHn2 from './tables/table-hn2/TableHn2'; import { NewValueAction } from '../../../actions/newValue'; @@ -77,6 +78,7 @@ const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResp return ( <>

{headline}

+ ); case TableCodes.table: @@ -93,7 +95,6 @@ const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResp const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { const group = props.item; - //TODO: Fix undefine and null checks const tableType = getCodingTextTableValues(group)[0]; return { diff --git a/src/components/formcomponents/table/tables/table-hn1/utils.ts b/src/components/formcomponents/table/tables/table-hn1/utils.ts index 4935885f..0bac2c76 100644 --- a/src/components/formcomponents/table/tables/table-hn1/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn1/utils.ts @@ -9,9 +9,7 @@ export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireR return []; } const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); - const answerItems = addAnswerToItems(itemsToShow, questionnaireResponse); - const processItems = (items: QuestionnaireResponseItem[]): ITableH1Row[] => { return items.reduce((acc: ITableH1Row[], item) => { const row = transformItemToHN1Row(item); diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 8ad01338..89a3b0a8 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; -import { Table as HnTable, SortDirection, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; +import { Table as HnTable, ModeType, SortDirection, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; import { ITableH2Row } from './interface'; import TableHeadHn2 from './TableHeadHn2'; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index e1efcb0e..9a5fb14b 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -16,6 +16,7 @@ import { parseDate } from '@helsenorge/date-time/components/time-input/date-core import * as DateTimeConstants from '@helsenorge/date-time/constants/datetime'; import { DATEFORMATS } from './constants'; +import { OPEN_CHOICE_SYSTEM } from '../../../../constants'; import { CodeSystems } from '../../../../constants/codingsystems'; import ItemType from '../../../../constants/itemType'; import { getQuestionnaireItemCodeValue } from '../../../../util/codingsystem'; @@ -27,10 +28,10 @@ function extractValueFromCoding(coding: Coding | undefined, field: keyof Pick = 'value' -): string | number { +): string | number => { if (!quantity) return ''; switch (field) { case 'value': @@ -44,7 +45,7 @@ function extractValueFromQuantity( default: return ''; } -} +}; const extractValueFromDate = (inputValue?: string): string => { if (!inputValue) { return ''; @@ -69,7 +70,6 @@ const extractValueFromDateTime = (inputValue?: string): string => { //TODO: Check if we can use language from state here return moment(date).locale('nb').format(DATEFORMATS.DATETIME); }; - export const extractValueFromAttachment = ( inputValue?: Attachment, field: keyof Pick = 'url' @@ -143,7 +143,18 @@ export function getQuestionnaireResponseItemAnswer( return result.map(bool => ({ valueBoolean: bool })); case ItemType.CHOICE: case ItemType.OPENCHOICE: - return result.map(coding => ({ valueCoding: coding })); + return result.map(coding => { + if (typeof coding === 'string') { + return { + valueCoding: { + display: coding, + code: '', + system: OPEN_CHOICE_SYSTEM, + }, + }; + } + return { valueCoding: coding }; + }); case ItemType.QUANTITY: return result.map(quantity => ({ valueQuantity: quantity })); case ItemType.TEXT: @@ -180,8 +191,11 @@ export const getValueIfDataReceiver = ( if (extension) { let result = evaluateFhirpathExpressionToGetString(extension, questionnaireResponse); + if (!!getCalculatedExpressionExtension(item)) { - result = result.map((m: { value: number }) => m.value); + result = result.map((m: { value: number }) => { + return m.value; + }); } return getQuestionnaireResponseItemAnswer(item.type, result); } @@ -261,7 +275,14 @@ export const isConditionEnabled = ( const conditionMatches = conditions.map(isSingleConditionMet); return behavior === QuestionnaireItemEnableBehaviorCodes.ALL ? conditionMatches.every(Boolean) : conditionMatches.some(Boolean); }; - +export function findFirstDefinedProperty(obj: T): T[Extract] | null { + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key] !== undefined) { + return obj[key]; + } + } + return null; +} export const addAnswerToItems = ( items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null diff --git a/src/constants/index.ts b/src/constants/index.ts index 36c66ac4..7a559619 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -18,5 +18,4 @@ export const VALID_FILE_TYPES: Array = ['image/jpeg', 'image/png', 'a export const OPEN_CHOICE_ID: string = 'other'; export const OPEN_CHOICE_SYSTEM: string = 'http://helsenorge.no/fhir/CodeSystem/open-choice'; export const OPEN_CHOICE_LABEL: string = 'annet'; -export const NAVIGATOR_BLINDZONE_ID: string = 'navigator_blindzone' - +export const NAVIGATOR_BLINDZONE_ID: string = 'navigator_blindzone'; diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 072fd190..07ace210 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/kun_qest_hn2.json'; +import skjema from './skjema/multitable-skjema.json'; // import { getResources } from './resources/referoResources'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; From cd8120d5873cf8fa60e397b5b37d873e9e5cfc47 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:39:36 +0100 Subject: [PATCH 29/83] Update utils.ts --- .../formcomponents/table/tables/gtable/utils.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index a80b44e1..02afbc7a 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -1,14 +1,8 @@ -import { - QuestionnaireItem, - QuestionnaireResponse, - QuestionnaireResponseItem, - QuestionnaireResponseItemAnswer, -} from '../../../../../types/fhir'; - import * as uuid from 'uuid'; -import { addAnswerToItems, extractValuesFromAnswer, filterEnabledQuestionnaireItems, findFirstDefinedProperty } from '../utils'; -import ItemType from '../../../../../constants/itemType'; +import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItemAnswer } from '../../../../../types/fhir'; + +import { addAnswerToItems, filterEnabledQuestionnaireItems, findFirstDefinedProperty } from '../utils'; interface IGTable { id: string; From ce50f03dea71614c6e1e423f91e45d46877eed94 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:00:54 +0100 Subject: [PATCH 30/83] added basic gtable functionality --- src/components/formcomponents/table/Table.tsx | 2 +- .../table/tables/gtable/GTable.tsx | 41 +++++++- .../table/tables/gtable/interface.ts | 21 ++++ .../table/tables/gtable/utils.ts | 95 +++++++++++-------- .../table/tables/table-hn1/utils.ts | 5 +- .../table/tables/table-hn2/utils.ts | 8 +- .../formcomponents/table/tables/utils.ts | 14 ++- 7 files changed, 131 insertions(+), 55 deletions(-) create mode 100644 src/components/formcomponents/table/tables/gtable/interface.ts diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/Table.tsx index 7a200de3..9bcf7454 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/Table.tsx @@ -78,7 +78,7 @@ const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResp return ( <>

{headline}

- + ); case TableCodes.table: diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx index 193bf375..80e7e1b5 100644 --- a/src/components/formcomponents/table/tables/gtable/GTable.tsx +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -2,18 +2,49 @@ import React from 'react'; import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; +import { + TableBody, + Table as HnTable, + TableRow, + TableCell, + TableHead, + HeaderCategory, + TableHeadCell, +} from '@helsenorge/designsystem-react/components/Table'; + import { getGtablebodyObject } from './utils'; interface Props { items: QuestionnaireItem[]; questionnaireResponse?: QuestionnaireResponse | null; - tableCodesCoding: Coding[]; } -const GTable = ({ items, questionnaireResponse, tableCodesCoding }: Props): JSX.Element => { - const itemsToShow = getGtablebodyObject(items, questionnaireResponse); - console.log(itemsToShow); - return <>{questionnaireResponse?.item?.map(x => x.text + ' ')}; +const GTable = ({ items, questionnaireResponse }: Props): JSX.Element => { + const gTable = getGtablebodyObject(items, questionnaireResponse); + return ( + + + + {gTable?.headerRow?.map(column => ( + {column.value} + ))} + + + + {gTable.rows.map(item => { + return ( + + {item.columns.map(column => ( + + {column.value} + + ))} + + ); + })} + + + ); }; export default GTable; diff --git a/src/components/formcomponents/table/tables/gtable/interface.ts b/src/components/formcomponents/table/tables/gtable/interface.ts new file mode 100644 index 00000000..90f93ea5 --- /dev/null +++ b/src/components/formcomponents/table/tables/gtable/interface.ts @@ -0,0 +1,21 @@ +export interface IGTable { + id: string; + headerRow?: IGTableHeaderItem[]; + rows: IGTableRow[]; +} +export interface IGTableHeaderItem { + id: string; + value: string; +} + +interface IGTableRow { + id: string; + index: number; + columns: IGTableColumn[]; +} + +interface IGTableColumn { + id: string; + index: number; + value: string; +} diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index 02afbc7a..a1ef5e0d 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -1,28 +1,41 @@ import * as uuid from 'uuid'; -import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItemAnswer } from '../../../../../types/fhir'; - -import { addAnswerToItems, filterEnabledQuestionnaireItems, findFirstDefinedProperty } from '../utils'; - -interface IGTable { - id: string; - headerRow?: IGTableHeaderItem[]; - rows: IGTableRow[]; -} -interface IGTableHeaderItem { - id: string; - value: string; -} - -interface IGTableRow { - id: string; - columns: IGTableColumn[]; -} - -interface IGTableColumn { - id: string; - value: string; -} +import { + QuestionnaireItem, + QuestionnaireResponse, + QuestionnaireResponseItem, + QuestionnaireResponseItemAnswer, +} from '../../../../../types/fhir'; + +import { IGTable, IGTableColumn, IGTableHeaderItem, IGTableRow } from './interface'; +import { findFirstDefinedProperty, getEnabledQuestionnaireItemsWithAnswers } from '../utils'; + +const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): number => { + if (items.length === 0) { + return 0; + } + const numbers = items.map(item => item.answer?.length || 0); + return Math.max(...numbers); +}; +const getValueFromAnswer = (rowIdx: number, answer?: QuestionnaireResponseItemAnswer[]): string => { + const answerItem = answer?.[rowIdx]; + + if (!answerItem) { + return ''; + } + if (!!answerItem?.item?.length && answerItem.item.length > 0) { + return ''; + } + + return findFirstDefinedProperty(answerItem)?.toString() || ''; +}; + +const columnsForRowIndex = (answerItems: QuestionnaireResponseItem[], rowIdx: number): IGTableColumn[] => + answerItems.map((item, colIdx) => ({ + id: `empty-${rowIdx}-${colIdx}`, + index: colIdx, + value: getValueFromAnswer(rowIdx, item.answer), + })); export const getGtablebodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): IGTable => { if (!questionnaireResponse || items.length === 0) { @@ -32,26 +45,24 @@ export const getGtablebodyObject = (items: QuestionnaireItem[], questionnaireRes }; } - const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); - const answerItems = addAnswerToItems(itemsToShow, questionnaireResponse); - const rows = answerItems.reduce((acc, item) => { - const row = { - id: item.linkId, - columns: - item.answer?.map(answer => ({ - id: uuid.v4(), - value: findFirstDefinedProperty(answer)?.toString() || '', - })) || [], - }; - return acc.concat(row); - }, []); + const answerItems = getEnabledQuestionnaireItemsWithAnswers(items, questionnaireResponse); + const numberOfRows = getNumberOfRowsGTable(answerItems); + + const tableHeader: IGTableHeaderItem[] = answerItems.map(item => ({ + id: item.linkId, + value: item.text || '', + })); + const tableRows: IGTableRow[] = Array.from({ length: numberOfRows }, (_, rowIdx) => ({ + id: `empty-${rowIdx}`, + index: rowIdx, + columns: columnsForRowIndex(answerItems, rowIdx), + })); - return { + const table: IGTable = { id: uuid.v4(), - headerRow: answerItems.map(item => ({ - id: item.linkId, - value: item.text || '', - })), - rows: rows, + headerRow: tableHeader, + rows: tableRows, }; + + return table; }; diff --git a/src/components/formcomponents/table/tables/table-hn1/utils.ts b/src/components/formcomponents/table/tables/table-hn1/utils.ts index 0bac2c76..134042a0 100644 --- a/src/components/formcomponents/table/tables/table-hn1/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn1/utils.ts @@ -2,14 +2,13 @@ import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } f import { ITableH1, ITableH1Column, ITableH1Row, TABLE_HN1_TABLE_TYPES } from './interface'; import ItemType from '../../../../../constants/itemType'; -import { addAnswerToItems, filterEnabledQuestionnaireItems, transformAnswersToListOfStrings } from '../utils'; +import { getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): ITableH1 => { if (!questionnaireResponse || items.length === 0) { return []; } - const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); - const answerItems = addAnswerToItems(itemsToShow, questionnaireResponse); + const answerItems = getEnabledQuestionnaireItemsWithAnswers(items, questionnaireResponse); const processItems = (items: QuestionnaireResponseItem[]): ITableH1Row[] => { return items.reduce((acc: ITableH1Row[], item) => { const row = transformItemToHN1Row(item); diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index 28d8b558..b83402ec 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -10,8 +10,12 @@ import codeSystems from '../../../../../constants/codingsystems'; import ItemType from '../../../../../constants/itemType'; import { filterEnabledQuestionnaireItems, findIndexByCode, getValueIfDataReceiver, transformAnswersToListOfStrings } from '../utils'; -const getNumberOfColums = (items: QuestionnaireItem[]): number => - Math.max(...items.map(item => findIndexByCode(item, codeSystems.TableColumn))); +const getNumberOfColums = (items: QuestionnaireItem[]): number => { + if (items.length === 0) { + return 0; + } + return Math.max(...items.map(item => findIndexByCode(item, codeSystems.TableColumn))); +}; export const getTableHN2bodyObject = ( items: QuestionnaireItem[], diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 9a5fb14b..f946fec9 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -275,14 +275,16 @@ export const isConditionEnabled = ( const conditionMatches = conditions.map(isSingleConditionMet); return behavior === QuestionnaireItemEnableBehaviorCodes.ALL ? conditionMatches.every(Boolean) : conditionMatches.some(Boolean); }; -export function findFirstDefinedProperty(obj: T): T[Extract] | null { + +export function findFirstDefinedProperty(obj: T): T[Extract] | undefined { for (const key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key] !== undefined) { return obj[key]; } } - return null; + return undefined; } + export const addAnswerToItems = ( items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null @@ -311,3 +313,11 @@ export const addAnswerToItems = ( return items.map(processItem); }; + +export const getEnabledQuestionnaireItemsWithAnswers = ( + items?: QuestionnaireItem[], + questionnaireResponse?: QuestionnaireResponse +): QuestionnaireResponseItem[] => { + if (!items || !questionnaireResponse) return []; + return addAnswerToItems(filterEnabledQuestionnaireItems(items, questionnaireResponse), questionnaireResponse); +}; From 1c8e73e4d3b773602142cc1215535f692240ee3f Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:05:57 +0100 Subject: [PATCH 31/83] version and changes --- CHANGES | 6 ++++++ package.json | 2 +- .../formcomponents/table/tables/gtable/interface.ts | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 76370f33..898835cb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.4-beta01 + +--- + +- added package to mock structuredClone in tests + ## 13.2.2-beta06 --- diff --git a/package.json b/package.json index 725833ae..073377dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.2-beta06", + "version": "13.2.4-beta01", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" diff --git a/src/components/formcomponents/table/tables/gtable/interface.ts b/src/components/formcomponents/table/tables/gtable/interface.ts index 90f93ea5..35f58515 100644 --- a/src/components/formcomponents/table/tables/gtable/interface.ts +++ b/src/components/formcomponents/table/tables/gtable/interface.ts @@ -8,13 +8,13 @@ export interface IGTableHeaderItem { value: string; } -interface IGTableRow { +export interface IGTableRow { id: string; index: number; columns: IGTableColumn[]; } -interface IGTableColumn { +export interface IGTableColumn { id: string; index: number; value: string; From 7a067be9d5172abdcc3858728c5d72ad30c1ac89 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:55:53 +0100 Subject: [PATCH 32/83] testfile and return correct answers --- .../table/{Table.tsx => TableContainer.tsx} | 6 ++- .../table/tables/gtable/GTable.tsx | 2 +- .../gtable/__tests__/gtable-utils-spec.ts | 0 .../table/tables/gtable/utils.ts | 43 ++++++++++++------- .../table/tables/table/StandardTable.tsx | 12 ++++++ src/util/index.ts | 4 +- 6 files changed, 46 insertions(+), 21 deletions(-) rename src/components/formcomponents/table/{Table.tsx => TableContainer.tsx} (91%) create mode 100644 src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts create mode 100644 src/components/formcomponents/table/tables/table/StandardTable.tsx diff --git a/src/components/formcomponents/table/Table.tsx b/src/components/formcomponents/table/TableContainer.tsx similarity index 91% rename from src/components/formcomponents/table/Table.tsx rename to src/components/formcomponents/table/TableContainer.tsx index 9bcf7454..863039c8 100644 --- a/src/components/formcomponents/table/Table.tsx +++ b/src/components/formcomponents/table/TableContainer.tsx @@ -25,6 +25,7 @@ import { getCodingTextTableValues } from '../../../util/extension'; import { Path } from '../../../util/refero-core'; import { RenderContext } from '../../../util/renderContext'; import { Resources } from '../../../util/resources'; +import { StandardTable } from './tables/table/StandardTable'; export interface Props { item: QuestionnaireItem; @@ -57,7 +58,7 @@ interface EnhancedProps { language: LanguageLocales; } -const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { +const TableContainer = ({ tableCodesCoding, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { { switch (tableType) { case TableCodes.tableHn1: @@ -85,6 +86,7 @@ const Table = ({ tableCodesCoding, items, headline, tableType, questionnaireResp return ( <>

{headline}

+ ); default: @@ -106,4 +108,4 @@ const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { language: (state.refero.form.Language as LanguageLocales) || LanguageLocales.NORWEGIAN, }; }; -export default connect(mapStateToProps)(Table); +export default connect(mapStateToProps)(TableContainer); diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx index 80e7e1b5..01054dc9 100644 --- a/src/components/formcomponents/table/tables/gtable/GTable.tsx +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; +import { QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; import { TableBody, diff --git a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index a1ef5e0d..4b407c7f 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -8,7 +8,12 @@ import { } from '../../../../../types/fhir'; import { IGTable, IGTableColumn, IGTableHeaderItem, IGTableRow } from './interface'; -import { findFirstDefinedProperty, getEnabledQuestionnaireItemsWithAnswers } from '../utils'; +import { + findFirstDefinedProperty, + getEnabledQuestionnaireItemsWithAnswers, + getPrimitiveValueFromItemType, + transformAnswersToListOfStrings, +} from '../utils'; const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): number => { if (items.length === 0) { @@ -26,8 +31,9 @@ const getValueFromAnswer = (rowIdx: number, answer?: QuestionnaireResponseItemAn if (!!answerItem?.item?.length && answerItem.item.length > 0) { return ''; } - - return findFirstDefinedProperty(answerItem)?.toString() || ''; + return transformAnswersToListOfStrings((answerItem as QuestionnaireItem).type, answerItem).toString() || ''; + //TODO: use existing functionality to get value from answer, also see if we can add the original item to the answer + // return findFirstDefinedProperty(answerItem)?.toString() || ''; }; const columnsForRowIndex = (answerItems: QuestionnaireResponseItem[], rowIdx: number): IGTableColumn[] => @@ -37,6 +43,22 @@ const columnsForRowIndex = (answerItems: QuestionnaireResponseItem[], rowIdx: nu value: getValueFromAnswer(rowIdx, item.answer), })); +const createTableRows = (items: QuestionnaireResponseItem[]): IGTableRow[] => { + const numberOfRows = getNumberOfRowsGTable(items); + + return Array.from({ length: numberOfRows }, (_, rowIdx) => ({ + id: `empty-${rowIdx}`, + index: rowIdx, + columns: columnsForRowIndex(items, rowIdx), + })); +}; + +const createTableHeader = (items: QuestionnaireResponseItem[]): IGTableHeaderItem[] => + items.map(item => ({ + id: item.linkId, + value: item.text || '', + })); + export const getGtablebodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): IGTable => { if (!questionnaireResponse || items.length === 0) { return { @@ -46,22 +68,11 @@ export const getGtablebodyObject = (items: QuestionnaireItem[], questionnaireRes } const answerItems = getEnabledQuestionnaireItemsWithAnswers(items, questionnaireResponse); - const numberOfRows = getNumberOfRowsGTable(answerItems); - - const tableHeader: IGTableHeaderItem[] = answerItems.map(item => ({ - id: item.linkId, - value: item.text || '', - })); - const tableRows: IGTableRow[] = Array.from({ length: numberOfRows }, (_, rowIdx) => ({ - id: `empty-${rowIdx}`, - index: rowIdx, - columns: columnsForRowIndex(answerItems, rowIdx), - })); const table: IGTable = { id: uuid.v4(), - headerRow: tableHeader, - rows: tableRows, + headerRow: createTableHeader(answerItems), + rows: createTableRows(answerItems), }; return table; diff --git a/src/components/formcomponents/table/tables/table/StandardTable.tsx b/src/components/formcomponents/table/tables/table/StandardTable.tsx new file mode 100644 index 00000000..9a19bcc0 --- /dev/null +++ b/src/components/formcomponents/table/tables/table/StandardTable.tsx @@ -0,0 +1,12 @@ +import React from 'react'; + +import { QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; + +interface Props { + items: QuestionnaireItem[]; + questionnaireResponse?: QuestionnaireResponse | null; +} + +export const StandardTable = ({ items }: Props): JSX.Element => { + return <>{items.map(item => item.linkId)}; +}; diff --git a/src/util/index.ts b/src/util/index.ts index 86140a6c..90095d83 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -31,7 +31,7 @@ import Integer from '../components/formcomponents/integer/integer'; import OpenChoice from '../components/formcomponents/open-choice/open-choice'; import Quantity from '../components/formcomponents/quantity/quantity'; import StringComponent from '../components/formcomponents/string/string'; -import Table from '../components/formcomponents/table/Table'; +import TableContainer from '../components/formcomponents/table/TableContainer'; import Text from '../components/formcomponents/text/text'; import { Props } from '../components/with-common-functions'; import CodingSystemConstants from '../constants/codingsystems'; @@ -67,7 +67,7 @@ export const isTableCode = (extensionCode: string | string[]): boolean => { // eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function getComponentForItem(type: string, extensionCode?: string | string[]) { if (String(type) === itemType.GROUP && !!extensionCode && isTableCode(extensionCode)) { - return Table as ComponentClass & Props>; + return TableContainer as ComponentClass & Props>; } else if (String(type) === ItemType.GROUP) { return Group; } From 228ca707324ede32cf5fb560ecba2854607da609 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 11 Jan 2024 12:57:01 +0100 Subject: [PATCH 33/83] add tests --- .../gtable/__tests__/gtable-utils-spec.ts | 259 ++++++++++++++++++ .../table/tables/gtable/interface.ts | 2 +- .../table/tables/gtable/utils.ts | 25 +- .../formcomponents/table/tables/utils.ts | 1 - 4 files changed, 270 insertions(+), 17 deletions(-) diff --git a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts index e69de29b..74c0e97b 100644 --- a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts +++ b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts @@ -0,0 +1,259 @@ +import { + QuestionnaireItem, + QuestionnaireResponse, + QuestionnaireResponseItem, + QuestionnaireResponseItemAnswer, +} from '../../../../../../types/fhir'; +import { + columnsForRowIndex, + createTableHeader, + createTableRows, + getGtablebodyObject, + getNumberOfRowsGTable, + getValueFromAnswer, +} from '../utils'; + +type MockAnswerProps = Partial; +type MockResponseItemProps = Partial; +type MockQuestionnaireItemProps = Partial> & { + type: string; // Make type a required property +}; +type MockResponseProps = Partial; + +function generateMockResponseAnswer(props: MockAnswerProps = {}): QuestionnaireResponseItemAnswer { + return { + valueString: 'Default Answer', + ...props, + }; +} + +function generateMockResponseItem(props: MockResponseItemProps = {}): QuestionnaireResponseItem { + return { + linkId: 'default-linkId', + answer: [], + ...props, + }; +} + +function generateMockQuestionnaireItem(props: MockQuestionnaireItemProps): QuestionnaireItem { + return { + linkId: 'default-question-linkId', + text: 'Default Question Text', + ...props, + }; +} + +function generateMockQuestionnaireResponse(props: MockResponseProps = {}): QuestionnaireResponse { + return { + resourceType: 'QuestionnaireResponse', + status: 'in-progress', + item: [], + ...props, + }; +} + +describe('gtable-utils-spec', () => { + describe('getNumberOfRowsGTable', () => { + it('should return 0 for an empty array', () => { + expect(getNumberOfRowsGTable([])).toBe(0); + }); + + it('should return the maximum length of answers from all items', () => { + const items: QuestionnaireResponseItem[] = [ + generateMockResponseItem({ answer: [generateMockResponseAnswer(), generateMockResponseAnswer()] }), + generateMockResponseItem({ answer: [generateMockResponseAnswer()] }), + ]; + expect(getNumberOfRowsGTable(items)).toBe(2); + }); + + it('should handle items with no answers correctly', () => { + const items: QuestionnaireResponseItem[] = [ + generateMockResponseItem({ answer: [] }), + generateMockResponseItem({ answer: [generateMockResponseAnswer(), generateMockResponseAnswer(), generateMockResponseAnswer()] }), + ]; + expect(getNumberOfRowsGTable(items)).toBe(3); + }); + }); + describe('getValueFromAnswer', () => { + it('should return an empty string if no answer is provided', () => { + expect(getValueFromAnswer(0, undefined)).toBe(''); + }); + + it('should return the correct string value from the answer at the specified index', () => { + const answers: QuestionnaireResponseItemAnswer[] = [ + generateMockResponseAnswer({ valueString: 'Answer 1' }), + generateMockResponseAnswer({ valueString: 'Answer 2' }), + ]; + expect(getValueFromAnswer(1, answers)).toBe('Answer 2'); + }); + + it('should return an empty string if the index is out of bounds', () => { + const answers: QuestionnaireResponseItemAnswer[] = [generateMockResponseAnswer({ valueString: 'Answer 1' })]; + expect(getValueFromAnswer(2, answers)).toBe(''); + }); + + it('should return an empty string if the answer at the index is empty', () => { + const answers: QuestionnaireResponseItemAnswer[] = [generateMockResponseAnswer({ valueString: '' })]; + expect(getValueFromAnswer(0, answers)).toBe(''); + }); + }); + describe('columnsForRowIndex', () => { + it('should create columns with correct values for a valid row index', () => { + const answerItems: QuestionnaireResponseItem[] = [ + generateMockResponseItem({ + answer: [generateMockResponseAnswer({ valueString: 'Answer 1' }), generateMockResponseAnswer({ valueString: 'Answer 2' })], + }), + generateMockResponseItem({ + answer: [generateMockResponseAnswer({ valueString: 'Another Answer 1' })], + }), + ]; + const columns = columnsForRowIndex(answerItems, 0); + expect(columns).toEqual([ + { id: 'empty-0-0', index: 0, value: 'Answer 1' }, + { id: 'empty-0-1', index: 1, value: 'Another Answer 1' }, + ]); + }); + + it('should create columns with empty values for a row index with no answers', () => { + const answerItems: QuestionnaireResponseItem[] = [ + generateMockResponseItem({ answer: [generateMockResponseAnswer({ valueString: 'Answer 1' })] }), + generateMockResponseItem({ answer: [] }), + ]; + const columns = columnsForRowIndex(answerItems, 1); + expect(columns).toEqual([ + { id: 'empty-1-0', index: 0, value: '' }, + { id: 'empty-1-1', index: 1, value: '' }, + ]); + }); + + it('should handle empty answer items correctly', () => { + const answerItems: QuestionnaireResponseItem[] = []; + const columns = columnsForRowIndex(answerItems, 0); + expect(columns).toEqual([]); + }); + }); + describe('createTableRows', () => { + it('should create table rows based on the input items', () => { + const items: QuestionnaireResponseItem[] = [ + generateMockResponseItem({ + answer: [generateMockResponseAnswer({ valueString: 'Answer 1' }), generateMockResponseAnswer({ valueString: 'Answer 2' })], + }), + generateMockResponseItem({ + answer: [generateMockResponseAnswer({ valueString: 'Another Answer 1' })], + }), + ]; + const rows = createTableRows(items); + expect(rows.length).toBe(2); + expect(rows[0].columns.length).toBe(items.length); + expect(rows[1].columns.length).toBe(items.length); + }); + + it('should handle items with no answers correctly', () => { + const items: QuestionnaireResponseItem[] = [ + generateMockResponseItem({ answer: [] }), + generateMockResponseItem({ answer: [generateMockResponseAnswer({ valueString: 'Only Answer' })] }), + ]; + const rows = createTableRows(items); + expect(rows.length).toBe(1); + expect(rows[0].columns.length).toBe(items.length); + }); + + it('should handle empty items correctly', () => { + const items: QuestionnaireResponseItem[] = []; + const rows = createTableRows(items); + expect(rows).toEqual([]); + }); + }); + describe('createTableHeader', () => { + it('should create table headers from input items', () => { + const items: QuestionnaireResponseItem[] = [ + generateMockResponseItem({ linkId: '1', text: 'First Question' }), + generateMockResponseItem({ linkId: '2', text: 'Second Question' }), + ]; + const headers = createTableHeader(items); + expect(headers).toEqual([ + { id: '1', value: 'First Question' }, + { id: '2', value: 'Second Question' }, + ]); + }); + + it('should handle items with missing text correctly', () => { + const items: QuestionnaireResponseItem[] = [ + generateMockResponseItem({ linkId: '1' }), + generateMockResponseItem({ linkId: '2', text: 'Second Question' }), + ]; + const headers = createTableHeader(items); + expect(headers).toEqual([ + { id: '1', value: '' }, + { id: '2', value: 'Second Question' }, + ]); + }); + + it('should handle empty items array correctly', () => { + const items: QuestionnaireResponseItem[] = []; + const headers = createTableHeader(items); + expect(headers).toEqual([]); + }); + }); + + describe('getGtablebodyObject', () => { + it('should create a GTable object with rows and headers', () => { + const questionnaireItems: QuestionnaireItem[] = [ + generateMockQuestionnaireItem({ + linkId: '1', + text: 'First Question', + type: 'string', + extension: [ + { + url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl', + valueCodeableConcept: { + coding: [ + { + system: 'http://hl7.org/fhir/ValueSet/questionnaire-item-control', + code: 'data-receiver', + }, + ], + }, + }, + { + url: 'http://hl7.org/fhir/StructureDefinition/cqf-expression', + valueString: "QuestionnaireResponse.descendants().where(linkId='1').answer.value", + }, + ], + }), + generateMockQuestionnaireItem({ linkId: '2', text: 'Second Question', type: 'string' }), + ]; + const questionnaireResponse = generateMockQuestionnaireResponse({ + status: 'completed', + item: [ + generateMockResponseItem({ linkId: '1', answer: [generateMockResponseAnswer({ valueString: 'Answer 1' })] }), + generateMockResponseItem({ linkId: '2', answer: [generateMockResponseAnswer({ valueString: 'Answer 2' })] }), + ], + }); + const gTable = getGtablebodyObject(questionnaireItems, questionnaireResponse); + console.log('gTable', gTable); + expect(gTable.rows.length).toBe(1); + expect(gTable.headerRow.length).toBe(2); + }); + + it('should handle empty questionnaire items correctly', () => { + const questionnaireItems: QuestionnaireItem[] = []; + const questionnaireResponse = generateMockQuestionnaireResponse({ + status: 'completed', + item: [generateMockResponseItem({ linkId: '1', answer: [generateMockResponseAnswer({ valueString: 'Answer 1' })] })], + }); + const gTable = getGtablebodyObject(questionnaireItems, questionnaireResponse); + expect(gTable.rows.length).toBe(0); + expect(gTable.headerRow.length).toBe(0); + }); + + it('should handle null questionnaire response correctly', () => { + const questionnaireItems: QuestionnaireItem[] = [ + generateMockQuestionnaireItem({ linkId: '1', text: 'First Question', type: 'string' }), + ]; + const gTable = getGtablebodyObject(questionnaireItems, null); + expect(gTable.rows.length).toBe(0); + expect(gTable.headerRow.length).toBe(0); + }); + }); +}); diff --git a/src/components/formcomponents/table/tables/gtable/interface.ts b/src/components/formcomponents/table/tables/gtable/interface.ts index 35f58515..5a1e20b7 100644 --- a/src/components/formcomponents/table/tables/gtable/interface.ts +++ b/src/components/formcomponents/table/tables/gtable/interface.ts @@ -1,6 +1,6 @@ export interface IGTable { id: string; - headerRow?: IGTableHeaderItem[]; + headerRow: IGTableHeaderItem[]; rows: IGTableRow[]; } export interface IGTableHeaderItem { diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index 4b407c7f..37eb53da 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -8,21 +8,16 @@ import { } from '../../../../../types/fhir'; import { IGTable, IGTableColumn, IGTableHeaderItem, IGTableRow } from './interface'; -import { - findFirstDefinedProperty, - getEnabledQuestionnaireItemsWithAnswers, - getPrimitiveValueFromItemType, - transformAnswersToListOfStrings, -} from '../utils'; +import { findFirstDefinedProperty, getEnabledQuestionnaireItemsWithAnswers } from '../utils'; -const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): number => { +export const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): number => { if (items.length === 0) { return 0; } const numbers = items.map(item => item.answer?.length || 0); return Math.max(...numbers); }; -const getValueFromAnswer = (rowIdx: number, answer?: QuestionnaireResponseItemAnswer[]): string => { +export const getValueFromAnswer = (rowIdx: number, answer?: QuestionnaireResponseItemAnswer[]): string => { const answerItem = answer?.[rowIdx]; if (!answerItem) { @@ -31,19 +26,19 @@ const getValueFromAnswer = (rowIdx: number, answer?: QuestionnaireResponseItemAn if (!!answerItem?.item?.length && answerItem.item.length > 0) { return ''; } - return transformAnswersToListOfStrings((answerItem as QuestionnaireItem).type, answerItem).toString() || ''; - //TODO: use existing functionality to get value from answer, also see if we can add the original item to the answer - // return findFirstDefinedProperty(answerItem)?.toString() || ''; + // return transformAnswersToListOfStrings((answerItem as QuestionnaireItem).type, answerItem).toString() || ''; + // TODO: use existing functionality to get value from answer, also see if we can add the original item to the answer + return findFirstDefinedProperty(answerItem)?.toString() || ''; }; -const columnsForRowIndex = (answerItems: QuestionnaireResponseItem[], rowIdx: number): IGTableColumn[] => +export const columnsForRowIndex = (answerItems: QuestionnaireResponseItem[], rowIdx: number): IGTableColumn[] => answerItems.map((item, colIdx) => ({ id: `empty-${rowIdx}-${colIdx}`, index: colIdx, value: getValueFromAnswer(rowIdx, item.answer), })); -const createTableRows = (items: QuestionnaireResponseItem[]): IGTableRow[] => { +export const createTableRows = (items: QuestionnaireResponseItem[]): IGTableRow[] => { const numberOfRows = getNumberOfRowsGTable(items); return Array.from({ length: numberOfRows }, (_, rowIdx) => ({ @@ -53,7 +48,7 @@ const createTableRows = (items: QuestionnaireResponseItem[]): IGTableRow[] => { })); }; -const createTableHeader = (items: QuestionnaireResponseItem[]): IGTableHeaderItem[] => +export const createTableHeader = (items: QuestionnaireResponseItem[]): IGTableHeaderItem[] => items.map(item => ({ id: item.linkId, value: item.text || '', @@ -63,10 +58,10 @@ export const getGtablebodyObject = (items: QuestionnaireItem[], questionnaireRes if (!questionnaireResponse || items.length === 0) { return { id: uuid.v4(), + headerRow: [], rows: [], }; } - const answerItems = getEnabledQuestionnaireItemsWithAnswers(items, questionnaireResponse); const table: IGTable = { diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index f946fec9..ac6cac60 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -303,7 +303,6 @@ export const addAnswerToItems = ( } else { questionnaireResponseItem.answer = res; } - if (item.item && item.item.length > 0) { questionnaireResponseItem.item = addAnswerToItems(item.item, questionnaireResponse); } From 8bfda863f5e6a3dcce56c855017f6a921f8192fe Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:36:59 +0100 Subject: [PATCH 34/83] remove todo --- src/components/formcomponents/table/tables/gtable/utils.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index 37eb53da..f0d7dc8f 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -26,8 +26,6 @@ export const getValueFromAnswer = (rowIdx: number, answer?: QuestionnaireRespons if (!!answerItem?.item?.length && answerItem.item.length > 0) { return ''; } - // return transformAnswersToListOfStrings((answerItem as QuestionnaireItem).type, answerItem).toString() || ''; - // TODO: use existing functionality to get value from answer, also see if we can add the original item to the answer return findFirstDefinedProperty(answerItem)?.toString() || ''; }; From 0a91aba18bc1eb3d90391f70c61053ba924f25c5 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:35:16 +0100 Subject: [PATCH 35/83] added functionality for table --- .../formcomponents/table/TableContainer.tsx | 19 +- .../table/tables/gtable/GTable.tsx | 4 +- .../table/tables/table-hn2/TableHn2.tsx | 2 +- .../table/tables/table/StandardTable.tsx | 48 +- .../__tests__/standartable-utils-spec.ts | 603 ++++++ .../table/tables/table/interface.ts | 17 + .../table/tables/table/utils.ts | 146 ++ .../formcomponents/table/tables/utils.ts | 9 +- src/preview/FormFillerPreview.tsx | 4 +- ...referoResources.tsx => referoResources.ts} | 8 +- src/preview/skjema/multitable-skjema.json | 77 +- src/types/fhir.ts | 1832 +++++++++++------ src/util/choice.ts | 8 +- 13 files changed, 2096 insertions(+), 681 deletions(-) create mode 100644 src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts create mode 100644 src/components/formcomponents/table/tables/table/interface.ts create mode 100644 src/components/formcomponents/table/tables/table/utils.ts rename src/preview/resources/{referoResources.tsx => referoResources.ts} (98%) diff --git a/src/components/formcomponents/table/TableContainer.tsx b/src/components/formcomponents/table/TableContainer.tsx index 863039c8..20dc3aeb 100644 --- a/src/components/formcomponents/table/TableContainer.tsx +++ b/src/components/formcomponents/table/TableContainer.tsx @@ -10,22 +10,23 @@ import { QuestionnaireResponse, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, + Resource, } from '../../../types/fhir'; import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import GTable from './tables/gtable/GTable'; +import { StandardTable } from './tables/table/StandardTable'; import TableHn1 from './tables/table-hn1/TableHn1'; import TableHn2 from './tables/table-hn2/TableHn2'; import { NewValueAction } from '../../../actions/newValue'; import { TABLE_CODES_VALUES, TableCodes } from '../../../constants/tableTypes'; import { GlobalState } from '../../../reducers'; -import { getFormData } from '../../../reducers/form'; +import { getFormData, getFormDefinition } from '../../../reducers/form'; import { getCodingTextTableValues } from '../../../util/extension'; import { Path } from '../../../util/refero-core'; import { RenderContext } from '../../../util/renderContext'; import { Resources } from '../../../util/resources'; -import { StandardTable } from './tables/table/StandardTable'; export interface Props { item: QuestionnaireItem; @@ -56,9 +57,17 @@ interface EnhancedProps { tableType: TABLE_CODES_VALUES; questionnaireResponse?: QuestionnaireResponse | null; language: LanguageLocales; + resource: Resource[] | undefined; } -const TableContainer = ({ tableCodesCoding, items, headline, tableType, questionnaireResponse }: Props & EnhancedProps): JSX.Element => { +const TableContainer = ({ + tableCodesCoding, + items, + headline, + tableType, + questionnaireResponse, + resource, +}: Props & EnhancedProps): JSX.Element => { { switch (tableType) { case TableCodes.tableHn1: @@ -86,7 +95,7 @@ const TableContainer = ({ tableCodesCoding, items, headline, tableType, question return ( <>

{headline}

- + ); default: @@ -98,6 +107,7 @@ const TableContainer = ({ tableCodesCoding, items, headline, tableType, question const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { const group = props.item; const tableType = getCodingTextTableValues(group)[0]; + const resource = getFormDefinition(state)?.Content?.contained; return { headline: group.text ?? '', @@ -106,6 +116,7 @@ const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { tableType, questionnaireResponse: getFormData(state)?.Content, language: (state.refero.form.Language as LanguageLocales) || LanguageLocales.NORWEGIAN, + resource, }; }; export default connect(mapStateToProps)(TableContainer); diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx index 01054dc9..4fc4c54f 100644 --- a/src/components/formcomponents/table/tables/gtable/GTable.tsx +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -21,7 +21,7 @@ interface Props { const GTable = ({ items, questionnaireResponse }: Props): JSX.Element => { const gTable = getGtablebodyObject(items, questionnaireResponse); - return ( + return gTable.rows.length > 0 ? ( @@ -44,6 +44,8 @@ const GTable = ({ items, questionnaireResponse }: Props): JSX.Element => { })}
+ ) : ( + <> ); }; diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 89a3b0a8..8ad01338 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; -import { Table as HnTable, ModeType, SortDirection, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; +import { Table as HnTable, SortDirection, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; import { ITableH2Row } from './interface'; import TableHeadHn2 from './TableHeadHn2'; diff --git a/src/components/formcomponents/table/tables/table/StandardTable.tsx b/src/components/formcomponents/table/tables/table/StandardTable.tsx index 9a19bcc0..44ead887 100644 --- a/src/components/formcomponents/table/tables/table/StandardTable.tsx +++ b/src/components/formcomponents/table/tables/table/StandardTable.tsx @@ -1,12 +1,54 @@ import React from 'react'; -import { QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; +import { QuestionnaireItem, QuestionnaireResponse, Resource } from '../../../../../types/fhir'; + +import { + HeaderCategory, + Table as HnTable, + ModeType, + TableBody, + TableCell, + TableHead, + TableHeadCell, + TableRow, +} from '@helsenorge/designsystem-react/components/Table'; + +import { getStandardTableObject } from './utils'; interface Props { items: QuestionnaireItem[]; questionnaireResponse?: QuestionnaireResponse | null; + resource?: Resource[]; } -export const StandardTable = ({ items }: Props): JSX.Element => { - return <>{items.map(item => item.linkId)}; +export const StandardTable = ({ items, questionnaireResponse, resource }: Props): JSX.Element => { + const table = getStandardTableObject(items, questionnaireResponse, resource); + return table.rows.length > 0 ? ( + + + + {table.headerRow.map(column => ( + + {column.value} + + ))} + + + + {table.rows.map(item => ( + + {item.columns.map(({ value, id }) => ( + + + {value} + + + ))} + + ))} + + + ) : ( + <> + ); }; diff --git a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts new file mode 100644 index 00000000..37aded33 --- /dev/null +++ b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts @@ -0,0 +1,603 @@ +import { Options } from '@helsenorge/form/components/radio-group'; +import ItemType from '../../../../../../constants/itemType'; +import { + createBodyRows, + createColumnsFromAnswers, + createHeaderRow, + createRowsFromAnswersCodes, + createTableColumn, + emptyTable, + emptyTableWithId, + findFirstChoiceItem, + getStandardTableObject, + needsExtraColumn, +} from '../utils'; +import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, Resource } from '../../../../../../types/fhir'; + +import * as choiceUtils from '../../../../../../util/choice'; + +import * as tableUtils from '../../utils'; +jest.mock('../../utils'); +jest.mock('../../../../../../util/choice'); + +describe('emptyTable', () => { + it('should return an empty table', () => { + const table = emptyTable(); + expect(table).toEqual({ + headerRow: [], + rows: [], + id: '', + }); + }); +}); + +describe('emptyTableWithId', () => { + it('should return an empty table with the given id', () => { + const table = emptyTableWithId('tableId'); + expect(table).toEqual({ + id: 'tableId', + headerRow: [], + rows: [], + }); + }); + + it('should return an empty table with an empty id if no id is provided', () => { + const table = emptyTableWithId(''); + expect(table).toEqual({ + id: '', + headerRow: [], + rows: [], + }); + }); +}); + +describe('createTableColumn', () => { + it('should create a table column with the given value, index, and id', () => { + const column = createTableColumn('value', 0, 'columnId'); + expect(column).toEqual({ + value: 'value', + index: 0, + id: 'columnId', + }); + }); +}); + +describe('createHeaderRow', () => { + beforeEach(() => { + jest.spyOn(tableUtils, 'getEnabledQuestionnaireItemsWithAnswers'); + }); + afterEach(() => { + jest.restoreAllMocks(); + }); + it('should create a header row with the given choice values and extra column flag', () => { + const choiceValues: Options[] = [ + { type: '1', label: 'Option A' }, + { type: '2', label: 'Option B' }, + ]; + const hasExtraColumn = true; + const headerRow = createHeaderRow(choiceValues, hasExtraColumn); + expect(headerRow).toEqual([ + { + id: 'quest-0', + index: 0, + value: '', + }, + { + id: '1-0', + index: 0, + value: 'Option A', + }, + { + id: '2-1', + index: 1, + value: 'Option B', + }, + { + id: 'comment-4', + index: 4, + value: '', + }, + ]); + }); + + it('should create a header row without an extra column if the flag is false', () => { + const choiceValues: Options[] = [ + { type: '1', label: 'Option A' }, + { type: '2', label: 'Option B' }, + ]; + const hasExtraColumn = false; + const headerRow = createHeaderRow(choiceValues, hasExtraColumn); + expect(headerRow).toEqual([ + { + id: 'quest-0', + index: 0, + value: '', + }, + { + id: '1-0', + index: 0, + value: 'Option A', + }, + { + id: '2-1', + index: 1, + value: 'Option B', + }, + ]); + }); +}); + +describe('createBodyRows', () => { + beforeEach(() => { + jest.spyOn(tableUtils, 'getEnabledQuestionnaireItemsWithAnswers'); + jest.spyOn(tableUtils, 'transformAnswersToListOfStrings'); + }); + afterEach(() => { + jest.restoreAllMocks(); + }); + + it('should create body rows from the given questionnaire items, response items, extra column flag, and choice values', () => { + (tableUtils.getEnabledQuestionnaireItemsWithAnswers as jest.Mock).mockImplementation((): QuestionnaireResponseItem[] => { + return [ + { linkId: '1', answer: [{ valueCoding: { code: '1' } }] }, + { linkId: '2', answer: [{ valueCoding: { code: '2' } }] }, + ] as QuestionnaireResponseItem[]; + }); + (tableUtils.transformAnswersToListOfStrings as jest.Mock).mockImplementation(() => { + return ['A', 'B']; + }); + const items: QuestionnaireItem[] = [ + { linkId: '1', text: 'Question 1', type: ItemType.CHOICE }, + { linkId: '2', text: 'Question 2', type: ItemType.CHOICE }, + ]; + const responseItems: QuestionnaireResponse = { + id: 'responseId', + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { linkId: '1', answer: [{ valueCoding: { code: '1' } }] }, + { linkId: '2', answer: [{ valueCoding: { code: '2' } }] }, + ], + }; + const needsExtraColumn = true; + const choiceValues: Options[] = [ + { type: '1', label: 'Option A' }, + { type: '2', label: 'Option B' }, + ]; + const bodyRows = createBodyRows(items, responseItems, needsExtraColumn, choiceValues); + expect(bodyRows).toEqual([ + { + id: '1', + index: 0, + columns: [ + { value: '', index: 0, id: '1-question' }, + { value: 'X', index: 1, id: '1-1' }, + { value: '', index: 2, id: '2-2' }, + { value: '', index: 3, id: '1-answer' }, + ], + }, + { + id: '2', + index: 1, + columns: [ + { value: '', index: 0, id: '2-question' }, + { value: '', index: 1, id: '1-1' }, + { value: 'X', index: 2, id: '2-2' }, + { value: '', index: 3, id: '2-answer' }, + ], + }, + ]); + }); + + it('should create body rows without an extra column if the flag is false', () => { + (tableUtils.getEnabledQuestionnaireItemsWithAnswers as jest.Mock).mockImplementation((): QuestionnaireResponseItem[] => { + return [ + { linkId: '1', answer: [{ valueCoding: { code: '1' } }] }, + { linkId: '2', answer: [{ valueCoding: { code: '2' } }] }, + ] as QuestionnaireResponseItem[]; + }); + const items: QuestionnaireItem[] = [ + { linkId: '1', text: 'Question 1', type: ItemType.CHOICE }, + { linkId: '2', text: 'Question 2', type: ItemType.CHOICE }, + ]; + const responseItems: QuestionnaireResponse = { + id: 'responseId', + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { linkId: '1', answer: [{ valueCoding: { code: '1' } }] }, + { linkId: '2', answer: [{ valueCoding: { code: '2' } }] }, + ], + }; + const needsExtraColumn = false; + const choiceValues: Options[] = [ + { type: '1', label: 'Option A' }, + { type: '2', label: 'Option B' }, + ]; + const bodyRows = createBodyRows(items, responseItems, needsExtraColumn, choiceValues); + expect(bodyRows).toEqual([ + { + id: '1', + index: 0, + columns: [ + { + value: '', + index: 0, + id: '1-question', + }, + { + id: '1-1', + index: 1, + value: 'X', + }, + { + id: '2-2', + index: 2, + value: '', + }, + ], + }, + { + id: '2', + index: 1, + columns: [ + { + value: '', + index: 0, + id: '2-question', + }, + { + id: '1-1', + index: 1, + value: '', + }, + { + id: '2-2', + index: 2, + value: 'X', + }, + ], + }, + ]); + }); +}); + +describe('createRowsFromAnswersCodes', () => { + it('should create rows from the given response item and choice values', () => { + const item: QuestionnaireResponseItem = { + linkId: '1', + answer: [{ valueCoding: { code: '1' } }], + }; + const choiceValues: Options[] = [ + { type: '1', label: 'Option A' }, + { type: '2', label: 'Option B' }, + ]; + const rows = createRowsFromAnswersCodes(item, choiceValues); + expect(rows).toEqual([ + { id: '1-1', index: 1, value: 'X' }, + { id: '2-2', index: 2, value: '' }, + ]); + }); + + it('should return an empty array if no choice values are provided', () => { + const item: QuestionnaireResponseItem = { + linkId: '1', + answer: [{ valueCoding: { code: '1' } }], + }; + const rows = createRowsFromAnswersCodes(item); + expect(rows).toEqual([]); + }); +}); + +describe('createColumnsFromAnswers', () => { + beforeEach(() => { + jest.spyOn(tableUtils, 'transformAnswersToListOfStrings'); + }); + afterEach(() => { + jest.restoreAllMocks(); + }); + it('should create columns from the given response item and choice values', () => { + (tableUtils.transformAnswersToListOfStrings as jest.Mock).mockImplementation(() => { + return ['A', 'B']; + }); + const item: QuestionnaireResponseItem = { + linkId: '1', + text: 'Question 1', + item: [ + { + linkId: '1.1', + //@ts-ignore + type: ItemType.CHOICE, + answer: [{ valueCoding: { code: '1' } }], + }, + { + linkId: '1.2', + //@ts-ignore + type: ItemType.CHOICE, + answer: [{ valueCoding: { code: '2' } }], + }, + ], + }; + const choiceValues: Options[] = [ + { type: '1', label: 'Option A' }, + { type: '2', label: 'Option B' }, + ]; + const columns = createColumnsFromAnswers(item, choiceValues); + expect(columns).toEqual([ + { value: 'Question 1', index: 0, id: '1-question' }, + { value: '', index: 1, id: '1-1' }, + { value: '', index: 2, id: '2-2' }, + { value: 'A, B', index: 3, id: '1-answer' }, + ]); + }); + + it('should return an empty array if no choice values are provided', () => { + (tableUtils.transformAnswersToListOfStrings as jest.Mock).mockImplementation(() => { + return []; + }); + const item: QuestionnaireResponseItem = { + linkId: '1', + text: 'Question 1', + item: [ + { + linkId: '1.1', + answer: [{ valueCoding: { code: '1' } }], + }, + { + linkId: '1.2', + answer: [{ valueCoding: { code: '2' } }], + }, + ], + }; + const columns = createColumnsFromAnswers(item); + expect(columns).toEqual([ + { value: 'Question 1', index: 0, id: '1-question' }, + { value: '', index: 1, id: '1-answer' }, + ]); + }); +}); + +describe('getStandardTableObject', () => { + afterEach(() => { + jest.restoreAllMocks(); + }); + beforeEach(() => { + jest.spyOn(tableUtils, 'getEnabledQuestionnaireItemsWithAnswers'); + jest.spyOn(tableUtils, 'transformAnswersToListOfStrings'); + jest.spyOn(choiceUtils, 'getContainedOptions'); + }); + it('should return an empty table if no response items or items are provided', () => { + const table = getStandardTableObject([], null); + expect(table).toEqual({ + headerRow: [], + rows: [], + id: '', + }); + }); + + it('should return an empty table with the response items id if no first choice item is found', () => { + const items: QuestionnaireItem[] = [ + { linkId: '1', text: 'Question 1', type: ItemType.TEXT }, + { linkId: '2', text: 'Question 2', type: ItemType.TEXT }, + ]; + const responseItems: QuestionnaireResponse = { + id: 'responseId', + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { linkId: '1', answer: [{ valueCoding: { code: '1' } }] }, + { linkId: '2', answer: [{ valueCoding: { code: '2' } }] }, + ], + }; + const table = getStandardTableObject(items, responseItems); + expect(table).toEqual({ + id: 'responseId', + headerRow: [], + rows: [], + }); + }); + + it('should return a table with the response items id, header row, and body rows', () => { + (tableUtils.getEnabledQuestionnaireItemsWithAnswers as jest.Mock).mockImplementation(() => { + return [ + { linkId: '1', text: 'Question 1', answer: [{ valueCoding: { code: '1' } }] }, + { + linkId: '2', + answer: [{ valueCoding: { code: '2' } }], + }, + ] as QuestionnaireResponseItem[]; + }); + (tableUtils.transformAnswersToListOfStrings as jest.Mock).mockImplementation(() => { + return ['string']; + }); + (choiceUtils.getContainedOptions as jest.Mock).mockImplementation((): Options[] => { + return [ + { type: '1', label: 'Option A' }, + { type: '2', label: 'Option B' }, + ]; + }); + const items: QuestionnaireItem[] = [ + { linkId: '1', text: 'Question 1', type: ItemType.CHOICE }, + { linkId: '2', text: 'Question 2', type: ItemType.CHOICE }, + ]; + const responseItems: QuestionnaireResponse = { + id: 'responseId', + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { linkId: '1', answer: [{ valueCoding: { code: '1' } }] }, + { linkId: '2', answer: [{ valueCoding: { code: '2' } }] }, + ], + }; + const resource: Resource[] = []; + const table = getStandardTableObject(items, responseItems, resource); + + expect(table).toEqual({ + id: 'responseId', + headerRow: [ + { + id: 'quest-0', + index: 0, + value: '', + }, + { + id: '1-0', + index: 0, + value: 'Option A', + }, + { + id: '2-1', + index: 1, + value: 'Option B', + }, + ], + rows: [ + { + id: '1', + index: 0, + columns: [ + { + value: 'Question 1', + index: 0, + id: '1-question', + }, + { + id: '1-1', + index: 1, + value: 'X', + }, + { + id: '2-2', + index: 2, + value: '', + }, + ], + }, + { + id: '2', + index: 1, + columns: [ + { + value: '', + index: 0, + id: '2-question', + }, + { + id: '1-1', + index: 1, + value: '', + }, + { + id: '2-2', + index: 2, + value: 'X', + }, + ], + }, + ], + }); + }); +}); + +describe('findFirstChoiceItem', () => { + it('should return the first choice item from the given items', () => { + const items: QuestionnaireItem[] = [ + { linkId: '1', text: 'Question 1', type: ItemType.TEXT }, + { linkId: '2', text: 'Question 2', type: ItemType.CHOICE }, + { linkId: '3', text: 'Question 3', type: ItemType.CHOICE }, + ]; + const firstChoiceItem = findFirstChoiceItem(items); + expect(firstChoiceItem).toEqual({ linkId: '2', text: 'Question 2', type: ItemType.CHOICE }); + }); + + it('should return undefined if no choice item is found', () => { + const items: QuestionnaireItem[] = [ + { linkId: '1', text: 'Question 1', type: ItemType.TEXT }, + { linkId: '2', text: 'Question 2', type: ItemType.TEXT }, + ]; + const firstChoiceItem = findFirstChoiceItem(items); + expect(firstChoiceItem).toBeUndefined(); + }); +}); + +describe('needsExtraColumn', () => { + beforeEach(() => { + jest.spyOn(tableUtils, 'getEnabledQuestionnaireItemsWithAnswers'); + }); + afterEach(() => { + jest.restoreAllMocks(); + }); + it('should return true if any answer has a non-empty last column value', () => { + (tableUtils.getEnabledQuestionnaireItemsWithAnswers as jest.Mock).mockImplementation(() => { + return [ + { linkId: '1', text: 'Question 1', answer: [{ valueCoding: { code: 'A' } }] }, + { + linkId: '2', + answer: [{ valueCoding: { code: 'B' } }], + item: [{ linkId: '3', text: 'Question 2', type: ItemType.STRING, answer: [{ valueString: 'test test test' }] }], + }, + ] as QuestionnaireResponseItem[]; + }); + (tableUtils.transformAnswersToListOfStrings as jest.Mock).mockImplementation(() => { + return ['string']; + }); + const items: QuestionnaireItem[] = [ + { linkId: '1', text: 'Question 1', type: ItemType.CHOICE }, + { linkId: '2', text: 'Question 2', type: ItemType.CHOICE, item: [{ linkId: '3', type: ItemType.TEXT, text: 'Qest 3' }] }, + ]; + const responseItems: QuestionnaireResponse = { + id: 'responseId', + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { linkId: '1', answer: [{ valueCoding: { code: 'A' } }] }, + { + linkId: '2', + answer: [{ valueCoding: { code: 'B' } }], + item: [{ linkId: '3', answer: [{ valueString: 'Answer' }] }], + }, + ], + }; + const choiceValues: Options[] = [ + { type: '1', label: 'Option A' }, + { type: '2', label: 'Option B' }, + ]; + const extraColumnNeeded = needsExtraColumn(items, responseItems, choiceValues); + expect(extraColumnNeeded).toBe(true); + }); + + it('should return false if all answers have an empty last column value', () => { + (tableUtils.getEnabledQuestionnaireItemsWithAnswers as jest.Mock).mockImplementation(() => { + return [ + { linkId: '1', text: 'Question 1', answer: [{ valueCoding: { code: 'A' } }] }, + { + linkId: '2', + answer: [{ valueCoding: { code: 'B' } }], + item: [{ linkId: '3', text: 'Question 2', type: ItemType.STRING, answer: [{ valueString: '' }] }], + }, + ] as QuestionnaireResponseItem[]; + }); + (tableUtils.transformAnswersToListOfStrings as jest.Mock).mockImplementation(() => { + return []; + }); + const items: QuestionnaireItem[] = [ + { linkId: '1', text: 'Question 1', type: ItemType.CHOICE }, + { linkId: '2', text: 'Question 2', type: ItemType.CHOICE }, + ]; + const responseItems: QuestionnaireResponse = { + id: 'responseId', + resourceType: 'QuestionnaireResponse', + status: 'completed', + item: [ + { linkId: '1', answer: [{ valueCoding: { code: '1' } }] }, + { linkId: '2', answer: [{ valueCoding: { code: '2' } }] }, + ], + }; + const choiceValues: Options[] = [ + { type: '1', label: 'Option A' }, + { type: '2', label: 'Option B' }, + ]; + const extraColumnNeeded = needsExtraColumn(items, responseItems, choiceValues); + expect(extraColumnNeeded).toBe(false); + }); +}); diff --git a/src/components/formcomponents/table/tables/table/interface.ts b/src/components/formcomponents/table/tables/table/interface.ts new file mode 100644 index 00000000..db6f06e1 --- /dev/null +++ b/src/components/formcomponents/table/tables/table/interface.ts @@ -0,0 +1,17 @@ +export interface StandardTableColumn { + id: string; + index: number; + value: string; +} + +export interface StandardTableRow { + id: string; + index: number; + columns: StandardTableColumn[]; +} + +export interface StandardTable { + id: string; + headerRow: StandardTableColumn[]; + rows: StandardTableRow[]; +} diff --git a/src/components/formcomponents/table/tables/table/utils.ts b/src/components/formcomponents/table/tables/table/utils.ts new file mode 100644 index 00000000..81a55426 --- /dev/null +++ b/src/components/formcomponents/table/tables/table/utils.ts @@ -0,0 +1,146 @@ +import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, Resource } from '../../../../../types/fhir'; + +import { Options } from '@helsenorge/form/components/radio-group'; + +import { StandardTable, StandardTableColumn, StandardTableRow } from './interface'; +import ItemType from '../../../../../constants/itemType'; +import { getContainedOptions } from '../../../../../util/choice'; +import { getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; + +export const emptyTable = (): StandardTable => { + return { + headerRow: [], + rows: [], + id: '', + }; +}; + +export const emptyTableWithId = (id: string): StandardTable => { + return { + id: id || '', + headerRow: [], + rows: [], + }; +}; + +export const createTableColumn = (value: string, index: number, id: string): StandardTableColumn => { + return { + value, + index, + id, + }; +}; + +export const createHeaderRow = (choiceValues: Options[], hasExtraColumn: boolean): StandardTableColumn[] => { + return [ + { + id: `quest-${0}`, + index: 0, + value: '', + }, + ...choiceValues.map((value, index) => ({ + id: `${value.type}-${index}`, + index, + value: value.label, + })), + ...(hasExtraColumn + ? [ + { + id: `comment-${choiceValues.length + 2}`, + index: choiceValues.length + 2, + value: '', + }, + ] + : []), + ]; +}; + +export const createBodyRows = ( + items: QuestionnaireItem[], + responseItems: QuestionnaireResponse, + needsExtraColumn: boolean, + choiceValues?: Options[] +): StandardTableRow[] => { + const answers = getEnabledQuestionnaireItemsWithAnswers(items, responseItems); + + return answers.map((item: QuestionnaireResponseItem, index: number) => { + let columns = createColumnsFromAnswers(item, choiceValues); + + if (!needsExtraColumn) { + columns = columns.slice(0, -1); + } + + return { + id: item.linkId, + index, + columns, + }; + }); +}; + +export const createRowsFromAnswersCodes = (item: QuestionnaireResponseItem, choiceValues?: Options[]): StandardTableColumn[] => { + const answerValue = item.answer?.[0]?.valueCoding?.code; + return ( + choiceValues?.map(value => ({ + id: `${value.type}-${value.type}`, + index: Number(value.type ?? 0), + value: answerValue === value.type ? 'X' : '', + })) || [] + ); +}; + +export const createColumnsFromAnswers = (item: QuestionnaireResponseItem, choiceValues?: Options[]): StandardTableColumn[] => { + const firstItem = item?.item?.[0]; + + const type = (firstItem as QuestionnaireItem)?.type; + const answer = firstItem?.answer; + const textAnswer = type && answer ? transformAnswersToListOfStrings(type, answer) : []; + const choiceColumns = createRowsFromAnswersCodes(item, choiceValues); + + const columns: StandardTableColumn[] = [ + createTableColumn(item.text || '', 0, `${item.linkId}-question`), + ...choiceColumns, + createTableColumn(textAnswer.join(', '), choiceColumns.length + 1, `${item.linkId}-answer`), + ]; + return columns; +}; + +export const getStandardTableObject = ( + items: QuestionnaireItem[], + responseItems?: QuestionnaireResponse | null, + resource?: Resource[] +): StandardTable => { + if (!responseItems || items.length === 0) { + return emptyTable(); + } + + const firstItem = findFirstChoiceItem(items); + if (!firstItem) { + return emptyTableWithId(responseItems.id || ''); + } + + const choiceValues = getContainedOptions(firstItem, resource) || []; + const extraColumnNeeded = needsExtraColumn(items, responseItems, choiceValues); + + const rows = createBodyRows(items, responseItems, extraColumnNeeded, choiceValues); + const header = createHeaderRow(choiceValues, extraColumnNeeded); + + return { + id: responseItems.id || '', + headerRow: header, + rows, + }; +}; + +export const findFirstChoiceItem = (items: QuestionnaireItem[]): QuestionnaireItem | undefined => { + return items.find((item: QuestionnaireItem) => item.type === ItemType.CHOICE); +}; + +export const needsExtraColumn = (items: QuestionnaireItem[], responseItems: QuestionnaireResponse, choiceValues?: Options[]): boolean => { + const answers = getEnabledQuestionnaireItemsWithAnswers(items, responseItems) || []; + + return answers.some(item => { + const lastColumnValue = createColumnsFromAnswers(item, choiceValues).slice(-1)[0]?.value; + return lastColumnValue !== ''; + }); +}; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index ac6cac60..ccced737 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -116,7 +116,7 @@ export const getPrimitiveValueFromItemType = ( case ItemType.DECIMAL: return res.valueDecimal ?? 0; case ItemType.BOOLEAN: - return res.valueBoolean === true ? 'Ja' : 'Nei' ?? false; + return res.valueBoolean === true ? `[X]` : `[ ]` ?? false; case ItemType.DATE: return extractValueFromDate(res.valueDate); case ItemType.DATETIME: @@ -309,8 +309,8 @@ export const addAnswerToItems = ( return questionnaireResponseItem; }; - - return items.map(processItem); + const response = items.map(processItem); + return response; }; export const getEnabledQuestionnaireItemsWithAnswers = ( @@ -318,5 +318,6 @@ export const getEnabledQuestionnaireItemsWithAnswers = ( questionnaireResponse?: QuestionnaireResponse ): QuestionnaireResponseItem[] => { if (!items || !questionnaireResponse) return []; - return addAnswerToItems(filterEnabledQuestionnaireItems(items, questionnaireResponse), questionnaireResponse); + const filteredItems = filterEnabledQuestionnaireItems(items, questionnaireResponse); + return addAnswerToItems(filteredItems, questionnaireResponse); }; diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 07ace210..759146c4 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -12,10 +12,8 @@ import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; import skjema from './skjema/multitable-skjema.json'; -// import { getResources } from './resources/referoResources'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; -import { Resources } from '../util/resources'; type Props = { showFormFiller: () => void; @@ -50,7 +48,7 @@ const FormFillerPreview = ({ showFormFiller }: Props): JSX.Element => { // eslint-disable-next-line no-console onSubmit={(): void => console.log('onSubmit')} authorized={true} - resources={getResources('') as unknown as Resources} + resources={getResources('')} sticky={true} saveButtonDisabled={false} loginButton={} diff --git a/src/preview/resources/referoResources.tsx b/src/preview/resources/referoResources.ts similarity index 98% rename from src/preview/resources/referoResources.tsx rename to src/preview/resources/referoResources.ts index 195425a5..63b27490 100644 --- a/src/preview/resources/referoResources.tsx +++ b/src/preview/resources/referoResources.ts @@ -1,6 +1,10 @@ -export const getResources = (language: string) => { +import { Resources } from '../../util/resources'; + +export const getResources = (language: string): Resources => { if (language === 'en-GB') { return { + oppgiDatoTid: 'Enter date and time', + openChoiceOption: 'Other', deleteButtonText: 'Delete', validationSummaryHeader: 'Check that the following are filled in correctly:', validationFileMax: 'File size must be less than 25MB', @@ -103,6 +107,8 @@ export const getResources = (language: string) => { } if (language === 'fr-FR') { return { + oppgiDatoTid: 'Entrez la date et l’heure', + openChoiceOption: 'Autre', deleteButtonText: 'Supprimer', validationSummaryHeader: 'Vérifiez que les éléments suivants sont bien remplis:', validationFileMax: 'La taille des fichiers doit être inférieure à 25MB', diff --git a/src/preview/skjema/multitable-skjema.json b/src/preview/skjema/multitable-skjema.json index d7747882..87625269 100644 --- a/src/preview/skjema/multitable-skjema.json +++ b/src/preview/skjema/multitable-skjema.json @@ -66,16 +66,16 @@ { "url": "http://ehelse.no/fhir/ValueSet/Predefined", "resourceType": "ValueSet", - "id": "1101", + "id": "1102", "version": "1.0", - "name": "urn:oid:1101", - "title": "Ja / Nei (structor)", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", "status": "draft", - "publisher": "NHN", + "publisher": "Direktoratet for e-helse", "compose": { "include": [ { - "system": "urn:oid:2.16.578.1.12.4.1.1101", + "system": "urn:oid:2.16.578.1.12.4.1.1102", "concept": [ { "code": "1", @@ -84,6 +84,10 @@ { "code": "2", "display": "Nei" + }, + { + "code": "3", + "display": "Vet ikke" } ] } @@ -241,21 +245,39 @@ "type": "choice", "text": "Er jordbær et bær?\n", "required": false, - "answerValueSet": "#1101" + "answerValueSet": "#1102" }, { "linkId": "62e20b07-e7fe-4cdf-85dc-ef3e984751e0", "type": "choice", "required": false, "text": "Er bjørnebær et bær?", - "answerValueSet": "#1101" + "answerValueSet": "#1102" }, { "linkId": "e3d7f6d9-14dd-4b7c-cf59-68963d7ccb1f", "type": "choice", "text": "Er eple et bær?", "required": false, - "answerValueSet": "#1101" + "answerValueSet": "#1102", + "item": [ + { + "linkId": "46b2f4f4-779a-493d-d706-b601755fbc2d", + "type": "string", + "required": false, + "enableWhen": [ + { + "question": "e3d7f6d9-14dd-4b7c-cf59-68963d7ccb1f", + "operator": "=", + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } + } + ], + "text": "Forklar hvorfor" + } + ] } ] }, @@ -493,7 +515,7 @@ "type": "choice", "text": "Er jordbær et bær?\n", "required": false, - "answerValueSet": "#1101", + "answerValueSet": "#1102", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", @@ -525,7 +547,7 @@ "type": "choice", "required": false, "text": "Er bjørnebær et bær?", - "answerValueSet": "#1101", + "answerValueSet": "#1102", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", @@ -557,7 +579,7 @@ "type": "choice", "text": "Er eple et bær?", "required": false, - "answerValueSet": "#1101", + "answerValueSet": "#1102", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", @@ -582,6 +604,39 @@ "question": "e3d7f6d9-14dd-4b7c-cf59-68963d7ccb1f", "operator": "exists" } + ], + "item": [ + { + "linkId": "d7ebbe31-49a4-4818-8a61-02d574629fa6", + "type": "string", + "required": false, + "enableWhen": [ + { + "answerBoolean": true, + "question": "46b2f4f4-779a-493d-d706-b601755fbc2d", + "operator": "exists" + } + ], + "text": "Forklar hvorfor", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='46b2f4f4-779a-493d-d706-b601755fbc2d').answer.value" + } + ], + "readOnly": true + } ] } ] diff --git a/src/types/fhir.ts b/src/types/fhir.ts index c6af6b78..6fee60f8 100644 --- a/src/types/fhir.ts +++ b/src/types/fhir.ts @@ -77507,11 +77507,13 @@ const C80DocTypecodes_BreastScanWTl201IV: Coding = { display: 'Breast Scan W Tl-201 IV', system: 'http://loinc.org', }; -const C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfTransjugularIntrahepaticPortosystemicShuntInPortalVeinAndHepaticVein: Coding = { - code: '51391-1', - display: 'Fluoroscopic angiogram Guidance for placement of transjugular intrahepatic portosystemic shunt in Portal vein and Hepatic vein', - system: 'http://loinc.org', -}; +const C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfTransjugularIntrahepaticPortosystemicShuntInPortalVeinAndHepaticVein: Coding = + { + code: '51391-1', + display: + 'Fluoroscopic angiogram Guidance for placement of transjugular intrahepatic portosystemic shunt in Portal vein and Hepatic vein', + system: 'http://loinc.org', + }; const C80DocTypecodes_WristLeftAndHandLeftXRay: Coding = { code: '51392-9', display: 'Wrist - left and Hand - left X-ray', @@ -83420,7 +83422,8 @@ export const C80DocTypecodes = { ProviderUnspecifiedEDProgressNote: C80DocTypecodes_ProviderUnspecifiedEDProgressNote, LaborAndDeliveryRecords: C80DocTypecodes_LaborAndDeliveryRecords, VAL11DeoxycorticosteroneMassTimeIn24HourUrine: C80DocTypecodes_VAL11DeoxycorticosteroneMassTimeIn24HourUrine, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasmaPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasmaPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasmaPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasmaPostXXXChallenge, VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma, ThyroidScanStudyReport: C80DocTypecodes_ThyroidScanStudyReport, PsychiatricServiceAttachment: C80DocTypecodes_PsychiatricServiceAttachment, @@ -83481,7 +83484,8 @@ export const C80DocTypecodes = { UpperExtremityVeinsFluoroscopicAngiogramWContrastIV: C80DocTypecodes_UpperExtremityVeinsFluoroscopicAngiogramWContrastIV, AVFistulaFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AVFistulaFluoroscopicAngiogramWContrastIA, StentFluoroscopyWContrastIntraStent: C80DocTypecodes_StentFluoroscopyWContrastIntraStent, - VesselIntracranialFluoroscopicAngiogramEmbolectomyWContrastIV: C80DocTypecodes_VesselIntracranialFluoroscopicAngiogramEmbolectomyWContrastIV, + VesselIntracranialFluoroscopicAngiogramEmbolectomyWContrastIV: + C80DocTypecodes_VesselIntracranialFluoroscopicAngiogramEmbolectomyWContrastIV, ArteryFluoroscopicAngiogramEmbolizationWContrastIA: C80DocTypecodes_ArteryFluoroscopicAngiogramEmbolizationWContrastIA, FluoroscopicAngiogramGuidanceForPlacementOfStentInArtery: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInArtery, AbdomenMRI: C80DocTypecodes_AbdomenMRI, @@ -83497,18 +83501,25 @@ export const C80DocTypecodes = { AbdomenRetroperitoneumCTWContrast: C80DocTypecodes_AbdomenRetroperitoneumCTWContrast, AVFistulaFluoroscopicAngiogramAtherectomyWContrastIV: C80DocTypecodes_AVFistulaFluoroscopicAngiogramAtherectomyWContrastIV, AVShuntFluoroscopicAngiogramWContrastIV: C80DocTypecodes_AVShuntFluoroscopicAngiogramWContrastIV, - FluoroscopyGuidanceForStoneRemovalOfBiliaryDuctCommonWContrastIntraBiliaryDuct: C80DocTypecodes_FluoroscopyGuidanceForStoneRemovalOfBiliaryDuctCommonWContrastIntraBiliaryDuct, - BiliaryDuctsAndGallbladderScanForPatencyOfBiliaryStructuresAndEjectionFractionWSincalideAndWRadionuclideIV: C80DocTypecodes_BiliaryDuctsAndGallbladderScanForPatencyOfBiliaryStructuresAndEjectionFractionWSincalideAndWRadionuclideIV, - BiliaryDuctsAndGallbladderScanForPatencyOfBiliaryStructuresWTc99mIV: C80DocTypecodes_BiliaryDuctsAndGallbladderScanForPatencyOfBiliaryStructuresWTc99mIV, + FluoroscopyGuidanceForStoneRemovalOfBiliaryDuctCommonWContrastIntraBiliaryDuct: + C80DocTypecodes_FluoroscopyGuidanceForStoneRemovalOfBiliaryDuctCommonWContrastIntraBiliaryDuct, + BiliaryDuctsAndGallbladderScanForPatencyOfBiliaryStructuresAndEjectionFractionWSincalideAndWRadionuclideIV: + C80DocTypecodes_BiliaryDuctsAndGallbladderScanForPatencyOfBiliaryStructuresAndEjectionFractionWSincalideAndWRadionuclideIV, + BiliaryDuctsAndGallbladderScanForPatencyOfBiliaryStructuresWTc99mIV: + C80DocTypecodes_BiliaryDuctsAndGallbladderScanForPatencyOfBiliaryStructuresWTc99mIV, BiliaryDuctsAndGallbladderXRayWContrastIV: C80DocTypecodes_BiliaryDuctsAndGallbladderXRayWContrastIV, - BiliaryDuctsAndGallbladderFluoroscopyDuringSurgeryWContrastBiliaryDuct: C80DocTypecodes_BiliaryDuctsAndGallbladderFluoroscopyDuringSurgeryWContrastBiliaryDuct, - BiliaryDuctsAndGallbladderFluoroscopyWContrastPercutaneousTranshepatic: C80DocTypecodes_BiliaryDuctsAndGallbladderFluoroscopyWContrastPercutaneousTranshepatic, + BiliaryDuctsAndGallbladderFluoroscopyDuringSurgeryWContrastBiliaryDuct: + C80DocTypecodes_BiliaryDuctsAndGallbladderFluoroscopyDuringSurgeryWContrastBiliaryDuct, + BiliaryDuctsAndGallbladderFluoroscopyWContrastPercutaneousTranshepatic: + C80DocTypecodes_BiliaryDuctsAndGallbladderFluoroscopyWContrastPercutaneousTranshepatic, UrinaryBladderArteriesFluoroscopicAngiogramWContrastIA: C80DocTypecodes_UrinaryBladderArteriesFluoroscopicAngiogramWContrastIA, BoneXRayDuringSurgery: C80DocTypecodes_BoneXRayDuringSurgery, BonesSPECT: C80DocTypecodes_BonesSPECT, BonesLongXRaySurvey: C80DocTypecodes_BonesLongXRaySurvey, - BrachiocephalicArteryFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_BrachiocephalicArteryFluoroscopicAngiogramAngioplastyWContrastIA, - BrachialArteryAndSubclavianArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_BrachialArteryAndSubclavianArteryFluoroscopicAngiogramWContrastIA, + BrachiocephalicArteryFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_BrachiocephalicArteryFluoroscopicAngiogramAngioplastyWContrastIA, + BrachialArteryAndSubclavianArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_BrachialArteryAndSubclavianArteryFluoroscopicAngiogramWContrastIA, ThoracicOutletMRI: C80DocTypecodes_ThoracicOutletMRI, ThoracicOutletMRIWAndWOContrastIV: C80DocTypecodes_ThoracicOutletMRIWAndWOContrastIV, ThoracicOutletVesselsMRIAngiogramWContrastIV: C80DocTypecodes_ThoracicOutletVesselsMRIAngiogramWContrastIV, @@ -83537,9 +83548,12 @@ export const C80DocTypecodes = { BreastMammogramLimited: C80DocTypecodes_BreastMammogramLimited, OutpatientConsultation2ndOpinion: C80DocTypecodes_OutpatientConsultation2ndOpinion, CalcaneusXRay: C80DocTypecodes_CalcaneusXRay, - FluoroscopicAngiogramGuidanceForPlacementOfCatheterInArteryInCentralCardiovascularArtery: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInArteryInCentralCardiovascularArtery, - CarotidArteryExtracranialFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_CarotidArteryExtracranialFluoroscopicAngiogramAngioplastyWContrastIA, - CarotidArteryIntracranialFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_CarotidArteryIntracranialFluoroscopicAngiogramAngioplastyWContrastIA, + FluoroscopicAngiogramGuidanceForPlacementOfCatheterInArteryInCentralCardiovascularArtery: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInArteryInCentralCardiovascularArtery, + CarotidArteryExtracranialFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_CarotidArteryExtracranialFluoroscopicAngiogramAngioplastyWContrastIA, + CarotidArteryIntracranialFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_CarotidArteryIntracranialFluoroscopicAngiogramAngioplastyWContrastIA, CarotidArteryUS: C80DocTypecodes_CarotidArteryUS, CarotidArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryFluoroscopicAngiogramWContrastIA, WristXRay: C80DocTypecodes_WristXRay, @@ -83547,14 +83561,18 @@ export const C80DocTypecodes = { FluoroscopyGuidanceForPercutaneousDrainageOfCavity: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfCavity, CeliacArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CeliacArteryFluoroscopicAngiogramWContrastIA, CTGuidanceForAnestheticBlockInjectionOfCeliacPlexus: C80DocTypecodes_CTGuidanceForAnestheticBlockInjectionOfCeliacPlexus, - FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinWContrastIV, - FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinWContrastIV, - FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinWContrastIV, + FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinWContrastIV, + FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinWContrastIV, + FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinWContrastIV, ChestCT: C80DocTypecodes_ChestCT, ChestCTWContrastIV: C80DocTypecodes_ChestCTWContrastIV, ChestMRI: C80DocTypecodes_ChestMRI, ChestUS: C80DocTypecodes_ChestUS, - UnspecifiedBodyRegionFluoroscopyCentralVeinCatheterPlacementCheck: C80DocTypecodes_UnspecifiedBodyRegionFluoroscopyCentralVeinCatheterPlacementCheck, + UnspecifiedBodyRegionFluoroscopyCentralVeinCatheterPlacementCheck: + C80DocTypecodes_UnspecifiedBodyRegionFluoroscopyCentralVeinCatheterPlacementCheck, ChestXRayAPPortable: C80DocTypecodes_ChestXRayAPPortable, ChestXRayPortableWInspirationAndExpiration: C80DocTypecodes_ChestXRayPortableWInspirationAndExpiration, ChestXRayPAUprightWInspirationAndExpiration: C80DocTypecodes_ChestXRayPAUprightWInspirationAndExpiration, @@ -83567,11 +83585,14 @@ export const C80DocTypecodes = { ChestXRayAPAndPAUpright: C80DocTypecodes_ChestXRayAPAndPAUpright, ChestXRayPAAndLateralAndRightOrLeftObliqueUpright: C80DocTypecodes_ChestXRayPAAndLateralAndRightOrLeftObliqueUpright, ChestXRayPAAndLateralUprightPortable: C80DocTypecodes_ChestXRayPAAndLateralUprightPortable, - ChestXRayPAAndRightLateralAndRightObliqueAndLeftObliqueUprightPortable: C80DocTypecodes_ChestXRayPAAndRightLateralAndRightObliqueAndLeftObliqueUprightPortable, - ChestXRayPAAndRightLateralAndRightObliqueAndLeftObliqueUpright: C80DocTypecodes_ChestXRayPAAndRightLateralAndRightObliqueAndLeftObliqueUpright, + ChestXRayPAAndRightLateralAndRightObliqueAndLeftObliqueUprightPortable: + C80DocTypecodes_ChestXRayPAAndRightLateralAndRightObliqueAndLeftObliqueUprightPortable, + ChestXRayPAAndRightLateralAndRightObliqueAndLeftObliqueUpright: + C80DocTypecodes_ChestXRayPAAndRightLateralAndRightObliqueAndLeftObliqueUpright, ChestXRayPAAndLateralUpright: C80DocTypecodes_ChestXRayPAAndLateralUpright, ChestXRayPAUpright: C80DocTypecodes_ChestXRayPAUpright, - ChestXRayAPRightLateralDecubitusAndLeftLateralDecubitusPortable: C80DocTypecodes_ChestXRayAPRightLateralDecubitusAndLeftLateralDecubitusPortable, + ChestXRayAPRightLateralDecubitusAndLeftLateralDecubitusPortable: + C80DocTypecodes_ChestXRayAPRightLateralDecubitusAndLeftLateralDecubitusPortable, ChestXRayAPRightLateralDecubitusAndLeftLateralDecubitus: C80DocTypecodes_ChestXRayAPRightLateralDecubitusAndLeftLateralDecubitus, ChestXRayRightObliqueAndLeftObliqueUpright: C80DocTypecodes_ChestXRayRightObliqueAndLeftObliqueUpright, ChestXRayAPRightLateralDecubitusPortable: C80DocTypecodes_ChestXRayAPRightLateralDecubitusPortable, @@ -83593,7 +83614,8 @@ export const C80DocTypecodes = { ColonFluoroscopyTransitPostSolidContrast: C80DocTypecodes_ColonFluoroscopyTransitPostSolidContrast, ColonFluoroscopyWWaterSolubleContrastPR: C80DocTypecodes_ColonFluoroscopyWWaterSolubleContrastPR, USGuidanceForBiopsyOfCystOfUnspecifiedBodyRegion: C80DocTypecodes_USGuidanceForBiopsyOfCystOfUnspecifiedBodyRegion, - FluoroscopyGuidanceForAspirationOfCystOfUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForAspirationOfCystOfUnspecifiedBodyRegion, + FluoroscopyGuidanceForAspirationOfCystOfUnspecifiedBodyRegion: + C80DocTypecodes_FluoroscopyGuidanceForAspirationOfCystOfUnspecifiedBodyRegion, DiaphragmUSMotion: C80DocTypecodes_DiaphragmUSMotion, DuodenumFluoroscopyWContrastPOAndHypotonicAgentPerNg: C80DocTypecodes_DuodenumFluoroscopyWContrastPOAndHypotonicAgentPerNg, ElbowMRI: C80DocTypecodes_ElbowMRI, @@ -83603,10 +83625,13 @@ export const C80DocTypecodes = { EsophagusFluoroscopyWContrastPO: C80DocTypecodes_EsophagusFluoroscopyWContrastPO, EsophagusFluoroscopyWGastrografinPO: C80DocTypecodes_EsophagusFluoroscopyWGastrografinPO, FluoroscopyGuidanceForDilationOfEsophagus: C80DocTypecodes_FluoroscopyGuidanceForDilationOfEsophagus, - EsophagusAndHypopharynxFluoroscopyVideoWContrastPODuringSwallowing: C80DocTypecodes_EsophagusAndHypopharynxFluoroscopyVideoWContrastPODuringSwallowing, - EsophagusAndHypopharynxFluoroscopyVideoWLiquidAndPasteContrastPODuringSwallowing: C80DocTypecodes_EsophagusAndHypopharynxFluoroscopyVideoWLiquidAndPasteContrastPODuringSwallowing, + EsophagusAndHypopharynxFluoroscopyVideoWContrastPODuringSwallowing: + C80DocTypecodes_EsophagusAndHypopharynxFluoroscopyVideoWContrastPODuringSwallowing, + EsophagusAndHypopharynxFluoroscopyVideoWLiquidAndPasteContrastPODuringSwallowing: + C80DocTypecodes_EsophagusAndHypopharynxFluoroscopyVideoWLiquidAndPasteContrastPODuringSwallowing, EsophagusAndStomachScanWTc99mSCPO: C80DocTypecodes_EsophagusAndStomachScanWTc99mSCPO, - ExtracranialVesselsFluoroscopicAngiogramEmbolectomyWContrastIA: C80DocTypecodes_ExtracranialVesselsFluoroscopicAngiogramEmbolectomyWContrastIA, + ExtracranialVesselsFluoroscopicAngiogramEmbolectomyWContrastIA: + C80DocTypecodes_ExtracranialVesselsFluoroscopicAngiogramEmbolectomyWContrastIA, PeripheralVeinsFluoroscopicAngiogramWContrastIV: C80DocTypecodes_PeripheralVeinsFluoroscopicAngiogramWContrastIV, LowerExtremityXRay: C80DocTypecodes_LowerExtremityXRay, LowerExtremityJointMRI: C80DocTypecodes_LowerExtremityJointMRI, @@ -83637,7 +83662,8 @@ export const C80DocTypecodes = { GallbladderXRay48HoursPostContrastPO: C80DocTypecodes_GallbladderXRay48HoursPostContrastPO, GastrointestineScanWTc99mTaggedRBCIV: C80DocTypecodes_GastrointestineScanWTc99mTaggedRBCIV, GastrointestineUpperFluoroscopySingleViewWContrastPO: C80DocTypecodes_GastrointestineUpperFluoroscopySingleViewWContrastPO, - FluoroscopyGuidanceForPlacementOfDecompressionTubeInGastrointestine: C80DocTypecodes_FluoroscopyGuidanceForPlacementOfDecompressionTubeInGastrointestine, + FluoroscopyGuidanceForPlacementOfDecompressionTubeInGastrointestine: + C80DocTypecodes_FluoroscopyGuidanceForPlacementOfDecompressionTubeInGastrointestine, IlealConduitXRayLoopogram: C80DocTypecodes_IlealConduitXRayLoopogram, FluoroscopyGuidanceForTransjugularBiopsyOfLiverWContrastIV: C80DocTypecodes_FluoroscopyGuidanceForTransjugularBiopsyOfLiverWContrastIV, GroinUS: C80DocTypecodes_GroinUS, @@ -83667,7 +83693,8 @@ export const C80DocTypecodes = { HeartFluoroscopyVideo: C80DocTypecodes_HeartFluoroscopyVideo, UnspecifiedBodyRegionCTWContrastIV: C80DocTypecodes_UnspecifiedBodyRegionCTWContrastIV, AdministrationOfVasodilatorIntoCatheterOfVein: C80DocTypecodes_AdministrationOfVasodilatorIntoCatheterOfVein, - FluoroscopicAngiogramGuidanceForAtherectomyOfVeinWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForAtherectomyOfVeinWContrastIV, + FluoroscopicAngiogramGuidanceForAtherectomyOfVeinWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForAtherectomyOfVeinWContrastIV, FluoroscopicAngiogramGuidanceForPlacementOfStentInVein: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInVein, CoronaryArteriesCTFast: C80DocTypecodes_CoronaryArteriesCTFast, HipUS: C80DocTypecodes_HipUS, @@ -83684,10 +83711,13 @@ export const C80DocTypecodes = { KidneyBilateralScanWRadionuclideTransplantScan: C80DocTypecodes_KidneyBilateralScanWRadionuclideTransplantScan, KidneyBilateralScan: C80DocTypecodes_KidneyBilateralScan, KidneyBilateralXRay3ViewsSerialWAndWOContrastIV: C80DocTypecodes_KidneyBilateralXRay3ViewsSerialWAndWOContrastIV, - FluoroscopyGuidanceForPlacementOfPercutaneousNephrostomyInKidneyBilateralWContrastViaTube: C80DocTypecodes_FluoroscopyGuidanceForPlacementOfPercutaneousNephrostomyInKidneyBilateralWContrastViaTube, + FluoroscopyGuidanceForPlacementOfPercutaneousNephrostomyInKidneyBilateralWContrastViaTube: + C80DocTypecodes_FluoroscopyGuidanceForPlacementOfPercutaneousNephrostomyInKidneyBilateralWContrastViaTube, KidneyBilateralFluoroscopyWContrastViaNephrostomyTube: C80DocTypecodes_KidneyBilateralFluoroscopyWContrastViaNephrostomyTube, - FluoroscopyGuidanceForChangeOfPercutaneousNephrostomyTubeInKidneyBilateralWContrast: C80DocTypecodes_FluoroscopyGuidanceForChangeOfPercutaneousNephrostomyTubeInKidneyBilateralWContrast, - FluoroscopyGuidanceForPlacementOfPercutaneousNephroureteralStentInKidneyBilateral: C80DocTypecodes_FluoroscopyGuidanceForPlacementOfPercutaneousNephroureteralStentInKidneyBilateral, + FluoroscopyGuidanceForChangeOfPercutaneousNephrostomyTubeInKidneyBilateralWContrast: + C80DocTypecodes_FluoroscopyGuidanceForChangeOfPercutaneousNephrostomyTubeInKidneyBilateralWContrast, + FluoroscopyGuidanceForPlacementOfPercutaneousNephroureteralStentInKidneyBilateral: + C80DocTypecodes_FluoroscopyGuidanceForPlacementOfPercutaneousNephroureteralStentInKidneyBilateral, KidneyBilateralFluoroscopyUrodynamics: C80DocTypecodes_KidneyBilateralFluoroscopyUrodynamics, KidneyBilateralXRayTomographWAndWOContrastIV: C80DocTypecodes_KidneyBilateralXRayTomographWAndWOContrastIV, KidneyBilateralXRayTomographWOContrastAnd10MPostContrastIV: C80DocTypecodes_KidneyBilateralXRayTomographWOContrastAnd10MPostContrastIV, @@ -83782,17 +83812,20 @@ export const C80DocTypecodes = { PituitaryAndSellaTurcicaMRIWAndWOContrastIV: C80DocTypecodes_PituitaryAndSellaTurcicaMRIWAndWOContrastIV, PituitaryAndSellaTurcicaMRI: C80DocTypecodes_PituitaryAndSellaTurcicaMRI, PoplitealSpaceUS: C80DocTypecodes_PoplitealSpaceUS, - PoplitealArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA: C80DocTypecodes_PoplitealArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA, + PoplitealArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA: + C80DocTypecodes_PoplitealArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA, USGuidanceForBiopsyOfProstate: C80DocTypecodes_USGuidanceForBiopsyOfProstate, ProstateUS: C80DocTypecodes_ProstateUS, USGuidanceForRepairOfPseudoaneurysmAVFistula: C80DocTypecodes_USGuidanceForRepairOfPseudoaneurysmAVFistula, PulmonaryArteryFluoroscopicAngiogramEmbolectomyWContrastIA: C80DocTypecodes_PulmonaryArteryFluoroscopicAngiogramEmbolectomyWContrastIA, - PulmonarySystemScanVentilationAndPerfusionWXe133InhaledAndWTc99mMAAIV: C80DocTypecodes_PulmonarySystemScanVentilationAndPerfusionWXe133InhaledAndWTc99mMAAIV, + PulmonarySystemScanVentilationAndPerfusionWXe133InhaledAndWTc99mMAAIV: + C80DocTypecodes_PulmonarySystemScanVentilationAndPerfusionWXe133InhaledAndWTc99mMAAIV, PylorusUSForPyloricStenosis: C80DocTypecodes_PylorusUSForPyloricStenosis, RadiusAndUlnaXRay: C80DocTypecodes_RadiusAndUlnaXRay, RectumUS: C80DocTypecodes_RectumUS, RectumFluoroscopyPostContrastPRDuringDefecation: C80DocTypecodes_RectumFluoroscopyPostContrastPRDuringDefecation, - RectumAndUrinaryBladderFluoroscopyWContrastPRAndIntraBladderDuringDefecationAndVoiding: C80DocTypecodes_RectumAndUrinaryBladderFluoroscopyWContrastPRAndIntraBladderDuringDefecationAndVoiding, + RectumAndUrinaryBladderFluoroscopyWContrastPRAndIntraBladderDuringDefecationAndVoiding: + C80DocTypecodes_RectumAndUrinaryBladderFluoroscopyWContrastPRAndIntraBladderDuringDefecationAndVoiding, USGuidanceForDrainageOfKidney: C80DocTypecodes_USGuidanceForDrainageOfKidney, RibsXRay: C80DocTypecodes_RibsXRay, SacroiliacJointXRay: C80DocTypecodes_SacroiliacJointXRay, @@ -83818,7 +83851,8 @@ export const C80DocTypecodes = { SkullXRayLateral: C80DocTypecodes_SkullXRayLateral, SkullXRayWaters: C80DocTypecodes_SkullXRayWaters, SkullXRay5Views: C80DocTypecodes_SkullXRay5Views, - SmallBowelFluoroscopyViewsEnteroclysisWContrastPOViaDuodenalIntubation: C80DocTypecodes_SmallBowelFluoroscopyViewsEnteroclysisWContrastPOViaDuodenalIntubation, + SmallBowelFluoroscopyViewsEnteroclysisWContrastPOViaDuodenalIntubation: + C80DocTypecodes_SmallBowelFluoroscopyViewsEnteroclysisWContrastPOViaDuodenalIntubation, SmallBowelFluoroscopyWContrastPO: C80DocTypecodes_SmallBowelFluoroscopyWContrastPO, SpinalArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_SpinalArteryFluoroscopicAngiogramWContrastIA, SpineUS: C80DocTypecodes_SpineUS, @@ -83875,7 +83909,8 @@ export const C80DocTypecodes = { SternoclavicularJointsXRay: C80DocTypecodes_SternoclavicularJointsXRay, SternumXRay: C80DocTypecodes_SternumXRay, FluoroscopyGuidanceForPlacementOfTubeInStomach: C80DocTypecodes_FluoroscopyGuidanceForPlacementOfTubeInStomach, - FluoroscopyGuidanceForReplacementOfPercutaneousGastrostomyInStomach: C80DocTypecodes_FluoroscopyGuidanceForReplacementOfPercutaneousGastrostomyInStomach, + FluoroscopyGuidanceForReplacementOfPercutaneousGastrostomyInStomach: + C80DocTypecodes_FluoroscopyGuidanceForReplacementOfPercutaneousGastrostomyInStomach, StomachScanForGastricEmptyingSolidPhaseWTc99mSCPO: C80DocTypecodes_StomachScanForGastricEmptyingSolidPhaseWTc99mSCPO, PlacementCheckOfGastrostomyTubeWContrastViaGITube: C80DocTypecodes_PlacementCheckOfGastrostomyTubeWContrastViaGITube, TemporomandibularJointMRI: C80DocTypecodes_TemporomandibularJointMRI, @@ -83898,15 +83933,21 @@ export const C80DocTypecodes = { UrinaryBladderAndUrethraFluoroscopyWContrastIntraBladder: C80DocTypecodes_UrinaryBladderAndUrethraFluoroscopyWContrastIntraBladder, UrinaryBladderScan: C80DocTypecodes_UrinaryBladderScan, UrinaryBladderUS: C80DocTypecodes_UrinaryBladderUS, - UrinaryBladderAndUrethraFluoroscopyWContrastRetrogradeViaUrethra: C80DocTypecodes_UrinaryBladderAndUrethraFluoroscopyWContrastRetrogradeViaUrethra, + UrinaryBladderAndUrethraFluoroscopyWContrastRetrogradeViaUrethra: + C80DocTypecodes_UrinaryBladderAndUrethraFluoroscopyWContrastRetrogradeViaUrethra, UterusAndFallopianTubesFluoroscopyWContrastIntrauterine: C80DocTypecodes_UterusAndFallopianTubesFluoroscopyWContrastIntrauterine, VeinFluoroscopicAngiogramWContrastIV: C80DocTypecodes_VeinFluoroscopicAngiogramWContrastIV, - FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVein: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVein, + FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVein: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVein, VenaCavaFluoroscopicAngiogramWContrastIV: C80DocTypecodes_VenaCavaFluoroscopicAngiogramWContrastIV, - FluoroscopicAngiogramGuidanceForPlacementOfIVCFilterInInferiorVenaCavaWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfIVCFilterInInferiorVenaCavaWContrastIV, - GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVein: C80DocTypecodes_GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVein, - FluoroscopicAngiogramGuidanceForPlacementOfCatheterForAdminstrationOfThrombolyticInVessel: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterForAdminstrationOfThrombolyticInVessel, - FluoroscopicAngiogramGuidanceForPlacementOfCatheterForVasoconstrictorInfusionInVessels: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterForVasoconstrictorInfusionInVessels, + FluoroscopicAngiogramGuidanceForPlacementOfIVCFilterInInferiorVenaCavaWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfIVCFilterInInferiorVenaCavaWContrastIV, + GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVein: + C80DocTypecodes_GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVein, + FluoroscopicAngiogramGuidanceForPlacementOfCatheterForAdminstrationOfThrombolyticInVessel: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterForAdminstrationOfThrombolyticInVessel, + FluoroscopicAngiogramGuidanceForPlacementOfCatheterForVasoconstrictorInfusionInVessels: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterForVasoconstrictorInfusionInVessels, AbdominalArteriesFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AbdominalArteriesFluoroscopicAngiogramWContrastIA, BoneScan: C80DocTypecodes_BoneScan, BoneScanWIn111TaggedWBCIV: C80DocTypecodes_BoneScanWIn111TaggedWBCIV, @@ -83917,7 +83958,8 @@ export const C80DocTypecodes = { UnspecifiedBodyRegionCourtesyConsultation: C80DocTypecodes_UnspecifiedBodyRegionCourtesyConsultation, UnspecifiedBodyRegionCTLimited: C80DocTypecodes_UnspecifiedBodyRegionCTLimited, UnspecifiedBodyRegionCT3D: C80DocTypecodes_UnspecifiedBodyRegionCT3D, - CTGuidanceForAspirationOrBiopsyOfUnspecifiedBodyRegionWContrastIV: C80DocTypecodes_CTGuidanceForAspirationOrBiopsyOfUnspecifiedBodyRegionWContrastIV, + CTGuidanceForAspirationOrBiopsyOfUnspecifiedBodyRegionWContrastIV: + C80DocTypecodes_CTGuidanceForAspirationOrBiopsyOfUnspecifiedBodyRegionWContrastIV, CTGuidanceForAspirationOrBiopsyOfUnspecifiedBodyRegion: C80DocTypecodes_CTGuidanceForAspirationOrBiopsyOfUnspecifiedBodyRegion, CTGuidanceForAspirationOfUnspecifiedBodyRegion: C80DocTypecodes_CTGuidanceForAspirationOfUnspecifiedBodyRegion, CTGuidanceForBiopsyOfUnspecifiedBodyRegion: C80DocTypecodes_CTGuidanceForBiopsyOfUnspecifiedBodyRegion, @@ -83947,13 +83989,17 @@ export const C80DocTypecodes = { UnspecifiedBodyRegionFluoroscopyDuringSurgery: C80DocTypecodes_UnspecifiedBodyRegionFluoroscopyDuringSurgery, UnspecifiedBodyRegionXRayTomograph: C80DocTypecodes_UnspecifiedBodyRegionXRayTomograph, GuidanceForPlacementOfInfusionPortInUnspecifiedBodyRegion: C80DocTypecodes_GuidanceForPlacementOfInfusionPortInUnspecifiedBodyRegion, - VesselFluoroscopicAngiogramRemovalOfForeignBodyFromVascularSpace: C80DocTypecodes_VesselFluoroscopicAngiogramRemovalOfForeignBodyFromVascularSpace, + VesselFluoroscopicAngiogramRemovalOfForeignBodyFromVascularSpace: + C80DocTypecodes_VesselFluoroscopicAngiogramRemovalOfForeignBodyFromVascularSpace, ZygomaticArchXRay: C80DocTypecodes_ZygomaticArchXRay, HepaticArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_HepaticArteryFluoroscopicAngiogramWContrastIA, - FluoroscopicAngiogramGuidanceForPlacementOfCatheterInHepaticArteryWContrastIA: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInHepaticArteryWContrastIA, - FluoroscopyGuidanceForPlacementOfStentInIntrahepaticPortalSystem: C80DocTypecodes_FluoroscopyGuidanceForPlacementOfStentInIntrahepaticPortalSystem, + FluoroscopicAngiogramGuidanceForPlacementOfCatheterInHepaticArteryWContrastIA: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInHepaticArteryWContrastIA, + FluoroscopyGuidanceForPlacementOfStentInIntrahepaticPortalSystem: + C80DocTypecodes_FluoroscopyGuidanceForPlacementOfStentInIntrahepaticPortalSystem, KidneyArteriesFluoroscopicAngiogramWContrastIA: C80DocTypecodes_KidneyArteriesFluoroscopicAngiogramWContrastIA, - RenalVeinBilateralFluoroscopicAngiogramWContrastIVAndWReninSampling: C80DocTypecodes_RenalVeinBilateralFluoroscopicAngiogramWContrastIVAndWReninSampling, + RenalVeinBilateralFluoroscopicAngiogramWContrastIVAndWReninSampling: + C80DocTypecodes_RenalVeinBilateralFluoroscopicAngiogramWContrastIVAndWReninSampling, RenalVesselFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_RenalVesselFluoroscopicAngiogramAngioplastyWContrastIA, VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasma: C80DocTypecodes_VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasma, VeinBilateralFluoroscopicAngiogramWContrastIV: C80DocTypecodes_VeinBilateralFluoroscopicAngiogramWContrastIV, @@ -84061,7 +84107,8 @@ export const C80DocTypecodes = { BreastBilateralMammogramScreening: C80DocTypecodes_BreastBilateralMammogramScreening, BreastLeftMammogramScreening: C80DocTypecodes_BreastLeftMammogramScreening, BreastRightMammogramScreening: C80DocTypecodes_BreastRightMammogramScreening, - FemoralArteryBilateralFluoroscopicAngiogramRunoffWContrastIA: C80DocTypecodes_FemoralArteryBilateralFluoroscopicAngiogramRunoffWContrastIA, + FemoralArteryBilateralFluoroscopicAngiogramRunoffWContrastIA: + C80DocTypecodes_FemoralArteryBilateralFluoroscopicAngiogramRunoffWContrastIA, FemoralArteryLeftFluoroscopicAngiogramRunoffWContrastIA: C80DocTypecodes_FemoralArteryLeftFluoroscopicAngiogramRunoffWContrastIA, FemoralArteryRightFluoroscopicAngiogramRunoffWContrastIA: C80DocTypecodes_FemoralArteryRightFluoroscopicAngiogramRunoffWContrastIA, ThoracicOutletVesselsBilateralMRIAngiogramWContrastIV: C80DocTypecodes_ThoracicOutletVesselsBilateralMRIAngiogramWContrastIV, @@ -84175,27 +84222,44 @@ export const C80DocTypecodes = { MammogramGuidanceStereotacticForBiopsyOfBreastBilateral: C80DocTypecodes_MammogramGuidanceStereotacticForBiopsyOfBreastBilateral, MammogramGuidanceStereotacticForBiopsyOfBreastLeft: C80DocTypecodes_MammogramGuidanceStereotacticForBiopsyOfBreastLeft, MammogramGuidanceStereotacticForBiopsyOfBreastRight: C80DocTypecodes_MammogramGuidanceStereotacticForBiopsyOfBreastRight, - FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinBilateralWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinBilateralWContrastIV, - FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinLeftWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinLeftWContrastIV, - FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinRightWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinRightWContrastIV, - FluoroscopicAngiogramGuidanceForAtherectomyOfVeinBilateralWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForAtherectomyOfVeinBilateralWContrastIV, - FluoroscopicAngiogramGuidanceForAtherectomyOfVeinLeftWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForAtherectomyOfVeinLeftWContrastIV, - FluoroscopicAngiogramGuidanceForAtherectomyOfVeinRightWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForAtherectomyOfVeinRightWContrastIV, - FluoroscopicAngiogramGuidanceForPlacementOfStentInVeinBilateral: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInVeinBilateral, + FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinBilateralWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinBilateralWContrastIV, + FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinLeftWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinLeftWContrastIV, + FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinRightWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForRepositionOfCatheterInCentralVeinRightWContrastIV, + FluoroscopicAngiogramGuidanceForAtherectomyOfVeinBilateralWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForAtherectomyOfVeinBilateralWContrastIV, + FluoroscopicAngiogramGuidanceForAtherectomyOfVeinLeftWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForAtherectomyOfVeinLeftWContrastIV, + FluoroscopicAngiogramGuidanceForAtherectomyOfVeinRightWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForAtherectomyOfVeinRightWContrastIV, + FluoroscopicAngiogramGuidanceForPlacementOfStentInVeinBilateral: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInVeinBilateral, FluoroscopicAngiogramGuidanceForPlacementOfStentInVeinLeft: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInVeinLeft, FluoroscopicAngiogramGuidanceForPlacementOfStentInVeinRight: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInVeinRight, - FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinBilateral: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinBilateral, - FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinLeft: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinLeft, - FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinRight: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinRight, - GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinBilateral: C80DocTypecodes_GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinBilateral, - GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinLeft: C80DocTypecodes_GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinLeft, - GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinRight: C80DocTypecodes_GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinRight, - FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinBilateralWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinBilateralWContrastIV, - FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinLeftWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinLeftWContrastIV, - FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinRightWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinRightWContrastIV, + FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinBilateral: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinBilateral, + FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinLeft: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinLeft, + FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinRight: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfLongtermPeripheralCatheterInCentralVeinRight, + GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinBilateral: + C80DocTypecodes_GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinBilateral, + GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinLeft: + C80DocTypecodes_GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinLeft, + GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinRight: + C80DocTypecodes_GuidanceForPlacementOfLargeBoreCatheterIntoVesselInCentralVeinRight, + FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinBilateralWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinBilateralWContrastIV, + FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinLeftWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinLeftWContrastIV, + FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinRightWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInCentralVeinRightWContrastIV, USGuidanceForNeedleLocalizationOfBreastBilateral: C80DocTypecodes_USGuidanceForNeedleLocalizationOfBreastBilateral, USGuidanceForNeedleLocalizationOfBreastLeft: C80DocTypecodes_USGuidanceForNeedleLocalizationOfBreastLeft, - MammogramGuidanceForNeedleLocalizationOfMassOfBreastBilateral: C80DocTypecodes_MammogramGuidanceForNeedleLocalizationOfMassOfBreastBilateral, + MammogramGuidanceForNeedleLocalizationOfMassOfBreastBilateral: + C80DocTypecodes_MammogramGuidanceForNeedleLocalizationOfMassOfBreastBilateral, MammogramGuidanceForNeedleLocalizationOfMassOfBreastLeft: C80DocTypecodes_MammogramGuidanceForNeedleLocalizationOfMassOfBreastLeft, MammogramGuidanceForNeedleLocalizationOfMassOfBreastRight: C80DocTypecodes_MammogramGuidanceForNeedleLocalizationOfMassOfBreastRight, USGuidanceForNeedleLocalizationOfBreastRight: C80DocTypecodes_USGuidanceForNeedleLocalizationOfBreastRight, @@ -84211,12 +84275,18 @@ export const C80DocTypecodes = { USGuidanceForDrainageOfKidneyBilateral: C80DocTypecodes_USGuidanceForDrainageOfKidneyBilateral, USGuidanceForDrainageOfKidneyLeft: C80DocTypecodes_USGuidanceForDrainageOfKidneyLeft, USGuidanceForDrainageOfKidneyRight: C80DocTypecodes_USGuidanceForDrainageOfKidneyRight, - FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinBilateralWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinBilateralWContrastIV, - FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinLeftWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinLeftWContrastIV, - FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinRightWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinRightWContrastIV, - MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastBilateral: C80DocTypecodes_MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastBilateral, - MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastLeft: C80DocTypecodes_MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastLeft, - MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastRight: C80DocTypecodes_MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastRight, + FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinBilateralWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinBilateralWContrastIV, + FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinLeftWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinLeftWContrastIV, + FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinRightWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForChangeOfCentralCatheterInCentralVeinRightWContrastIV, + MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastBilateral: + C80DocTypecodes_MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastBilateral, + MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastLeft: + C80DocTypecodes_MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastLeft, + MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastRight: + C80DocTypecodes_MammogramGuidanceForCoreNeedlePercutaneousBiopsyOfBreastRight, MammogramGuidanceForBiopsyOfBreastBilateral: C80DocTypecodes_MammogramGuidanceForBiopsyOfBreastBilateral, MammogramGuidanceForBiopsyOfBreastLeft: C80DocTypecodes_MammogramGuidanceForBiopsyOfBreastLeft, MammogramGuidanceForBiopsyOfBreastRight: C80DocTypecodes_MammogramGuidanceForBiopsyOfBreastRight, @@ -84247,14 +84317,19 @@ export const C80DocTypecodes = { KneeBilateralXRayAPAndLateralStanding: C80DocTypecodes_KneeBilateralXRayAPAndLateralStanding, KneeLeftXRayAPAndLateralStanding: C80DocTypecodes_KneeLeftXRayAPAndLateralStanding, KneeRightXRayAPAndLateralStanding: C80DocTypecodes_KneeRightXRayAPAndLateralStanding, - BrachiocephalicArteryLeftFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_BrachiocephalicArteryLeftFluoroscopicAngiogramAngioplastyWContrastIA, - BrachiocephalicArteryRightFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_BrachiocephalicArteryRightFluoroscopicAngiogramAngioplastyWContrastIA, - IliacArteryBilateralFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_IliacArteryBilateralFluoroscopicAngiogramAngioplastyWContrastIA, + BrachiocephalicArteryLeftFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_BrachiocephalicArteryLeftFluoroscopicAngiogramAngioplastyWContrastIA, + BrachiocephalicArteryRightFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_BrachiocephalicArteryRightFluoroscopicAngiogramAngioplastyWContrastIA, + IliacArteryBilateralFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_IliacArteryBilateralFluoroscopicAngiogramAngioplastyWContrastIA, IliacArteryLeftFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_IliacArteryLeftFluoroscopicAngiogramAngioplastyWContrastIA, IliacArteryRightFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_IliacArteryRightFluoroscopicAngiogramAngioplastyWContrastIA, - TibialArteryBilateralFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_TibialArteryBilateralFluoroscopicAngiogramAngioplastyWContrastIA, + TibialArteryBilateralFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_TibialArteryBilateralFluoroscopicAngiogramAngioplastyWContrastIA, TibialArteryLeftFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_TibialArteryLeftFluoroscopicAngiogramAngioplastyWContrastIA, - TibialArteryRightFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_TibialArteryRightFluoroscopicAngiogramAngioplastyWContrastIA, + TibialArteryRightFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_TibialArteryRightFluoroscopicAngiogramAngioplastyWContrastIA, AdministrationOfVasodilatorIntoCatheterOfVeinBilateral: C80DocTypecodes_AdministrationOfVasodilatorIntoCatheterOfVeinBilateral, AdministrationOfVasodilatorIntoCatheterOfVeinLeft: C80DocTypecodes_AdministrationOfVasodilatorIntoCatheterOfVeinLeft, AdministrationOfVasodilatorIntoCatheterOfVeinRight: C80DocTypecodes_AdministrationOfVasodilatorIntoCatheterOfVeinRight, @@ -84348,8 +84423,10 @@ export const C80DocTypecodes = { CTGuidanceForAbscessDrainageOfUnspecifiedBodyRegion: C80DocTypecodes_CTGuidanceForAbscessDrainageOfUnspecifiedBodyRegion, CTGuidanceForInjectionOfSpineFacetJoint: C80DocTypecodes_CTGuidanceForInjectionOfSpineFacetJoint, CTGuidanceForFineNeedleAspirationOfUnspecifiedBodyRegion: C80DocTypecodes_CTGuidanceForFineNeedleAspirationOfUnspecifiedBodyRegion, - CTGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWContrastIV: C80DocTypecodes_CTGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWContrastIV, - CTGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWOContrast: C80DocTypecodes_CTGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWOContrast, + CTGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWContrastIV: + C80DocTypecodes_CTGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWContrastIV, + CTGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWOContrast: + C80DocTypecodes_CTGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWOContrast, InternalAuditoryCanalCTWContrastIV: C80DocTypecodes_InternalAuditoryCanalCTWContrastIV, InternalAuditoryCanalCTWOContrast: C80DocTypecodes_InternalAuditoryCanalCTWOContrast, NasopharynxAndNeckCTWOContrast: C80DocTypecodes_NasopharynxAndNeckCTWOContrast, @@ -84367,7 +84444,8 @@ export const C80DocTypecodes = { SpineThoracicCTWOContrast: C80DocTypecodes_SpineThoracicCTWOContrast, ChestCTWAndWOContrastIV: C80DocTypecodes_ChestCTWAndWOContrastIV, AbdomenCTWContrast: C80DocTypecodes_AbdomenCTWContrast, - SmallBowelCTViewsEnteroclysisWContrastPOViaDuodenalIntubation: C80DocTypecodes_SmallBowelCTViewsEnteroclysisWContrastPOViaDuodenalIntubation, + SmallBowelCTViewsEnteroclysisWContrastPOViaDuodenalIntubation: + C80DocTypecodes_SmallBowelCTViewsEnteroclysisWContrastPOViaDuodenalIntubation, CTGuidanceForBiopsyOfAbdomen: C80DocTypecodes_CTGuidanceForBiopsyOfAbdomen, CTGuidanceForFineNeedleAspirationOfAbdomen: C80DocTypecodes_CTGuidanceForFineNeedleAspirationOfAbdomen, CTGuidanceForFineNeedleAspirationOfLiver: C80DocTypecodes_CTGuidanceForFineNeedleAspirationOfLiver, @@ -84393,7 +84471,8 @@ export const C80DocTypecodes = { LowerExtremityCTWOContrast: C80DocTypecodes_LowerExtremityCTWOContrast, UpperExtremityCTWContrastIV: C80DocTypecodes_UpperExtremityCTWContrastIV, UpperExtremityCTWOContrast: C80DocTypecodes_UpperExtremityCTWOContrast, - FluoroscopyGuidanceForRemovalOfForeignBodyFromUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForRemovalOfForeignBodyFromUnspecifiedBodyRegion, + FluoroscopyGuidanceForRemovalOfForeignBodyFromUnspecifiedBodyRegion: + C80DocTypecodes_FluoroscopyGuidanceForRemovalOfForeignBodyFromUnspecifiedBodyRegion, FluoroscopyGuidanceForProcedureOfUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForProcedureOfUnspecifiedBodyRegion, HeadCisternFluoroscopyVideoWContrast: C80DocTypecodes_HeadCisternFluoroscopyVideoWContrast, ChestFluoroscopy: C80DocTypecodes_ChestFluoroscopy, @@ -84414,7 +84493,8 @@ export const C80DocTypecodes = { FluoroscopyGuidanceForChangeOfTubeInSinusTractWContrast: C80DocTypecodes_FluoroscopyGuidanceForChangeOfTubeInSinusTractWContrast, BiliaryDuctsAndGallbladderFluoroscopyWContrastViaTTube: C80DocTypecodes_BiliaryDuctsAndGallbladderFluoroscopyWContrastViaTTube, PeripheralArteryFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_PeripheralArteryFluoroscopicAngiogramAngioplastyWContrastIA, - PeripheralArteryFluoroscopicAngiogramAdditionalAngioplastyWContrastIA: C80DocTypecodes_PeripheralArteryFluoroscopicAngiogramAdditionalAngioplastyWContrastIA, + PeripheralArteryFluoroscopicAngiogramAdditionalAngioplastyWContrastIA: + C80DocTypecodes_PeripheralArteryFluoroscopicAngiogramAdditionalAngioplastyWContrastIA, UnspecifiedBodyRegionFluoroscopyForShunt: C80DocTypecodes_UnspecifiedBodyRegionFluoroscopyForShunt, USGuidanceForCoreNeedleBiopsyOfBreast: C80DocTypecodes_USGuidanceForCoreNeedleBiopsyOfBreast, USGuidanceForFineNeedleBiopsyOfBreast: C80DocTypecodes_USGuidanceForFineNeedleBiopsyOfBreast, @@ -84429,8 +84509,10 @@ export const C80DocTypecodes = { OrbitBilateralMRIWOContrast: C80DocTypecodes_OrbitBilateralMRIWOContrast, SinusesMRIWOContrast: C80DocTypecodes_SinusesMRIWOContrast, SinusesMRIWAndWOContrastIV: C80DocTypecodes_SinusesMRIWAndWOContrastIV, - MRIGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWContrastIV: C80DocTypecodes_MRIGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWContrastIV, - MRIGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWOContrast: C80DocTypecodes_MRIGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWOContrast, + MRIGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWContrastIV: + C80DocTypecodes_MRIGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWContrastIV, + MRIGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWOContrast: + C80DocTypecodes_MRIGuidanceForRadiationTreatmentOfUnspecifiedBodyRegionWOContrast, PituitaryAndSellaTurcicaMRIWOContrast: C80DocTypecodes_PituitaryAndSellaTurcicaMRIWOContrast, SpineCervicalMRIWOContrast: C80DocTypecodes_SpineCervicalMRIWOContrast, AbdomenMRIWOContrast: C80DocTypecodes_AbdomenMRIWOContrast, @@ -84460,7 +84542,8 @@ export const C80DocTypecodes = { ThyroidScanAndUptakeSingle: C80DocTypecodes_ThyroidScanAndUptakeSingle, ThyroidScan: C80DocTypecodes_ThyroidScan, ScrotumAndTesticleScan: C80DocTypecodes_ScrotumAndTesticleScan, - PulmonarySystemScanVentilationAndPerfusionWRadionuclideInhaledAndWRadionuclideIV: C80DocTypecodes_PulmonarySystemScanVentilationAndPerfusionWRadionuclideInhaledAndWRadionuclideIV, + PulmonarySystemScanVentilationAndPerfusionWRadionuclideInhaledAndWRadionuclideIV: + C80DocTypecodes_PulmonarySystemScanVentilationAndPerfusionWRadionuclideInhaledAndWRadionuclideIV, USGuidanceForAspirationOfCystOfUnspecifiedBodyRegion: C80DocTypecodes_USGuidanceForAspirationOfCystOfUnspecifiedBodyRegion, USGuidanceForDrainageOfUnspecifiedBodyRegion: C80DocTypecodes_USGuidanceForDrainageOfUnspecifiedBodyRegion, USGuidanceForNeedleBiopsyOfUnspecifiedBodyRegion: C80DocTypecodes_USGuidanceForNeedleBiopsyOfUnspecifiedBodyRegion, @@ -84488,7 +84571,8 @@ export const C80DocTypecodes = { SpineCervicalXRayAPSingleView: C80DocTypecodes_SpineCervicalXRayAPSingleView, SpineCervicalXRayAPAndLateralPortable: C80DocTypecodes_SpineCervicalXRayAPAndLateralPortable, SpineCervicalXRayAPPortableSingleView: C80DocTypecodes_SpineCervicalXRayAPPortableSingleView, - SpineCervicalOdontoidAndCervicalAxisXRayAPPortableSingleView: C80DocTypecodes_SpineCervicalOdontoidAndCervicalAxisXRayAPPortableSingleView, + SpineCervicalOdontoidAndCervicalAxisXRayAPPortableSingleView: + C80DocTypecodes_SpineCervicalOdontoidAndCervicalAxisXRayAPPortableSingleView, ZygomaticArchBilateralXRayPortable: C80DocTypecodes_ZygomaticArchBilateralXRayPortable, ZygomaticArchXRayPortable: C80DocTypecodes_ZygomaticArchXRayPortable, ChestXRayRightAndLeftObliquePortable: C80DocTypecodes_ChestXRayRightAndLeftObliquePortable, @@ -84572,18 +84656,24 @@ export const C80DocTypecodes = { FluoroscopyGuidanceForInjectionOfSpineCervicalFacetJoint: C80DocTypecodes_FluoroscopyGuidanceForInjectionOfSpineCervicalFacetJoint, LungBilateralXRayWContrastIntrabronchial: C80DocTypecodes_LungBilateralXRayWContrastIntrabronchial, FluoroscopyGuidanceForInjectionOfSpineThoracicFacetJoint: C80DocTypecodes_FluoroscopyGuidanceForInjectionOfSpineThoracicFacetJoint, - FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuctWContrastRetrograde: C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuctWContrastRetrograde, + FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuctWContrastRetrograde: + C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuctWContrastRetrograde, PeritoneumFluoroscopicAngiogramWContrastPercutaneous: C80DocTypecodes_PeritoneumFluoroscopicAngiogramWContrastPercutaneous, FluoroscopyGuidanceForInjectionOfSpineLumbarFacetJoint: C80DocTypecodes_FluoroscopyGuidanceForInjectionOfSpineLumbarFacetJoint, - FluoroscopyGuidanceForCatheterizationOfFallopianTubesTranscervical: C80DocTypecodes_FluoroscopyGuidanceForCatheterizationOfFallopianTubesTranscervical, + FluoroscopyGuidanceForCatheterizationOfFallopianTubesTranscervical: + C80DocTypecodes_FluoroscopyGuidanceForCatheterizationOfFallopianTubesTranscervical, EpiduralVeinsFluoroscopicAngiogramWContrastIV: C80DocTypecodes_EpiduralVeinsFluoroscopicAngiogramWContrastIV, - CarotidArteryExternalBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryExternalBilateralFluoroscopicAngiogramWContrastIA, + CarotidArteryExternalBilateralFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryExternalBilateralFluoroscopicAngiogramWContrastIA, CarotidArteryExternalFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryExternalFluoroscopicAngiogramWContrastIA, - HeadArteryBilateralAndNeckArteryBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_HeadArteryBilateralAndNeckArteryBilateralFluoroscopicAngiogramWContrastIA, + HeadArteryBilateralAndNeckArteryBilateralFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_HeadArteryBilateralAndNeckArteryBilateralFluoroscopicAngiogramWContrastIA, HeadArteryAndNeckArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_HeadArteryAndNeckArteryFluoroscopicAngiogramWContrastIA, - IntercranialVesselAndNeckVesselFluoroscopicAngiogramWContrast: C80DocTypecodes_IntercranialVesselAndNeckVesselFluoroscopicAngiogramWContrast, + IntercranialVesselAndNeckVesselFluoroscopicAngiogramWContrast: + C80DocTypecodes_IntercranialVesselAndNeckVesselFluoroscopicAngiogramWContrast, OrbitVeinsFluoroscopicAngiogramWContrastIV: C80DocTypecodes_OrbitVeinsFluoroscopicAngiogramWContrastIV, - SagittalSinusAndJugularVeinsFluoroscopicAngiogramWContrastIV: C80DocTypecodes_SagittalSinusAndJugularVeinsFluoroscopicAngiogramWContrastIV, + SagittalSinusAndJugularVeinsFluoroscopicAngiogramWContrastIV: + C80DocTypecodes_SagittalSinusAndJugularVeinsFluoroscopicAngiogramWContrastIV, SagittalSinusVeinFluoroscopicAngiogramWContrastIV: C80DocTypecodes_SagittalSinusVeinFluoroscopicAngiogramWContrastIV, BrachialArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_BrachialArteryFluoroscopicAngiogramWContrastIA, InternalMammaryArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_InternalMammaryArteryFluoroscopicAngiogramWContrastIA, @@ -84594,11 +84684,14 @@ export const C80DocTypecodes = { RenalArteryBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_RenalArteryBilateralFluoroscopicAngiogramWContrastIA, VisceralArteryFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_VisceralArteryFluoroscopicAngiogramAngioplastyWContrastIA, AortaAbdominalFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AortaAbdominalFluoroscopicAngiogramWContrastIA, - AortaAndFemoralArteryBilateralFluoroscopicAngiogramRunoffWContrastIA: C80DocTypecodes_AortaAndFemoralArteryBilateralFluoroscopicAngiogramRunoffWContrastIA, + AortaAndFemoralArteryBilateralFluoroscopicAngiogramRunoffWContrastIA: + C80DocTypecodes_AortaAndFemoralArteryBilateralFluoroscopicAngiogramRunoffWContrastIA, LymphaticsAbdominalFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_LymphaticsAbdominalFluoroscopyWContrastIntraLymphatic, - LymphaticsAbdominalBilateralFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_LymphaticsAbdominalBilateralFluoroscopyWContrastIntraLymphatic, + LymphaticsAbdominalBilateralFluoroscopyWContrastIntraLymphatic: + C80DocTypecodes_LymphaticsAbdominalBilateralFluoroscopyWContrastIntraLymphatic, PortalVeinFluoroscopicAngiogramWContrastTranshepatic: C80DocTypecodes_PortalVeinFluoroscopicAngiogramWContrastTranshepatic, - PortalVeinFluoroscopicAngiogramWContrastTranshepaticAndWHemodynamics: C80DocTypecodes_PortalVeinFluoroscopicAngiogramWContrastTranshepaticAndWHemodynamics, + PortalVeinFluoroscopicAngiogramWContrastTranshepaticAndWHemodynamics: + C80DocTypecodes_PortalVeinFluoroscopicAngiogramWContrastTranshepaticAndWHemodynamics, AdrenalVeinFluoroscopicAngiogramWContrastIV: C80DocTypecodes_AdrenalVeinFluoroscopicAngiogramWContrastIV, AdrenalVeinBilateralFluoroscopicAngiogramWContrastIV: C80DocTypecodes_AdrenalVeinBilateralFluoroscopicAngiogramWContrastIV, InferiorVenaCavaFluoroscopicAngiogramWContrastIV: C80DocTypecodes_InferiorVenaCavaFluoroscopicAngiogramWContrastIV, @@ -84607,7 +84700,8 @@ export const C80DocTypecodes = { ExtremityArteriesFluoroscopicAngiogramWContrastIA: C80DocTypecodes_ExtremityArteriesFluoroscopicAngiogramWContrastIA, ExtremityArteriesBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_ExtremityArteriesBilateralFluoroscopicAngiogramWContrastIA, ExtremityLymphaticsFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_ExtremityLymphaticsFluoroscopyWContrastIntraLymphatic, - ExtremityLymphaticsBilateralFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_ExtremityLymphaticsBilateralFluoroscopyWContrastIntraLymphatic, + ExtremityLymphaticsBilateralFluoroscopyWContrastIntraLymphatic: + C80DocTypecodes_ExtremityLymphaticsBilateralFluoroscopyWContrastIntraLymphatic, PeripheralVeinsBilateralFluoroscopicAngiogramWContrastIV: C80DocTypecodes_PeripheralVeinsBilateralFluoroscopicAngiogramWContrastIV, BreastDuctUSWContrastIntraDuct: C80DocTypecodes_BreastDuctUSWContrastIntraDuct, SpineCervicalAndThoracicAndLumbarMRIWOContrast: C80DocTypecodes_SpineCervicalAndThoracicAndLumbarMRIWOContrast, @@ -84646,7 +84740,8 @@ export const C80DocTypecodes = { TemporomandibularJointLeftXRay: C80DocTypecodes_TemporomandibularJointLeftXRay, TemporomandibularJointRightXRay: C80DocTypecodes_TemporomandibularJointRightXRay, CervicocerebralArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CervicocerebralArteryFluoroscopicAngiogramWContrastIA, - FluoroscopyGuidanceForCatheterizationOfBiliaryDuctsAndPancreaticDuctWContrastRetrograde: C80DocTypecodes_FluoroscopyGuidanceForCatheterizationOfBiliaryDuctsAndPancreaticDuctWContrastRetrograde, + FluoroscopyGuidanceForCatheterizationOfBiliaryDuctsAndPancreaticDuctWContrastRetrograde: + C80DocTypecodes_FluoroscopyGuidanceForCatheterizationOfBiliaryDuctsAndPancreaticDuctWContrastRetrograde, NonGynecologicalCytologyMethodStudy: C80DocTypecodes_NonGynecologicalCytologyMethodStudy, CytologyCervicalOrVaginalSmearOrScrapingStudy: C80DocTypecodes_CytologyCervicalOrVaginalSmearOrScrapingStudy, CytologyReportOfTissueFineNeedleAspirateCytoStain: C80DocTypecodes_CytologyReportOfTissueFineNeedleAspirateCytoStain, @@ -84670,7 +84765,8 @@ export const C80DocTypecodes = { FDAPackageInsertNursingMothersSection: C80DocTypecodes_FDAPackageInsertNursingMothersSection, FDAPackageInsertPediatricUseSection: C80DocTypecodes_FDAPackageInsertPediatricUseSection, FDAPackageInsertGeriatricUseSection: C80DocTypecodes_FDAPackageInsertGeriatricUseSection, - FDAPackageInsertCarcinogenesisAndMutagenesisAndImpairmentOfFertilitySection: C80DocTypecodes_FDAPackageInsertCarcinogenesisAndMutagenesisAndImpairmentOfFertilitySection, + FDAPackageInsertCarcinogenesisAndMutagenesisAndImpairmentOfFertilitySection: + C80DocTypecodes_FDAPackageInsertCarcinogenesisAndMutagenesisAndImpairmentOfFertilitySection, FDAPackageInsertAdverseReactionsSection: C80DocTypecodes_FDAPackageInsertAdverseReactionsSection, FDAPackageInsertControlledSubstanceSection: C80DocTypecodes_FDAPackageInsertControlledSubstanceSection, FDAPackageInsertAbuseSection: C80DocTypecodes_FDAPackageInsertAbuseSection, @@ -84710,7 +84806,8 @@ export const C80DocTypecodes = { OutpatientInitialAssessmentNote: C80DocTypecodes_OutpatientInitialAssessmentNote, InterventionalProcedureNote: C80DocTypecodes_InterventionalProcedureNote, PathologyProcedureNote: C80DocTypecodes_PathologyProcedureNote, - AnesthesiologyHospitalPreoperativeEvaluationAndManagementNote: C80DocTypecodes_AnesthesiologyHospitalPreoperativeEvaluationAndManagementNote, + AnesthesiologyHospitalPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_AnesthesiologyHospitalPreoperativeEvaluationAndManagementNote, CardiologyOutpatientProgressNote: C80DocTypecodes_CardiologyOutpatientProgressNote, CaseManagerPatientQuoteSHomeProgressNote: C80DocTypecodes_CaseManagerPatientQuoteSHomeProgressNote, IntensiveCareUnitProgressNote: C80DocTypecodes_IntensiveCareUnitProgressNote, @@ -84835,11 +84932,13 @@ export const C80DocTypecodes = { EvaluationAndManagementOfHyperlipidemia: C80DocTypecodes_EvaluationAndManagementOfHyperlipidemia, EvaluationAndManagementOfHypertension: C80DocTypecodes_EvaluationAndManagementOfHypertension, DiabetologyNote: C80DocTypecodes_DiabetologyNote, - GeneralMedicinePhysicianAttendingHospitalAdmissionEvaluationNote: C80DocTypecodes_GeneralMedicinePhysicianAttendingHospitalAdmissionEvaluationNote, + GeneralMedicinePhysicianAttendingHospitalAdmissionEvaluationNote: + C80DocTypecodes_GeneralMedicinePhysicianAttendingHospitalAdmissionEvaluationNote, MentalHealthCounselingNote: C80DocTypecodes_MentalHealthCounselingNote, PsychiatryCounselingNote: C80DocTypecodes_PsychiatryCounselingNote, PsychologyCounselingNote: C80DocTypecodes_PsychologyCounselingNote, - OphthalmologyOutpatientPostoperativeEvaluationAndManagementNote: C80DocTypecodes_OphthalmologyOutpatientPostoperativeEvaluationAndManagementNote, + OphthalmologyOutpatientPostoperativeEvaluationAndManagementNote: + C80DocTypecodes_OphthalmologyOutpatientPostoperativeEvaluationAndManagementNote, OrthopaedicSurgerySurgicalOperationNote: C80DocTypecodes_OrthopaedicSurgerySurgicalOperationNote, PharmacyCounselingNote: C80DocTypecodes_PharmacyCounselingNote, PlasticSurgerySurgicalOperationNote: C80DocTypecodes_PlasticSurgerySurgicalOperationNote, @@ -84875,8 +84974,10 @@ export const C80DocTypecodes = { ClinicalTrialProtocolEfficacyAssessmentSection: C80DocTypecodes_ClinicalTrialProtocolEfficacyAssessmentSection, ClinicalTrialProtocolAssessmentOfSafetySection: C80DocTypecodes_ClinicalTrialProtocolAssessmentOfSafetySection, ClinicalTrialProtocolStatisticsSection: C80DocTypecodes_ClinicalTrialProtocolStatisticsSection, - ClinicalTrialProtocolDirectAccessToSourceDataPlusDocumentsSection: C80DocTypecodes_ClinicalTrialProtocolDirectAccessToSourceDataPlusDocumentsSection, - ClinicalTrialProtocolQualityControlAndQualityAssuranceSection: C80DocTypecodes_ClinicalTrialProtocolQualityControlAndQualityAssuranceSection, + ClinicalTrialProtocolDirectAccessToSourceDataPlusDocumentsSection: + C80DocTypecodes_ClinicalTrialProtocolDirectAccessToSourceDataPlusDocumentsSection, + ClinicalTrialProtocolQualityControlAndQualityAssuranceSection: + C80DocTypecodes_ClinicalTrialProtocolQualityControlAndQualityAssuranceSection, ClinicalTrialProtocolEthicsSection: C80DocTypecodes_ClinicalTrialProtocolEthicsSection, ClinicalTrialProtocolDataHandlingAndRecordKeepingSection: C80DocTypecodes_ClinicalTrialProtocolDataHandlingAndRecordKeepingSection, ClinicalTrialProtocolFinancingAndInsuranceSection: C80DocTypecodes_ClinicalTrialProtocolFinancingAndInsuranceSection, @@ -84887,7 +84988,8 @@ export const C80DocTypecodes = { InferiorVenaCavaFluoroscopicAngiogramAngioplastyWContrastIV: C80DocTypecodes_InferiorVenaCavaFluoroscopicAngiogramAngioplastyWContrastIV, AortaFluoroscopicAngiogramAtherectomyWContrastIA: C80DocTypecodes_AortaFluoroscopicAngiogramAtherectomyWContrastIA, CTGuidanceForAbscessDrainageOfAbdomen: C80DocTypecodes_CTGuidanceForAbscessDrainageOfAbdomen, - FluoroscopyGuidanceForAbscessDrainageOfUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForAbscessDrainageOfUnspecifiedBodyRegion, + FluoroscopyGuidanceForAbscessDrainageOfUnspecifiedBodyRegion: + C80DocTypecodes_FluoroscopyGuidanceForAbscessDrainageOfUnspecifiedBodyRegion, CTGuidanceForAspirationOfBreast: C80DocTypecodes_CTGuidanceForAspirationOfBreast, CTGuidanceForAspirationOfCystOfUnspecifiedBodyRegion: C80DocTypecodes_CTGuidanceForAspirationOfCystOfUnspecifiedBodyRegion, FluoroscopyGuidanceForAspirationOfHip: C80DocTypecodes_FluoroscopyGuidanceForAspirationOfHip, @@ -84914,7 +85016,8 @@ export const C80DocTypecodes = { CTGuidanceForBiopsyOfChestWContrastIV: C80DocTypecodes_CTGuidanceForBiopsyOfChestWContrastIV, CTGuidanceForBiopsyOfChestWAndWOContrastIV: C80DocTypecodes_CTGuidanceForBiopsyOfChestWAndWOContrastIV, CTGuidanceForBiopsyOfChestWOContrast: C80DocTypecodes_CTGuidanceForBiopsyOfChestWOContrast, - FluoroscopyGuidanceForPlacementOfCatheterInUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForPlacementOfCatheterInUnspecifiedBodyRegion, + FluoroscopyGuidanceForPlacementOfCatheterInUnspecifiedBodyRegion: + C80DocTypecodes_FluoroscopyGuidanceForPlacementOfCatheterInUnspecifiedBodyRegion, CTGuidanceForDrainageOfAbdomen: C80DocTypecodes_CTGuidanceForDrainageOfAbdomen, CTGuidanceForDrainageOfAnus: C80DocTypecodes_CTGuidanceForDrainageOfAnus, CTGuidanceForDrainageOfAppendix: C80DocTypecodes_CTGuidanceForDrainageOfAppendix, @@ -84939,7 +85042,8 @@ export const C80DocTypecodes = { CTGuidanceForPercutaneousVertebroplastyOfSpineLumbar: C80DocTypecodes_CTGuidanceForPercutaneousVertebroplastyOfSpineLumbar, CTGuidanceForPercutaneousVertebroplastyOfSpineThoracic: C80DocTypecodes_CTGuidanceForPercutaneousVertebroplastyOfSpineThoracic, FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpine: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpine, - CTGuidanceForPlacementOfRadiationTherapyFieldsInUnspecifiedBodyRegion: C80DocTypecodes_CTGuidanceForPlacementOfRadiationTherapyFieldsInUnspecifiedBodyRegion, + CTGuidanceForPlacementOfRadiationTherapyFieldsInUnspecifiedBodyRegion: + C80DocTypecodes_CTGuidanceForPlacementOfRadiationTherapyFieldsInUnspecifiedBodyRegion, CTGuidanceForPlacementOfTubeInChest: C80DocTypecodes_CTGuidanceForPlacementOfTubeInChest, AnkleXRayTomograph: C80DocTypecodes_AnkleXRayTomograph, AnkleCT: C80DocTypecodes_AnkleCT, @@ -85760,8 +85864,10 @@ export const C80DocTypecodes = { AVShuntFluoroscopicAngiogramAngioplastyWContrast: C80DocTypecodes_AVShuntFluoroscopicAngiogramAngioplastyWContrast, BiliaryDuctsFluoroscopyBalloonDilatationWContrast: C80DocTypecodes_BiliaryDuctsFluoroscopyBalloonDilatationWContrast, ExtremityVesselFluoroscopicAngiogramAngioplastyWContrast: C80DocTypecodes_ExtremityVesselFluoroscopicAngiogramAngioplastyWContrast, - FemoralArteryAndPoplitealArteryFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_FemoralArteryAndPoplitealArteryFluoroscopicAngiogramAngioplastyWContrastIA, - FemoralVesselAndPoplitealArteryFluoroscopicAngiogramAtherectomyWContrast: C80DocTypecodes_FemoralVesselAndPoplitealArteryFluoroscopicAngiogramAtherectomyWContrast, + FemoralArteryAndPoplitealArteryFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_FemoralArteryAndPoplitealArteryFluoroscopicAngiogramAngioplastyWContrastIA, + FemoralVesselAndPoplitealArteryFluoroscopicAngiogramAtherectomyWContrast: + C80DocTypecodes_FemoralVesselAndPoplitealArteryFluoroscopicAngiogramAtherectomyWContrast, VesselFluoroscopicAngiogramAtherectomyWContrast: C80DocTypecodes_VesselFluoroscopicAngiogramAtherectomyWContrast, CoronaryArteriesFluoroscopicAngiogramAtherectomyWContrastIA: C80DocTypecodes_CoronaryArteriesFluoroscopicAngiogramAtherectomyWContrastIA, CTGuidanceForBiopsyOfAdrenalGland: C80DocTypecodes_CTGuidanceForBiopsyOfAdrenalGland, @@ -86052,13 +86158,16 @@ export const C80DocTypecodes = { AnkleXRayAPAndLateralAndMortise: C80DocTypecodes_AnkleXRayAPAndLateralAndMortise, AnkleBilateralXRayAPAndLateralAndMortise: C80DocTypecodes_AnkleBilateralXRayAPAndLateralAndMortise, AnkleLeftXRayAPAndLateralAndMortise: C80DocTypecodes_AnkleLeftXRayAPAndLateralAndMortise, - SpineCervicalXRayAPAndObliqueAndLateralWFlexionAndWExtension: C80DocTypecodes_SpineCervicalXRayAPAndObliqueAndLateralWFlexionAndWExtension, + SpineCervicalXRayAPAndObliqueAndLateralWFlexionAndWExtension: + C80DocTypecodes_SpineCervicalXRayAPAndObliqueAndLateralWFlexionAndWExtension, SpineCervicalXRayAPAndLateralAndObliqueAndOdontoid: C80DocTypecodes_SpineCervicalXRayAPAndLateralAndObliqueAndOdontoid, - SpineCervicalXRayAPAndObliqueAndOdontoidAndLateralWFlexionAndWExtension: C80DocTypecodes_SpineCervicalXRayAPAndObliqueAndOdontoidAndLateralWFlexionAndWExtension, + SpineCervicalXRayAPAndObliqueAndOdontoidAndLateralWFlexionAndWExtension: + C80DocTypecodes_SpineCervicalXRayAPAndObliqueAndOdontoidAndLateralWFlexionAndWExtension, SpineLumbarXRayAPAndLateralAndObliqueAndSpot: C80DocTypecodes_SpineLumbarXRayAPAndLateralAndObliqueAndSpot, KneeBilateralXRayAPAndLateralAndObliqueAndSunrise: C80DocTypecodes_KneeBilateralXRayAPAndLateralAndObliqueAndSunrise, SpineCervicalXRayAPAndLateralAndOdontoid: C80DocTypecodes_SpineCervicalXRayAPAndLateralAndOdontoid, - SpineCervicalXRayAPAndOdontoidAndLateralWFlexionAndWExtension: C80DocTypecodes_SpineCervicalXRayAPAndOdontoidAndLateralWFlexionAndWExtension, + SpineCervicalXRayAPAndOdontoidAndLateralWFlexionAndWExtension: + C80DocTypecodes_SpineCervicalXRayAPAndOdontoidAndLateralWFlexionAndWExtension, SpineLumbarXRayAPAndLateralAndSpot: C80DocTypecodes_SpineLumbarXRayAPAndLateralAndSpot, KneeXRayAPAndLateralAndSunrise: C80DocTypecodes_KneeXRayAPAndLateralAndSunrise, KneeBilateralXRayAPAndLateralAndSunrise: C80DocTypecodes_KneeBilateralXRayAPAndLateralAndSunrise, @@ -86118,7 +86227,8 @@ export const C80DocTypecodes = { KneeBilateralXRaySunriseAndTunnel: C80DocTypecodes_KneeBilateralXRaySunriseAndTunnel, FacialBonesXRayLateralAndCaldwellAndWaters: C80DocTypecodes_FacialBonesXRayLateralAndCaldwellAndWaters, FacialBonesXRayLateralAndCaldwellAndWatersAndSubmentovertex: C80DocTypecodes_FacialBonesXRayLateralAndCaldwellAndWatersAndSubmentovertex, - FacialBonesXRayLateralAndCaldwellAndWatersAndSubmentovertexAndTowne: C80DocTypecodes_FacialBonesXRayLateralAndCaldwellAndWatersAndSubmentovertexAndTowne, + FacialBonesXRayLateralAndCaldwellAndWatersAndSubmentovertexAndTowne: + C80DocTypecodes_FacialBonesXRayLateralAndCaldwellAndWatersAndSubmentovertexAndTowne, ShoulderLeftXRayGrasheyAndWestPoint: C80DocTypecodes_ShoulderLeftXRayGrasheyAndWestPoint, HipXRayPortable: C80DocTypecodes_HipXRayPortable, HipLeftXRayPortable: C80DocTypecodes_HipLeftXRayPortable, @@ -86128,7 +86238,8 @@ export const C80DocTypecodes = { CerebralArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CerebralArteryFluoroscopicAngiogramWContrastIA, CoronaryArteriesFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CoronaryArteriesFluoroscopicAngiogramWContrastIA, FemoralArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_FemoralArteryFluoroscopicAngiogramWContrastIA, - FemoralArteryAndPoplitealArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_FemoralArteryAndPoplitealArteryFluoroscopicAngiogramWContrastIA, + FemoralArteryAndPoplitealArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_FemoralArteryAndPoplitealArteryFluoroscopicAngiogramWContrastIA, IliacArteryBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_IliacArteryBilateralFluoroscopicAngiogramWContrastIA, IliacArteryLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_IliacArteryLeftFluoroscopicAngiogramWContrastIA, InferiorMesentericArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_InferiorMesentericArteryFluoroscopicAngiogramWContrastIA, @@ -86258,51 +86369,70 @@ export const C80DocTypecodes = { SpineLumbarAndSacrumAndSacroiliacJointAndCoccyxXRay5Views: C80DocTypecodes_SpineLumbarAndSacrumAndSacroiliacJointAndCoccyxXRay5Views, SpineCervicalAndSpineThoracicXRayAPAndLateral: C80DocTypecodes_SpineCervicalAndSpineThoracicXRayAPAndLateral, BonesXRayBoneAge: C80DocTypecodes_BonesXRayBoneAge, - AortaAndFemoralArteryLeftFluoroscopicAngiogramRunoffWContrastIA: C80DocTypecodes_AortaAndFemoralArteryLeftFluoroscopicAngiogramRunoffWContrastIA, + AortaAndFemoralArteryLeftFluoroscopicAngiogramRunoffWContrastIA: + C80DocTypecodes_AortaAndFemoralArteryLeftFluoroscopicAngiogramRunoffWContrastIA, BonesXRaySurveyForMetastasis: C80DocTypecodes_BonesXRaySurveyForMetastasis, AbdominalAortaAndArteriesFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AbdominalAortaAndArteriesFluoroscopicAngiogramWContrastIA, - AorticArchAndUpperExtremityArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndUpperExtremityArteryFluoroscopicAngiogramWContrastIA, + AorticArchAndUpperExtremityArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndUpperExtremityArteryFluoroscopicAngiogramWContrastIA, AorticArchAndBrachialArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndBrachialArteryFluoroscopicAngiogramWContrastIA, AorticArchAndCarotidArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndCarotidArteryFluoroscopicAngiogramWContrastIA, - AorticArchAndSubclavianArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndSubclavianArteryFluoroscopicAngiogramWContrastIA, - AorticArchAndSubclavianArteryLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndSubclavianArteryLeftFluoroscopicAngiogramWContrastIA, - AorticArchAndVertebralArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndVertebralArteryFluoroscopicAngiogramWContrastIA, - AorticArchAndVertebralArteryLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndVertebralArteryLeftFluoroscopicAngiogramWContrastIA, - AorticArchAndVertebralArteryRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndVertebralArteryRightFluoroscopicAngiogramWContrastIA, + AorticArchAndSubclavianArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndSubclavianArteryFluoroscopicAngiogramWContrastIA, + AorticArchAndSubclavianArteryLeftFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndSubclavianArteryLeftFluoroscopicAngiogramWContrastIA, + AorticArchAndVertebralArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndVertebralArteryFluoroscopicAngiogramWContrastIA, + AorticArchAndVertebralArteryLeftFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndVertebralArteryLeftFluoroscopicAngiogramWContrastIA, + AorticArchAndVertebralArteryRightFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndVertebralArteryRightFluoroscopicAngiogramWContrastIA, AdrenalArteryLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AdrenalArteryLeftFluoroscopicAngiogramWContrastIA, BrachialArteryBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_BrachialArteryBilateralFluoroscopicAngiogramWContrastIA, BronchialArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_BronchialArteryFluoroscopicAngiogramWContrastIA, CarotidArteryExternalLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryExternalLeftFluoroscopicAngiogramWContrastIA, - CarotidArteryAndVertebralArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryAndVertebralArteryFluoroscopicAngiogramWContrastIA, - CarotidArteryAndVertebralArteryBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryAndVertebralArteryBilateralFluoroscopicAngiogramWContrastIA, - CarotidArteryPlusVertebralArteryLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryPlusVertebralArteryLeftFluoroscopicAngiogramWContrastIA, - CeliacArteryAndSuperiorMesentericArteryAndInferiorMesentericArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CeliacArteryAndSuperiorMesentericArteryAndInferiorMesentericArteryFluoroscopicAngiogramWContrastIA, + CarotidArteryAndVertebralArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryAndVertebralArteryFluoroscopicAngiogramWContrastIA, + CarotidArteryAndVertebralArteryBilateralFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryAndVertebralArteryBilateralFluoroscopicAngiogramWContrastIA, + CarotidArteryPlusVertebralArteryLeftFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryPlusVertebralArteryLeftFluoroscopicAngiogramWContrastIA, + CeliacArteryAndSuperiorMesentericArteryAndInferiorMesentericArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CeliacArteryAndSuperiorMesentericArteryAndInferiorMesentericArteryFluoroscopicAngiogramWContrastIA, ExtremityArteriesLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_ExtremityArteriesLeftFluoroscopicAngiogramWContrastIA, - UpperExtremityArteriesBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_UpperExtremityArteriesBilateralFluoroscopicAngiogramWContrastIA, + UpperExtremityArteriesBilateralFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_UpperExtremityArteriesBilateralFluoroscopicAngiogramWContrastIA, GastricArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_GastricArteryFluoroscopicAngiogramWContrastIA, GastricArteryLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_GastricArteryLeftFluoroscopicAngiogramWContrastIA, GastroduodenalArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_GastroduodenalArteryFluoroscopicAngiogramWContrastIA, MaxillaryArteryInternalFluoroscopicAngiogramWContrastIA: C80DocTypecodes_MaxillaryArteryInternalFluoroscopicAngiogramWContrastIA, - SuperiorMesentericArteryAndInferiorMesentericArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_SuperiorMesentericArteryAndInferiorMesentericArteryFluoroscopicAngiogramWContrastIA, - CeliacArteryAndGastricArteryLeftAndSuperiorMesentericArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CeliacArteryAndGastricArteryLeftAndSuperiorMesentericArteryFluoroscopicAngiogramWContrastIA, + SuperiorMesentericArteryAndInferiorMesentericArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_SuperiorMesentericArteryAndInferiorMesentericArteryFluoroscopicAngiogramWContrastIA, + CeliacArteryAndGastricArteryLeftAndSuperiorMesentericArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CeliacArteryAndGastricArteryLeftAndSuperiorMesentericArteryFluoroscopicAngiogramWContrastIA, PudendalArteryInternalFluoroscopicAngiogramWContrastIA: C80DocTypecodes_PudendalArteryInternalFluoroscopicAngiogramWContrastIA, SubclavianArteryBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_SubclavianArteryBilateralFluoroscopicAngiogramWContrastIA, SubclavianArteryLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_SubclavianArteryLeftFluoroscopicAngiogramWContrastIA, VertebralArteryBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_VertebralArteryBilateralFluoroscopicAngiogramWContrastIA, - TemporomandibularJointBilateralFluoroscopyWContrastIntraarticular: C80DocTypecodes_TemporomandibularJointBilateralFluoroscopyWContrastIntraarticular, - TemporomandibularJointLeftFluoroscopyWContrastIntraarticular: C80DocTypecodes_TemporomandibularJointLeftFluoroscopyWContrastIntraarticular, + TemporomandibularJointBilateralFluoroscopyWContrastIntraarticular: + C80DocTypecodes_TemporomandibularJointBilateralFluoroscopyWContrastIntraarticular, + TemporomandibularJointLeftFluoroscopyWContrastIntraarticular: + C80DocTypecodes_TemporomandibularJointLeftFluoroscopyWContrastIntraarticular, AzygosVeinFluoroscopicAngiogramWContrastIV: C80DocTypecodes_AzygosVeinFluoroscopicAngiogramWContrastIV, ExtremityVeinsBilateralFluoroscopicAngiogramWContrastIV: C80DocTypecodes_ExtremityVeinsBilateralFluoroscopicAngiogramWContrastIV, ExtremityVeinsLeftFluoroscopicAngiogramWContrastIV: C80DocTypecodes_ExtremityVeinsLeftFluoroscopicAngiogramWContrastIV, - LowerExtremityVeinsBilateralFluoroscopicAngiogramWContrastIV: C80DocTypecodes_LowerExtremityVeinsBilateralFluoroscopicAngiogramWContrastIV, - UpperExtremityVeinsBilateralFluoroscopicAngiogramWContrastIV: C80DocTypecodes_UpperExtremityVeinsBilateralFluoroscopicAngiogramWContrastIV, + LowerExtremityVeinsBilateralFluoroscopicAngiogramWContrastIV: + C80DocTypecodes_LowerExtremityVeinsBilateralFluoroscopicAngiogramWContrastIV, + UpperExtremityVeinsBilateralFluoroscopicAngiogramWContrastIV: + C80DocTypecodes_UpperExtremityVeinsBilateralFluoroscopicAngiogramWContrastIV, FemoralVeinFluoroscopicAngiogramWContrastIV: C80DocTypecodes_FemoralVeinFluoroscopicAngiogramWContrastIV, IntraosseousVeinsFluoroscopicAngiogramWContrastIV: C80DocTypecodes_IntraosseousVeinsFluoroscopicAngiogramWContrastIV, JugularVeinLeftFluoroscopicAngiogramWContrastIV: C80DocTypecodes_JugularVeinLeftFluoroscopicAngiogramWContrastIV, InferiorMesentericVeinFluoroscopicAngiogramWContrastIV: C80DocTypecodes_InferiorMesentericVeinFluoroscopicAngiogramWContrastIV, OrbitVeinsLeftFluoroscopicAngiogramWContrastIV: C80DocTypecodes_OrbitVeinsLeftFluoroscopicAngiogramWContrastIV, RenalVeinLeftFluoroscopicAngiogramWContrastIV: C80DocTypecodes_RenalVeinLeftFluoroscopicAngiogramWContrastIV, - LowerExtremityVeinFluoroscopicAngiogramAngioplastyWContrastIV: C80DocTypecodes_LowerExtremityVeinFluoroscopicAngiogramAngioplastyWContrastIV, + LowerExtremityVeinFluoroscopicAngiogramAngioplastyWContrastIV: + C80DocTypecodes_LowerExtremityVeinFluoroscopicAngiogramAngioplastyWContrastIV, FluoroscopyGuidanceForInjectionOfSpine: C80DocTypecodes_FluoroscopyGuidanceForInjectionOfSpine, WristCT: C80DocTypecodes_WristCT, WristBilateralXRayTomograph: C80DocTypecodes_WristBilateralXRayTomograph, @@ -86450,18 +86580,29 @@ export const C80DocTypecodes = { GreatToeLeftXRayStanding: C80DocTypecodes_GreatToeLeftXRayStanding, JejunumFluoroscopyWContrast: C80DocTypecodes_JejunumFluoroscopyWContrast, PenisFluoroscopyWContrastIntraCorpusCavernosum: C80DocTypecodes_PenisFluoroscopyWContrastIntraCorpusCavernosum, - AorticArchAndCarotidArteryBilateralAndVertebralArteryBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndCarotidArteryBilateralAndVertebralArteryBilateralFluoroscopicAngiogramWContrastIA, - AorticArchAndCarotidArteryCommonBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndCarotidArteryCommonBilateralFluoroscopicAngiogramWContrastIA, - AorticArchAndCarotidArteryCommonLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndCarotidArteryCommonLeftFluoroscopicAngiogramWContrastIA, - AorticArchAndCarotidArteryCommonRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndCarotidArteryCommonRightFluoroscopicAngiogramWContrastIA, - AorticArchAndCarotidArteryExternalBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndCarotidArteryExternalBilateralFluoroscopicAngiogramWContrastIA, - AorticArchAndCarotidArteryExternalLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndCarotidArteryExternalLeftFluoroscopicAngiogramWContrastIA, - AorticArchAndCarotidArteryExternalRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndCarotidArteryExternalRightFluoroscopicAngiogramWContrastIA, - AorticArchAndCarotidArteryAndVertebralArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndCarotidArteryAndVertebralArteryFluoroscopicAngiogramWContrastIA, + AorticArchAndCarotidArteryBilateralAndVertebralArteryBilateralFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndCarotidArteryBilateralAndVertebralArteryBilateralFluoroscopicAngiogramWContrastIA, + AorticArchAndCarotidArteryCommonBilateralFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndCarotidArteryCommonBilateralFluoroscopicAngiogramWContrastIA, + AorticArchAndCarotidArteryCommonLeftFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndCarotidArteryCommonLeftFluoroscopicAngiogramWContrastIA, + AorticArchAndCarotidArteryCommonRightFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndCarotidArteryCommonRightFluoroscopicAngiogramWContrastIA, + AorticArchAndCarotidArteryExternalBilateralFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndCarotidArteryExternalBilateralFluoroscopicAngiogramWContrastIA, + AorticArchAndCarotidArteryExternalLeftFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndCarotidArteryExternalLeftFluoroscopicAngiogramWContrastIA, + AorticArchAndCarotidArteryExternalRightFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndCarotidArteryExternalRightFluoroscopicAngiogramWContrastIA, + AorticArchAndCarotidArteryAndVertebralArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndCarotidArteryAndVertebralArteryFluoroscopicAngiogramWContrastIA, CoronaryGraftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CoronaryGraftFluoroscopicAngiogramWContrastIA, - LymphaticsAbdominalAndLymphaticsPelvicLeftFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_LymphaticsAbdominalAndLymphaticsPelvicLeftFluoroscopyWContrastIntraLymphatic, - LymphaticsAbdominalAndLymphaticsPelvicFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_LymphaticsAbdominalAndLymphaticsPelvicFluoroscopyWContrastIntraLymphatic, - LymphaticsAbdominalAndLymphaticsPelvicBilateralFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_LymphaticsAbdominalAndLymphaticsPelvicBilateralFluoroscopyWContrastIntraLymphatic, + LymphaticsAbdominalAndLymphaticsPelvicLeftFluoroscopyWContrastIntraLymphatic: + C80DocTypecodes_LymphaticsAbdominalAndLymphaticsPelvicLeftFluoroscopyWContrastIntraLymphatic, + LymphaticsAbdominalAndLymphaticsPelvicFluoroscopyWContrastIntraLymphatic: + C80DocTypecodes_LymphaticsAbdominalAndLymphaticsPelvicFluoroscopyWContrastIntraLymphatic, + LymphaticsAbdominalAndLymphaticsPelvicBilateralFluoroscopyWContrastIntraLymphatic: + C80DocTypecodes_LymphaticsAbdominalAndLymphaticsPelvicBilateralFluoroscopyWContrastIntraLymphatic, ExtremityLymphaticsLeftFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_ExtremityLymphaticsLeftFluoroscopyWContrastIntraLymphatic, LymphaticsLeftFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_LymphaticsLeftFluoroscopyWContrastIntraLymphatic, LymphaticsPelvicBilateralFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_LymphaticsPelvicBilateralFluoroscopyWContrastIntraLymphatic, @@ -86678,7 +86819,8 @@ export const C80DocTypecodes = { TibiaRightAndFibulaRightXRay2Views: C80DocTypecodes_TibiaRightAndFibulaRightXRay2Views, TibiaRightAndFibulaRightXRayAPAndLateral: C80DocTypecodes_TibiaRightAndFibulaRightXRayAPAndLateral, TibiaRightAndFibulaRightXRayOblique: C80DocTypecodes_TibiaRightAndFibulaRightXRayOblique, - TemporomandibularJointRightFluoroscopyWContrastIntraarticular: C80DocTypecodes_TemporomandibularJointRightFluoroscopyWContrastIntraarticular, + TemporomandibularJointRightFluoroscopyWContrastIntraarticular: + C80DocTypecodes_TemporomandibularJointRightFluoroscopyWContrastIntraarticular, TemporomandibularJointRightXRayTomograph: C80DocTypecodes_TemporomandibularJointRightXRayTomograph, ToesRightXRay3Views: C80DocTypecodes_ToesRightXRay3Views, ToesRightXRay2Views: C80DocTypecodes_ToesRightXRay2Views, @@ -86791,7 +86933,8 @@ export const C80DocTypecodes = { WristXRayTomograph: C80DocTypecodes_WristXRayTomograph, ZygomaticArchXRay3Views: C80DocTypecodes_ZygomaticArchXRay3Views, ZygomaticArchXRay4Views: C80DocTypecodes_ZygomaticArchXRay4Views, - PelvisArteriesAndLowerExtremityArteriesBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_PelvisArteriesAndLowerExtremityArteriesBilateralFluoroscopicAngiogramWContrastIA, + PelvisArteriesAndLowerExtremityArteriesBilateralFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_PelvisArteriesAndLowerExtremityArteriesBilateralFluoroscopicAngiogramWContrastIA, PeripheralVesselsFluoroscopicAngiogramWContrast: C80DocTypecodes_PeripheralVesselsFluoroscopicAngiogramWContrast, RibsAnteriorXRay: C80DocTypecodes_RibsAnteriorXRay, RibsPosteriorXRay: C80DocTypecodes_RibsPosteriorXRay, @@ -86799,15 +86942,18 @@ export const C80DocTypecodes = { AdrenalVeinRightFluoroscopicAngiogramWContrastIV: C80DocTypecodes_AdrenalVeinRightFluoroscopicAngiogramWContrastIV, AnkleArteriesRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AnkleArteriesRightFluoroscopicAngiogramWContrastIA, AnkleRightFluoroscopyWContrastIntraarticular: C80DocTypecodes_AnkleRightFluoroscopyWContrastIntraarticular, - CarotidArteryPlusVertebralArteryRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryPlusVertebralArteryRightFluoroscopicAngiogramWContrastIA, - CarotidArteryAndCerebralArteryRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryAndCerebralArteryRightFluoroscopicAngiogramWContrastIA, + CarotidArteryPlusVertebralArteryRightFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryPlusVertebralArteryRightFluoroscopicAngiogramWContrastIA, + CarotidArteryAndCerebralArteryRightFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryAndCerebralArteryRightFluoroscopicAngiogramWContrastIA, CarotidArteryCervicalRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryCervicalRightFluoroscopicAngiogramWContrastIA, ElbowRightFluoroscopyWContrastIntraarticular: C80DocTypecodes_ElbowRightFluoroscopyWContrastIntraarticular, CarotidArteryExternalRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryExternalRightFluoroscopicAngiogramWContrastIA, ExtremityArteriesRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_ExtremityArteriesRightFluoroscopicAngiogramWContrastIA, ExtremityVeinsRightFluoroscopicAngiogramWContrastIV: C80DocTypecodes_ExtremityVeinsRightFluoroscopicAngiogramWContrastIV, CarotidArteryInternalRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryInternalRightFluoroscopicAngiogramWContrastIA, - CarotidArteryAndCerebralArteryInternalRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryAndCerebralArteryInternalRightFluoroscopicAngiogramWContrastIA, + CarotidArteryAndCerebralArteryInternalRightFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryAndCerebralArteryInternalRightFluoroscopicAngiogramWContrastIA, JugularVeinRightFluoroscopicAngiogramWContrastIV: C80DocTypecodes_JugularVeinRightFluoroscopicAngiogramWContrastIV, OrbitVeinsRightFluoroscopicAngiogramWContrastIV: C80DocTypecodes_OrbitVeinsRightFluoroscopicAngiogramWContrastIV, RenalVeinRightFluoroscopicAngiogramWContrastIV: C80DocTypecodes_RenalVeinRightFluoroscopicAngiogramWContrastIV, @@ -86893,12 +87039,14 @@ export const C80DocTypecodes = { SacrumUS: C80DocTypecodes_SacrumUS, VisceralArteryUS: C80DocTypecodes_VisceralArteryUS, UnspecifiedBodyRegionUSWContrast: C80DocTypecodes_UnspecifiedBodyRegionUSWContrast, - FDAPackageInsertStructuredProductLaballingSupplementalPatientMaterial: C80DocTypecodes_FDAPackageInsertStructuredProductLaballingSupplementalPatientMaterial, + FDAPackageInsertStructuredProductLaballingSupplementalPatientMaterial: + C80DocTypecodes_FDAPackageInsertStructuredProductLaballingSupplementalPatientMaterial, BreastImplantLeftMRI: C80DocTypecodes_BreastImplantLeftMRI, BreastImplantRightMRI: C80DocTypecodes_BreastImplantRightMRI, TalusCT: C80DocTypecodes_TalusCT, SpineLumbosacralPlusCervicalPlusThoracicMRISagittal: C80DocTypecodes_SpineLumbosacralPlusCervicalPlusThoracicMRISagittal, - SpineCervicalAndSpineThoracicAndSpineLumbarAndSacrumMRIWContrastIV: C80DocTypecodes_SpineCervicalAndSpineThoracicAndSpineLumbarAndSacrumMRIWContrastIV, + SpineCervicalAndSpineThoracicAndSpineLumbarAndSacrumMRIWContrastIV: + C80DocTypecodes_SpineCervicalAndSpineThoracicAndSpineLumbarAndSacrumMRIWContrastIV, BreastImplantRightMRIWAndWOContrastIV: C80DocTypecodes_BreastImplantRightMRIWAndWOContrastIV, BreastImplantLeftMRIWOContrast: C80DocTypecodes_BreastImplantLeftMRIWOContrast, HipLeftXRayDuringSurgery: C80DocTypecodes_HipLeftXRayDuringSurgery, @@ -86914,7 +87062,8 @@ export const C80DocTypecodes = { BreastSpecimenBilateralMammogram: C80DocTypecodes_BreastSpecimenBilateralMammogram, BreastSpecimenLeftMammogram: C80DocTypecodes_BreastSpecimenLeftMammogram, ShoulderLeftXRayAPAndTransthoracic: C80DocTypecodes_ShoulderLeftXRayAPAndTransthoracic, - SpineCervicalXRayAPAndLateralAndObliqueAndOdontoidAndSwimmer: C80DocTypecodes_SpineCervicalXRayAPAndLateralAndObliqueAndOdontoidAndSwimmer, + SpineCervicalXRayAPAndLateralAndObliqueAndOdontoidAndSwimmer: + C80DocTypecodes_SpineCervicalXRayAPAndLateralAndObliqueAndOdontoidAndSwimmer, AbdomenXRayAPAndLeftPosteriorOblique: C80DocTypecodes_AbdomenXRayAPAndLeftPosteriorOblique, KneeXRayMerchants30And45And60Degrees: C80DocTypecodes_KneeXRayMerchants30And45And60Degrees, KneeLeftXRaySunrise20And40And60Degrees: C80DocTypecodes_KneeLeftXRaySunrise20And40And60Degrees, @@ -86938,8 +87087,10 @@ export const C80DocTypecodes = { KidneyXRayWContrastRetrograde: C80DocTypecodes_KidneyXRayWContrastRetrograde, WristXRayScaphoid: C80DocTypecodes_WristXRayScaphoid, KneeRightXRay2ViewsOblique: C80DocTypecodes_KneeRightXRay2ViewsOblique, - KidneyRightAndCollectingSystemFluoroscopyWContrastViaNephrostomyTube: C80DocTypecodes_KidneyRightAndCollectingSystemFluoroscopyWContrastViaNephrostomyTube, - KidneyRightAndCollectingSystemFluoroscopyWContrastRetrogradeViaUrethra: C80DocTypecodes_KidneyRightAndCollectingSystemFluoroscopyWContrastRetrogradeViaUrethra, + KidneyRightAndCollectingSystemFluoroscopyWContrastViaNephrostomyTube: + C80DocTypecodes_KidneyRightAndCollectingSystemFluoroscopyWContrastViaNephrostomyTube, + KidneyRightAndCollectingSystemFluoroscopyWContrastRetrogradeViaUrethra: + C80DocTypecodes_KidneyRightAndCollectingSystemFluoroscopyWContrastRetrogradeViaUrethra, TibiaRightAndFibulaRightXRay2ViewsOblique: C80DocTypecodes_TibiaRightAndFibulaRightXRay2ViewsOblique, WristRightXRayScaphoid: C80DocTypecodes_WristRightXRayScaphoid, ParotidGlandFluoroscopyWContrastIntraSalivaryDuct: C80DocTypecodes_ParotidGlandFluoroscopyWContrastIntraSalivaryDuct, @@ -86950,7 +87101,8 @@ export const C80DocTypecodes = { SpineThoracicAndLumbarXRaySingleView: C80DocTypecodes_SpineThoracicAndLumbarXRaySingleView, SpineThoracicAndLumbarXRayAPAndLateral: C80DocTypecodes_SpineThoracicAndLumbarXRayAPAndLateral, SpineThoracicAndLumbarXRayStanding: C80DocTypecodes_SpineThoracicAndLumbarXRayStanding, - SpineCervicalAndThoracicAndLumbarFluoroscopyLimitedWContrastIT: C80DocTypecodes_SpineCervicalAndThoracicAndLumbarFluoroscopyLimitedWContrastIT, + SpineCervicalAndThoracicAndLumbarFluoroscopyLimitedWContrastIT: + C80DocTypecodes_SpineCervicalAndThoracicAndLumbarFluoroscopyLimitedWContrastIT, USGuidanceForAspirationOfCystOfKidney: C80DocTypecodes_USGuidanceForAspirationOfCystOfKidney, USGuidanceForCSFAspirationOfSpine: C80DocTypecodes_USGuidanceForCSFAspirationOfSpine, FemoralVesselsBilateralUS: C80DocTypecodes_FemoralVesselsBilateralUS, @@ -87018,8 +87170,10 @@ export const C80DocTypecodes = { HipRightXRayPortable: C80DocTypecodes_HipRightXRayPortable, HumerusBicipitalGrooveRightXRay: C80DocTypecodes_HumerusBicipitalGrooveRightXRay, OlecranonRightXRay: C80DocTypecodes_OlecranonRightXRay, - AortaAndFemoralArteryRightFluoroscopicAngiogramRunoffWContrastIA: C80DocTypecodes_AortaAndFemoralArteryRightFluoroscopicAngiogramRunoffWContrastIA, - AorticArchAndSubclavianArteryRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AorticArchAndSubclavianArteryRightFluoroscopicAngiogramWContrastIA, + AortaAndFemoralArteryRightFluoroscopicAngiogramRunoffWContrastIA: + C80DocTypecodes_AortaAndFemoralArteryRightFluoroscopicAngiogramRunoffWContrastIA, + AorticArchAndSubclavianArteryRightFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_AorticArchAndSubclavianArteryRightFluoroscopicAngiogramWContrastIA, GastricArteryRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_GastricArteryRightFluoroscopicAngiogramWContrastIA, WristRightCTWAndWOContrastIV: C80DocTypecodes_WristRightCTWAndWOContrastIV, ClavicleRightXRay45DegreeCephalicAngle: C80DocTypecodes_ClavicleRightXRay45DegreeCephalicAngle, @@ -87029,7 +87183,8 @@ export const C80DocTypecodes = { BreastRightMammogramSpot: C80DocTypecodes_BreastRightMammogramSpot, WristRightXRayUlnarDeviationAndRadialDeviation: C80DocTypecodes_WristRightXRayUlnarDeviationAndRadialDeviation, GreatToeRightXRayStanding: C80DocTypecodes_GreatToeRightXRayStanding, - LymphaticsAbdominalAndLymphaticsPelvicRightFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_LymphaticsAbdominalAndLymphaticsPelvicRightFluoroscopyWContrastIntraLymphatic, + LymphaticsAbdominalAndLymphaticsPelvicRightFluoroscopyWContrastIntraLymphatic: + C80DocTypecodes_LymphaticsAbdominalAndLymphaticsPelvicRightFluoroscopyWContrastIntraLymphatic, ExtremityLymphaticsRightFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_ExtremityLymphaticsRightFluoroscopyWContrastIntraLymphatic, LymphaticsRightFluoroscopyWContrastIntraLymphatic: C80DocTypecodes_LymphaticsRightFluoroscopyWContrastIntraLymphatic, CalcaneusRightXRayBroden: C80DocTypecodes_CalcaneusRightXRayBroden, @@ -87079,78 +87234,110 @@ export const C80DocTypecodes = { UpperExtremityVeinsLeftFluoroscopicAngiogramWContrastIV: C80DocTypecodes_UpperExtremityVeinsLeftFluoroscopicAngiogramWContrastIV, WristLeftXRayAPAndLateral: C80DocTypecodes_WristLeftXRayAPAndLateral, AnkleArteriesLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_AnkleArteriesLeftFluoroscopicAngiogramWContrastIA, - CarotidArteryAndCerebralArteryLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryAndCerebralArteryLeftFluoroscopicAngiogramWContrastIA, + CarotidArteryAndCerebralArteryLeftFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryAndCerebralArteryLeftFluoroscopicAngiogramWContrastIA, CarotidArteryCervicalLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryCervicalLeftFluoroscopicAngiogramWContrastIA, CarotidArteryInternalLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryInternalLeftFluoroscopicAngiogramWContrastIA, - CarotidArteryAndCerebralArteryInternalLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryAndCerebralArteryInternalLeftFluoroscopicAngiogramWContrastIA, + CarotidArteryAndCerebralArteryInternalLeftFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryAndCerebralArteryInternalLeftFluoroscopicAngiogramWContrastIA, RibsLowerLeftXRay: C80DocTypecodes_RibsLowerLeftXRay, RibsUpperLeftXRay: C80DocTypecodes_RibsUpperLeftXRay, RibsAnteriorAndPosteriorLeftXRay: C80DocTypecodes_RibsAnteriorAndPosteriorLeftXRay, RibsPosteriorLeftXRay: C80DocTypecodes_RibsPosteriorLeftXRay, BreastImplantLeftMRIWAndWOContrastIV: C80DocTypecodes_BreastImplantLeftMRIWAndWOContrastIV, KneeLeftXRay2ViewsOblique: C80DocTypecodes_KneeLeftXRay2ViewsOblique, - KidneyLeftAndCollectingSystemFluoroscopyWContrastViaNephrostomyTube: C80DocTypecodes_KidneyLeftAndCollectingSystemFluoroscopyWContrastViaNephrostomyTube, - KidneyLeftAndCollectingSystemFluoroscopyWContrastRetrogradeViaUrethra: C80DocTypecodes_KidneyLeftAndCollectingSystemFluoroscopyWContrastRetrogradeViaUrethra, + KidneyLeftAndCollectingSystemFluoroscopyWContrastViaNephrostomyTube: + C80DocTypecodes_KidneyLeftAndCollectingSystemFluoroscopyWContrastViaNephrostomyTube, + KidneyLeftAndCollectingSystemFluoroscopyWContrastRetrogradeViaUrethra: + C80DocTypecodes_KidneyLeftAndCollectingSystemFluoroscopyWContrastRetrogradeViaUrethra, TibiaLeftAndFibulaLeftXRay2ViewsOblique: C80DocTypecodes_TibiaLeftAndFibulaLeftXRay2ViewsOblique, VACompensationAndPensionCAndPExaminationAcromegaly: C80DocTypecodes_VACompensationAndPensionCAndPExaminationAcromegaly, - VACompensationAndPensionCAndPExaminationAidAndAttendanceHousebound: C80DocTypecodes_VACompensationAndPensionCAndPExaminationAidAndAttendanceHousebound, + VACompensationAndPensionCAndPExaminationAidAndAttendanceHousebound: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationAidAndAttendanceHousebound, VACompensationAndPensionCAndPExaminationArrhythmias: C80DocTypecodes_VACompensationAndPensionCAndPExaminationArrhythmias, - VACompensationAndPensionCAndPExaminationMiscellaneousArteriesVeins: C80DocTypecodes_VACompensationAndPensionCAndPExaminationMiscellaneousArteriesVeins, + VACompensationAndPensionCAndPExaminationMiscellaneousArteriesVeins: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationMiscellaneousArteriesVeins, VACompensationAndPensionCAndPExaminationAudio: C80DocTypecodes_VACompensationAndPensionCAndPExaminationAudio, - VACompensationAndPensionCAndPExaminationBonesFracturesBoneDisease: C80DocTypecodes_VACompensationAndPensionCAndPExaminationBonesFracturesBoneDisease, + VACompensationAndPensionCAndPExaminationBonesFracturesBoneDisease: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationBonesFracturesBoneDisease, VACompensationAndPensionCAndPExaminationBrainSpinalCord: C80DocTypecodes_VACompensationAndPensionCAndPExaminationBrainSpinalCord, - VACompensationAndPensionCAndPExaminationChronicFatigueSyndrome: C80DocTypecodes_VACompensationAndPensionCAndPExaminationChronicFatigueSyndrome, + VACompensationAndPensionCAndPExaminationChronicFatigueSyndrome: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationChronicFatigueSyndrome, VACompensationAndPensionCAndPExaminationColdInjuryProtocol: C80DocTypecodes_VACompensationAndPensionCAndPExaminationColdInjuryProtocol, VACompensationAndPensionCAndPExaminationCranialNerves: C80DocTypecodes_VACompensationAndPensionCAndPExaminationCranialNerves, VACompensationAndPensionCAndPExaminationCushingsSyndrome: C80DocTypecodes_VACompensationAndPensionCAndPExaminationCushingsSyndrome, VACompensationAndPensionCAndPExaminationDentalOral: C80DocTypecodes_VACompensationAndPensionCAndPExaminationDentalOral, VACompensationAndPensionCAndPExaminationDiabetesMellitus: C80DocTypecodes_VACompensationAndPensionCAndPExaminationDiabetesMellitus, - VACompensationAndPensionCAndPExaminationMiscellaneousDigestiveConditions: C80DocTypecodes_VACompensationAndPensionCAndPExaminationMiscellaneousDigestiveConditions, + VACompensationAndPensionCAndPExaminationMiscellaneousDigestiveConditions: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationMiscellaneousDigestiveConditions, VACompensationAndPensionCAndPExaminationEarDisease: C80DocTypecodes_VACompensationAndPensionCAndPExaminationEarDisease, - VACompensationAndPensionCAndPExaminationMentalHealthEatingDisorders: C80DocTypecodes_VACompensationAndPensionCAndPExaminationMentalHealthEatingDisorders, - VACompensationAndPensionCAndPExaminationMiscellaneousEndocrineDiseases: C80DocTypecodes_VACompensationAndPensionCAndPExaminationMiscellaneousEndocrineDiseases, + VACompensationAndPensionCAndPExaminationMentalHealthEatingDisorders: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationMentalHealthEatingDisorders, + VACompensationAndPensionCAndPExaminationMiscellaneousEndocrineDiseases: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationMiscellaneousEndocrineDiseases, VACompensationAndPensionCAndPExaminationEpilepsyNarcolepsy: C80DocTypecodes_VACompensationAndPensionCAndPExaminationEpilepsyNarcolepsy, - VACompensationAndPensionCAndPExaminationEsophagusHiatalHernia: C80DocTypecodes_VACompensationAndPensionCAndPExaminationEsophagusHiatalHernia, + VACompensationAndPensionCAndPExaminationEsophagusHiatalHernia: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationEsophagusHiatalHernia, VACompensationAndPensionCAndPExaminationEye: C80DocTypecodes_VACompensationAndPensionCAndPExaminationEye, VACompensationAndPensionCAndPExaminationFeet: C80DocTypecodes_VACompensationAndPensionCAndPExaminationFeet, VACompensationAndPensionCAndPExaminationFibromyalgia: C80DocTypecodes_VACompensationAndPensionCAndPExaminationFibromyalgia, VACompensationAndPensionCAndPExaminationGeneralMedical: C80DocTypecodes_VACompensationAndPensionCAndPExaminationGeneralMedical, VACompensationAndPensionCAndPExaminationGenitourinary: C80DocTypecodes_VACompensationAndPensionCAndPExaminationGenitourinary, - VACompensationAndPensionCAndPExaminationDisabilityInGulfWarVeterans: C80DocTypecodes_VACompensationAndPensionCAndPExaminationDisabilityInGulfWarVeterans, - VACompensationAndPensionCAndPExaminationGynecologicalConditionsDisordersOfTheBreast: C80DocTypecodes_VACompensationAndPensionCAndPExaminationGynecologicalConditionsDisordersOfTheBreast, + VACompensationAndPensionCAndPExaminationDisabilityInGulfWarVeterans: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationDisabilityInGulfWarVeterans, + VACompensationAndPensionCAndPExaminationGynecologicalConditionsDisordersOfTheBreast: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationGynecologicalConditionsDisordersOfTheBreast, VACompensationAndPensionCAndPExaminationHandThumbFingers: C80DocTypecodes_VACompensationAndPensionCAndPExaminationHandThumbFingers, VACompensationAndPensionCAndPExaminationHeart: C80DocTypecodes_VACompensationAndPensionCAndPExaminationHeart, VACompensationAndPensionCAndPExaminationHemicDisorders: C80DocTypecodes_VACompensationAndPensionCAndPExaminationHemicDisorders, VACompensationAndPensionCAndPExaminationHIVRelatedIllness: C80DocTypecodes_VACompensationAndPensionCAndPExaminationHIVRelatedIllness, VACompensationAndPensionCAndPExaminationHypertension: C80DocTypecodes_VACompensationAndPensionCAndPExaminationHypertension, - VACompensationAndPensionCAndPExaminationInfectiousImmuneNutritionalDisabilities: C80DocTypecodes_VACompensationAndPensionCAndPExaminationInfectiousImmuneNutritionalDisabilities, - VACompensationAndPensionCAndPExaminationInitialEvaluationPostTraumaticStressDisorder: C80DocTypecodes_VACompensationAndPensionCAndPExaminationInitialEvaluationPostTraumaticStressDisorder, - VACompensationAndPensionCAndPExaminationLargeSmallIntestines: C80DocTypecodes_VACompensationAndPensionCAndPExaminationLargeSmallIntestines, + VACompensationAndPensionCAndPExaminationInfectiousImmuneNutritionalDisabilities: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationInfectiousImmuneNutritionalDisabilities, + VACompensationAndPensionCAndPExaminationInitialEvaluationPostTraumaticStressDisorder: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationInitialEvaluationPostTraumaticStressDisorder, + VACompensationAndPensionCAndPExaminationLargeSmallIntestines: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationLargeSmallIntestines, VACompensationAndPensionCAndPExaminationExtremityJoints: C80DocTypecodes_VACompensationAndPensionCAndPExaminationExtremityJoints, - VACompensationAndPensionCAndPExaminationLiverGallBladderPancreas: C80DocTypecodes_VACompensationAndPensionCAndPExaminationLiverGallBladderPancreas, + VACompensationAndPensionCAndPExaminationLiverGallBladderPancreas: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationLiverGallBladderPancreas, VACompensationAndPensionCAndPExaminationLymphaticDisorders: C80DocTypecodes_VACompensationAndPensionCAndPExaminationLymphaticDisorders, - VACompensationAndPensionCAndPExaminationGeneralMentalDisorders: C80DocTypecodes_VACompensationAndPensionCAndPExaminationGeneralMentalDisorders, + VACompensationAndPensionCAndPExaminationGeneralMentalDisorders: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationGeneralMentalDisorders, VACompensationAndPensionCAndPExaminationMouthLipsTongue: C80DocTypecodes_VACompensationAndPensionCAndPExaminationMouthLipsTongue, VACompensationAndPensionCAndPExaminationMuscles: C80DocTypecodes_VACompensationAndPensionCAndPExaminationMuscles, - VACompensationAndPensionCAndPExaminationMiscellaneousNeurologicalDisorders: C80DocTypecodes_VACompensationAndPensionCAndPExaminationMiscellaneousNeurologicalDisorders, - VACompensationAndPensionCAndPExaminationNoseSinusLarynxPharynx: C80DocTypecodes_VACompensationAndPensionCAndPExaminationNoseSinusLarynxPharynx, + VACompensationAndPensionCAndPExaminationMiscellaneousNeurologicalDisorders: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationMiscellaneousNeurologicalDisorders, + VACompensationAndPensionCAndPExaminationNoseSinusLarynxPharynx: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationNoseSinusLarynxPharynx, VACompensationAndPensionCAndPExaminationPeripheralNerves: C80DocTypecodes_VACompensationAndPensionCAndPExaminationPeripheralNerves, - VACompensationAndPensionCAndPExaminationPrisonerOfWarProtocol: C80DocTypecodes_VACompensationAndPensionCAndPExaminationPrisonerOfWarProtocol, - VACompensationAndPensionCAndPExaminationPulmonaryTuberculosisMycobacterialDiseases: C80DocTypecodes_VACompensationAndPensionCAndPExaminationPulmonaryTuberculosisMycobacterialDiseases, + VACompensationAndPensionCAndPExaminationPrisonerOfWarProtocol: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationPrisonerOfWarProtocol, + VACompensationAndPensionCAndPExaminationPulmonaryTuberculosisMycobacterialDiseases: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationPulmonaryTuberculosisMycobacterialDiseases, VACompensationAndPensionCAndPExaminationRectumAnus: C80DocTypecodes_VACompensationAndPensionCAndPExaminationRectumAnus, - VACompensationAndPensionCAndPExaminationResidualsOfAmputations: C80DocTypecodes_VACompensationAndPensionCAndPExaminationResidualsOfAmputations, - VACompensationAndPensionCAndPExaminationObstructiveRestrictiveInterstitialRespiratoryDiseases: C80DocTypecodes_VACompensationAndPensionCAndPExaminationObstructiveRestrictiveInterstitialRespiratoryDiseases, - VACompensationAndPensionCAndPExaminationMiscellaneousRespiratoryDiseases: C80DocTypecodes_VACompensationAndPensionCAndPExaminationMiscellaneousRespiratoryDiseases, - VACompensationAndPensionCAndPExaminationReviewEvaluationPostTraumaticStressDisorder: C80DocTypecodes_VACompensationAndPensionCAndPExaminationReviewEvaluationPostTraumaticStressDisorder, + VACompensationAndPensionCAndPExaminationResidualsOfAmputations: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationResidualsOfAmputations, + VACompensationAndPensionCAndPExaminationObstructiveRestrictiveInterstitialRespiratoryDiseases: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationObstructiveRestrictiveInterstitialRespiratoryDiseases, + VACompensationAndPensionCAndPExaminationMiscellaneousRespiratoryDiseases: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationMiscellaneousRespiratoryDiseases, + VACompensationAndPensionCAndPExaminationReviewEvaluationPostTraumaticStressDisorder: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationReviewEvaluationPostTraumaticStressDisorder, VACompensationAndPensionCAndPExaminationScars: C80DocTypecodes_VACompensationAndPensionCAndPExaminationScars, VACompensationAndPensionCAndPExaminationSenseOfSmellTaste: C80DocTypecodes_VACompensationAndPensionCAndPExaminationSenseOfSmellTaste, - VACompensationAndPensionCAndPExaminationSkinDiseasesOtherThanScars: C80DocTypecodes_VACompensationAndPensionCAndPExaminationSkinDiseasesOtherThanScars, - VACompensationAndPensionCAndPExaminationSocialIndustrialSurvey: C80DocTypecodes_VACompensationAndPensionCAndPExaminationSocialIndustrialSurvey, + VACompensationAndPensionCAndPExaminationSkinDiseasesOtherThanScars: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationSkinDiseasesOtherThanScars, + VACompensationAndPensionCAndPExaminationSocialIndustrialSurvey: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationSocialIndustrialSurvey, VACompensationAndPensionCAndPExaminationSpine: C80DocTypecodes_VACompensationAndPensionCAndPExaminationSpine, - VACompensationAndPensionCAndPExaminationStomachDuodenumPeritonealAdhesions: C80DocTypecodes_VACompensationAndPensionCAndPExaminationStomachDuodenumPeritonealAdhesions, - VACompensationAndPensionCAndPExaminationThyroidParathyroidDiseases: C80DocTypecodes_VACompensationAndPensionCAndPExaminationThyroidParathyroidDiseases, + VACompensationAndPensionCAndPExaminationStomachDuodenumPeritonealAdhesions: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationStomachDuodenumPeritonealAdhesions, + VACompensationAndPensionCAndPExaminationThyroidParathyroidDiseases: + C80DocTypecodes_VACompensationAndPensionCAndPExaminationThyroidParathyroidDiseases, CTGuidanceForNeedleLocalizationOfUnspecifiedBodyRegion: C80DocTypecodes_CTGuidanceForNeedleLocalizationOfUnspecifiedBodyRegion, - FluoroscopyGuidanceForNeedleLocalizationOfUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForNeedleLocalizationOfUnspecifiedBodyRegion, + FluoroscopyGuidanceForNeedleLocalizationOfUnspecifiedBodyRegion: + C80DocTypecodes_FluoroscopyGuidanceForNeedleLocalizationOfUnspecifiedBodyRegion, MRIGuidanceForNeedleLocalizationOfUnspecifiedBodyRegion: C80DocTypecodes_MRIGuidanceForNeedleLocalizationOfUnspecifiedBodyRegion, OrbitAndFaceMRIWAndWOContrastIV: C80DocTypecodes_OrbitAndFaceMRIWAndWOContrastIV, VeinBilateralUS: C80DocTypecodes_VeinBilateralUS, @@ -87203,10 +87390,14 @@ export const C80DocTypecodes = { HandXRayPAAndOblique: C80DocTypecodes_HandXRayPAAndOblique, HepaticVeinsFluoroscopicAngiogramWContrastIV: C80DocTypecodes_HepaticVeinsFluoroscopicAngiogramWContrastIV, CarotidArteryCervicalFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryCervicalFluoroscopicAngiogramWContrastIA, - CarotidArteryAndCerebralArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryAndCerebralArteryFluoroscopicAngiogramWContrastIA, - HepaticVeinsFluoroscopicAngiogramWContrastIVAndWHemodynamics: C80DocTypecodes_HepaticVeinsFluoroscopicAngiogramWContrastIVAndWHemodynamics, - CarotidArteryBilateralAndCerebralArteryBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryBilateralAndCerebralArteryBilateralFluoroscopicAngiogramWContrastIA, - CarotidArteryCervicalBilateralFluoroscopicAngiogramWContrastIA: C80DocTypecodes_CarotidArteryCervicalBilateralFluoroscopicAngiogramWContrastIA, + CarotidArteryAndCerebralArteryFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryAndCerebralArteryFluoroscopicAngiogramWContrastIA, + HepaticVeinsFluoroscopicAngiogramWContrastIVAndWHemodynamics: + C80DocTypecodes_HepaticVeinsFluoroscopicAngiogramWContrastIVAndWHemodynamics, + CarotidArteryBilateralAndCerebralArteryBilateralFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryBilateralAndCerebralArteryBilateralFluoroscopicAngiogramWContrastIA, + CarotidArteryCervicalBilateralFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_CarotidArteryCervicalBilateralFluoroscopicAngiogramWContrastIA, RibsBilateralAndChestXRay4ViewsAndPAChest: C80DocTypecodes_RibsBilateralAndChestXRay4ViewsAndPAChest, RibsRightAndChestXRayLateralAndPAChest: C80DocTypecodes_RibsRightAndChestXRayLateralAndPAChest, RibsAndChestXRayLateralAndPAChest: C80DocTypecodes_RibsAndChestXRayLateralAndPAChest, @@ -87220,7 +87411,8 @@ export const C80DocTypecodes = { BreastDuctBilateralMammogramWContrastIntraMultipleDucts: C80DocTypecodes_BreastDuctBilateralMammogramWContrastIntraMultipleDucts, BreastDuctRightMammogramWContrastIntraMultipleDucts: C80DocTypecodes_BreastDuctRightMammogramWContrastIntraMultipleDucts, BreastDuctMammogramWContrastIntraMultipleDucts: C80DocTypecodes_BreastDuctMammogramWContrastIntraMultipleDucts, - GastrointestinalSystemAndRespiratorySystemXRayForForeignBody: C80DocTypecodes_GastrointestinalSystemAndRespiratorySystemXRayForForeignBody, + GastrointestinalSystemAndRespiratorySystemXRayForForeignBody: + C80DocTypecodes_GastrointestinalSystemAndRespiratorySystemXRayForForeignBody, BreastFFDMammogramPostLocalization: C80DocTypecodes_BreastFFDMammogramPostLocalization, VasDeferensFluoroscopyWContrastIntraVasDeferens: C80DocTypecodes_VasDeferensFluoroscopyWContrastIntraVasDeferens, BreastFFDMammogramDiagnostic: C80DocTypecodes_BreastFFDMammogramDiagnostic, @@ -87229,29 +87421,39 @@ export const C80DocTypecodes = { LowerExtremityMRIWAndWOContrastIV: C80DocTypecodes_LowerExtremityMRIWAndWOContrastIV, LowerExtremityMRIWOContrast: C80DocTypecodes_LowerExtremityMRIWOContrast, LowerExtremityMRIWContrastIV: C80DocTypecodes_LowerExtremityMRIWContrastIV, - ShoulderXRayAPWInternalRotationAndWExternalRotationAndAxillary: C80DocTypecodes_ShoulderXRayAPWInternalRotationAndWExternalRotationAndAxillary, + ShoulderXRayAPWInternalRotationAndWExternalRotationAndAxillary: + C80DocTypecodes_ShoulderXRayAPWInternalRotationAndWExternalRotationAndAxillary, SpineCTWContrastIntradisc: C80DocTypecodes_SpineCTWContrastIntradisc, AbdomenXRayRightPosteriorOblique: C80DocTypecodes_AbdomenXRayRightPosteriorOblique, WristLeftXRayPAWClenchedFist: C80DocTypecodes_WristLeftXRayPAWClenchedFist, - ShoulderLeftXRayAPWInternalRotationAndGrasheyAndAxillaryAndOutlet: C80DocTypecodes_ShoulderLeftXRayAPWInternalRotationAndGrasheyAndAxillaryAndOutlet, + ShoulderLeftXRayAPWInternalRotationAndGrasheyAndAxillaryAndOutlet: + C80DocTypecodes_ShoulderLeftXRayAPWInternalRotationAndGrasheyAndAxillaryAndOutlet, RibsLeftAndChestXRay: C80DocTypecodes_RibsLeftAndChestXRay, AbdomenAndFetusXRayForFetalAge: C80DocTypecodes_AbdomenAndFetusXRayForFetalAge, ShoulderLeftXRayAPWInternalRotationAndWExternalRotation: C80DocTypecodes_ShoulderLeftXRayAPWInternalRotationAndWExternalRotation, - ShoulderBilateralXRayAPWInternalRotationAndWExternalRotation: C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWExternalRotation, + ShoulderBilateralXRayAPWInternalRotationAndWExternalRotation: + C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWExternalRotation, AnkleBilateralXRayAPAndLateralStanding: C80DocTypecodes_AnkleBilateralXRayAPAndLateralStanding, FootBilateralXRayAPAndLateralStanding: C80DocTypecodes_FootBilateralXRayAPAndLateralStanding, FootLeftXRayAPAndLateralStanding: C80DocTypecodes_FootLeftXRayAPAndLateralStanding, SpineLumbarXRayAPAndLateralStanding: C80DocTypecodes_SpineLumbarXRayAPAndLateralStanding, FootLeftXRayAPAndLateralAndObliqueStanding: C80DocTypecodes_FootLeftXRayAPAndLateralAndObliqueStanding, - ShoulderLeftXRayAPWInternalRotationAndWExternalRotationAndAxillary: C80DocTypecodes_ShoulderLeftXRayAPWInternalRotationAndWExternalRotationAndAxillary, - ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillary: C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillary, - ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndOutlet: C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndOutlet, - ShoulderLeftXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndY: C80DocTypecodes_ShoulderLeftXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndY, - ShoulderBilateralXRayAPAndAxillaryAndOutletAnd30DegreeCaudalAngle: C80DocTypecodes_ShoulderBilateralXRayAPAndAxillaryAndOutletAnd30DegreeCaudalAngle, + ShoulderLeftXRayAPWInternalRotationAndWExternalRotationAndAxillary: + C80DocTypecodes_ShoulderLeftXRayAPWInternalRotationAndWExternalRotationAndAxillary, + ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillary: + C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillary, + ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndOutlet: + C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndOutlet, + ShoulderLeftXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndY: + C80DocTypecodes_ShoulderLeftXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndY, + ShoulderBilateralXRayAPAndAxillaryAndOutletAnd30DegreeCaudalAngle: + C80DocTypecodes_ShoulderBilateralXRayAPAndAxillaryAndOutletAnd30DegreeCaudalAngle, SpineLumbarXRayLateralStandingAndWFlexionAndWExtension: C80DocTypecodes_SpineLumbarXRayLateralStandingAndWFlexionAndWExtension, ChestXRayLateralAndPAWInspirationAndExpiration: C80DocTypecodes_ChestXRayLateralAndPAWInspirationAndExpiration, - ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndY: C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndY, - ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndY: C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndY, + ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndY: + C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndY, + ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndY: + C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWExternalRotationAndAxillaryAndY, KneeLeftXRaySunriseAndTunnelStanding: C80DocTypecodes_KneeLeftXRaySunriseAndTunnelStanding, ShoulderBilateralXRayAPWInternalRotationAndWestPoint: C80DocTypecodes_ShoulderBilateralXRayAPWInternalRotationAndWestPoint, ShoulderLeftXRayAPWInternalRotationAndWestPoint: C80DocTypecodes_ShoulderLeftXRayAPWInternalRotationAndWestPoint, @@ -87294,12 +87496,14 @@ export const C80DocTypecodes = { KneeRightXRayAndTunnel: C80DocTypecodes_KneeRightXRayAndTunnel, KneeRightXRayAndOblique: C80DocTypecodes_KneeRightXRayAndOblique, KneeRightXRayAndSunrise: C80DocTypecodes_KneeRightXRayAndSunrise, - ShoulderRightXRayWInternalRotationAndWExternalRotationAndAxillary: C80DocTypecodes_ShoulderRightXRayWInternalRotationAndWExternalRotationAndAxillary, + ShoulderRightXRayWInternalRotationAndWExternalRotationAndAxillary: + C80DocTypecodes_ShoulderRightXRayWInternalRotationAndWExternalRotationAndAxillary, ShoulderRightXRay3ViewsAndAxillary: C80DocTypecodes_ShoulderRightXRay3ViewsAndAxillary, ShoulderRightXRay3ViewsAndY: C80DocTypecodes_ShoulderRightXRay3ViewsAndY, ShoulderRightXRayAPWInternalRotationAndWExternalRotation: C80DocTypecodes_ShoulderRightXRayAPWInternalRotationAndWExternalRotation, ShoulderRightXRayAPWInternalRotationAndWestPoint: C80DocTypecodes_ShoulderRightXRayAPWInternalRotationAndWestPoint, - ShoulderRightXRayAPWInternalRotationAndWExternalRotationAndWestPoint: C80DocTypecodes_ShoulderRightXRayAPWInternalRotationAndWExternalRotationAndWestPoint, + ShoulderRightXRayAPWInternalRotationAndWExternalRotationAndWestPoint: + C80DocTypecodes_ShoulderRightXRayAPWInternalRotationAndWExternalRotationAndWestPoint, TibiaRightAndFibulaRightXRayAndOblique: C80DocTypecodes_TibiaRightAndFibulaRightXRayAndOblique, WristRightXRay3ViewsAndCarpalTunnel: C80DocTypecodes_WristRightXRay3ViewsAndCarpalTunnel, WristRightXRayAndCarpalTunnel: C80DocTypecodes_WristRightXRayAndCarpalTunnel, @@ -87492,7 +87696,8 @@ export const C80DocTypecodes = { HeartScanPerfusion: C80DocTypecodes_HeartScanPerfusion, HeartSPECTPerfusionAtRestAndWRadionuclideIV: C80DocTypecodes_HeartSPECTPerfusionAtRestAndWRadionuclideIV, HeartScanPerfusionAtRestAndWAdenosineAndWRadionuclideIV: C80DocTypecodes_HeartScanPerfusionAtRestAndWAdenosineAndWRadionuclideIV, - HeartScanPerfusionAtRestAndWDipyridamoleAndWTc99mSestamibiIV: C80DocTypecodes_HeartScanPerfusionAtRestAndWDipyridamoleAndWTc99mSestamibiIV, + HeartScanPerfusionAtRestAndWDipyridamoleAndWTc99mSestamibiIV: + C80DocTypecodes_HeartScanPerfusionAtRestAndWDipyridamoleAndWTc99mSestamibiIV, HeartScanPerfusionAtRestAndWDipyridamoleAndWRadionuclideIV: C80DocTypecodes_HeartScanPerfusionAtRestAndWDipyridamoleAndWRadionuclideIV, HeartSPECTPerfusionAtRestAndWStressAndWTl201IV: C80DocTypecodes_HeartSPECTPerfusionAtRestAndWStressAndWTl201IV, HeartSPECTPerfusionAtRestAndWStressAndWRadionuclideIV: C80DocTypecodes_HeartSPECTPerfusionAtRestAndWStressAndWRadionuclideIV, @@ -87569,7 +87774,8 @@ export const C80DocTypecodes = { LungScanVentilationWRadionuclideAerosolInhaled: C80DocTypecodes_LungScanVentilationWRadionuclideAerosolInhaled, LungScanVentilationWRadionuclideGaseousInhaled: C80DocTypecodes_LungScanVentilationWRadionuclideGaseousInhaled, LungScanVentilationWRadionuclideInhaled: C80DocTypecodes_LungScanVentilationWRadionuclideInhaled, - LungSPECTVentilationAndPerfusionWRadionuclideInhaledAndWRadionuclideIV: C80DocTypecodes_LungSPECTVentilationAndPerfusionWRadionuclideInhaledAndWRadionuclideIV, + LungSPECTVentilationAndPerfusionWRadionuclideInhaledAndWRadionuclideIV: + C80DocTypecodes_LungSPECTVentilationAndPerfusionWRadionuclideInhaledAndWRadionuclideIV, SPECTWI131MIBGIV: C80DocTypecodes_SPECTWI131MIBGIV, ScanDelayedWI131MIBGIV: C80DocTypecodes_ScanDelayedWI131MIBGIV, ScanWI131MIBGIV: C80DocTypecodes_ScanWI131MIBGIV, @@ -87618,7 +87824,8 @@ export const C80DocTypecodes = { BoneScanBloodPool: C80DocTypecodes_BoneScanBloodPool, HeartScanFirstPassAndVentricularVolume: C80DocTypecodes_HeartScanFirstPassAndVentricularVolume, HeartScanFirstPassAndWallMotionAtRestAndWRadionuclideIV: C80DocTypecodes_HeartScanFirstPassAndWallMotionAtRestAndWRadionuclideIV, - HeartScanFirstPassAndEjectionFractionAtRestAndWRadionuclideIV: C80DocTypecodes_HeartScanFirstPassAndEjectionFractionAtRestAndWRadionuclideIV, + HeartScanFirstPassAndEjectionFractionAtRestAndWRadionuclideIV: + C80DocTypecodes_HeartScanFirstPassAndEjectionFractionAtRestAndWRadionuclideIV, HeartScanFirstPassAndWallMotionWStressAndWRadionuclideIV: C80DocTypecodes_HeartScanFirstPassAndWallMotionWStressAndWRadionuclideIV, HeartScanFirstPassAndEjectionFraction: C80DocTypecodes_HeartScanFirstPassAndEjectionFraction, HeartScanFirstPassAndWallMotion: C80DocTypecodes_HeartScanFirstPassAndWallMotion, @@ -87639,10 +87846,13 @@ export const C80DocTypecodes = { BoneSPECTMultipleAreas: C80DocTypecodes_BoneSPECTMultipleAreas, BoneMarrowSPECTMultipleAreas: C80DocTypecodes_BoneMarrowSPECTMultipleAreas, BoneMarrowScanMultipleAreas: C80DocTypecodes_BoneMarrowScanMultipleAreas, - HeartScanFirstPassAndWallMotionAndVentricularVolumeWStressAndWRadionuclideIV: C80DocTypecodes_HeartScanFirstPassAndWallMotionAndVentricularVolumeWStressAndWRadionuclideIV, - HeartScanFirstPassAndWallMotionAndVentricularVolumeAndEjectionFractionWStressAndWRadionuclideIV: C80DocTypecodes_HeartScanFirstPassAndWallMotionAndVentricularVolumeAndEjectionFractionWStressAndWRadionuclideIV, + HeartScanFirstPassAndWallMotionAndVentricularVolumeWStressAndWRadionuclideIV: + C80DocTypecodes_HeartScanFirstPassAndWallMotionAndVentricularVolumeWStressAndWRadionuclideIV, + HeartScanFirstPassAndWallMotionAndVentricularVolumeAndEjectionFractionWStressAndWRadionuclideIV: + C80DocTypecodes_HeartScanFirstPassAndWallMotionAndVentricularVolumeAndEjectionFractionWStressAndWRadionuclideIV, HeartScanFirstPassAndWallMotionAndEjectionFraction: C80DocTypecodes_HeartScanFirstPassAndWallMotionAndEjectionFraction, - HeartScanFirstPassAndWallMotionAndVentricularVolumeAndEjectionFraction: C80DocTypecodes_HeartScanFirstPassAndWallMotionAndVentricularVolumeAndEjectionFraction, + HeartScanFirstPassAndWallMotionAndVentricularVolumeAndEjectionFraction: + C80DocTypecodes_HeartScanFirstPassAndWallMotionAndVentricularVolumeAndEjectionFraction, HeartSPECTGatedAndEjectionFraction: C80DocTypecodes_HeartSPECTGatedAndEjectionFraction, HeartScanGatedWTc99mSestamibiIV: C80DocTypecodes_HeartScanGatedWTc99mSestamibiIV, HeartScanGated: C80DocTypecodes_HeartScanGated, @@ -87655,7 +87865,8 @@ export const C80DocTypecodes = { HeartScanGatedAtRestAndWTc99mPertechnetateIV: C80DocTypecodes_HeartScanGatedAtRestAndWTc99mPertechnetateIV, HeartScanGatedAndEjectionFractionAtRestAndWRadionuclideIV: C80DocTypecodes_HeartScanGatedAndEjectionFractionAtRestAndWRadionuclideIV, HeartScanGatedAtRestAndWStressAndWRadionuclideIV: C80DocTypecodes_HeartScanGatedAtRestAndWStressAndWRadionuclideIV, - HeartScanGatedAndWallMotionAndEjectionFractionAtRestAndWRadionuclideIV: C80DocTypecodes_HeartScanGatedAndWallMotionAndEjectionFractionAtRestAndWRadionuclideIV, + HeartScanGatedAndWallMotionAndEjectionFractionAtRestAndWRadionuclideIV: + C80DocTypecodes_HeartScanGatedAndWallMotionAndEjectionFractionAtRestAndWRadionuclideIV, HeartScanGatedWStressAndWTc99mPertechnetateIV: C80DocTypecodes_HeartScanGatedWStressAndWTc99mPertechnetateIV, HeartScanGatedWStressAndWRadionuclideIV: C80DocTypecodes_HeartScanGatedWStressAndWRadionuclideIV, HeartScanGatedAndWallMotionWStressAndWRadionuclideIV: C80DocTypecodes_HeartScanGatedAndWallMotionWStressAndWRadionuclideIV, @@ -87671,13 +87882,19 @@ export const C80DocTypecodes = { JointScan: C80DocTypecodes_JointScan, LungScanClearanceWTc99mDTPAAerosolInhaled: C80DocTypecodes_LungScanClearanceWTc99mDTPAAerosolInhaled, LungScanPerfusionWParticulateRadionuclideIV: C80DocTypecodes_LungScanPerfusionWParticulateRadionuclideIV, - LungScanVentilationAndPerfusionWRadionuclideInhaledSingleBreathAndWParticulateRadionuclideIV: C80DocTypecodes_LungScanVentilationAndPerfusionWRadionuclideInhaledSingleBreathAndWParticulateRadionuclideIV, - LungScanVentilationAndPerfusionWRadionuclideInhaledAndWParticulateRadionuclideIV: C80DocTypecodes_LungScanVentilationAndPerfusionWRadionuclideInhaledAndWParticulateRadionuclideIV, - LungScanVentilationAndEquilibriumAndWashoutWRadionuclideInhaled: C80DocTypecodes_LungScanVentilationAndEquilibriumAndWashoutWRadionuclideInhaled, + LungScanVentilationAndPerfusionWRadionuclideInhaledSingleBreathAndWParticulateRadionuclideIV: + C80DocTypecodes_LungScanVentilationAndPerfusionWRadionuclideInhaledSingleBreathAndWParticulateRadionuclideIV, + LungScanVentilationAndPerfusionWRadionuclideInhaledAndWParticulateRadionuclideIV: + C80DocTypecodes_LungScanVentilationAndPerfusionWRadionuclideInhaledAndWParticulateRadionuclideIV, + LungScanVentilationAndEquilibriumAndWashoutWRadionuclideInhaled: + C80DocTypecodes_LungScanVentilationAndEquilibriumAndWashoutWRadionuclideInhaled, LungScanVentilationWRadionuclideGaseousInhaledSingleBreath: C80DocTypecodes_LungScanVentilationWRadionuclideGaseousInhaledSingleBreath, - LungScanVentilationAndPerfusionAndDifferentialWRadionuclideInhaledAndWRadionuclideIV: C80DocTypecodes_LungScanVentilationAndPerfusionAndDifferentialWRadionuclideInhaledAndWRadionuclideIV, - LungScanVentilationAndEquilibriumWRadionuclideInhaledSingleBreath: C80DocTypecodes_LungScanVentilationAndEquilibriumWRadionuclideInhaledSingleBreath, - LungScanVentilationAndEquilibriumAndWashoutWRadionuclideInhaledSingleBreath: C80DocTypecodes_LungScanVentilationAndEquilibriumAndWashoutWRadionuclideInhaledSingleBreath, + LungScanVentilationAndPerfusionAndDifferentialWRadionuclideInhaledAndWRadionuclideIV: + C80DocTypecodes_LungScanVentilationAndPerfusionAndDifferentialWRadionuclideInhaledAndWRadionuclideIV, + LungScanVentilationAndEquilibriumWRadionuclideInhaledSingleBreath: + C80DocTypecodes_LungScanVentilationAndEquilibriumWRadionuclideInhaledSingleBreath, + LungScanVentilationAndEquilibriumAndWashoutWRadionuclideInhaledSingleBreath: + C80DocTypecodes_LungScanVentilationAndEquilibriumAndWashoutWRadionuclideInhaledSingleBreath, ScanMultipleAreasWIn111SatumomabIV: C80DocTypecodes_ScanMultipleAreasWIn111SatumomabIV, ProstateScanMultipleAreasWTc99mCapromabPendatideIV: C80DocTypecodes_ProstateScanMultipleAreasWTc99mCapromabPendatideIV, ScanForTumorMultipleAreaWTc99mSestamibiIV: C80DocTypecodes_ScanForTumorMultipleAreaWTc99mSestamibiIV, @@ -87685,7 +87902,8 @@ export const C80DocTypecodes = { ScanGuidanceForLocalizationOfTumorMultipleAreas: C80DocTypecodes_ScanGuidanceForLocalizationOfTumorMultipleAreas, VeinScanForThrombosis: C80DocTypecodes_VeinScanForThrombosis, VAL11DeoxycorticosteronePresenceInSerumOrPlasma: C80DocTypecodes_VAL11DeoxycorticosteronePresenceInSerumOrPlasma, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma1HourPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma1HourPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma1HourPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma1HourPostXXXChallenge, VAL11DeoxycorticosteroneMolesVolumeIn24HourUrine: C80DocTypecodes_VAL11DeoxycorticosteroneMolesVolumeIn24HourUrine, GallbladderScanWCholecystokininAndWRadionuclideIV: C80DocTypecodes_GallbladderScanWCholecystokininAndWRadionuclideIV, KidneyBilateralScanWTc99mDMSAIV: C80DocTypecodes_KidneyBilateralScanWTc99mDMSAIV, @@ -87714,7 +87932,8 @@ export const C80DocTypecodes = { USGuidanceForDrainageOfProstate: C80DocTypecodes_USGuidanceForDrainageOfProstate, FluoroscopyGuidanceForPlacementOfTubeInLiver: C80DocTypecodes_FluoroscopyGuidanceForPlacementOfTubeInLiver, FluoroscopyGuidanceForDrainageOfPharynx: C80DocTypecodes_FluoroscopyGuidanceForDrainageOfPharynx, - FluoroscopicAngiogramGuidanceForPlacementOfCatheterInPortalVeinWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInPortalVeinWContrastIV, + FluoroscopicAngiogramGuidanceForPlacementOfCatheterInPortalVeinWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfCatheterInPortalVeinWContrastIV, FluoroscopyGuidanceForBiopsyOfProstate: C80DocTypecodes_FluoroscopyGuidanceForBiopsyOfProstate, FluoroscopyGuidanceForNeedleBiopsyOfBreast: C80DocTypecodes_FluoroscopyGuidanceForNeedleBiopsyOfBreast, UnspecifiedBodyRegionCTAnd3DReconstruction: C80DocTypecodes_UnspecifiedBodyRegionCTAnd3DReconstruction, @@ -87756,8 +87975,10 @@ export const C80DocTypecodes = { ChestAndAbdomenXRayAPAndPAChest: C80DocTypecodes_ChestAndAbdomenXRayAPAndPAChest, GastrointestineUpperFluoroscopyWWaterSolubleContrastPO: C80DocTypecodes_GastrointestineUpperFluoroscopyWWaterSolubleContrastPO, UrinaryBladderAndUrethraFluoroscopyWContrast: C80DocTypecodes_UrinaryBladderAndUrethraFluoroscopyWContrast, - FluoroscopyGuidanceForReplacementOfPercutaneousCholecystostomyInAbdomen: C80DocTypecodes_FluoroscopyGuidanceForReplacementOfPercutaneousCholecystostomyInAbdomen, - VeinFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA: C80DocTypecodes_VeinFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA, + FluoroscopyGuidanceForReplacementOfPercutaneousCholecystostomyInAbdomen: + C80DocTypecodes_FluoroscopyGuidanceForReplacementOfPercutaneousCholecystostomyInAbdomen, + VeinFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA: + C80DocTypecodes_VeinFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA, AbdomenXRayAPUprightAndLeftLateralDecubitus: C80DocTypecodes_AbdomenXRayAPUprightAndLeftLateralDecubitus, CTGuidanceForNeedleLocalizationOfSpineLumbar: C80DocTypecodes_CTGuidanceForNeedleLocalizationOfSpineLumbar, CTGuidanceForNeedleLocalizationOfSpineCervical: C80DocTypecodes_CTGuidanceForNeedleLocalizationOfSpineCervical, @@ -87801,8 +88022,10 @@ export const C80DocTypecodes = { ScanWholeBody: C80DocTypecodes_ScanWholeBody, FDAPackageInsertDrugAbuseAndDependenceSection: C80DocTypecodes_FDAPackageInsertDrugAbuseAndDependenceSection, FDAPackageInsertPregnancySection: C80DocTypecodes_FDAPackageInsertPregnancySection, - FDAPackageInsertStructuredPatientLabellingUnclassifiedSection: C80DocTypecodes_FDAPackageInsertStructuredPatientLabellingUnclassifiedSection, - FDAPackageInsertStructuredProductLaballingPatientPackageInsertSection: C80DocTypecodes_FDAPackageInsertStructuredProductLaballingPatientPackageInsertSection, + FDAPackageInsertStructuredPatientLabellingUnclassifiedSection: + C80DocTypecodes_FDAPackageInsertStructuredPatientLabellingUnclassifiedSection, + FDAPackageInsertStructuredProductLaballingPatientPackageInsertSection: + C80DocTypecodes_FDAPackageInsertStructuredProductLaballingPatientPackageInsertSection, FDAPackageInsertStructuredProductLabellingMedguideSection: C80DocTypecodes_FDAPackageInsertStructuredProductLabellingMedguideSection, FDAPackageInsertPrecautionsSection: C80DocTypecodes_FDAPackageInsertPrecautionsSection, CTGuidanceForBiopsyOfUnspecifiedBodyRegionWContrastIV: C80DocTypecodes_CTGuidanceForBiopsyOfUnspecifiedBodyRegionWContrastIV, @@ -87884,7 +88107,8 @@ export const C80DocTypecodes = { FootXRayObliqueAndAPAndLateralStanding: C80DocTypecodes_FootXRayObliqueAndAPAndLateralStanding, FootSesamoidBonesXRay: C80DocTypecodes_FootSesamoidBonesXRay, FootSesamoidBonesBilateralXRay: C80DocTypecodes_FootSesamoidBonesBilateralXRay, - SpineLumbarXRayAPWRBendingAndWLBendingAndWOBendingAndLateral: C80DocTypecodes_SpineLumbarXRayAPWRBendingAndWLBendingAndWOBendingAndLateral, + SpineLumbarXRayAPWRBendingAndWLBendingAndWOBendingAndLateral: + C80DocTypecodes_SpineLumbarXRayAPWRBendingAndWLBendingAndWOBendingAndLateral, UnspecifiedBodyRegionXRayPostMortem: C80DocTypecodes_UnspecifiedBodyRegionXRayPostMortem, SpineLumbarXRayAPWRightBendingAndWLeftBending: C80DocTypecodes_SpineLumbarXRayAPWRightBendingAndWLeftBending, HipLeftXRayAPAndLateralAndMeasurement: C80DocTypecodes_HipLeftXRayAPAndLateralAndMeasurement, @@ -87894,7 +88118,8 @@ export const C80DocTypecodes = { SpineLumbarXRayAPWRightBendingAndWLeftBendingAndWOBending: C80DocTypecodes_SpineLumbarXRayAPWRightBendingAndWLeftBendingAndWOBending, FootSesamoidBonesXRayAPAndLateral: C80DocTypecodes_FootSesamoidBonesXRayAPAndLateral, SpineLumbarXRayAPAndLateralAndObliqueAndSpotStanding: C80DocTypecodes_SpineLumbarXRayAPAndLateralAndObliqueAndSpotStanding, - SpineLumbarXRayAPPowerWRBendingAndWLBendingAndLateralPowerWFlexionAndWExtension: C80DocTypecodes_SpineLumbarXRayAPPowerWRBendingAndWLBendingAndLateralPowerWFlexionAndWExtension, + SpineLumbarXRayAPPowerWRBendingAndWLBendingAndLateralPowerWFlexionAndWExtension: + C80DocTypecodes_SpineLumbarXRayAPPowerWRBendingAndWLBendingAndLateralPowerWFlexionAndWExtension, ShoulderLeftXRay90DegreeAbduction: C80DocTypecodes_ShoulderLeftXRay90DegreeAbduction, SpineLumbarXRayWRightBendingAndWLeftBending: C80DocTypecodes_SpineLumbarXRayWRightBendingAndWLeftBending, ChestXRayRightObliqueAndLeftObliqueWNippleMarkers: C80DocTypecodes_ChestXRayRightObliqueAndLeftObliqueWNippleMarkers, @@ -87904,19 +88129,23 @@ export const C80DocTypecodes = { AnkleLeftXRayAPAndLateralAndObliqueWManualStress: C80DocTypecodes_AnkleLeftXRayAPAndLateralAndObliqueWManualStress, WristBilateralXRaySingleView: C80DocTypecodes_WristBilateralXRaySingleView, PelvisXRayAPSingleViewStanding: C80DocTypecodes_PelvisXRayAPSingleViewStanding, - FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfUnspecifiedBodyRegion, + FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfUnspecifiedBodyRegion: + C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfUnspecifiedBodyRegion, FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfBreast: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfBreast, FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfChest: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfChest, SpineThoracicAndLumbarXRayScoliosisAPAndLateralSitting: C80DocTypecodes_SpineThoracicAndLumbarXRayScoliosisAPAndLateralSitting, - SpineThoracicAndLumbarXRayScoliosisAPStandingAndWRightBendingAndWLeftBendingAndWOBending: C80DocTypecodes_SpineThoracicAndLumbarXRayScoliosisAPStandingAndWRightBendingAndWLeftBendingAndWOBending, + SpineThoracicAndLumbarXRayScoliosisAPStandingAndWRightBendingAndWLeftBendingAndWOBending: + C80DocTypecodes_SpineThoracicAndLumbarXRayScoliosisAPStandingAndWRightBendingAndWLeftBendingAndWOBending, SpineThoracicAndLumbarXRayScoliosisAPSitting: C80DocTypecodes_SpineThoracicAndLumbarXRayScoliosisAPSitting, SpineThoracicAndLumbarXRayScoliosisLateralSitting: C80DocTypecodes_SpineThoracicAndLumbarXRayScoliosisLateralSitting, SpineThoracicAndLumbarXRayScoliosisAPStandingAndInBrace: C80DocTypecodes_SpineThoracicAndLumbarXRayScoliosisAPStandingAndInBrace, - SpineThoracicAndLumbarXRayScoliosisAPStandingAndWRightBending: C80DocTypecodes_SpineThoracicAndLumbarXRayScoliosisAPStandingAndWRightBending, + SpineThoracicAndLumbarXRayScoliosisAPStandingAndWRightBending: + C80DocTypecodes_SpineThoracicAndLumbarXRayScoliosisAPStandingAndWRightBending, KneeRightXRay2ViewsAndViewsStanding: C80DocTypecodes_KneeRightXRay2ViewsAndViewsStanding, KneeRightXRay30DegreeStanding: C80DocTypecodes_KneeRightXRay30DegreeStanding, KneeRightXRaySunriseAndViewsStanding: C80DocTypecodes_KneeRightXRaySunriseAndViewsStanding, - MammogramGuidanceStereotacticForCoreNeedleBiopsyOfBreastRight: C80DocTypecodes_MammogramGuidanceStereotacticForCoreNeedleBiopsyOfBreastRight, + MammogramGuidanceStereotacticForCoreNeedleBiopsyOfBreastRight: + C80DocTypecodes_MammogramGuidanceStereotacticForCoreNeedleBiopsyOfBreastRight, FootSesamoidBonesRightXRay: C80DocTypecodes_FootSesamoidBonesRightXRay, SellaTurcicaXRay2Views: C80DocTypecodes_SellaTurcicaXRay2Views, SellaTurcicaXRayLateralAndTowne: C80DocTypecodes_SellaTurcicaXRayLateralAndTowne, @@ -87943,7 +88172,8 @@ export const C80DocTypecodes = { LowerExtremityVesselGraftRightUSDoppler: C80DocTypecodes_LowerExtremityVesselGraftRightUSDoppler, USGuidanceForBiopsyOfEndomyocardium: C80DocTypecodes_USGuidanceForBiopsyOfEndomyocardium, SurgicalSpecimenUS: C80DocTypecodes_SurgicalSpecimenUS, - GastrointestineUpperAndSmallBowelAndGallbladderFluoroscopyWContrastPO: C80DocTypecodes_GastrointestineUpperAndSmallBowelAndGallbladderFluoroscopyWContrastPO, + GastrointestineUpperAndSmallBowelAndGallbladderFluoroscopyWContrastPO: + C80DocTypecodes_GastrointestineUpperAndSmallBowelAndGallbladderFluoroscopyWContrastPO, GastrointestineUpperAndGallbladderFluoroscopyWContrastPO: C80DocTypecodes_GastrointestineUpperAndGallbladderFluoroscopyWContrastPO, PelvisXRayStereo: C80DocTypecodes_PelvisXRayStereo, SpineThoracicAndLumbarXRayScoliosisAPInTraction: C80DocTypecodes_SpineThoracicAndLumbarXRayScoliosisAPInTraction, @@ -88018,12 +88248,18 @@ export const C80DocTypecodes = { SkullXRayLE3Views: C80DocTypecodes_SkullXRayLE3Views, UnspecifiedBodyRegionFluoroscopy2Hour: C80DocTypecodes_UnspecifiedBodyRegionFluoroscopy2Hour, UnspecifiedBodyRegionFluoroscopy90Minutes: C80DocTypecodes_UnspecifiedBodyRegionFluoroscopy90Minutes, - FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct2HoursPostContrastRetrograde: C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct2HoursPostContrastRetrograde, - FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct15MinutesPostContrastRetrograde: C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct15MinutesPostContrastRetrograde, - FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct30MinutesPostContrastRetrograde: C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct30MinutesPostContrastRetrograde, - FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct45MinutesPostContrastRetrograde: C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct45MinutesPostContrastRetrograde, - FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct1HourPostContrastRetrograde: C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct1HourPostContrastRetrograde, - FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct15HoursPostContrastRetrograde: C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct15HoursPostContrastRetrograde, + FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct2HoursPostContrastRetrograde: + C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct2HoursPostContrastRetrograde, + FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct15MinutesPostContrastRetrograde: + C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct15MinutesPostContrastRetrograde, + FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct30MinutesPostContrastRetrograde: + C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct30MinutesPostContrastRetrograde, + FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct45MinutesPostContrastRetrograde: + C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct45MinutesPostContrastRetrograde, + FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct1HourPostContrastRetrograde: + C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct1HourPostContrastRetrograde, + FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct15HoursPostContrastRetrograde: + C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsAndPancreaticDuct15HoursPostContrastRetrograde, AortaAbdominalFluoroscopicAngiogramRunoffWContrastIA: C80DocTypecodes_AortaAbdominalFluoroscopicAngiogramRunoffWContrastIA, JointXRayLateralWManualStress: C80DocTypecodes_JointXRayLateralWManualStress, JointXRayWFlexionAndWExtension: C80DocTypecodes_JointXRayWFlexionAndWExtension, @@ -88031,7 +88267,8 @@ export const C80DocTypecodes = { FootRightXRay3Or4Views: C80DocTypecodes_FootRightXRay3Or4Views, KidneyXRayDuringSurgeryWContrastRetrograde: C80DocTypecodes_KidneyXRayDuringSurgeryWContrastRetrograde, SinusesXRayGE3Views: C80DocTypecodes_SinusesXRayGE3Views, - USGuidanceForPlacementOfRadiationTherapyFieldsInUnspecifiedBodyRegion: C80DocTypecodes_USGuidanceForPlacementOfRadiationTherapyFieldsInUnspecifiedBodyRegion, + USGuidanceForPlacementOfRadiationTherapyFieldsInUnspecifiedBodyRegion: + C80DocTypecodes_USGuidanceForPlacementOfRadiationTherapyFieldsInUnspecifiedBodyRegion, ThumbLeftXRayGE3Views: C80DocTypecodes_ThumbLeftXRayGE3Views, FingerSecondLeftXRayGE3Views: C80DocTypecodes_FingerSecondLeftXRayGE3Views, FingerThirdLeftXRayGE3Views: C80DocTypecodes_FingerThirdLeftXRayGE3Views, @@ -88089,8 +88326,10 @@ export const C80DocTypecodes = { AnkleLeftMRIDynamicWContrastIV: C80DocTypecodes_AnkleLeftMRIDynamicWContrastIV, LowerLegVesselsRightMRIAngiogram: C80DocTypecodes_LowerLegVesselsRightMRIAngiogram, LiverAndBiliaryDuctsAndGallbladderScan: C80DocTypecodes_LiverAndBiliaryDuctsAndGallbladderScan, - FluoroscopyGuidanceForChangeOfDialysisCatheterInUnspecifiedBodyRegionWContrastIV: C80DocTypecodes_FluoroscopyGuidanceForChangeOfDialysisCatheterInUnspecifiedBodyRegionWContrastIV, - UrinaryBladderAndUrethraFluoroscopyWContrastIntraBladderDuringVoiding: C80DocTypecodes_UrinaryBladderAndUrethraFluoroscopyWContrastIntraBladderDuringVoiding, + FluoroscopyGuidanceForChangeOfDialysisCatheterInUnspecifiedBodyRegionWContrastIV: + C80DocTypecodes_FluoroscopyGuidanceForChangeOfDialysisCatheterInUnspecifiedBodyRegionWContrastIV, + UrinaryBladderAndUrethraFluoroscopyWContrastIntraBladderDuringVoiding: + C80DocTypecodes_UrinaryBladderAndUrethraFluoroscopyWContrastIntraBladderDuringVoiding, ChestAndAbdomenXRayAPUprightAndAPChest: C80DocTypecodes_ChestAndAbdomenXRayAPUprightAndAPChest, SkeletalSystemAxialScanBoneDensity: C80DocTypecodes_SkeletalSystemAxialScanBoneDensity, SkeletalSystemPeripheralScanBoneDensity: C80DocTypecodes_SkeletalSystemPeripheralScanBoneDensity, @@ -88103,7 +88342,8 @@ export const C80DocTypecodes = { HandXRayPortable: C80DocTypecodes_HandXRayPortable, CTGuidanceForNeedleBiopsyOfSoftBone: C80DocTypecodes_CTGuidanceForNeedleBiopsyOfSoftBone, AbdominalVesselsUSDopplerLimited: C80DocTypecodes_AbdominalVesselsUSDopplerLimited, - UpperGastrointestineAndSmallBowelFluoroscopyWBariumContrastPO: C80DocTypecodes_UpperGastrointestineAndSmallBowelFluoroscopyWBariumContrastPO, + UpperGastrointestineAndSmallBowelFluoroscopyWBariumContrastPO: + C80DocTypecodes_UpperGastrointestineAndSmallBowelFluoroscopyWBariumContrastPO, FootSesamoidBonesLeftXRay: C80DocTypecodes_FootSesamoidBonesLeftXRay, BrainScanFlowWTc99mDTPAIV: C80DocTypecodes_BrainScanFlowWTc99mDTPAIV, BrainScanFlowWTc99mGlucoheptonateIV: C80DocTypecodes_BrainScanFlowWTc99mGlucoheptonateIV, @@ -88113,8 +88353,10 @@ export const C80DocTypecodes = { HeartScanForInfarctQuantitative: C80DocTypecodes_HeartScanForInfarctQuantitative, ScanForEndocrineTumorMultipleAreasWI131MIBGIV: C80DocTypecodes_ScanForEndocrineTumorMultipleAreasWI131MIBGIV, ScanForEndocrineTumorMultipleAreasWIn111PentetreotideIV: C80DocTypecodes_ScanForEndocrineTumorMultipleAreasWIn111PentetreotideIV, - LiverAndBiliaryDuctsAndGallbladderScanWCholecystokininAndWRadionuclideIV: C80DocTypecodes_LiverAndBiliaryDuctsAndGallbladderScanWCholecystokininAndWRadionuclideIV, - LiverAndBiliaryDuctsAndGallbladderScanWSincalideAndWRadionuclideIV: C80DocTypecodes_LiverAndBiliaryDuctsAndGallbladderScanWSincalideAndWRadionuclideIV, + LiverAndBiliaryDuctsAndGallbladderScanWCholecystokininAndWRadionuclideIV: + C80DocTypecodes_LiverAndBiliaryDuctsAndGallbladderScanWCholecystokininAndWRadionuclideIV, + LiverAndBiliaryDuctsAndGallbladderScanWSincalideAndWRadionuclideIV: + C80DocTypecodes_LiverAndBiliaryDuctsAndGallbladderScanWSincalideAndWRadionuclideIV, LiverAndSpleenSPECTFlow: C80DocTypecodes_LiverAndSpleenSPECTFlow, LiverAndSpleenScanFlow: C80DocTypecodes_LiverAndSpleenScanFlow, LiverScanFlowWTc99mTaggedRBCIV: C80DocTypecodes_LiverScanFlowWTc99mTaggedRBCIV, @@ -88129,7 +88371,8 @@ export const C80DocTypecodes = { RenalVesselsScanFlowWTc99mGlucoheptonateIV: C80DocTypecodes_RenalVesselsScanFlowWTc99mGlucoheptonateIV, RenalVesselsScanFlowWTc99mDTPAIV: C80DocTypecodes_RenalVesselsScanFlowWTc99mDTPAIV, RenalVesselsScanFlowWTc99mMertiatideIV: C80DocTypecodes_RenalVesselsScanFlowWTc99mMertiatideIV, - KidneyBilateralAndRenalVesselsScanFlowWTc99mGlucoheptonateIV: C80DocTypecodes_KidneyBilateralAndRenalVesselsScanFlowWTc99mGlucoheptonateIV, + KidneyBilateralAndRenalVesselsScanFlowWTc99mGlucoheptonateIV: + C80DocTypecodes_KidneyBilateralAndRenalVesselsScanFlowWTc99mGlucoheptonateIV, KidneyBilateralAndRenalVesselsScanWTc99mDTPAIV: C80DocTypecodes_KidneyBilateralAndRenalVesselsScanWTc99mDTPAIV, RenalVesselsScan: C80DocTypecodes_RenalVesselsScan, SpleenSPECTFlow: C80DocTypecodes_SpleenSPECTFlow, @@ -88149,10 +88392,14 @@ export const C80DocTypecodes = { USGuidanceForLocalizationOfBreastLeft: C80DocTypecodes_USGuidanceForLocalizationOfBreastLeft, USGuidanceForLocalizationOfBreastBilateral: C80DocTypecodes_USGuidanceForLocalizationOfBreastBilateral, USGuidanceForLocalizationOfBreastRight: C80DocTypecodes_USGuidanceForLocalizationOfBreastRight, - FluoroscopicAngiogramGuidanceForThrombectomyOfVeinBilateralWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForThrombectomyOfVeinBilateralWContrastIV, - FluoroscopicAngiogramGuidanceForThrombectomyOfVeinLeftWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForThrombectomyOfVeinLeftWContrastIV, - FluoroscopicAngiogramGuidanceForThrombectomyOfVeinWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForThrombectomyOfVeinWContrastIV, - FluoroscopicAngiogramGuidanceForThrombectomyOfVeinRightWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForThrombectomyOfVeinRightWContrastIV, + FluoroscopicAngiogramGuidanceForThrombectomyOfVeinBilateralWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForThrombectomyOfVeinBilateralWContrastIV, + FluoroscopicAngiogramGuidanceForThrombectomyOfVeinLeftWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForThrombectomyOfVeinLeftWContrastIV, + FluoroscopicAngiogramGuidanceForThrombectomyOfVeinWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForThrombectomyOfVeinWContrastIV, + FluoroscopicAngiogramGuidanceForThrombectomyOfVeinRightWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForThrombectomyOfVeinRightWContrastIV, CarotidArteryBilateralUSDoppler: C80DocTypecodes_CarotidArteryBilateralUSDoppler, KidneyBilateralCTWContrastIV: C80DocTypecodes_KidneyBilateralCTWContrastIV, KidneyBilateralCT: C80DocTypecodes_KidneyBilateralCT, @@ -88179,10 +88426,14 @@ export const C80DocTypecodes = { LiverAndBiliaryDuctsAndGallbladderScanForPatencyWTc99mIV: C80DocTypecodes_LiverAndBiliaryDuctsAndGallbladderScanForPatencyWTc99mIV, ShoulderRightXRayGrasheyAndY: C80DocTypecodes_ShoulderRightXRayGrasheyAndY, SpineLumbarXRayOblique: C80DocTypecodes_SpineLumbarXRayOblique, - TibioperonealArteriesRightFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_TibioperonealArteriesRightFluoroscopicAngiogramAngioplastyWContrastIA, - TibioperonealArteriesFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_TibioperonealArteriesFluoroscopicAngiogramAngioplastyWContrastIA, - TibioperonealArteriesBilateralFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_TibioperonealArteriesBilateralFluoroscopicAngiogramAngioplastyWContrastIA, - TibioperonealArteriesLeftFluoroscopicAngiogramAngioplastyWContrastIA: C80DocTypecodes_TibioperonealArteriesLeftFluoroscopicAngiogramAngioplastyWContrastIA, + TibioperonealArteriesRightFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_TibioperonealArteriesRightFluoroscopicAngiogramAngioplastyWContrastIA, + TibioperonealArteriesFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_TibioperonealArteriesFluoroscopicAngiogramAngioplastyWContrastIA, + TibioperonealArteriesBilateralFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_TibioperonealArteriesBilateralFluoroscopicAngiogramAngioplastyWContrastIA, + TibioperonealArteriesLeftFluoroscopicAngiogramAngioplastyWContrastIA: + C80DocTypecodes_TibioperonealArteriesLeftFluoroscopicAngiogramAngioplastyWContrastIA, WristBilateralXRayTunnelCarpal: C80DocTypecodes_WristBilateralXRayTunnelCarpal, USGuidanceForBiopsyOfSuperficialLymphNode: C80DocTypecodes_USGuidanceForBiopsyOfSuperficialLymphNode, CTGuidanceForAblationOfTissueOfLiver: C80DocTypecodes_CTGuidanceForAblationOfTissueOfLiver, @@ -88206,7 +88457,8 @@ export const C80DocTypecodes = { BreastBilateralCTWOContrast: C80DocTypecodes_BreastBilateralCTWOContrast, ColonCT: C80DocTypecodes_ColonCT, MammogramGuidanceForPercutaneousNeedleBiopsyOfBreast: C80DocTypecodes_MammogramGuidanceForPercutaneousNeedleBiopsyOfBreast, - MRIGuidanceStereotacticForLocalizationInBrainWAndWOContrastIV: C80DocTypecodes_MRIGuidanceStereotacticForLocalizationInBrainWAndWOContrastIV, + MRIGuidanceStereotacticForLocalizationInBrainWAndWOContrastIV: + C80DocTypecodes_MRIGuidanceStereotacticForLocalizationInBrainWAndWOContrastIV, BiliaryDuctsAndPancreaticDuctMRIWOContrast: C80DocTypecodes_BiliaryDuctsAndPancreaticDuctMRIWOContrast, AdrenalGlandMRIWContrastIV: C80DocTypecodes_AdrenalGlandMRIWContrastIV, BiliaryDuctsAndPancreaticDuctMRIWContrastIV: C80DocTypecodes_BiliaryDuctsAndPancreaticDuctMRIWContrastIV, @@ -88262,7 +88514,8 @@ export const C80DocTypecodes = { NeckVesselsUSDoppler: C80DocTypecodes_NeckVesselsUSDoppler, HipXRaySingleViewPortable: C80DocTypecodes_HipXRaySingleViewPortable, LowerExtremityBilateralXRayAPSingleViewStanding: C80DocTypecodes_LowerExtremityBilateralXRayAPSingleViewStanding, - SpineLumbarXRayObliqueViewAndViewsWRightBendingAndWLeftBending: C80DocTypecodes_SpineLumbarXRayObliqueViewAndViewsWRightBendingAndWLeftBending, + SpineLumbarXRayObliqueViewAndViewsWRightBendingAndWLeftBending: + C80DocTypecodes_SpineLumbarXRayObliqueViewAndViewsWRightBendingAndWLeftBending, SacrumAndCoccyxXRay2Views: C80DocTypecodes_SacrumAndCoccyxXRay2Views, SacroiliacJointXRay2Or3Views: C80DocTypecodes_SacroiliacJointXRay2Or3Views, HandXRay2ViewsPortable: C80DocTypecodes_HandXRay2ViewsPortable, @@ -88270,7 +88523,8 @@ export const C80DocTypecodes = { ElbowXRay2ViewsPortable: C80DocTypecodes_ElbowXRay2ViewsPortable, FemurXRayAPAndLateralPortable: C80DocTypecodes_FemurXRayAPAndLateralPortable, FootXRayAPAndLateralPortable: C80DocTypecodes_FootXRayAPAndLateralPortable, - SpineCervicalXRayAPAndObliqueAndOdontoidAndLateralPortableWFlexionAndWExtension: C80DocTypecodes_SpineCervicalXRayAPAndObliqueAndOdontoidAndLateralPortableWFlexionAndWExtension, + SpineCervicalXRayAPAndObliqueAndOdontoidAndLateralPortableWFlexionAndWExtension: + C80DocTypecodes_SpineCervicalXRayAPAndObliqueAndOdontoidAndLateralPortableWFlexionAndWExtension, FootXRayGE3Views: C80DocTypecodes_FootXRayGE3Views, SacroiliacJointXRayGE3Views: C80DocTypecodes_SacroiliacJointXRayGE3Views, WristXRayGE3Views: C80DocTypecodes_WristXRayGE3Views, @@ -88294,9 +88548,12 @@ export const C80DocTypecodes = { AnkleXRayGE3Views: C80DocTypecodes_AnkleXRayGE3Views, ChestXRayGE4Views: C80DocTypecodes_ChestXRayGE4Views, SpineCervicalXRayGE4Views: C80DocTypecodes_SpineCervicalXRayGE4Views, - FluoroscopyGuidanceForEndoscopyOfPancreaticDuctWContrastRetrograde: C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfPancreaticDuctWContrastRetrograde, - FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsWContrastRetrograde: C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsWContrastRetrograde, - FluoroscopyGuidanceForFineNeedleAspirationOfUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForFineNeedleAspirationOfUnspecifiedBodyRegion, + FluoroscopyGuidanceForEndoscopyOfPancreaticDuctWContrastRetrograde: + C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfPancreaticDuctWContrastRetrograde, + FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsWContrastRetrograde: + C80DocTypecodes_FluoroscopyGuidanceForEndoscopyOfBiliaryDuctsWContrastRetrograde, + FluoroscopyGuidanceForFineNeedleAspirationOfUnspecifiedBodyRegion: + C80DocTypecodes_FluoroscopyGuidanceForFineNeedleAspirationOfUnspecifiedBodyRegion, FluoroscopyGuidanceForFineNeedleAspirationOfThyroid: C80DocTypecodes_FluoroscopyGuidanceForFineNeedleAspirationOfThyroid, FluoroscopyGuidanceForFineNeedleAspirationOfKidney: C80DocTypecodes_FluoroscopyGuidanceForFineNeedleAspirationOfKidney, FluoroscopyGuidanceForFineNeedleAspirationOfPancreas: C80DocTypecodes_FluoroscopyGuidanceForFineNeedleAspirationOfPancreas, @@ -88305,7 +88562,8 @@ export const C80DocTypecodes = { FluoroscopyGuidanceForFineNeedleAspirationOfDeepTissue: C80DocTypecodes_FluoroscopyGuidanceForFineNeedleAspirationOfDeepTissue, FluoroscopyGuidanceForProcedureOfJointSpace: C80DocTypecodes_FluoroscopyGuidanceForProcedureOfJointSpace, FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfOvary: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfOvary, - FluoroscopyGuidanceForPlacementOfTubeInUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForPlacementOfTubeInUnspecifiedBodyRegion, + FluoroscopyGuidanceForPlacementOfTubeInUnspecifiedBodyRegion: + C80DocTypecodes_FluoroscopyGuidanceForPlacementOfTubeInUnspecifiedBodyRegion, FluoroscopyGuidanceForNeedleBiopsyOfLiverWContrastIV: C80DocTypecodes_FluoroscopyGuidanceForNeedleBiopsyOfLiverWContrastIV, ColonFluoroscopyReductionWViewsWBariumContrastPR: C80DocTypecodes_ColonFluoroscopyReductionWViewsWBariumContrastPR, ColonFluoroscopyWBariumContrastPR: C80DocTypecodes_ColonFluoroscopyWBariumContrastPR, @@ -88333,8 +88591,10 @@ export const C80DocTypecodes = { WoundCareManagementNote: C80DocTypecodes_WoundCareManagementNote, FetalDocumentVitalSignsMeasurements: C80DocTypecodes_FetalDocumentVitalSignsMeasurements, HistoryOfMedicalDeviceUse: C80DocTypecodes_HistoryOfMedicalDeviceUse, - CTGuidanceForAspirationOrInjectionOfCystOfUnspecifiedBodyRegion: C80DocTypecodes_CTGuidanceForAspirationOrInjectionOfCystOfUnspecifiedBodyRegion, - USGuidanceForAspirationOrInjectionOfCystOfUnspecifiedBodyRegion: C80DocTypecodes_USGuidanceForAspirationOrInjectionOfCystOfUnspecifiedBodyRegion, + CTGuidanceForAspirationOrInjectionOfCystOfUnspecifiedBodyRegion: + C80DocTypecodes_CTGuidanceForAspirationOrInjectionOfCystOfUnspecifiedBodyRegion, + USGuidanceForAspirationOrInjectionOfCystOfUnspecifiedBodyRegion: + C80DocTypecodes_USGuidanceForAspirationOrInjectionOfCystOfUnspecifiedBodyRegion, MammogramGuidanceForFineNeedleAspirationOfBreastRight: C80DocTypecodes_MammogramGuidanceForFineNeedleAspirationOfBreastRight, MammogramGuidanceForFineNeedleAspirationOfBreastLeft: C80DocTypecodes_MammogramGuidanceForFineNeedleAspirationOfBreastLeft, USGuidanceForCoreNeedleBiopsyOfThyroid: C80DocTypecodes_USGuidanceForCoreNeedleBiopsyOfThyroid, @@ -88343,11 +88603,14 @@ export const C80DocTypecodes = { USGuidanceForNeedleBiopsyOfProstate: C80DocTypecodes_USGuidanceForNeedleBiopsyOfProstate, CTGuidanceForBiopsyOfUnspecifiedBodyRegionWAndWOContrastIV: C80DocTypecodes_CTGuidanceForBiopsyOfUnspecifiedBodyRegionWAndWOContrastIV, CTGuidanceForBiopsyOfUnspecifiedBodyRegionWOContrast: C80DocTypecodes_CTGuidanceForBiopsyOfUnspecifiedBodyRegionWOContrast, - CTGuidanceForDrainageOfUnspecifiedBodyRegionWAndWOContrastIV: C80DocTypecodes_CTGuidanceForDrainageOfUnspecifiedBodyRegionWAndWOContrastIV, + CTGuidanceForDrainageOfUnspecifiedBodyRegionWAndWOContrastIV: + C80DocTypecodes_CTGuidanceForDrainageOfUnspecifiedBodyRegionWAndWOContrastIV, CTGuidanceForDrainageOfUnspecifiedBodyRegionWContrastIV: C80DocTypecodes_CTGuidanceForDrainageOfUnspecifiedBodyRegionWContrastIV, CTGuidanceForDrainageOfUnspecifiedBodyRegionWOContrast: C80DocTypecodes_CTGuidanceForDrainageOfUnspecifiedBodyRegionWOContrast, - FluoroscopyGuidanceForReplacementOfPercutaneousDrainageTubeInStomach: C80DocTypecodes_FluoroscopyGuidanceForReplacementOfPercutaneousDrainageTubeInStomach, - MammogramGuidanceStereotacticForCoreNeedleBiopsyOfBreastLeft: C80DocTypecodes_MammogramGuidanceStereotacticForCoreNeedleBiopsyOfBreastLeft, + FluoroscopyGuidanceForReplacementOfPercutaneousDrainageTubeInStomach: + C80DocTypecodes_FluoroscopyGuidanceForReplacementOfPercutaneousDrainageTubeInStomach, + MammogramGuidanceStereotacticForCoreNeedleBiopsyOfBreastLeft: + C80DocTypecodes_MammogramGuidanceStereotacticForCoreNeedleBiopsyOfBreastLeft, MammogramGuidanceStereotacticForCoreNeedleBiopsyOfBreast: C80DocTypecodes_MammogramGuidanceStereotacticForCoreNeedleBiopsyOfBreast, SPECT: C80DocTypecodes_SPECT, MastoidBilateralCT: C80DocTypecodes_MastoidBilateralCT, @@ -88421,7 +88684,8 @@ export const C80DocTypecodes = { CTGuidanceForNeedleBiopsyOfBreast: C80DocTypecodes_CTGuidanceForNeedleBiopsyOfBreast, USGuidanceForNeedleBiopsyOfOvary: C80DocTypecodes_USGuidanceForNeedleBiopsyOfOvary, USGuidanceForNeedleBiopsyOfPelvis: C80DocTypecodes_USGuidanceForNeedleBiopsyOfPelvis, - XRayGuidanceForChangeOfPercutaneousTubeInUnspecifiedBodyRegionWContrast: C80DocTypecodes_XRayGuidanceForChangeOfPercutaneousTubeInUnspecifiedBodyRegionWContrast, + XRayGuidanceForChangeOfPercutaneousTubeInUnspecifiedBodyRegionWContrast: + C80DocTypecodes_XRayGuidanceForChangeOfPercutaneousTubeInUnspecifiedBodyRegionWContrast, FluoroscopyGuidanceForPercutaneousDrainageOfBiliaryDucts: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfBiliaryDucts, SPECTGuidanceForPlacementOfTubeInChest: C80DocTypecodes_SPECTGuidanceForPlacementOfTubeInChest, CerebralArteryUS: C80DocTypecodes_CerebralArteryUS, @@ -88444,7 +88708,8 @@ export const C80DocTypecodes = { FluoroscopyGuidanceForInjectionOfSinuses: C80DocTypecodes_FluoroscopyGuidanceForInjectionOfSinuses, LiverCTWXe133Inhaled: C80DocTypecodes_LiverCTWXe133Inhaled, HeadCTDynamicWContrastIV: C80DocTypecodes_HeadCTDynamicWContrastIV, - HeartSPECTGatedAndEjectionFractionAtRestAndWStressAndWRadionuclideIV: C80DocTypecodes_HeartSPECTGatedAndEjectionFractionAtRestAndWStressAndWRadionuclideIV, + HeartSPECTGatedAndEjectionFractionAtRestAndWStressAndWRadionuclideIV: + C80DocTypecodes_HeartSPECTGatedAndEjectionFractionAtRestAndWStressAndWRadionuclideIV, HeartSPECTGatedAtRestAndWTc99mSestamibiIV: C80DocTypecodes_HeartSPECTGatedAtRestAndWTc99mSestamibiIV, HospitalAdmissionHistoryAndPhysicalNote: C80DocTypecodes_HospitalAdmissionHistoryAndPhysicalNote, Consultation2ndOpinion: C80DocTypecodes_Consultation2ndOpinion, @@ -88482,7 +88747,8 @@ export const C80DocTypecodes = { CytologyReportOfThyroidFineNeedleAspirateCytoStain: C80DocTypecodes_CytologyReportOfThyroidFineNeedleAspirateCytoStain, CytologyReportOfUrineCytoStain: C80DocTypecodes_CytologyReportOfUrineCytoStain, CytologyReportOfUnspecifiedSpecimenCytoStain: C80DocTypecodes_CytologyReportOfUnspecifiedSpecimenCytoStain, - CytologyReportOfCervicalOrVaginalSmearOrScrapingCytoStainThinPrep: C80DocTypecodes_CytologyReportOfCervicalOrVaginalSmearOrScrapingCytoStainThinPrep, + CytologyReportOfCervicalOrVaginalSmearOrScrapingCytoStainThinPrep: + C80DocTypecodes_CytologyReportOfCervicalOrVaginalSmearOrScrapingCytoStainThinPrep, CytologyReportOfCervicalOrVaginalSmearOrScrapingCytoStain: C80DocTypecodes_CytologyReportOfCervicalOrVaginalSmearOrScrapingCytoStain, CytologyReportOfTissueOtherStain: C80DocTypecodes_CytologyReportOfTissueOtherStain, CytologyReportOfBreastDuctalLavageCytoStain: C80DocTypecodes_CytologyReportOfBreastDuctalLavageCytoStain, @@ -88558,9 +88824,11 @@ export const C80DocTypecodes = { LowerExtremityArteryUS: C80DocTypecodes_LowerExtremityArteryUS, BrainTemporalMRIWAndWOContrastIV: C80DocTypecodes_BrainTemporalMRIWAndWOContrastIV, SkullBaseXRaySingleView: C80DocTypecodes_SkullBaseXRaySingleView, - SubmandibularGlandRightFluoroscopyWContrastIntraSalivaryDuct: C80DocTypecodes_SubmandibularGlandRightFluoroscopyWContrastIntraSalivaryDuct, + SubmandibularGlandRightFluoroscopyWContrastIntraSalivaryDuct: + C80DocTypecodes_SubmandibularGlandRightFluoroscopyWContrastIntraSalivaryDuct, SkullBaseXRay: C80DocTypecodes_SkullBaseXRay, - SubmandibularGlandBilateralFluoroscopyWContrastIntraSalivaryDuct: C80DocTypecodes_SubmandibularGlandBilateralFluoroscopyWContrastIntraSalivaryDuct, + SubmandibularGlandBilateralFluoroscopyWContrastIntraSalivaryDuct: + C80DocTypecodes_SubmandibularGlandBilateralFluoroscopyWContrastIntraSalivaryDuct, TemporomandibularJointUnilateralXRayOpenAndClosedMouth: C80DocTypecodes_TemporomandibularJointUnilateralXRayOpenAndClosedMouth, MammogramGuidanceForLocalizationOfBreast: C80DocTypecodes_MammogramGuidanceForLocalizationOfBreast, MammogramGuidanceForSentinelLymphNodeInjectionOfBreastLeft: C80DocTypecodes_MammogramGuidanceForSentinelLymphNodeInjectionOfBreastLeft, @@ -88580,8 +88848,10 @@ export const C80DocTypecodes = { InformationSource: C80DocTypecodes_InformationSource, AnnotationCommentNarrative: C80DocTypecodes_AnnotationCommentNarrative, PaymentSourcesDocument: C80DocTypecodes_PaymentSourcesDocument, - FDAPackageInsertStructuredProductLabellingIndexingDataElementsSection: C80DocTypecodes_FDAPackageInsertStructuredProductLabellingIndexingDataElementsSection, - FDAPackageInsertStructuredProductLabellingListingDataElementsSection: C80DocTypecodes_FDAPackageInsertStructuredProductLabellingListingDataElementsSection, + FDAPackageInsertStructuredProductLabellingIndexingDataElementsSection: + C80DocTypecodes_FDAPackageInsertStructuredProductLabellingIndexingDataElementsSection, + FDAPackageInsertStructuredProductLabellingListingDataElementsSection: + C80DocTypecodes_FDAPackageInsertStructuredProductLabellingListingDataElementsSection, BoneMarrowAspirationReport: C80DocTypecodes_BoneMarrowAspirationReport, UnspecifiedBodyRegionScan: C80DocTypecodes_UnspecifiedBodyRegionScan, FDAPackageInsertMicrobiologySection: C80DocTypecodes_FDAPackageInsertMicrobiologySection, @@ -88593,8 +88863,10 @@ export const C80DocTypecodes = { ThoracicSpineVesselsMRIAngiogram: C80DocTypecodes_ThoracicSpineVesselsMRIAngiogram, HeartSPECTAtRestAndWTc99mSestamibiIV: C80DocTypecodes_HeartSPECTAtRestAndWTc99mSestamibiIV, HeartSPECTPerfusionWAdenosineAndWTc99mSestamibiIV: C80DocTypecodes_HeartSPECTPerfusionWAdenosineAndWTc99mSestamibiIV, - HeartSPECTPerfusionAtRestAndWStressAndWTl201IVAndWTc99mSestamibiIV: C80DocTypecodes_HeartSPECTPerfusionAtRestAndWStressAndWTl201IVAndWTc99mSestamibiIV, - HeartSPECTPerfusionAndWallMotionAtRestAndWStressAndWTl201IVAndWTc99mSestamibiIV: C80DocTypecodes_HeartSPECTPerfusionAndWallMotionAtRestAndWStressAndWTl201IVAndWTc99mSestamibiIV, + HeartSPECTPerfusionAtRestAndWStressAndWTl201IVAndWTc99mSestamibiIV: + C80DocTypecodes_HeartSPECTPerfusionAtRestAndWStressAndWTl201IVAndWTc99mSestamibiIV, + HeartSPECTPerfusionAndWallMotionAtRestAndWStressAndWTl201IVAndWTc99mSestamibiIV: + C80DocTypecodes_HeartSPECTPerfusionAndWallMotionAtRestAndWStressAndWTl201IVAndWTc99mSestamibiIV, AnkleBilateralXRayGE6Views: C80DocTypecodes_AnkleBilateralXRayGE6Views, ScanLimitedWI131MIBGIV: C80DocTypecodes_ScanLimitedWI131MIBGIV, CytologyReportOfBronchoalveolarLavageCytoStain: C80DocTypecodes_CytologyReportOfBronchoalveolarLavageCytoStain, @@ -88604,7 +88876,8 @@ export const C80DocTypecodes = { KneeBilateralXRayAndAPViewStanding: C80DocTypecodes_KneeBilateralXRayAndAPViewStanding, WristRightAndHandRightXRay: C80DocTypecodes_WristRightAndHandRightXRay, BreastScanWTl201IV: C80DocTypecodes_BreastScanWTl201IV, - FluoroscopicAngiogramGuidanceForPlacementOfTransjugularIntrahepaticPortosystemicShuntInPortalVeinAndHepaticVein: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfTransjugularIntrahepaticPortosystemicShuntInPortalVeinAndHepaticVein, + FluoroscopicAngiogramGuidanceForPlacementOfTransjugularIntrahepaticPortosystemicShuntInPortalVeinAndHepaticVein: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfTransjugularIntrahepaticPortosystemicShuntInPortalVeinAndHepaticVein, WristLeftAndHandLeftXRay: C80DocTypecodes_WristLeftAndHandLeftXRay, AnkleRightAndFootRightXRay: C80DocTypecodes_AnkleRightAndFootRightXRay, AnkleLeftAndFootLeftXRay: C80DocTypecodes_AnkleLeftAndFootLeftXRay, @@ -88630,8 +88903,10 @@ export const C80DocTypecodes = { FDAProductLabelTopPanelOfPackage: C80DocTypecodes_FDAProductLabelTopPanelOfPackage, FDAProductLabelBottomPanelOfPackage: C80DocTypecodes_FDAProductLabelBottomPanelOfPackage, FDAProductLabelFlapPanelOfPackage: C80DocTypecodes_FDAProductLabelFlapPanelOfPackage, - PharmacogeneticAnalysisReportInBloodOrTissueDocumentByMolecularGeneticsMethod: C80DocTypecodes_PharmacogeneticAnalysisReportInBloodOrTissueDocumentByMolecularGeneticsMethod, - GeneticAnalysisSummaryReportInBloodOrTissueDocumentByMolecularGeneticsMethod: C80DocTypecodes_GeneticAnalysisSummaryReportInBloodOrTissueDocumentByMolecularGeneticsMethod, + PharmacogeneticAnalysisReportInBloodOrTissueDocumentByMolecularGeneticsMethod: + C80DocTypecodes_PharmacogeneticAnalysisReportInBloodOrTissueDocumentByMolecularGeneticsMethod, + GeneticAnalysisSummaryReportInBloodOrTissueDocumentByMolecularGeneticsMethod: + C80DocTypecodes_GeneticAnalysisSummaryReportInBloodOrTissueDocumentByMolecularGeneticsMethod, AbortionConsent: C80DocTypecodes_AbortionConsent, HysterectomyConsent: C80DocTypecodes_HysterectomyConsent, SterilizationConsent: C80DocTypecodes_SterilizationConsent, @@ -88643,7 +88918,8 @@ export const C80DocTypecodes = { HomeHealthClaims: C80DocTypecodes_HomeHealthClaims, HomeHealthPriorAuthorization: C80DocTypecodes_HomeHealthPriorAuthorization, MemberIDCardCopy: C80DocTypecodes_MemberIDCardCopy, - SubscriberInformationIncludingRetroactiveAndPresumptiveEligibility: C80DocTypecodes_SubscriberInformationIncludingRetroactiveAndPresumptiveEligibility, + SubscriberInformationIncludingRetroactiveAndPresumptiveEligibility: + C80DocTypecodes_SubscriberInformationIncludingRetroactiveAndPresumptiveEligibility, SkilledNursingFacilitySNFRecord: C80DocTypecodes_SkilledNursingFacilitySNFRecord, DentalXRaysAndOtherImagesNotDICOM: C80DocTypecodes_DentalXRaysAndOtherImagesNotDICOM, BloodGlucoseMonitors: C80DocTypecodes_BloodGlucoseMonitors, @@ -88706,8 +88982,10 @@ export const C80DocTypecodes = { RequestedImagingStudiesInformationDocument: C80DocTypecodes_RequestedImagingStudiesInformationDocument, SurgicalOperationNoteImplantsNarrative: C80DocTypecodes_SurgicalOperationNoteImplantsNarrative, QualityReportingDocumentArchitectureIncidenceReportDocument: C80DocTypecodes_QualityReportingDocumentArchitectureIncidenceReportDocument, - QualityReportingDocumentArchitecturePatientListReportPopulationDocument: C80DocTypecodes_QualityReportingDocumentArchitecturePatientListReportPopulationDocument, - QualityReportingDocumentArchitectureCalculatedSummaryReportPopulationDocument: C80DocTypecodes_QualityReportingDocumentArchitectureCalculatedSummaryReportPopulationDocument, + QualityReportingDocumentArchitecturePatientListReportPopulationDocument: + C80DocTypecodes_QualityReportingDocumentArchitecturePatientListReportPopulationDocument, + QualityReportingDocumentArchitectureCalculatedSummaryReportPopulationDocument: + C80DocTypecodes_QualityReportingDocumentArchitectureCalculatedSummaryReportPopulationDocument, MeasureSetDocument: C80DocTypecodes_MeasureSetDocument, MeasureDocument: C80DocTypecodes_MeasureDocument, ReportingParametersDocument: C80DocTypecodes_ReportingParametersDocument, @@ -88723,18 +89001,30 @@ export const C80DocTypecodes = { AppointmentSummaryDocument: C80DocTypecodes_AppointmentSummaryDocument, PlanOfCareNote: C80DocTypecodes_PlanOfCareNote, VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasmaBaseline: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasmaBaseline, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma30MinutesPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma30MinutesPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma1stSpecimenPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma1stSpecimenPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma2ndSpecimenPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma2ndSpecimenPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma3rdSpecimenPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma3rdSpecimenPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma4thSpecimenPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma4thSpecimenPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasmaPreXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasmaPreXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma15MinutesPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma15MinutesPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma20MinutesPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma20MinutesPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma40MinutesPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma40MinutesPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma15HoursPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma15HoursPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma2HoursPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma2HoursPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma25HoursPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma25HoursPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma30MinutesPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma30MinutesPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma1stSpecimenPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma1stSpecimenPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma2ndSpecimenPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma2ndSpecimenPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma3rdSpecimenPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma3rdSpecimenPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma4thSpecimenPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma4thSpecimenPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasmaPreXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasmaPreXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma15MinutesPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma15MinutesPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma20MinutesPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma20MinutesPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma40MinutesPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma40MinutesPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma15HoursPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma15HoursPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma2HoursPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma2HoursPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma25HoursPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma25HoursPostXXXChallenge, PrivacyPolicyAcknowledgmentDocument: C80DocTypecodes_PrivacyPolicyAcknowledgmentDocument, PrivacyPolicyOrganizationDocument: C80DocTypecodes_PrivacyPolicyOrganizationDocument, HealthQualityMeasureDocument: C80DocTypecodes_HealthQualityMeasureDocument, @@ -88794,15 +89084,24 @@ export const C80DocTypecodes = { PulmonaryReferralNote: C80DocTypecodes_PulmonaryReferralNote, CriticalCareMedicineReferralNote: C80DocTypecodes_CriticalCareMedicineReferralNote, ObstetricsAndGynecologyReferralNote: C80DocTypecodes_ObstetricsAndGynecologyReferralNote, - VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasmaPre250UgCorticotropin: C80DocTypecodes_VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasmaPre250UgCorticotropin, - VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPost250UgCorticotropin: C80DocTypecodes_VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPost250UgCorticotropin, - VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPost250UgCorticotropin: C80DocTypecodes_VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPost250UgCorticotropin, - VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasmaPreDoseCorticotropin: C80DocTypecodes_VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasmaPreDoseCorticotropin, - VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPostDoseCorticotropin: C80DocTypecodes_VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPostDoseCorticotropin, - VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPostDoseCorticotropin: C80DocTypecodes_VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPostDoseCorticotropin, - VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasmaPreDoseCorticotropin: C80DocTypecodes_VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasmaPreDoseCorticotropin, - VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPostDoseCorticotropin: C80DocTypecodes_VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPostDoseCorticotropin, - VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPostDoseCorticotropin: C80DocTypecodes_VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPostDoseCorticotropin, + VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasmaPre250UgCorticotropin: + C80DocTypecodes_VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasmaPre250UgCorticotropin, + VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPost250UgCorticotropin: + C80DocTypecodes_VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPost250UgCorticotropin, + VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPost250UgCorticotropin: + C80DocTypecodes_VAL11DeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPost250UgCorticotropin, + VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasmaPreDoseCorticotropin: + C80DocTypecodes_VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasmaPreDoseCorticotropin, + VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPostDoseCorticotropin: + C80DocTypecodes_VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPostDoseCorticotropin, + VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPostDoseCorticotropin: + C80DocTypecodes_VAL18HydroxydeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPostDoseCorticotropin, + VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasmaPreDoseCorticotropin: + C80DocTypecodes_VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasmaPreDoseCorticotropin, + VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPostDoseCorticotropin: + C80DocTypecodes_VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasma30MinutesPostDoseCorticotropin, + VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPostDoseCorticotropin: + C80DocTypecodes_VAL21DeoxycorticosteroneMolesVolumeInSerumOrPlasma1HourPostDoseCorticotropin, LungPET: C80DocTypecodes_LungPET, EsophagusPET: C80DocTypecodes_EsophagusPET, CoPaymentAmountNarrative: C80DocTypecodes_CoPaymentAmountNarrative, @@ -88826,7 +89125,8 @@ export const C80DocTypecodes = { BrainFunctionalMRI: C80DocTypecodes_BrainFunctionalMRI, HeartMRIWStressAndWAndWOContrastIV: C80DocTypecodes_HeartMRIWStressAndWAndWOContrastIV, HeartMRIWStress: C80DocTypecodes_HeartMRIWStress, - LeftAtriumAndPulmonaryVeinsCTAngiogramAnd3DReconstructionWContrastIV: C80DocTypecodes_LeftAtriumAndPulmonaryVeinsCTAngiogramAnd3DReconstructionWContrastIV, + LeftAtriumAndPulmonaryVeinsCTAngiogramAnd3DReconstructionWContrastIV: + C80DocTypecodes_LeftAtriumAndPulmonaryVeinsCTAngiogramAnd3DReconstructionWContrastIV, EmergencyDepartmentDischargeSummary: C80DocTypecodes_EmergencyDepartmentDischargeSummary, PsychiatryDischargeSummary: C80DocTypecodes_PsychiatryDischargeSummary, NeonatalCareReport: C80DocTypecodes_NeonatalCareReport, @@ -88844,17 +89144,22 @@ export const C80DocTypecodes = { ProcedureDispositionNarrative: C80DocTypecodes_ProcedureDispositionNarrative, ProcedureFindingsNarrative: C80DocTypecodes_ProcedureFindingsNarrative, FDAPackageInsertInstructionsForUseSection: C80DocTypecodes_FDAPackageInsertInstructionsForUseSection, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma8thSpecimenPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma8thSpecimenPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma7thSpecimenPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma7thSpecimenPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma6thSpecimenPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma6thSpecimenPostXXXChallenge, - VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma5thSpecimenPostXXXChallenge: C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma5thSpecimenPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma8thSpecimenPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma8thSpecimenPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma7thSpecimenPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma7thSpecimenPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma6thSpecimenPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma6thSpecimenPostXXXChallenge, + VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma5thSpecimenPostXXXChallenge: + C80DocTypecodes_VAL11DeoxycorticosteroneMassVolumeInSerumOrPlasma5thSpecimenPostXXXChallenge, EmergencyDepartmentDischargeInstructions: C80DocTypecodes_EmergencyDepartmentDischargeInstructions, RectumAndColonCT3DWAirContrastPR: C80DocTypecodes_RectumAndColonCT3DWAirContrastPR, ThyroidScanAndUptakeWI123PO: C80DocTypecodes_ThyroidScanAndUptakeWI123PO, FDAPackageInsertAccessories: C80DocTypecodes_FDAPackageInsertAccessories, FDAPackageInsertAssemblyOrInstallationInstructions: C80DocTypecodes_FDAPackageInsertAssemblyOrInstallationInstructions, FDAPackageInsertCalibrationInstructions: C80DocTypecodes_FDAPackageInsertCalibrationInstructions, - FDAPackageInsertCleaningDisinfectingAndSterilizationInstructions: C80DocTypecodes_FDAPackageInsertCleaningDisinfectingAndSterilizationInstructions, + FDAPackageInsertCleaningDisinfectingAndSterilizationInstructions: + C80DocTypecodes_FDAPackageInsertCleaningDisinfectingAndSterilizationInstructions, FDAPackageInsertComponents: C80DocTypecodes_FDAPackageInsertComponents, FDAPackageInsertIntendedUseOfTheDevice: C80DocTypecodes_FDAPackageInsertIntendedUseOfTheDevice, FDAPackageInsertOtherSafetyInformation: C80DocTypecodes_FDAPackageInsertOtherSafetyInformation, @@ -88885,19 +89190,25 @@ export const C80DocTypecodes = { InterventionsNarrative: C80DocTypecodes_InterventionsNarrative, RenalArteryLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_RenalArteryLeftFluoroscopicAngiogramWContrastIA, RenalArteryRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_RenalArteryRightFluoroscopicAngiogramWContrastIA, - HeadArteryLeftPlusNeckArteryLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_HeadArteryLeftPlusNeckArteryLeftFluoroscopicAngiogramWContrastIA, - HeadArteryRightPlusNeckArteryRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_HeadArteryRightPlusNeckArteryRightFluoroscopicAngiogramWContrastIA, - FluoroscopicAngiogramGuidanceForPlacementOfIntraperitonealCatheterInAbdomen: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfIntraperitonealCatheterInAbdomen, + HeadArteryLeftPlusNeckArteryLeftFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_HeadArteryLeftPlusNeckArteryLeftFluoroscopicAngiogramWContrastIA, + HeadArteryRightPlusNeckArteryRightFluoroscopicAngiogramWContrastIA: + C80DocTypecodes_HeadArteryRightPlusNeckArteryRightFluoroscopicAngiogramWContrastIA, + FluoroscopicAngiogramGuidanceForPlacementOfIntraperitonealCatheterInAbdomen: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfIntraperitonealCatheterInAbdomen, ExtremityLeftUSLimited: C80DocTypecodes_ExtremityLeftUSLimited, ExtremityRightUSLimited: C80DocTypecodes_ExtremityRightUSLimited, - FluoroscopicAngiogramGuidanceForPlacementOfIlioIliacTubeEndoprosthesisInIliacArteryLeftWContrastIA: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfIlioIliacTubeEndoprosthesisInIliacArteryLeftWContrastIA, - FluoroscopicAngiogramGuidanceForPlacementOfIlioIliacTubeEndoprosthesisInIliacArteryRightWContrastIA: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfIlioIliacTubeEndoprosthesisInIliacArteryRightWContrastIA, + FluoroscopicAngiogramGuidanceForPlacementOfIlioIliacTubeEndoprosthesisInIliacArteryLeftWContrastIA: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfIlioIliacTubeEndoprosthesisInIliacArteryLeftWContrastIA, + FluoroscopicAngiogramGuidanceForPlacementOfIlioIliacTubeEndoprosthesisInIliacArteryRightWContrastIA: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfIlioIliacTubeEndoprosthesisInIliacArteryRightWContrastIA, USGuidanceForPercutaneousDrainageOfCavity: C80DocTypecodes_USGuidanceForPercutaneousDrainageOfCavity, ComputerGeneratedRecommendationDocument: C80DocTypecodes_ComputerGeneratedRecommendationDocument, BreastLymphaticsLeftScanWRadionuclideIntraLymphatic: C80DocTypecodes_BreastLymphaticsLeftScanWRadionuclideIntraLymphatic, BreastLymphaticsRightScanWRadionuclideIntraLymphatic: C80DocTypecodes_BreastLymphaticsRightScanWRadionuclideIntraLymphatic, GeneralMedicineHospitalAdmissionEvaluationNote: C80DocTypecodes_GeneralMedicineHospitalAdmissionEvaluationNote, - GeneralMedicineMedicalStudentHospitalAdmissionEvaluationNote: C80DocTypecodes_GeneralMedicineMedicalStudentHospitalAdmissionEvaluationNote, + GeneralMedicineMedicalStudentHospitalAdmissionEvaluationNote: + C80DocTypecodes_GeneralMedicineMedicalStudentHospitalAdmissionEvaluationNote, GeneralMedicineMedicalStudentHospitalProgressNote: C80DocTypecodes_GeneralMedicineMedicalStudentHospitalProgressNote, GeneralMedicineMedicalStudentHospitalConsultNote: C80DocTypecodes_GeneralMedicineMedicalStudentHospitalConsultNote, SurgeryHospitalProgressNote: C80DocTypecodes_SurgeryHospitalProgressNote, @@ -88913,11 +89224,13 @@ export const C80DocTypecodes = { SurgeryMedicalStudentHospitalProgressNote: C80DocTypecodes_SurgeryMedicalStudentHospitalProgressNote, SurgeryMedicalStudentHospitalConsultNote: C80DocTypecodes_SurgeryMedicalStudentHospitalConsultNote, CriticalCareMedicinePhysicianAttendingHospitalNote: C80DocTypecodes_CriticalCareMedicinePhysicianAttendingHospitalNote, - CriticalCareMedicineMedicalStudentHospitalAdmissionEvaluationNote: C80DocTypecodes_CriticalCareMedicineMedicalStudentHospitalAdmissionEvaluationNote, + CriticalCareMedicineMedicalStudentHospitalAdmissionEvaluationNote: + C80DocTypecodes_CriticalCareMedicineMedicalStudentHospitalAdmissionEvaluationNote, CriticalCareMedicineMedicalStudentHospitalProgressNote: C80DocTypecodes_CriticalCareMedicineMedicalStudentHospitalProgressNote, CriticalCareMedicineMedicalStudentHospitalConsultNote: C80DocTypecodes_CriticalCareMedicineMedicalStudentHospitalConsultNote, ThoracicSurgeryPhysicianAttendingHospitalNote: C80DocTypecodes_ThoracicSurgeryPhysicianAttendingHospitalNote, - ThoracicSurgeryMedicalStudentHospitalAdmissionEvaluationNote: C80DocTypecodes_ThoracicSurgeryMedicalStudentHospitalAdmissionEvaluationNote, + ThoracicSurgeryMedicalStudentHospitalAdmissionEvaluationNote: + C80DocTypecodes_ThoracicSurgeryMedicalStudentHospitalAdmissionEvaluationNote, ThoracicSurgeryMedicalStudentHospitalProgressNote: C80DocTypecodes_ThoracicSurgeryMedicalStudentHospitalProgressNote, ThoracicSurgeryMedicalStudentHospitalConsultNote: C80DocTypecodes_ThoracicSurgeryMedicalStudentHospitalConsultNote, PulmonaryPhysicianAttendingHospitalNote: C80DocTypecodes_PulmonaryPhysicianAttendingHospitalNote, @@ -88948,18 +89261,24 @@ export const C80DocTypecodes = { MammaryArteryInternalLeftFluoroscopicAngiogramWContrastIA: C80DocTypecodes_MammaryArteryInternalLeftFluoroscopicAngiogramWContrastIA, LungLeftXRayWContrastIntrabronchial: C80DocTypecodes_LungLeftXRayWContrastIntrabronchial, LungRightXRayWContrastIntrabronchial: C80DocTypecodes_LungRightXRayWContrastIntrabronchial, - FluoroscopyGuidanceForCatheterizationOfFallopianTubeLeftTranscervical: C80DocTypecodes_FluoroscopyGuidanceForCatheterizationOfFallopianTubeLeftTranscervical, - FluoroscopyGuidanceForCatheterizationOfFallopianTubeRightTranscervical: C80DocTypecodes_FluoroscopyGuidanceForCatheterizationOfFallopianTubeRightTranscervical, + FluoroscopyGuidanceForCatheterizationOfFallopianTubeLeftTranscervical: + C80DocTypecodes_FluoroscopyGuidanceForCatheterizationOfFallopianTubeLeftTranscervical, + FluoroscopyGuidanceForCatheterizationOfFallopianTubeRightTranscervical: + C80DocTypecodes_FluoroscopyGuidanceForCatheterizationOfFallopianTubeRightTranscervical, MammaryArteryInternalRightFluoroscopicAngiogramWContrastIA: C80DocTypecodes_MammaryArteryInternalRightFluoroscopicAngiogramWContrastIA, - FluoroscopicAngiogramGuidanceForPlacementOfStentInArteryLeft: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInArteryLeft, - FluoroscopicAngiogramGuidanceForPlacementOfStentInArteryRight: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInArteryRight, + FluoroscopicAngiogramGuidanceForPlacementOfStentInArteryLeft: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInArteryLeft, + FluoroscopicAngiogramGuidanceForPlacementOfStentInArteryRight: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInArteryRight, KidneyBilateralFluoroscopyViewForCystExamination: C80DocTypecodes_KidneyBilateralFluoroscopyViewForCystExamination, KidneyLeftFluoroscopyViewForCystExamination: C80DocTypecodes_KidneyLeftFluoroscopyViewForCystExamination, KidneyRightFluoroscopyViewForCystExamination: C80DocTypecodes_KidneyRightFluoroscopyViewForCystExamination, - SagittalSinusAndJugularVeinsLeftFluoroscopicAngiogramWContrastIV: C80DocTypecodes_SagittalSinusAndJugularVeinsLeftFluoroscopicAngiogramWContrastIV, + SagittalSinusAndJugularVeinsLeftFluoroscopicAngiogramWContrastIV: + C80DocTypecodes_SagittalSinusAndJugularVeinsLeftFluoroscopicAngiogramWContrastIV, SagittalSinusVeinLeftFluoroscopicAngiogramWContrastIV: C80DocTypecodes_SagittalSinusVeinLeftFluoroscopicAngiogramWContrastIV, SagittalSinusVeinRightFluoroscopicAngiogramWContrastIV: C80DocTypecodes_SagittalSinusVeinRightFluoroscopicAngiogramWContrastIV, - SagittalSinusAndJugularVeinsRightFluoroscopicAngiogramWContrastIV: C80DocTypecodes_SagittalSinusAndJugularVeinsRightFluoroscopicAngiogramWContrastIV, + SagittalSinusAndJugularVeinsRightFluoroscopicAngiogramWContrastIV: + C80DocTypecodes_SagittalSinusAndJugularVeinsRightFluoroscopicAngiogramWContrastIV, InhalationChallengeTestReportDocumentWMethacholineInhaled: C80DocTypecodes_InhalationChallengeTestReportDocumentWMethacholineInhaled, FDAPackageInsertLotDistributionData: C80DocTypecodes_FDAPackageInsertLotDistributionData, FDAPackageInsertPharmacogenomicsSection: C80DocTypecodes_FDAPackageInsertPharmacogenomicsSection, @@ -89001,7 +89320,8 @@ export const C80DocTypecodes = { ObstetricsAndGynecologyDiagnosticStudyNote: C80DocTypecodes_ObstetricsAndGynecologyDiagnosticStudyNote, ObstetricsAndGynecologyDischargeSummary: C80DocTypecodes_ObstetricsAndGynecologyDischargeSummary, ObstetricsAndGynecologyHistoryAndPhysicalNote: C80DocTypecodes_ObstetricsAndGynecologyHistoryAndPhysicalNote, - ObstetricsAndGynecologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_ObstetricsAndGynecologyPreoperativeEvaluationAndManagementNote, + ObstetricsAndGynecologyPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_ObstetricsAndGynecologyPreoperativeEvaluationAndManagementNote, ObstetricsAndGynecologyProcedureNote: C80DocTypecodes_ObstetricsAndGynecologyProcedureNote, ObstetricsAndGynecologyProgressNote: C80DocTypecodes_ObstetricsAndGynecologyProgressNote, ObstetricsAndGynecologyTransferSummaryNote: C80DocTypecodes_ObstetricsAndGynecologyTransferSummaryNote, @@ -89054,8 +89374,10 @@ export const C80DocTypecodes = { AdolescentMedicineHospitalConsultNote: C80DocTypecodes_AdolescentMedicineHospitalConsultNote, AdolescentMedicineHospitalLetter: C80DocTypecodes_AdolescentMedicineHospitalLetter, AdvancedHeartFailureAndTransplantCardiologyNote: C80DocTypecodes_AdvancedHeartFailureAndTransplantCardiologyNote, - AdvancedHeartFailureAndTransplantCardiologyHistoryAndPhysicalNote: C80DocTypecodes_AdvancedHeartFailureAndTransplantCardiologyHistoryAndPhysicalNote, - AdvancedHeartFailureAndTransplantCardiologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_AdvancedHeartFailureAndTransplantCardiologyPreoperativeEvaluationAndManagementNote, + AdvancedHeartFailureAndTransplantCardiologyHistoryAndPhysicalNote: + C80DocTypecodes_AdvancedHeartFailureAndTransplantCardiologyHistoryAndPhysicalNote, + AdvancedHeartFailureAndTransplantCardiologyPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_AdvancedHeartFailureAndTransplantCardiologyPreoperativeEvaluationAndManagementNote, AdvancedHeartFailureAndTransplantCardiologyHospitalLetter: C80DocTypecodes_AdvancedHeartFailureAndTransplantCardiologyHospitalLetter, AllergyAndImmunologyDiagnosticStudyNote: C80DocTypecodes_AllergyAndImmunologyDiagnosticStudyNote, AllergyAndImmunologyDischargeSummary: C80DocTypecodes_AllergyAndImmunologyDischargeSummary, @@ -89105,7 +89427,8 @@ export const C80DocTypecodes = { MultiSpecialtyProgramDischargeSummary: C80DocTypecodes_MultiSpecialtyProgramDischargeSummary, MultiSpecialtyProgramHistoryAndPhysicalNote: C80DocTypecodes_MultiSpecialtyProgramHistoryAndPhysicalNote, MultiSpecialtyProgramNote: C80DocTypecodes_MultiSpecialtyProgramNote, - MultiSpecialtyProgramPreoperativeEvaluationAndManagementNote: C80DocTypecodes_MultiSpecialtyProgramPreoperativeEvaluationAndManagementNote, + MultiSpecialtyProgramPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_MultiSpecialtyProgramPreoperativeEvaluationAndManagementNote, MultiSpecialtyProgramProgressNote: C80DocTypecodes_MultiSpecialtyProgramProgressNote, MultiSpecialtyProgramTransferSummaryNote: C80DocTypecodes_MultiSpecialtyProgramTransferSummaryNote, MultiSpecialtyProgramHospitalConsultNote: C80DocTypecodes_MultiSpecialtyProgramHospitalConsultNote, @@ -89122,17 +89445,27 @@ export const C80DocTypecodes = { NeurologicalSurgeryProgressNote: C80DocTypecodes_NeurologicalSurgeryProgressNote, NeurologicalSurgeryHospitalConsultNote: C80DocTypecodes_NeurologicalSurgeryHospitalConsultNote, NeurologicalSurgeryHospitalLetter: C80DocTypecodes_NeurologicalSurgeryHospitalLetter, - NeurologyWithSpecialQualificationsInChildNeurologyDiagnosticStudyNote: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyDiagnosticStudyNote, - NeurologyWithSpecialQualificationsInChildNeurologyDischargeSummary: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyDischargeSummary, - NeurologyWithSpecialQualificationsInChildNeurologyHistoryAndPhysicalNote: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyHistoryAndPhysicalNote, + NeurologyWithSpecialQualificationsInChildNeurologyDiagnosticStudyNote: + C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyDiagnosticStudyNote, + NeurologyWithSpecialQualificationsInChildNeurologyDischargeSummary: + C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyDischargeSummary, + NeurologyWithSpecialQualificationsInChildNeurologyHistoryAndPhysicalNote: + C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyHistoryAndPhysicalNote, NeurologyWithSpecialQualificationsInChildNeurologyNote: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyNote, - NeurologyWithSpecialQualificationsInChildNeurologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyPreoperativeEvaluationAndManagementNote, - NeurologyWithSpecialQualificationsInChildNeurologyProcedureNote: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyProcedureNote, - NeurologyWithSpecialQualificationsInChildNeurologyProgressNote: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyProgressNote, - NeurologyWithSpecialQualificationsInChildNeurologyTransferSummaryNote: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyTransferSummaryNote, - NeurologyWithSpecialQualificationsInChildNeurologyHospitalConsultNote: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyHospitalConsultNote, - NeurologyWithSpecialQualificationsInChildNeurologyHospitalDiagnosticStudyNote: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyHospitalDiagnosticStudyNote, - NeurologyWithSpecialQualificationsInChildNeurologyHospitalLetter: C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyHospitalLetter, + NeurologyWithSpecialQualificationsInChildNeurologyPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyPreoperativeEvaluationAndManagementNote, + NeurologyWithSpecialQualificationsInChildNeurologyProcedureNote: + C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyProcedureNote, + NeurologyWithSpecialQualificationsInChildNeurologyProgressNote: + C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyProgressNote, + NeurologyWithSpecialQualificationsInChildNeurologyTransferSummaryNote: + C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyTransferSummaryNote, + NeurologyWithSpecialQualificationsInChildNeurologyHospitalConsultNote: + C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyHospitalConsultNote, + NeurologyWithSpecialQualificationsInChildNeurologyHospitalDiagnosticStudyNote: + C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyHospitalDiagnosticStudyNote, + NeurologyWithSpecialQualificationsInChildNeurologyHospitalLetter: + C80DocTypecodes_NeurologyWithSpecialQualificationsInChildNeurologyHospitalLetter, PainMedicineDiagnosticStudyNote: C80DocTypecodes_PainMedicineDiagnosticStudyNote, PainMedicineDischargeSummary: C80DocTypecodes_PainMedicineDischargeSummary, PainMedicineHistoryAndPhysicalNote: C80DocTypecodes_PainMedicineHistoryAndPhysicalNote, @@ -89156,12 +89489,14 @@ export const C80DocTypecodes = { PediatricDermatologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_PediatricDermatologyPreoperativeEvaluationAndManagementNote, PediatricEndocrinologyDischargeSummary: C80DocTypecodes_PediatricEndocrinologyDischargeSummary, PediatricEndocrinologyHistoryAndPhysicalNote: C80DocTypecodes_PediatricEndocrinologyHistoryAndPhysicalNote, - PediatricEndocrinologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_PediatricEndocrinologyPreoperativeEvaluationAndManagementNote, + PediatricEndocrinologyPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_PediatricEndocrinologyPreoperativeEvaluationAndManagementNote, PediatricEndocrinologyTransferSummaryNote: C80DocTypecodes_PediatricEndocrinologyTransferSummaryNote, PediatricGastroenterologyDischargeSummary: C80DocTypecodes_PediatricGastroenterologyDischargeSummary, PediatricGastroenterologyHistoryAndPhysicalNote: C80DocTypecodes_PediatricGastroenterologyHistoryAndPhysicalNote, PediatricGastroenterologyNote: C80DocTypecodes_PediatricGastroenterologyNote, - PediatricGastroenterologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_PediatricGastroenterologyPreoperativeEvaluationAndManagementNote, + PediatricGastroenterologyPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_PediatricGastroenterologyPreoperativeEvaluationAndManagementNote, PediatricGastroenterologyProcedureNote: C80DocTypecodes_PediatricGastroenterologyProcedureNote, PediatricGastroenterologyProgressNote: C80DocTypecodes_PediatricGastroenterologyProgressNote, PediatricGastroenterologyTransferSummaryNote: C80DocTypecodes_PediatricGastroenterologyTransferSummaryNote, @@ -89171,7 +89506,8 @@ export const C80DocTypecodes = { PediatricHematologyOncologyDischargeSummary: C80DocTypecodes_PediatricHematologyOncologyDischargeSummary, PediatricHematologyOncologyHistoryAndPhysicalNote: C80DocTypecodes_PediatricHematologyOncologyHistoryAndPhysicalNote, PediatricHematologyOncologyNote: C80DocTypecodes_PediatricHematologyOncologyNote, - PediatricHematologyOncologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_PediatricHematologyOncologyPreoperativeEvaluationAndManagementNote, + PediatricHematologyOncologyPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_PediatricHematologyOncologyPreoperativeEvaluationAndManagementNote, PediatricHematologyOncologyProcedureNote: C80DocTypecodes_PediatricHematologyOncologyProcedureNote, PediatricHematologyOncologyProgressNote: C80DocTypecodes_PediatricHematologyOncologyProgressNote, PediatricHematologyOncologyTransferSummaryNote: C80DocTypecodes_PediatricHematologyOncologyTransferSummaryNote, @@ -89179,7 +89515,8 @@ export const C80DocTypecodes = { PediatricHematologyOncologyHospitalLetter: C80DocTypecodes_PediatricHematologyOncologyHospitalLetter, PediatricInfectiousDiseasesHistoryAndPhysicalNote: C80DocTypecodes_PediatricInfectiousDiseasesHistoryAndPhysicalNote, PediatricInfectiousDiseasesNote: C80DocTypecodes_PediatricInfectiousDiseasesNote, - PediatricInfectiousDiseasesPreoperativeEvaluationAndManagementNote: C80DocTypecodes_PediatricInfectiousDiseasesPreoperativeEvaluationAndManagementNote, + PediatricInfectiousDiseasesPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_PediatricInfectiousDiseasesPreoperativeEvaluationAndManagementNote, PediatricInfectiousDiseasesProgressNote: C80DocTypecodes_PediatricInfectiousDiseasesProgressNote, PediatricInfectiousDiseasesTransferSummaryNote: C80DocTypecodes_PediatricInfectiousDiseasesTransferSummaryNote, PediatricInfectiousDiseasesHospitalConsultNote: C80DocTypecodes_PediatricInfectiousDiseasesHospitalConsultNote, @@ -89191,7 +89528,8 @@ export const C80DocTypecodes = { PediatricNephrologyTransferSummaryNote: C80DocTypecodes_PediatricNephrologyTransferSummaryNote, PediatricOtolaryngologyDischargeSummary: C80DocTypecodes_PediatricOtolaryngologyDischargeSummary, PediatricOtolaryngologyHistoryAndPhysicalNote: C80DocTypecodes_PediatricOtolaryngologyHistoryAndPhysicalNote, - PediatricOtolaryngologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_PediatricOtolaryngologyPreoperativeEvaluationAndManagementNote, + PediatricOtolaryngologyPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_PediatricOtolaryngologyPreoperativeEvaluationAndManagementNote, PediatricOtolaryngologyTransferSummaryNote: C80DocTypecodes_PediatricOtolaryngologyTransferSummaryNote, PediatricPulmonologyDiagnosticStudyNote: C80DocTypecodes_PediatricPulmonologyDiagnosticStudyNote, PediatricPulmonologyDischargeSummary: C80DocTypecodes_PediatricPulmonologyDischargeSummary, @@ -89205,7 +89543,8 @@ export const C80DocTypecodes = { PediatricPulmonologyHospitalDiagnosticStudyNote: C80DocTypecodes_PediatricPulmonologyHospitalDiagnosticStudyNote, PediatricPulmonologyHospitalLetter: C80DocTypecodes_PediatricPulmonologyHospitalLetter, PediatricRheumatologyHistoryAndPhysicalNote: C80DocTypecodes_PediatricRheumatologyHistoryAndPhysicalNote, - PediatricRheumatologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_PediatricRheumatologyPreoperativeEvaluationAndManagementNote, + PediatricRheumatologyPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_PediatricRheumatologyPreoperativeEvaluationAndManagementNote, PediatricRheumatologyTransferSummaryNote: C80DocTypecodes_PediatricRheumatologyTransferSummaryNote, PediatricSurgeryDiagnosticStudyNote: C80DocTypecodes_PediatricSurgeryDiagnosticStudyNote, PediatricSurgeryDischargeSummary: C80DocTypecodes_PediatricSurgeryDischargeSummary, @@ -89251,7 +89590,8 @@ export const C80DocTypecodes = { ResearchProgressNote: C80DocTypecodes_ResearchProgressNote, SpeechLanguagePathologyDischargeSummary: C80DocTypecodes_SpeechLanguagePathologyDischargeSummary, SpeechLanguagePathologyHistoryAndPhysicalNote: C80DocTypecodes_SpeechLanguagePathologyHistoryAndPhysicalNote, - SpeechLanguagePathologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_SpeechLanguagePathologyPreoperativeEvaluationAndManagementNote, + SpeechLanguagePathologyPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_SpeechLanguagePathologyPreoperativeEvaluationAndManagementNote, SpeechLanguagePathologyHospitalConsultNote: C80DocTypecodes_SpeechLanguagePathologyHospitalConsultNote, SpeechLanguagePathologyHospitalLetter: C80DocTypecodes_SpeechLanguagePathologyHospitalLetter, TransplantSurgeryNote: C80DocTypecodes_TransplantSurgeryNote, @@ -89265,7 +89605,8 @@ export const C80DocTypecodes = { PediatricTransplantHepatologyDischargeSummary: C80DocTypecodes_PediatricTransplantHepatologyDischargeSummary, PediatricTransplantHepatologyHistoryAndPhysicalNote: C80DocTypecodes_PediatricTransplantHepatologyHistoryAndPhysicalNote, PediatricTransplantHepatologyNote: C80DocTypecodes_PediatricTransplantHepatologyNote, - PediatricTransplantHepatologyPreoperativeEvaluationAndManagementNote: C80DocTypecodes_PediatricTransplantHepatologyPreoperativeEvaluationAndManagementNote, + PediatricTransplantHepatologyPreoperativeEvaluationAndManagementNote: + C80DocTypecodes_PediatricTransplantHepatologyPreoperativeEvaluationAndManagementNote, PediatricTransplantHepatologyProcedureNote: C80DocTypecodes_PediatricTransplantHepatologyProcedureNote, PediatricTransplantHepatologyProgressNote: C80DocTypecodes_PediatricTransplantHepatologyProgressNote, PediatricTransplantHepatologyTransferSummaryNote: C80DocTypecodes_PediatricTransplantHepatologyTransferSummaryNote, @@ -89314,13 +89655,15 @@ export const C80DocTypecodes = { KneeBilateralXRaySunriseAndViewsStanding: C80DocTypecodes_KneeBilateralXRaySunriseAndViewsStanding, AbdomenXRayAPAndLateralCrosstable: C80DocTypecodes_AbdomenXRayAPAndLateralCrosstable, AbdominalVesselsFluoroscopicAngiogramWContrastIV: C80DocTypecodes_AbdominalVesselsFluoroscopicAngiogramWContrastIV, - UnspecifiedBodyRegionFluoroscopicAngiogramAngioplastyWContrast: C80DocTypecodes_UnspecifiedBodyRegionFluoroscopicAngiogramAngioplastyWContrast, + UnspecifiedBodyRegionFluoroscopicAngiogramAngioplastyWContrast: + C80DocTypecodes_UnspecifiedBodyRegionFluoroscopicAngiogramAngioplastyWContrast, MammogramGuidanceForNeedleLocalizationOfBreastBilateral: C80DocTypecodes_MammogramGuidanceForNeedleLocalizationOfBreastBilateral, PatellaBilateralXRaySunrise: C80DocTypecodes_PatellaBilateralXRaySunrise, RibsBilateralXRayAnteriorAndLateral: C80DocTypecodes_RibsBilateralXRayAnteriorAndLateral, RibsBilateralAndChestXRay: C80DocTypecodes_RibsBilateralAndChestXRay, WristBilateralXRayUlnarDeviationAndRadialDeviation: C80DocTypecodes_WristBilateralXRayUlnarDeviationAndRadialDeviation, - FluoroscopyGuidanceForCoreNeedleBiopsyOfUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForCoreNeedleBiopsyOfUnspecifiedBodyRegion, + FluoroscopyGuidanceForCoreNeedleBiopsyOfUnspecifiedBodyRegion: + C80DocTypecodes_FluoroscopyGuidanceForCoreNeedleBiopsyOfUnspecifiedBodyRegion, FluoroscopyGuidanceForBiopsyOfPelvis: C80DocTypecodes_FluoroscopyGuidanceForBiopsyOfPelvis, FluoroscopyGuidanceForBiopsyOfSalivaryGland: C80DocTypecodes_FluoroscopyGuidanceForBiopsyOfSalivaryGland, FluoroscopyGuidanceForBiopsyOfBone: C80DocTypecodes_FluoroscopyGuidanceForBiopsyOfBone, @@ -89371,7 +89714,8 @@ export const C80DocTypecodes = { FluoroscopyGuidanceForAspirationOfCystOfOvary: C80DocTypecodes_FluoroscopyGuidanceForAspirationOfCystOfOvary, FluoroscopyGuidanceForAbscessDrainageOfPancreas: C80DocTypecodes_FluoroscopyGuidanceForAbscessDrainageOfPancreas, FluoroscopyGuidanceForAbscessDrainageOfPleuralSpace: C80DocTypecodes_FluoroscopyGuidanceForAbscessDrainageOfPleuralSpace, - FluoroscopyGuidanceForFineNeedleAspirationOfSuperficialTissue: C80DocTypecodes_FluoroscopyGuidanceForFineNeedleAspirationOfSuperficialTissue, + FluoroscopyGuidanceForFineNeedleAspirationOfSuperficialTissue: + C80DocTypecodes_FluoroscopyGuidanceForFineNeedleAspirationOfSuperficialTissue, FluoroscopyGuidanceForNeedleBiopsyOfLiver: C80DocTypecodes_FluoroscopyGuidanceForNeedleBiopsyOfLiver, FluoroscopyGuidanceForNeedleBiopsyOfPancreas: C80DocTypecodes_FluoroscopyGuidanceForNeedleBiopsyOfPancreas, FluoroscopyGuidanceForNeedleBiopsyOfChestPleura: C80DocTypecodes_FluoroscopyGuidanceForNeedleBiopsyOfChestPleura, @@ -89381,7 +89725,8 @@ export const C80DocTypecodes = { HipXRayAndDaneliusMiller: C80DocTypecodes_HipXRayAndDaneliusMiller, HipXRayDaneliusMiller: C80DocTypecodes_HipXRayDaneliusMiller, FluoroscopyGuidanceForDrainageOfHip: C80DocTypecodes_FluoroscopyGuidanceForDrainageOfHip, - FluoroscopicAngiogramGuidanceForPlacementOfStentInIliacArtery: C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInIliacArtery, + FluoroscopicAngiogramGuidanceForPlacementOfStentInIliacArtery: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForPlacementOfStentInIliacArtery, IliacArteryFluoroscopicAngiogramAtherectomyWContrast: C80DocTypecodes_IliacArteryFluoroscopicAngiogramAtherectomyWContrast, KneeXRaySunriseAndTunnel: C80DocTypecodes_KneeXRaySunriseAndTunnel, AnkleLeftXRayAPAndLateralAndObliqueStanding: C80DocTypecodes_AnkleLeftXRayAPAndLateralAndObliqueStanding, @@ -89485,21 +89830,27 @@ export const C80DocTypecodes = { ScrotumAndTesticleSPECTFlow: C80DocTypecodes_ScrotumAndTesticleSPECTFlow, ThyroidScanAndUptakeWI131PO: C80DocTypecodes_ThyroidScanAndUptakeWI131PO, SPECTForTumorWholeBody: C80DocTypecodes_SPECTForTumorWholeBody, - UrinaryBladderAndUrethraSPECTWContrastIntraBladderDuringVoiding: C80DocTypecodes_UrinaryBladderAndUrethraSPECTWContrastIntraBladderDuringVoiding, + UrinaryBladderAndUrethraSPECTWContrastIntraBladderDuringVoiding: + C80DocTypecodes_UrinaryBladderAndUrethraSPECTWContrastIntraBladderDuringVoiding, PatellaXRaySunrise: C80DocTypecodes_PatellaXRaySunrise, FluoroscopyGuidanceForPercutaneousBiopsyOfAbdomen: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousBiopsyOfAbdomen, - FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfAbdomen: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfAbdomen, - FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfAppendix: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfAppendix, + FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfAbdomen: + C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfAbdomen, + FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfAppendix: + C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfAppendix, FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfLung: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfLung, FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfPelvis: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousDrainageOfAbscessOfPelvis, FluoroscopyGuidanceForPercutaneousNeedleBiopsyOfKidney: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousNeedleBiopsyOfKidney, FluoroscopyGuidanceForPercutaneousNeedleBiopsyOfLiver: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousNeedleBiopsyOfLiver, - FluoroscopyGuidanceForPercutaneousNeedleBiopsyOfSalivaryGland: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousNeedleBiopsyOfSalivaryGland, - RenalArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA: C80DocTypecodes_RenalArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA, + FluoroscopyGuidanceForPercutaneousNeedleBiopsyOfSalivaryGland: + C80DocTypecodes_FluoroscopyGuidanceForPercutaneousNeedleBiopsyOfSalivaryGland, + RenalArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA: + C80DocTypecodes_RenalArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA, PoplitealArteryFluoroscopicAngiogramWContrastIA: C80DocTypecodes_PoplitealArteryFluoroscopicAngiogramWContrastIA, PortalVeinFluoroscopicAngiogramWContrastIV: C80DocTypecodes_PortalVeinFluoroscopicAngiogramWContrastIV, BreastMammogramPostWirePlacement: C80DocTypecodes_BreastMammogramPostWirePlacement, - PulmonaryArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA: C80DocTypecodes_PulmonaryArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA, + PulmonaryArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA: + C80DocTypecodes_PulmonaryArteryFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIA, RenalVesselsFluoroscopicAngiogramAtherectomyWContrast: C80DocTypecodes_RenalVesselsFluoroscopicAngiogramAtherectomyWContrast, AnkleRightXRay3ViewsStanding: C80DocTypecodes_AnkleRightXRay3ViewsStanding, KneeRightXRaySunriseAndTunnelStanding: C80DocTypecodes_KneeRightXRaySunriseAndTunnelStanding, @@ -89548,7 +89899,8 @@ export const C80DocTypecodes = { SalivaryGlandUS: C80DocTypecodes_SalivaryGlandUS, ScrotumAndTesticleUSLimited: C80DocTypecodes_ScrotumAndTesticleUSLimited, KidneyTransplantUSLimited: C80DocTypecodes_KidneyTransplantUSLimited, - UpperExtremityVeinFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIV: C80DocTypecodes_UpperExtremityVeinFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIV, + UpperExtremityVeinFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIV: + C80DocTypecodes_UpperExtremityVeinFluoroscopicAngiogramPercutaneousTransluminalAngioplastyOfVesselWContrastIV, WristXRayWClenchedFist: C80DocTypecodes_WristXRayWClenchedFist, WristXRayUlnarDeviationAndRadialDeviation: C80DocTypecodes_WristXRayUlnarDeviationAndRadialDeviation, WristXRayUlnarDeviation: C80DocTypecodes_WristXRayUlnarDeviation, @@ -89616,9 +89968,12 @@ export const C80DocTypecodes = { FluoroscopyGuidanceForInjectionOfSpineThoracic: C80DocTypecodes_FluoroscopyGuidanceForInjectionOfSpineThoracic, CTGuidanceForNerveBlockOfSpineCervical: C80DocTypecodes_CTGuidanceForNerveBlockOfSpineCervical, CTGuidanceForNerveBlockOfSpineThoracic: C80DocTypecodes_CTGuidanceForNerveBlockOfSpineThoracic, - FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineCervical: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineCervical, - FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineLumbar: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineLumbar, - FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineThoracic: C80DocTypecodes_FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineThoracic, + FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineCervical: + C80DocTypecodes_FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineCervical, + FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineLumbar: + C80DocTypecodes_FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineLumbar, + FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineThoracic: + C80DocTypecodes_FluoroscopyGuidanceForPercutaneousVertebroplastyOfSpineThoracic, SpineCervicalUS: C80DocTypecodes_SpineCervicalUS, SpineThoracicUS: C80DocTypecodes_SpineThoracicUS, SpineLumbarCTStereotactic: C80DocTypecodes_SpineLumbarCTStereotactic, @@ -89658,7 +90013,8 @@ export const C80DocTypecodes = { FDAPackageInsertPMIUsesSection: C80DocTypecodes_FDAPackageInsertPMIUsesSection, FDAProductLabelGenericDrugFacilityIdentificationSubmission: C80DocTypecodes_FDAProductLabelGenericDrugFacilityIdentificationSubmission, FDAPackageInsertHealthCareProviderLetter: C80DocTypecodes_FDAPackageInsertHealthCareProviderLetter, - FDAProductLabelIdentificationOfCBERRegulatedGenericDrugFacility: C80DocTypecodes_FDAProductLabelIdentificationOfCBERRegulatedGenericDrugFacility, + FDAProductLabelIdentificationOfCBERRegulatedGenericDrugFacility: + C80DocTypecodes_FDAProductLabelIdentificationOfCBERRegulatedGenericDrugFacility, CancerEventReport: C80DocTypecodes_CancerEventReport, CancerDiagnosisNarrative: C80DocTypecodes_CancerDiagnosisNarrative, BreastRightFFDMammogramTomosynthesisDiagnostic: C80DocTypecodes_BreastRightFFDMammogramTomosynthesisDiagnostic, @@ -89676,7 +90032,8 @@ export const C80DocTypecodes = { ToesLeftMRIWOContrast: C80DocTypecodes_ToesLeftMRIWOContrast, ToesLeftMRIWContrastIV: C80DocTypecodes_ToesLeftMRIWContrastIV, PelvisMRIWAndWOContrastIVAndWEndorectalCoil: C80DocTypecodes_PelvisMRIWAndWOContrastIVAndWEndorectalCoil, - PelvisMRIWContrastPRAtRestAndMaxmalSphincterContractionDuringStrainingAndDefecation: C80DocTypecodes_PelvisMRIWContrastPRAtRestAndMaxmalSphincterContractionDuringStrainingAndDefecation, + PelvisMRIWContrastPRAtRestAndMaxmalSphincterContractionDuringStrainingAndDefecation: + C80DocTypecodes_PelvisMRIWContrastPRAtRestAndMaxmalSphincterContractionDuringStrainingAndDefecation, AbdomenAndPelvisMRIWContrastPOAndWAndWOContrastIV: C80DocTypecodes_AbdomenAndPelvisMRIWContrastPOAndWAndWOContrastIV, AbdomenAndPelvisMRIWContrastPOAndWOContrastIV: C80DocTypecodes_AbdomenAndPelvisMRIWContrastPOAndWOContrastIV, AbdomenMRCPWithAndWithoutContrastIV: C80DocTypecodes_AbdomenMRCPWithAndWithoutContrastIV, @@ -89699,37 +90056,55 @@ export const C80DocTypecodes = { USGuidanceForAmbulatoryPhlebectomyOfExtremityVeinLeft: C80DocTypecodes_USGuidanceForAmbulatoryPhlebectomyOfExtremityVeinLeft, USGuidanceForLaserAblationOfVeinSOfExtremityVeinRight: C80DocTypecodes_USGuidanceForLaserAblationOfVeinSOfExtremityVeinRight, USGuidanceForLaserAblationOfVeinSOfExtremityVeinLeft: C80DocTypecodes_USGuidanceForLaserAblationOfVeinSOfExtremityVeinLeft, - USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinsBilateral: C80DocTypecodes_USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinsBilateral, - USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinBilateral: C80DocTypecodes_USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinBilateral, - FluoroscopicAngiogramGuidanceForRemovalOfLongtermPeripheralCatheterFromCentralVein: C80DocTypecodes_FluoroscopicAngiogramGuidanceForRemovalOfLongtermPeripheralCatheterFromCentralVein, - FluoroscopyGuidanceForPeripheralNerveDenervationOfUnspecifiedBodyRegion: C80DocTypecodes_FluoroscopyGuidanceForPeripheralNerveDenervationOfUnspecifiedBodyRegion, + USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinsBilateral: + C80DocTypecodes_USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinsBilateral, + USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinBilateral: + C80DocTypecodes_USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinBilateral, + FluoroscopicAngiogramGuidanceForRemovalOfLongtermPeripheralCatheterFromCentralVein: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForRemovalOfLongtermPeripheralCatheterFromCentralVein, + FluoroscopyGuidanceForPeripheralNerveDenervationOfUnspecifiedBodyRegion: + C80DocTypecodes_FluoroscopyGuidanceForPeripheralNerveDenervationOfUnspecifiedBodyRegion, FluoroscopyGuidanceForFacetJointDenervationOfSpine: C80DocTypecodes_FluoroscopyGuidanceForFacetJointDenervationOfSpine, FluoroscopyGuidanceForFacetJointDenervationOfSpineCervical: C80DocTypecodes_FluoroscopyGuidanceForFacetJointDenervationOfSpineCervical, FluoroscopyGuidanceForFacetJointDenervationOfSpineLumbar: C80DocTypecodes_FluoroscopyGuidanceForFacetJointDenervationOfSpineLumbar, - FluoroscopyGuidanceForIntercostalNerveDevervationOfSpineThoracic: C80DocTypecodes_FluoroscopyGuidanceForIntercostalNerveDevervationOfSpineThoracic, - FluoroscopyGuidanceForRemovalOfPercutaneousNephrostomyTubeFromKidneyBilateralWContrast: C80DocTypecodes_FluoroscopyGuidanceForRemovalOfPercutaneousNephrostomyTubeFromKidneyBilateralWContrast, - FluoroscopyGuidanceForReplacementOfPercutaneousDrainageTubeInBiliaryDuctsAndGallbladder: C80DocTypecodes_FluoroscopyGuidanceForReplacementOfPercutaneousDrainageTubeInBiliaryDuctsAndGallbladder, - FluoroscopyGuidanceForRemovalOfCVALumenObstructionFromCentralVein: C80DocTypecodes_FluoroscopyGuidanceForRemovalOfCVALumenObstructionFromCentralVein, - FluoroscopyGuidanceForRemovalOfCVADeviceObstructionFromCentralVein: C80DocTypecodes_FluoroscopyGuidanceForRemovalOfCVADeviceObstructionFromCentralVein, - FluoroscopicAngiogramGuidanceForRemovalOfCatheterFromCentralVeinWContrastIV: C80DocTypecodes_FluoroscopicAngiogramGuidanceForRemovalOfCatheterFromCentralVeinWContrastIV, - FluoroscopyGuidanceForRemovalOfCatheterFromCentralVeinTunneled: C80DocTypecodes_FluoroscopyGuidanceForRemovalOfCatheterFromCentralVeinTunneled, - FluoroscopyGuidanceForRepairOfCVACatheterWithPortOrPumpOfCentralVein: C80DocTypecodes_FluoroscopyGuidanceForRepairOfCVACatheterWithPortOrPumpOfCentralVein, - FluoroscopyGuidanceForRepairOfCVACatheterWithoutPortOrPumpOfCentralVein: C80DocTypecodes_FluoroscopyGuidanceForRepairOfCVACatheterWithoutPortOrPumpOfCentralVein, + FluoroscopyGuidanceForIntercostalNerveDevervationOfSpineThoracic: + C80DocTypecodes_FluoroscopyGuidanceForIntercostalNerveDevervationOfSpineThoracic, + FluoroscopyGuidanceForRemovalOfPercutaneousNephrostomyTubeFromKidneyBilateralWContrast: + C80DocTypecodes_FluoroscopyGuidanceForRemovalOfPercutaneousNephrostomyTubeFromKidneyBilateralWContrast, + FluoroscopyGuidanceForReplacementOfPercutaneousDrainageTubeInBiliaryDuctsAndGallbladder: + C80DocTypecodes_FluoroscopyGuidanceForReplacementOfPercutaneousDrainageTubeInBiliaryDuctsAndGallbladder, + FluoroscopyGuidanceForRemovalOfCVALumenObstructionFromCentralVein: + C80DocTypecodes_FluoroscopyGuidanceForRemovalOfCVALumenObstructionFromCentralVein, + FluoroscopyGuidanceForRemovalOfCVADeviceObstructionFromCentralVein: + C80DocTypecodes_FluoroscopyGuidanceForRemovalOfCVADeviceObstructionFromCentralVein, + FluoroscopicAngiogramGuidanceForRemovalOfCatheterFromCentralVeinWContrastIV: + C80DocTypecodes_FluoroscopicAngiogramGuidanceForRemovalOfCatheterFromCentralVeinWContrastIV, + FluoroscopyGuidanceForRemovalOfCatheterFromCentralVeinTunneled: + C80DocTypecodes_FluoroscopyGuidanceForRemovalOfCatheterFromCentralVeinTunneled, + FluoroscopyGuidanceForRepairOfCVACatheterWithPortOrPumpOfCentralVein: + C80DocTypecodes_FluoroscopyGuidanceForRepairOfCVACatheterWithPortOrPumpOfCentralVein, + FluoroscopyGuidanceForRepairOfCVACatheterWithoutPortOrPumpOfCentralVein: + C80DocTypecodes_FluoroscopyGuidanceForRepairOfCVACatheterWithoutPortOrPumpOfCentralVein, FluoroscopyGuidanceForKyphoplastyOfSpineLumbar: C80DocTypecodes_FluoroscopyGuidanceForKyphoplastyOfSpineLumbar, FluoroscopyGuidanceForKyphoplastyOfSpineThoracic: C80DocTypecodes_FluoroscopyGuidanceForKyphoplastyOfSpineThoracic, FluoroscopyGuidanceForTriggerPointInjectionOfMuscle: C80DocTypecodes_FluoroscopyGuidanceForTriggerPointInjectionOfMuscle, InterventionalRadiologyConsultNote: C80DocTypecodes_InterventionalRadiologyConsultNote, InterventionalRadiologyProgressNote: C80DocTypecodes_InterventionalRadiologyProgressNote, - USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinsRight: C80DocTypecodes_USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinsRight, + USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinsRight: + C80DocTypecodes_USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinsRight, USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinsLeft: C80DocTypecodes_USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinsLeft, USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinRight: C80DocTypecodes_USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinRight, USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinLeft: C80DocTypecodes_USGuidanceForInjectionOfSclerosingAgentOfExtremityVeinLeft, - ExtremityArteriesBilateralUSDopplerMultisectionAndPhysiologicArteryStudy: C80DocTypecodes_ExtremityArteriesBilateralUSDopplerMultisectionAndPhysiologicArteryStudy, - ExtremityArteriesBilateralUSDopplerMultisectionLimitedAndPhysiologicArteryStudy: C80DocTypecodes_ExtremityArteriesBilateralUSDopplerMultisectionLimitedAndPhysiologicArteryStudy, - ExtremityArteriesBilateralUSDopplerMultisectionAndPhysiologicArteryStudyAtRestAndWithExercise: C80DocTypecodes_ExtremityArteriesBilateralUSDopplerMultisectionAndPhysiologicArteryStudyAtRestAndWithExercise, + ExtremityArteriesBilateralUSDopplerMultisectionAndPhysiologicArteryStudy: + C80DocTypecodes_ExtremityArteriesBilateralUSDopplerMultisectionAndPhysiologicArteryStudy, + ExtremityArteriesBilateralUSDopplerMultisectionLimitedAndPhysiologicArteryStudy: + C80DocTypecodes_ExtremityArteriesBilateralUSDopplerMultisectionLimitedAndPhysiologicArteryStudy, + ExtremityArteriesBilateralUSDopplerMultisectionAndPhysiologicArteryStudyAtRestAndWithExercise: + C80DocTypecodes_ExtremityArteriesBilateralUSDopplerMultisectionAndPhysiologicArteryStudyAtRestAndWithExercise, SurgicalSpecimenXRay: C80DocTypecodes_SurgicalSpecimenXRay, CommunicationOfCriticalResultsDescriptionDocument: C80DocTypecodes_CommunicationOfCriticalResultsDescriptionDocument, - RadiationExposureAndProtectionInformationDescriptionDocumentDiagnosticImaging: C80DocTypecodes_RadiationExposureAndProtectionInformationDescriptionDocumentDiagnosticImaging, + RadiationExposureAndProtectionInformationDescriptionDocumentDiagnosticImaging: + C80DocTypecodes_RadiationExposureAndProtectionInformationDescriptionDocumentDiagnosticImaging, RadiologyConsultNote: C80DocTypecodes_RadiologyConsultNote, PrescriptionRequestPharmacyDocumentFromPharmacist: C80DocTypecodes_PrescriptionRequestPharmacyDocumentFromPharmacist, FDAPackageInsertIndexingProductConcept: C80DocTypecodes_FDAPackageInsertIndexingProductConcept, @@ -89753,10 +90128,14 @@ export const C80DocTypecodes = { InterRAIEmergencyScreenerForPsychiatryESPDocument: C80DocTypecodes_InterRAIEmergencyScreenerForPsychiatryESPDocument, InterRAIAcuteCareACHospitalDocument: C80DocTypecodes_InterRAIAcuteCareACHospitalDocument, InterRAIPalliativeCarePCDocument: C80DocTypecodes_InterRAIPalliativeCarePCDocument, - InterRAICommunityHealthAssessmentDeafblindSupplementCHADbDocument: C80DocTypecodes_InterRAICommunityHealthAssessmentDeafblindSupplementCHADbDocument, - InterRAICommunityHealthAssessmentAssistedLivingSupplementCHAALDocument: C80DocTypecodes_InterRAICommunityHealthAssessmentAssistedLivingSupplementCHAALDocument, - InterRAICommunityHealthAssessmentMentalHealthSupplementCHAMHDocument: C80DocTypecodes_InterRAICommunityHealthAssessmentMentalHealthSupplementCHAMHDocument, - InterRAICommunityHealthAssessmentFunctionalSupplementCHAFSDocument: C80DocTypecodes_InterRAICommunityHealthAssessmentFunctionalSupplementCHAFSDocument, + InterRAICommunityHealthAssessmentDeafblindSupplementCHADbDocument: + C80DocTypecodes_InterRAICommunityHealthAssessmentDeafblindSupplementCHADbDocument, + InterRAICommunityHealthAssessmentAssistedLivingSupplementCHAALDocument: + C80DocTypecodes_InterRAICommunityHealthAssessmentAssistedLivingSupplementCHAALDocument, + InterRAICommunityHealthAssessmentMentalHealthSupplementCHAMHDocument: + C80DocTypecodes_InterRAICommunityHealthAssessmentMentalHealthSupplementCHAMHDocument, + InterRAICommunityHealthAssessmentFunctionalSupplementCHAFSDocument: + C80DocTypecodes_InterRAICommunityHealthAssessmentFunctionalSupplementCHAFSDocument, InterRAICommunityHealthAssessmentCHADocument: C80DocTypecodes_InterRAICommunityHealthAssessmentCHADocument, InterRAILongTermCareFacilityLTCFDocument: C80DocTypecodes_InterRAILongTermCareFacilityLTCFDocument, InterRAIHomeCareHCDocument: C80DocTypecodes_InterRAIHomeCareHCDocument, @@ -89775,7 +90154,8 @@ export const C80DocTypecodes = { ClinicalDocumentKindOfDocumentFromLOINCDocumentOntology: C80DocTypecodes_ClinicalDocumentKindOfDocumentFromLOINCDocumentOntology, ClinicalDocumentTypeOfServiceFromLOINCDocumentOntology: C80DocTypecodes_ClinicalDocumentTypeOfServiceFromLOINCDocumentOntology, ClinicalDocumentRoleFromLOINCDocumentOntology: C80DocTypecodes_ClinicalDocumentRoleFromLOINCDocumentOntology, - ClinicalDocumentSubjectMatterDomainFromLOINCDocumentOntology: C80DocTypecodes_ClinicalDocumentSubjectMatterDomainFromLOINCDocumentOntology, + ClinicalDocumentSubjectMatterDomainFromLOINCDocumentOntology: + C80DocTypecodes_ClinicalDocumentSubjectMatterDomainFromLOINCDocumentOntology, HospitalDischargeInstructions: C80DocTypecodes_HospitalDischargeInstructions, }; const C80Facilitycodes_HospitalOutpatientDentalClinic: Coding = { @@ -91249,7 +91629,8 @@ const cdshooks_indicator_TheResponseIsAWarning: Coding = { * This value set captures the set of indicator codes defined by the CDS Hooks specification. */ export const CdshooksIndicator = { - TheResponseIsCriticalAndIndicatesTheWorkflowShouldNotBeAllowedToProceed: cdshooks_indicator_TheResponseIsCriticalAndIndicatesTheWorkflowShouldNotBeAllowedToProceed, + TheResponseIsCriticalAndIndicatesTheWorkflowShouldNotBeAllowedToProceed: + cdshooks_indicator_TheResponseIsCriticalAndIndicatesTheWorkflowShouldNotBeAllowedToProceed, TheResponseIsInformational: cdshooks_indicator_TheResponseIsInformational, TheResponseIsAWarning: cdshooks_indicator_TheResponseIsAWarning, }; @@ -94322,7 +94703,8 @@ export const ConsentPolicy = { /** * On January 1, 2015, the Michigan Department of Health and Human Services (MDHHS) released a standard consent form for the sharing of health information specific to behavioral health and substance use treatment in accordance with Public Act 129 of 2014. In Michigan, while providers are not required to use this new standard form (MDHHS-5515), they are required to accept it. Note: Form is available at http://www.michigan.gov/documents/mdhhs/Consent_to_Share_Behavioral_Health_Information_for_Care_Coordination_Purposes_548835_7.docx For more information see http://www.michigan.gov/documents/mdhhs/Behavioral_Health_Consent_Form_Background_Information_548864_7.pdf */ - MichiganMDHHS5515ConsentToShareBehavioralHealthInformationForCareCoordinationPurposes: consent_policy_MichiganMDHHS5515ConsentToShareBehavioralHealthInformationForCareCoordinationPurposes, + MichiganMDHHS5515ConsentToShareBehavioralHealthInformationForCareCoordinationPurposes: + consent_policy_MichiganMDHHS5515ConsentToShareBehavioralHealthInformationForCareCoordinationPurposes, /** * see http://ctep.cancer.gov/protocolDevelopment/docs/Informed_Consent_Template.docx */ @@ -101389,7 +101771,8 @@ export const EndpointPayloadType = { * This endpoint does not require any content to be sent; simply connecting to the endpoint is enough notification. This can be used as a 'ping' to wakeup a service to retrieve content, which could be to ensure security considerations are correctly handled */ None: endpoint_payload_type_None, - ForDocumentsFollowingCCDAConstraintsUsingANonStructuredBody: EndpointPayloadType_ForDocumentsFollowingCCDAConstraintsUsingANonStructuredBody, + ForDocumentsFollowingCCDAConstraintsUsingANonStructuredBody: + EndpointPayloadType_ForDocumentsFollowingCCDAConstraintsUsingANonStructuredBody, ForDocumentsFollowingCCDAConstraintsUsingAStructuredBody: EndpointPayloadType_ForDocumentsFollowingCCDAConstraintsUsingAStructuredBody, CardiologyCRC: EndpointPayloadType_CardiologyCRC, CardiologyEPRCIE: EndpointPayloadType_CardiologyEPRCIE, @@ -121694,7 +122077,8 @@ export const RepositoryType = { /** * When logged in and follow the API in the website related with URL, the resource can be seen. */ - ResultNeedToBeFetchedWithAPIAndNeedLOGINOrCookiesAreRequiredWhenVisitingTheLinkOfResource: repository_type_ResultNeedToBeFetchedWithAPIAndNeedLOGINOrCookiesAreRequiredWhenVisitingTheLinkOfResource, + ResultNeedToBeFetchedWithAPIAndNeedLOGINOrCookiesAreRequiredWhenVisitingTheLinkOfResource: + repository_type_ResultNeedToBeFetchedWithAPIAndNeedLOGINOrCookiesAreRequiredWhenVisitingTheLinkOfResource, /** * When the API method (e.g. [base_url]/[parameter]) related with the URL of the website is executed, the resource can be seen directly (usually in JSON or XML format). */ @@ -125366,7 +125750,8 @@ export const ServicerequestOrderdetail = { PatientTriggeredInspiratoryAssistanceProcedure: ServicerequestOrderdetail_PatientTriggeredInspiratoryAssistanceProcedure, AssistedControlledMandatoryVentilationProcedure: ServicerequestOrderdetail_AssistedControlledMandatoryVentilationProcedure, PressureControlledVentilationProcedure: ServicerequestOrderdetail_PressureControlledVentilationProcedure, - ContinuousPositiveAirwayPressureVentilationTreatmentRegimeTherapy: ServicerequestOrderdetail_ContinuousPositiveAirwayPressureVentilationTreatmentRegimeTherapy, + ContinuousPositiveAirwayPressureVentilationTreatmentRegimeTherapy: + ServicerequestOrderdetail_ContinuousPositiveAirwayPressureVentilationTreatmentRegimeTherapy, SynchronizedIntermittentMandatoryVentilationProcedure: ServicerequestOrderdetail_SynchronizedIntermittentMandatoryVentilationProcedure, }; const service_type_AdoptionPermanentCareInfoSupport: Coding = { @@ -133300,7 +133685,8 @@ export const SpdxLicense = { /** * BSD 3-Clause "New" or "Revised" License. */ - BSD3ClauseQuotationNewQuotationOrQuotationRevisedQuotationLicense: spdx_license_BSD3ClauseQuotationNewQuotationOrQuotationRevisedQuotationLicense, + BSD3ClauseQuotationNewQuotationOrQuotationRevisedQuotationLicense: + spdx_license_BSD3ClauseQuotationNewQuotationOrQuotationRevisedQuotationLicense, /** * BSD with attribution. */ @@ -133328,7 +133714,8 @@ export const SpdxLicense = { /** * BSD 4-Clause "Original" or "Old" License. */ - BSD4ClauseQuotationOriginalQuotationOrQuotationOldQuotationLicense: spdx_license_BSD4ClauseQuotationOriginalQuotationOrQuotationOldQuotationLicense, + BSD4ClauseQuotationOriginalQuotationOrQuotationOldQuotationLicense: + spdx_license_BSD4ClauseQuotationOriginalQuotationOrQuotationOldQuotationLicense, /** * BSD-4-Clause (University of California-Specific). */ @@ -133420,11 +133807,13 @@ export const SpdxLicense = { /** * Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported. */ - CreativeCommonsAttributionNonCommercialNoDerivatives30Unported: spdx_license_CreativeCommonsAttributionNonCommercialNoDerivatives30Unported, + CreativeCommonsAttributionNonCommercialNoDerivatives30Unported: + spdx_license_CreativeCommonsAttributionNonCommercialNoDerivatives30Unported, /** * Creative Commons Attribution Non Commercial No Derivatives 4.0 International. */ - CreativeCommonsAttributionNonCommercialNoDerivatives40International: spdx_license_CreativeCommonsAttributionNonCommercialNoDerivatives40International, + CreativeCommonsAttributionNonCommercialNoDerivatives40International: + spdx_license_CreativeCommonsAttributionNonCommercialNoDerivatives40International, /** * Creative Commons Attribution Non Commercial Share Alike 1.0 Generic. */ @@ -133444,7 +133833,8 @@ export const SpdxLicense = { /** * Creative Commons Attribution Non Commercial Share Alike 4.0 International. */ - CreativeCommonsAttributionNonCommercialShareAlike40International: spdx_license_CreativeCommonsAttributionNonCommercialShareAlike40International, + CreativeCommonsAttributionNonCommercialShareAlike40International: + spdx_license_CreativeCommonsAttributionNonCommercialShareAlike40International, /** * Creative Commons Attribution No Derivatives 1.0 Generic. */ @@ -144984,8 +145374,10 @@ export const UcumCommon = { BillionPerMicroliter: UcumCommon_BillionPerMicroliter, VAL10LiterPerMinutePerSquareMeter: UcumCommon_VAL10LiterPerMinutePerSquareMeter, VAL10LiterPerMinute: UcumCommon_VAL10LiterPerMinute, - VAL10AsteriskMicroNewtonAsteriskSecondCentimeterAsteriskMeterPower2: UcumCommon_VAL10AsteriskMicroNewtonAsteriskSecondCentimeterAsteriskMeterPower2, - VAL10MicronewtonSecondPerCentimeterToTheFifthPowerPerSquareMeter: UcumCommon_VAL10MicronewtonSecondPerCentimeterToTheFifthPowerPerSquareMeter, + VAL10AsteriskMicroNewtonAsteriskSecondCentimeterAsteriskMeterPower2: + UcumCommon_VAL10AsteriskMicroNewtonAsteriskSecondCentimeterAsteriskMeterPower2, + VAL10MicronewtonSecondPerCentimeterToTheFifthPowerPerSquareMeter: + UcumCommon_VAL10MicronewtonSecondPerCentimeterToTheFifthPowerPerSquareMeter, VAL10AsteriskMicroNewtonAsteriskSecondCentimeter: UcumCommon_VAL10AsteriskMicroNewtonAsteriskSecondCentimeter, VAL10AsteriskMicroNewtonAsteriskSecondCentimeterPower2: UcumCommon_VAL10AsteriskMicroNewtonAsteriskSecondCentimeterPower2, TheNumberTenForArbitraryPowers_2: UcumCommon_TheNumberTenForArbitraryPowers_2, @@ -145256,7 +145648,8 @@ export const UcumCommon = { MilligramTotQuoteVolume: UcumCommon_MilligramTotQuoteVolume, MilligramVolume: UcumCommon_MilligramVolume, MilligramPerDay: UcumCommon_MilligramPerDay, - MilligramDay173AsteriskTheNumberTenForArbitraryPowersPower2AsteriskMeterPower2: UcumCommon_MilligramDay173AsteriskTheNumberTenForArbitraryPowersPower2AsteriskMeterPower2, + MilligramDay173AsteriskTheNumberTenForArbitraryPowersPower2AsteriskMeterPower2: + UcumCommon_MilligramDay173AsteriskTheNumberTenForArbitraryPowersPower2AsteriskMeterPower2, MilligramPerDayPer173SquareMeter: UcumCommon_MilligramPerDayPer173SquareMeter, MilligramPerDeciliter: UcumCommon_MilligramPerDeciliter, MilligramPerDeciliterOfRedBloodCells: UcumCommon_MilligramPerDeciliterOfRedBloodCells, @@ -145322,7 +145715,8 @@ export const UcumCommon = { MilliliterPerSquareMeter: UcumCommon_MilliliterPerSquareMeter, MilliliterPerMillibar: UcumCommon_MilliliterPerMillibar, MilliliterPerMinute: UcumCommon_MilliliterPerMinute, - MilliliterMinute173AsteriskTheNumberTenForArbitraryPowersPower2AsteriskMeterPower2: UcumCommon_MilliliterMinute173AsteriskTheNumberTenForArbitraryPowersPower2AsteriskMeterPower2, + MilliliterMinute173AsteriskTheNumberTenForArbitraryPowersPower2AsteriskMeterPower2: + UcumCommon_MilliliterMinute173AsteriskTheNumberTenForArbitraryPowersPower2AsteriskMeterPower2, MilliliterPerMinutePer173SquareMeter: UcumCommon_MilliliterPerMinutePer173SquareMeter, MilliliterPerMinutePerSquareMeter: UcumCommon_MilliliterPerMinutePerSquareMeter, MilliliterPerMillimeter: UcumCommon_MilliliterPerMillimeter, @@ -148267,7 +148661,8 @@ export const V20003 = { PMUACKGrantCertificatePermission: v2_0003_PMUACKGrantCertificatePermission, PMUACKRevokeCertificatePermission: v2_0003_PMUACKRevokeCertificatePermission, CRMRegisterAPatientOnAClinicalTrial: v2_0003_CRMRegisterAPatientOnAClinicalTrial, - CRMCancelAPatientRegistrationOnClinicalTrialForClericalMistakesOnly: v2_0003_CRMCancelAPatientRegistrationOnClinicalTrialForClericalMistakesOnly, + CRMCancelAPatientRegistrationOnClinicalTrialForClericalMistakesOnly: + v2_0003_CRMCancelAPatientRegistrationOnClinicalTrialForClericalMistakesOnly, CRMCorrectUpdateRegistrationInformation: v2_0003_CRMCorrectUpdateRegistrationInformation, CRMPatientHasGoneOffAClinicalTrial: v2_0003_CRMPatientHasGoneOffAClinicalTrial, CRMPatientEntersPhaseOfClinicalTrial: v2_0003_CRMPatientEntersPhaseOfClinicalTrial, @@ -148373,9 +148768,12 @@ export const V20003 = { BTSBloodProductTransfusionDisposition: v2_0003_BTSBloodProductTransfusionDisposition, BRTBloodProductTransfusionDispositionAcknowledgment: v2_0003_BRTBloodProductTransfusionDispositionAcknowledgment, OMLLaboratoryOrderForMultipleOrdersRelatedToASingleSpecimen: v2_0003_OMLLaboratoryOrderForMultipleOrdersRelatedToASingleSpecimen, - ORLLaboratoryOrderResponseMessageToAMultipleOrderRelatedToSingleSpecimenOML: v2_0003_ORLLaboratoryOrderResponseMessageToAMultipleOrderRelatedToSingleSpecimenOML, - OMLLaboratoryOrderForMultipleOrdersRelatedToASingleContainerOfASpecimen: v2_0003_OMLLaboratoryOrderForMultipleOrdersRelatedToASingleContainerOfASpecimen, - ORLLaboratoryOrderResponseMessageToASingleContainerOfASpecimenOML: v2_0003_ORLLaboratoryOrderResponseMessageToASingleContainerOfASpecimenOML, + ORLLaboratoryOrderResponseMessageToAMultipleOrderRelatedToSingleSpecimenOML: + v2_0003_ORLLaboratoryOrderResponseMessageToAMultipleOrderRelatedToSingleSpecimenOML, + OMLLaboratoryOrderForMultipleOrdersRelatedToASingleContainerOfASpecimen: + v2_0003_OMLLaboratoryOrderForMultipleOrdersRelatedToASingleContainerOfASpecimen, + ORLLaboratoryOrderResponseMessageToASingleContainerOfASpecimenOML: + v2_0003_ORLLaboratoryOrderResponseMessageToASingleContainerOfASpecimenOML, OPLPopulationLocationBasedLaboratoryOrderMessage: v2_0003_OPLPopulationLocationBasedLaboratoryOrderMessage, OPRPopulationLocationBasedLaboratoryOrderAcknowledgmentMessage: v2_0003_OPRPopulationLocationBasedLaboratoryOrderAcknowledgmentMessage, SpecimenShipmentCentricLaboratoryOrder: v2_0003_SpecimenShipmentCentricLaboratoryOrder, @@ -148393,9 +148791,12 @@ export const V20003 = { OSUOrderStatusUpdate: v2_0003_OSUOrderStatusUpdate, OSUOrderStatusUpdateAcknowledgement: v2_0003_OSUOrderStatusUpdateAcknowledgement, ORLGeneralLaboratoryOrderAcknowledgmentMessagePatientOptional: v2_0003_ORLGeneralLaboratoryOrderAcknowledgmentMessagePatientOptional, - ORLLaboratoryOrderAcknowledgmentMessageMultipleOrderPerSpecimenPatientOptional: v2_0003_ORLLaboratoryOrderAcknowledgmentMessageMultipleOrderPerSpecimenPatientOptional, - ORLLaboratoryOrderAcknowledgmentMessageMultipleOrderPerContainerOfSpecimenPatientOptional: v2_0003_ORLLaboratoryOrderAcknowledgmentMessageMultipleOrderPerContainerOfSpecimenPatientOptional, - ORLSpecimenShipmentCentricLaboratoryOrderAcknowledgmentMessagePatientOptional: v2_0003_ORLSpecimenShipmentCentricLaboratoryOrderAcknowledgmentMessagePatientOptional, + ORLLaboratoryOrderAcknowledgmentMessageMultipleOrderPerSpecimenPatientOptional: + v2_0003_ORLLaboratoryOrderAcknowledgmentMessageMultipleOrderPerSpecimenPatientOptional, + ORLLaboratoryOrderAcknowledgmentMessageMultipleOrderPerContainerOfSpecimenPatientOptional: + v2_0003_ORLLaboratoryOrderAcknowledgmentMessageMultipleOrderPerContainerOfSpecimenPatientOptional, + ORLSpecimenShipmentCentricLaboratoryOrderAcknowledgmentMessagePatientOptional: + v2_0003_ORLSpecimenShipmentCentricLaboratoryOrderAcknowledgmentMessagePatientOptional, OMQGeneralOrderMessageWithDocumentPayload: v2_0003_OMQGeneralOrderMessageWithDocumentPayload, ORXGeneralOrderMessageWithDocumentPayloadAcknowledgementMessage: v2_0003_ORXGeneralOrderMessageWithDocumentPayloadAcknowledgementMessage, OMLLaboratoryOrderForAdditionalWorkUp: v2_0003_OMLLaboratoryOrderForAdditionalWorkUp, @@ -148440,9 +148841,11 @@ export const V20003 = { OULUnsolicitedSpecimenOrientedObservationMessage: v2_0003_OULUnsolicitedSpecimenOrientedObservationMessage, OULUnsolicitedSpecimenContainerOrientedObservationMessage: v2_0003_OULUnsolicitedSpecimenContainerOrientedObservationMessage, OULUnsolicitedOrderOrientedObservationMessage: v2_0003_OULUnsolicitedOrderOrientedObservationMessage, - OPUUnsolicitedPopulationLocationBasedLaboratoryObservationMessage: v2_0003_OPUUnsolicitedPopulationLocationBasedLaboratoryObservationMessage, + OPUUnsolicitedPopulationLocationBasedLaboratoryObservationMessage: + v2_0003_OPUUnsolicitedPopulationLocationBasedLaboratoryObservationMessage, OSMUnsolicitedSpecimenShipmentManifestMessage: v2_0003_OSMUnsolicitedSpecimenShipmentManifestMessage, - ORUUnsolicitedPointOfCareObservationMessageWithoutExistingOrderPlaceAnOrder: v2_0003_ORUUnsolicitedPointOfCareObservationMessageWithoutExistingOrderPlaceAnOrder, + ORUUnsolicitedPointOfCareObservationMessageWithoutExistingOrderPlaceAnOrder: + v2_0003_ORUUnsolicitedPointOfCareObservationMessageWithoutExistingOrderPlaceAnOrder, ORUUnsolicitedNewPointOfCareObservationMessageSearchForAnOrder: v2_0003_ORUUnsolicitedNewPointOfCareObservationMessageSearchForAnOrder, ORUUnsolicitedPreOrderedPointOfCareObservation: v2_0003_ORUUnsolicitedPreOrderedPointOfCareObservation, ORAObservationReportAcknowledgement: v2_0003_ORAObservationReportAcknowledgement, @@ -148470,10 +148873,12 @@ export const V20003 = { SIUACKNotificationOfAdditionOfServiceResourceOnAppointment: v2_0003_SIUACKNotificationOfAdditionOfServiceResourceOnAppointment, SIUACKNotificationOfModificationOfServiceResourceOnAppointment: v2_0003_SIUACKNotificationOfModificationOfServiceResourceOnAppointment, SIUACKNotificationOfCancellationOfServiceResourceOnAppointment: v2_0003_SIUACKNotificationOfCancellationOfServiceResourceOnAppointment, - SIUACKNotificationOfDiscontinuationOfServiceResourceOnAppointment: v2_0003_SIUACKNotificationOfDiscontinuationOfServiceResourceOnAppointment, + SIUACKNotificationOfDiscontinuationOfServiceResourceOnAppointment: + v2_0003_SIUACKNotificationOfDiscontinuationOfServiceResourceOnAppointment, SIUACKNotificationOfDeletionOfServiceResourceOnAppointment: v2_0003_SIUACKNotificationOfDeletionOfServiceResourceOnAppointment, SIUACKNotificationOfBlockedScheduleTimeSlotS: v2_0003_SIUACKNotificationOfBlockedScheduleTimeSlotS, - SIUACKNotificationOfOpenedQuotationUnblockedQuotationScheduleTimeSlotS: v2_0003_SIUACKNotificationOfOpenedQuotationUnblockedQuotationScheduleTimeSlotS, + SIUACKNotificationOfOpenedQuotationUnblockedQuotationScheduleTimeSlotS: + v2_0003_SIUACKNotificationOfOpenedQuotationUnblockedQuotationScheduleTimeSlotS, SIUACKNotificationThatPatientDidNotShowUpForScheduleAppointment: v2_0003_SIUACKNotificationThatPatientDidNotShowUpForScheduleAppointment, SIUACKBroadcastNotificationOfScheduledAppointments: v2_0003_SIUACKBroadcastNotificationOfScheduledAppointments, SLRSLSRequestNewSterilizationLot: v2_0003_SLRSLSRequestNewSterilizationLot, @@ -148713,9 +149118,12 @@ const v2_0008_EnhancedModeAcceptAcknowledgmentCommitReject: Coding = { * FHIR Value set/code system definition for HL7 v2 table 0008 ( ACKNOWLEDGMENT CODE) */ export const V20008 = { - OriginalModeApplicationAcceptEnhancedModeApplicationAcknowledgmentAccept: v2_0008_OriginalModeApplicationAcceptEnhancedModeApplicationAcknowledgmentAccept, - OriginalModeApplicationErrorEnhancedModeApplicationAcknowledgmentError: v2_0008_OriginalModeApplicationErrorEnhancedModeApplicationAcknowledgmentError, - OriginalModeApplicationRejectEnhancedModeApplicationAcknowledgmentReject: v2_0008_OriginalModeApplicationRejectEnhancedModeApplicationAcknowledgmentReject, + OriginalModeApplicationAcceptEnhancedModeApplicationAcknowledgmentAccept: + v2_0008_OriginalModeApplicationAcceptEnhancedModeApplicationAcknowledgmentAccept, + OriginalModeApplicationErrorEnhancedModeApplicationAcknowledgmentError: + v2_0008_OriginalModeApplicationErrorEnhancedModeApplicationAcknowledgmentError, + OriginalModeApplicationRejectEnhancedModeApplicationAcknowledgmentReject: + v2_0008_OriginalModeApplicationRejectEnhancedModeApplicationAcknowledgmentReject, EnhancedModeAcceptAcknowledgmentCommitAccept: v2_0008_EnhancedModeAcceptAcknowledgmentCommitAccept, EnhancedModeAcceptAcknowledgmentCommitError: v2_0008_EnhancedModeAcceptAcknowledgmentCommitError, EnhancedModeAcceptAcknowledgmentCommitReject: v2_0008_EnhancedModeAcceptAcknowledgmentCommitReject, @@ -150382,12 +150790,13 @@ export const V20083 = { OutlierCost: v2_0083_OutlierCost, OutlierDays: v2_0083_OutlierDays, }; -const v2_0085_AmendedBasedOnAdjustmentsProvidedByThePlacerPhysicianRegardingPatientDemographicsSuchAsAgeAndOrGenderOrOtherPatientSpecificInformation: Coding = { - code: 'A', - display: - 'Amended based on adjustments provided by the Placer (Physician) regarding patient demographics (such as age and/or gender or other patient specific information', - system: 'http://terminology.hl7.org/CodeSystem/v2-0085', -}; +const v2_0085_AmendedBasedOnAdjustmentsProvidedByThePlacerPhysicianRegardingPatientDemographicsSuchAsAgeAndOrGenderOrOtherPatientSpecificInformation: Coding = + { + code: 'A', + display: + 'Amended based on adjustments provided by the Placer (Physician) regarding patient demographics (such as age and/or gender or other patient specific information', + system: 'http://terminology.hl7.org/CodeSystem/v2-0085', + }; const v2_0085_AppendedReportFinalResultsReviewedAndFurtherInformationProvidedForClarityWithoutChangeToTheOriginalResultValues: Coding = { code: 'B', display: @@ -150414,12 +150823,13 @@ const v2_0085_SpecimenInLabResultsPending: Coding = { display: 'Specimen in lab; results pending', system: 'http://terminology.hl7.org/CodeSystem/v2-0085', }; -const v2_0085_NotAskedUsedToAffirmativelyDocumentThatTheObservationIdentifiedInTheOBXWasNotSoughtWhenTheUniversalServiceIDInOBR4ImpliesThatItWouldBeSought: Coding = { - code: 'N', - display: - 'Not asked; used to affirmatively document that the observation identified in the OBX was not sought when the universal service ID in OBR-4 implies that it would be sought.', - system: 'http://terminology.hl7.org/CodeSystem/v2-0085', -}; +const v2_0085_NotAskedUsedToAffirmativelyDocumentThatTheObservationIdentifiedInTheOBXWasNotSoughtWhenTheUniversalServiceIDInOBR4ImpliesThatItWouldBeSought: Coding = + { + code: 'N', + display: + 'Not asked; used to affirmatively document that the observation identified in the OBX was not sought when the universal service ID in OBR-4 implies that it would be sought.', + system: 'http://terminology.hl7.org/CodeSystem/v2-0085', + }; const v2_0085_OrderDetailDescriptionOnlyNoResult: Coding = { code: 'O', display: 'Order detail description only (no result)', @@ -150440,12 +150850,13 @@ const v2_0085_PartialResultsDeprecatedRetainedOnlyForBackwardCompatibilityAsOfV2 display: 'Partial results. Deprecated. Retained only for backward compatibility as of V2.6.', system: 'http://terminology.hl7.org/CodeSystem/v2-0085', }; -const v2_0085_ResultsStatusChangeToFinalWithoutRetransmittingResultsAlreadySentAsQuotePreliminaryQuoteEGRadiologyChangesStatusFromPreliminaryToFinal: Coding = { - code: 'U', - display: - "Results status change to final without retransmitting results already sent as 'preliminary.' E.g., radiology changes status from preliminary to final", - system: 'http://terminology.hl7.org/CodeSystem/v2-0085', -}; +const v2_0085_ResultsStatusChangeToFinalWithoutRetransmittingResultsAlreadySentAsQuotePreliminaryQuoteEGRadiologyChangesStatusFromPreliminaryToFinal: Coding = + { + code: 'U', + display: + "Results status change to final without retransmitting results already sent as 'preliminary.' E.g., radiology changes status from preliminary to final", + system: 'http://terminology.hl7.org/CodeSystem/v2-0085', + }; const v2_0085_VerifiedFinalResultsReviewedAndConfirmedToBeCorrectNoChangeToResultValueNormalRangeOrAbnormalFlag: Coding = { code: 'V', display: 'Verified - Final results reviewed and confirmed to be correct, no change to result value, normal range or abnormal flag', @@ -150465,19 +150876,25 @@ const v2_0085_ResultsCannotBeObtainedForThisObservation: Coding = { * FHIR Value set/code system definition for HL7 v2 table 0085 ( OBSERVATION RESULT STATUS) */ export const V20085 = { - AmendedBasedOnAdjustmentsProvidedByThePlacerPhysicianRegardingPatientDemographicsSuchAsAgeAndOrGenderOrOtherPatientSpecificInformation: v2_0085_AmendedBasedOnAdjustmentsProvidedByThePlacerPhysicianRegardingPatientDemographicsSuchAsAgeAndOrGenderOrOtherPatientSpecificInformation, - AppendedReportFinalResultsReviewedAndFurtherInformationProvidedForClarityWithoutChangeToTheOriginalResultValues: v2_0085_AppendedReportFinalResultsReviewedAndFurtherInformationProvidedForClarityWithoutChangeToTheOriginalResultValues, + AmendedBasedOnAdjustmentsProvidedByThePlacerPhysicianRegardingPatientDemographicsSuchAsAgeAndOrGenderOrOtherPatientSpecificInformation: + v2_0085_AmendedBasedOnAdjustmentsProvidedByThePlacerPhysicianRegardingPatientDemographicsSuchAsAgeAndOrGenderOrOtherPatientSpecificInformation, + AppendedReportFinalResultsReviewedAndFurtherInformationProvidedForClarityWithoutChangeToTheOriginalResultValues: + v2_0085_AppendedReportFinalResultsReviewedAndFurtherInformationProvidedForClarityWithoutChangeToTheOriginalResultValues, RecordComingOverIsACorrectionAndThusReplacesAFinalResult: v2_0085_RecordComingOverIsACorrectionAndThusReplacesAFinalResult, DeletesTheOBXRecord: v2_0085_DeletesTheOBXRecord, FinalResults: v2_0085_FinalResults, SpecimenInLabResultsPending: v2_0085_SpecimenInLabResultsPending, - NotAskedUsedToAffirmativelyDocumentThatTheObservationIdentifiedInTheOBXWasNotSoughtWhenTheUniversalServiceIDInOBR4ImpliesThatItWouldBeSought: v2_0085_NotAskedUsedToAffirmativelyDocumentThatTheObservationIdentifiedInTheOBXWasNotSoughtWhenTheUniversalServiceIDInOBR4ImpliesThatItWouldBeSought, + NotAskedUsedToAffirmativelyDocumentThatTheObservationIdentifiedInTheOBXWasNotSoughtWhenTheUniversalServiceIDInOBR4ImpliesThatItWouldBeSought: + v2_0085_NotAskedUsedToAffirmativelyDocumentThatTheObservationIdentifiedInTheOBXWasNotSoughtWhenTheUniversalServiceIDInOBR4ImpliesThatItWouldBeSought, OrderDetailDescriptionOnlyNoResult: v2_0085_OrderDetailDescriptionOnlyNoResult, PreliminaryResults: v2_0085_PreliminaryResults, ResultsEnteredNotVerified: v2_0085_ResultsEnteredNotVerified, - PartialResultsDeprecatedRetainedOnlyForBackwardCompatibilityAsOfV26: v2_0085_PartialResultsDeprecatedRetainedOnlyForBackwardCompatibilityAsOfV26, - ResultsStatusChangeToFinalWithoutRetransmittingResultsAlreadySentAsQuotePreliminaryQuoteEGRadiologyChangesStatusFromPreliminaryToFinal: v2_0085_ResultsStatusChangeToFinalWithoutRetransmittingResultsAlreadySentAsQuotePreliminaryQuoteEGRadiologyChangesStatusFromPreliminaryToFinal, - VerifiedFinalResultsReviewedAndConfirmedToBeCorrectNoChangeToResultValueNormalRangeOrAbnormalFlag: v2_0085_VerifiedFinalResultsReviewedAndConfirmedToBeCorrectNoChangeToResultValueNormalRangeOrAbnormalFlag, + PartialResultsDeprecatedRetainedOnlyForBackwardCompatibilityAsOfV26: + v2_0085_PartialResultsDeprecatedRetainedOnlyForBackwardCompatibilityAsOfV26, + ResultsStatusChangeToFinalWithoutRetransmittingResultsAlreadySentAsQuotePreliminaryQuoteEGRadiologyChangesStatusFromPreliminaryToFinal: + v2_0085_ResultsStatusChangeToFinalWithoutRetransmittingResultsAlreadySentAsQuotePreliminaryQuoteEGRadiologyChangesStatusFromPreliminaryToFinal, + VerifiedFinalResultsReviewedAndConfirmedToBeCorrectNoChangeToResultValueNormalRangeOrAbnormalFlag: + v2_0085_VerifiedFinalResultsReviewedAndConfirmedToBeCorrectNoChangeToResultValueNormalRangeOrAbnormalFlag, PostOriginalAsWrongEGTransmittedForWrongPatient: v2_0085_PostOriginalAsWrongEGTransmittedForWrongPatient, ResultsCannotBeObtainedForThisObservation: v2_0085_ResultsCannotBeObtainedForThisObservation, }; @@ -153493,33 +153910,40 @@ const v2_0174_SingleObservationCalculatedViaARuleOrFormulaFromOtherIndependentOb 'Single observation calculated via a rule or formula from other independent observations (e.g., Alveolar-arterial ratio, cardiac output)', system: 'http://terminology.hl7.org/CodeSystem/v2-0174', }; -const v2_0174_FunctionalProcedureThatMayConsistOfOneOrMoreInterrelatedMeasuresEGGlucoseToleranceTestCreatinineClearanceUsuallyDoneAtDifferentTimesAndOrOnDifferentSpecimens: Coding = { - code: 'F', - display: - 'Functional procedure that may consist of one or more interrelated measures (e.g., glucose tolerance test, creatinine clearance), usually done at different times and/or on different specimens', - system: 'http://terminology.hl7.org/CodeSystem/v2-0174', -}; -const v2_0174_ProfileOrBatteryConsistingOfManyIndependentAtomicObservationsEGSMA12ElectrolytesUsuallyDoneAtOneInstrumentOnOneSpecimen: Coding = { - code: 'P', - display: - 'Profile or battery consisting of many independent atomic observations (e.g., SMA12, electrolytes), usually done at one instrument on one specimen', - system: 'http://terminology.hl7.org/CodeSystem/v2-0174', -}; -const v2_0174_SupersetASetOfBatteriesOrProceduresOrderedUnderASingleCodeUnitButProcessedAsSeparateBatteriesEGRoutinesEqualsCBCUAElectrolytesLessThanPGreaterThanThisSetIndicatesThatTheCodeBeingDescribedIsUsedToOrderMultipleServiceTestObservationB: Coding = { - code: 'S', - display: - 'Superset-a set of batteries or procedures ordered under a single code unit but processed as separate batteries (e.g., routines = CBC, UA, electrolytes)

This set indicates that the code being described is used to order multiple service/test/observation b', - system: 'http://terminology.hl7.org/CodeSystem/v2-0174', -}; +const v2_0174_FunctionalProcedureThatMayConsistOfOneOrMoreInterrelatedMeasuresEGGlucoseToleranceTestCreatinineClearanceUsuallyDoneAtDifferentTimesAndOrOnDifferentSpecimens: Coding = + { + code: 'F', + display: + 'Functional procedure that may consist of one or more interrelated measures (e.g., glucose tolerance test, creatinine clearance), usually done at different times and/or on different specimens', + system: 'http://terminology.hl7.org/CodeSystem/v2-0174', + }; +const v2_0174_ProfileOrBatteryConsistingOfManyIndependentAtomicObservationsEGSMA12ElectrolytesUsuallyDoneAtOneInstrumentOnOneSpecimen: Coding = + { + code: 'P', + display: + 'Profile or battery consisting of many independent atomic observations (e.g., SMA12, electrolytes), usually done at one instrument on one specimen', + system: 'http://terminology.hl7.org/CodeSystem/v2-0174', + }; +const v2_0174_SupersetASetOfBatteriesOrProceduresOrderedUnderASingleCodeUnitButProcessedAsSeparateBatteriesEGRoutinesEqualsCBCUAElectrolytesLessThanPGreaterThanThisSetIndicatesThatTheCodeBeingDescribedIsUsedToOrderMultipleServiceTestObservationB: Coding = + { + code: 'S', + display: + 'Superset-a set of batteries or procedures ordered under a single code unit but processed as separate batteries (e.g., routines = CBC, UA, electrolytes)

This set indicates that the code being described is used to order multiple service/test/observation b', + system: 'http://terminology.hl7.org/CodeSystem/v2-0174', + }; /** * FHIR Value set/code system definition for HL7 v2 table 0174 ( NATURE OF TEST/OBSERVATION) */ export const V20174 = { AtomicServiceTestObservationTestCodeOrTreatmentCode: v2_0174_AtomicServiceTestObservationTestCodeOrTreatmentCode, - SingleObservationCalculatedViaARuleOrFormulaFromOtherIndependentObservationsEGAlveolarArterialRatioCardiacOutput: v2_0174_SingleObservationCalculatedViaARuleOrFormulaFromOtherIndependentObservationsEGAlveolarArterialRatioCardiacOutput, - FunctionalProcedureThatMayConsistOfOneOrMoreInterrelatedMeasuresEGGlucoseToleranceTestCreatinineClearanceUsuallyDoneAtDifferentTimesAndOrOnDifferentSpecimens: v2_0174_FunctionalProcedureThatMayConsistOfOneOrMoreInterrelatedMeasuresEGGlucoseToleranceTestCreatinineClearanceUsuallyDoneAtDifferentTimesAndOrOnDifferentSpecimens, - ProfileOrBatteryConsistingOfManyIndependentAtomicObservationsEGSMA12ElectrolytesUsuallyDoneAtOneInstrumentOnOneSpecimen: v2_0174_ProfileOrBatteryConsistingOfManyIndependentAtomicObservationsEGSMA12ElectrolytesUsuallyDoneAtOneInstrumentOnOneSpecimen, - SupersetASetOfBatteriesOrProceduresOrderedUnderASingleCodeUnitButProcessedAsSeparateBatteriesEGRoutinesEqualsCBCUAElectrolytesLessThanPGreaterThanThisSetIndicatesThatTheCodeBeingDescribedIsUsedToOrderMultipleServiceTestObservationB: v2_0174_SupersetASetOfBatteriesOrProceduresOrderedUnderASingleCodeUnitButProcessedAsSeparateBatteriesEGRoutinesEqualsCBCUAElectrolytesLessThanPGreaterThanThisSetIndicatesThatTheCodeBeingDescribedIsUsedToOrderMultipleServiceTestObservationB, + SingleObservationCalculatedViaARuleOrFormulaFromOtherIndependentObservationsEGAlveolarArterialRatioCardiacOutput: + v2_0174_SingleObservationCalculatedViaARuleOrFormulaFromOtherIndependentObservationsEGAlveolarArterialRatioCardiacOutput, + FunctionalProcedureThatMayConsistOfOneOrMoreInterrelatedMeasuresEGGlucoseToleranceTestCreatinineClearanceUsuallyDoneAtDifferentTimesAndOrOnDifferentSpecimens: + v2_0174_FunctionalProcedureThatMayConsistOfOneOrMoreInterrelatedMeasuresEGGlucoseToleranceTestCreatinineClearanceUsuallyDoneAtDifferentTimesAndOrOnDifferentSpecimens, + ProfileOrBatteryConsistingOfManyIndependentAtomicObservationsEGSMA12ElectrolytesUsuallyDoneAtOneInstrumentOnOneSpecimen: + v2_0174_ProfileOrBatteryConsistingOfManyIndependentAtomicObservationsEGSMA12ElectrolytesUsuallyDoneAtOneInstrumentOnOneSpecimen, + SupersetASetOfBatteriesOrProceduresOrderedUnderASingleCodeUnitButProcessedAsSeparateBatteriesEGRoutinesEqualsCBCUAElectrolytesLessThanPGreaterThanThisSetIndicatesThatTheCodeBeingDescribedIsUsedToOrderMultipleServiceTestObservationB: + v2_0174_SupersetASetOfBatteriesOrProceduresOrderedUnderASingleCodeUnitButProcessedAsSeparateBatteriesEGRoutinesEqualsCBCUAElectrolytesLessThanPGreaterThanThisSetIndicatesThatTheCodeBeingDescribedIsUsedToOrderMultipleServiceTestObservationB, }; const v2_0175_ChargeDescriptionMasterFile: Coding = { code: 'CDM', @@ -153709,12 +154133,13 @@ const v2_0179_AlwaysAllMFASegmentsWhetherDenotingErrorsOrNotMustBeReturnedViaThe display: 'Always. All MFA segments (whether denoting errors or not) must be returned via the application-level acknowledgment message', system: 'http://terminology.hl7.org/CodeSystem/v2-0179', }; -const v2_0179_ErrorRejectConditionsOnlyOnlyMFASegmentsDenotingErrorsMustBeReturnedViaTheApplicationLevelAcknowledgmentForThisMessage: Coding = { - code: 'ER', - display: - 'Error/Reject conditions only. Only MFA segments denoting errors must be returned via the application-level acknowledgment for this message', - system: 'http://terminology.hl7.org/CodeSystem/v2-0179', -}; +const v2_0179_ErrorRejectConditionsOnlyOnlyMFASegmentsDenotingErrorsMustBeReturnedViaTheApplicationLevelAcknowledgmentForThisMessage: Coding = + { + code: 'ER', + display: + 'Error/Reject conditions only. Only MFA segments denoting errors must be returned via the application-level acknowledgment for this message', + system: 'http://terminology.hl7.org/CodeSystem/v2-0179', + }; const v2_0179_NeverNoApplicationLevelResponseNeeded: Coding = { code: 'NE', display: 'Never. No application-level response needed', @@ -153729,10 +154154,13 @@ const v2_0179_SuccessOnlyMFASegmentsDenotingSuccessMustBeReturnedViaTheApplicati * FHIR Value set/code system definition for HL7 v2 table 0179 ( Response Level) */ export const V20179 = { - AlwaysAllMFASegmentsWhetherDenotingErrorsOrNotMustBeReturnedViaTheApplicationLevelAcknowledgmentMessage: v2_0179_AlwaysAllMFASegmentsWhetherDenotingErrorsOrNotMustBeReturnedViaTheApplicationLevelAcknowledgmentMessage, - ErrorRejectConditionsOnlyOnlyMFASegmentsDenotingErrorsMustBeReturnedViaTheApplicationLevelAcknowledgmentForThisMessage: v2_0179_ErrorRejectConditionsOnlyOnlyMFASegmentsDenotingErrorsMustBeReturnedViaTheApplicationLevelAcknowledgmentForThisMessage, + AlwaysAllMFASegmentsWhetherDenotingErrorsOrNotMustBeReturnedViaTheApplicationLevelAcknowledgmentMessage: + v2_0179_AlwaysAllMFASegmentsWhetherDenotingErrorsOrNotMustBeReturnedViaTheApplicationLevelAcknowledgmentMessage, + ErrorRejectConditionsOnlyOnlyMFASegmentsDenotingErrorsMustBeReturnedViaTheApplicationLevelAcknowledgmentForThisMessage: + v2_0179_ErrorRejectConditionsOnlyOnlyMFASegmentsDenotingErrorsMustBeReturnedViaTheApplicationLevelAcknowledgmentForThisMessage, NeverNoApplicationLevelResponseNeeded: v2_0179_NeverNoApplicationLevelResponseNeeded, - SuccessOnlyMFASegmentsDenotingSuccessMustBeReturnedViaTheApplicationLevelAcknowledgmentForThisMessage: v2_0179_SuccessOnlyMFASegmentsDenotingSuccessMustBeReturnedViaTheApplicationLevelAcknowledgmentForThisMessage, + SuccessOnlyMFASegmentsDenotingSuccessMustBeReturnedViaTheApplicationLevelAcknowledgmentForThisMessage: + v2_0179_SuccessOnlyMFASegmentsDenotingSuccessMustBeReturnedViaTheApplicationLevelAcknowledgmentForThisMessage, }; const v2_0180_ReactivateDeactivatedRecord: Coding = { code: 'MAC', @@ -153765,7 +154193,8 @@ const v2_0180_UpdateRecordForMasterFile: Coding = { export const V20180 = { ReactivateDeactivatedRecord: v2_0180_ReactivateDeactivatedRecord, AddRecordToMasterFile: v2_0180_AddRecordToMasterFile, - DeactivateDiscontinueUsingRecordInMasterFileButDoNotDeleteFromDatabase: v2_0180_DeactivateDiscontinueUsingRecordInMasterFileButDoNotDeleteFromDatabase, + DeactivateDiscontinueUsingRecordInMasterFileButDoNotDeleteFromDatabase: + v2_0180_DeactivateDiscontinueUsingRecordInMasterFileButDoNotDeleteFromDatabase, DeleteRecordFromMasterFile: v2_0180_DeleteRecordFromMasterFile, UpdateRecordForMasterFile: v2_0180_UpdateRecordForMasterFile, }; @@ -153949,12 +154378,13 @@ const v2_0190_Permanent: Coding = { display: 'Permanent', system: 'http://terminology.hl7.org/CodeSystem/v2-0190', }; -const v2_0190_RegistryHomeRefersToTheInformationSystemTypicallyManagedByAPublicHealthAgencyThatStoresPatientInformationSuchAsImmunizationHistoriesOrCancerDataRegardlessOfWhereThePatientObtainsServices: Coding = { - code: 'RH', - display: - 'Registry home. Refers to the information system, typically managed by a public health agency, that stores patient information such as immunization histories or cancer data, regardless of where the patient obtains services.', - system: 'http://terminology.hl7.org/CodeSystem/v2-0190', -}; +const v2_0190_RegistryHomeRefersToTheInformationSystemTypicallyManagedByAPublicHealthAgencyThatStoresPatientInformationSuchAsImmunizationHistoriesOrCancerDataRegardlessOfWhereThePatientObtainsServices: Coding = + { + code: 'RH', + display: + 'Registry home. Refers to the information system, typically managed by a public health agency, that stores patient information such as immunization histories or cancer data, regardless of where the patient obtains services.', + system: 'http://terminology.hl7.org/CodeSystem/v2-0190', + }; const v2_0190_ServiceLocation: Coding = { code: 'S', display: 'Service Location', @@ -153992,7 +154422,8 @@ export const V20190 = { BirthNeeBirthAddressNotOtherwiseSpecified: v2_0190_BirthNeeBirthAddressNotOtherwiseSpecified, OfficeBusiness: v2_0190_OfficeBusiness, Permanent: v2_0190_Permanent, - RegistryHomeRefersToTheInformationSystemTypicallyManagedByAPublicHealthAgencyThatStoresPatientInformationSuchAsImmunizationHistoriesOrCancerDataRegardlessOfWhereThePatientObtainsServices: v2_0190_RegistryHomeRefersToTheInformationSystemTypicallyManagedByAPublicHealthAgencyThatStoresPatientInformationSuchAsImmunizationHistoriesOrCancerDataRegardlessOfWhereThePatientObtainsServices, + RegistryHomeRefersToTheInformationSystemTypicallyManagedByAPublicHealthAgencyThatStoresPatientInformationSuchAsImmunizationHistoriesOrCancerDataRegardlessOfWhereThePatientObtainsServices: + v2_0190_RegistryHomeRefersToTheInformationSystemTypicallyManagedByAPublicHealthAgencyThatStoresPatientInformationSuchAsImmunizationHistoriesOrCancerDataRegardlessOfWhereThePatientObtainsServices, ServiceLocation: v2_0190_ServiceLocation, ShippingAddress: v2_0190_ShippingAddress, TubeAddress: v2_0190_TubeAddress, @@ -154052,7 +154483,8 @@ const v2_0191_MachineReadableTextDocumentHL7V22Only: Coding = { * FHIR Value set/code system definition for HL7 v2 table 0191 ( Type Of Data) */ export const V20191 = { - OtherApplicationDataTypicallyUninterpretedBinaryDataHL7V23AndLater: v2_0191_OtherApplicationDataTypicallyUninterpretedBinaryDataHL7V23AndLater, + OtherApplicationDataTypicallyUninterpretedBinaryDataHL7V23AndLater: + v2_0191_OtherApplicationDataTypicallyUninterpretedBinaryDataHL7V23AndLater, AudioDataHL7V23AndLater: v2_0191_AudioDataHL7V23AndLater, FormattedTextHL7V22Only: v2_0191_FormattedTextHL7V22Only, ImageDataHL7V23AndLater: v2_0191_ImageDataHL7V23AndLater, @@ -154974,7 +155406,8 @@ export const V20203 = { NationalUniqueIndividualIdentifier: v2_0203_NationalUniqueIndividualIdentifier, NationalInsuranceOrganizationIdentifier: v2_0203_NationalInsuranceOrganizationIdentifier, NationalInsurancePayorIdentifierPayor: v2_0203_NationalInsurancePayorIdentifierPayor, - NationalPersonIdentifierWhereTheXxxIsTheISOTable31663CharacterAlphabeticCountryCode: v2_0203_NationalPersonIdentifierWhereTheXxxIsTheISOTable31663CharacterAlphabeticCountryCode, + NationalPersonIdentifierWhereTheXxxIsTheISOTable31663CharacterAlphabeticCountryCode: + v2_0203_NationalPersonIdentifierWhereTheXxxIsTheISOTable31663CharacterAlphabeticCountryCode, NursePractitionerNumber: v2_0203_NursePractitionerNumber, NationalProviderIdentifier: v2_0203_NationalProviderIdentifier, ObservationInstanceIdentifier: v2_0203_ObservationInstanceIdentifier, @@ -155019,7 +155452,8 @@ export const V20203 = { TrainingLicenseNumber: v2_0203_TrainingLicenseNumber, UnspecifiedIdentifier: v2_0203_UnspecifiedIdentifier, UniversalDeviceIdentifier: v2_0203_UniversalDeviceIdentifier, - MedicareCMSFormerlyHCFAQuoteSUniversalPhysicianIdentificationNumbers: v2_0203_MedicareCMSFormerlyHCFAQuoteSUniversalPhysicianIdentificationNumbers, + MedicareCMSFormerlyHCFAQuoteSUniversalPhysicianIdentificationNumbers: + v2_0203_MedicareCMSFormerlyHCFAQuoteSUniversalPhysicianIdentificationNumbers, UniqueSpecimenID: v2_0203_UniqueSpecimenID, VisitNumber: v2_0203_VisitNumber, VisitorPermit: v2_0203_VisitorPermit, @@ -155410,9 +155844,11 @@ export const V20211 = { CodeForTaiwaneseCharacterSetCNS116431992: v2_0211_CodeForTaiwaneseCharacterSetCNS116431992, CodeForChineseCharacterSetGB180302000: v2_0211_CodeForChineseCharacterSetGB180302000, CodeForInformationExchangeOneByteJISX02011976: v2_0211_CodeForInformationExchangeOneByteJISX02011976, - CodeOfTheSupplementaryJapaneseGraphicCharacterSetForInformationInterchangeJISX02121990: v2_0211_CodeOfTheSupplementaryJapaneseGraphicCharacterSetForInformationInterchangeJISX02121990, + CodeOfTheSupplementaryJapaneseGraphicCharacterSetForInformationInterchangeJISX02121990: + v2_0211_CodeOfTheSupplementaryJapaneseGraphicCharacterSetForInformationInterchangeJISX02121990, ASCIIGraphicCharacterSetConsistingOf94Characters: v2_0211_ASCIIGraphicCharacterSetConsistingOf94Characters, - CodeForTheJapaneseGraphicCharacterSetForInformationInterchangeJISX02081990: v2_0211_CodeForTheJapaneseGraphicCharacterSetForInformationInterchangeJISX02081990, + CodeForTheJapaneseGraphicCharacterSetForInformationInterchangeJISX02081990: + v2_0211_CodeForTheJapaneseGraphicCharacterSetForInformationInterchangeJISX02081990, CodeForKoreanCharacterSetKSX1001: v2_0211_CodeForKoreanCharacterSetKSX1001, TheWorldWideCharacterStandardFromISOIEC1064611993: v2_0211_TheWorldWideCharacterStandardFromISOIEC1064611993, UCSTransformationFormat8BitForm: v2_0211_UCSTransformationFormat8BitForm, @@ -155436,7 +155872,8 @@ const v2_0213_MarkedForPurgeUserIsNoLongerAbleToUpdateTheVisit: Coding = { * FHIR Value set/code system definition for HL7 v2 table 0213 ( Purge Status) */ export const V20213 = { - TheVisitIsMarkedForDeletionAndTheUserCannotEnterNewDataAgainstIt: v2_0213_TheVisitIsMarkedForDeletionAndTheUserCannotEnterNewDataAgainstIt, + TheVisitIsMarkedForDeletionAndTheUserCannotEnterNewDataAgainstIt: + v2_0213_TheVisitIsMarkedForDeletionAndTheUserCannotEnterNewDataAgainstIt, TheVisitIsMarkedInactiveAndTheUserCannotEnterNewDataAgainstIt: v2_0213_TheVisitIsMarkedInactiveAndTheUserCannotEnterNewDataAgainstIt, MarkedForPurgeUserIsNoLongerAbleToUpdateTheVisit: v2_0213_MarkedForPurgeUserIsNoLongerAbleToUpdateTheVisit, }; @@ -156211,7 +156648,8 @@ export const V20242 = { HealthCareConsumerPatient: v2_0242_HealthCareConsumerPatient, OtherHealthProfessional: v2_0242_OtherHealthProfessional, LawyerAttorney: v2_0242_LawyerAttorney, - MidLevelProfessionalNurseNursePractitionerPhysicianQuoteSAssistant: v2_0242_MidLevelProfessionalNurseNursePractitionerPhysicianQuoteSAssistant, + MidLevelProfessionalNurseNursePractitionerPhysicianQuoteSAssistant: + v2_0242_MidLevelProfessionalNurseNursePractitionerPhysicianQuoteSAssistant, OtherNonHealthProfessional: v2_0242_OtherNonHealthProfessional, PhysicianOsteopathHomeopath: v2_0242_PhysicianOsteopathHomeopath, Pharmacist: v2_0242_Pharmacist, @@ -157576,9 +158014,11 @@ export const V20256 = { VAL8MinutesPostChallenge: v2_0256_VAL8MinutesPostChallenge, VAL9MinutesPostChallenge: v2_0256_VAL9MinutesPostChallenge, BaselineTimeJustBeforeTheChallenge: v2_0256_BaselineTimeJustBeforeTheChallenge, - TheTimePostDrugDoseAtWhichTheHighestDrugLevelIsReachedDiffersByDrug: v2_0256_TheTimePostDrugDoseAtWhichTheHighestDrugLevelIsReachedDiffersByDrug, + TheTimePostDrugDoseAtWhichTheHighestDrugLevelIsReachedDiffersByDrug: + v2_0256_TheTimePostDrugDoseAtWhichTheHighestDrugLevelIsReachedDiffersByDrug, TimeFromTheChallengeOrDoseNotSpecifiedRandom: v2_0256_TimeFromTheChallengeOrDoseNotSpecifiedRandom, - TheTimePostDrugDoseAtWhichTheLowestDrugLevelIsReachedVariesWithDrug: v2_0256_TheTimePostDrugDoseAtWhichTheLowestDrugLevelIsReachedVariesWithDrug, + TheTimePostDrugDoseAtWhichTheLowestDrugLevelIsReachedVariesWithDrug: + v2_0256_TheTimePostDrugDoseAtWhichTheLowestDrugLevelIsReachedVariesWithDrug, }; const v2_0257_FastingNoCalorieIntakeForThePeriodSpecifiedInTheTimeComponentOfTheTermEG1HPOSTCFST: Coding = { code: 'CFST', @@ -157599,7 +158039,8 @@ const v2_0257_NoFluidIntakeForThePeriodSpecifiedInTheTimeComponentOfTheTerm: Cod * FHIR Value set/code system definition for HL7 v2 table 0257 ( Nature of Challenge) */ export const V20257 = { - FastingNoCalorieIntakeForThePeriodSpecifiedInTheTimeComponentOfTheTermEG1HPOSTCFST: v2_0257_FastingNoCalorieIntakeForThePeriodSpecifiedInTheTimeComponentOfTheTermEG1HPOSTCFST, + FastingNoCalorieIntakeForThePeriodSpecifiedInTheTimeComponentOfTheTermEG1HPOSTCFST: + v2_0257_FastingNoCalorieIntakeForThePeriodSpecifiedInTheTimeComponentOfTheTermEG1HPOSTCFST, ExerciseUndertakenAsChallengeCanBeQuantified: v2_0257_ExerciseUndertakenAsChallengeCanBeQuantified, NoFluidIntakeForThePeriodSpecifiedInTheTimeComponentOfTheTerm: v2_0257_NoFluidIntakeForThePeriodSpecifiedInTheTimeComponentOfTheTerm, }; @@ -158451,9 +158892,11 @@ const v2_0279_SubstitutionOfThisResourceIsAllowed: Coding = { * FHIR Value set/code system definition for HL7 v2 table 0279 ( Allow Substitution Codes) */ export const V20279 = { - ContactThePlacerContactPersonPriorToMakingAnySubstitutionsOfThisResource: v2_0279_ContactThePlacerContactPersonPriorToMakingAnySubstitutionsOfThisResource, + ContactThePlacerContactPersonPriorToMakingAnySubstitutionsOfThisResource: + v2_0279_ContactThePlacerContactPersonPriorToMakingAnySubstitutionsOfThisResource, SubstitutionOfThisResourceIsNotAllowed: v2_0279_SubstitutionOfThisResourceIsNotAllowed, - NotifyThePlacerContactPersonThroughNormalInstitutionalProceduresThatASubstitutionOfThisResourceHasBeenMade: v2_0279_NotifyThePlacerContactPersonThroughNormalInstitutionalProceduresThatASubstitutionOfThisResourceHasBeenMade, + NotifyThePlacerContactPersonThroughNormalInstitutionalProceduresThatASubstitutionOfThisResourceHasBeenMade: + v2_0279_NotifyThePlacerContactPersonThroughNormalInstitutionalProceduresThatASubstitutionOfThisResourceHasBeenMade, SubstitutionOfThisResourceIsAllowed: v2_0279_SubstitutionOfThisResourceIsAllowed, }; const v2_0280_ASAP: Coding = { @@ -158833,15 +159276,24 @@ const v2_0294_AnIndicatorThatWednesdayIsOrIsNotPreferredForTheDayOnWhichTheAppoi * FHIR Value set/code system definition for HL7 v2 table 0294 ( Time Selection Criteria Parameter Class Codes) */ export const V20294 = { - AnIndicatorThatFridayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: v2_0294_AnIndicatorThatFridayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, - AnIndicatorThatMondayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: v2_0294_AnIndicatorThatMondayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, - AnIndicatorThatThereIsAPreferredEndTimeForTheAppointmentRequestServiceOrResource: v2_0294_AnIndicatorThatThereIsAPreferredEndTimeForTheAppointmentRequestServiceOrResource, - AnIndicatorThatThereIsAPreferredStartTimeForTheAppointmentRequestServiceOrResource: v2_0294_AnIndicatorThatThereIsAPreferredStartTimeForTheAppointmentRequestServiceOrResource, - AnIndicatorThatSaturdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: v2_0294_AnIndicatorThatSaturdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, - AnIndicatorThatSundayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: v2_0294_AnIndicatorThatSundayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, - AnIndicatorThatThursdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: v2_0294_AnIndicatorThatThursdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, - AnIndicatorThatTuesdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: v2_0294_AnIndicatorThatTuesdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, - AnIndicatorThatWednesdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: v2_0294_AnIndicatorThatWednesdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, + AnIndicatorThatFridayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: + v2_0294_AnIndicatorThatFridayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, + AnIndicatorThatMondayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: + v2_0294_AnIndicatorThatMondayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, + AnIndicatorThatThereIsAPreferredEndTimeForTheAppointmentRequestServiceOrResource: + v2_0294_AnIndicatorThatThereIsAPreferredEndTimeForTheAppointmentRequestServiceOrResource, + AnIndicatorThatThereIsAPreferredStartTimeForTheAppointmentRequestServiceOrResource: + v2_0294_AnIndicatorThatThereIsAPreferredStartTimeForTheAppointmentRequestServiceOrResource, + AnIndicatorThatSaturdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: + v2_0294_AnIndicatorThatSaturdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, + AnIndicatorThatSundayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: + v2_0294_AnIndicatorThatSundayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, + AnIndicatorThatThursdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: + v2_0294_AnIndicatorThatThursdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, + AnIndicatorThatTuesdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: + v2_0294_AnIndicatorThatTuesdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, + AnIndicatorThatWednesdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur: + v2_0294_AnIndicatorThatWednesdayIsOrIsNotPreferredForTheDayOnWhichTheAppointmentWillOccur, }; const v2_0298_FlatRateApplyTheEntirePriceToThisIntervalDoNotProRateThePriceIfTheFullIntervalHasNotOccurredBeenConsumed: Coding = { code: 'F', @@ -158858,20 +159310,23 @@ const v2_0298_ProRateApplyThisPriceToThisIntervalProRatedByWhateverPortionOfTheI * FHIR Value set/code system definition for HL7 v2 table 0298 ( CP Range Type) */ export const V20298 = { - FlatRateApplyTheEntirePriceToThisIntervalDoNotProRateThePriceIfTheFullIntervalHasNotOccurredBeenConsumed: v2_0298_FlatRateApplyTheEntirePriceToThisIntervalDoNotProRateThePriceIfTheFullIntervalHasNotOccurredBeenConsumed, - ProRateApplyThisPriceToThisIntervalProRatedByWhateverPortionOfTheIntervalHasOccurredBeenConsumed: v2_0298_ProRateApplyThisPriceToThisIntervalProRatedByWhateverPortionOfTheIntervalHasOccurredBeenConsumed, + FlatRateApplyTheEntirePriceToThisIntervalDoNotProRateThePriceIfTheFullIntervalHasNotOccurredBeenConsumed: + v2_0298_FlatRateApplyTheEntirePriceToThisIntervalDoNotProRateThePriceIfTheFullIntervalHasNotOccurredBeenConsumed, + ProRateApplyThisPriceToThisIntervalProRatedByWhateverPortionOfTheIntervalHasOccurredBeenConsumed: + v2_0298_ProRateApplyThisPriceToThisIntervalProRatedByWhateverPortionOfTheIntervalHasOccurredBeenConsumed, }; const v2_0299_NoEncodingDataAreDisplayableASCIICharacters: Coding = { code: 'A', display: 'No encoding - data are displayable ASCII characters.', system: 'http://terminology.hl7.org/CodeSystem/v2-0299', }; -const v2_0299_EncodingAsDefinedByMIMEMultipurposeInternetMailExtensionsStandardRFC1521FourConsecutiveASCIICharactersRepresentThreeConsecutiveOctetsOfBinaryDataBase64UtilizesA65CharacterSubsetOfUSASCIIConsistingOfBothTheUpperAnd: Coding = { - code: 'Base64', - display: - 'Encoding as defined by MIME (Multipurpose Internet Mail Extensions) standard RFC 1521. Four consecutive ASCII characters represent three consecutive octets of binary data. Base64 utilizes a 65-character subset of US-ASCII, consisting of both the upper and', - system: 'http://terminology.hl7.org/CodeSystem/v2-0299', -}; +const v2_0299_EncodingAsDefinedByMIMEMultipurposeInternetMailExtensionsStandardRFC1521FourConsecutiveASCIICharactersRepresentThreeConsecutiveOctetsOfBinaryDataBase64UtilizesA65CharacterSubsetOfUSASCIIConsistingOfBothTheUpperAnd: Coding = + { + code: 'Base64', + display: + 'Encoding as defined by MIME (Multipurpose Internet Mail Extensions) standard RFC 1521. Four consecutive ASCII characters represent three consecutive octets of binary data. Base64 utilizes a 65-character subset of US-ASCII, consisting of both the upper and', + system: 'http://terminology.hl7.org/CodeSystem/v2-0299', + }; const v2_0299_HexadecimalEncodingConsecutivePairsOfHexadecimalDigitsRepresentConsecutiveSingleOctets: Coding = { code: 'Hex', display: 'Hexadecimal encoding - consecutive pairs of hexadecimal digits represent consecutive single octets.', @@ -158882,8 +159337,10 @@ const v2_0299_HexadecimalEncodingConsecutivePairsOfHexadecimalDigitsRepresentCon */ export const V20299 = { NoEncodingDataAreDisplayableASCIICharacters: v2_0299_NoEncodingDataAreDisplayableASCIICharacters, - EncodingAsDefinedByMIMEMultipurposeInternetMailExtensionsStandardRFC1521FourConsecutiveASCIICharactersRepresentThreeConsecutiveOctetsOfBinaryDataBase64UtilizesA65CharacterSubsetOfUSASCIIConsistingOfBothTheUpperAnd: v2_0299_EncodingAsDefinedByMIMEMultipurposeInternetMailExtensionsStandardRFC1521FourConsecutiveASCIICharactersRepresentThreeConsecutiveOctetsOfBinaryDataBase64UtilizesA65CharacterSubsetOfUSASCIIConsistingOfBothTheUpperAnd, - HexadecimalEncodingConsecutivePairsOfHexadecimalDigitsRepresentConsecutiveSingleOctets: v2_0299_HexadecimalEncodingConsecutivePairsOfHexadecimalDigitsRepresentConsecutiveSingleOctets, + EncodingAsDefinedByMIMEMultipurposeInternetMailExtensionsStandardRFC1521FourConsecutiveASCIICharactersRepresentThreeConsecutiveOctetsOfBinaryDataBase64UtilizesA65CharacterSubsetOfUSASCIIConsistingOfBothTheUpperAnd: + v2_0299_EncodingAsDefinedByMIMEMultipurposeInternetMailExtensionsStandardRFC1521FourConsecutiveASCIICharactersRepresentThreeConsecutiveOctetsOfBinaryDataBase64UtilizesA65CharacterSubsetOfUSASCIIConsistingOfBothTheUpperAnd, + HexadecimalEncodingConsecutivePairsOfHexadecimalDigitsRepresentConsecutiveSingleOctets: + v2_0299_HexadecimalEncodingConsecutivePairsOfHexadecimalDigitsRepresentConsecutiveSingleOctets, }; const v2_0301_CollegeOfAmericanPathologistAccreditationNumber: Coding = { code: 'CAP', @@ -159708,7 +160165,8 @@ export const V20335 = { CibusDiurnusLunch: v2_0335_CibusDiurnusLunch, Inter: v2_0335_Inter, CibusMatutinusBreakfast: v2_0335_CibusMatutinusBreakfast, - LessThanTimingGreaterThanCQuotationCumQuotationLessThanMealGreaterThan: v2_0335_LessThanTimingGreaterThanCQuotationCumQuotationLessThanMealGreaterThan, + LessThanTimingGreaterThanCQuotationCumQuotationLessThanMealGreaterThan: + v2_0335_LessThanTimingGreaterThanCQuotationCumQuotationLessThanMealGreaterThan, OneTimeOnly: v2_0335_OneTimeOnly, PostAfter: v2_0335_PostAfter, GivenAsNeeded: v2_0335_GivenAsNeeded, @@ -159727,9 +160185,11 @@ export const V20335 = { InTheEveningAtInstitutionSpecifiedTime: v2_0335_InTheEveningAtInstitutionSpecifiedTime, DuringEachOfThreeEightHourShiftsAtInstitutionSpecifiedTimes: v2_0335_DuringEachOfThreeEightHourShiftsAtInstitutionSpecifiedTimes, ThreeTimesADayAtInstitutionSpecifiedTimes: v2_0335_ThreeTimesADayAtInstitutionSpecifiedTimes, - ForFutureUseWhereLessThanSpecGreaterThanIsAnIntervalSpecificationAsDefinedByTheUNIXCronSpecification: v2_0335_ForFutureUseWhereLessThanSpecGreaterThanIsAnIntervalSpecificationAsDefinedByTheUNIXCronSpecification, + ForFutureUseWhereLessThanSpecGreaterThanIsAnIntervalSpecificationAsDefinedByTheUNIXCronSpecification: + v2_0335_ForFutureUseWhereLessThanSpecGreaterThanIsAnIntervalSpecificationAsDefinedByTheUNIXCronSpecification, CibusVespertinusDinner: v2_0335_CibusVespertinusDinner, - QuotationXQuotationTimesPerDayAtInstitutionSpecifiedTimesWhereXIsANumeral5OrGreater: v2_0335_QuotationXQuotationTimesPerDayAtInstitutionSpecifiedTimesWhereXIsANumeral5OrGreater, + QuotationXQuotationTimesPerDayAtInstitutionSpecifiedTimesWhereXIsANumeral5OrGreater: + v2_0335_QuotationXQuotationTimesPerDayAtInstitutionSpecifiedTimesWhereXIsANumeral5OrGreater, }; const v2_0336_ProviderOrdered: Coding = { code: 'O', @@ -159880,7 +160340,8 @@ const v2_0339_AdvancedBeneficiaryNoticeHasNotBeenSigned: Coding = { export const V20339 = { ServiceIsSubjectToMedicalNecessityProcedures: v2_0339_ServiceIsSubjectToMedicalNecessityProcedures, PatientHasBeenInformedOfResponsibilityAndAgreesToPayForService: v2_0339_PatientHasBeenInformedOfResponsibilityAndAgreesToPayForService, - PatientHasBeenInformedOfResponsibilityAndAsksThatThePayerBeBilled: v2_0339_PatientHasBeenInformedOfResponsibilityAndAsksThatThePayerBeBilled, + PatientHasBeenInformedOfResponsibilityAndAsksThatThePayerBeBilled: + v2_0339_PatientHasBeenInformedOfResponsibilityAndAsksThatThePayerBeBilled, AdvancedBeneficiaryNoticeHasNotBeenSigned: v2_0339_AdvancedBeneficiaryNoticeHasNotBeenSigned, }; const v2_0344_PatientIsInsured: Coding = { @@ -161376,9 +161837,12 @@ const v2_0356_ThisStandardIsTitledQuotationInformationTechnologyCharacterCodeStr * FHIR Value set/code system definition for HL7 v2 table 0356 ( Alternate character set handling scheme) */ export const V20356 = { - ThisIsTheDefaultIndicatingThatThereIsNoCharacterSetSwitchingOccurringInThisMessage: v2_0356_ThisIsTheDefaultIndicatingThatThereIsNoCharacterSetSwitchingOccurringInThisMessage, - TheCharacterSetSwitchingModeSpecifiedInHL725Section272AndSection2A46QuotationXPNExtendedPersonNameQuotation: v2_0356_TheCharacterSetSwitchingModeSpecifiedInHL725Section272AndSection2A46QuotationXPNExtendedPersonNameQuotation, - ThisStandardIsTitledQuotationInformationTechnologyCharacterCodeStructureAndExtensionTechniqueQuotation: v2_0356_ThisStandardIsTitledQuotationInformationTechnologyCharacterCodeStructureAndExtensionTechniqueQuotation, + ThisIsTheDefaultIndicatingThatThereIsNoCharacterSetSwitchingOccurringInThisMessage: + v2_0356_ThisIsTheDefaultIndicatingThatThereIsNoCharacterSetSwitchingOccurringInThisMessage, + TheCharacterSetSwitchingModeSpecifiedInHL725Section272AndSection2A46QuotationXPNExtendedPersonNameQuotation: + v2_0356_TheCharacterSetSwitchingModeSpecifiedInHL725Section272AndSection2A46QuotationXPNExtendedPersonNameQuotation, + ThisStandardIsTitledQuotationInformationTechnologyCharacterCodeStructureAndExtensionTechniqueQuotation: + v2_0356_ThisStandardIsTitledQuotationInformationTechnologyCharacterCodeStructureAndExtensionTechniqueQuotation, }; const v2_0357_MessageAccepted: Coding = { code: '0', @@ -161931,10 +162395,14 @@ const v2_0369_VerifyingCalibratorUsedForPeriodicCalibrationChecks: Coding = { export const V20369 = { BlindSample: v2_0369_BlindSample, CalibratorUsedForInitialSettingOfCalibration: v2_0369_CalibratorUsedForInitialSettingOfCalibration, - ElectronicQCUsedWithManufacturedReferenceProvidingSignalsThatSimulateQCResults: v2_0369_ElectronicQCUsedWithManufacturedReferenceProvidingSignalsThatSimulateQCResults, - SpecimenUsedForTestingProficiencyOfTheOrganizationPerformingTheTestingFiller: v2_0369_SpecimenUsedForTestingProficiencyOfTheOrganizationPerformingTheTestingFiller, - GroupWhereASpecimenConsistsOfMultipleIndividualElementsThatAreNotIndividuallyIdentified: v2_0369_GroupWhereASpecimenConsistsOfMultipleIndividualElementsThatAreNotIndividuallyIdentified, - PoolAliquotsOfIndividualSpecimensCombinedToFormASingleSpecimenRepresentingAllOfTheComponents: v2_0369_PoolAliquotsOfIndividualSpecimensCombinedToFormASingleSpecimenRepresentingAllOfTheComponents, + ElectronicQCUsedWithManufacturedReferenceProvidingSignalsThatSimulateQCResults: + v2_0369_ElectronicQCUsedWithManufacturedReferenceProvidingSignalsThatSimulateQCResults, + SpecimenUsedForTestingProficiencyOfTheOrganizationPerformingTheTestingFiller: + v2_0369_SpecimenUsedForTestingProficiencyOfTheOrganizationPerformingTheTestingFiller, + GroupWhereASpecimenConsistsOfMultipleIndividualElementsThatAreNotIndividuallyIdentified: + v2_0369_GroupWhereASpecimenConsistsOfMultipleIndividualElementsThatAreNotIndividuallyIdentified, + PoolAliquotsOfIndividualSpecimensCombinedToFormASingleSpecimenRepresentingAllOfTheComponents: + v2_0369_PoolAliquotsOfIndividualSpecimensCombinedToFormASingleSpecimenRepresentingAllOfTheComponents, SpecimenUsedForTestingOperatorProficiency: v2_0369_SpecimenUsedForTestingOperatorProficiency, PatientDefaultIfBlankComponentValue: v2_0369_PatientDefaultIfBlankComponentValue, ControlSpecimen: v2_0369_ControlSpecimen, @@ -162744,7 +163212,8 @@ const v2_0387_CommandCannotBeCompletedForUnknownReasons: Coding = { export const V20387 = { CommandCannotBeCompletedBecauseOfErrorCondition: v2_0387_CommandCannotBeCompletedBecauseOfErrorCondition, CommandCompletedSuccessfully: v2_0387_CommandCompletedSuccessfully, - CommandCannotBeCompletedBecauseOfTheStatusOfTheRequestedEquipment: v2_0387_CommandCannotBeCompletedBecauseOfTheStatusOfTheRequestedEquipment, + CommandCannotBeCompletedBecauseOfTheStatusOfTheRequestedEquipment: + v2_0387_CommandCannotBeCompletedBecauseOfTheStatusOfTheRequestedEquipment, CommandCannotBeCompletedWithinRequestedCompletionTime: v2_0387_CommandCannotBeCompletedWithinRequestedCompletionTime, CommandCannotBeCompletedForUnknownReasons: v2_0387_CommandCannotBeCompletedForUnknownReasons, }; @@ -162861,7 +163330,8 @@ const v2_0394_BolusASeriesOfResponsesSentAtTheSameTimeWithoutUseOfBatchFormattin export const V20394 = { Batch: v2_0394_Batch, RealTime: v2_0394_RealTime, - BolusASeriesOfResponsesSentAtTheSameTimeWithoutUseOfBatchFormatting: v2_0394_BolusASeriesOfResponsesSentAtTheSameTimeWithoutUseOfBatchFormatting, + BolusASeriesOfResponsesSentAtTheSameTimeWithoutUseOfBatchFormatting: + v2_0394_BolusASeriesOfResponsesSentAtTheSameTimeWithoutUseOfBatchFormatting, }; const v2_0395_ModifiedSubscription: Coding = { code: 'M', @@ -164248,7 +164718,8 @@ export const V20441 = { InactiveLostToFollowUpCancelContract: v2_0441_InactiveLostToFollowUpCancelContract, InactiveMovedOrGoneElsewhereCancelContract: v2_0441_InactiveMovedOrGoneElsewhereCancelContract, Other: v2_0441_Other, - InactivePermanentlyInactiveDoNotReactivateOrAddNewEntriesToTheRecord: v2_0441_InactivePermanentlyInactiveDoNotReactivateOrAddNewEntriesToTheRecord, + InactivePermanentlyInactiveDoNotReactivateOrAddNewEntriesToTheRecord: + v2_0441_InactivePermanentlyInactiveDoNotReactivateOrAddNewEntriesToTheRecord, Unknown: v2_0441_Unknown, }; const v2_0442_Diagnostic: Coding = { @@ -164401,7 +164872,8 @@ export const V20443 = { InitiatingProviderAsInActionBy: v2_0443_InitiatingProviderAsInActionBy, MedicalDirector: v2_0443_MedicalDirector, OrderingProvider: v2_0443_OrderingProvider, - PharmacistNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID: v2_0443_PharmacistNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID, + PharmacistNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID: + v2_0443_PharmacistNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID, PrimaryInterpreter: v2_0443_PrimaryInterpreter, PrimaryCareProvider: v2_0443_PrimaryCareProvider, ResponsibleObserver: v2_0443_ResponsibleObserver, @@ -164410,8 +164882,10 @@ export const V20443 = { Technician: v2_0443_Technician, Transcriptionist: v2_0443_Transcriptionist, VerifyingProvider: v2_0443_VerifyingProvider, - VerifyingPharmaceuticalSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID: v2_0443_VerifyingPharmaceuticalSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID, - VerifyingTreatmentSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID: v2_0443_VerifyingTreatmentSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID, + VerifyingPharmaceuticalSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID: + v2_0443_VerifyingPharmaceuticalSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID, + VerifyingTreatmentSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID: + v2_0443_VerifyingTreatmentSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID, }; /** * FHIR Value set/code system definition for HL7 v2 table 0444 ( Name assembly order) @@ -164520,8 +164994,10 @@ export const V20457 = { NoEditsPresentOnClaim: v2_0457_NoEditsPresentOnClaim, OnlyEditsPresentAreForLineItemDenialOrRejection: v2_0457_OnlyEditsPresentAreForLineItemDenialOrRejection, MultipleDayClaimWithOneOrMoreDaysDeniedOrRejected: v2_0457_MultipleDayClaimWithOneOrMoreDaysDeniedOrRejected, - ClaimDeniedRejectedSuspendedOrReturnedToProviderWithOnlyPostPaymentEdits: v2_0457_ClaimDeniedRejectedSuspendedOrReturnedToProviderWithOnlyPostPaymentEdits, - ClaimDeniedRejectedSuspendedOrReturnedToProviderWithOnlyPrePaymentEdits: v2_0457_ClaimDeniedRejectedSuspendedOrReturnedToProviderWithOnlyPrePaymentEdits, + ClaimDeniedRejectedSuspendedOrReturnedToProviderWithOnlyPostPaymentEdits: + v2_0457_ClaimDeniedRejectedSuspendedOrReturnedToProviderWithOnlyPostPaymentEdits, + ClaimDeniedRejectedSuspendedOrReturnedToProviderWithOnlyPrePaymentEdits: + v2_0457_ClaimDeniedRejectedSuspendedOrReturnedToProviderWithOnlyPrePaymentEdits, }; const v2_0459_OCELineItemDenialOrRejectionIsNotIgnored: Coding = { code: '0', @@ -164574,7 +165050,8 @@ const v2_0460_LineItemIsOnAMultipleDayClaimTheLineItemIsNotDeniedOrRejectedButOc export const V20460 = { LineItemNotDeniedOrRejected: v2_0460_LineItemNotDeniedOrRejected, LineItemDeniedOrRejected: v2_0460_LineItemDeniedOrRejected, - LineItemIsOnAMultipleDayClaimTheLineItemIsNotDeniedOrRejectedButOccursOnADayThatHasBeenDeniedOrRejected: v2_0460_LineItemIsOnAMultipleDayClaimTheLineItemIsNotDeniedOrRejectedButOccursOnADayThatHasBeenDeniedOrRejected, + LineItemIsOnAMultipleDayClaimTheLineItemIsNotDeniedOrRejectedButOccursOnADayThatHasBeenDeniedOrRejected: + v2_0460_LineItemIsOnAMultipleDayClaimTheLineItemIsNotDeniedOrRejectedButOccursOnADayThatHasBeenDeniedOrRejected, }; const v2_0465_AlphabeticIEDefaultOrSomeSingleByte: Coding = { code: 'A', @@ -164658,9 +165135,12 @@ const v2_0468_DeductibleNotApplicableSpecificListOfHCPCSCodes: Coding = { */ export const V20468 = { NoPaymentAdjustment: v2_0468_NoPaymentAdjustment, - DesignatedCurrentDrugOrBiologicalPaymentAdjustmentAppliesToAPCStatusIndicatorG: v2_0468_DesignatedCurrentDrugOrBiologicalPaymentAdjustmentAppliesToAPCStatusIndicatorG, - DesignatedNewDevicePaymentAdjustmentAppliesToAPCStatusIndicatorH: v2_0468_DesignatedNewDevicePaymentAdjustmentAppliesToAPCStatusIndicatorH, - DesignatedNewDrugOrNewBiologicalPaymentAdjustmentAppliesToAPCStatusIndicatorJ: v2_0468_DesignatedNewDrugOrNewBiologicalPaymentAdjustmentAppliesToAPCStatusIndicatorJ, + DesignatedCurrentDrugOrBiologicalPaymentAdjustmentAppliesToAPCStatusIndicatorG: + v2_0468_DesignatedCurrentDrugOrBiologicalPaymentAdjustmentAppliesToAPCStatusIndicatorG, + DesignatedNewDevicePaymentAdjustmentAppliesToAPCStatusIndicatorH: + v2_0468_DesignatedNewDevicePaymentAdjustmentAppliesToAPCStatusIndicatorH, + DesignatedNewDrugOrNewBiologicalPaymentAdjustmentAppliesToAPCStatusIndicatorJ: + v2_0468_DesignatedNewDrugOrNewBiologicalPaymentAdjustmentAppliesToAPCStatusIndicatorJ, DeductibleNotApplicableSpecificListOfHCPCSCodes: v2_0468_DeductibleNotApplicableSpecificListOfHCPCSCodes, }; const v2_0469_NotPackaged: Coding = { @@ -164683,8 +165163,10 @@ const v2_0469_PackagedAsPartOfPartialHospitalizationPerDiemOrDailyMentalHealthSe */ export const V20469 = { NotPackaged: v2_0469_NotPackaged, - PackagedServiceStatusIndicatorNOrNoHCPCSCodeAndCertainRevenueCodes: v2_0469_PackagedServiceStatusIndicatorNOrNoHCPCSCodeAndCertainRevenueCodes, - PackagedAsPartOfPartialHospitalizationPerDiemOrDailyMentalHealthServicePerDiem: v2_0469_PackagedAsPartOfPartialHospitalizationPerDiemOrDailyMentalHealthServicePerDiem, + PackagedServiceStatusIndicatorNOrNoHCPCSCodeAndCertainRevenueCodes: + v2_0469_PackagedServiceStatusIndicatorNOrNoHCPCSCodeAndCertainRevenueCodes, + PackagedAsPartOfPartialHospitalizationPerDiemOrDailyMentalHealthServicePerDiem: + v2_0469_PackagedAsPartOfPartialHospitalizationPerDiemOrDailyMentalHealthServicePerDiem, }; const v2_0470_CornealTissueAPC: Coding = { code: 'Crnl', @@ -168420,7 +168902,8 @@ const v2_0496_Videotape: Coding = { * FHIR Value set/code system definition for HL7 v2 table 0496 ( Consent Type) */ export const V20496 = { - ReleaseOfInformationMRAuthorizationToDisclosureProtectedHealthInformation: v2_0496_ReleaseOfInformationMRAuthorizationToDisclosureProtectedHealthInformation, + ReleaseOfInformationMRAuthorizationToDisclosureProtectedHealthInformation: + v2_0496_ReleaseOfInformationMRAuthorizationToDisclosureProtectedHealthInformation, MedicalProcedureInvasive: v2_0496_MedicalProcedureInvasive, AcknowledgeReceiptOfPrivacyNotice: v2_0496_AcknowledgeReceiptOfPrivacyNotice, Abortion: v2_0496_Abortion, @@ -168529,7 +169012,8 @@ export const V20496 = { ReleaseOfLimb: v2_0496_ReleaseOfLimb, RhImmuneGlobulin: v2_0496_RhImmuneGlobulin, RightsOfMedicalResearchParticipants: v2_0496_RightsOfMedicalResearchParticipants, - RequestToRestrictAccessDisclosureToMedicalRecordProtectedHealthInformation: v2_0496_RequestToRestrictAccessDisclosureToMedicalRecordProtectedHealthInformation, + RequestToRestrictAccessDisclosureToMedicalRecordProtectedHealthInformation: + v2_0496_RequestToRestrictAccessDisclosureToMedicalRecordProtectedHealthInformation, RequestForRemainAnonymous: v2_0496_RequestForRemainAnonymous, SeatBeltExemption: v2_0496_SeatBeltExemption, Sialogram: v2_0496_Sialogram, @@ -168620,7 +169104,8 @@ export const V20498 = { LimitedConsentHasBeenGrantedWithLimitations: v2_0498_LimitedConsentHasBeenGrantedWithLimitations, PendingConsentHasNotYetBeenSought: v2_0498_PendingConsentHasNotYetBeenSought, RefusedConsentHasBeenRefused: v2_0498_RefusedConsentHasBeenRefused, - RescindedConsentWasInitiallyGrantedButWasSubsequentlyRevokedOrEnded: v2_0498_RescindedConsentWasInitiallyGrantedButWasSubsequentlyRevokedOrEnded, + RescindedConsentWasInitiallyGrantedButWasSubsequentlyRevokedOrEnded: + v2_0498_RescindedConsentWasInitiallyGrantedButWasSubsequentlyRevokedOrEnded, }; const v2_0499_Emergency: Coding = { code: 'E', @@ -169586,12 +170071,13 @@ export const V20534 = { Unknown: v2_0534_Unknown, Yes: v2_0534_Yes, }; -const v2_0535_SignedCMS1500ClaimFormOnFileEGAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessaryToProcessThisClaimAndAssignmentOfBenefits: Coding = { - code: 'C', - display: - 'Signed CMS-1500 claim form on file, e.g., authorization for release of any medical or other information necessary to process this claim and assignment of benefits.', - system: 'http://terminology.hl7.org/CodeSystem/v2-0535', -}; +const v2_0535_SignedCMS1500ClaimFormOnFileEGAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessaryToProcessThisClaimAndAssignmentOfBenefits: Coding = + { + code: 'C', + display: + 'Signed CMS-1500 claim form on file, e.g., authorization for release of any medical or other information necessary to process this claim and assignment of benefits.', + system: 'http://terminology.hl7.org/CodeSystem/v2-0535', + }; const v2_0535_SignedAuthorizationForAssignmentOfBenefitsOnFile: Coding = { code: 'M', display: 'Signed authorization for assignment of benefits on file.', @@ -169611,10 +170097,13 @@ const v2_0535_SignedAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessa * FHIR Value set/code system definition for HL7 v2 table 0535 ( Signature Code) */ export const V20535 = { - SignedCMS1500ClaimFormOnFileEGAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessaryToProcessThisClaimAndAssignmentOfBenefits: v2_0535_SignedCMS1500ClaimFormOnFileEGAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessaryToProcessThisClaimAndAssignmentOfBenefits, + SignedCMS1500ClaimFormOnFileEGAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessaryToProcessThisClaimAndAssignmentOfBenefits: + v2_0535_SignedCMS1500ClaimFormOnFileEGAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessaryToProcessThisClaimAndAssignmentOfBenefits, SignedAuthorizationForAssignmentOfBenefitsOnFile: v2_0535_SignedAuthorizationForAssignmentOfBenefitsOnFile, - SignatureGeneratedByProviderBecauseThePatientWasNotPhysicallyPresentForServices: v2_0535_SignatureGeneratedByProviderBecauseThePatientWasNotPhysicallyPresentForServices, - SignedAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessaryToProcessThisClaimOnFile: v2_0535_SignedAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessaryToProcessThisClaimOnFile, + SignatureGeneratedByProviderBecauseThePatientWasNotPhysicallyPresentForServices: + v2_0535_SignatureGeneratedByProviderBecauseThePatientWasNotPhysicallyPresentForServices, + SignedAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessaryToProcessThisClaimOnFile: + v2_0535_SignedAuthorizationForReleaseOfAnyMedicalOrOtherInformationNecessaryToProcessThisClaimOnFile, }; const v2_0536_Expired: Coding = { code: 'E', @@ -169901,7 +170390,8 @@ export const V20548 = { NextOfKin: v2_0548_NextOfKin, DurablePowerOfAttorneyInHealthcareAffairs: v2_0548_DurablePowerOfAttorneyInHealthcareAffairs, Conservator: v2_0548_Conservator, - EmergentPractitionerPractitionerJudgingCaseAsEmergencyRequiringCareWithoutAConsent: v2_0548_EmergentPractitionerPractitionerJudgingCaseAsEmergencyRequiringCareWithoutAConsent, + EmergentPractitionerPractitionerJudgingCaseAsEmergencyRequiringCareWithoutAConsent: + v2_0548_EmergentPractitionerPractitionerJudgingCaseAsEmergencyRequiringCareWithoutAConsent, NonEmergentPractitionerIEMedicalEthicsCommittee: v2_0548_NonEmergentPractitionerIEMedicalEthicsCommittee, }; const v2_0550_ExternalJugular: Coding = { @@ -174674,18 +175164,20 @@ const v2_0906_EmergencyAnUnforeseenCombinationOfCircumstancesOrTheResultingState display: 'Emergency - An unforeseen combination of circumstances or the resulting state that calls for immediate action', system: 'http://terminology.hl7.org/CodeSystem/v2-0906', }; -const v2_0906_PreopUsedToIndicateThatAServiceIsToBePerformedPriorToAScheduledSurgeryWhenOrderingAServiceAndUsingThePreOpPriorityACheckIsDoneToSeeTheAmountOfTimeThatMustBeAllowedForPerformanceOfTheServiceWhenTheOrder: Coding = { - code: 'P', - display: - 'Preop - Used to indicate that a service is to be performed prior to a scheduled surgery. When ordering a service and using the pre-op priority, a check is done to see the amount of time that must be allowed for performance of the service. When the order', - system: 'http://terminology.hl7.org/CodeSystem/v2-0906', -}; -const v2_0906_AsNeededAnQuotationAsNeededQuotationOrderShouldBeAccompaniedByADescriptionOfWhatConstitutesANeedThisDescriptionIsRepresentedByAnObservationServicePredicateAsAPrecondition: Coding = { - code: 'PRN', - display: - 'As needed - An "as needed" order should be accompanied by a description of what constitutes a need. This description is represented by an observation service predicate as a precondition.', - system: 'http://terminology.hl7.org/CodeSystem/v2-0906', -}; +const v2_0906_PreopUsedToIndicateThatAServiceIsToBePerformedPriorToAScheduledSurgeryWhenOrderingAServiceAndUsingThePreOpPriorityACheckIsDoneToSeeTheAmountOfTimeThatMustBeAllowedForPerformanceOfTheServiceWhenTheOrder: Coding = + { + code: 'P', + display: + 'Preop - Used to indicate that a service is to be performed prior to a scheduled surgery. When ordering a service and using the pre-op priority, a check is done to see the amount of time that must be allowed for performance of the service. When the order', + system: 'http://terminology.hl7.org/CodeSystem/v2-0906', + }; +const v2_0906_AsNeededAnQuotationAsNeededQuotationOrderShouldBeAccompaniedByADescriptionOfWhatConstitutesANeedThisDescriptionIsRepresentedByAnObservationServicePredicateAsAPrecondition: Coding = + { + code: 'PRN', + display: + 'As needed - An "as needed" order should be accompanied by a description of what constitutes a need. This description is represented by an observation service predicate as a precondition.', + system: 'http://terminology.hl7.org/CodeSystem/v2-0906', + }; const v2_0906_RoutineRoutineServiceDoAtUsualWorkHours: Coding = { code: 'R', display: 'Routine - Routine service, do at usual work hours', @@ -174721,27 +175213,36 @@ const v2_0906_UrgentCallsForPromptAction: Coding = { */ export const V20906 = { ASAPAsSoonAsPossibleNextHighestPriorityAfterStat: v2_0906_ASAPAsSoonAsPossibleNextHighestPriorityAfterStat, - CallbackResultsFillerShouldContactThePlacerAsSoonAsResultsAreAvailableEvenForPreliminaryResults: v2_0906_CallbackResultsFillerShouldContactThePlacerAsSoonAsResultsAreAvailableEvenForPreliminaryResults, - CallbackForSchedulingFillerShouldContactThePlacerOrTargetToScheduleTheService: v2_0906_CallbackForSchedulingFillerShouldContactThePlacerOrTargetToScheduleTheService, - CallbackPlacerForSchedulingFillerShouldContactThePlacerToScheduleTheService: v2_0906_CallbackPlacerForSchedulingFillerShouldContactThePlacerToScheduleTheService, - ContactRecipientForSchedulingFillerShouldContactTheServiceRecipientTargetToScheduleTheService: v2_0906_ContactRecipientForSchedulingFillerShouldContactTheServiceRecipientTargetToScheduleTheService, + CallbackResultsFillerShouldContactThePlacerAsSoonAsResultsAreAvailableEvenForPreliminaryResults: + v2_0906_CallbackResultsFillerShouldContactThePlacerAsSoonAsResultsAreAvailableEvenForPreliminaryResults, + CallbackForSchedulingFillerShouldContactThePlacerOrTargetToScheduleTheService: + v2_0906_CallbackForSchedulingFillerShouldContactThePlacerOrTargetToScheduleTheService, + CallbackPlacerForSchedulingFillerShouldContactThePlacerToScheduleTheService: + v2_0906_CallbackPlacerForSchedulingFillerShouldContactThePlacerToScheduleTheService, + ContactRecipientForSchedulingFillerShouldContactTheServiceRecipientTargetToScheduleTheService: + v2_0906_ContactRecipientForSchedulingFillerShouldContactTheServiceRecipientTargetToScheduleTheService, ElectiveBeneficialToThePatientButNotEssentialForSurvival: v2_0906_ElectiveBeneficialToThePatientButNotEssentialForSurvival, - EmergencyAnUnforeseenCombinationOfCircumstancesOrTheResultingStateThatCallsForImmediateAction: v2_0906_EmergencyAnUnforeseenCombinationOfCircumstancesOrTheResultingStateThatCallsForImmediateAction, - PreopUsedToIndicateThatAServiceIsToBePerformedPriorToAScheduledSurgeryWhenOrderingAServiceAndUsingThePreOpPriorityACheckIsDoneToSeeTheAmountOfTimeThatMustBeAllowedForPerformanceOfTheServiceWhenTheOrder: v2_0906_PreopUsedToIndicateThatAServiceIsToBePerformedPriorToAScheduledSurgeryWhenOrderingAServiceAndUsingThePreOpPriorityACheckIsDoneToSeeTheAmountOfTimeThatMustBeAllowedForPerformanceOfTheServiceWhenTheOrder, - AsNeededAnQuotationAsNeededQuotationOrderShouldBeAccompaniedByADescriptionOfWhatConstitutesANeedThisDescriptionIsRepresentedByAnObservationServicePredicateAsAPrecondition: v2_0906_AsNeededAnQuotationAsNeededQuotationOrderShouldBeAccompaniedByADescriptionOfWhatConstitutesANeedThisDescriptionIsRepresentedByAnObservationServicePredicateAsAPrecondition, + EmergencyAnUnforeseenCombinationOfCircumstancesOrTheResultingStateThatCallsForImmediateAction: + v2_0906_EmergencyAnUnforeseenCombinationOfCircumstancesOrTheResultingStateThatCallsForImmediateAction, + PreopUsedToIndicateThatAServiceIsToBePerformedPriorToAScheduledSurgeryWhenOrderingAServiceAndUsingThePreOpPriorityACheckIsDoneToSeeTheAmountOfTimeThatMustBeAllowedForPerformanceOfTheServiceWhenTheOrder: + v2_0906_PreopUsedToIndicateThatAServiceIsToBePerformedPriorToAScheduledSurgeryWhenOrderingAServiceAndUsingThePreOpPriorityACheckIsDoneToSeeTheAmountOfTimeThatMustBeAllowedForPerformanceOfTheServiceWhenTheOrder, + AsNeededAnQuotationAsNeededQuotationOrderShouldBeAccompaniedByADescriptionOfWhatConstitutesANeedThisDescriptionIsRepresentedByAnObservationServicePredicateAsAPrecondition: + v2_0906_AsNeededAnQuotationAsNeededQuotationOrderShouldBeAccompaniedByADescriptionOfWhatConstitutesANeedThisDescriptionIsRepresentedByAnObservationServicePredicateAsAPrecondition, RoutineRoutineServiceDoAtUsualWorkHours: v2_0906_RoutineRoutineServiceDoAtUsualWorkHours, RushReportingAReportShouldBePreparedAndSentAsQuicklyAsPossible: v2_0906_RushReportingAReportShouldBePreparedAndSentAsQuicklyAsPossible, StatWithHighestPriorityEGEmergency: v2_0906_StatWithHighestPriorityEGEmergency, - TimingCriticalItIsCriticalToComeAsCloseAsPossibleToTheRequestedTimeEGForAThroughAntimicrobialLevel: v2_0906_TimingCriticalItIsCriticalToComeAsCloseAsPossibleToTheRequestedTimeEGForAThroughAntimicrobialLevel, + TimingCriticalItIsCriticalToComeAsCloseAsPossibleToTheRequestedTimeEGForAThroughAntimicrobialLevel: + v2_0906_TimingCriticalItIsCriticalToComeAsCloseAsPossibleToTheRequestedTimeEGForAThroughAntimicrobialLevel, UseAsDirectedDrugIsToBeUsedAsDirectedByThePrescriber: v2_0906_UseAsDirectedDrugIsToBeUsedAsDirectedByThePrescriber, UrgentCallsForPromptAction: v2_0906_UrgentCallsForPromptAction, }; -const v2_0907_BusinessSinceTheServiceClassCanRepresentKnowledgeStructuresThatMayBeConsideredATradeOrBusinessSecretThereIsSometimesThoughRarelyTheNeedToFlagThoseItemsAsOfBusinessLevelConfidentialityHoweverNoPatientRelatedInf: Coding = { - code: 'B', - display: - 'Business - Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality. However, no patient related inf', - system: 'http://terminology.hl7.org/CodeSystem/v2-0907', -}; +const v2_0907_BusinessSinceTheServiceClassCanRepresentKnowledgeStructuresThatMayBeConsideredATradeOrBusinessSecretThereIsSometimesThoughRarelyTheNeedToFlagThoseItemsAsOfBusinessLevelConfidentialityHoweverNoPatientRelatedInf: Coding = + { + code: 'B', + display: + 'Business - Since the service class can represent knowledge structures that may be considered a trade or business secret, there is sometimes (though rarely) the need to flag those items as of business level confidentiality. However, no patient related inf', + system: 'http://terminology.hl7.org/CodeSystem/v2-0907', + }; const v2_0907_CelebrityCelebritiesArePeopleOfPublicInterestVIPIncludingEmployeesWhoseInformationRequireSpecialProtection: Coding = { code: 'C', display: 'Celebrity - Celebrities are people of public interest (VIP) including employees, whose information require special protection.', @@ -174763,24 +175264,27 @@ const v2_0907_HIVRelatedHIVAndAIDSRelatedItem: Coding = { display: 'HIV Related - HIV and AIDS related item', system: 'http://terminology.hl7.org/CodeSystem/v2-0907', }; -const v2_0907_IndividualAccessOnlyToIndividualPersonsWhoAreMentionedExplicitlyAsActorsOfThisServiceAndWhoseActorTypeWarrantsThatAccessCfToActorTypedCode: Coding = { - code: 'I', - display: - 'Individual - Access only to individual persons who are mentioned explicitly as actors of this service and whose actor type warrants that access (cf. to actor typed code).', - system: 'http://terminology.hl7.org/CodeSystem/v2-0907', -}; -const v2_0907_LowNoPatientRecordItemCanBeOfLowConfidentialityHoweverSomeServiceObjectsAreNotPatientRelatedAndThereforeMayHaveLowConfidentiality: Coding = { - code: 'L', - display: - 'Low - No patient record item can be of low confidentiality. However, some service objects are not patient related and therefore may have low confidentiality.', - system: 'http://terminology.hl7.org/CodeSystem/v2-0907', -}; -const v2_0907_NormalNormalConfidentialityRulesAccordingToGoodHealthCarePracticeApplyThatIsOnlyAuthorizedIndividualsWithALegitimateMedicalOrBusinessNeedMayAccessThisItem: Coding = { - code: 'N', - display: - 'Normal - Normal confidentiality rules (according to good health care practice) apply, that is, only authorized individuals with a legitimate medical or business need may access this item.', - system: 'http://terminology.hl7.org/CodeSystem/v2-0907', -}; +const v2_0907_IndividualAccessOnlyToIndividualPersonsWhoAreMentionedExplicitlyAsActorsOfThisServiceAndWhoseActorTypeWarrantsThatAccessCfToActorTypedCode: Coding = + { + code: 'I', + display: + 'Individual - Access only to individual persons who are mentioned explicitly as actors of this service and whose actor type warrants that access (cf. to actor typed code).', + system: 'http://terminology.hl7.org/CodeSystem/v2-0907', + }; +const v2_0907_LowNoPatientRecordItemCanBeOfLowConfidentialityHoweverSomeServiceObjectsAreNotPatientRelatedAndThereforeMayHaveLowConfidentiality: Coding = + { + code: 'L', + display: + 'Low - No patient record item can be of low confidentiality. However, some service objects are not patient related and therefore may have low confidentiality.', + system: 'http://terminology.hl7.org/CodeSystem/v2-0907', + }; +const v2_0907_NormalNormalConfidentialityRulesAccordingToGoodHealthCarePracticeApplyThatIsOnlyAuthorizedIndividualsWithALegitimateMedicalOrBusinessNeedMayAccessThisItem: Coding = + { + code: 'N', + display: + 'Normal - Normal confidentiality rules (according to good health care practice) apply, that is, only authorized individuals with a legitimate medical or business need may access this item.', + system: 'http://terminology.hl7.org/CodeSystem/v2-0907', + }; const v2_0907_PsychiatryRelatedPsychiatryRelatedItem: Coding = { code: 'PSY', display: 'Psychiatry related - Psychiatry related item', @@ -174791,23 +175295,25 @@ const v2_0907_RestrictedRestrictedAccessEGOnlyToProvidersHavingACurrentCareRelat display: 'Restricted - Restricted access, e.g. only to providers having a current care relationship to the patient.', system: 'http://terminology.hl7.org/CodeSystem/v2-0907', }; -const v2_0907_SensitiveInformationForWhichThePatientSeeksHeightenedConfidentialitySensitiveInformationIsNotToBeSharedWithFamilyMembersInformationReportedByThePatientAboutFamilyMembersIsSensitiveByDefaultFlagCanBeSetOrCleared: Coding = { - code: 'S', - display: - 'Sensitive - Information for which the patient seeks heightened confidentiality. Sensitive information is not to be shared with family members. Information reported by the patient about family members is sensitive by default. Flag can be set or cleared ', - system: 'http://terminology.hl7.org/CodeSystem/v2-0907', -}; +const v2_0907_SensitiveInformationForWhichThePatientSeeksHeightenedConfidentialitySensitiveInformationIsNotToBeSharedWithFamilyMembersInformationReportedByThePatientAboutFamilyMembersIsSensitiveByDefaultFlagCanBeSetOrCleared: Coding = + { + code: 'S', + display: + 'Sensitive - Information for which the patient seeks heightened confidentiality. Sensitive information is not to be shared with family members. Information reported by the patient about family members is sensitive by default. Flag can be set or cleared ', + system: 'http://terminology.hl7.org/CodeSystem/v2-0907', + }; const v2_0907_SexualAndDomesticViolenceRelatedSexualAssaultDomesticViolenceRelatedItem: Coding = { code: 'SDV', display: 'Sexual and domestic violence related - Sexual assault / domestic violence related item', system: 'http://terminology.hl7.org/CodeSystem/v2-0907', }; -const v2_0907_TabooInformationNotToBeDisclosedOrDiscussedWithPatientExceptThroughPhysicianAssignedToPatientInThisCaseThisIsUsuallyATemporaryConstraintOnlyExampleUseIsANewFatalDiagnosisOrFindingSuchAsMalignancyOrHIV: Coding = { - code: 'T', - display: - 'Taboo - Information not to be disclosed or discussed with patient except through physician assigned to patient in this case. This is usually a temporary constraint only; example use is a new fatal diagnosis or finding, such as malignancy or HIV.', - system: 'http://terminology.hl7.org/CodeSystem/v2-0907', -}; +const v2_0907_TabooInformationNotToBeDisclosedOrDiscussedWithPatientExceptThroughPhysicianAssignedToPatientInThisCaseThisIsUsuallyATemporaryConstraintOnlyExampleUseIsANewFatalDiagnosisOrFindingSuchAsMalignancyOrHIV: Coding = + { + code: 'T', + display: + 'Taboo - Information not to be disclosed or discussed with patient except through physician assigned to patient in this case. This is usually a temporary constraint only; example use is a new fatal diagnosis or finding, such as malignancy or HIV.', + system: 'http://terminology.hl7.org/CodeSystem/v2-0907', + }; const v2_0907_VeryRestrictedVeryRestrictedAccessAsDeclaredByThePrivacyOfficerOfTheRecordHolder: Coding = { code: 'V', display: 'Very restricted - Very restricted access as declared by the Privacy Officer of the record holder.', @@ -174817,33 +175323,46 @@ const v2_0907_VeryRestrictedVeryRestrictedAccessAsDeclaredByThePrivacyOfficerOfT * FHIR Value set/code system definition for HL7 v2 table 0907 ( Confidentiality) */ export const V20907 = { - BusinessSinceTheServiceClassCanRepresentKnowledgeStructuresThatMayBeConsideredATradeOrBusinessSecretThereIsSometimesThoughRarelyTheNeedToFlagThoseItemsAsOfBusinessLevelConfidentialityHoweverNoPatientRelatedInf: v2_0907_BusinessSinceTheServiceClassCanRepresentKnowledgeStructuresThatMayBeConsideredATradeOrBusinessSecretThereIsSometimesThoughRarelyTheNeedToFlagThoseItemsAsOfBusinessLevelConfidentialityHoweverNoPatientRelatedInf, - CelebrityCelebritiesArePeopleOfPublicInterestVIPIncludingEmployeesWhoseInformationRequireSpecialProtection: v2_0907_CelebrityCelebritiesArePeopleOfPublicInterestVIPIncludingEmployeesWhoseInformationRequireSpecialProtection, - ClinicianOnlyCliniciansMaySeeThisItemBillingAndAdministrationPersonsCanNotAccessThisItemWithoutSpecialPermission: v2_0907_ClinicianOnlyCliniciansMaySeeThisItemBillingAndAdministrationPersonsCanNotAccessThisItemWithoutSpecialPermission, + BusinessSinceTheServiceClassCanRepresentKnowledgeStructuresThatMayBeConsideredATradeOrBusinessSecretThereIsSometimesThoughRarelyTheNeedToFlagThoseItemsAsOfBusinessLevelConfidentialityHoweverNoPatientRelatedInf: + v2_0907_BusinessSinceTheServiceClassCanRepresentKnowledgeStructuresThatMayBeConsideredATradeOrBusinessSecretThereIsSometimesThoughRarelyTheNeedToFlagThoseItemsAsOfBusinessLevelConfidentialityHoweverNoPatientRelatedInf, + CelebrityCelebritiesArePeopleOfPublicInterestVIPIncludingEmployeesWhoseInformationRequireSpecialProtection: + v2_0907_CelebrityCelebritiesArePeopleOfPublicInterestVIPIncludingEmployeesWhoseInformationRequireSpecialProtection, + ClinicianOnlyCliniciansMaySeeThisItemBillingAndAdministrationPersonsCanNotAccessThisItemWithoutSpecialPermission: + v2_0907_ClinicianOnlyCliniciansMaySeeThisItemBillingAndAdministrationPersonsCanNotAccessThisItemWithoutSpecialPermission, SubstanceAbuseRelatedAlcoholDrugAbuseRelatedItem: v2_0907_SubstanceAbuseRelatedAlcoholDrugAbuseRelatedItem, HIVRelatedHIVAndAIDSRelatedItem: v2_0907_HIVRelatedHIVAndAIDSRelatedItem, - IndividualAccessOnlyToIndividualPersonsWhoAreMentionedExplicitlyAsActorsOfThisServiceAndWhoseActorTypeWarrantsThatAccessCfToActorTypedCode: v2_0907_IndividualAccessOnlyToIndividualPersonsWhoAreMentionedExplicitlyAsActorsOfThisServiceAndWhoseActorTypeWarrantsThatAccessCfToActorTypedCode, - LowNoPatientRecordItemCanBeOfLowConfidentialityHoweverSomeServiceObjectsAreNotPatientRelatedAndThereforeMayHaveLowConfidentiality: v2_0907_LowNoPatientRecordItemCanBeOfLowConfidentialityHoweverSomeServiceObjectsAreNotPatientRelatedAndThereforeMayHaveLowConfidentiality, - NormalNormalConfidentialityRulesAccordingToGoodHealthCarePracticeApplyThatIsOnlyAuthorizedIndividualsWithALegitimateMedicalOrBusinessNeedMayAccessThisItem: v2_0907_NormalNormalConfidentialityRulesAccordingToGoodHealthCarePracticeApplyThatIsOnlyAuthorizedIndividualsWithALegitimateMedicalOrBusinessNeedMayAccessThisItem, + IndividualAccessOnlyToIndividualPersonsWhoAreMentionedExplicitlyAsActorsOfThisServiceAndWhoseActorTypeWarrantsThatAccessCfToActorTypedCode: + v2_0907_IndividualAccessOnlyToIndividualPersonsWhoAreMentionedExplicitlyAsActorsOfThisServiceAndWhoseActorTypeWarrantsThatAccessCfToActorTypedCode, + LowNoPatientRecordItemCanBeOfLowConfidentialityHoweverSomeServiceObjectsAreNotPatientRelatedAndThereforeMayHaveLowConfidentiality: + v2_0907_LowNoPatientRecordItemCanBeOfLowConfidentialityHoweverSomeServiceObjectsAreNotPatientRelatedAndThereforeMayHaveLowConfidentiality, + NormalNormalConfidentialityRulesAccordingToGoodHealthCarePracticeApplyThatIsOnlyAuthorizedIndividualsWithALegitimateMedicalOrBusinessNeedMayAccessThisItem: + v2_0907_NormalNormalConfidentialityRulesAccordingToGoodHealthCarePracticeApplyThatIsOnlyAuthorizedIndividualsWithALegitimateMedicalOrBusinessNeedMayAccessThisItem, PsychiatryRelatedPsychiatryRelatedItem: v2_0907_PsychiatryRelatedPsychiatryRelatedItem, - RestrictedRestrictedAccessEGOnlyToProvidersHavingACurrentCareRelationshipToThePatient: v2_0907_RestrictedRestrictedAccessEGOnlyToProvidersHavingACurrentCareRelationshipToThePatient, - SensitiveInformationForWhichThePatientSeeksHeightenedConfidentialitySensitiveInformationIsNotToBeSharedWithFamilyMembersInformationReportedByThePatientAboutFamilyMembersIsSensitiveByDefaultFlagCanBeSetOrCleared: v2_0907_SensitiveInformationForWhichThePatientSeeksHeightenedConfidentialitySensitiveInformationIsNotToBeSharedWithFamilyMembersInformationReportedByThePatientAboutFamilyMembersIsSensitiveByDefaultFlagCanBeSetOrCleared, - SexualAndDomesticViolenceRelatedSexualAssaultDomesticViolenceRelatedItem: v2_0907_SexualAndDomesticViolenceRelatedSexualAssaultDomesticViolenceRelatedItem, - TabooInformationNotToBeDisclosedOrDiscussedWithPatientExceptThroughPhysicianAssignedToPatientInThisCaseThisIsUsuallyATemporaryConstraintOnlyExampleUseIsANewFatalDiagnosisOrFindingSuchAsMalignancyOrHIV: v2_0907_TabooInformationNotToBeDisclosedOrDiscussedWithPatientExceptThroughPhysicianAssignedToPatientInThisCaseThisIsUsuallyATemporaryConstraintOnlyExampleUseIsANewFatalDiagnosisOrFindingSuchAsMalignancyOrHIV, - VeryRestrictedVeryRestrictedAccessAsDeclaredByThePrivacyOfficerOfTheRecordHolder: v2_0907_VeryRestrictedVeryRestrictedAccessAsDeclaredByThePrivacyOfficerOfTheRecordHolder, -}; -const v2_0909_ShareIn1DayLessThanPGreaterThanShareResultRegardlessOfReferenceTherapeuticRangeAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay: Coding = { - code: 'SID', - display: - 'Share In1 Day -

Share result regardless of reference/therapeutic range after 1 or more business day as agreed to by the systems in play.', - system: 'http://terminology.hl7.org/CodeSystem/v2-0909', -}; -const v2_0909_ShareIn1DayConditionallyLessThanPGreaterThanShareResultInReferenceRangesTherapeuticWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlayLessThanPGreaterThanWithholdResultOutOfReferenceTherapeuticRangeUntilPhysicianRelease: Coding = { - code: 'SIDC', - display: - 'Share in 1 Day Conditionally -

Share result in reference ranges/therapeutic with patient after 1 or more business day as agreed to by the systems in play.

Withhold result out of reference/therapeutic range until physician release', - system: 'http://terminology.hl7.org/CodeSystem/v2-0909', -}; + RestrictedRestrictedAccessEGOnlyToProvidersHavingACurrentCareRelationshipToThePatient: + v2_0907_RestrictedRestrictedAccessEGOnlyToProvidersHavingACurrentCareRelationshipToThePatient, + SensitiveInformationForWhichThePatientSeeksHeightenedConfidentialitySensitiveInformationIsNotToBeSharedWithFamilyMembersInformationReportedByThePatientAboutFamilyMembersIsSensitiveByDefaultFlagCanBeSetOrCleared: + v2_0907_SensitiveInformationForWhichThePatientSeeksHeightenedConfidentialitySensitiveInformationIsNotToBeSharedWithFamilyMembersInformationReportedByThePatientAboutFamilyMembersIsSensitiveByDefaultFlagCanBeSetOrCleared, + SexualAndDomesticViolenceRelatedSexualAssaultDomesticViolenceRelatedItem: + v2_0907_SexualAndDomesticViolenceRelatedSexualAssaultDomesticViolenceRelatedItem, + TabooInformationNotToBeDisclosedOrDiscussedWithPatientExceptThroughPhysicianAssignedToPatientInThisCaseThisIsUsuallyATemporaryConstraintOnlyExampleUseIsANewFatalDiagnosisOrFindingSuchAsMalignancyOrHIV: + v2_0907_TabooInformationNotToBeDisclosedOrDiscussedWithPatientExceptThroughPhysicianAssignedToPatientInThisCaseThisIsUsuallyATemporaryConstraintOnlyExampleUseIsANewFatalDiagnosisOrFindingSuchAsMalignancyOrHIV, + VeryRestrictedVeryRestrictedAccessAsDeclaredByThePrivacyOfficerOfTheRecordHolder: + v2_0907_VeryRestrictedVeryRestrictedAccessAsDeclaredByThePrivacyOfficerOfTheRecordHolder, +}; +const v2_0909_ShareIn1DayLessThanPGreaterThanShareResultRegardlessOfReferenceTherapeuticRangeAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay: Coding = + { + code: 'SID', + display: + 'Share In1 Day -

Share result regardless of reference/therapeutic range after 1 or more business day as agreed to by the systems in play.', + system: 'http://terminology.hl7.org/CodeSystem/v2-0909', + }; +const v2_0909_ShareIn1DayConditionallyLessThanPGreaterThanShareResultInReferenceRangesTherapeuticWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlayLessThanPGreaterThanWithholdResultOutOfReferenceTherapeuticRangeUntilPhysicianRelease: Coding = + { + code: 'SIDC', + display: + 'Share in 1 Day Conditionally -

Share result in reference ranges/therapeutic with patient after 1 or more business day as agreed to by the systems in play.

Withhold result out of reference/therapeutic range until physician release', + system: 'http://terminology.hl7.org/CodeSystem/v2-0909', + }; const v2_0909_ShareImmediatelyLessThanPGreaterThanShareResultWithPatientImmediately: Coding = { code: 'SIMM', display: 'Share Immediately -

Share result with patient immediately', @@ -174854,12 +175373,13 @@ const v2_0909_ShareToBeDeterminedLessThanPGreaterThanCategoryToBeDetermined: Cod display: 'Share To Be Determined -

Category to be determined', system: 'http://terminology.hl7.org/CodeSystem/v2-0909', }; -const v2_0909_ShareWithinNormalLimitsLessThanPGreaterThanShareResultInReferenceTherapeuticRangeWithPatientImmediatelyLessThanPGreaterThanShareResultOutOfReferenceTherapeuticRangesWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay: Coding = { - code: 'SWNL', - display: - 'Share Within Normal Limits -

Share result in reference/therapeutic range with patient immediately

Share result out of reference/therapeutic ranges with patient after 1 or more business day as agreed to by the systems in play.', - system: 'http://terminology.hl7.org/CodeSystem/v2-0909', -}; +const v2_0909_ShareWithinNormalLimitsLessThanPGreaterThanShareResultInReferenceTherapeuticRangeWithPatientImmediatelyLessThanPGreaterThanShareResultOutOfReferenceTherapeuticRangesWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay: Coding = + { + code: 'SWNL', + display: + 'Share Within Normal Limits -

Share result in reference/therapeutic range with patient immediately

Share result out of reference/therapeutic ranges with patient after 1 or more business day as agreed to by the systems in play.', + system: 'http://terminology.hl7.org/CodeSystem/v2-0909', + }; const v2_0909_ShareWithholdLessThanPGreaterThanWithholdResultRegardlessOfReferenceTherapeuticRanges: Coding = { code: 'SWTH', display: 'Share Withhold -

Withhold result regardless of reference/therapeutic ranges', @@ -174869,12 +175389,17 @@ const v2_0909_ShareWithholdLessThanPGreaterThanWithholdResultRegardlessOfReferen * FHIR Value set/code system definition for HL7 v2 table 0909 ( Patient Results Release Categorization Scheme) */ export const V20909 = { - ShareIn1DayLessThanPGreaterThanShareResultRegardlessOfReferenceTherapeuticRangeAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay: v2_0909_ShareIn1DayLessThanPGreaterThanShareResultRegardlessOfReferenceTherapeuticRangeAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay, - ShareIn1DayConditionallyLessThanPGreaterThanShareResultInReferenceRangesTherapeuticWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlayLessThanPGreaterThanWithholdResultOutOfReferenceTherapeuticRangeUntilPhysicianRelease: v2_0909_ShareIn1DayConditionallyLessThanPGreaterThanShareResultInReferenceRangesTherapeuticWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlayLessThanPGreaterThanWithholdResultOutOfReferenceTherapeuticRangeUntilPhysicianRelease, - ShareImmediatelyLessThanPGreaterThanShareResultWithPatientImmediately: v2_0909_ShareImmediatelyLessThanPGreaterThanShareResultWithPatientImmediately, + ShareIn1DayLessThanPGreaterThanShareResultRegardlessOfReferenceTherapeuticRangeAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay: + v2_0909_ShareIn1DayLessThanPGreaterThanShareResultRegardlessOfReferenceTherapeuticRangeAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay, + ShareIn1DayConditionallyLessThanPGreaterThanShareResultInReferenceRangesTherapeuticWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlayLessThanPGreaterThanWithholdResultOutOfReferenceTherapeuticRangeUntilPhysicianRelease: + v2_0909_ShareIn1DayConditionallyLessThanPGreaterThanShareResultInReferenceRangesTherapeuticWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlayLessThanPGreaterThanWithholdResultOutOfReferenceTherapeuticRangeUntilPhysicianRelease, + ShareImmediatelyLessThanPGreaterThanShareResultWithPatientImmediately: + v2_0909_ShareImmediatelyLessThanPGreaterThanShareResultWithPatientImmediately, ShareToBeDeterminedLessThanPGreaterThanCategoryToBeDetermined: v2_0909_ShareToBeDeterminedLessThanPGreaterThanCategoryToBeDetermined, - ShareWithinNormalLimitsLessThanPGreaterThanShareResultInReferenceTherapeuticRangeWithPatientImmediatelyLessThanPGreaterThanShareResultOutOfReferenceTherapeuticRangesWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay: v2_0909_ShareWithinNormalLimitsLessThanPGreaterThanShareResultInReferenceTherapeuticRangeWithPatientImmediatelyLessThanPGreaterThanShareResultOutOfReferenceTherapeuticRangesWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay, - ShareWithholdLessThanPGreaterThanWithholdResultRegardlessOfReferenceTherapeuticRanges: v2_0909_ShareWithholdLessThanPGreaterThanWithholdResultRegardlessOfReferenceTherapeuticRanges, + ShareWithinNormalLimitsLessThanPGreaterThanShareResultInReferenceTherapeuticRangeWithPatientImmediatelyLessThanPGreaterThanShareResultOutOfReferenceTherapeuticRangesWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay: + v2_0909_ShareWithinNormalLimitsLessThanPGreaterThanShareResultInReferenceTherapeuticRangeWithPatientImmediatelyLessThanPGreaterThanShareResultOutOfReferenceTherapeuticRangesWithPatientAfter1OrMoreBusinessDayAsAgreedToByTheSystemsInPlay, + ShareWithholdLessThanPGreaterThanWithholdResultRegardlessOfReferenceTherapeuticRanges: + v2_0909_ShareWithholdLessThanPGreaterThanWithholdResultRegardlessOfReferenceTherapeuticRanges, }; const v2_0912_AlertAcknowledgingProvider: Coding = { code: 'AAP', @@ -175134,8 +175659,10 @@ export const V20912 = { Technician: v2_0912_Technician, Transcriptionist: v2_0912_Transcriptionist, VerifierVerifyingPerson: v2_0912_VerifierVerifyingPerson, - VerifyingPharmaceuticalSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID: v2_0912_VerifyingPharmaceuticalSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID, - VerifyingTreatmentSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID: v2_0912_VerifyingTreatmentSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID, + VerifyingPharmaceuticalSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID: + v2_0912_VerifyingPharmaceuticalSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID, + VerifyingTreatmentSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID: + v2_0912_VerifyingTreatmentSupplierNotSureHowToDissectPharmacistTreatmentSupplierQuoteSVerifierID, Waypoint: v2_0912_Waypoint, WaypointRecipient: v2_0912_WaypointRecipient, }; @@ -175256,7 +175783,8 @@ const v2_0919_ThisTestShouldBeExclusive: Coding = { * FHIR Value set/code system definition for HL7 v2 table 0919 ( Exclusive Test) */ export const V20919 = { - InSomeCasesThisTestShouldBeOnlyExclusivelyWithLikeTestsExamplesAreCytoOrPathology: v2_0919_InSomeCasesThisTestShouldBeOnlyExclusivelyWithLikeTestsExamplesAreCytoOrPathology, + InSomeCasesThisTestShouldBeOnlyExclusivelyWithLikeTestsExamplesAreCytoOrPathology: + v2_0919_InSomeCasesThisTestShouldBeOnlyExclusivelyWithLikeTestsExamplesAreCytoOrPathology, ThisTestCanBeIncludedWithAnyNumberOfOtherTests: v2_0919_ThisTestCanBeIncludedWithAnyNumberOfOtherTests, ThisTestShouldBeExclusive: v2_0919_ThisTestShouldBeExclusive, }; @@ -175342,9 +175870,11 @@ const v2_0923_WalkOutProcessInterruptedBeforeThePhlebotomistInsertsTheNeedleInTh * FHIR Value set/code system definition for HL7 v2 table 0923 ( Process Interruption) */ export const V20923 = { - AbortedRunProcessInterruptedAfterThePhlebotomistInsertsTheNeedleInTheDonorQuoteSArm: v2_0923_AbortedRunProcessInterruptedAfterThePhlebotomistInsertsTheNeedleInTheDonorQuoteSArm, + AbortedRunProcessInterruptedAfterThePhlebotomistInsertsTheNeedleInTheDonorQuoteSArm: + v2_0923_AbortedRunProcessInterruptedAfterThePhlebotomistInsertsTheNeedleInTheDonorQuoteSArm, ProcessWasNotInterrupted: v2_0923_ProcessWasNotInterrupted, - WalkOutProcessInterruptedBeforeThePhlebotomistInsertsTheNeedleInTheDonorQuoteSArm: v2_0923_WalkOutProcessInterruptedBeforeThePhlebotomistInsertsTheNeedleInTheDonorQuoteSArm, + WalkOutProcessInterruptedBeforeThePhlebotomistInsertsTheNeedleInTheDonorQuoteSArm: + v2_0923_WalkOutProcessInterruptedBeforeThePhlebotomistInsertsTheNeedleInTheDonorQuoteSArm, }; const v2_0924_Annual: Coding = { code: 'A', @@ -175466,7 +175996,8 @@ export const V20925 = { Infiltration: v2_0925_Infiltration, InstrumentPowerFailure: v2_0925_InstrumentPowerFailure, MissedInTissue: v2_0925_MissedInTissue, - NeedleAdjustmentThisMayNotEndAProcedureIfSuccessfulWillImpactComponentProduction: v2_0925_NeedleAdjustmentThisMayNotEndAProcedureIfSuccessfulWillImpactComponentProduction, + NeedleAdjustmentThisMayNotEndAProcedureIfSuccessfulWillImpactComponentProduction: + v2_0925_NeedleAdjustmentThisMayNotEndAProcedureIfSuccessfulWillImpactComponentProduction, PoorFlow: v2_0925_PoorFlow, VeinSpasm: v2_0925_VeinSpasm, }; @@ -186096,7 +186627,8 @@ export const V3ActCode = { /** * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. */ - CertifiedNeurologyWithSpecialQualificationsInChildNeurologyCare: v3_ActCode_CertifiedNeurologyWithSpecialQualificationsInChildNeurologyCare, + CertifiedNeurologyWithSpecialQualificationsInChildNeurologyCare: + v3_ActCode_CertifiedNeurologyWithSpecialQualificationsInChildNeurologyCare, /** * Description:Scope of responsibility taken on for specialty care as defined by the respective Specialty Board. */ @@ -188160,7 +188692,8 @@ export const V3ActCode = { * * French use case: A label for documents that the author chose to hide from the patient until the content can be disclose to the patient in a face to face meeting between a healthcare professional and the patient (in French law some results like cancer diagnosis or AIDS diagnosis must be announced to the patient by a healthcare professional and should not be find out by the patient alone). */ - NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization: v3_ActCode_NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization, + NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization: + v3_ActCode_NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization, /** * Description: Element in submitted message will not persist in data storage based on detected issue. */ @@ -205271,7 +205804,8 @@ export const V3EntityCode = { /** * Sodium polyanethol sulfonate in saline. Anticomplementary and antiphagocytic properties. Used in blood culture collection. */ - SodiumPolyanetholSulfonate035PercentIn085PercentSodiumChloride: v3_EntityCode_SodiumPolyanetholSulfonate035PercentIn085PercentSodiumChloride, + SodiumPolyanetholSulfonate035PercentIn085PercentSodiumChloride: + v3_EntityCode_SodiumPolyanetholSulfonate035PercentIn085PercentSodiumChloride, /** * Polymer separator gel with clot activator */ @@ -230418,7 +230952,8 @@ export const V3RefrainPolicy = { * * French use case: A label for documents that the author chose to hide from the patient until the content can be disclose to the patient in a face to face meeting between a healthcare professional and the patient (in French law some results like cancer diagnosis or AIDS diagnosis must be announced to the patient by a healthcare professional and should not be find out by the patient alone). */ - NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization: v3_ActCode_NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization, + NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization: + v3_ActCode_NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization, /** * Prohibition on collection of the information beyond time necessary to accomplish authorized purpose of use is prohibited. */ @@ -236131,7 +236666,8 @@ export const V3RoleCode = { /** * Ambulatory Health Care Facilities; Clinic/Center; Rehabilitation: Cardiac Facilities */ - AmbulatoryHealthCareFacilitiesClinicCenterRehabilitationCardiacFacilities: v3_RoleCode_AmbulatoryHealthCareFacilitiesClinicCenterRehabilitationCardiacFacilities, + AmbulatoryHealthCareFacilitiesClinicCenterRehabilitationCardiacFacilities: + v3_RoleCode_AmbulatoryHealthCareFacilitiesClinicCenterRehabilitationCardiacFacilities, /** * A person who has fled his or her home country to find a safe place elsewhere. */ @@ -241550,7 +242086,8 @@ export const V3SecurityPolicy = { * * French use case: A label for documents that the author chose to hide from the patient until the content can be disclose to the patient in a face to face meeting between a healthcare professional and the patient (in French law some results like cancer diagnosis or AIDS diagnosis must be announced to the patient by a healthcare professional and should not be find out by the patient alone). */ - NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization: v3_ActCode_NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization, + NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization: + v3_ActCode_NoDisclosureToPatientFamilyOrCaregiversWithoutAttendingProviderQuoteSAuthorization, /** * Prohibition on collection of the information beyond time necessary to accomplish authorized purpose of use is prohibited. */ @@ -241725,7 +242262,8 @@ export const V3ServiceDeliveryLocationRoleType = { /** * Ambulatory Health Care Facilities; Clinic/Center; Rehabilitation: Cardiac Facilities */ - AmbulatoryHealthCareFacilitiesClinicCenterRehabilitationCardiacFacilities: v3_RoleCode_AmbulatoryHealthCareFacilitiesClinicCenterRehabilitationCardiacFacilities, + AmbulatoryHealthCareFacilitiesClinicCenterRehabilitationCardiacFacilities: + v3_RoleCode_AmbulatoryHealthCareFacilitiesClinicCenterRehabilitationCardiacFacilities, /** * Cardiac catheterization lab */ diff --git a/src/util/choice.ts b/src/util/choice.ts index 4fb4a0b2..d416d555 100644 --- a/src/util/choice.ts +++ b/src/util/choice.ts @@ -27,11 +27,7 @@ export function hasCanonicalValueSet(item: QuestionnaireItem): boolean { return !!item.answerValueSet && item.answerValueSet.substr(0, 4) === 'http'; } -export function hasOptions( - resources: Resources | undefined, - item: QuestionnaireItem, - containedResources?: Resource[] -): boolean { +export function hasOptions(resources: Resources | undefined, item: QuestionnaireItem, containedResources?: Resource[]): boolean { const options = getOptions(resources, item, containedResources); return !!options && options.length > 0; } @@ -337,7 +333,7 @@ function createRadiogroupOptionFromValueString(value: string, readOnly: boolean) return createRadiogroupOption(value, value, readOnly); } -function getContainedOptions(item: QuestionnaireItem, containedResources?: Resource[]): Array | undefined { +export function getContainedOptions(item: QuestionnaireItem, containedResources?: Resource[]): Array | undefined { if (!item || !item.answerValueSet) { return undefined; } From 79ab8b153e26d42b4be7d74e35904f9e2e8c9da4 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:37:32 +0100 Subject: [PATCH 36/83] updated version --- CHANGES | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 898835cb..53f00572 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.4-beta02 + +--- + +- added displaying of table with the "table" extension set on group in fhir schema + ## 13.2.4-beta01 --- diff --git a/package.json b/package.json index 073377dd..034b8e7a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.4-beta01", + "version": "13.2.4-beta02", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 22b65e16738a2bb50742a4b18220a111b87e0585 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:46:46 +0100 Subject: [PATCH 37/83] bump version --- CHANGES | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 53f00572..d5af159c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -## 13.2.4-beta02 +## 13.2.4-beta03 --- diff --git a/package.json b/package.json index 034b8e7a..5c38fc1e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.4-beta02", + "version": "13.2.4-beta03", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 879bcfe785e018600800b4ab426ff29232b609b8 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:54:25 +0100 Subject: [PATCH 38/83] fix tests --- .../formcomponents/table/tables/__tests__/utils-spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/formcomponents/table/tables/__tests__/utils-spec.ts b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts index 3dd29a9d..f6be4d2e 100644 --- a/src/components/formcomponents/table/tables/__tests__/utils-spec.ts +++ b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts @@ -154,7 +154,7 @@ describe('extractValuesFromAnswer', () => { const result = extractValuesFromAnswer(type, singleAnswer); - expect(result).toEqual(['Ja']); // Assuming true maps to 'Ja' + expect(result).toEqual(['[X]']); }); it('should extract date value correctly', () => { From 19290f4d8e7ce4022c19a96f8100b347e8b4bfeb Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:02:22 +0100 Subject: [PATCH 39/83] version --- CHANGES | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d5af159c..ec63faac 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.4-beta04 + +--- + +- bump to correct version + ## 13.2.4-beta03 --- diff --git a/package.json b/package.json index 5c38fc1e..cd11d327 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.4-beta03", + "version": "13.2.4-beta04", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 9e89e82cd5c45fadce33c0ae6471b0dce88e56d2 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:02:48 +0100 Subject: [PATCH 40/83] fix quantity and gtable --- package-lock.json | 7 +- .../table/tables/gtable/utils.ts | 11 +- .../table/tables/table-hn2/interface.ts | 1 + .../table/tables/table-hn2/utils.ts | 6 +- .../formcomponents/table/tables/utils.ts | 17 +- src/preview/FormFillerPreview.tsx | 2 +- src/preview/skjema/NHN_Test_Table.json | 680 +++++++ src/preview/skjema/NHN_Test_multi.json | 1641 +++++++++++++++++ src/preview/skjema/text-bug.json | 85 + 9 files changed, 2426 insertions(+), 24 deletions(-) create mode 100644 src/preview/skjema/NHN_Test_Table.json create mode 100644 src/preview/skjema/NHN_Test_multi.json create mode 100644 src/preview/skjema/text-bug.json diff --git a/package-lock.json b/package-lock.json index f6f24b54..26cd6470 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@helsenorge/refero", - "version": "13.2.2-beta06", + "version": "13.2.4-beta04", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@helsenorge/refero", - "version": "13.2.2-beta06", + "version": "13.2.4-beta04", "license": "MIT", "dependencies": { "@types/react-collapse": "^5.0.1", @@ -53,9 +53,6 @@ "@typescript-eslint/parser": "^5.12.0", "@ungap/structured-clone": "^1.2.0", "@vitejs/plugin-react": "^4.2.1", - "@ungap/structured-clone": "^1.2.0", - "@vitejs/plugin-react": "^4.2.1", - "@vitejs/plugin-react": "^4.2.1", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "babel-jest": "^27.4.2", "babel-loader": "^8.2.3", diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index f0d7dc8f..5c477cda 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -8,7 +8,7 @@ import { } from '../../../../../types/fhir'; import { IGTable, IGTableColumn, IGTableHeaderItem, IGTableRow } from './interface'; -import { findFirstDefinedProperty, getEnabledQuestionnaireItemsWithAnswers } from '../utils'; +import { findFirstDefinedProperty, getEnabledQuestionnaireItemsWithAnswers, getPrimitiveValueFromItemType } from '../utils'; export const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): number => { if (items.length === 0) { @@ -17,23 +17,22 @@ export const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): numbe const numbers = items.map(item => item.answer?.length || 0); return Math.max(...numbers); }; -export const getValueFromAnswer = (rowIdx: number, answer?: QuestionnaireResponseItemAnswer[]): string => { - const answerItem = answer?.[rowIdx]; - +export const getValueFromAnswer = (rowIdx: number, item?: QuestionnaireResponseItem): string => { + const answerItem = item?.answer?.[rowIdx]; if (!answerItem) { return ''; } if (!!answerItem?.item?.length && answerItem.item.length > 0) { return ''; } - return findFirstDefinedProperty(answerItem)?.toString() || ''; + return getPrimitiveValueFromItemType((item as QuestionnaireItem).type, answerItem).toString() || ''; }; export const columnsForRowIndex = (answerItems: QuestionnaireResponseItem[], rowIdx: number): IGTableColumn[] => answerItems.map((item, colIdx) => ({ id: `empty-${rowIdx}-${colIdx}`, index: colIdx, - value: getValueFromAnswer(rowIdx, item.answer), + value: getValueFromAnswer(rowIdx, item), })); export const createTableRows = (items: QuestionnaireResponseItem[]): IGTableRow[] => { diff --git a/src/components/formcomponents/table/tables/table-hn2/interface.ts b/src/components/formcomponents/table/tables/table-hn2/interface.ts index 9cf04a5d..67c1614a 100644 --- a/src/components/formcomponents/table/tables/table-hn2/interface.ts +++ b/src/components/formcomponents/table/tables/table-hn2/interface.ts @@ -12,3 +12,4 @@ export interface ITableH2Row { export interface ITableH2 { rows: ITableH2Row; } +export type HeaderColumn = { display: string; code?: string }; diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index b83402ec..ca72d2d7 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -4,7 +4,7 @@ import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../.. import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; -import { ITableH2Row } from './interface'; +import { HeaderColumn, ITableH2Row } from './interface'; import CodingSystems, { TableColumnName, TableOrderingColum } from '../../../../../constants/codingsystems'; import codeSystems from '../../../../../constants/codingsystems'; import ItemType from '../../../../../constants/itemType'; @@ -30,7 +30,7 @@ export const getTableHN2bodyObject = ( const maxColumns = getNumberOfColums(items); const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); - + console.log(maxColumns); const tableRows: ITableH2Row[] = itemsToShow.reduce((acc, item) => { const columnIndex = findIndexByCode(item, codeSystems.TableColumn) - 1; const answer = getValueIfDataReceiver(item, questionnaireResponse) || []; @@ -82,8 +82,6 @@ export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined return columnToSortBy; }; -type HeaderColumn = { display: string; code?: string }; - export const getHeaderColumns = (coding: Coding[]): HeaderColumn[] => { return findCodeBySystem(coding, TableColumnName).map(code => ({ display: code.display || '', diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index ccced737..efec05d8 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -35,7 +35,7 @@ const extractValueFromQuantity = ( if (!quantity) return ''; switch (field) { case 'value': - return quantity.value ?? 0; + return `${quantity.value ?? 0} ${quantity.unit ?? ''} `; case 'unit': return quantity.unit ?? ''; case 'system': @@ -51,23 +51,23 @@ const extractValueFromDate = (inputValue?: string): string => { return ''; } const date = parseDate(String(inputValue)); - //TODO: Check if we can use language from state here return moment(date).locale('nb').format(DATEFORMATS.DATE); }; -const extractValueFromTime = (inputDate?: string): string => { - if (!inputDate) { +const extractValueFromTime = (inputTime?: string): string => { + if (!inputTime) { return ''; } - const date = parseDate(String(inputDate)); - const momentDate = moment(date); - return `${momentDate.hours()}${DateTimeConstants.TIME_SEPARATOR}${momentDate.minutes()}`; + const time = inputTime.split(DateTimeConstants.TIME_SEPARATOR); + if (time.length < 2) { + return ''; + } + return `${time[0]}${DateTimeConstants.TIME_SEPARATOR}${time[1]}`; }; const extractValueFromDateTime = (inputValue?: string): string => { if (!inputValue) { return ''; } const date = parseDate(String(inputValue)); - //TODO: Check if we can use language from state here return moment(date).locale('nb').format(DATEFORMATS.DATETIME); }; export const extractValueFromAttachment = ( @@ -107,6 +107,7 @@ export const getPrimitiveValueFromItemType = ( type: typeof ItemType[keyof typeof ItemType], res: QuestionnaireResponseItemAnswer ): string | number | never => { + console.log('getPrimitiveValueFromItemType', res); switch (type) { case ItemType.STRING: case ItemType.TEXT: diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 759146c4..b326dad5 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/multitable-skjema.json'; +import skjema from './skjema/NHN_Test_Table.json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; diff --git a/src/preview/skjema/NHN_Test_Table.json b/src/preview/skjema/NHN_Test_Table.json new file mode 100644 index 00000000..be7e9533 --- /dev/null +++ b/src/preview/skjema/NHN_Test_Table.json @@ -0,0 +1,680 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "89fad8fa-7193-4a80-a597-765c7c8a01ab", + "name": "NHN_Test_Table_SvaralternativerStyrer", + "title": "Table_SvaralternativerStyrer", + "version": "0.1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], + "security": [ + { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, + { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } + ] + }, + "useContext": [ + { + "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "valueCodeableConcept": { "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Table_SvaralternativerStyrer" }] } + } + ], + "contact": [{ "name": "http://www.nhn.no" }], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1102", + "version": "1.0", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", + "status": "draft", + "publisher": "Direktoratet for e-helse", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" }, + { "code": "3", "display": "Vet ikke" } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "82d5de9c-242d-4649-8c14-3ede137438b3", + "type": "group", + "text": "Data inn Table", + "required": false, + "item": [ + { + "linkId": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "type": "choice", + "text": "Er du syk", + "required": false, + "answerValueSet": "#1102", + "item": [ + { + "linkId": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", + "type": "string", + "text": "Hva feiler det deg?", + "required": false, + "enableWhen": [ + { + "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + }, + { + "linkId": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "type": "choice", + "text": "Er du uvel?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ], + "item": [ + { + "linkId": "7953faf6-55f4-406b-873b-ef167d7a1fbc", + "type": "time", + "text": "Når ble du uvel?", + "required": false, + "enableWhen": [ + { + "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "638764d4-baea-46d1-9e81-d98ff1c56b4d", + "type": "string", + "text": "Hva følte du?", + "required": false, + "enableWhen": [ + { + "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + }, + { + "linkId": "2db8bc54-237f-411c-e3c6-448cef6ec29c", + "type": "choice", + "text": "Vet du hvilken dag og hva klokken er?", + "item": [ + { + "linkId": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", + "type": "date", + "text": "Dato", + "required": false, + "enableWhen": [ + { + "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", + "type": "time", + "text": "Klokken", + "required": false, + "enableWhen": [ + { + "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ], + "required": false, + "answerValueSet": "#1102" + }, + { + "linkId": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "type": "choice", + "text": "Kan du notere ned data om deg?", + "item": [ + { + "linkId": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", + "type": "quantity", + "text": "Vekt", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + } + ], + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "e46b791e-7b83-47c7-8511-0e42751adc0a", + "type": "quantity", + "text": "Høyde", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + } + ], + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "f79dfabb-a788-445d-ba7a-a846b34e4b17", + "type": "integer", + "text": "Antall ganger du går på tur i løpet av uken", + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "1246b383-dc6e-43d9-a68e-03213b255739", + "type": "boolean", + "text": "Er disse verdiene korrekte, hak av", + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ], + "required": false, + "answerValueSet": "#1102" + } + ] + }, + { + "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", + "type": "group", + "text": "Oppsummering Table - Svaralternativer styrer", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", + "type": "group", + "text": "Oppsummering ", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table" }] + } + } + ], + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "7aef743f-0d06-45dc-9155-6566c203a3b6" + } + ], + "item": [ + { + "linkId": "a58a1ed6-30c3-409c-8578-ffccf6f378d0", + "type": "display", + "text": "Her kommer en oppsummering av dine svar \"Displaytext\"", + "required": false + }, + { + "linkId": "bab6ece9-d978-4601-9169-7dcf9c6e0007", + "type": "choice", + "text": "Er du syk", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='c01b4389-6597-4b81-95d9-f54f61ea2cb8').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", "operator": "exists" }], + "_text": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", "valueMarkdown": "Er du syk" }] + }, + "code": [ + { + "code": "Default", + "display": "Viser kun besvarte alternativer", + "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", + "id": "6530d2e2-9654-4f1d-84a4-65cd3f12941c" + } + ], + "item": [ + { + "linkId": "54338f3c-5922-4ff5-87d9-26477c966e7f", + "type": "string", + "text": "Hva feiler det deg?", + "required": false, + "enableWhen": [ + { + "question": "bab6ece9-d978-4601-9169-7dcf9c6e0007", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='260f5f7c-ada3-49f3-8d50-166ee1ba4afa').answer.value" + } + ], + "readOnly": true + } + ] + }, + { + "linkId": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "type": "choice", + "text": "Er du uvel?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='04ccb620-ba66-4bed-d29a-08fb9e95c41f').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", "operator": "exists" }], + "item": [ + { + "linkId": "7178ee96-a482-4e76-8f22-c3f3b31c08cd", + "type": "time", + "text": "Når ble du uvel?", + "required": false, + "enableWhen": [ + { + "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "7953faf6-55f4-406b-873b-ef167d7a1fbc", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='7953faf6-55f4-406b-873b-ef167d7a1fbc').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "7757a10f-e627-40ee-d105-170d07859c2f", + "type": "string", + "text": "Hva følte du?", + "required": false, + "enableWhen": [ + { + "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "638764d4-baea-46d1-9e81-d98ff1c56b4d", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='638764d4-baea-46d1-9e81-d98ff1c56b4d').answer.value" + } + ], + "readOnly": true + } + ] + }, + { + "linkId": "8fbf52cc-3bf3-4fa1-d1be-f2dff1bc0b24", + "type": "choice", + "text": "Vet du hvilken dag og hva klokken er?", + "item": [ + { + "linkId": "f49cf9ae-0ee5-4947-86b9-b2e82380f1ac", + "type": "date", + "text": "Dato", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='29c5579a-cf2b-43b9-f55c-0d239ccaf02c').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "8b86f173-d126-4c73-8c89-10ee9cc45535", + "type": "time", + "text": "Klokken", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='9acb4110-ea0a-48b4-985c-fdb2cf572de3').answer.value" + } + ], + "readOnly": true + } + ], + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='2db8bc54-237f-411c-e3c6-448cef6ec29c').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", "operator": "exists" }] + }, + { + "linkId": "1106fee1-475a-4018-f554-382985276782", + "type": "choice", + "text": "Kan du notere ned data om deg?", + "item": [ + { + "linkId": "5b935dbb-9041-480e-88e6-ef76ec1fb102", + "type": "quantity", + "text": "Vekt", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='56800262-18bb-4d0f-8a08-ea22f5fc4e01').answer.value" + } + ], + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", "operator": "exists" }], + "readOnly": true + }, + { + "linkId": "657c9c87-b5f9-4b0b-8fad-91ab8697f039", + "type": "quantity", + "text": "Høyde", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e46b791e-7b83-47c7-8511-0e42751adc0a').answer.value" + } + ], + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "e46b791e-7b83-47c7-8511-0e42751adc0a", "operator": "exists" }], + "readOnly": true + }, + { + "linkId": "c2be52a9-f7d6-4ea1-bdcf-8c5192ed25a5", + "type": "integer", + "text": "Antall ganger du går på tur i løpet av uken", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "f79dfabb-a788-445d-ba7a-a846b34e4b17", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f79dfabb-a788-445d-ba7a-a846b34e4b17').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "53847e9d-4cd4-4a92-8a8f-9c4fcd168e81", + "type": "boolean", + "text": "Er disse verdiene korrekte, hak av", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "1246b383-dc6e-43d9-a68e-03213b255739", "operator": "=" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='1246b383-dc6e-43d9-a68e-03213b255739').answer.value" + } + ], + "readOnly": true + } + ], + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "operator": "exists" }], + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='015337fd-a035-45ab-8fd5-286a2a5be7a1').answer.value" + } + ], + "readOnly": true + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + } + ] +} diff --git a/src/preview/skjema/NHN_Test_multi.json b/src/preview/skjema/NHN_Test_multi.json new file mode 100644 index 00000000..a3c40a78 --- /dev/null +++ b/src/preview/skjema/NHN_Test_multi.json @@ -0,0 +1,1641 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "1c90d68d-78d8-4c7b-b5fb-44c165babbcc", + "name": "NHN_Test_tableHN2", + "title": "tableHN2", + "description": "Skjema før time for nyrepasient", + "version": "0.1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], + "security": [ + { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, + { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } + ] + }, + "useContext": [ + { + "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "valueCodeableConcept": { "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "tableHN2" }] } + } + ], + "contact": [{ "name": "http://www.nhn.no" }], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ + { + "resourceType": "ValueSet", + "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", + "version": "1.0", + "name": "Viktighet", + "title": "Viktighet", + "date": "2023-03-29T13:43:26.881Z", + "status": "draft", + "publisher": "Viktighet", + "compose": { + "include": [ + { + "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", + "concept": [ + { "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", "code": "lite-viktig---0-", "display": "Lite viktig - 0 " }, + { "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", "code": "1", "display": "1" }, + { "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", "code": "2", "display": "2" }, + { "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", "code": "3", "display": "3" }, + { "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", "code": "4", "display": "4" }, + { "id": "50e5f8f0-db46-45f9-8fda-67039933756e", "code": "5", "display": "5" }, + { "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", "code": "6", "display": "6" }, + { "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", "code": "7", "display": "7" }, + { "id": "dc888467-ab8b-4412-82ca-0312edcc0695", "code": "8", "display": "8" }, + { "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", "code": "9", "display": "9" }, + { "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", "code": "veldig-viktig-10-", "display": "Veldig viktig 10 " } + ] + } + ] + } + }, + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1102", + "version": "1.0", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", + "status": "draft", + "publisher": "Direktoratet for e-helse", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" }, + { "code": "3", "display": "Vet ikke" } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "daa6209a-d17f-4dc3-9d00-2521b9f51300", + "type": "group", + "text": "Data inn Enkel HNtable", + "item": [ + { "linkId": "f5698097-d1e0-4cc2-f71c-95967e31b5e5", "type": "string", "text": "Hva heter du?", "required": false }, + { "linkId": "f0c73b0d-bc50-471e-ca76-e2f5098cc233", "type": "integer", "text": "Hvor gammel er du?", "required": false }, + { "linkId": "00e3693a-c80c-4a2d-842e-b92f9dbf97af", "type": "quantity", "text": "Hvor mye veier du?", "required": false }, + { "linkId": "bf036003-254b-4406-8b2a-8f62a899bb63", "type": "date", "text": "Hvilken dag er det?", "required": false }, + { "linkId": "58ed3341-94b3-4358-80c2-72df735d4bbe", "type": "time", "text": "Hva er klokka?", "required": false }, + { + "linkId": "fade11fc-b62f-4b4f-f414-4232fe024038", + "type": "choice", + "text": "Er du grei?", + "required": false, + "answerValueSet": "#1102" + }, + { "linkId": "b49f4f1b-c4d4-4d6c-8cf7-ffb556420404", "type": "boolean", "text": "Liker du dette, hak av", "required": false } + ], + "required": false + }, + { + "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", + "type": "group", + "text": "Data inn HNTable2 ", + "required": false, + "item": [ + { + "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", + "type": "boolean", + "text": "Hoven i beina", + "required": false, + "item": [ + { + "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] + }, + { + "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "type": "choice", + "text": "Viktighet Hoven i beina", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] + } + ] + }, + { + "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "type": "boolean", + "text": "Kløe i huden", + "required": false, + "item": [ + { + "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] + }, + { + "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "type": "choice", + "text": "Viktighet kløe i huden", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] + } + ] + } + ] + }, + { + "linkId": "82d5de9c-242d-4649-8c14-3ede137438b3", + "type": "group", + "text": "Data inn Table", + "required": false, + "item": [ + { + "linkId": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "type": "choice", + "text": "Er du syk", + "required": false, + "answerValueSet": "#1102", + "item": [ + { + "linkId": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", + "type": "string", + "text": "Hva feiler det deg?", + "required": false, + "enableWhen": [ + { + "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + }, + { + "linkId": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "type": "choice", + "text": "Er du uvel?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ], + "item": [ + { + "linkId": "7953faf6-55f4-406b-873b-ef167d7a1fbc", + "type": "time", + "text": "Når ble du uvel?", + "required": false, + "enableWhen": [ + { + "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "638764d4-baea-46d1-9e81-d98ff1c56b4d", + "type": "string", + "text": "Hva følte du?", + "required": false, + "enableWhen": [ + { + "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + } + ] + }, + { + "linkId": "4c8b9272-16b7-4fe0-8e16-6f86077709cb", + "type": "group", + "text": "Data inn i repeterende: GTable", + "required": false, + "item": [ + { + "linkId": "ba62ebba-244d-43b0-ac53-39dab184c953", + "type": "group", + "text": "Urin", + "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], + "required": false, + "repeats": true, + "item": [ + { "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", "type": "date", "text": "Dato", "required": false }, + { "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "type": "time", "text": "Klokkeslett", "required": false }, + { + "linkId": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", + "type": "quantity", + "text": "Milliliter urin", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + } + ], + "required": false + }, + { + "linkId": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", + "type": "quantity", + "text": "Vekt våt bleie", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } + } + ], + "required": false + } + ] + } + ] + }, + { + "linkId": "d6357cc9-8db9-4243-a30b-d2defcf1d3f3", + "type": "group", + "text": "Data inn HNtable1", + "required": false, + "item": [ + { "linkId": "75c421cb-1906-4224-9ea7-ae6368e8bb53", "type": "string", "text": "Hva heter du?", "required": false }, + { + "linkId": "43ccede7-bf41-414a-b4ef-5c9cd61dfd55", + "type": "choice", + "text": "Er du syk?", + "required": false, + "answerValueSet": "#1102", + "item": [ + { + "linkId": "3e229cf6-e8d5-4d15-8728-60005f679f12", + "type": "string", + "text": "Hva feiler det deg?", + "required": false, + "enableWhen": [ + { + "question": "43ccede7-bf41-414a-b4ef-5c9cd61dfd55", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + }, + { "linkId": "e2c92f3d-4dd8-47d3-c22f-6b9ceaea0f5d", "type": "date", "text": "Dagens dato?", "required": false }, + { "linkId": "2f64f661-7994-4a7b-900a-cddc6ecac3b3", "type": "time", "text": "Hva er klokka?", "required": false }, + { "linkId": "0c332f96-550d-45d5-8f0f-ae1465430542", "type": "quantity", "text": "Hva veier du?", "required": false }, + { + "linkId": "41d46a1d-8103-48ed-8564-7a3477e1836d", + "type": "choice", + "text": "Hak av for det du liker", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a45b2e7f-1fb5-47ac-809a-7e25a687e3dc", + "code": "banan", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Banan" + } + }, + { + "valueCoding": { + "id": "209e5eb0-ef12-4414-8115-b69a953ebc19", + "code": "eple", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Eple" + } + }, + { + "valueCoding": { + "id": "610ec855-43c6-4774-81e3-81b1fcc8e7c7", + "code": "pære", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Pære" + } + }, + { + "valueCoding": { + "id": "70c41380-7ffb-434e-f310-ef92786a0f85", + "code": "plomme", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Plomme" + } + }, + { + "valueCoding": { + "id": "197c3327-7191-4499-8d1d-3f548463e86b", + "code": "kirsebær", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Kirsebær" + } + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ] + }, + { + "linkId": "578883d4-1bdd-4662-8e7f-7a960a678b5c", + "type": "choice", + "text": "Velg det du liker best", + "code": [ + { + "code": "Full", + "display": "Full vising", + "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", + "id": "0e024fbb-438d-45e1-8ed1-317415636f0f" + } + ], + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a45b2e7f-1fb5-47ac-809a-7e25a687e3dc", + "code": "banan", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Banan" + } + }, + { + "valueCoding": { + "id": "209e5eb0-ef12-4414-8115-b69a953ebc19", + "code": "eple", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Eple" + } + }, + { + "valueCoding": { + "id": "610ec855-43c6-4774-81e3-81b1fcc8e7c7", + "code": "pære", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Pære" + } + }, + { + "valueCoding": { + "id": "70c41380-7ffb-434e-f310-ef92786a0f85", + "code": "plomme", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Plomme" + } + }, + { + "valueCoding": { + "id": "197c3327-7191-4499-8d1d-3f548463e86b", + "code": "kirsebær", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Kirsebær" + } + } + ] + } + ] + }, + { + "linkId": "85bcab33-b84b-4f9f-cd98-6bfa6dedc8c7", + "type": "group", + "text": "Oppsummering egendefinerte kolonner: HNTable2", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "c87dc79b-afd8-4ef5-8ebf-1b9d3a6a4d9f" + } + ], + "item": [ + { + "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", + "type": "group", + "text": "table-HN2 Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn2" }] + } + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" + }, + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" + }, + { + "code": "ND", + "display": "NumericDescending", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" + }, + { + "code": "2", + "display": "Column 2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" + } + ], + "item": [ + { + "linkId": "b89fda34-0e7f-4512-9ffe-0299d19f00fd", + "type": "group", + "text": "Hoven i beina", + "required": false, + "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] + }, + { + "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", + "type": "choice", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", "operator": "exists" }], + "text": "Viktighet" + }, + { + "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", + "type": "choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [{ "answerBoolean": true, "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet" + }, + { + "linkId": "9ef47ae4-9c4e-4e0e-9792-4f55b30ccfcd", + "type": "group", + "text": "Kløe i huden", + "required": false, + "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] + }, + { + "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", + "type": "choice", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", "operator": "exists" }], + "text": "Viktiget" + }, + { + "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", + "type": "choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [{ "answerBoolean": true, "question": "926cc2a7-1853-46e6-8e98-cb3405730292", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet" + } + ] + } + ] + }, + { + "linkId": "165b10e9-4d23-4fb4-af96-2c0aae42ea00", + "type": "group", + "text": "table-HN2 Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn2" }] + } + } + ], + "code": [ + { + "code": "1", + "display": "Svar på ulike spørsmål", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "DESC", + "display": "AlfabeticDescending", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" + } + ], + "item": [ + { + "linkId": "2dc642a8-2c37-4f77-820b-77b4140c4347", + "type": "string", + "text": "Hva heter du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f5698097-d1e0-4cc2-f71c-95967e31b5e5').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "f5698097-d1e0-4cc2-f71c-95967e31b5e5", "operator": "exists" }] + }, + { + "linkId": "c80cdc6d-772a-44ad-8955-3d1c9a900942", + "type": "integer", + "text": "Hvor gammel er du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f0c73b0d-bc50-471e-ca76-e2f5098cc233').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "f0c73b0d-bc50-471e-ca76-e2f5098cc233", "operator": "exists" }] + }, + { + "linkId": "7b45f597-79ca-4c89-840c-38705bdaa198", + "type": "quantity", + "text": "Hvor mye veier du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='00e3693a-c80c-4a2d-842e-b92f9dbf97af').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "00e3693a-c80c-4a2d-842e-b92f9dbf97af", "operator": "exists" }] + }, + { + "linkId": "60beb1b1-0b63-49f9-fd45-e7b1d0c3c0d9", + "type": "date", + "text": "Hvilken dag er det?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='bf036003-254b-4406-8b2a-8f62a899bb63').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "bf036003-254b-4406-8b2a-8f62a899bb63", "operator": "exists" }] + }, + { + "linkId": "252778ab-7a89-4dc2-e691-bfc20701b9aa", + "type": "time", + "text": "Hva er klokka?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='58ed3341-94b3-4358-80c2-72df735d4bbe').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "58ed3341-94b3-4358-80c2-72df735d4bbe", "operator": "exists" }] + }, + { + "linkId": "5f88657a-1941-49da-8569-c6d509ec258d", + "type": "choice", + "text": "Er du grei?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='fade11fc-b62f-4b4f-f414-4232fe024038').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "fade11fc-b62f-4b4f-f414-4232fe024038", "operator": "exists" }] + }, + { + "linkId": "c18833bb-f241-4831-fbb6-f90308e327ee", + "type": "boolean", + "text": "Liker du dette, hak av", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='b49f4f1b-c4d4-4d6c-8cf7-ffb556420404').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "b49f4f1b-c4d4-4d6c-8cf7-ffb556420404", "operator": "=" }] + } + ] + }, + { + "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", + "type": "group", + "text": "Oppsummering Table - Svaralternativer styrer", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", + "type": "group", + "text": "Oppsummering ", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table" }] + } + } + ], + "item": [ + { + "linkId": "bab6ece9-d978-4601-9169-7dcf9c6e0007", + "type": "choice", + "text": "Er du syk", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='c01b4389-6597-4b81-95d9-f54f61ea2cb8').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", "operator": "exists" }], + "_text": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", "valueMarkdown": "**Er du syk**" }] + }, + "item": [ + { + "linkId": "54338f3c-5922-4ff5-87d9-26477c966e7f", + "type": "string", + "text": "Hva feiler det deg?", + "required": false, + "enableWhen": [ + { + "question": "bab6ece9-d978-4601-9169-7dcf9c6e0007", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='260f5f7c-ada3-49f3-8d50-166ee1ba4afa').answer.value" + } + ], + "readOnly": true + } + ] + }, + { + "linkId": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "type": "choice", + "text": "Er du uvel?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='04ccb620-ba66-4bed-d29a-08fb9e95c41f').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", "operator": "exists" }], + "item": [ + { + "linkId": "7178ee96-a482-4e76-8f22-c3f3b31c08cd", + "type": "time", + "text": "Når ble du uvel?", + "required": false, + "enableWhen": [ + { + "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "7953faf6-55f4-406b-873b-ef167d7a1fbc", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='7953faf6-55f4-406b-873b-ef167d7a1fbc').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "7757a10f-e627-40ee-d105-170d07859c2f", + "type": "string", + "text": "Hva følte du?", + "required": false, + "enableWhen": [ + { + "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "638764d4-baea-46d1-9e81-d98ff1c56b4d", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='638764d4-baea-46d1-9e81-d98ff1c56b4d').answer.value" + } + ], + "readOnly": true + } + ] + } + ] + } + ] + }, + { + "linkId": "4d6ef3f2-423b-4aee-c43b-a5a37b460269", + "type": "group", + "text": "Oppsummering repeterende GTable", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "0845d569-993b-418a-8a1d-7ce50400c65c", + "type": "group", + "text": "Oppsummering Her ligger kode for itemkontrol Gtable", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] + } + } + ], + "item": [ + { + "linkId": "ab203143-488d-4757-946b-ddfad942205a", + "type": "date", + "text": "Dato", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", "operator": "exists" }] + }, + { + "linkId": "01f1e567-abdc-46ee-8a41-cd571e930738", + "type": "time", + "text": "Klokkeslett", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "operator": "exists" }] + }, + { + "linkId": "7b1b5765-adb5-475b-a024-d9f68d5c9f8e", + "type": "quantity", + "text": "Vekt våt bleie", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", "operator": "exists" }] + }, + { + "linkId": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", + "type": "quantity", + "text": "Milliliter urin", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", "operator": "exists" }] + } + ] + } + ] + }, + { + "linkId": "501d01fd-cf9e-44e2-83ca-22761e1e9528", + "type": "group", + "text": "Oppsummering HNtable1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "55eaba22-6661-487f-ee24-c35e4e28fade", + "type": "group", + "text": "Oppsummering ", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn1" }] + } + } + ], + "item": [ + { + "linkId": "93d153e8-8af7-4f28-f9c2-7e32b0d6e96a", + "type": "string", + "text": "Hva heter du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='75c421cb-1906-4224-9ea7-ae6368e8bb53').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "75c421cb-1906-4224-9ea7-ae6368e8bb53", "operator": "exists" }] + }, + { + "linkId": "cbce1de8-680d-4e3a-f8a9-bb19b383c9ae", + "type": "choice", + "text": "Er du syk?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='43ccede7-bf41-414a-b4ef-5c9cd61dfd55').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "43ccede7-bf41-414a-b4ef-5c9cd61dfd55", "operator": "exists" }], + "item": [ + { + "linkId": "325fb864-8def-40eb-8972-c8313b203f72", + "type": "string", + "text": "Hva feiler det deg?", + "required": false, + "enableWhen": [ + { + "question": "cbce1de8-680d-4e3a-f8a9-bb19b383c9ae", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "3e229cf6-e8d5-4d15-8728-60005f679f12", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='3e229cf6-e8d5-4d15-8728-60005f679f12').answer.value" + } + ], + "readOnly": true + } + ] + }, + { + "linkId": "27e88b09-da99-4da4-82d8-18c8d1bb9055", + "type": "date", + "text": "Dagens dato?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e2c92f3d-4dd8-47d3-c22f-6b9ceaea0f5d').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "e2c92f3d-4dd8-47d3-c22f-6b9ceaea0f5d", "operator": "exists" }] + }, + { + "linkId": "5de34c6d-8034-442e-c1b9-758616ea4ba7", + "type": "time", + "text": "Hva er klokka?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='2f64f661-7994-4a7b-900a-cddc6ecac3b3').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "2f64f661-7994-4a7b-900a-cddc6ecac3b3", "operator": "exists" }] + }, + { + "linkId": "6db4dccc-4928-4708-814a-152a46faa3f9", + "type": "quantity", + "text": "Hva veier du?", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='0c332f96-550d-45d5-8f0f-ae1465430542').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "0c332f96-550d-45d5-8f0f-ae1465430542", "operator": "exists" }] + }, + { + "linkId": "f46419ee-93a3-4c2f-85af-a68a98edcb68", + "type": "choice", + "text": "Hak av for det du liker", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a45b2e7f-1fb5-47ac-809a-7e25a687e3dc", + "code": "banan", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Banan" + } + }, + { + "valueCoding": { + "id": "209e5eb0-ef12-4414-8115-b69a953ebc19", + "code": "eple", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Eple" + } + }, + { + "valueCoding": { + "id": "610ec855-43c6-4774-81e3-81b1fcc8e7c7", + "code": "pære", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Pære" + } + }, + { + "valueCoding": { + "id": "70c41380-7ffb-434e-f310-ef92786a0f85", + "code": "plomme", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Plomme" + } + }, + { + "valueCoding": { + "id": "197c3327-7191-4499-8d1d-3f548463e86b", + "code": "kirsebær", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Kirsebær" + } + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='41d46a1d-8103-48ed-8564-7a3477e1836d').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "41d46a1d-8103-48ed-8564-7a3477e1836d", "operator": "exists" }] + }, + { + "linkId": "da9aac36-7372-490e-80fd-00a1f2626037", + "type": "choice", + "text": "Velg det du liker best", + "code": [ + { + "code": "Full", + "display": "Full vising", + "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", + "id": "0e024fbb-438d-45e1-8ed1-317415636f0f" + } + ], + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a45b2e7f-1fb5-47ac-809a-7e25a687e3dc", + "code": "banan", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Banan" + } + }, + { + "valueCoding": { + "id": "209e5eb0-ef12-4414-8115-b69a953ebc19", + "code": "eple", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Eple" + } + }, + { + "valueCoding": { + "id": "610ec855-43c6-4774-81e3-81b1fcc8e7c7", + "code": "pære", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Pære" + } + }, + { + "valueCoding": { + "id": "70c41380-7ffb-434e-f310-ef92786a0f85", + "code": "plomme", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Plomme" + } + }, + { + "valueCoding": { + "id": "197c3327-7191-4499-8d1d-3f548463e86b", + "code": "kirsebær", + "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", + "display": "Kirsebær" + } + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='578883d4-1bdd-4662-8e7f-7a960a678b5c').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "578883d4-1bdd-4662-8e7f-7a960a678b5c", "operator": "exists" }] + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + } + ] +} diff --git a/src/preview/skjema/text-bug.json b/src/preview/skjema/text-bug.json new file mode 100644 index 00000000..40550ce2 --- /dev/null +++ b/src/preview/skjema/text-bug.json @@ -0,0 +1,85 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + } + ] + }, + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + } + ] + } + } + ], + "id": "be22c6cd-4e7d-4405-96a8-8cddf25c2a87", + "item": [ + { + "linkId": "17a35d08-8d69-480e-e5da-ca74dbb6d04c", + "type": "text", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "asdasd adasda" + } + ], + "required": true, + "text": "hello der", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "hello der" + } + ] + } + } + ] +} From f83dee729001d3b3e73cf2e5232947f021a317a9 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:11:18 +0100 Subject: [PATCH 41/83] fixed showing different types correct and added some sugar --- .../table/tables/gtable/GTable.tsx | 16 +- .../table/tables/table-hn1/TableHn1.tsx | 6 +- .../table/tables/table-hn2/TableHeadHn2.tsx | 5 +- .../table/tables/table-hn2/TableHn2.tsx | 6 +- .../table/tables/table-hn2/utils.ts | 7 +- .../table/tables/table/utils.ts | 58 +- .../formcomponents/table/tables/utils.ts | 1 - src/preview/FormFillerPreview.tsx | 2 +- .../NHN_Test_tableHN2_Egendefinert.json | 1104 +++++++++++++++++ ...e-hn1-underliggende-sp\303\270rsmaal.json" | 540 ++++++++ 10 files changed, 1700 insertions(+), 45 deletions(-) create mode 100644 src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json create mode 100644 "src/preview/skjema/Table-hn1-underliggende-sp\303\270rsmaal.json" diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx index 4fc4c54f..d09e37aa 100644 --- a/src/components/formcomponents/table/tables/gtable/GTable.tsx +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -22,20 +22,22 @@ interface Props { const GTable = ({ items, questionnaireResponse }: Props): JSX.Element => { const gTable = getGtablebodyObject(items, questionnaireResponse); return gTable.rows.length > 0 ? ( - - - + + + {gTable?.headerRow?.map(column => ( - {column.value} + + {column.value} + ))} - + {gTable.rows.map(item => { return ( - + {item.columns.map(column => ( - + {column.value} ))} diff --git a/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx b/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx index 60ea8a57..c3f30c34 100644 --- a/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx +++ b/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx @@ -15,12 +15,12 @@ const TableHn1 = ({ items, questionnaireResponse }: Props): JSX.Element => { const answerValues = getTableHN1bodyObject(items, questionnaireResponse); return ( - + {answerValues.map(item => ( - + {item.columns.map(({ value, id, type }) => ( - + {value ?? ''} diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx index aa691cf7..a4d9e810 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx @@ -21,14 +21,15 @@ const TableHeadHn2 = ({ tableCodesCoding, sortDir, setSortDir, sortable }: Props }; return ( - - + + {tableHeader.map(column => ( {column.display} diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 8ad01338..329c07ba 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -24,12 +24,12 @@ const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JS return rows.length ? ( - + {rows.map(item => { return ( - + {item.columns.map(column => ( - + {column.text} ))} diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index ca72d2d7..19e3e180 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -30,11 +30,14 @@ export const getTableHN2bodyObject = ( const maxColumns = getNumberOfColums(items); const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); - console.log(maxColumns); + const tableRows: ITableH2Row[] = itemsToShow.reduce((acc, item) => { const columnIndex = findIndexByCode(item, codeSystems.TableColumn) - 1; const answer = getValueIfDataReceiver(item, questionnaireResponse) || []; - const columnText = item.type === ItemType.DISPLAY ? item.text || '' : transformAnswersToListOfStrings(item.type, answer).join(', '); + const columnText = + item.type === ItemType.DISPLAY || item.type === ItemType.GROUP + ? item.text || '' + : transformAnswersToListOfStrings(item.type, answer).join(', '); let row = acc.find(r => r.columns[columnIndex]?.text === ''); if (!row) { diff --git a/src/components/formcomponents/table/tables/table/utils.ts b/src/components/formcomponents/table/tables/table/utils.ts index 81a55426..d7e851f2 100644 --- a/src/components/formcomponents/table/tables/table/utils.ts +++ b/src/components/formcomponents/table/tables/table/utils.ts @@ -54,7 +54,27 @@ export const createHeaderRow = (choiceValues: Options[], hasExtraColumn: boolean : []), ]; }; +const processItem = ( + item: QuestionnaireResponseItem, + index: number, + needsExtraColumn: boolean, + choiceValues?: Options[] +): StandardTableRow[] => { + const columns = createColumnsFromAnswers(item, choiceValues); + const processedColumns = needsExtraColumn ? columns : columns.slice(0, -1); + + const row: StandardTableRow = { + id: item.linkId, + index, + columns: processedColumns, + }; + const childRows = item.item + ? item.item.flatMap((child, childIndex) => processItem(child, childIndex, needsExtraColumn, choiceValues)) + : []; + + return [row, ...childRows]; +}; export const createBodyRows = ( items: QuestionnaireItem[], responseItems: QuestionnaireResponse, @@ -63,40 +83,28 @@ export const createBodyRows = ( ): StandardTableRow[] => { const answers = getEnabledQuestionnaireItemsWithAnswers(items, responseItems); - return answers.map((item: QuestionnaireResponseItem, index: number) => { - let columns = createColumnsFromAnswers(item, choiceValues); - - if (!needsExtraColumn) { - columns = columns.slice(0, -1); - } - - return { - id: item.linkId, - index, - columns, - }; - }); + return answers.flatMap((item, index) => processItem(item, index, needsExtraColumn, choiceValues)); }; - export const createRowsFromAnswersCodes = (item: QuestionnaireResponseItem, choiceValues?: Options[]): StandardTableColumn[] => { - const answerValue = item.answer?.[0]?.valueCoding?.code; return ( choiceValues?.map(value => ({ id: `${value.type}-${value.type}`, index: Number(value.type ?? 0), - value: answerValue === value.type ? 'X' : '', + value: item.answer?.some(x => { + return x.valueCoding?.code === value.type; + }) + ? 'X' + : '', })) || [] ); }; export const createColumnsFromAnswers = (item: QuestionnaireResponseItem, choiceValues?: Options[]): StandardTableColumn[] => { - const firstItem = item?.item?.[0]; - - const type = (firstItem as QuestionnaireItem)?.type; - const answer = firstItem?.answer; - const textAnswer = type && answer ? transformAnswersToListOfStrings(type, answer) : []; + const type = (item as QuestionnaireItem)?.type; + const answer = item?.answer; const choiceColumns = createRowsFromAnswersCodes(item, choiceValues); + const textAnswer = type && answer && choiceColumns.every(x => x.value === '') ? transformAnswersToListOfStrings(type, answer) : []; const columns: StandardTableColumn[] = [ createTableColumn(item.text || '', 0, `${item.linkId}-question`), ...choiceColumns, @@ -120,7 +128,7 @@ export const getStandardTableObject = ( } const choiceValues = getContainedOptions(firstItem, resource) || []; - const extraColumnNeeded = needsExtraColumn(items, responseItems, choiceValues); + const extraColumnNeeded = needsExtraColumn(items, responseItems); const rows = createBodyRows(items, responseItems, extraColumnNeeded, choiceValues); const header = createHeaderRow(choiceValues, extraColumnNeeded); @@ -136,11 +144,9 @@ export const findFirstChoiceItem = (items: QuestionnaireItem[]): QuestionnaireIt return items.find((item: QuestionnaireItem) => item.type === ItemType.CHOICE); }; -export const needsExtraColumn = (items: QuestionnaireItem[], responseItems: QuestionnaireResponse, choiceValues?: Options[]): boolean => { +export const needsExtraColumn = (items: QuestionnaireItem[], responseItems: QuestionnaireResponse): boolean => { const answers = getEnabledQuestionnaireItemsWithAnswers(items, responseItems) || []; - return answers.some(item => { - const lastColumnValue = createColumnsFromAnswers(item, choiceValues).slice(-1)[0]?.value; - return lastColumnValue !== ''; + return item?.item?.length && item.item.length > 0; }); }; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index efec05d8..1db130c4 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -107,7 +107,6 @@ export const getPrimitiveValueFromItemType = ( type: typeof ItemType[keyof typeof ItemType], res: QuestionnaireResponseItemAnswer ): string | number | never => { - console.log('getPrimitiveValueFromItemType', res); switch (type) { case ItemType.STRING: case ItemType.TEXT: diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index b326dad5..83abca60 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/NHN_Test_Table.json'; +import skjema from './skjema/Table-hn1-underliggende-spørsmaal.json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; diff --git a/src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json b/src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json new file mode 100644 index 00000000..5749746c --- /dev/null +++ b/src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json @@ -0,0 +1,1104 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "a6ea06ce-4fad-498d-97a0-29a49bbe7328", + "name": "NHN_Test_tableHN2_Egendefinerttabell", + "title": "Egendefinerttabell tableHN2", + "description": "Skjema før time for nyrepasient", + "version": "0.1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], + "security": [ + { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, + { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } + ] + }, + "useContext": [ + { + "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "valueCodeableConcept": { "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Egendefinerttabell tableHN2" }] } + } + ], + "contact": [{ "name": "http://www.nhn.no" }], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ + { + "resourceType": "ValueSet", + "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", + "version": "1.0", + "name": "Viktighet", + "title": "Viktighet", + "date": "2023-03-29T13:43:26.881Z", + "status": "draft", + "publisher": "Viktighet", + "compose": { + "include": [ + { + "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", + "concept": [ + { "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", "code": "lite-viktig---0-", "display": "Lite viktig - 0 " }, + { "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", "code": "1", "display": "1" }, + { "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", "code": "2", "display": "2" }, + { "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", "code": "3", "display": "3" }, + { "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", "code": "4", "display": "4" }, + { "id": "50e5f8f0-db46-45f9-8fda-67039933756e", "code": "5", "display": "5" }, + { "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", "code": "6", "display": "6" }, + { "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", "code": "7", "display": "7" }, + { "id": "dc888467-ab8b-4412-82ca-0312edcc0695", "code": "8", "display": "8" }, + { "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", "code": "9", "display": "9" }, + { "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", "code": "veldig-viktig-10-", "display": "Veldig viktig 10 " } + ] + } + ] + } + }, + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1102", + "version": "1.0", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", + "status": "draft", + "publisher": "Direktoratet for e-helse", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" }, + { "code": "3", "display": "Vet ikke" } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", + "type": "group", + "text": "Datakilde 1: HNTable2 ", + "required": false, + "item": [ + { + "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", + "type": "boolean", + "text": "Hoven i beina", + "required": false, + "item": [ + { + "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] + }, + { + "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "type": "choice", + "text": "Viktighet Hoven i beina", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] + } + ] + }, + { + "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "type": "boolean", + "text": "Kløe i huden", + "required": false, + "item": [ + { + "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", + "type": "choice", + "text": "Hvor alvorlig er det?", + "required": true, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] + }, + { + "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "type": "choice", + "text": "Viktighet kløe i huden", + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] + } + ] + } + ] + }, + { + "linkId": "97a234d3-32f8-407d-8a8a-a50a6bf62e32", + "type": "group", + "text": "Datakilde 1: HNTable2 ", + "item": [ + { "linkId": "0f5f4c2f-7a29-4baf-83aa-ed7c9c325175", "type": "date", "text": "Dato 1", "required": false }, + { + "linkId": "9e6a9b26-ec4f-4f9c-8012-77a501e2a59f", + "type": "quantity", + "text": "Quantiy 1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + } + ], + "required": false + }, + { "linkId": "31186f65-2a61-49ef-85ac-82e304a4c501", "type": "integer", "text": "Tall 1", "required": false }, + { "linkId": "4095e682-d3af-4844-8a2a-eda031b9f5f7", "type": "string", "text": "Tekstfelt 1", "required": false }, + { + "linkId": "4aa538b8-355a-479f-84b3-4bfd87ca7080", + "type": "choice", + "text": "Alternativer 1", + "required": false, + "answerValueSet": "#1102" + }, + { "linkId": "162f308e-d743-4027-81e0-2c7067285711", "type": "boolean", "text": "Bekreftelse 1", "required": false } + ], + "required": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", + "type": "group", + "text": "Oppsummering nr 1: table-HN2 Her ligger kode for itemkontrol, kolonner og sortering", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn2" }] + } + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" + }, + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" + }, + { + "code": "ASC", + "display": "Ascending", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" + }, + { + "code": "2", + "display": "Column 2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" + } + ], + "item": [ + { + "linkId": "b89fda34-0e7f-4512-9ffe-0299d19f00fd", + "type": "group", + "text": "Hoven i beina", + "required": false, + "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }], + "code": [ + { + "code": "1", + "display": "1", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "6cbda8db-a805-4bcc-9e42-560667f67073" + } + ] + }, + { + "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", + "type": "choice", + "extension": [ + { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", "valueMarkdown": "Velg viktighet på en skala fra 0-10" }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", "operator": "exists" }], + "text": "Viktighet", + "code": [ + { + "code": "2", + "display": "2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "831866b8-df4a-4090-8a1e-403341efae07" + } + ] + }, + { + "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", + "type": "choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [{ "answerBoolean": true, "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "code": [ + { + "code": "3", + "display": "3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "835ee228-510f-424d-da5e-c09bda721f6a" + } + ] + }, + { + "linkId": "9ef47ae4-9c4e-4e0e-9792-4f55b30ccfcd", + "type": "group", + "text": "Kløe i huden", + "required": false, + "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }], + "code": [ + { + "code": "1", + "display": "1", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "32dae3f2-a7da-4562-ee5b-758e828040e9" + } + ] + }, + { + "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", + "type": "choice", + "extension": [ + { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", "valueMarkdown": "Velg viktighet på en skala fra 0-10" }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", "operator": "exists" }], + "text": "Viktiget", + "code": [ + { + "code": "2", + "display": "2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "7bb503be-c5ea-4c02-82a8-1864201685d2" + } + ] + }, + { + "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", + "type": "choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [{ "answerBoolean": true, "question": "926cc2a7-1853-46e6-8e98-cb3405730292", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "code": [ + { + "code": "3", + "display": "3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "fa3217a1-3274-47d2-d527-df9bdcc56229" + } + ] + } + ] + }, + { + "linkId": "cf85b270-5e4c-4bc1-8ae8-b7526747fd89", + "type": "group", + "text": "Oppsummering nr 1: table-HN2 Her ligger kode for itemkontrol, kolonner og sortering DISPLAY", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn2" }] + } + } + ], + "code": [ + { + "code": "1", + "display": "Sykdom", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "2", + "display": "Viktighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" + }, + { + "code": "3", + "display": "Alvorlighet", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" + }, + { + "code": "ASC", + "display": "Ascending", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" + }, + { + "code": "2", + "display": "Column 2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" + } + ], + "item": [ + { + "linkId": "76fc4ecc-0037-4a89-8412-d91e2e545268", + "type": "display", + "text": "Hoven i Beina", + "code": [ + { + "code": "1", + "display": "1", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "64e58289-7e32-4284-8bd4-e8ecb9b0b0a0" + } + ], + "required": false, + "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] + }, + { + "linkId": "014001ef-0ec7-4bd5-81d0-61a4993ce603", + "type": "choice", + "extension": [ + { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", "valueMarkdown": "Velg viktighet på en skala fra 0-10" }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", "operator": "exists" }], + "text": "Viktighet", + "code": [ + { + "code": "2", + "display": "2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "831866b8-df4a-4090-8a1e-403341efae07" + } + ] + }, + { + "linkId": "7ea2bd99-a655-4cf8-ab10-c6b3841ed527", + "type": "choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [{ "answerBoolean": true, "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "code": [ + { + "code": "3", + "display": "3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "835ee228-510f-424d-da5e-c09bda721f6a" + } + ] + }, + { + "linkId": "4a9f9e27-10a4-429a-b6af-9df50a346709", + "type": "display", + "code": [ + { + "code": "1", + "display": "1", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "1a95d025-a860-4a39-8cac-949d06280457" + } + ], + "required": false, + "text": "Kløe i huden", + "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] + }, + { + "linkId": "8fc8fc3a-9f75-436f-f94e-eca94c3cc26f", + "type": "choice", + "extension": [ + { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", "valueMarkdown": "Velg viktighet på en skala fra 0-10" }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" + } + ], + "required": true, + "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", "operator": "exists" }], + "text": "Viktiget", + "code": [ + { + "code": "2", + "display": "2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "7bb503be-c5ea-4c02-82a8-1864201685d2" + } + ] + }, + { + "linkId": "396bdae6-0cc0-4f44-eee1-61f4b935c636", + "type": "choice", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "a25d348d-41eb-4252-e607-71a111d4d72f", + "code": "1", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "1" + } + }, + { + "valueCoding": { + "id": "7daca9c9-e639-473a-a4d1-61528b78462e", + "code": "2", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "2" + } + }, + { + "valueCoding": { + "id": "7c093c43-e94b-4d23-8c91-b26627776d62", + "code": "3", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "3" + } + }, + { + "valueCoding": { + "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", + "code": "4", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "4" + } + }, + { + "valueCoding": { + "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", + "code": "5", + "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", + "display": "5" + } + } + ], + "enableWhen": [{ "answerBoolean": true, "question": "926cc2a7-1853-46e6-8e98-cb3405730292", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" + } + ], + "readOnly": true, + "text": "Alvorlighet", + "code": [ + { + "code": "3", + "display": "3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "fa3217a1-3274-47d2-d527-df9bdcc56229" + } + ] + } + ] + }, + { + "linkId": "751fc534-f11f-4692-e437-e82e840ddd4c", + "type": "group", + "text": "Oppsummering nr 2 table-HN2 : Her ligger kode for itemkontrol, kolonner ", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn2" }] + } + } + ], + "code": [ + { + "code": "1", + "display": "Kolonne 1", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" + }, + { + "code": "2", + "display": "Kolonne 2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" + }, + { + "code": "3", + "display": "Kolonne 3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", + "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" + } + ], + "item": [ + { + "linkId": "0a7bbea6-a575-43e1-9b1f-1eafc300b4a6", + "type": "date", + "text": "Dato 1", + "code": [ + { + "code": "1", + "display": "1", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "0741e77c-13d0-4401-fd1d-02bf6f22a36f" + } + ], + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='0f5f4c2f-7a29-4baf-83aa-ed7c9c325175').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "0f5f4c2f-7a29-4baf-83aa-ed7c9c325175", "operator": "exists" }] + }, + { + "linkId": "69b68cc7-e68a-47fc-8dea-c8f49ee9f8e4", + "type": "quantity", + "text": "Quantiy 1", + "code": [ + { + "code": "2", + "display": "2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "e7fbe684-c1cf-4c4c-cf9a-869a8149e949" + } + ], + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='9e6a9b26-ec4f-4f9c-8012-77a501e2a59f').answer.value" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "9e6a9b26-ec4f-4f9c-8012-77a501e2a59f", "operator": "exists" }] + }, + { + "linkId": "914d0fb8-1975-4e96-db62-4f695f817184", + "type": "integer", + "text": "Tall 1", + "code": [ + { + "code": "3", + "display": "3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "84830f99-f10f-488f-8272-c0a334ff2025" + } + ], + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='31186f65-2a61-49ef-85ac-82e304a4c501').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "31186f65-2a61-49ef-85ac-82e304a4c501", "operator": "exists" }] + }, + { + "linkId": "8d423ca5-0cad-44a5-dff1-ad9df7c1eb72", + "type": "string", + "text": "Tekstfelt 1", + "code": [ + { + "code": "1", + "display": "1", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "baf1e456-f7ac-4647-e0c3-5debe95c8f5c" + } + ], + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='4095e682-d3af-4844-8a2a-eda031b9f5f7').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "4095e682-d3af-4844-8a2a-eda031b9f5f7", "operator": "exists" }] + }, + { + "linkId": "84e7463c-80f3-4f6d-87b5-1ba63c68ca08", + "type": "choice", + "text": "Alternativer 1", + "code": [ + { + "code": "2", + "display": "2", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "6dfbee4c-9191-426e-ec11-44b33c061132" + } + ], + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='4aa538b8-355a-479f-84b3-4bfd87ca7080').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "4aa538b8-355a-479f-84b3-4bfd87ca7080", "operator": "exists" }] + }, + { + "linkId": "907acec2-46b4-4c79-8b67-c7d9d3392de2", + "type": "boolean", + "text": "Bekreftelse 1", + "code": [ + { + "code": "3", + "display": "3", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "27bf9f13-556b-40a3-8d87-f43aa8830960" + } + ], + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='162f308e-d743-4027-81e0-2c7067285711').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "162f308e-d743-4027-81e0-2c7067285711", "operator": "=" }] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + } + ] +} diff --git "a/src/preview/skjema/Table-hn1-underliggende-sp\303\270rsmaal.json" "b/src/preview/skjema/Table-hn1-underliggende-sp\303\270rsmaal.json" new file mode 100644 index 00000000..a8b7f622 --- /dev/null +++ "b/src/preview/skjema/Table-hn1-underliggende-sp\303\270rsmaal.json" @@ -0,0 +1,540 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "543509c4-f8f6-467c-98ed-a8d79eb7dd34", + "name": "NHN_Test_tableHN2_ToKolonner", + "title": "Skjema med spørsmål og svar i to kolonner HN1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], + "security": [{ "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }] + }, + "contact": [{ "name": "http://www.nhn.no" }], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + } + ] + } + } + ], + "contained": [ + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1102", + "version": "1.0", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", + "status": "draft", + "publisher": "Direktoratet for e-helse", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" }, + { "code": "3", "display": "Vet ikke" } + ] + } + ] + } + }, + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1101", + "version": "1.0", + "name": "urn:oid:1101", + "title": "Ja / Nei (structor)", + "status": "draft", + "publisher": "NHN", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1101", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "233292d2-8b89-499f-80d7-0a3147f4beee", + "type": "group", + "text": "Om deg", + "item": [ + { + "linkId": "b3daf93a-79d2-427b-97b6-851d47b6805d", + "type": "choice", + "text": "Har du behov for tolk?", + "item": [ + { + "linkId": "0a1ab304-9e51-470a-8b18-3bf39916aca9", + "type": "string", + "text": "Hvilket språk", + "required": false, + "enableWhen": [ + { + "question": "b3daf93a-79d2-427b-97b6-851d47b6805d", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1101", "code": "1" } + } + ] + } + ], + "required": false, + "answerValueSet": "#1101" + }, + { "linkId": "0d145572-dbb4-4f31-dae4-8a4bd2541ecd", "type": "date", "text": "Dato for utfylling av skjema", "required": false }, + { + "linkId": "b50ee0da-fe63-4f34-85bb-70291f5b05dd", + "type": "time", + "text": "Klokkeslett for utfylling av skjema", + "required": false + }, + { + "linkId": "487e1464-464b-4f2d-864c-25b9f89743dd", + "type": "boolean", + "text": "Bekrefter at alt er riktig Boolean", + "required": false + } + ], + "required": false + }, + { + "linkId": "aa1adc47-0fc1-4816-9331-b30afd3cede1", + "type": "group", + "text": "Målinger", + "item": [ + { + "linkId": "61e78c98-e944-44c8-aebf-31055175700b", + "type": "quantity", + "text": "Høyde Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + } + ], + "required": false + }, + { + "linkId": "e2039ab0-995e-4de5-8bad-7d55f1a07fd6", + "type": "quantity", + "text": "Vekt Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + } + ], + "required": false + }, + { "linkId": "25ffd08b-e426-4b3c-b57a-dc3af0cec5fd", "type": "integer", "text": "Puls Int", "required": false }, + { + "linkId": "f96da2f9-2867-4073-86c4-d0a7affe5a35", + "type": "decimal", + "text": "Temperatur Desimal", + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], + "required": false + } + ], + "required": false + }, + { + "linkId": "c839b4d4-c865-40a8-f637-c7fdef8b6c20", + "type": "group", + "text": "Helse", + "required": false, + "item": [ + { + "linkId": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", + "type": "choice", + "text": "Har du hjertesykdom Choice", + "item": [ + { + "linkId": "cd7d7685-c587-4d0d-8e18-fd141b3d9f9a", + "type": "string", + "text": "Hvilken sykdom? Text", + "required": false, + "enableWhen": [ + { + "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "a49cd8ed-9ff1-46b9-8df5-694d537ef4cc", + "type": "date", + "text": "Når oppstod sykdommen?", + "required": false, + "enableWhen": [ + { + "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ], + "required": false, + "answerValueSet": "#1102" + } + ] + }, + { + "linkId": "94aaa25e-ef6d-41b1-cb1a-0873d9ec442c", + "type": "group", + "text": "Oppsummering Table-HN1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn1" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "77f0de4b-fe80-44d3-80a8-d348c26db7c6" + } + ], + "item": [ + { + "linkId": "44d7a94c-c474-4921-d538-00a8828785bd", + "type": "group", + "text": "Om deg", + "item": [ + { + "linkId": "d188bdca-2474-4231-f2a0-ba0304d33970", + "type": "choice", + "text": "Har du behov for tolk?", + "item": [ + { + "linkId": "d49af8c7-8b1f-4a64-9041-81f687bea423", + "type": "string", + "text": "Hvilket språk", + "required": false, + "enableWhen": [ + { + "question": "d188bdca-2474-4231-f2a0-ba0304d33970", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1101", "code": "1" } + }, + { "answerBoolean": true, "question": "0a1ab304-9e51-470a-8b18-3bf39916aca9", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='0a1ab304-9e51-470a-8b18-3bf39916aca9').answer.value" + } + ], + "readOnly": true + } + ], + "required": false, + "answerValueSet": "#1101", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='b3daf93a-79d2-427b-97b6-851d47b6805d').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "b3daf93a-79d2-427b-97b6-851d47b6805d", "operator": "exists" }] + }, + { + "linkId": "ee057a08-9ad7-4df5-f61e-36d81160f6b1", + "type": "date", + "text": "Dato for utfylling av skjema", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='0d145572-dbb4-4f31-dae4-8a4bd2541ecd').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "0d145572-dbb4-4f31-dae4-8a4bd2541ecd", "operator": "exists" }] + }, + { + "linkId": "729283e2-7817-4fae-8988-ed1f34982fc6", + "type": "time", + "text": "Klokkeslett for utfylling av skjema", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='b50ee0da-fe63-4f34-85bb-70291f5b05dd').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "b50ee0da-fe63-4f34-85bb-70291f5b05dd", "operator": "exists" }] + }, + { + "linkId": "42320bd5-d643-4ad2-ec91-b0592cbdc3a4", + "type": "boolean", + "text": "Bekrefter at alt er riktig Boolean", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='487e1464-464b-4f2d-864c-25b9f89743dd').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "487e1464-464b-4f2d-864c-25b9f89743dd", "operator": "=" }] + } + ], + "required": false + }, + { + "linkId": "0aecae09-86ab-4315-8060-140f1f9ac73e", + "type": "group", + "text": "Målinger", + "item": [ + { + "linkId": "38f4c8e5-1f3c-4971-819c-2642f0fe75f6", + "type": "quantity", + "text": "Høyde Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='61e78c98-e944-44c8-aebf-31055175700b').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "61e78c98-e944-44c8-aebf-31055175700b", "operator": "exists" }] + }, + { + "linkId": "e0e06cb7-45a1-48e6-a377-ea04e1d56b61", + "type": "quantity", + "text": "Vekt Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e2039ab0-995e-4de5-8bad-7d55f1a07fd6').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "e2039ab0-995e-4de5-8bad-7d55f1a07fd6", "operator": "exists" }] + }, + { + "linkId": "306bc34b-8d5f-4fb6-8a0c-7c076afbd406", + "type": "integer", + "text": "Puls Int", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='25ffd08b-e426-4b3c-b57a-dc3af0cec5fd').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "25ffd08b-e426-4b3c-b57a-dc3af0cec5fd", "operator": "exists" }] + }, + { + "linkId": "a3f471bb-18ce-4486-b5e0-01753787f2c2", + "type": "decimal", + "text": "Temperatur Desimal", + "extension": [ + { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f96da2f9-2867-4073-86c4-d0a7affe5a35').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "f96da2f9-2867-4073-86c4-d0a7affe5a35", "operator": "exists" }] + } + ], + "required": false + }, + { + "linkId": "f758033d-c805-422e-83a2-091e29ff6277", + "type": "group", + "text": "Helse", + "required": false, + "item": [ + { + "linkId": "cbe9a811-8dc8-456f-8763-650cff6a5683", + "type": "choice", + "text": "Har du hjertesykdom Choice", + "item": [ + { + "linkId": "430f2524-6e2d-412b-a9b6-55f79532adae", + "type": "string", + "text": "Hvilken sykdom? Text", + "required": false, + "enableWhen": [ + { + "question": "cbe9a811-8dc8-456f-8763-650cff6a5683", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "cd7d7685-c587-4d0d-8e18-fd141b3d9f9a", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='cd7d7685-c587-4d0d-8e18-fd141b3d9f9a').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "c7ef29f7-ab32-4e4e-8f07-d09327da708b", + "type": "date", + "text": "Når oppstod sykdommen?", + "required": false, + "enableWhen": [ + { + "question": "cbe9a811-8dc8-456f-8763-650cff6a5683", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "a49cd8ed-9ff1-46b9-8df5-694d537ef4cc", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='a49cd8ed-9ff1-46b9-8df5-694d537ef4cc').answer.value" + } + ], + "readOnly": true + } + ], + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='dc7933b7-4bf6-41d1-9b0a-6955fb19aa05').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", "operator": "exists" }] + } + ] + } + ] + } + ] +} From eabc74053ad31732f8020582238f933f9ce27ad3 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:59:25 +0100 Subject: [PATCH 42/83] version --- CHANGES | 7 +++++++ package.json | 2 +- src/preview/FormFillerPreview.tsx | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ec63faac..9c26a764 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +## 13.2.4-beta05 + +--- + +- fix displaying the correct values in tables +- fix standardtable to be displayed correct with child items + ## 13.2.4-beta04 --- diff --git a/package.json b/package.json index cd11d327..935fa762 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.4-beta04", + "version": "13.2.4-beta05", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 83abca60..4d478942 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/Table-hn1-underliggende-spørsmaal.json'; +import skjema from './skjema/kun_qest_hn1.json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; From fe2e884f630de4eecf433b959f34a40cf45ed3d5 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 17 Jan 2024 18:49:29 +0100 Subject: [PATCH 43/83] changed the test to reflect changes in code --- .../gtable/__tests__/gtable-utils-spec.ts | 19 +++++++++++++++---- .../table/tables/gtable/utils.ts | 9 ++------- .../__tests__/standartable-utils-spec.ts | 12 ++++-------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts index 74c0e97b..d1d25db8 100644 --- a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts +++ b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts @@ -12,7 +12,7 @@ import { getNumberOfRowsGTable, getValueFromAnswer, } from '../utils'; - +import ItemType from '../../../../../../constants/itemType'; type MockAnswerProps = Partial; type MockResponseItemProps = Partial; type MockQuestionnaireItemProps = Partial> & { @@ -75,6 +75,10 @@ describe('gtable-utils-spec', () => { }); }); describe('getValueFromAnswer', () => { + const generateMockQuestionnaireResponseItem = (answers?: QuestionnaireResponseItemAnswer[]): QuestionnaireResponseItem => { + return { answer: answers } as QuestionnaireResponseItem; + }; + it('should return an empty string if no answer is provided', () => { expect(getValueFromAnswer(0, undefined)).toBe(''); }); @@ -84,17 +88,20 @@ describe('gtable-utils-spec', () => { generateMockResponseAnswer({ valueString: 'Answer 1' }), generateMockResponseAnswer({ valueString: 'Answer 2' }), ]; - expect(getValueFromAnswer(1, answers)).toBe('Answer 2'); + const item = generateMockQuestionnaireResponseItem(answers); + expect(getValueFromAnswer(1, { ...item, type: ItemType.TEXT })).toBe('Answer 2'); }); it('should return an empty string if the index is out of bounds', () => { const answers: QuestionnaireResponseItemAnswer[] = [generateMockResponseAnswer({ valueString: 'Answer 1' })]; - expect(getValueFromAnswer(2, answers)).toBe(''); + const item = generateMockQuestionnaireResponseItem(answers); + expect(getValueFromAnswer(2, item)).toBe(''); }); it('should return an empty string if the answer at the index is empty', () => { const answers: QuestionnaireResponseItemAnswer[] = [generateMockResponseAnswer({ valueString: '' })]; - expect(getValueFromAnswer(0, answers)).toBe(''); + const item = generateMockQuestionnaireResponseItem(answers); + expect(getValueFromAnswer(0, item)).toBe(''); }); }); describe('columnsForRowIndex', () => { @@ -102,9 +109,13 @@ describe('gtable-utils-spec', () => { const answerItems: QuestionnaireResponseItem[] = [ generateMockResponseItem({ answer: [generateMockResponseAnswer({ valueString: 'Answer 1' }), generateMockResponseAnswer({ valueString: 'Answer 2' })], + //@ts-ignore + type: ItemType.TEXT, }), generateMockResponseItem({ answer: [generateMockResponseAnswer({ valueString: 'Another Answer 1' })], + //@ts-ignore + type: ItemType.TEXT, }), ]; const columns = columnsForRowIndex(answerItems, 0); diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index 5c477cda..a37eef29 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -1,14 +1,9 @@ import * as uuid from 'uuid'; -import { - QuestionnaireItem, - QuestionnaireResponse, - QuestionnaireResponseItem, - QuestionnaireResponseItemAnswer, -} from '../../../../../types/fhir'; +import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from '../../../../../types/fhir'; import { IGTable, IGTableColumn, IGTableHeaderItem, IGTableRow } from './interface'; -import { findFirstDefinedProperty, getEnabledQuestionnaireItemsWithAnswers, getPrimitiveValueFromItemType } from '../utils'; +import { getEnabledQuestionnaireItemsWithAnswers, getPrimitiveValueFromItemType } from '../utils'; export const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): number => { if (items.length === 0) { diff --git a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts index 37aded33..6074de45 100644 --- a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts +++ b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts @@ -327,7 +327,7 @@ describe('createColumnsFromAnswers', () => { { value: 'Question 1', index: 0, id: '1-question' }, { value: '', index: 1, id: '1-1' }, { value: '', index: 2, id: '2-2' }, - { value: 'A, B', index: 3, id: '1-answer' }, + { value: '', index: 3, id: '1-answer' }, ]); }); @@ -566,14 +566,14 @@ describe('needsExtraColumn', () => { expect(extraColumnNeeded).toBe(true); }); - it('should return false if all answers have an empty last column value', () => { + it('should return false if items have no children', () => { (tableUtils.getEnabledQuestionnaireItemsWithAnswers as jest.Mock).mockImplementation(() => { return [ { linkId: '1', text: 'Question 1', answer: [{ valueCoding: { code: 'A' } }] }, { linkId: '2', answer: [{ valueCoding: { code: 'B' } }], - item: [{ linkId: '3', text: 'Question 2', type: ItemType.STRING, answer: [{ valueString: '' }] }], + item: [], }, ] as QuestionnaireResponseItem[]; }); @@ -593,11 +593,7 @@ describe('needsExtraColumn', () => { { linkId: '2', answer: [{ valueCoding: { code: '2' } }] }, ], }; - const choiceValues: Options[] = [ - { type: '1', label: 'Option A' }, - { type: '2', label: 'Option B' }, - ]; - const extraColumnNeeded = needsExtraColumn(items, responseItems, choiceValues); + const extraColumnNeeded = needsExtraColumn(items, responseItems); expect(extraColumnNeeded).toBe(false); }); }); From dc4bd62a1464ff1e6417c3e0b5ba51a6fd4af8ec Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 17 Jan 2024 18:50:23 +0100 Subject: [PATCH 44/83] test update --- .../tables/table/__tests__/standartable-utils-spec.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts index 6074de45..800e749c 100644 --- a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts +++ b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts @@ -558,11 +558,8 @@ describe('needsExtraColumn', () => { }, ], }; - const choiceValues: Options[] = [ - { type: '1', label: 'Option A' }, - { type: '2', label: 'Option B' }, - ]; - const extraColumnNeeded = needsExtraColumn(items, responseItems, choiceValues); + + const extraColumnNeeded = needsExtraColumn(items, responseItems); expect(extraColumnNeeded).toBe(true); }); From 830cd42816b3489cdd23d438f41e833ca7dc9634 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:00:37 +0100 Subject: [PATCH 45/83] create union type for response item and item --- .../formcomponents/table/tables/interface.ts | 3 + .../table/tables/table-hn1/utils.ts | 6 +- .../table/tables/table-hn2/utils.ts | 10 +- .../__tests__/standartable-utils-spec.ts | 11 +- .../table/tables/table/utils.ts | 9 +- .../formcomponents/table/tables/utils.ts | 9 +- src/preview/FormFillerPreview.tsx | 2 +- .../NHN_Test_tableHN2_Egendefinert.json | 559 +++++++++++++++--- ...HN_Test_tableHN2_ToKolonner-nb-NO (1).json | 1 + 9 files changed, 515 insertions(+), 95 deletions(-) create mode 100644 src/components/formcomponents/table/tables/interface.ts create mode 100644 src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO (1).json diff --git a/src/components/formcomponents/table/tables/interface.ts b/src/components/formcomponents/table/tables/interface.ts new file mode 100644 index 00000000..7ccb0e94 --- /dev/null +++ b/src/components/formcomponents/table/tables/interface.ts @@ -0,0 +1,3 @@ +import { QuestionnaireItem, QuestionnaireResponseItem } from '../../../../types/fhir'; + +export type QuestionnaireItemAndResponseItemMerged = QuestionnaireItem & QuestionnaireResponseItem; diff --git a/src/components/formcomponents/table/tables/table-hn1/utils.ts b/src/components/formcomponents/table/tables/table-hn1/utils.ts index 134042a0..3c890f69 100644 --- a/src/components/formcomponents/table/tables/table-hn1/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn1/utils.ts @@ -2,9 +2,13 @@ import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } f import { ITableH1, ITableH1Column, ITableH1Row, TABLE_HN1_TABLE_TYPES } from './interface'; import ItemType from '../../../../../constants/itemType'; +import { QuestionnaireItemAndResponseItemMerged } from '../interface'; import { getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; -export const getTableHN1bodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): ITableH1 => { +export const getTableHN1bodyObject = ( + items: QuestionnaireItemAndResponseItemMerged[], + questionnaireResponse?: QuestionnaireResponse | null +): ITableH1 => { if (!questionnaireResponse || items.length === 0) { return []; } diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index 19e3e180..3a990a7f 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -8,7 +8,13 @@ import { HeaderColumn, ITableH2Row } from './interface'; import CodingSystems, { TableColumnName, TableOrderingColum } from '../../../../../constants/codingsystems'; import codeSystems from '../../../../../constants/codingsystems'; import ItemType from '../../../../../constants/itemType'; -import { filterEnabledQuestionnaireItems, findIndexByCode, getValueIfDataReceiver, transformAnswersToListOfStrings } from '../utils'; +import { + filterEnabledQuestionnaireItems, + findIndexByCode, + getEnabledQuestionnaireItemsWithAnswers, + getValueIfDataReceiver, + transformAnswersToListOfStrings, +} from '../utils'; const getNumberOfColums = (items: QuestionnaireItem[]): number => { if (items.length === 0) { @@ -29,7 +35,7 @@ export const getTableHN2bodyObject = ( const maxColumns = getNumberOfColums(items); - const itemsToShow = filterEnabledQuestionnaireItems(items, questionnaireResponse); + const itemsToShow = getEnabledQuestionnaireItemsWithAnswers(items, questionnaireResponse); const tableRows: ITableH2Row[] = itemsToShow.reduce((acc, item) => { const columnIndex = findIndexByCode(item, codeSystems.TableColumn) - 1; diff --git a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts index 800e749c..c02a4bac 100644 --- a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts +++ b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts @@ -17,6 +17,7 @@ import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, Re import * as choiceUtils from '../../../../../../util/choice'; import * as tableUtils from '../../utils'; +import { QuestionnaireItemAndResponseItemMerged } from '../../interface'; jest.mock('../../utils'); jest.mock('../../../../../../util/choice'); @@ -300,19 +301,18 @@ describe('createColumnsFromAnswers', () => { (tableUtils.transformAnswersToListOfStrings as jest.Mock).mockImplementation(() => { return ['A', 'B']; }); - const item: QuestionnaireResponseItem = { + const item: QuestionnaireItemAndResponseItemMerged = { linkId: '1', text: 'Question 1', + type: ItemType.CHOICE, item: [ { linkId: '1.1', - //@ts-ignore type: ItemType.CHOICE, answer: [{ valueCoding: { code: '1' } }], }, { linkId: '1.2', - //@ts-ignore type: ItemType.CHOICE, answer: [{ valueCoding: { code: '2' } }], }, @@ -335,17 +335,20 @@ describe('createColumnsFromAnswers', () => { (tableUtils.transformAnswersToListOfStrings as jest.Mock).mockImplementation(() => { return []; }); - const item: QuestionnaireResponseItem = { + const item: QuestionnaireItemAndResponseItemMerged = { linkId: '1', text: 'Question 1', + type: ItemType.CHOICE, item: [ { linkId: '1.1', answer: [{ valueCoding: { code: '1' } }], + type: ItemType.CHOICE, }, { linkId: '1.2', answer: [{ valueCoding: { code: '2' } }], + type: ItemType.CHOICE, }, ], }; diff --git a/src/components/formcomponents/table/tables/table/utils.ts b/src/components/formcomponents/table/tables/table/utils.ts index d7e851f2..bcbdb953 100644 --- a/src/components/formcomponents/table/tables/table/utils.ts +++ b/src/components/formcomponents/table/tables/table/utils.ts @@ -5,6 +5,7 @@ import { Options } from '@helsenorge/form/components/radio-group'; import { StandardTable, StandardTableColumn, StandardTableRow } from './interface'; import ItemType from '../../../../../constants/itemType'; import { getContainedOptions } from '../../../../../util/choice'; +import { QuestionnaireItemAndResponseItemMerged } from '../interface'; import { getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; export const emptyTable = (): StandardTable => { @@ -55,7 +56,7 @@ export const createHeaderRow = (choiceValues: Options[], hasExtraColumn: boolean ]; }; const processItem = ( - item: QuestionnaireResponseItem, + item: QuestionnaireItemAndResponseItemMerged, index: number, needsExtraColumn: boolean, choiceValues?: Options[] @@ -75,6 +76,7 @@ const processItem = ( return [row, ...childRows]; }; + export const createBodyRows = ( items: QuestionnaireItem[], responseItems: QuestionnaireResponse, @@ -85,6 +87,7 @@ export const createBodyRows = ( return answers.flatMap((item, index) => processItem(item, index, needsExtraColumn, choiceValues)); }; + export const createRowsFromAnswersCodes = (item: QuestionnaireResponseItem, choiceValues?: Options[]): StandardTableColumn[] => { return ( choiceValues?.map(value => ({ @@ -99,8 +102,8 @@ export const createRowsFromAnswersCodes = (item: QuestionnaireResponseItem, choi ); }; -export const createColumnsFromAnswers = (item: QuestionnaireResponseItem, choiceValues?: Options[]): StandardTableColumn[] => { - const type = (item as QuestionnaireItem)?.type; +export const createColumnsFromAnswers = (item: QuestionnaireItemAndResponseItemMerged, choiceValues?: Options[]): StandardTableColumn[] => { + const type = item?.type; const answer = item?.answer; const choiceColumns = createRowsFromAnswersCodes(item, choiceValues); diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 1db130c4..8f892abd 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -16,6 +16,7 @@ import { parseDate } from '@helsenorge/date-time/components/time-input/date-core import * as DateTimeConstants from '@helsenorge/date-time/constants/datetime'; import { DATEFORMATS } from './constants'; +import { QuestionnaireItemAndResponseItemMerged } from './interface'; import { OPEN_CHOICE_SYSTEM } from '../../../../constants'; import { CodeSystems } from '../../../../constants/codingsystems'; import ItemType from '../../../../constants/itemType'; @@ -288,14 +289,14 @@ export function findFirstDefinedProperty(obj: T): T[Extract] export const addAnswerToItems = ( items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null -): QuestionnaireResponseItem[] => { +): QuestionnaireItemAndResponseItemMerged[] => { if (!questionnaireResponse || items.length === 0) { return []; } - const processItem = (item: QuestionnaireItem): QuestionnaireResponseItem => { + const processItem = (item: QuestionnaireItem): QuestionnaireItemAndResponseItemMerged => { const res = getValueIfDataReceiver(item, questionnaireResponse); const clonedItems = structuredClone(item); - const questionnaireResponseItem: QuestionnaireResponseItem = { + const questionnaireResponseItem: QuestionnaireItemAndResponseItemMerged = { ...clonedItems, }; if (!Array.isArray(res) && res !== undefined) { @@ -316,7 +317,7 @@ export const addAnswerToItems = ( export const getEnabledQuestionnaireItemsWithAnswers = ( items?: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse -): QuestionnaireResponseItem[] => { +): QuestionnaireItemAndResponseItemMerged[] => { if (!items || !questionnaireResponse) return []; const filteredItems = filterEnabledQuestionnaireItems(items, questionnaireResponse); return addAnswerToItems(filteredItems, questionnaireResponse); diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 4d478942..72b1f89c 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/kun_qest_hn1.json'; +import skjema from './skjema/NHN_Test_tableHN2_Egendefinert.json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; diff --git a/src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json b/src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json index 5749746c..2b7d5685 100644 --- a/src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json +++ b/src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json @@ -10,35 +10,79 @@ "publisher": "NHN", "meta": { "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], "security": [ - { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, - { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + }, + { + "code": "1", + "display": "Kun innbygger selv", + "system": "http://helsenorge.no/fhir/KanUtforesAv" + } ] }, "useContext": [ { - "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, - "valueCodeableConcept": { "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Egendefinerttabell tableHN2" }] } + "code": { + "system": "http://hl7.org/fhir/ValueSet/usage-context-type", + "code": "focus", + "display": "Clinical Focus" + }, + "valueCodeableConcept": { + "coding": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1.8655", + "display": "Egendefinerttabell tableHN2" + } + ] + } + } + ], + "contact": [ + { + "name": "http://www.nhn.no" } ], - "contact": [{ "name": "http://www.nhn.no" }], "subjectType": ["Patient"], "extension": [ { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } }, { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", + "valueReference": { + "reference": "Endpoint/1" + } }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, { "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", "valueCodeableConcept": { "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-sublabel", @@ -52,7 +96,10 @@ ] } }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", + "valueBoolean": true + } ], "date": "2023-03-30T00:00:00+02:00", "contained": [ @@ -70,17 +117,61 @@ { "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", "concept": [ - { "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", "code": "lite-viktig---0-", "display": "Lite viktig - 0 " }, - { "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", "code": "1", "display": "1" }, - { "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", "code": "2", "display": "2" }, - { "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", "code": "3", "display": "3" }, - { "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", "code": "4", "display": "4" }, - { "id": "50e5f8f0-db46-45f9-8fda-67039933756e", "code": "5", "display": "5" }, - { "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", "code": "6", "display": "6" }, - { "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", "code": "7", "display": "7" }, - { "id": "dc888467-ab8b-4412-82ca-0312edcc0695", "code": "8", "display": "8" }, - { "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", "code": "9", "display": "9" }, - { "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", "code": "veldig-viktig-10-", "display": "Veldig viktig 10 " } + { + "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", + "code": "lite-viktig---0-", + "display": "Lite viktig - 0 " + }, + { + "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", + "code": "1", + "display": "1" + }, + { + "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", + "code": "2", + "display": "2" + }, + { + "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", + "code": "3", + "display": "3" + }, + { + "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", + "code": "4", + "display": "4" + }, + { + "id": "50e5f8f0-db46-45f9-8fda-67039933756e", + "code": "5", + "display": "5" + }, + { + "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", + "code": "6", + "display": "6" + }, + { + "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", + "code": "7", + "display": "7" + }, + { + "id": "dc888467-ab8b-4412-82ca-0312edcc0695", + "code": "8", + "display": "8" + }, + { + "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", + "code": "9", + "display": "9" + }, + { + "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", + "code": "veldig-viktig-10-", + "display": "Veldig viktig 10 " + } ] } ] @@ -100,9 +191,18 @@ { "system": "urn:oid:2.16.578.1.12.4.1.1102", "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" }, - { "code": "3", "display": "Vet ikke" } + { + "code": "1", + "display": "Ja" + }, + { + "code": "2", + "display": "Nei" + }, + { + "code": "3", + "display": "Vet ikke" + } ] } ] @@ -121,6 +221,14 @@ "type": "boolean", "text": "Hoven i beina", "required": false, + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Hoven i beina" + } + ] + }, "item": [ { "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", @@ -169,7 +277,13 @@ } } ], - "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] }, { "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", @@ -183,7 +297,13 @@ ], "required": true, "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] } ] }, @@ -240,7 +360,13 @@ } } ], - "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } + ] }, { "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", @@ -254,7 +380,13 @@ ], "required": true, "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } + ] } ] } @@ -264,8 +396,14 @@ "linkId": "97a234d3-32f8-407d-8a8a-a50a6bf62e32", "type": "group", "text": "Datakilde 1: HNTable2 ", + "required": false, "item": [ - { "linkId": "0f5f4c2f-7a29-4baf-83aa-ed7c9c325175", "type": "date", "text": "Dato 1", "required": false }, + { + "linkId": "0f5f4c2f-7a29-4baf-83aa-ed7c9c325175", + "type": "date", + "text": "Dato 1", + "required": false + }, { "linkId": "9e6a9b26-ec4f-4f9c-8012-77a501e2a59f", "type": "quantity", @@ -273,13 +411,35 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + "valueCoding": { + "code": "cm", + "display": "centimeter", + "system": "http://unitsofmeasure.org" + } } ], "required": false }, - { "linkId": "31186f65-2a61-49ef-85ac-82e304a4c501", "type": "integer", "text": "Tall 1", "required": false }, - { "linkId": "4095e682-d3af-4844-8a2a-eda031b9f5f7", "type": "string", "text": "Tekstfelt 1", "required": false }, + { + "linkId": "31186f65-2a61-49ef-85ac-82e304a4c501", + "type": "integer", + "text": "Tall 1", + "required": false + }, + { + "linkId": "4095e682-d3af-4844-8a2a-eda031b9f5f7", + "type": "string", + "text": "Tekstfelt 1", + "required": false, + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Tekstfelt 1" + } + ] + } + }, { "linkId": "4aa538b8-355a-479f-84b3-4bfd87ca7080", "type": "choice", @@ -287,19 +447,36 @@ "required": false, "answerValueSet": "#1102" }, - { "linkId": "162f308e-d743-4027-81e0-2c7067285711", "type": "boolean", "text": "Bekreftelse 1", "required": false } - ], - "required": false + { + "linkId": "162f308e-d743-4027-81e0-2c7067285711", + "type": "boolean", + "text": "Bekreftelse 1", + "required": false + } + ] }, { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } } ], "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-2", + "display": "SOT-2" + } + ], "_text": { "extension": [ { @@ -322,7 +499,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn2" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn2" + } + ] } } ], @@ -364,7 +546,13 @@ "type": "group", "text": "Hoven i beina", "required": false, - "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }], + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ], "code": [ { "code": "1", @@ -378,11 +566,19 @@ "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", "type": "choice", "extension": [ - { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", "valueMarkdown": "Velg viktighet på en skala fra 0-10" }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -393,7 +589,13 @@ "required": true, "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "operator": "exists" + } + ], "text": "Viktighet", "code": [ { @@ -450,12 +652,23 @@ } } ], - "enableWhen": [{ "answerBoolean": true, "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "operator": "exists" + } + ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -479,7 +692,13 @@ "type": "group", "text": "Kløe i huden", "required": false, - "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }], + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } + ], "code": [ { "code": "1", @@ -493,11 +712,19 @@ "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", "type": "choice", "extension": [ - { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", "valueMarkdown": "Velg viktighet på en skala fra 0-10" }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -508,7 +735,13 @@ "required": true, "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "operator": "exists" + } + ], "text": "Viktiget", "code": [ { @@ -565,12 +798,23 @@ } } ], - "enableWhen": [{ "answerBoolean": true, "question": "926cc2a7-1853-46e6-8e98-cb3405730292", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "926cc2a7-1853-46e6-8e98-cb3405730292", + "operator": "exists" + } + ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -600,7 +844,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn2" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn2" + } + ] } } ], @@ -650,17 +899,31 @@ } ], "required": false, - "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] + "enableWhen": [ + { + "question": "147ab493-0186-4a4e-8167-c10c829c09ca", + "operator": "=", + "answerBoolean": true + } + ] }, { "linkId": "014001ef-0ec7-4bd5-81d0-61a4993ce603", "type": "choice", "extension": [ - { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", "valueMarkdown": "Velg viktighet på en skala fra 0-10" }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -671,7 +934,13 @@ "required": true, "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", + "operator": "exists" + } + ], "text": "Viktighet", "code": [ { @@ -728,12 +997,23 @@ } } ], - "enableWhen": [{ "answerBoolean": true, "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", + "operator": "exists" + } + ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -765,17 +1045,31 @@ ], "required": false, "text": "Kløe i huden", - "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] + "enableWhen": [ + { + "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", + "operator": "=", + "answerBoolean": true + } + ] }, { "linkId": "8fc8fc3a-9f75-436f-f94e-eca94c3cc26f", "type": "choice", "extension": [ - { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", "valueMarkdown": "Velg viktighet på en skala fra 0-10" }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", + "valueMarkdown": "Velg viktighet på en skala fra 0-10" + }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -786,7 +1080,13 @@ "required": true, "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", + "operator": "exists" + } + ], "text": "Viktiget", "code": [ { @@ -843,12 +1143,23 @@ } } ], - "enableWhen": [{ "answerBoolean": true, "question": "926cc2a7-1853-46e6-8e98-cb3405730292", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "926cc2a7-1853-46e6-8e98-cb3405730292", + "operator": "exists" + } + ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -878,7 +1189,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn2" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table-hn2" + } + ] } } ], @@ -920,7 +1236,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -929,7 +1250,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "0f5f4c2f-7a29-4baf-83aa-ed7c9c325175", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "0f5f4c2f-7a29-4baf-83aa-ed7c9c325175", + "operator": "exists" + } + ] }, { "linkId": "69b68cc7-e68a-47fc-8dea-c8f49ee9f8e4", @@ -948,7 +1275,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -957,11 +1289,21 @@ }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + "valueCoding": { + "code": "cm", + "display": "centimeter", + "system": "http://unitsofmeasure.org" + } } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "9e6a9b26-ec4f-4f9c-8012-77a501e2a59f", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "9e6a9b26-ec4f-4f9c-8012-77a501e2a59f", + "operator": "exists" + } + ] }, { "linkId": "914d0fb8-1975-4e96-db62-4f695f817184", @@ -980,7 +1322,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -989,7 +1336,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "31186f65-2a61-49ef-85ac-82e304a4c501", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "31186f65-2a61-49ef-85ac-82e304a4c501", + "operator": "exists" + } + ] }, { "linkId": "8d423ca5-0cad-44a5-dff1-ad9df7c1eb72", @@ -1008,7 +1361,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -1017,7 +1375,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "4095e682-d3af-4844-8a2a-eda031b9f5f7", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "4095e682-d3af-4844-8a2a-eda031b9f5f7", + "operator": "exists" + } + ] }, { "linkId": "84e7463c-80f3-4f6d-87b5-1ba63c68ca08", @@ -1037,7 +1401,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -1046,7 +1415,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "4aa538b8-355a-479f-84b3-4bfd87ca7080", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "4aa538b8-355a-479f-84b3-4bfd87ca7080", + "operator": "exists" + } + ] }, { "linkId": "907acec2-46b4-4c79-8b67-c7d9d3392de2", @@ -1065,7 +1440,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -1074,7 +1454,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "162f308e-d743-4027-81e0-2c7067285711", "operator": "=" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "162f308e-d743-4027-81e0-2c7067285711", + "operator": "=" + } + ] } ] }, @@ -1082,11 +1468,24 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } } ], "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-3", + "display": "SOT-3" + } + ], "_text": { "extension": [ { diff --git a/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO (1).json b/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO (1).json new file mode 100644 index 00000000..7a4be1c4 --- /dev/null +++ b/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO (1).json @@ -0,0 +1 @@ +{"resourceType":"Questionnaire","language":"nb-NO","id":"543509c4-f8f6-467c-98ed-a8d79eb7dd34","name":"NHN_Test_tableHN2_ToKolonner","title":"Skjema med spørsmål og svar i to kolonner HN1","status":"draft","publisher":"NHN","meta":{"profile":["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"],"tag":[{"system":"urn:ietf:bcp:47","code":"nb-NO","display":"Bokmål"}],"security":[{"code":"3","display":"Helsehjelp (Full)","system":"urn:oid:2.16.578.1.12.4.1.1.7618"}]},"contact":[{"name":"http://www.nhn.no"}],"subjectType":["Patient"],"extension":[{"url":"http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar","valueCoding":{"system":"http://helsenorge.no/fhir/ValueSet/sdf-sidebar","code":"1"}},{"url":"http://helsenorge.no/fhir/StructureDefinition/sdf-information-message","valueCoding":{"system":"http://helsenorge.no/fhir/ValueSet/sdf-information-message","code":"1"}},{"url":"http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility","valueCodeableConcept":{"coding":[{"system":"http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions","code":"hide-help","display":"Hide help texts"},{"system":"http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions","code":"hide-sublabel","display":"Hide sublabel texts"}]}}],"contained":[{"url":"http://ehelse.no/fhir/ValueSet/Predefined","resourceType":"ValueSet","id":"1102","version":"1.0","name":"urn:oid:1102","title":"Ja / Nei / Vet ikke (structor)","status":"draft","publisher":"Direktoratet for e-helse","compose":{"include":[{"system":"urn:oid:2.16.578.1.12.4.1.1102","concept":[{"code":"1","display":"Ja"},{"code":"2","display":"Nei"},{"code":"3","display":"Vet ikke"}]}]}},{"url":"http://ehelse.no/fhir/ValueSet/Predefined","resourceType":"ValueSet","id":"1101","version":"1.0","name":"urn:oid:1101","title":"Ja / Nei (structor)","status":"draft","publisher":"NHN","compose":{"include":[{"system":"urn:oid:2.16.578.1.12.4.1.1101","concept":[{"code":"1","display":"Ja"},{"code":"2","display":"Nei"}]}]}}],"item":[{"linkId":"233292d2-8b89-499f-80d7-0a3147f4beee","type":"group","text":"Om deg","item":[{"linkId":"b3daf93a-79d2-427b-97b6-851d47b6805d","type":"choice","text":"Har du behov for tolk?","item":[{"linkId":"0a1ab304-9e51-470a-8b18-3bf39916aca9","type":"string","text":"Hvilket språk","required":false,"enableWhen":[{"question":"b3daf93a-79d2-427b-97b6-851d47b6805d","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1101","code":"1"}}]}],"required":false,"answerValueSet":"#1101"},{"linkId":"0d145572-dbb4-4f31-dae4-8a4bd2541ecd","type":"date","text":"Dato for utfylling av skjema","required":false},{"linkId":"b50ee0da-fe63-4f34-85bb-70291f5b05dd","type":"time","text":"Klokkeslett for utfylling av skjema","required":false},{"linkId":"487e1464-464b-4f2d-864c-25b9f89743dd","type":"boolean","text":"Bekrefter at alt er riktig Boolean","required":false}],"required":false},{"linkId":"aa1adc47-0fc1-4816-9331-b30afd3cede1","type":"group","text":"Målinger","item":[{"linkId":"61e78c98-e944-44c8-aebf-31055175700b","type":"quantity","text":"Høyde Quantity","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"cm","display":"centimeter","system":"http://unitsofmeasure.org"}}],"required":false},{"linkId":"e2039ab0-995e-4de5-8bad-7d55f1a07fd6","type":"quantity","text":"Vekt Quantity","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"kg","display":"kilo","system":"http://unitsofmeasure.org"}}],"required":false},{"linkId":"25ffd08b-e426-4b3c-b57a-dc3af0cec5fd","type":"integer","text":"Puls Int","required":false},{"linkId":"f96da2f9-2867-4073-86c4-d0a7affe5a35","type":"decimal","text":"Temperatur Desimal","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces","valueInteger":2}],"required":false}],"required":false},{"linkId":"c839b4d4-c865-40a8-f637-c7fdef8b6c20","type":"group","text":"Helse","required":false,"item":[{"linkId":"dc7933b7-4bf6-41d1-9b0a-6955fb19aa05","type":"choice","text":"Har du hjertesykdom Choice","item":[{"linkId":"cd7d7685-c587-4d0d-8e18-fd141b3d9f9a","type":"string","text":"Hvilken sykdom? Text","required":false,"enableWhen":[{"question":"dc7933b7-4bf6-41d1-9b0a-6955fb19aa05","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"a49cd8ed-9ff1-46b9-8df5-694d537ef4cc","type":"date","text":"Når oppstod sykdommen?","required":false,"enableWhen":[{"question":"dc7933b7-4bf6-41d1-9b0a-6955fb19aa05","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]}],"required":false,"answerValueSet":"#1102"}]},{"linkId":"94aaa25e-ef6d-41b1-cb1a-0873d9ec442c","type":"group","text":"Oppsummering Table-HN1","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"table-hn1"},{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"summary"},{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"summary-container"}]}}],"required":false,"code":[{"code":"1","display":"Default","system":"http://helsenorge.no/fhir/CodeSystem/RenderOptions","id":"77f0de4b-fe80-44d3-80a8-d348c26db7c6"}],"item":[{"linkId":"44d7a94c-c474-4921-d538-00a8828785bd","type":"group","text":"Om deg","item":[{"linkId":"d188bdca-2474-4231-f2a0-ba0304d33970","type":"choice","text":"Har du behov for tolk?","item":[{"linkId":"d49af8c7-8b1f-4a64-9041-81f687bea423","type":"string","text":"Hvilket språk","required":false,"enableWhen":[{"question":"d188bdca-2474-4231-f2a0-ba0304d33970","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1101","code":"1"}},{"answerBoolean":true,"question":"0a1ab304-9e51-470a-8b18-3bf39916aca9","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='0a1ab304-9e51-470a-8b18-3bf39916aca9').answer.value"}],"readOnly":true}],"required":false,"answerValueSet":"#1101","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='b3daf93a-79d2-427b-97b6-851d47b6805d').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"b3daf93a-79d2-427b-97b6-851d47b6805d","operator":"exists"}]},{"linkId":"ee057a08-9ad7-4df5-f61e-36d81160f6b1","type":"date","text":"Dato for utfylling av skjema","required":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='0d145572-dbb4-4f31-dae4-8a4bd2541ecd').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"0d145572-dbb4-4f31-dae4-8a4bd2541ecd","operator":"exists"}]},{"linkId":"729283e2-7817-4fae-8988-ed1f34982fc6","type":"time","text":"Klokkeslett for utfylling av skjema","required":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='b50ee0da-fe63-4f34-85bb-70291f5b05dd').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"b50ee0da-fe63-4f34-85bb-70291f5b05dd","operator":"exists"}]},{"linkId":"42320bd5-d643-4ad2-ec91-b0592cbdc3a4","type":"boolean","text":"Bekrefter at alt er riktig Boolean","required":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='487e1464-464b-4f2d-864c-25b9f89743dd').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"487e1464-464b-4f2d-864c-25b9f89743dd","operator":"="}]}],"required":false},{"linkId":"0aecae09-86ab-4315-8060-140f1f9ac73e","type":"group","text":"Målinger","item":[{"linkId":"38f4c8e5-1f3c-4971-819c-2642f0fe75f6","type":"quantity","text":"Høyde Quantity","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"cm","display":"centimeter","system":"http://unitsofmeasure.org"}},{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='61e78c98-e944-44c8-aebf-31055175700b').answer.value"}],"required":false,"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"61e78c98-e944-44c8-aebf-31055175700b","operator":"exists"}]},{"linkId":"e0e06cb7-45a1-48e6-a377-ea04e1d56b61","type":"quantity","text":"Vekt Quantity","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"kg","display":"kilo","system":"http://unitsofmeasure.org"}},{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='e2039ab0-995e-4de5-8bad-7d55f1a07fd6').answer.value"}],"required":false,"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"e2039ab0-995e-4de5-8bad-7d55f1a07fd6","operator":"exists"}]},{"linkId":"306bc34b-8d5f-4fb6-8a0c-7c076afbd406","type":"integer","text":"Puls Int","required":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='25ffd08b-e426-4b3c-b57a-dc3af0cec5fd').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"25ffd08b-e426-4b3c-b57a-dc3af0cec5fd","operator":"exists"}]},{"linkId":"a3f471bb-18ce-4486-b5e0-01753787f2c2","type":"decimal","text":"Temperatur Desimal","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces","valueInteger":2},{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='f96da2f9-2867-4073-86c4-d0a7affe5a35').answer.value"}],"required":false,"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"f96da2f9-2867-4073-86c4-d0a7affe5a35","operator":"exists"}]}],"required":false},{"linkId":"f758033d-c805-422e-83a2-091e29ff6277","type":"group","text":"Helse","required":false,"item":[{"linkId":"cbe9a811-8dc8-456f-8763-650cff6a5683","type":"choice","text":"Har du hjertesykdom Choice","item":[{"linkId":"430f2524-6e2d-412b-a9b6-55f79532adae","type":"string","text":"Hvilken sykdom? Text","required":false,"enableWhen":[{"question":"cbe9a811-8dc8-456f-8763-650cff6a5683","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"cd7d7685-c587-4d0d-8e18-fd141b3d9f9a","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='cd7d7685-c587-4d0d-8e18-fd141b3d9f9a').answer.value"}],"readOnly":true},{"linkId":"c7ef29f7-ab32-4e4e-8f07-d09327da708b","type":"date","text":"Når oppstod sykdommen?","required":false,"enableWhen":[{"question":"cbe9a811-8dc8-456f-8763-650cff6a5683","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"a49cd8ed-9ff1-46b9-8df5-694d537ef4cc","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='a49cd8ed-9ff1-46b9-8df5-694d537ef4cc').answer.value"}],"readOnly":true}],"required":false,"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='dc7933b7-4bf6-41d1-9b0a-6955fb19aa05').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"dc7933b7-4bf6-41d1-9b0a-6955fb19aa05","operator":"exists"}]}]}]}]} \ No newline at end of file From c699792a2447586edc45955f56f8c72f699edfab Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:25:38 +0100 Subject: [PATCH 46/83] fix hn2-bug --- .../table/tables/gtable/utils.ts | 9 +- .../formcomponents/table/tables/interface.ts | 4 +- .../table/tables/table-hn1/utils.ts | 4 +- .../table/tables/table-hn2/TableHn2.tsx | 1 + .../table/tables/table-hn2/utils.ts | 112 ++++++++++-------- .../table/tables/table/utils.ts | 6 +- .../formcomponents/table/tables/utils.ts | 12 +- 7 files changed, 82 insertions(+), 66 deletions(-) diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index a37eef29..7f2868e0 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -3,6 +3,7 @@ import * as uuid from 'uuid'; import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from '../../../../../types/fhir'; import { IGTable, IGTableColumn, IGTableHeaderItem, IGTableRow } from './interface'; +import { QuestionnaireItemWithAnswers } from '../interface'; import { getEnabledQuestionnaireItemsWithAnswers, getPrimitiveValueFromItemType } from '../utils'; export const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): number => { @@ -12,7 +13,7 @@ export const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): numbe const numbers = items.map(item => item.answer?.length || 0); return Math.max(...numbers); }; -export const getValueFromAnswer = (rowIdx: number, item?: QuestionnaireResponseItem): string => { +export const getValueFromAnswer = (rowIdx: number, item?: QuestionnaireItemWithAnswers): string => { const answerItem = item?.answer?.[rowIdx]; if (!answerItem) { return ''; @@ -20,17 +21,17 @@ export const getValueFromAnswer = (rowIdx: number, item?: QuestionnaireResponseI if (!!answerItem?.item?.length && answerItem.item.length > 0) { return ''; } - return getPrimitiveValueFromItemType((item as QuestionnaireItem).type, answerItem).toString() || ''; + return getPrimitiveValueFromItemType(item.type, answerItem).toString() || ''; }; -export const columnsForRowIndex = (answerItems: QuestionnaireResponseItem[], rowIdx: number): IGTableColumn[] => +export const columnsForRowIndex = (answerItems: QuestionnaireItemWithAnswers[], rowIdx: number): IGTableColumn[] => answerItems.map((item, colIdx) => ({ id: `empty-${rowIdx}-${colIdx}`, index: colIdx, value: getValueFromAnswer(rowIdx, item), })); -export const createTableRows = (items: QuestionnaireResponseItem[]): IGTableRow[] => { +export const createTableRows = (items: QuestionnaireItemWithAnswers[]): IGTableRow[] => { const numberOfRows = getNumberOfRowsGTable(items); return Array.from({ length: numberOfRows }, (_, rowIdx) => ({ diff --git a/src/components/formcomponents/table/tables/interface.ts b/src/components/formcomponents/table/tables/interface.ts index 7ccb0e94..dbd027a5 100644 --- a/src/components/formcomponents/table/tables/interface.ts +++ b/src/components/formcomponents/table/tables/interface.ts @@ -1,3 +1,5 @@ import { QuestionnaireItem, QuestionnaireResponseItem } from '../../../../types/fhir'; -export type QuestionnaireItemAndResponseItemMerged = QuestionnaireItem & QuestionnaireResponseItem; +export type QuestionnaireItemWithAnswers = QuestionnaireItem & { + answer?: QuestionnaireResponseItem['answer']; +}; diff --git a/src/components/formcomponents/table/tables/table-hn1/utils.ts b/src/components/formcomponents/table/tables/table-hn1/utils.ts index 3c890f69..eccc0f05 100644 --- a/src/components/formcomponents/table/tables/table-hn1/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn1/utils.ts @@ -2,11 +2,11 @@ import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } f import { ITableH1, ITableH1Column, ITableH1Row, TABLE_HN1_TABLE_TYPES } from './interface'; import ItemType from '../../../../../constants/itemType'; -import { QuestionnaireItemAndResponseItemMerged } from '../interface'; +import { QuestionnaireItemWithAnswers } from '../interface'; import { getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; export const getTableHN1bodyObject = ( - items: QuestionnaireItemAndResponseItemMerged[], + items: QuestionnaireItemWithAnswers[], questionnaireResponse?: QuestionnaireResponse | null ): ITableH1 => { if (!questionnaireResponse || items.length === 0) { diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 329c07ba..5c33d26d 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -15,6 +15,7 @@ interface Props { } const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { const sortIndex = getIndexToSortBy(tableCodesCoding); + const [sortDir, setSortDir] = useState(transformCodingToSortDirection(tableCodesCoding)); const [rows, setRows] = useState(getTableHN2bodyObject(items, questionnaireResponse, sortIndex, sortDir)); diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index 3a990a7f..ccad1ca6 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -1,26 +1,69 @@ -import * as uuid from 'uuid'; - import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; -import { HeaderColumn, ITableH2Row } from './interface'; +import { HeaderColumn, ITableH2Column, ITableH2Row } from './interface'; import CodingSystems, { TableColumnName, TableOrderingColum } from '../../../../../constants/codingsystems'; import codeSystems from '../../../../../constants/codingsystems'; import ItemType from '../../../../../constants/itemType'; -import { - filterEnabledQuestionnaireItems, - findIndexByCode, - getEnabledQuestionnaireItemsWithAnswers, - getValueIfDataReceiver, - transformAnswersToListOfStrings, -} from '../utils'; - -const getNumberOfColums = (items: QuestionnaireItem[]): number => { - if (items.length === 0) { - return 0; +import { QuestionnaireItemWithAnswers } from '../interface'; +import { findIndexByCode, getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; + +export const createTableStructure = (items: QuestionnaireItem[], itemsToShow: QuestionnaireItemWithAnswers[]): ITableH2Row[] => { + const groupItemsByColumn = (items: QuestionnaireItem[]): Map => + items.reduce((acc, item) => { + const columnIndex = findIndexByCode(item, codeSystems.TableColumn); + const itemsInColumn = acc.get(columnIndex) || []; + return acc.set(columnIndex, [...itemsInColumn, item]); + }, new Map()); + + const itemsByColumnIndex = groupItemsByColumn(items); + + const calculateNumberOfRows = (itemsMap: Map): number => + Math.max(...Array.from(itemsMap.values(), columnItems => columnItems.length)); + + const numberOfRows = calculateNumberOfRows(itemsByColumnIndex); + const numberOfColumns = itemsByColumnIndex.size; + + return Array.from({ length: numberOfRows }, (_, rowIndex) => ({ + id: `row-${rowIndex + 1}`, + columns: createColumnsForRow(rowIndex, numberOfColumns, itemsByColumnIndex, itemsToShow), + })); +}; + +const createColumnsForRow = ( + rowIndex: number, + numberOfColumns: number, + itemsByColumnIndex: Map, + itemsToShow: QuestionnaireItemWithAnswers[] +): ITableH2Column[] => + Array.from({ length: numberOfColumns }, (_, colIndex) => { + const itemsInColumn = itemsByColumnIndex.get(colIndex + 1) || []; + const item = itemsInColumn[rowIndex]; + if (!item) { + return { + id: `empty-${rowIndex}-${colIndex}`, + index: colIndex + 1, + text: '', + }; + } + return { + id: item.linkId, + index: findIndexByCode(item, codeSystems.TableColumn), + text: getValueFromItemsToShow(item, itemsToShow), + }; + }); + +const getValueFromItemsToShow = (item: QuestionnaireItem | undefined, itemsToShow: QuestionnaireItemWithAnswers[]): string => { + const itemToShow = itemsToShow.find(itemToShow => itemToShow.linkId === item?.linkId); + if (!itemToShow) { + return ''; } - return Math.max(...items.map(item => findIndexByCode(item, codeSystems.TableColumn))); + const columnText = + itemToShow.type === ItemType.DISPLAY || itemToShow.type === ItemType.GROUP + ? itemToShow.text || '' + : transformAnswersToListOfStrings(itemToShow.type, itemToShow.answer).join(', '); + return columnText; }; export const getTableHN2bodyObject = ( @@ -32,45 +75,14 @@ export const getTableHN2bodyObject = ( if (!questionnaireResponse || items.length === 0) { return []; } - - const maxColumns = getNumberOfColums(items); - const itemsToShow = getEnabledQuestionnaireItemsWithAnswers(items, questionnaireResponse); + const structure = createTableStructure(items, itemsToShow); + const tableWithRemovedEmptyRows = structure.filter(row => row.columns.some(column => column.text !== '')); - const tableRows: ITableH2Row[] = itemsToShow.reduce((acc, item) => { - const columnIndex = findIndexByCode(item, codeSystems.TableColumn) - 1; - const answer = getValueIfDataReceiver(item, questionnaireResponse) || []; - const columnText = - item.type === ItemType.DISPLAY || item.type === ItemType.GROUP - ? item.text || '' - : transformAnswersToListOfStrings(item.type, answer).join(', '); - - let row = acc.find(r => r.columns[columnIndex]?.text === ''); - if (!row) { - row = { - id: uuid.v4(), - columns: Array.from({ length: maxColumns }, (_, colIdx) => ({ - id: `empty-${colIdx}`, - text: '', - index: colIdx + 1, - })), - }; - acc.push(row); - } - - row.columns[columnIndex] = { - id: item.linkId, - text: columnText, - index: columnIndex + 1, - }; - - return acc; - }, []); if (!!sortColumnIndex && !!sortOrder) { - return sortTableRows(tableRows, sortColumnIndex, sortOrder); + return sortTableRows(tableWithRemovedEmptyRows, sortColumnIndex, sortOrder); } - - return tableRows; + return tableWithRemovedEmptyRows; }; /* SORTING */ diff --git a/src/components/formcomponents/table/tables/table/utils.ts b/src/components/formcomponents/table/tables/table/utils.ts index bcbdb953..d7989b7f 100644 --- a/src/components/formcomponents/table/tables/table/utils.ts +++ b/src/components/formcomponents/table/tables/table/utils.ts @@ -5,7 +5,7 @@ import { Options } from '@helsenorge/form/components/radio-group'; import { StandardTable, StandardTableColumn, StandardTableRow } from './interface'; import ItemType from '../../../../../constants/itemType'; import { getContainedOptions } from '../../../../../util/choice'; -import { QuestionnaireItemAndResponseItemMerged } from '../interface'; +import { QuestionnaireItemWithAnswers } from '../interface'; import { getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; export const emptyTable = (): StandardTable => { @@ -56,7 +56,7 @@ export const createHeaderRow = (choiceValues: Options[], hasExtraColumn: boolean ]; }; const processItem = ( - item: QuestionnaireItemAndResponseItemMerged, + item: QuestionnaireItemWithAnswers, index: number, needsExtraColumn: boolean, choiceValues?: Options[] @@ -102,7 +102,7 @@ export const createRowsFromAnswersCodes = (item: QuestionnaireResponseItem, choi ); }; -export const createColumnsFromAnswers = (item: QuestionnaireItemAndResponseItemMerged, choiceValues?: Options[]): StandardTableColumn[] => { +export const createColumnsFromAnswers = (item: QuestionnaireItemWithAnswers, choiceValues?: Options[]): StandardTableColumn[] => { const type = item?.type; const answer = item?.answer; const choiceColumns = createRowsFromAnswersCodes(item, choiceValues); diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 8f892abd..508f931e 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -16,7 +16,7 @@ import { parseDate } from '@helsenorge/date-time/components/time-input/date-core import * as DateTimeConstants from '@helsenorge/date-time/constants/datetime'; import { DATEFORMATS } from './constants'; -import { QuestionnaireItemAndResponseItemMerged } from './interface'; +import { QuestionnaireItemWithAnswers } from './interface'; import { OPEN_CHOICE_SYSTEM } from '../../../../constants'; import { CodeSystems } from '../../../../constants/codingsystems'; import ItemType from '../../../../constants/itemType'; @@ -219,7 +219,7 @@ export const extractValuesFromAnswer = ( export const transformAnswersToListOfStrings = ( type: typeof ItemType[keyof typeof ItemType], - answer: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] + answer?: QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] ): string[] => { const value = extractValuesFromAnswer(type, answer); if (value.length === 0) { @@ -289,14 +289,14 @@ export function findFirstDefinedProperty(obj: T): T[Extract] export const addAnswerToItems = ( items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null -): QuestionnaireItemAndResponseItemMerged[] => { +): QuestionnaireItemWithAnswers[] => { if (!questionnaireResponse || items.length === 0) { return []; } - const processItem = (item: QuestionnaireItem): QuestionnaireItemAndResponseItemMerged => { + const processItem = (item: QuestionnaireItem): QuestionnaireItemWithAnswers => { const res = getValueIfDataReceiver(item, questionnaireResponse); const clonedItems = structuredClone(item); - const questionnaireResponseItem: QuestionnaireItemAndResponseItemMerged = { + const questionnaireResponseItem: QuestionnaireItemWithAnswers = { ...clonedItems, }; if (!Array.isArray(res) && res !== undefined) { @@ -317,7 +317,7 @@ export const addAnswerToItems = ( export const getEnabledQuestionnaireItemsWithAnswers = ( items?: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse -): QuestionnaireItemAndResponseItemMerged[] => { +): QuestionnaireItemWithAnswers[] => { if (!items || !questionnaireResponse) return []; const filteredItems = filterEnabledQuestionnaireItems(items, questionnaireResponse); return addAnswerToItems(filteredItems, questionnaireResponse); From 4e7e9db043bfcae1f15216f903802dcdb6ed3653 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:51:45 +0100 Subject: [PATCH 47/83] fixed date format --- .../formcomponents/table/tables/constants.ts | 4 ++-- .../table/tables/table-hn2/utils.ts | 18 +++++++++--------- .../formcomponents/table/tables/utils.ts | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/formcomponents/table/tables/constants.ts b/src/components/formcomponents/table/tables/constants.ts index b201add3..e291a3bc 100644 --- a/src/components/formcomponents/table/tables/constants.ts +++ b/src/components/formcomponents/table/tables/constants.ts @@ -1,4 +1,4 @@ export const DATEFORMATS = { - DATE: 'LL', - DATETIME: 'LLL', + DATE: 'DD.MM.YYYY', + DATETIME: 'DD MM YYYY HH:mm', }; diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index ccad1ca6..2454cc15 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -9,14 +9,14 @@ import ItemType from '../../../../../constants/itemType'; import { QuestionnaireItemWithAnswers } from '../interface'; import { findIndexByCode, getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; -export const createTableStructure = (items: QuestionnaireItem[], itemsToShow: QuestionnaireItemWithAnswers[]): ITableH2Row[] => { - const groupItemsByColumn = (items: QuestionnaireItem[]): Map => - items.reduce((acc, item) => { - const columnIndex = findIndexByCode(item, codeSystems.TableColumn); - const itemsInColumn = acc.get(columnIndex) || []; - return acc.set(columnIndex, [...itemsInColumn, item]); - }, new Map()); +export const groupItemsByColumn = (items: QuestionnaireItem[]): Map => + items.reduce((acc, item) => { + const columnIndex = findIndexByCode(item, codeSystems.TableColumn); + const itemsInColumn = acc.get(columnIndex) || []; + return acc.set(columnIndex, [...itemsInColumn, item]); + }, new Map()); +export const createTableStructure = (items: QuestionnaireItem[], itemsToShow: QuestionnaireItemWithAnswers[]): ITableH2Row[] => { const itemsByColumnIndex = groupItemsByColumn(items); const calculateNumberOfRows = (itemsMap: Map): number => @@ -31,7 +31,7 @@ export const createTableStructure = (items: QuestionnaireItem[], itemsToShow: Qu })); }; -const createColumnsForRow = ( +export const createColumnsForRow = ( rowIndex: number, numberOfColumns: number, itemsByColumnIndex: Map, @@ -54,7 +54,7 @@ const createColumnsForRow = ( }; }); -const getValueFromItemsToShow = (item: QuestionnaireItem | undefined, itemsToShow: QuestionnaireItemWithAnswers[]): string => { +export const getValueFromItemsToShow = (item: QuestionnaireItem | undefined, itemsToShow: QuestionnaireItemWithAnswers[]): string => { const itemToShow = itemsToShow.find(itemToShow => itemToShow.linkId === item?.linkId); if (!itemToShow) { return ''; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 508f931e..77713abc 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -52,7 +52,7 @@ const extractValueFromDate = (inputValue?: string): string => { return ''; } const date = parseDate(String(inputValue)); - return moment(date).locale('nb').format(DATEFORMATS.DATE); + return moment(date).locale('nb').format(DATEFORMATS.DATETIME); }; const extractValueFromTime = (inputTime?: string): string => { if (!inputTime) { From 9298b59a77d437949637cf8f9b6599f1cf6f9ed0 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:45:46 +0100 Subject: [PATCH 48/83] v 13.2.4-beta06 --- CHANGES | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 9c26a764..0f678a6a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +## 13.2.4-beta06 + +--- + +- fix HN2-TABLE bug with enablewhen +- added type for QuestionnaireItemWithAnswers +- fix datetime formatting + ## 13.2.4-beta05 --- diff --git a/package.json b/package.json index 935fa762..80dfa95f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.4-beta05", + "version": "13.2.4-beta06", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 42a8aae6f35299f10db3c2309b041392c8a96e45 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:52:08 +0100 Subject: [PATCH 49/83] fix-test --- .../formcomponents/table/tables/__tests__/utils-spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/formcomponents/table/tables/__tests__/utils-spec.ts b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts index f6be4d2e..d1def8df 100644 --- a/src/components/formcomponents/table/tables/__tests__/utils-spec.ts +++ b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts @@ -163,7 +163,7 @@ describe('extractValuesFromAnswer', () => { const result = extractValuesFromAnswer(type, singleAnswer); - expect(result).toEqual(['1. januar 2021']); + expect(result).toEqual(['01 01 2021 01:00']); }); it('should extract choice value correctly', () => { From b1ab7c80e836f85705da5979a04022e68a9832db Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:59:12 +0100 Subject: [PATCH 50/83] version --- CHANGES | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 0f678a6a..f14e2e69 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.4-beta07 + +--- + +- fix failing test + ## 13.2.4-beta06 --- diff --git a/package.json b/package.json index 80dfa95f..95f5fafe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.4-beta06", + "version": "13.2.4-beta07", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 327f6f52ad0ee2eac0d42a04ab9a33c6f87f1ec9 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:00:36 +0100 Subject: [PATCH 51/83] version --- CHANGES | 6 ++++++ package.json | 2 +- .../formcomponents/table/tables/__tests__/utils-spec.ts | 9 --------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index f14e2e69..4f6e1b38 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 13.2.4-beta08 + +--- + +- remove time test + ## 13.2.4-beta07 --- diff --git a/package.json b/package.json index 95f5fafe..f0ce751d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "13.2.4-beta07", + "version": "13.2.4-beta08", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" diff --git a/src/components/formcomponents/table/tables/__tests__/utils-spec.ts b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts index d1def8df..ae2a34a4 100644 --- a/src/components/formcomponents/table/tables/__tests__/utils-spec.ts +++ b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts @@ -157,15 +157,6 @@ describe('extractValuesFromAnswer', () => { expect(result).toEqual(['[X]']); }); - it('should extract date value correctly', () => { - const type = ItemType.DATE; - const singleAnswer: QuestionnaireResponseItemAnswer = { valueDate: '2021-01-01' }; - - const result = extractValuesFromAnswer(type, singleAnswer); - - expect(result).toEqual(['01 01 2021 01:00']); - }); - it('should extract choice value correctly', () => { const type = ItemType.CHOICE; const singleAnswer: QuestionnaireResponseItemAnswer = { valueCoding: { display: 'Choice1' } }; From 4755ad0203799df70d6ebdd075e778362a8f2dba Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 19 Jan 2024 14:21:11 +0100 Subject: [PATCH 52/83] merged from new major version from master --- CHANGES | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 3170cea7..fedda073 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 14.0.0-beta01 + +- Added table feature to new major version + +--- + ## 14.0.0 --- diff --git a/package.json b/package.json index b9549d29..f39c00a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "14.0.0", + "version": "14.0.0-beta01", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 761ba5e666096aff0dea6436f7711e4a7f547ca3 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Mon, 22 Jan 2024 11:30:24 +0100 Subject: [PATCH 53/83] sorting for standardtable --- .../formcomponents/table/TableContainer.tsx | 7 +- .../table/tables/table-hn2/TableHn2.tsx | 3 +- .../table/tables/table-hn2/utils.ts | 21 +- .../table/tables/table/StandardTable.tsx | 37 +- .../table/tables/table/interface.ts | 12 +- .../table/tables/table/utils.ts | 58 ++- .../formcomponents/table/tables/utils.ts | 26 +- src/preview/FormFillerPreview.tsx | 2 +- src/preview/skjema/NHN_Test_Table.json | 491 ++++++++++++++---- 9 files changed, 512 insertions(+), 145 deletions(-) diff --git a/src/components/formcomponents/table/TableContainer.tsx b/src/components/formcomponents/table/TableContainer.tsx index 20dc3aeb..2521a1e0 100644 --- a/src/components/formcomponents/table/TableContainer.tsx +++ b/src/components/formcomponents/table/TableContainer.tsx @@ -95,7 +95,12 @@ const TableContainer = ({ return ( <>

{headline}

- + ); default: diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 5c33d26d..2be67409 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -6,7 +6,8 @@ import { Table as HnTable, SortDirection, TableBody, TableCell, TableRow } from import { ITableH2Row } from './interface'; import TableHeadHn2 from './TableHeadHn2'; -import { getIndexToSortBy, getTableHN2bodyObject, transformCodingToSortDirection } from './utils'; +import { getTableHN2bodyObject } from './utils'; +import { getIndexToSortBy, transformCodingToSortDirection } from '../utils'; interface Props { tableCodesCoding: Coding[]; diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index 2454cc15..7088f699 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -7,7 +7,7 @@ import CodingSystems, { TableColumnName, TableOrderingColum } from '../../../../ import codeSystems from '../../../../../constants/codingsystems'; import ItemType from '../../../../../constants/itemType'; import { QuestionnaireItemWithAnswers } from '../interface'; -import { findIndexByCode, getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; +import { findCodeBySystem, findIndexByCode, getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; export const groupItemsByColumn = (items: QuestionnaireItem[]): Map => items.reduce((acc, item) => { @@ -109,22 +109,5 @@ export const getHeaderColumns = (coding: Coding[]): HeaderColumn[] => { code: code.code, })); }; -export const getCodeFromCodingSystem = (coding: Coding[], codingSystem: string): string | undefined => { - const code = findCodeBySystem(coding, codingSystem); - return code[0]?.code; -}; -//TODO: Dette finnes fra før, kan bruke eksisterende funksjonalitet -export function findCodeBySystem(coding: T[], system?: string): T[] { - return coding.filter(code => code.system === system); -} - -/* TABLE HEADER */ -export const transformCodingToSortDirection = (coding: Coding[]): SortDirection | undefined => { - const code = getCodeFromCodingSystem(coding, codeSystems.TableOrderingFunctions); - return !!code ? (code === 'ASC' ? SortDirection.asc : SortDirection.desc) : undefined; -}; -export const getIndexToSortBy = (coding: Coding[]): number | undefined => { - const sortCode = getCodeFromCodingSystem(coding, codeSystems.TableOrderingColum); - return sortCode ? Number(sortCode) - 1 : undefined; -}; +//TODO: Dette finnes fra før, kan bruke eksisterende funksjonalitet diff --git a/src/components/formcomponents/table/tables/table/StandardTable.tsx b/src/components/formcomponents/table/tables/table/StandardTable.tsx index 44ead887..c64ba00e 100644 --- a/src/components/formcomponents/table/tables/table/StandardTable.tsx +++ b/src/components/formcomponents/table/tables/table/StandardTable.tsx @@ -1,11 +1,12 @@ -import React from 'react'; +import React, { useEffect, useState } from 'react'; -import { QuestionnaireItem, QuestionnaireResponse, Resource } from '../../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse, Resource } from '../../../../../types/fhir'; import { HeaderCategory, Table as HnTable, ModeType, + SortDirection, TableBody, TableCell, TableHead, @@ -13,22 +14,44 @@ import { TableRow, } from '@helsenorge/designsystem-react/components/Table'; -import { getStandardTableObject } from './utils'; +import { IStandardTable } from './interface'; +import { getDisplayToSortBy, getStandardTableObject } from './utils'; +import { transformCodingToSortDirection } from '../utils'; interface Props { items: QuestionnaireItem[]; + tableCodesCoding: Coding[]; questionnaireResponse?: QuestionnaireResponse | null; resource?: Resource[]; } -export const StandardTable = ({ items, questionnaireResponse, resource }: Props): JSX.Element => { - const table = getStandardTableObject(items, questionnaireResponse, resource); +export const StandardTable = ({ items, questionnaireResponse, resource, tableCodesCoding }: Props): JSX.Element => { + const displayToSortBy = getDisplayToSortBy(tableCodesCoding); + const [sortDir, setSortDir] = useState(transformCodingToSortDirection(tableCodesCoding)); + const [table, setTable] = useState( + getStandardTableObject(items, questionnaireResponse, resource, sortDir, displayToSortBy) + ); + useEffect(() => { + setTable(getStandardTableObject(items, questionnaireResponse, resource, sortDir, displayToSortBy)); + }, [sortDir, items, questionnaireResponse, resource, displayToSortBy]); + + const sortable = displayToSortBy !== undefined ? true : false; + const handleSort = (): void => { + setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); + }; + return table.rows.length > 0 ? ( - + {table.headerRow.map(column => ( - + {column.value} ))} diff --git a/src/components/formcomponents/table/tables/table/interface.ts b/src/components/formcomponents/table/tables/table/interface.ts index db6f06e1..ed364fc8 100644 --- a/src/components/formcomponents/table/tables/table/interface.ts +++ b/src/components/formcomponents/table/tables/table/interface.ts @@ -1,17 +1,17 @@ -export interface StandardTableColumn { +export interface IStandardTableColumn { id: string; index: number; value: string; } -export interface StandardTableRow { +export interface IStandardTableRow { id: string; index: number; - columns: StandardTableColumn[]; + columns: IStandardTableColumn[]; } -export interface StandardTable { +export interface IStandardTable { id: string; - headerRow: StandardTableColumn[]; - rows: StandardTableRow[]; + headerRow: IStandardTableColumn[]; + rows: IStandardTableRow[]; } diff --git a/src/components/formcomponents/table/tables/table/utils.ts b/src/components/formcomponents/table/tables/table/utils.ts index d7989b7f..3e1f4745 100644 --- a/src/components/formcomponents/table/tables/table/utils.ts +++ b/src/components/formcomponents/table/tables/table/utils.ts @@ -1,14 +1,17 @@ -import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, Resource } from '../../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, Resource } from '../../../../../types/fhir'; + +import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; import { Options } from '@helsenorge/form/components/radio-group'; -import { StandardTable, StandardTableColumn, StandardTableRow } from './interface'; +import { IStandardTable, IStandardTableColumn, IStandardTableRow } from './interface'; +import codeSystems from '../../../../../constants/codingsystems'; import ItemType from '../../../../../constants/itemType'; import { getContainedOptions } from '../../../../../util/choice'; import { QuestionnaireItemWithAnswers } from '../interface'; -import { getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; +import { getDisplayFromCodingSystem, getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; -export const emptyTable = (): StandardTable => { +export const emptyTable = (): IStandardTable => { return { headerRow: [], rows: [], @@ -16,7 +19,7 @@ export const emptyTable = (): StandardTable => { }; }; -export const emptyTableWithId = (id: string): StandardTable => { +export const emptyTableWithId = (id: string): IStandardTable => { return { id: id || '', headerRow: [], @@ -24,7 +27,7 @@ export const emptyTableWithId = (id: string): StandardTable => { }; }; -export const createTableColumn = (value: string, index: number, id: string): StandardTableColumn => { +export const createTableColumn = (value: string, index: number, id: string): IStandardTableColumn => { return { value, index, @@ -32,7 +35,7 @@ export const createTableColumn = (value: string, index: number, id: string): Sta }; }; -export const createHeaderRow = (choiceValues: Options[], hasExtraColumn: boolean): StandardTableColumn[] => { +export const createHeaderRow = (choiceValues: Options[], hasExtraColumn: boolean): IStandardTableColumn[] => { return [ { id: `quest-${0}`, @@ -60,11 +63,11 @@ const processItem = ( index: number, needsExtraColumn: boolean, choiceValues?: Options[] -): StandardTableRow[] => { +): IStandardTableRow[] => { const columns = createColumnsFromAnswers(item, choiceValues); const processedColumns = needsExtraColumn ? columns : columns.slice(0, -1); - const row: StandardTableRow = { + const row: IStandardTableRow = { id: item.linkId, index, columns: processedColumns, @@ -82,13 +85,13 @@ export const createBodyRows = ( responseItems: QuestionnaireResponse, needsExtraColumn: boolean, choiceValues?: Options[] -): StandardTableRow[] => { +): IStandardTableRow[] => { const answers = getEnabledQuestionnaireItemsWithAnswers(items, responseItems); return answers.flatMap((item, index) => processItem(item, index, needsExtraColumn, choiceValues)); }; -export const createRowsFromAnswersCodes = (item: QuestionnaireResponseItem, choiceValues?: Options[]): StandardTableColumn[] => { +export const createRowsFromAnswersCodes = (item: QuestionnaireResponseItem, choiceValues?: Options[]): IStandardTableColumn[] => { return ( choiceValues?.map(value => ({ id: `${value.type}-${value.type}`, @@ -102,13 +105,13 @@ export const createRowsFromAnswersCodes = (item: QuestionnaireResponseItem, choi ); }; -export const createColumnsFromAnswers = (item: QuestionnaireItemWithAnswers, choiceValues?: Options[]): StandardTableColumn[] => { +export const createColumnsFromAnswers = (item: QuestionnaireItemWithAnswers, choiceValues?: Options[]): IStandardTableColumn[] => { const type = item?.type; const answer = item?.answer; const choiceColumns = createRowsFromAnswersCodes(item, choiceValues); const textAnswer = type && answer && choiceColumns.every(x => x.value === '') ? transformAnswersToListOfStrings(type, answer) : []; - const columns: StandardTableColumn[] = [ + const columns: IStandardTableColumn[] = [ createTableColumn(item.text || '', 0, `${item.linkId}-question`), ...choiceColumns, createTableColumn(textAnswer.join(', '), choiceColumns.length + 1, `${item.linkId}-answer`), @@ -119,8 +122,10 @@ export const createColumnsFromAnswers = (item: QuestionnaireItemWithAnswers, cho export const getStandardTableObject = ( items: QuestionnaireItem[], responseItems?: QuestionnaireResponse | null, - resource?: Resource[] -): StandardTable => { + resource?: Resource[], + SortDirection?: SortDirection, + displayToSortBy?: string +): IStandardTable => { if (!responseItems || items.length === 0) { return emptyTable(); } @@ -136,6 +141,10 @@ export const getStandardTableObject = ( const rows = createBodyRows(items, responseItems, extraColumnNeeded, choiceValues); const header = createHeaderRow(choiceValues, extraColumnNeeded); + if (displayToSortBy !== undefined && SortDirection) { + const sortIndex = header.findIndex(header => header.value === displayToSortBy); + return sortTableRows({ id: responseItems.id || '', headerRow: header, rows: rows }, sortIndex, SortDirection); + } return { id: responseItems.id || '', headerRow: header, @@ -153,3 +162,22 @@ export const needsExtraColumn = (items: QuestionnaireItem[], responseItems: Ques return item?.item?.length && item.item.length > 0; }); }; + +export const sortTableRows = (table: IStandardTable, columnIndex: number, sortOrder: SortDirection): IStandardTable => { + const sortedTable = { + headerRow: table.headerRow, + id: table.id, + rows: table.rows.sort((a, b) => { + const aValue = a?.columns.length > columnIndex ? a?.columns[columnIndex]?.value || '' : ''; + const bValue = b?.columns.length > columnIndex ? b?.columns[columnIndex]?.value || '' : ''; + + return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + }), + }; + return sortedTable; +}; + +export const getDisplayToSortBy = (coding: Coding[]): string | undefined => { + const sortDisplay = getDisplayFromCodingSystem(coding, codeSystems.TableOrderingColum); + return sortDisplay ? sortDisplay : undefined; +}; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 77713abc..11a51c0b 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -12,13 +12,15 @@ import { QuestionnaireResponseItemAnswer, } from '../../../../types/fhir'; +import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; + import { parseDate } from '@helsenorge/date-time/components/time-input/date-core'; import * as DateTimeConstants from '@helsenorge/date-time/constants/datetime'; import { DATEFORMATS } from './constants'; import { QuestionnaireItemWithAnswers } from './interface'; import { OPEN_CHOICE_SYSTEM } from '../../../../constants'; -import { CodeSystems } from '../../../../constants/codingsystems'; +import codeSystems, { CodeSystems } from '../../../../constants/codingsystems'; import ItemType from '../../../../constants/itemType'; import { getQuestionnaireItemCodeValue } from '../../../../util/codingsystem'; import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; @@ -322,3 +324,25 @@ export const getEnabledQuestionnaireItemsWithAnswers = ( const filteredItems = filterEnabledQuestionnaireItems(items, questionnaireResponse); return addAnswerToItems(filteredItems, questionnaireResponse); }; + +/* TABLE HEADER */ +export const transformCodingToSortDirection = (coding: Coding[]): SortDirection | undefined => { + const code = getCodeFromCodingSystem(coding, codeSystems.TableOrderingFunctions); + return !!code ? (code === 'ASC' ? SortDirection.asc : SortDirection.desc) : undefined; +}; + +export const getIndexToSortBy = (coding: Coding[]): number | undefined => { + const sortCode = getCodeFromCodingSystem(coding, codeSystems.TableOrderingColum); + return sortCode ? Number(sortCode) - 1 : undefined; +}; +export const getDisplayFromCodingSystem = (coding: Coding[], codingSystem: string): string | undefined => { + const code = findCodeBySystem(coding, codingSystem); + return code[0]?.display; +}; +export const getCodeFromCodingSystem = (coding: Coding[], codingSystem: string): string | undefined => { + const code = findCodeBySystem(coding, codingSystem); + return code[0]?.code; +}; +export function findCodeBySystem(coding: T[], system?: string): T[] { + return coding.filter(code => code.system === system); +} diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 72b1f89c..b326dad5 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/NHN_Test_tableHN2_Egendefinert.json'; +import skjema from './skjema/NHN_Test_Table.json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; diff --git a/src/preview/skjema/NHN_Test_Table.json b/src/preview/skjema/NHN_Test_Table.json index be7e9533..8557c3fb 100644 --- a/src/preview/skjema/NHN_Test_Table.json +++ b/src/preview/skjema/NHN_Test_Table.json @@ -9,35 +9,79 @@ "publisher": "NHN", "meta": { "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], "security": [ - { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, - { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + }, + { + "code": "1", + "display": "Kun innbygger selv", + "system": "http://helsenorge.no/fhir/KanUtforesAv" + } ] }, "useContext": [ { - "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, - "valueCodeableConcept": { "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Table_SvaralternativerStyrer" }] } + "code": { + "system": "http://hl7.org/fhir/ValueSet/usage-context-type", + "code": "focus", + "display": "Clinical Focus" + }, + "valueCodeableConcept": { + "coding": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1.8655", + "display": "Table_SvaralternativerStyrer" + } + ] + } + } + ], + "contact": [ + { + "name": "http://www.nhn.no" } ], - "contact": [{ "name": "http://www.nhn.no" }], "subjectType": ["Patient"], "extension": [ { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } }, { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", + "valueReference": { + "reference": "Endpoint/1" + } }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, { "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", "valueCodeableConcept": { "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-sublabel", @@ -51,7 +95,10 @@ ] } }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", + "valueBoolean": true + } ], "date": "2023-03-30T00:00:00+02:00", "contained": [ @@ -69,9 +116,18 @@ { "system": "urn:oid:2.16.578.1.12.4.1.1102", "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" }, - { "code": "3", "display": "Vet ikke" } + { + "code": "1", + "display": "Ja" + }, + { + "code": "2", + "display": "Nei" + }, + { + "code": "3", + "display": "Vet ikke" + } ] } ] @@ -101,7 +157,10 @@ { "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } } ] } @@ -117,7 +176,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + } + ] } } ], @@ -131,7 +195,10 @@ { "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } } ] }, @@ -144,7 +211,10 @@ { "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } } ] } @@ -154,6 +224,8 @@ "linkId": "2db8bc54-237f-411c-e3c6-448cef6ec29c", "type": "choice", "text": "Vet du hvilken dag og hva klokken er?", + "required": false, + "answerValueSet": "#1102", "item": [ { "linkId": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", @@ -164,7 +236,10 @@ { "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } } ] }, @@ -177,18 +252,21 @@ { "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } } ] } - ], - "required": false, - "answerValueSet": "#1102" + ] }, { "linkId": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "type": "choice", "text": "Kan du notere ned data om deg?", + "required": false, + "answerValueSet": "#1102", "item": [ { "linkId": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", @@ -197,7 +275,11 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + "valueCoding": { + "code": "kg", + "display": "kilo", + "system": "http://unitsofmeasure.org" + } } ], "required": false, @@ -205,7 +287,10 @@ { "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } } ] }, @@ -216,7 +301,11 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + "valueCoding": { + "code": "cm", + "display": "centimeter", + "system": "http://unitsofmeasure.org" + } } ], "required": false, @@ -224,7 +313,10 @@ { "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } } ] }, @@ -237,7 +329,10 @@ { "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } } ] }, @@ -250,13 +345,14 @@ { "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } } ] } - ], - "required": false, - "answerValueSet": "#1102" + ] } ] }, @@ -269,8 +365,14 @@ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } ] } } @@ -294,7 +396,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "table" + } + ] } } ], @@ -304,6 +411,16 @@ "display": "Default", "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", "id": "7aef743f-0d06-45dc-9155-6566c203a3b6" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "code": "DESC", + "display": "Descending" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "code": "1", + "display": "Ja" } ], "item": [ @@ -323,7 +440,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -332,9 +454,20 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "operator": "exists" + } + ], "_text": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", "valueMarkdown": "Er du syk" }] + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Er du syk" + } + ] }, "code": [ { @@ -354,15 +487,27 @@ { "question": "bab6ece9-d978-4601-9169-7dcf9c6e0007", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } }, - { "answerBoolean": true, "question": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", "operator": "exists" } + { + "answerBoolean": true, + "question": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", + "operator": "exists" + } ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -385,8 +530,14 @@ "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "check-box" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } ] } }, @@ -396,7 +547,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "operator": "exists" + } + ], "item": [ { "linkId": "7178ee96-a482-4e76-8f22-c3f3b31c08cd", @@ -407,15 +564,27 @@ { "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } }, - { "answerBoolean": true, "question": "7953faf6-55f4-406b-873b-ef167d7a1fbc", "operator": "exists" } + { + "answerBoolean": true, + "question": "7953faf6-55f4-406b-873b-ef167d7a1fbc", + "operator": "exists" + } ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -434,15 +603,27 @@ { "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + "answerCoding": { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "code": "1" + } }, - { "answerBoolean": true, "question": "638764d4-baea-46d1-9e81-d98ff1c56b4d", "operator": "exists" } + { + "answerBoolean": true, + "question": "638764d4-baea-46d1-9e81-d98ff1c56b4d", + "operator": "exists" + } ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -458,18 +639,56 @@ "linkId": "8fbf52cc-3bf3-4fa1-d1be-f2dff1bc0b24", "type": "choice", "text": "Vet du hvilken dag og hva klokken er?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='2db8bc54-237f-411c-e3c6-448cef6ec29c').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", + "operator": "exists" + } + ], "item": [ { "linkId": "f49cf9ae-0ee5-4947-86b9-b2e82380f1ac", "type": "date", "text": "Dato", "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", + "operator": "exists" + } + ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -484,12 +703,23 @@ "type": "time", "text": "Klokken", "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", + "operator": "exists" + } + ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -499,28 +729,39 @@ ], "readOnly": true } - ], + ] + }, + { + "linkId": "1106fee1-475a-4018-f554-382985276782", + "type": "choice", + "text": "Kan du notere ned data om deg?", "required": false, + "enableWhen": [ + { + "answerBoolean": true, + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "exists" + } + ], "answerValueSet": "#1102", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='2db8bc54-237f-411c-e3c6-448cef6ec29c').answer.value" + "valueString": "QuestionnaireResponse.descendants().where(linkId='015337fd-a035-45ab-8fd5-286a2a5be7a1').answer.value" } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", "operator": "exists" }] - }, - { - "linkId": "1106fee1-475a-4018-f554-382985276782", - "type": "choice", - "text": "Kan du notere ned data om deg?", "item": [ { "linkId": "5b935dbb-9041-480e-88e6-ef76ec1fb102", @@ -529,12 +770,21 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + "valueCoding": { + "code": "kg", + "display": "kilo", + "system": "http://unitsofmeasure.org" + } }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -543,7 +793,13 @@ } ], "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", + "operator": "exists" + } + ], "readOnly": true }, { @@ -553,12 +809,21 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + "valueCoding": { + "code": "cm", + "display": "centimeter", + "system": "http://unitsofmeasure.org" + } }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -567,7 +832,13 @@ } ], "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "e46b791e-7b83-47c7-8511-0e42751adc0a", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "e46b791e-7b83-47c7-8511-0e42751adc0a", + "operator": "exists" + } + ], "readOnly": true }, { @@ -575,12 +846,23 @@ "type": "integer", "text": "Antall ganger du går på tur i løpet av uken", "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "f79dfabb-a788-445d-ba7a-a846b34e4b17", "operator": "exists" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "f79dfabb-a788-445d-ba7a-a846b34e4b17", + "operator": "exists" + } + ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -595,12 +877,23 @@ "type": "boolean", "text": "Er disse verdiene korrekte, hak av", "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "1246b383-dc6e-43d9-a68e-03213b255739", "operator": "=" }], + "enableWhen": [ + { + "answerBoolean": true, + "question": "1246b383-dc6e-43d9-a68e-03213b255739", + "operator": "=" + } + ], "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -610,23 +903,7 @@ ], "readOnly": true } - ], - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "operator": "exists" }], - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='015337fd-a035-45ab-8fd5-286a2a5be7a1').answer.value" - } - ], - "readOnly": true + ] } ] } @@ -636,11 +913,24 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } } ], "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-2", + "display": "SOT-2" + } + ], "_text": { "extension": [ { @@ -658,11 +948,24 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } } ], "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-3", + "display": "SOT-3" + } + ], "_text": { "extension": [ { From f8a1a6d3c7fb946f9fed5124398ed18e71474c2d Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Mon, 22 Jan 2024 12:26:25 +0100 Subject: [PATCH 54/83] fix test types and move some code --- .../gtable/__tests__/gtable-utils-spec.ts | 53 ++++++++++--------- .../formcomponents/table/tables/interface.ts | 1 + .../table/tables/table-hn2/TableHn2.tsx | 3 +- .../table/tables/table-hn2/utils.ts | 14 +++-- .../table/tables/table/StandardTable.tsx | 34 ++---------- .../tables/table/StandardTableHeader.tsx | 37 +++++++++++++ .../__tests__/standartable-utils-spec.ts | 6 +-- .../formcomponents/table/tables/utils.ts | 4 -- 8 files changed, 85 insertions(+), 67 deletions(-) create mode 100644 src/components/formcomponents/table/tables/table/StandardTableHeader.tsx diff --git a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts index d1d25db8..9e70ad7a 100644 --- a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts +++ b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts @@ -13,6 +13,7 @@ import { getValueFromAnswer, } from '../utils'; import ItemType from '../../../../../../constants/itemType'; +import { QuestionnaireItemWithAnswers } from '../../interface'; type MockAnswerProps = Partial; type MockResponseItemProps = Partial; type MockQuestionnaireItemProps = Partial> & { @@ -42,7 +43,16 @@ function generateMockQuestionnaireItem(props: MockQuestionnaireItemProps): Quest ...props, }; } - +function generateMockQuestionnaireItemWithAnswers( + props: Partial> +): QuestionnaireItemWithAnswers { + return { + linkId: 'default-question-linkId', + type: ItemType.TEXT, + answer: [], + ...props, + }; +} function generateMockQuestionnaireResponse(props: MockResponseProps = {}): QuestionnaireResponse { return { resourceType: 'QuestionnaireResponse', @@ -75,10 +85,6 @@ describe('gtable-utils-spec', () => { }); }); describe('getValueFromAnswer', () => { - const generateMockQuestionnaireResponseItem = (answers?: QuestionnaireResponseItemAnswer[]): QuestionnaireResponseItem => { - return { answer: answers } as QuestionnaireResponseItem; - }; - it('should return an empty string if no answer is provided', () => { expect(getValueFromAnswer(0, undefined)).toBe(''); }); @@ -88,33 +94,31 @@ describe('gtable-utils-spec', () => { generateMockResponseAnswer({ valueString: 'Answer 1' }), generateMockResponseAnswer({ valueString: 'Answer 2' }), ]; - const item = generateMockQuestionnaireResponseItem(answers); + const item = generateMockQuestionnaireItemWithAnswers({ answer: answers }); expect(getValueFromAnswer(1, { ...item, type: ItemType.TEXT })).toBe('Answer 2'); }); it('should return an empty string if the index is out of bounds', () => { const answers: QuestionnaireResponseItemAnswer[] = [generateMockResponseAnswer({ valueString: 'Answer 1' })]; - const item = generateMockQuestionnaireResponseItem(answers); + const item = generateMockQuestionnaireItemWithAnswers({ answer: answers }); expect(getValueFromAnswer(2, item)).toBe(''); }); it('should return an empty string if the answer at the index is empty', () => { const answers: QuestionnaireResponseItemAnswer[] = [generateMockResponseAnswer({ valueString: '' })]; - const item = generateMockQuestionnaireResponseItem(answers); + const item = generateMockQuestionnaireItemWithAnswers({ answer: answers }); expect(getValueFromAnswer(0, item)).toBe(''); }); }); describe('columnsForRowIndex', () => { it('should create columns with correct values for a valid row index', () => { - const answerItems: QuestionnaireResponseItem[] = [ - generateMockResponseItem({ + const answerItems: QuestionnaireItemWithAnswers[] = [ + generateMockQuestionnaireItemWithAnswers({ answer: [generateMockResponseAnswer({ valueString: 'Answer 1' }), generateMockResponseAnswer({ valueString: 'Answer 2' })], - //@ts-ignore type: ItemType.TEXT, }), - generateMockResponseItem({ + generateMockQuestionnaireItemWithAnswers({ answer: [generateMockResponseAnswer({ valueString: 'Another Answer 1' })], - //@ts-ignore type: ItemType.TEXT, }), ]; @@ -126,9 +130,9 @@ describe('gtable-utils-spec', () => { }); it('should create columns with empty values for a row index with no answers', () => { - const answerItems: QuestionnaireResponseItem[] = [ - generateMockResponseItem({ answer: [generateMockResponseAnswer({ valueString: 'Answer 1' })] }), - generateMockResponseItem({ answer: [] }), + const answerItems: QuestionnaireItemWithAnswers[] = [ + generateMockQuestionnaireItemWithAnswers({ answer: [generateMockResponseAnswer({ valueString: 'Answer 1' })] }), + generateMockQuestionnaireItemWithAnswers({ answer: [] }), ]; const columns = columnsForRowIndex(answerItems, 1); expect(columns).toEqual([ @@ -138,18 +142,18 @@ describe('gtable-utils-spec', () => { }); it('should handle empty answer items correctly', () => { - const answerItems: QuestionnaireResponseItem[] = []; + const answerItems: QuestionnaireItemWithAnswers[] = []; const columns = columnsForRowIndex(answerItems, 0); expect(columns).toEqual([]); }); }); describe('createTableRows', () => { it('should create table rows based on the input items', () => { - const items: QuestionnaireResponseItem[] = [ - generateMockResponseItem({ + const items: QuestionnaireItemWithAnswers[] = [ + generateMockQuestionnaireItemWithAnswers({ answer: [generateMockResponseAnswer({ valueString: 'Answer 1' }), generateMockResponseAnswer({ valueString: 'Answer 2' })], }), - generateMockResponseItem({ + generateMockQuestionnaireItemWithAnswers({ answer: [generateMockResponseAnswer({ valueString: 'Another Answer 1' })], }), ]; @@ -160,9 +164,9 @@ describe('gtable-utils-spec', () => { }); it('should handle items with no answers correctly', () => { - const items: QuestionnaireResponseItem[] = [ - generateMockResponseItem({ answer: [] }), - generateMockResponseItem({ answer: [generateMockResponseAnswer({ valueString: 'Only Answer' })] }), + const items: QuestionnaireItemWithAnswers[] = [ + generateMockQuestionnaireItemWithAnswers({ answer: [] }), + generateMockQuestionnaireItemWithAnswers({ answer: [generateMockResponseAnswer({ valueString: 'Only Answer' })] }), ]; const rows = createTableRows(items); expect(rows.length).toBe(1); @@ -170,7 +174,7 @@ describe('gtable-utils-spec', () => { }); it('should handle empty items correctly', () => { - const items: QuestionnaireResponseItem[] = []; + const items: QuestionnaireItemWithAnswers[] = []; const rows = createTableRows(items); expect(rows).toEqual([]); }); @@ -242,7 +246,6 @@ describe('gtable-utils-spec', () => { ], }); const gTable = getGtablebodyObject(questionnaireItems, questionnaireResponse); - console.log('gTable', gTable); expect(gTable.rows.length).toBe(1); expect(gTable.headerRow.length).toBe(2); }); diff --git a/src/components/formcomponents/table/tables/interface.ts b/src/components/formcomponents/table/tables/interface.ts index dbd027a5..ae2e118c 100644 --- a/src/components/formcomponents/table/tables/interface.ts +++ b/src/components/formcomponents/table/tables/interface.ts @@ -2,4 +2,5 @@ import { QuestionnaireItem, QuestionnaireResponseItem } from '../../../../types/ export type QuestionnaireItemWithAnswers = QuestionnaireItem & { answer?: QuestionnaireResponseItem['answer']; + item?: QuestionnaireItemWithAnswers[]; }; diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 2be67409..b08a9e0a 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -7,7 +7,8 @@ import { Table as HnTable, SortDirection, TableBody, TableCell, TableRow } from import { ITableH2Row } from './interface'; import TableHeadHn2 from './TableHeadHn2'; import { getTableHN2bodyObject } from './utils'; -import { getIndexToSortBy, transformCodingToSortDirection } from '../utils'; +import { getIndexToSortBy } from './utils'; +import { transformCodingToSortDirection } from '../utils'; interface Props { tableCodesCoding: Coding[]; diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index 7088f699..498b6633 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -7,7 +7,13 @@ import CodingSystems, { TableColumnName, TableOrderingColum } from '../../../../ import codeSystems from '../../../../../constants/codingsystems'; import ItemType from '../../../../../constants/itemType'; import { QuestionnaireItemWithAnswers } from '../interface'; -import { findCodeBySystem, findIndexByCode, getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; +import { + findCodeBySystem, + findIndexByCode, + getCodeFromCodingSystem, + getEnabledQuestionnaireItemsWithAnswers, + transformAnswersToListOfStrings, +} from '../utils'; export const groupItemsByColumn = (items: QuestionnaireItem[]): Map => items.reduce((acc, item) => { @@ -86,6 +92,10 @@ export const getTableHN2bodyObject = ( }; /* SORTING */ +export const getIndexToSortBy = (coding: Coding[]): number | undefined => { + const sortCode = getCodeFromCodingSystem(coding, codeSystems.TableOrderingColum); + return sortCode ? Number(sortCode) - 1 : undefined; +}; export const sortTableRows = (table: ITableH2Row[], columnIndex: number, sortOrder: SortDirection): ITableH2Row[] => { return table.sort((a, b) => { @@ -109,5 +119,3 @@ export const getHeaderColumns = (coding: Coding[]): HeaderColumn[] => { code: code.code, })); }; - -//TODO: Dette finnes fra før, kan bruke eksisterende funksjonalitet diff --git a/src/components/formcomponents/table/tables/table/StandardTable.tsx b/src/components/formcomponents/table/tables/table/StandardTable.tsx index c64ba00e..63ba2c5b 100644 --- a/src/components/formcomponents/table/tables/table/StandardTable.tsx +++ b/src/components/formcomponents/table/tables/table/StandardTable.tsx @@ -2,19 +2,10 @@ import React, { useEffect, useState } from 'react'; import { Coding, QuestionnaireItem, QuestionnaireResponse, Resource } from '../../../../../types/fhir'; -import { - HeaderCategory, - Table as HnTable, - ModeType, - SortDirection, - TableBody, - TableCell, - TableHead, - TableHeadCell, - TableRow, -} from '@helsenorge/designsystem-react/components/Table'; +import { Table as HnTable, ModeType, SortDirection, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; import { IStandardTable } from './interface'; +import { StandardTableHeader } from './StandardTableHeader'; import { getDisplayToSortBy, getStandardTableObject } from './utils'; import { transformCodingToSortDirection } from '../utils'; @@ -35,28 +26,9 @@ export const StandardTable = ({ items, questionnaireResponse, resource, tableCod setTable(getStandardTableObject(items, questionnaireResponse, resource, sortDir, displayToSortBy)); }, [sortDir, items, questionnaireResponse, resource, displayToSortBy]); - const sortable = displayToSortBy !== undefined ? true : false; - const handleSort = (): void => { - setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); - }; - return table.rows.length > 0 ? ( - - - {table.headerRow.map(column => ( - - {column.value} - - ))} - - + {table.rows.map(item => ( diff --git a/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx b/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx new file mode 100644 index 00000000..c80532db --- /dev/null +++ b/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx @@ -0,0 +1,37 @@ +import React from 'react'; + +import { HeaderCategory, SortDirection, TableHead, TableHeadCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; + +import { IStandardTableColumn } from './interface'; + +type Props = { + headerRow: IStandardTableColumn[]; + setSortDir: React.Dispatch>; + sortDir?: SortDirection; + displayToSortBy?: string; +}; + +export const StandardTableHeader = ({ headerRow, setSortDir, sortDir, displayToSortBy }: Props): JSX.Element => { + const handleSort = (): void => { + setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); + }; + const sortable = displayToSortBy !== undefined ? true : false; + + return ( + + + {headerRow.map(column => ( + + {column.value} + + ))} + + + ); +}; diff --git a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts index c02a4bac..86da3b71 100644 --- a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts +++ b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts @@ -17,7 +17,7 @@ import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, Re import * as choiceUtils from '../../../../../../util/choice'; import * as tableUtils from '../../utils'; -import { QuestionnaireItemAndResponseItemMerged } from '../../interface'; +import { QuestionnaireItemWithAnswers } from '../../interface'; jest.mock('../../utils'); jest.mock('../../../../../../util/choice'); @@ -301,7 +301,7 @@ describe('createColumnsFromAnswers', () => { (tableUtils.transformAnswersToListOfStrings as jest.Mock).mockImplementation(() => { return ['A', 'B']; }); - const item: QuestionnaireItemAndResponseItemMerged = { + const item: QuestionnaireItemWithAnswers = { linkId: '1', text: 'Question 1', type: ItemType.CHOICE, @@ -335,7 +335,7 @@ describe('createColumnsFromAnswers', () => { (tableUtils.transformAnswersToListOfStrings as jest.Mock).mockImplementation(() => { return []; }); - const item: QuestionnaireItemAndResponseItemMerged = { + const item: QuestionnaireItemWithAnswers = { linkId: '1', text: 'Question 1', type: ItemType.CHOICE, diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 11a51c0b..249c3161 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -331,10 +331,6 @@ export const transformCodingToSortDirection = (coding: Coding[]): SortDirection return !!code ? (code === 'ASC' ? SortDirection.asc : SortDirection.desc) : undefined; }; -export const getIndexToSortBy = (coding: Coding[]): number | undefined => { - const sortCode = getCodeFromCodingSystem(coding, codeSystems.TableOrderingColum); - return sortCode ? Number(sortCode) - 1 : undefined; -}; export const getDisplayFromCodingSystem = (coding: Coding[], codingSystem: string): string | undefined => { const code = findCodeBySystem(coding, codingSystem); return code[0]?.display; From 050d5c886ff7f494cbfa634f53571b4704cf32d2 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Mon, 22 Jan 2024 20:47:58 +0100 Subject: [PATCH 55/83] update gtable --- .../table/tables/gtable/GTable.tsx | 2 + .../gtable/__tests__/gtable-utils-spec.ts | 27 +- .../table/tables/gtable/utils.ts | 33 +- src/preview/FormFillerPreview.tsx | 2 +- src/preview/skjema/kun_qest_repeatable.json | 819 ++++++++---------- 5 files changed, 411 insertions(+), 472 deletions(-) diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx index d09e37aa..9991eb58 100644 --- a/src/components/formcomponents/table/tables/gtable/GTable.tsx +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -20,7 +20,9 @@ interface Props { } const GTable = ({ items, questionnaireResponse }: Props): JSX.Element => { + const gTable = getGtablebodyObject(items, questionnaireResponse); + return gTable.rows.length > 0 ? ( diff --git a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts index 9e70ad7a..e7c6055d 100644 --- a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts +++ b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts @@ -14,6 +14,7 @@ import { } from '../utils'; import ItemType from '../../../../../../constants/itemType'; import { QuestionnaireItemWithAnswers } from '../../interface'; + type MockAnswerProps = Partial; type MockResponseItemProps = Partial; type MockQuestionnaireItemProps = Partial> & { @@ -124,8 +125,8 @@ describe('gtable-utils-spec', () => { ]; const columns = columnsForRowIndex(answerItems, 0); expect(columns).toEqual([ - { id: 'empty-0-0', index: 0, value: 'Answer 1' }, - { id: 'empty-0-1', index: 1, value: 'Another Answer 1' }, + { id: 'default-question-linkId', index: 0, value: 'Answer 1' }, + { id: 'default-question-linkId', index: 1, value: 'Another Answer 1' }, ]); }); @@ -136,8 +137,8 @@ describe('gtable-utils-spec', () => { ]; const columns = columnsForRowIndex(answerItems, 1); expect(columns).toEqual([ - { id: 'empty-1-0', index: 0, value: '' }, - { id: 'empty-1-1', index: 1, value: '' }, + { id: 'default-question-linkId', index: 0, value: '' }, + { id: 'default-question-linkId', index: 1, value: '' }, ]); }); @@ -181,9 +182,9 @@ describe('gtable-utils-spec', () => { }); describe('createTableHeader', () => { it('should create table headers from input items', () => { - const items: QuestionnaireResponseItem[] = [ - generateMockResponseItem({ linkId: '1', text: 'First Question' }), - generateMockResponseItem({ linkId: '2', text: 'Second Question' }), + const items: QuestionnaireItem[] = [ + generateMockQuestionnaireItem({ linkId: '1', text: 'First Question', type: 'string' }), + generateMockQuestionnaireItem({ linkId: '2', text: 'Second Question', type: 'string' }), ]; const headers = createTableHeader(items); expect(headers).toEqual([ @@ -193,19 +194,19 @@ describe('gtable-utils-spec', () => { }); it('should handle items with missing text correctly', () => { - const items: QuestionnaireResponseItem[] = [ - generateMockResponseItem({ linkId: '1' }), - generateMockResponseItem({ linkId: '2', text: 'Second Question' }), + const items: QuestionnaireItem[] = [ + generateMockQuestionnaireItem({ linkId: '1', type: 'string' }), + generateMockQuestionnaireItem({ linkId: '2', text: 'Second Question', type: 'string' }), ]; const headers = createTableHeader(items); expect(headers).toEqual([ - { id: '1', value: '' }, + { id: '1', value: 'Default Question Text' }, { id: '2', value: 'Second Question' }, ]); }); it('should handle empty items array correctly', () => { - const items: QuestionnaireResponseItem[] = []; + const items: QuestionnaireItem[] = []; const headers = createTableHeader(items); expect(headers).toEqual([]); }); @@ -246,8 +247,10 @@ describe('gtable-utils-spec', () => { ], }); const gTable = getGtablebodyObject(questionnaireItems, questionnaireResponse); + console.log('gTable', gTable); expect(gTable.rows.length).toBe(1); expect(gTable.headerRow.length).toBe(2); + expect(gTable.rows[0].columns.length).toBe(2); }); it('should handle empty questionnaire items correctly', () => { diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index 7f2868e0..eaad5740 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -13,6 +13,7 @@ export const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): numbe const numbers = items.map(item => item.answer?.length || 0); return Math.max(...numbers); }; + export const getValueFromAnswer = (rowIdx: number, item?: QuestionnaireItemWithAnswers): string => { const answerItem = item?.answer?.[rowIdx]; if (!answerItem) { @@ -24,24 +25,35 @@ export const getValueFromAnswer = (rowIdx: number, item?: QuestionnaireItemWithA return getPrimitiveValueFromItemType(item.type, answerItem).toString() || ''; }; -export const columnsForRowIndex = (answerItems: QuestionnaireItemWithAnswers[], rowIdx: number): IGTableColumn[] => - answerItems.map((item, colIdx) => ({ - id: `empty-${rowIdx}-${colIdx}`, - index: colIdx, - value: getValueFromAnswer(rowIdx, item), - })); +export const columnsForRowIndex = (answerItems: QuestionnaireItemWithAnswers[], rowIdx: number): IGTableColumn[] => { + return Array.from({ length: answerItems.length }, (_, colIdx) => { + const item = answerItems[colIdx]; + if (!item) { + return { + id: `empty-${rowIdx}-${colIdx}`, + index: colIdx, + value: '', + }; + } + return { + id: item.linkId, + index: colIdx, + value: getValueFromAnswer(rowIdx, item), + }; + }); +}; -export const createTableRows = (items: QuestionnaireItemWithAnswers[]): IGTableRow[] => { - const numberOfRows = getNumberOfRowsGTable(items); +export const createTableRows = (answerItem: QuestionnaireItemWithAnswers[]): IGTableRow[] => { + const numberOfRows = getNumberOfRowsGTable(answerItem); return Array.from({ length: numberOfRows }, (_, rowIdx) => ({ id: `empty-${rowIdx}`, index: rowIdx, - columns: columnsForRowIndex(items, rowIdx), + columns: columnsForRowIndex(answerItem, rowIdx), })); }; -export const createTableHeader = (items: QuestionnaireResponseItem[]): IGTableHeaderItem[] => +export const createTableHeader = (items: QuestionnaireItem[]): IGTableHeaderItem[] => items.map(item => ({ id: item.linkId, value: item.text || '', @@ -56,7 +68,6 @@ export const getGtablebodyObject = (items: QuestionnaireItem[], questionnaireRes }; } const answerItems = getEnabledQuestionnaireItemsWithAnswers(items, questionnaireResponse); - const table: IGTable = { id: uuid.v4(), headerRow: createTableHeader(answerItems), diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index b326dad5..6a02fdeb 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/NHN_Test_Table.json'; +import skjema from './skjema/kun_qest_repeatable.json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; diff --git a/src/preview/skjema/kun_qest_repeatable.json b/src/preview/skjema/kun_qest_repeatable.json index 5593de9a..c1f3e36e 100644 --- a/src/preview/skjema/kun_qest_repeatable.json +++ b/src/preview/skjema/kun_qest_repeatable.json @@ -1,62 +1,81 @@ { "resourceType": "Questionnaire", "language": "nb-NO", - "id": "7c79c08e-492d-47fd-bc09-4964645974b5", - "name": "Table_HN1_MultiSvar", - "title": "Mutisvar Table-HN1 Oppsummering", + "id": "255e32d1-2cfc-4033-b714-31a6e15a2899", + "name": "NHN_Test_Repeterende_gtable", + "title": "Repeterende strukturer i tabell gtable", + "description": "Skjema før time for nyrepasient", + "version": "0.1", "status": "draft", "publisher": "NHN", "meta": { "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [ - { - "system": "urn:ietf:bcp:47", - "code": "nb-NO", - "display": "Bokmål" - } - ], + "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], "security": [ - { - "code": "3", - "display": "Helsehjelp (Full)", - "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - } + { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, + { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } ] }, - "contact": [ + "useContext": [ { - "name": "http://www.nhn.no" + "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "valueCodeableConcept": { + "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Repeterende strukturer i tabell gtable" }] + } } ], + "contact": [{ "name": "http://www.nhn.no" }], "subjectType": ["Patient"], "extension": [ { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", - "code": "1" - } + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } }, { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", - "code": "1" - } + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, { "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", "valueCodeableConcept": { "coding": [ + { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-help", - "display": "Hide help texts" + "code": "hide-sublabel", + "display": "Hide sublabel texts" }, { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1102", + "version": "1.0", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", + "status": "draft", + "publisher": "Direktoratet for e-helse", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" }, + { "code": "3", "display": "Vet ikke" } + ] } ] } @@ -64,556 +83,460 @@ ], "item": [ { - "linkId": "e849303c-293b-41c9-9900-1ea3e12b7492", + "linkId": "4c8b9272-16b7-4fe0-8e16-6f86077709cb", "type": "group", - "text": "Informasjon", + "text": "Datakilde 1: repeterende: GTable", "required": false, "item": [ { - "linkId": "4ced67ca-c9e4-44fd-9339-26c3fe2741bf", - "type": "string", - "text": "Har du barn?", - "required": false - }, - { - "linkId": "b8e63b95-baef-41bb-c141-19ccc1ebb5e2", - "type": "integer", - "text": "Hvor mange barn har du?", - "required": false - }, - { - "linkId": "dc998a35-ee55-4715-85df-e68f117ece30", - "type": "string", - "text": "Skriv navn til barna?", - "required": false, - "repeats": true - }, - { - "linkId": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", - "type": "boolean", - "text": "Spiser dere grønnsaker?", - "required": false - }, - { - "linkId": "70760537-890f-452e-aa60-07f8534088b0", - "type": "open-choice", + "linkId": "ba62ebba-244d-43b0-ac53-39dab184c953", + "type": "group", + "text": "Urin", + "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], "required": false, - "answerOption": [ + "repeats": true, + "item": [ + { "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", "type": "date", "text": "Dato", "required": false }, + { "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "type": "time", "text": "Klokkeslett", "required": false }, { - "valueCoding": { - "id": "d3b04993-a61f-47c9-d5ba-3c5e539f6c47", - "code": "frukt", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Frukt" - } + "linkId": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", + "type": "quantity", + "text": "Milliliter urin", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + } + ], + "required": false }, { - "valueCoding": { - "id": "e95b7df4-0d53-4a16-c677-79dbaf6ab5f1", - "code": "salat", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Salat" - } - }, + "linkId": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", + "type": "quantity", + "text": "Vekt våt bleie", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } + } + ], + "required": false + } + ] + } + ] + }, + { + "linkId": "72479ca2-444c-47e8-8288-1025194bfe51", + "type": "group", + "text": "Datakilde 2: repeterende: GTable nr 2 alle datatyper", + "required": false, + "item": [ + { + "linkId": "0d28d6ec-729c-4915-8575-b71074c90c93", + "type": "group", + "text": "Alt skal inn", + "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], + "required": false, + "repeats": true, + "item": [ { - "valueCoding": { - "id": "e36d6229-1aea-4826-81f7-4dafce056165", - "code": "asparges", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Asparges" - } + "linkId": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", + "type": "choice", + "text": "Alternativer", + "required": false, + "answerValueSet": "#1102" }, + { "linkId": "22bf506e-f446-46d2-8b00-3b264f6479b8", "type": "date", "text": "Dato", "required": false }, + { "linkId": "522b65ef-02bc-4fcf-8041-1ca0872440ea", "type": "time", "text": "Klokkeslett", "required": false }, { - "valueCoding": { - "id": "9b5f2c33-1d12-4874-8157-07ad382721c1", - "code": "gresskar", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Gresskar" - } + "linkId": "df1e8a08-f0e6-404b-a420-856a416c1e16", + "type": "quantity", + "text": "Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + } + ], + "required": false }, + { "linkId": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", "type": "integer", "text": "Tall", "required": false }, { - "valueCoding": { - "id": "40a50872-07af-4ee9-9985-5c0670fed596", - "code": "gulrot", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Gulrot" - } - } - ], - "enableWhen": [ - { - "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", - "operator": "=", - "answerBoolean": true - } - ], - "text": "Hvilke grønnsaker spiser dere?", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "check-box" - } - ] - } - } + "linkId": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", + "type": "decimal", + "text": "Desimaltall", + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], + "required": false + }, + { "linkId": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", "type": "boolean", "text": "Bekreftelse", "required": false } ] } ] }, { - "linkId": "aff40185-28d7-4529-81c9-e73ed058c4c6", + "linkId": "4d6ef3f2-423b-4aee-c43b-a5a37b460269", "type": "group", - "text": "Oppsummering", + "text": "Oppsummering repeterende GTable Datakilde 1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], "item": [ { - "linkId": "9194f78d-7a87-46ba-815d-44d884139778", + "linkId": "0845d569-993b-418a-8a1d-7ce50400c65c", "type": "group", - "text": "Table Oppsummering", + "text": "Oppsummering Her ligger kode for itemkontrol Gtable", "required": false, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-hn1" - } - ] + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] } } ], "item": [ { - "linkId": "a8d836c1-f893-43ff-a287-393057af2988", - "type": "string", - "text": "Har du barn?", + "linkId": "ab203143-488d-4757-946b-ddfad942205a", + "type": "date", + "text": "Dato", "required": false, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] } }, { "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='4ced67ca-c9e4-44fd-9339-26c3fe2741bf').answer.value" + "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" } ], "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "4ced67ca-c9e4-44fd-9339-26c3fe2741bf", - "operator": "exists" - } - ] + "enableWhen": [{ "answerBoolean": true, "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", "operator": "exists" }] }, { - "linkId": "c2e09551-a465-4a1d-832d-0d0130a8665e", - "type": "integer", - "text": "Hvor mange barn har du?", + "linkId": "01f1e567-abdc-46ee-8a41-cd571e930738", + "type": "time", + "text": "Klokkeslett", "required": false, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] } }, { "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='b8e63b95-baef-41bb-c141-19ccc1ebb5e2').answer.value" + "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" } ], "readOnly": true, - "enableWhen": [ + "enableWhen": [{ "answerBoolean": true, "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "operator": "exists" }] + }, + { + "linkId": "7b1b5765-adb5-475b-a024-d9f68d5c9f8e", + "type": "quantity", + "text": "Vekt våt bleie", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, { - "answerBoolean": true, - "question": "b8e63b95-baef-41bb-c141-19ccc1ebb5e2", - "operator": "exists" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" } - ] + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", "operator": "exists" }] }, { - "linkId": "93864380-1c99-489d-87c5-1e7e7af3a55d", - "type": "string", - "text": "Skriv navn til barna?", - "required": false, - "repeats": true, + "linkId": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", + "type": "quantity", + "text": "Milliliter urin", "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] } }, { "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='dc998a35-ee55-4715-85df-e68f117ece30').answer.value" + "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" } ], + "required": false, "readOnly": true, - "enableWhen": [ + "enableWhen": [{ "answerBoolean": true, "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", "operator": "exists" }] + } + ] + } + ] + }, + { + "linkId": "b9431104-1af1-4de4-8b74-9188ec3e4479", + "type": "group", + "text": "Oppsummering repeterende GTable Datakilde 2", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "e806447b-ab9c-49d1-8e16-0eef94235f73", + "type": "group", + "text": "Oppsummering Her ligger kode for itemkontrol Gtable", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] + } + } + ], + "item": [ + { + "linkId": "3918616c-bf21-4c8b-8579-2a68979b4474", + "type": "choice", + "text": "Alternativer", + "required": false, + "answerValueSet": "#1102", + "extension": [ { - "answerBoolean": true, - "question": "dc998a35-ee55-4715-85df-e68f117ece30", - "operator": "exists" + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='20e024a7-98f4-46f7-8224-6d4dcf736a7e').answer.value" } - ] + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", "operator": "exists" }] }, { - "linkId": "5e7bd964-bdc0-4152-a6f8-a9a2e698b45a", - "type": "boolean", - "text": "Spiser dere grønnsaker?", + "linkId": "91f9a598-bb9f-4565-fa4a-518e3cbc65d4", + "type": "date", + "text": "Dato", "required": false, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] } }, { "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe').answer.value" + "valueString": "QuestionnaireResponse.descendants().where(linkId='22bf506e-f446-46d2-8b00-3b264f6479b8').answer.value" } ], "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", - "operator": "=" - } - ] + "enableWhen": [{ "answerBoolean": true, "question": "22bf506e-f446-46d2-8b00-3b264f6479b8", "operator": "exists" }] }, { - "linkId": "8b86be37-902e-4d6c-8af9-b7625f28c0df", - "type": "open-choice", + "linkId": "82976047-81e4-4b20-da7a-a3dd9f0e797a", + "type": "time", + "text": "Klokkeslett", "required": false, - "answerOption": [ + "extension": [ { - "valueCoding": { - "id": "d3b04993-a61f-47c9-d5ba-3c5e539f6c47", - "code": "frukt", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Frukt" + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] } }, { - "valueCoding": { - "id": "e95b7df4-0d53-4a16-c677-79dbaf6ab5f1", - "code": "salat", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Salat" - } + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='522b65ef-02bc-4fcf-8041-1ca0872440ea').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "522b65ef-02bc-4fcf-8041-1ca0872440ea", "operator": "exists" }] + }, + { + "linkId": "ec83212c-578f-4308-cdae-8be63d1d9889", + "type": "quantity", + "text": "Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } }, { - "valueCoding": { - "id": "e36d6229-1aea-4826-81f7-4dafce056165", - "code": "asparges", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Asparges" + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] } }, { - "valueCoding": { - "id": "9b5f2c33-1d12-4874-8157-07ad382721c1", - "code": "gresskar", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Gresskar" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='df1e8a08-f0e6-404b-a420-856a416c1e16').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "df1e8a08-f0e6-404b-a420-856a416c1e16", "operator": "exists" }] + }, + { + "linkId": "6fee57b2-7f5d-4990-8608-f12540d2cdd6", + "type": "integer", + "text": "Tall", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] } }, { - "valueCoding": { - "id": "40a50872-07af-4ee9-9985-5c0670fed596", - "code": "gulrot", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Gulrot" - } + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='a1c1db2b-2779-4e99-88d6-2d02c18d797c').answer.value" } ], - "enableWhen": [ + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", "operator": "exists" }] + }, + { + "linkId": "25bbc49c-3bba-40b3-fb90-8684bcd176e2", + "type": "decimal", + "text": "Desimaltall", + "extension": [ + { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, { - "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", - "operator": "=", - "answerBoolean": true + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } }, { - "answerBoolean": true, - "question": "70760537-890f-452e-aa60-07f8534088b0", - "operator": "exists" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='81b77ece-6d3f-49cd-8cbf-1ff14de07964').answer.value" } ], - "text": "Hvilke grønnsaker spiser dere?", + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", "operator": "exists" }] + }, + { + "linkId": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", + "type": "boolean", + "text": "Bekreftelse", + "required": false, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "check-box" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] } }, { "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='70760537-890f-452e-aa60-07f8534088b0').answer.value" + "valueString": "QuestionnaireResponse.descendants().where(linkId='df586ed5-0b3b-43eb-ae05-fa1f201d3730').answer.value" } ], - "readOnly": true + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", "operator": "=" }] } ] } ] }, { - "linkId": "d9e5938b-f7fc-4f9e-8ba7-fd2e678f77e1", - "type": "group", - "text": "Vanlig oppsummering", - "required": false, - "item": [ - { - "linkId": "5e8bfa58-f5fc-43f2-cadb-460ae03f7886", - "type": "string", - "text": "Har du barn?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='4ced67ca-c9e4-44fd-9339-26c3fe2741bf').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "4ced67ca-c9e4-44fd-9339-26c3fe2741bf", - "operator": "exists" - } - ] - }, - { - "linkId": "54b75fe6-883e-43be-814e-b3b512fbb670", - "type": "integer", - "text": "Hvor mange barn har du?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='b8e63b95-baef-41bb-c141-19ccc1ebb5e2').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "b8e63b95-baef-41bb-c141-19ccc1ebb5e2", - "operator": "exists" - } - ] - }, - { - "linkId": "d42eaddb-9233-4c48-f157-4898c1024cbf", - "type": "string", - "text": "Skriv navn til barna?", - "required": false, - "repeats": true, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='dc998a35-ee55-4715-85df-e68f117ece30').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "dc998a35-ee55-4715-85df-e68f117ece30", - "operator": "exists" - } - ] - }, + "extension": [ { - "linkId": "0f8f98c2-a329-4121-94ea-b0f176aad236", - "type": "boolean", - "text": "Spiser dere grønnsaker?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", - "operator": "=" - } - ] - }, + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "extension": [ { - "linkId": "defe3dc7-8780-47ee-9f0e-b3e4640399fc", - "type": "open-choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "d3b04993-a61f-47c9-d5ba-3c5e539f6c47", - "code": "frukt", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Frukt" - } - }, - { - "valueCoding": { - "id": "e95b7df4-0d53-4a16-c677-79dbaf6ab5f1", - "code": "salat", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Salat" - } - }, - { - "valueCoding": { - "id": "e36d6229-1aea-4826-81f7-4dafce056165", - "code": "asparges", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Asparges" - } - }, - { - "valueCoding": { - "id": "9b5f2c33-1d12-4874-8157-07ad382721c1", - "code": "gresskar", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Gresskar" - } - }, - { - "valueCoding": { - "id": "40a50872-07af-4ee9-9985-5c0670fed596", - "code": "gulrot", - "system": "urn:uuid:0a1f2a4c-6d67-41fd-8fed-7a434ede4f6b", - "display": "Gulrot" - } - } - ], - "enableWhen": [ - { - "question": "9b9ab38f-b887-4c68-8fc7-90b98d9f3cfe", - "operator": "=", - "answerBoolean": true - }, - { - "answerBoolean": true, - "question": "70760537-890f-452e-aa60-07f8534088b0", - "operator": "exists" - } - ], - "text": "Hvilke grønnsaker spiser dere?", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "check-box" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='70760537-890f-452e-aa60-07f8534088b0').answer.value" - } - ], - "readOnly": true + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } } - ] + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false } ] } From bf4194fde3335a5dbc0b8c915f62e3108056b724 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:58:25 +0100 Subject: [PATCH 56/83] g-table --- src/components/formcomponents/table/TableContainer.tsx | 2 +- .../formcomponents/table/tables/gtable/GTable.tsx | 8 ++++---- src/components/formcomponents/table/tables/utils.ts | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/formcomponents/table/TableContainer.tsx b/src/components/formcomponents/table/TableContainer.tsx index 2521a1e0..31db27ff 100644 --- a/src/components/formcomponents/table/TableContainer.tsx +++ b/src/components/formcomponents/table/TableContainer.tsx @@ -88,7 +88,7 @@ const TableContainer = ({ return ( <>

{headline}

- + ); case TableCodes.table: diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx index 9991eb58..5b60f8a9 100644 --- a/src/components/formcomponents/table/tables/gtable/GTable.tsx +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; import { TableBody, @@ -17,12 +17,12 @@ import { getGtablebodyObject } from './utils'; interface Props { items: QuestionnaireItem[]; questionnaireResponse?: QuestionnaireResponse | null; + tableCodesCoding: Coding[]; } -const GTable = ({ items, questionnaireResponse }: Props): JSX.Element => { - +const GTable = ({ items, questionnaireResponse, tableCodesCoding }: Props): JSX.Element => { const gTable = getGtablebodyObject(items, questionnaireResponse); - + console.log(tableCodesCoding); return gTable.rows.length > 0 ? ( diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 249c3161..e2ca6cc6 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -335,10 +335,12 @@ export const getDisplayFromCodingSystem = (coding: Coding[], codingSystem: strin const code = findCodeBySystem(coding, codingSystem); return code[0]?.display; }; + export const getCodeFromCodingSystem = (coding: Coding[], codingSystem: string): string | undefined => { const code = findCodeBySystem(coding, codingSystem); return code[0]?.code; }; + export function findCodeBySystem(coding: T[], system?: string): T[] { return coding.filter(code => code.system === system); } From 03ab939e74a2b7a7c278f699a077a5543c64b635 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:02:45 +0100 Subject: [PATCH 57/83] sorting on gtable --- package-lock.json | 34 +- .../table/tables/gtable/GTable.tsx | 28 +- .../table/tables/gtable/utils.ts | 41 +- .../tables/table/StandardTableHeader.tsx | 2 +- src/preview/FormFillerPreview.tsx | 2 +- .../skjema/gtable-nb-NO-v0.1_sorterubg.json | 574 ++++++++++++++++++ src/util/extension.ts | 2 +- 7 files changed, 655 insertions(+), 28 deletions(-) create mode 100644 src/preview/skjema/gtable-nb-NO-v0.1_sorterubg.json diff --git a/package-lock.json b/package-lock.json index a61e142b..8b96c856 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@helsenorge/refero", - "version": "14.0.0", + "version": "14.0.0-beta01", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@helsenorge/refero", - "version": "14.0.0", + "version": "14.0.0-beta01", "license": "MIT", "dependencies": { "@types/react-collapse": "^5.0.1", @@ -13073,6 +13073,15 @@ "redux": "^4.0.0" } }, + "node_modules/react-refresh": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", + "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react-router": { "version": "6.15.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.15.0.tgz", @@ -13105,15 +13114,6 @@ "react-dom": ">=16.8" } }, - "node_modules/react-refresh": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", - "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/react-shallow-renderer": { "version": "16.15.0", "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz", @@ -21274,8 +21274,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "peer": true + "dev": true }, "global": { "version": "4.4.0", @@ -24973,6 +24972,12 @@ } } }, + "react-refresh": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", + "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", + "dev": true + }, "react-router": { "version": "6.15.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.15.0.tgz", @@ -25834,8 +25839,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "peer": true + "dev": true }, "telejson": { "version": "6.0.8", diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx index 5b60f8a9..9d9f1dad 100644 --- a/src/components/formcomponents/table/tables/gtable/GTable.tsx +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState } from 'react'; import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; @@ -10,9 +10,11 @@ import { TableHead, HeaderCategory, TableHeadCell, + SortDirection, } from '@helsenorge/designsystem-react/components/Table'; -import { getGtablebodyObject } from './utils'; +import { getGtablebodyObject, getLinkIdToSortBy } from './utils'; +import { transformCodingToSortDirection } from '../utils'; interface Props { items: QuestionnaireItem[]; @@ -21,14 +23,28 @@ interface Props { } const GTable = ({ items, questionnaireResponse, tableCodesCoding }: Props): JSX.Element => { - const gTable = getGtablebodyObject(items, questionnaireResponse); - console.log(tableCodesCoding); + const linkIdToSortBy = getLinkIdToSortBy(tableCodesCoding); + const [sortDir, setSortDir] = useState(transformCodingToSortDirection(tableCodesCoding)); + const sortable = linkIdToSortBy !== undefined ? true : false; + + const handleSort = (): void => { + setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); + }; + + const gTable = getGtablebodyObject(items, questionnaireResponse, sortDir, linkIdToSortBy); + return gTable.rows.length > 0 ? ( - + {gTable?.headerRow?.map(column => ( - + {column.value} ))} diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index eaad5740..0035e9be 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -1,10 +1,13 @@ import * as uuid from 'uuid'; -import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from '../../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from '../../../../../types/fhir'; + +import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; import { IGTable, IGTableColumn, IGTableHeaderItem, IGTableRow } from './interface'; +import codeSystems from '../../../../../constants/codingsystems'; import { QuestionnaireItemWithAnswers } from '../interface'; -import { getEnabledQuestionnaireItemsWithAnswers, getPrimitiveValueFromItemType } from '../utils'; +import { getCodeFromCodingSystem, getEnabledQuestionnaireItemsWithAnswers, getPrimitiveValueFromItemType } from '../utils'; export const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): number => { if (items.length === 0) { @@ -59,7 +62,12 @@ export const createTableHeader = (items: QuestionnaireItem[]): IGTableHeaderItem value: item.text || '', })); -export const getGtablebodyObject = (items: QuestionnaireItem[], questionnaireResponse?: QuestionnaireResponse | null): IGTable => { +export const getGtablebodyObject = ( + items: QuestionnaireItem[], + questionnaireResponse?: QuestionnaireResponse | null, + sortDir?: SortDirection, + linkIdToSortBy?: string +): IGTable => { if (!questionnaireResponse || items.length === 0) { return { id: uuid.v4(), @@ -73,6 +81,31 @@ export const getGtablebodyObject = (items: QuestionnaireItem[], questionnaireRes headerRow: createTableHeader(answerItems), rows: createTableRows(answerItems), }; - + if (sortDir && linkIdToSortBy) { + return sortTableRows( + table, + table.headerRow.findIndex(header => header.id === linkIdToSortBy), + sortDir + ); + } return table; }; + +export const sortTableRows = (table: IGTable, columnIndex: number, sortOrder: SortDirection): IGTable => { + const sortedTable = { + headerRow: table.headerRow, + id: table.id, + rows: table.rows.sort((a, b) => { + const aValue = a?.columns.length > columnIndex ? a?.columns[columnIndex]?.value || '' : ''; + const bValue = b?.columns.length > columnIndex ? b?.columns[columnIndex]?.value || '' : ''; + + return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + }), + }; + return sortedTable; +}; + +export const getLinkIdToSortBy = (coding: Coding[]): string | undefined => { + const sortDisplay = getCodeFromCodingSystem(coding, codeSystems.TableOrderingColum); + return sortDisplay ? sortDisplay : undefined; +}; diff --git a/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx b/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx index c80532db..3a9ebf1e 100644 --- a/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx +++ b/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx @@ -22,7 +22,7 @@ export const StandardTableHeader = ({ headerRow, setSortDir, sortDir, displayToS {headerRow.map(column => ( x.code as TABLE_CODES_VALUES) + ?.map(x => x.code?.toLocaleLowerCase() as TABLE_CODES_VALUES) .filter(hasCode) .filter(isTableCode) || []; return codeValues; From 83dfc7bcacfa34668c03dd7ff38675f873f559de Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:09:29 +0100 Subject: [PATCH 58/83] move header to its own file --- .../table/tables/gtable/GTable.tsx | 35 +- .../table/tables/gtable/GTableHeader.tsx | 37 + src/preview/FormFillerPreview.tsx | 2 +- src/preview/skjema/NHN_Test_Table.json | 983 ---------- src/preview/skjema/NHN_Test_multi.json | 1641 ----------------- .../NHN_Test_tableHN2_Egendefinert.json | 1503 --------------- ...HN_Test_tableHN2_ToKolonner-nb-NO (1).json | 1 - ...e-hn1-underliggende-sp\303\270rsmaal.json" | 540 ------ .../skjema/gtable-nb-NO-v0.1_sorterubg.json | 574 ------ src/preview/skjema/kun_qest_hn1.json | 311 ---- src/preview/skjema/kun_qest_hn2.json | 1146 ------------ src/preview/skjema/kun_qest_repeatable.json | 542 ------ src/preview/skjema/multitable-skjema.json | 738 -------- src/preview/skjema/text-bug.json | 85 - 14 files changed, 42 insertions(+), 8096 deletions(-) create mode 100644 src/components/formcomponents/table/tables/gtable/GTableHeader.tsx delete mode 100644 src/preview/skjema/NHN_Test_Table.json delete mode 100644 src/preview/skjema/NHN_Test_multi.json delete mode 100644 src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json delete mode 100644 src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO (1).json delete mode 100644 "src/preview/skjema/Table-hn1-underliggende-sp\303\270rsmaal.json" delete mode 100644 src/preview/skjema/gtable-nb-NO-v0.1_sorterubg.json delete mode 100644 src/preview/skjema/kun_qest_hn1.json delete mode 100644 src/preview/skjema/kun_qest_hn2.json delete mode 100644 src/preview/skjema/kun_qest_repeatable.json delete mode 100644 src/preview/skjema/multitable-skjema.json delete mode 100644 src/preview/skjema/text-bug.json diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx index 9d9f1dad..8feed80f 100644 --- a/src/components/formcomponents/table/tables/gtable/GTable.tsx +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -2,17 +2,9 @@ import React, { useState } from 'react'; import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; -import { - TableBody, - Table as HnTable, - TableRow, - TableCell, - TableHead, - HeaderCategory, - TableHeadCell, - SortDirection, -} from '@helsenorge/designsystem-react/components/Table'; +import { TableBody, Table as HnTable, TableRow, TableCell, SortDirection } from '@helsenorge/designsystem-react/components/Table'; +import { GTableHeader } from './GTableHeader'; import { getGtablebodyObject, getLinkIdToSortBy } from './utils'; import { transformCodingToSortDirection } from '../utils'; @@ -25,31 +17,12 @@ interface Props { const GTable = ({ items, questionnaireResponse, tableCodesCoding }: Props): JSX.Element => { const linkIdToSortBy = getLinkIdToSortBy(tableCodesCoding); const [sortDir, setSortDir] = useState(transformCodingToSortDirection(tableCodesCoding)); - const sortable = linkIdToSortBy !== undefined ? true : false; - - const handleSort = (): void => { - setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); - }; const gTable = getGtablebodyObject(items, questionnaireResponse, sortDir, linkIdToSortBy); - return gTable.rows.length > 0 ? ( + return gTable && gTable.rows.length > 0 ? ( - - - {gTable?.headerRow?.map(column => ( - - {column.value} - - ))} - - + {gTable.rows.map(item => { return ( diff --git a/src/components/formcomponents/table/tables/gtable/GTableHeader.tsx b/src/components/formcomponents/table/tables/gtable/GTableHeader.tsx new file mode 100644 index 00000000..7a780a34 --- /dev/null +++ b/src/components/formcomponents/table/tables/gtable/GTableHeader.tsx @@ -0,0 +1,37 @@ +import React from 'react'; + +import { HeaderCategory, SortDirection, TableHead, TableHeadCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; + +import { IGTableHeaderItem } from './interface'; + +type Props = { + headerRow: IGTableHeaderItem[]; + setSortDir: React.Dispatch>; + sortDir?: SortDirection; + linkIdToSortBy?: string; +}; + +export const GTableHeader = ({ headerRow, sortDir, setSortDir, linkIdToSortBy }: Props): JSX.Element => { + const sortable = linkIdToSortBy !== undefined ? true : false; + + const handleSort = (): void => { + setSortDir(prevState => (prevState === SortDirection.asc ? SortDirection.desc : SortDirection.asc)); + }; + return ( + + + {headerRow?.map(column => ( + + {column.value} + + ))} + + + ); +}; diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index b7107310..971f9fab 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/gtable-nb-NO-v0.1_sorterubg.json'; +import skjema from './skjema/kun_qest.json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; diff --git a/src/preview/skjema/NHN_Test_Table.json b/src/preview/skjema/NHN_Test_Table.json deleted file mode 100644 index 8557c3fb..00000000 --- a/src/preview/skjema/NHN_Test_Table.json +++ /dev/null @@ -1,983 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "89fad8fa-7193-4a80-a597-765c7c8a01ab", - "name": "NHN_Test_Table_SvaralternativerStyrer", - "title": "Table_SvaralternativerStyrer", - "version": "0.1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [ - { - "system": "urn:ietf:bcp:47", - "code": "nb-NO", - "display": "Bokmål" - } - ], - "security": [ - { - "code": "3", - "display": "Helsehjelp (Full)", - "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - }, - { - "code": "1", - "display": "Kun innbygger selv", - "system": "http://helsenorge.no/fhir/KanUtforesAv" - } - ] - }, - "useContext": [ - { - "code": { - "system": "http://hl7.org/fhir/ValueSet/usage-context-type", - "code": "focus", - "display": "Clinical Focus" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1.8655", - "display": "Table_SvaralternativerStyrer" - } - ] - } - } - ], - "contact": [ - { - "name": "http://www.nhn.no" - } - ], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", - "code": "1" - } - }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", - "valueReference": { - "reference": "Endpoint/1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-help", - "display": "Hide help texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", - "valueBoolean": true - } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { - "code": "1", - "display": "Ja" - }, - { - "code": "2", - "display": "Nei" - }, - { - "code": "3", - "display": "Vet ikke" - } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "82d5de9c-242d-4649-8c14-3ede137438b3", - "type": "group", - "text": "Data inn Table", - "required": false, - "item": [ - { - "linkId": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "type": "choice", - "text": "Er du syk", - "required": false, - "answerValueSet": "#1102", - "item": [ - { - "linkId": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", - "type": "string", - "text": "Hva feiler det deg?", - "required": false, - "enableWhen": [ - { - "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - } - ] - } - ] - }, - { - "linkId": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "type": "choice", - "text": "Er du uvel?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "check-box" - } - ] - } - } - ], - "item": [ - { - "linkId": "7953faf6-55f4-406b-873b-ef167d7a1fbc", - "type": "time", - "text": "Når ble du uvel?", - "required": false, - "enableWhen": [ - { - "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - } - ] - }, - { - "linkId": "638764d4-baea-46d1-9e81-d98ff1c56b4d", - "type": "string", - "text": "Hva følte du?", - "required": false, - "enableWhen": [ - { - "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - } - ] - } - ] - }, - { - "linkId": "2db8bc54-237f-411c-e3c6-448cef6ec29c", - "type": "choice", - "text": "Vet du hvilken dag og hva klokken er?", - "required": false, - "answerValueSet": "#1102", - "item": [ - { - "linkId": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", - "type": "date", - "text": "Dato", - "required": false, - "enableWhen": [ - { - "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - } - ] - }, - { - "linkId": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", - "type": "time", - "text": "Klokken", - "required": false, - "enableWhen": [ - { - "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - } - ] - } - ] - }, - { - "linkId": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "type": "choice", - "text": "Kan du notere ned data om deg?", - "required": false, - "answerValueSet": "#1102", - "item": [ - { - "linkId": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", - "type": "quantity", - "text": "Vekt", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "kg", - "display": "kilo", - "system": "http://unitsofmeasure.org" - } - } - ], - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - } - ] - }, - { - "linkId": "e46b791e-7b83-47c7-8511-0e42751adc0a", - "type": "quantity", - "text": "Høyde", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "cm", - "display": "centimeter", - "system": "http://unitsofmeasure.org" - } - } - ], - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - } - ] - }, - { - "linkId": "f79dfabb-a788-445d-ba7a-a846b34e4b17", - "type": "integer", - "text": "Antall ganger du går på tur i løpet av uken", - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - } - ] - }, - { - "linkId": "1246b383-dc6e-43d9-a68e-03213b255739", - "type": "boolean", - "text": "Er disse verdiene korrekte, hak av", - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - } - ] - } - ] - } - ] - }, - { - "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", - "type": "group", - "text": "Oppsummering Table - Svaralternativer styrer", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary-container" - } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", - "type": "group", - "text": "Oppsummering ", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table" - } - ] - } - } - ], - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "7aef743f-0d06-45dc-9155-6566c203a3b6" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "code": "DESC", - "display": "Descending" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "1", - "display": "Ja" - } - ], - "item": [ - { - "linkId": "a58a1ed6-30c3-409c-8578-ffccf6f378d0", - "type": "display", - "text": "Her kommer en oppsummering av dine svar \"Displaytext\"", - "required": false - }, - { - "linkId": "bab6ece9-d978-4601-9169-7dcf9c6e0007", - "type": "choice", - "text": "Er du syk", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='c01b4389-6597-4b81-95d9-f54f61ea2cb8').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "operator": "exists" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Er du syk" - } - ] - }, - "code": [ - { - "code": "Default", - "display": "Viser kun besvarte alternativer", - "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", - "id": "6530d2e2-9654-4f1d-84a4-65cd3f12941c" - } - ], - "item": [ - { - "linkId": "54338f3c-5922-4ff5-87d9-26477c966e7f", - "type": "string", - "text": "Hva feiler det deg?", - "required": false, - "enableWhen": [ - { - "question": "bab6ece9-d978-4601-9169-7dcf9c6e0007", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - }, - { - "answerBoolean": true, - "question": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='260f5f7c-ada3-49f3-8d50-166ee1ba4afa').answer.value" - } - ], - "readOnly": true - } - ] - }, - { - "linkId": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "type": "choice", - "text": "Er du uvel?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "check-box" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='04ccb620-ba66-4bed-d29a-08fb9e95c41f').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "operator": "exists" - } - ], - "item": [ - { - "linkId": "7178ee96-a482-4e76-8f22-c3f3b31c08cd", - "type": "time", - "text": "Når ble du uvel?", - "required": false, - "enableWhen": [ - { - "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - }, - { - "answerBoolean": true, - "question": "7953faf6-55f4-406b-873b-ef167d7a1fbc", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7953faf6-55f4-406b-873b-ef167d7a1fbc').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "7757a10f-e627-40ee-d105-170d07859c2f", - "type": "string", - "text": "Hva følte du?", - "required": false, - "enableWhen": [ - { - "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - }, - { - "answerBoolean": true, - "question": "638764d4-baea-46d1-9e81-d98ff1c56b4d", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='638764d4-baea-46d1-9e81-d98ff1c56b4d').answer.value" - } - ], - "readOnly": true - } - ] - }, - { - "linkId": "8fbf52cc-3bf3-4fa1-d1be-f2dff1bc0b24", - "type": "choice", - "text": "Vet du hvilken dag og hva klokken er?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='2db8bc54-237f-411c-e3c6-448cef6ec29c').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", - "operator": "exists" - } - ], - "item": [ - { - "linkId": "f49cf9ae-0ee5-4947-86b9-b2e82380f1ac", - "type": "date", - "text": "Dato", - "required": false, - "enableWhen": [ - { - "answerBoolean": true, - "question": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='29c5579a-cf2b-43b9-f55c-0d239ccaf02c').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "8b86f173-d126-4c73-8c89-10ee9cc45535", - "type": "time", - "text": "Klokken", - "required": false, - "enableWhen": [ - { - "answerBoolean": true, - "question": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='9acb4110-ea0a-48b4-985c-fdb2cf572de3').answer.value" - } - ], - "readOnly": true - } - ] - }, - { - "linkId": "1106fee1-475a-4018-f554-382985276782", - "type": "choice", - "text": "Kan du notere ned data om deg?", - "required": false, - "enableWhen": [ - { - "answerBoolean": true, - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "exists" - } - ], - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='015337fd-a035-45ab-8fd5-286a2a5be7a1').answer.value" - } - ], - "readOnly": true, - "item": [ - { - "linkId": "5b935dbb-9041-480e-88e6-ef76ec1fb102", - "type": "quantity", - "text": "Vekt", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "kg", - "display": "kilo", - "system": "http://unitsofmeasure.org" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='56800262-18bb-4d0f-8a08-ea22f5fc4e01').answer.value" - } - ], - "required": false, - "enableWhen": [ - { - "answerBoolean": true, - "question": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", - "operator": "exists" - } - ], - "readOnly": true - }, - { - "linkId": "657c9c87-b5f9-4b0b-8fad-91ab8697f039", - "type": "quantity", - "text": "Høyde", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "cm", - "display": "centimeter", - "system": "http://unitsofmeasure.org" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='e46b791e-7b83-47c7-8511-0e42751adc0a').answer.value" - } - ], - "required": false, - "enableWhen": [ - { - "answerBoolean": true, - "question": "e46b791e-7b83-47c7-8511-0e42751adc0a", - "operator": "exists" - } - ], - "readOnly": true - }, - { - "linkId": "c2be52a9-f7d6-4ea1-bdcf-8c5192ed25a5", - "type": "integer", - "text": "Antall ganger du går på tur i løpet av uken", - "required": false, - "enableWhen": [ - { - "answerBoolean": true, - "question": "f79dfabb-a788-445d-ba7a-a846b34e4b17", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f79dfabb-a788-445d-ba7a-a846b34e4b17').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "53847e9d-4cd4-4a92-8a8f-9c4fcd168e81", - "type": "boolean", - "text": "Er disse verdiene korrekte, hak av", - "required": false, - "enableWhen": [ - { - "answerBoolean": true, - "question": "1246b383-dc6e-43d9-a68e-03213b255739", - "operator": "=" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='1246b383-dc6e-43d9-a68e-03213b255739').answer.value" - } - ], - "readOnly": true - } - ] - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-2", - "display": "SOT-2" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-3", - "display": "SOT-3" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - } - ] -} diff --git a/src/preview/skjema/NHN_Test_multi.json b/src/preview/skjema/NHN_Test_multi.json deleted file mode 100644 index a3c40a78..00000000 --- a/src/preview/skjema/NHN_Test_multi.json +++ /dev/null @@ -1,1641 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "1c90d68d-78d8-4c7b-b5fb-44c165babbcc", - "name": "NHN_Test_tableHN2", - "title": "tableHN2", - "description": "Skjema før time for nyrepasient", - "version": "0.1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], - "security": [ - { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, - { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } - ] - }, - "useContext": [ - { - "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, - "valueCodeableConcept": { "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "tableHN2" }] } - } - ], - "contact": [{ "name": "http://www.nhn.no" }], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "resourceType": "ValueSet", - "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", - "version": "1.0", - "name": "Viktighet", - "title": "Viktighet", - "date": "2023-03-29T13:43:26.881Z", - "status": "draft", - "publisher": "Viktighet", - "compose": { - "include": [ - { - "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", - "concept": [ - { "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", "code": "lite-viktig---0-", "display": "Lite viktig - 0 " }, - { "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", "code": "1", "display": "1" }, - { "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", "code": "2", "display": "2" }, - { "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", "code": "3", "display": "3" }, - { "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", "code": "4", "display": "4" }, - { "id": "50e5f8f0-db46-45f9-8fda-67039933756e", "code": "5", "display": "5" }, - { "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", "code": "6", "display": "6" }, - { "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", "code": "7", "display": "7" }, - { "id": "dc888467-ab8b-4412-82ca-0312edcc0695", "code": "8", "display": "8" }, - { "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", "code": "9", "display": "9" }, - { "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", "code": "veldig-viktig-10-", "display": "Veldig viktig 10 " } - ] - } - ] - } - }, - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" }, - { "code": "3", "display": "Vet ikke" } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "daa6209a-d17f-4dc3-9d00-2521b9f51300", - "type": "group", - "text": "Data inn Enkel HNtable", - "item": [ - { "linkId": "f5698097-d1e0-4cc2-f71c-95967e31b5e5", "type": "string", "text": "Hva heter du?", "required": false }, - { "linkId": "f0c73b0d-bc50-471e-ca76-e2f5098cc233", "type": "integer", "text": "Hvor gammel er du?", "required": false }, - { "linkId": "00e3693a-c80c-4a2d-842e-b92f9dbf97af", "type": "quantity", "text": "Hvor mye veier du?", "required": false }, - { "linkId": "bf036003-254b-4406-8b2a-8f62a899bb63", "type": "date", "text": "Hvilken dag er det?", "required": false }, - { "linkId": "58ed3341-94b3-4358-80c2-72df735d4bbe", "type": "time", "text": "Hva er klokka?", "required": false }, - { - "linkId": "fade11fc-b62f-4b4f-f414-4232fe024038", - "type": "choice", - "text": "Er du grei?", - "required": false, - "answerValueSet": "#1102" - }, - { "linkId": "b49f4f1b-c4d4-4d6c-8cf7-ffb556420404", "type": "boolean", "text": "Liker du dette, hak av", "required": false } - ], - "required": false - }, - { - "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", - "type": "group", - "text": "Data inn HNTable2 ", - "required": false, - "item": [ - { - "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", - "type": "boolean", - "text": "Hoven i beina", - "required": false, - "item": [ - { - "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] - }, - { - "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "type": "choice", - "text": "Viktighet Hoven i beina", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] - } - ] - }, - { - "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "type": "boolean", - "text": "Kløe i huden", - "required": false, - "item": [ - { - "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] - }, - { - "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "type": "choice", - "text": "Viktighet kløe i huden", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] - } - ] - } - ] - }, - { - "linkId": "82d5de9c-242d-4649-8c14-3ede137438b3", - "type": "group", - "text": "Data inn Table", - "required": false, - "item": [ - { - "linkId": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "type": "choice", - "text": "Er du syk", - "required": false, - "answerValueSet": "#1102", - "item": [ - { - "linkId": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", - "type": "string", - "text": "Hva feiler det deg?", - "required": false, - "enableWhen": [ - { - "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ] - }, - { - "linkId": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "type": "choice", - "text": "Er du uvel?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } - } - ], - "item": [ - { - "linkId": "7953faf6-55f4-406b-873b-ef167d7a1fbc", - "type": "time", - "text": "Når ble du uvel?", - "required": false, - "enableWhen": [ - { - "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "638764d4-baea-46d1-9e81-d98ff1c56b4d", - "type": "string", - "text": "Hva følte du?", - "required": false, - "enableWhen": [ - { - "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ] - } - ] - }, - { - "linkId": "4c8b9272-16b7-4fe0-8e16-6f86077709cb", - "type": "group", - "text": "Data inn i repeterende: GTable", - "required": false, - "item": [ - { - "linkId": "ba62ebba-244d-43b0-ac53-39dab184c953", - "type": "group", - "text": "Urin", - "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], - "required": false, - "repeats": true, - "item": [ - { "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", "type": "date", "text": "Dato", "required": false }, - { "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "type": "time", "text": "Klokkeslett", "required": false }, - { - "linkId": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - } - ], - "required": false - }, - { - "linkId": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } - } - ], - "required": false - } - ] - } - ] - }, - { - "linkId": "d6357cc9-8db9-4243-a30b-d2defcf1d3f3", - "type": "group", - "text": "Data inn HNtable1", - "required": false, - "item": [ - { "linkId": "75c421cb-1906-4224-9ea7-ae6368e8bb53", "type": "string", "text": "Hva heter du?", "required": false }, - { - "linkId": "43ccede7-bf41-414a-b4ef-5c9cd61dfd55", - "type": "choice", - "text": "Er du syk?", - "required": false, - "answerValueSet": "#1102", - "item": [ - { - "linkId": "3e229cf6-e8d5-4d15-8728-60005f679f12", - "type": "string", - "text": "Hva feiler det deg?", - "required": false, - "enableWhen": [ - { - "question": "43ccede7-bf41-414a-b4ef-5c9cd61dfd55", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ] - }, - { "linkId": "e2c92f3d-4dd8-47d3-c22f-6b9ceaea0f5d", "type": "date", "text": "Dagens dato?", "required": false }, - { "linkId": "2f64f661-7994-4a7b-900a-cddc6ecac3b3", "type": "time", "text": "Hva er klokka?", "required": false }, - { "linkId": "0c332f96-550d-45d5-8f0f-ae1465430542", "type": "quantity", "text": "Hva veier du?", "required": false }, - { - "linkId": "41d46a1d-8103-48ed-8564-7a3477e1836d", - "type": "choice", - "text": "Hak av for det du liker", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a45b2e7f-1fb5-47ac-809a-7e25a687e3dc", - "code": "banan", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Banan" - } - }, - { - "valueCoding": { - "id": "209e5eb0-ef12-4414-8115-b69a953ebc19", - "code": "eple", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Eple" - } - }, - { - "valueCoding": { - "id": "610ec855-43c6-4774-81e3-81b1fcc8e7c7", - "code": "pære", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Pære" - } - }, - { - "valueCoding": { - "id": "70c41380-7ffb-434e-f310-ef92786a0f85", - "code": "plomme", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Plomme" - } - }, - { - "valueCoding": { - "id": "197c3327-7191-4499-8d1d-3f548463e86b", - "code": "kirsebær", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Kirsebær" - } - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } - } - ] - }, - { - "linkId": "578883d4-1bdd-4662-8e7f-7a960a678b5c", - "type": "choice", - "text": "Velg det du liker best", - "code": [ - { - "code": "Full", - "display": "Full vising", - "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", - "id": "0e024fbb-438d-45e1-8ed1-317415636f0f" - } - ], - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a45b2e7f-1fb5-47ac-809a-7e25a687e3dc", - "code": "banan", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Banan" - } - }, - { - "valueCoding": { - "id": "209e5eb0-ef12-4414-8115-b69a953ebc19", - "code": "eple", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Eple" - } - }, - { - "valueCoding": { - "id": "610ec855-43c6-4774-81e3-81b1fcc8e7c7", - "code": "pære", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Pære" - } - }, - { - "valueCoding": { - "id": "70c41380-7ffb-434e-f310-ef92786a0f85", - "code": "plomme", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Plomme" - } - }, - { - "valueCoding": { - "id": "197c3327-7191-4499-8d1d-3f548463e86b", - "code": "kirsebær", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Kirsebær" - } - } - ] - } - ] - }, - { - "linkId": "85bcab33-b84b-4f9f-cd98-6bfa6dedc8c7", - "type": "group", - "text": "Oppsummering egendefinerte kolonner: HNTable2", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "c87dc79b-afd8-4ef5-8ebf-1b9d3a6a4d9f" - } - ], - "item": [ - { - "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", - "type": "group", - "text": "table-HN2 Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn2" }] - } - } - ], - "code": [ - { - "code": "1", - "display": "Sykdom", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" - }, - { - "code": "3", - "display": "Alvorlighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" - }, - { - "code": "ND", - "display": "NumericDescending", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" - }, - { - "code": "2", - "display": "Column 2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" - } - ], - "item": [ - { - "linkId": "b89fda34-0e7f-4512-9ffe-0299d19f00fd", - "type": "group", - "text": "Hoven i beina", - "required": false, - "enableWhen": [{ "question": "147ab493-0186-4a4e-8167-c10c829c09ca", "operator": "=", "answerBoolean": true }] - }, - { - "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", "operator": "exists" }], - "text": "Viktighet" - }, - { - "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [{ "answerBoolean": true, "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", "operator": "exists" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet" - }, - { - "linkId": "9ef47ae4-9c4e-4e0e-9792-4f55b30ccfcd", - "type": "group", - "text": "Kløe i huden", - "required": false, - "enableWhen": [{ "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", "operator": "=", "answerBoolean": true }] - }, - { - "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", "operator": "exists" }], - "text": "Viktiget" - }, - { - "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [{ "answerBoolean": true, "question": "926cc2a7-1853-46e6-8e98-cb3405730292", "operator": "exists" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet" - } - ] - } - ] - }, - { - "linkId": "165b10e9-4d23-4fb4-af96-2c0aae42ea00", - "type": "group", - "text": "table-HN2 Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn2" }] - } - } - ], - "code": [ - { - "code": "1", - "display": "Svar på ulike spørsmål", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" - }, - { - "code": "DESC", - "display": "AlfabeticDescending", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" - } - ], - "item": [ - { - "linkId": "2dc642a8-2c37-4f77-820b-77b4140c4347", - "type": "string", - "text": "Hva heter du?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f5698097-d1e0-4cc2-f71c-95967e31b5e5').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "f5698097-d1e0-4cc2-f71c-95967e31b5e5", "operator": "exists" }] - }, - { - "linkId": "c80cdc6d-772a-44ad-8955-3d1c9a900942", - "type": "integer", - "text": "Hvor gammel er du?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f0c73b0d-bc50-471e-ca76-e2f5098cc233').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "f0c73b0d-bc50-471e-ca76-e2f5098cc233", "operator": "exists" }] - }, - { - "linkId": "7b45f597-79ca-4c89-840c-38705bdaa198", - "type": "quantity", - "text": "Hvor mye veier du?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='00e3693a-c80c-4a2d-842e-b92f9dbf97af').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "00e3693a-c80c-4a2d-842e-b92f9dbf97af", "operator": "exists" }] - }, - { - "linkId": "60beb1b1-0b63-49f9-fd45-e7b1d0c3c0d9", - "type": "date", - "text": "Hvilken dag er det?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='bf036003-254b-4406-8b2a-8f62a899bb63').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "bf036003-254b-4406-8b2a-8f62a899bb63", "operator": "exists" }] - }, - { - "linkId": "252778ab-7a89-4dc2-e691-bfc20701b9aa", - "type": "time", - "text": "Hva er klokka?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='58ed3341-94b3-4358-80c2-72df735d4bbe').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "58ed3341-94b3-4358-80c2-72df735d4bbe", "operator": "exists" }] - }, - { - "linkId": "5f88657a-1941-49da-8569-c6d509ec258d", - "type": "choice", - "text": "Er du grei?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='fade11fc-b62f-4b4f-f414-4232fe024038').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "fade11fc-b62f-4b4f-f414-4232fe024038", "operator": "exists" }] - }, - { - "linkId": "c18833bb-f241-4831-fbb6-f90308e327ee", - "type": "boolean", - "text": "Liker du dette, hak av", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='b49f4f1b-c4d4-4d6c-8cf7-ffb556420404').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "b49f4f1b-c4d4-4d6c-8cf7-ffb556420404", "operator": "=" }] - } - ] - }, - { - "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", - "type": "group", - "text": "Oppsummering Table - Svaralternativer styrer", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", - "type": "group", - "text": "Oppsummering ", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table" }] - } - } - ], - "item": [ - { - "linkId": "bab6ece9-d978-4601-9169-7dcf9c6e0007", - "type": "choice", - "text": "Er du syk", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='c01b4389-6597-4b81-95d9-f54f61ea2cb8').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", "operator": "exists" }], - "_text": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", "valueMarkdown": "**Er du syk**" }] - }, - "item": [ - { - "linkId": "54338f3c-5922-4ff5-87d9-26477c966e7f", - "type": "string", - "text": "Hva feiler det deg?", - "required": false, - "enableWhen": [ - { - "question": "bab6ece9-d978-4601-9169-7dcf9c6e0007", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='260f5f7c-ada3-49f3-8d50-166ee1ba4afa').answer.value" - } - ], - "readOnly": true - } - ] - }, - { - "linkId": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "type": "choice", - "text": "Er du uvel?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='04ccb620-ba66-4bed-d29a-08fb9e95c41f').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", "operator": "exists" }], - "item": [ - { - "linkId": "7178ee96-a482-4e76-8f22-c3f3b31c08cd", - "type": "time", - "text": "Når ble du uvel?", - "required": false, - "enableWhen": [ - { - "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "7953faf6-55f4-406b-873b-ef167d7a1fbc", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7953faf6-55f4-406b-873b-ef167d7a1fbc').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "7757a10f-e627-40ee-d105-170d07859c2f", - "type": "string", - "text": "Hva følte du?", - "required": false, - "enableWhen": [ - { - "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "638764d4-baea-46d1-9e81-d98ff1c56b4d", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='638764d4-baea-46d1-9e81-d98ff1c56b4d').answer.value" - } - ], - "readOnly": true - } - ] - } - ] - } - ] - }, - { - "linkId": "4d6ef3f2-423b-4aee-c43b-a5a37b460269", - "type": "group", - "text": "Oppsummering repeterende GTable", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "0845d569-993b-418a-8a1d-7ce50400c65c", - "type": "group", - "text": "Oppsummering Her ligger kode for itemkontrol Gtable", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] - } - } - ], - "item": [ - { - "linkId": "ab203143-488d-4757-946b-ddfad942205a", - "type": "date", - "text": "Dato", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", "operator": "exists" }] - }, - { - "linkId": "01f1e567-abdc-46ee-8a41-cd571e930738", - "type": "time", - "text": "Klokkeslett", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "operator": "exists" }] - }, - { - "linkId": "7b1b5765-adb5-475b-a024-d9f68d5c9f8e", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", "operator": "exists" }] - }, - { - "linkId": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", "operator": "exists" }] - } - ] - } - ] - }, - { - "linkId": "501d01fd-cf9e-44e2-83ca-22761e1e9528", - "type": "group", - "text": "Oppsummering HNtable1", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "55eaba22-6661-487f-ee24-c35e4e28fade", - "type": "group", - "text": "Oppsummering ", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn1" }] - } - } - ], - "item": [ - { - "linkId": "93d153e8-8af7-4f28-f9c2-7e32b0d6e96a", - "type": "string", - "text": "Hva heter du?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='75c421cb-1906-4224-9ea7-ae6368e8bb53').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "75c421cb-1906-4224-9ea7-ae6368e8bb53", "operator": "exists" }] - }, - { - "linkId": "cbce1de8-680d-4e3a-f8a9-bb19b383c9ae", - "type": "choice", - "text": "Er du syk?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='43ccede7-bf41-414a-b4ef-5c9cd61dfd55').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "43ccede7-bf41-414a-b4ef-5c9cd61dfd55", "operator": "exists" }], - "item": [ - { - "linkId": "325fb864-8def-40eb-8972-c8313b203f72", - "type": "string", - "text": "Hva feiler det deg?", - "required": false, - "enableWhen": [ - { - "question": "cbce1de8-680d-4e3a-f8a9-bb19b383c9ae", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "3e229cf6-e8d5-4d15-8728-60005f679f12", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='3e229cf6-e8d5-4d15-8728-60005f679f12').answer.value" - } - ], - "readOnly": true - } - ] - }, - { - "linkId": "27e88b09-da99-4da4-82d8-18c8d1bb9055", - "type": "date", - "text": "Dagens dato?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='e2c92f3d-4dd8-47d3-c22f-6b9ceaea0f5d').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "e2c92f3d-4dd8-47d3-c22f-6b9ceaea0f5d", "operator": "exists" }] - }, - { - "linkId": "5de34c6d-8034-442e-c1b9-758616ea4ba7", - "type": "time", - "text": "Hva er klokka?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='2f64f661-7994-4a7b-900a-cddc6ecac3b3').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "2f64f661-7994-4a7b-900a-cddc6ecac3b3", "operator": "exists" }] - }, - { - "linkId": "6db4dccc-4928-4708-814a-152a46faa3f9", - "type": "quantity", - "text": "Hva veier du?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='0c332f96-550d-45d5-8f0f-ae1465430542').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "0c332f96-550d-45d5-8f0f-ae1465430542", "operator": "exists" }] - }, - { - "linkId": "f46419ee-93a3-4c2f-85af-a68a98edcb68", - "type": "choice", - "text": "Hak av for det du liker", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a45b2e7f-1fb5-47ac-809a-7e25a687e3dc", - "code": "banan", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Banan" - } - }, - { - "valueCoding": { - "id": "209e5eb0-ef12-4414-8115-b69a953ebc19", - "code": "eple", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Eple" - } - }, - { - "valueCoding": { - "id": "610ec855-43c6-4774-81e3-81b1fcc8e7c7", - "code": "pære", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Pære" - } - }, - { - "valueCoding": { - "id": "70c41380-7ffb-434e-f310-ef92786a0f85", - "code": "plomme", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Plomme" - } - }, - { - "valueCoding": { - "id": "197c3327-7191-4499-8d1d-3f548463e86b", - "code": "kirsebær", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Kirsebær" - } - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='41d46a1d-8103-48ed-8564-7a3477e1836d').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "41d46a1d-8103-48ed-8564-7a3477e1836d", "operator": "exists" }] - }, - { - "linkId": "da9aac36-7372-490e-80fd-00a1f2626037", - "type": "choice", - "text": "Velg det du liker best", - "code": [ - { - "code": "Full", - "display": "Full vising", - "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", - "id": "0e024fbb-438d-45e1-8ed1-317415636f0f" - } - ], - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a45b2e7f-1fb5-47ac-809a-7e25a687e3dc", - "code": "banan", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Banan" - } - }, - { - "valueCoding": { - "id": "209e5eb0-ef12-4414-8115-b69a953ebc19", - "code": "eple", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Eple" - } - }, - { - "valueCoding": { - "id": "610ec855-43c6-4774-81e3-81b1fcc8e7c7", - "code": "pære", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Pære" - } - }, - { - "valueCoding": { - "id": "70c41380-7ffb-434e-f310-ef92786a0f85", - "code": "plomme", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Plomme" - } - }, - { - "valueCoding": { - "id": "197c3327-7191-4499-8d1d-3f548463e86b", - "code": "kirsebær", - "system": "urn:uuid:f39fd1cd-a155-4410-8b8d-27493a41c57d", - "display": "Kirsebær" - } - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='578883d4-1bdd-4662-8e7f-7a960a678b5c').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "578883d4-1bdd-4662-8e7f-7a960a678b5c", "operator": "exists" }] - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - } - ] -} diff --git a/src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json b/src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json deleted file mode 100644 index 2b7d5685..00000000 --- a/src/preview/skjema/NHN_Test_tableHN2_Egendefinert.json +++ /dev/null @@ -1,1503 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "a6ea06ce-4fad-498d-97a0-29a49bbe7328", - "name": "NHN_Test_tableHN2_Egendefinerttabell", - "title": "Egendefinerttabell tableHN2", - "description": "Skjema før time for nyrepasient", - "version": "0.1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [ - { - "system": "urn:ietf:bcp:47", - "code": "nb-NO", - "display": "Bokmål" - } - ], - "security": [ - { - "code": "3", - "display": "Helsehjelp (Full)", - "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - }, - { - "code": "1", - "display": "Kun innbygger selv", - "system": "http://helsenorge.no/fhir/KanUtforesAv" - } - ] - }, - "useContext": [ - { - "code": { - "system": "http://hl7.org/fhir/ValueSet/usage-context-type", - "code": "focus", - "display": "Clinical Focus" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1.8655", - "display": "Egendefinerttabell tableHN2" - } - ] - } - } - ], - "contact": [ - { - "name": "http://www.nhn.no" - } - ], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", - "code": "1" - } - }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", - "valueReference": { - "reference": "Endpoint/1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-help", - "display": "Hide help texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", - "valueBoolean": true - } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "resourceType": "ValueSet", - "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", - "version": "1.0", - "name": "Viktighet", - "title": "Viktighet", - "date": "2023-03-29T13:43:26.881Z", - "status": "draft", - "publisher": "Viktighet", - "compose": { - "include": [ - { - "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", - "concept": [ - { - "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", - "code": "lite-viktig---0-", - "display": "Lite viktig - 0 " - }, - { - "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", - "code": "1", - "display": "1" - }, - { - "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", - "code": "2", - "display": "2" - }, - { - "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", - "code": "3", - "display": "3" - }, - { - "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", - "code": "4", - "display": "4" - }, - { - "id": "50e5f8f0-db46-45f9-8fda-67039933756e", - "code": "5", - "display": "5" - }, - { - "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", - "code": "6", - "display": "6" - }, - { - "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", - "code": "7", - "display": "7" - }, - { - "id": "dc888467-ab8b-4412-82ca-0312edcc0695", - "code": "8", - "display": "8" - }, - { - "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", - "code": "9", - "display": "9" - }, - { - "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", - "code": "veldig-viktig-10-", - "display": "Veldig viktig 10 " - } - ] - } - ] - } - }, - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { - "code": "1", - "display": "Ja" - }, - { - "code": "2", - "display": "Nei" - }, - { - "code": "3", - "display": "Vet ikke" - } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", - "type": "group", - "text": "Datakilde 1: HNTable2 ", - "required": false, - "item": [ - { - "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", - "type": "boolean", - "text": "Hoven i beina", - "required": false, - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Hoven i beina" - } - ] - }, - "item": [ - { - "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "type": "choice", - "text": "Viktighet Hoven i beina", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - } - ] - }, - { - "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "type": "boolean", - "text": "Kløe i huden", - "required": false, - "item": [ - { - "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "type": "choice", - "text": "Viktighet kløe i huden", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] - } - ] - } - ] - }, - { - "linkId": "97a234d3-32f8-407d-8a8a-a50a6bf62e32", - "type": "group", - "text": "Datakilde 1: HNTable2 ", - "required": false, - "item": [ - { - "linkId": "0f5f4c2f-7a29-4baf-83aa-ed7c9c325175", - "type": "date", - "text": "Dato 1", - "required": false - }, - { - "linkId": "9e6a9b26-ec4f-4f9c-8012-77a501e2a59f", - "type": "quantity", - "text": "Quantiy 1", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "cm", - "display": "centimeter", - "system": "http://unitsofmeasure.org" - } - } - ], - "required": false - }, - { - "linkId": "31186f65-2a61-49ef-85ac-82e304a4c501", - "type": "integer", - "text": "Tall 1", - "required": false - }, - { - "linkId": "4095e682-d3af-4844-8a2a-eda031b9f5f7", - "type": "string", - "text": "Tekstfelt 1", - "required": false, - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Tekstfelt 1" - } - ] - } - }, - { - "linkId": "4aa538b8-355a-479f-84b3-4bfd87ca7080", - "type": "choice", - "text": "Alternativer 1", - "required": false, - "answerValueSet": "#1102" - }, - { - "linkId": "162f308e-d743-4027-81e0-2c7067285711", - "type": "boolean", - "text": "Bekreftelse 1", - "required": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-2", - "display": "SOT-2" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", - "type": "group", - "text": "Oppsummering nr 1: table-HN2 Her ligger kode for itemkontrol, kolonner og sortering", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-hn2" - } - ] - } - } - ], - "code": [ - { - "code": "1", - "display": "Sykdom", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" - }, - { - "code": "3", - "display": "Alvorlighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" - }, - { - "code": "ASC", - "display": "Ascending", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" - }, - { - "code": "2", - "display": "Column 2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" - } - ], - "item": [ - { - "linkId": "b89fda34-0e7f-4512-9ffe-0299d19f00fd", - "type": "group", - "text": "Hoven i beina", - "required": false, - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ], - "code": [ - { - "code": "1", - "display": "1", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "6cbda8db-a805-4bcc-9e42-560667f67073" - } - ] - }, - { - "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "operator": "exists" - } - ], - "text": "Viktighet", - "code": [ - { - "code": "2", - "display": "2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "831866b8-df4a-4090-8a1e-403341efae07" - } - ] - }, - { - "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet", - "code": [ - { - "code": "3", - "display": "3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "835ee228-510f-424d-da5e-c09bda721f6a" - } - ] - }, - { - "linkId": "9ef47ae4-9c4e-4e0e-9792-4f55b30ccfcd", - "type": "group", - "text": "Kløe i huden", - "required": false, - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ], - "code": [ - { - "code": "1", - "display": "1", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "32dae3f2-a7da-4562-ee5b-758e828040e9" - } - ] - }, - { - "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "operator": "exists" - } - ], - "text": "Viktiget", - "code": [ - { - "code": "2", - "display": "2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "7bb503be-c5ea-4c02-82a8-1864201685d2" - } - ] - }, - { - "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "926cc2a7-1853-46e6-8e98-cb3405730292", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet", - "code": [ - { - "code": "3", - "display": "3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "fa3217a1-3274-47d2-d527-df9bdcc56229" - } - ] - } - ] - }, - { - "linkId": "cf85b270-5e4c-4bc1-8ae8-b7526747fd89", - "type": "group", - "text": "Oppsummering nr 1: table-HN2 Her ligger kode for itemkontrol, kolonner og sortering DISPLAY", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-hn2" - } - ] - } - } - ], - "code": [ - { - "code": "1", - "display": "Sykdom", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" - }, - { - "code": "3", - "display": "Alvorlighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" - }, - { - "code": "ASC", - "display": "Ascending", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" - }, - { - "code": "2", - "display": "Column 2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" - } - ], - "item": [ - { - "linkId": "76fc4ecc-0037-4a89-8412-d91e2e545268", - "type": "display", - "text": "Hoven i Beina", - "code": [ - { - "code": "1", - "display": "1", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "64e58289-7e32-4284-8bd4-e8ecb9b0b0a0" - } - ], - "required": false, - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "014001ef-0ec7-4bd5-81d0-61a4993ce603", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "operator": "exists" - } - ], - "text": "Viktighet", - "code": [ - { - "code": "2", - "display": "2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "831866b8-df4a-4090-8a1e-403341efae07" - } - ] - }, - { - "linkId": "7ea2bd99-a655-4cf8-ab10-c6b3841ed527", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet", - "code": [ - { - "code": "3", - "display": "3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "835ee228-510f-424d-da5e-c09bda721f6a" - } - ] - }, - { - "linkId": "4a9f9e27-10a4-429a-b6af-9df50a346709", - "type": "display", - "code": [ - { - "code": "1", - "display": "1", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "1a95d025-a860-4a39-8cac-949d06280457" - } - ], - "required": false, - "text": "Kløe i huden", - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "8fc8fc3a-9f75-436f-f94e-eca94c3cc26f", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "operator": "exists" - } - ], - "text": "Viktiget", - "code": [ - { - "code": "2", - "display": "2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "7bb503be-c5ea-4c02-82a8-1864201685d2" - } - ] - }, - { - "linkId": "396bdae6-0cc0-4f44-eee1-61f4b935c636", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "926cc2a7-1853-46e6-8e98-cb3405730292", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet", - "code": [ - { - "code": "3", - "display": "3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "fa3217a1-3274-47d2-d527-df9bdcc56229" - } - ] - } - ] - }, - { - "linkId": "751fc534-f11f-4692-e437-e82e840ddd4c", - "type": "group", - "text": "Oppsummering nr 2 table-HN2 : Her ligger kode for itemkontrol, kolonner ", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-hn2" - } - ] - } - } - ], - "code": [ - { - "code": "1", - "display": "Kolonne 1", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" - }, - { - "code": "2", - "display": "Kolonne 2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" - }, - { - "code": "3", - "display": "Kolonne 3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" - } - ], - "item": [ - { - "linkId": "0a7bbea6-a575-43e1-9b1f-1eafc300b4a6", - "type": "date", - "text": "Dato 1", - "code": [ - { - "code": "1", - "display": "1", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "0741e77c-13d0-4401-fd1d-02bf6f22a36f" - } - ], - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='0f5f4c2f-7a29-4baf-83aa-ed7c9c325175').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "0f5f4c2f-7a29-4baf-83aa-ed7c9c325175", - "operator": "exists" - } - ] - }, - { - "linkId": "69b68cc7-e68a-47fc-8dea-c8f49ee9f8e4", - "type": "quantity", - "text": "Quantiy 1", - "code": [ - { - "code": "2", - "display": "2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "e7fbe684-c1cf-4c4c-cf9a-869a8149e949" - } - ], - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='9e6a9b26-ec4f-4f9c-8012-77a501e2a59f').answer.value" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "cm", - "display": "centimeter", - "system": "http://unitsofmeasure.org" - } - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "9e6a9b26-ec4f-4f9c-8012-77a501e2a59f", - "operator": "exists" - } - ] - }, - { - "linkId": "914d0fb8-1975-4e96-db62-4f695f817184", - "type": "integer", - "text": "Tall 1", - "code": [ - { - "code": "3", - "display": "3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "84830f99-f10f-488f-8272-c0a334ff2025" - } - ], - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='31186f65-2a61-49ef-85ac-82e304a4c501').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "31186f65-2a61-49ef-85ac-82e304a4c501", - "operator": "exists" - } - ] - }, - { - "linkId": "8d423ca5-0cad-44a5-dff1-ad9df7c1eb72", - "type": "string", - "text": "Tekstfelt 1", - "code": [ - { - "code": "1", - "display": "1", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "baf1e456-f7ac-4647-e0c3-5debe95c8f5c" - } - ], - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='4095e682-d3af-4844-8a2a-eda031b9f5f7').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "4095e682-d3af-4844-8a2a-eda031b9f5f7", - "operator": "exists" - } - ] - }, - { - "linkId": "84e7463c-80f3-4f6d-87b5-1ba63c68ca08", - "type": "choice", - "text": "Alternativer 1", - "code": [ - { - "code": "2", - "display": "2", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "6dfbee4c-9191-426e-ec11-44b33c061132" - } - ], - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='4aa538b8-355a-479f-84b3-4bfd87ca7080').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "4aa538b8-355a-479f-84b3-4bfd87ca7080", - "operator": "exists" - } - ] - }, - { - "linkId": "907acec2-46b4-4c79-8b67-c7d9d3392de2", - "type": "boolean", - "text": "Bekreftelse 1", - "code": [ - { - "code": "3", - "display": "3", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "27bf9f13-556b-40a3-8d87-f43aa8830960" - } - ], - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='162f308e-d743-4027-81e0-2c7067285711').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "162f308e-d743-4027-81e0-2c7067285711", - "operator": "=" - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-3", - "display": "SOT-3" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - } - ] -} diff --git a/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO (1).json b/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO (1).json deleted file mode 100644 index 7a4be1c4..00000000 --- a/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO (1).json +++ /dev/null @@ -1 +0,0 @@ -{"resourceType":"Questionnaire","language":"nb-NO","id":"543509c4-f8f6-467c-98ed-a8d79eb7dd34","name":"NHN_Test_tableHN2_ToKolonner","title":"Skjema med spørsmål og svar i to kolonner HN1","status":"draft","publisher":"NHN","meta":{"profile":["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"],"tag":[{"system":"urn:ietf:bcp:47","code":"nb-NO","display":"Bokmål"}],"security":[{"code":"3","display":"Helsehjelp (Full)","system":"urn:oid:2.16.578.1.12.4.1.1.7618"}]},"contact":[{"name":"http://www.nhn.no"}],"subjectType":["Patient"],"extension":[{"url":"http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar","valueCoding":{"system":"http://helsenorge.no/fhir/ValueSet/sdf-sidebar","code":"1"}},{"url":"http://helsenorge.no/fhir/StructureDefinition/sdf-information-message","valueCoding":{"system":"http://helsenorge.no/fhir/ValueSet/sdf-information-message","code":"1"}},{"url":"http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility","valueCodeableConcept":{"coding":[{"system":"http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions","code":"hide-help","display":"Hide help texts"},{"system":"http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions","code":"hide-sublabel","display":"Hide sublabel texts"}]}}],"contained":[{"url":"http://ehelse.no/fhir/ValueSet/Predefined","resourceType":"ValueSet","id":"1102","version":"1.0","name":"urn:oid:1102","title":"Ja / Nei / Vet ikke (structor)","status":"draft","publisher":"Direktoratet for e-helse","compose":{"include":[{"system":"urn:oid:2.16.578.1.12.4.1.1102","concept":[{"code":"1","display":"Ja"},{"code":"2","display":"Nei"},{"code":"3","display":"Vet ikke"}]}]}},{"url":"http://ehelse.no/fhir/ValueSet/Predefined","resourceType":"ValueSet","id":"1101","version":"1.0","name":"urn:oid:1101","title":"Ja / Nei (structor)","status":"draft","publisher":"NHN","compose":{"include":[{"system":"urn:oid:2.16.578.1.12.4.1.1101","concept":[{"code":"1","display":"Ja"},{"code":"2","display":"Nei"}]}]}}],"item":[{"linkId":"233292d2-8b89-499f-80d7-0a3147f4beee","type":"group","text":"Om deg","item":[{"linkId":"b3daf93a-79d2-427b-97b6-851d47b6805d","type":"choice","text":"Har du behov for tolk?","item":[{"linkId":"0a1ab304-9e51-470a-8b18-3bf39916aca9","type":"string","text":"Hvilket språk","required":false,"enableWhen":[{"question":"b3daf93a-79d2-427b-97b6-851d47b6805d","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1101","code":"1"}}]}],"required":false,"answerValueSet":"#1101"},{"linkId":"0d145572-dbb4-4f31-dae4-8a4bd2541ecd","type":"date","text":"Dato for utfylling av skjema","required":false},{"linkId":"b50ee0da-fe63-4f34-85bb-70291f5b05dd","type":"time","text":"Klokkeslett for utfylling av skjema","required":false},{"linkId":"487e1464-464b-4f2d-864c-25b9f89743dd","type":"boolean","text":"Bekrefter at alt er riktig Boolean","required":false}],"required":false},{"linkId":"aa1adc47-0fc1-4816-9331-b30afd3cede1","type":"group","text":"Målinger","item":[{"linkId":"61e78c98-e944-44c8-aebf-31055175700b","type":"quantity","text":"Høyde Quantity","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"cm","display":"centimeter","system":"http://unitsofmeasure.org"}}],"required":false},{"linkId":"e2039ab0-995e-4de5-8bad-7d55f1a07fd6","type":"quantity","text":"Vekt Quantity","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"kg","display":"kilo","system":"http://unitsofmeasure.org"}}],"required":false},{"linkId":"25ffd08b-e426-4b3c-b57a-dc3af0cec5fd","type":"integer","text":"Puls Int","required":false},{"linkId":"f96da2f9-2867-4073-86c4-d0a7affe5a35","type":"decimal","text":"Temperatur Desimal","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces","valueInteger":2}],"required":false}],"required":false},{"linkId":"c839b4d4-c865-40a8-f637-c7fdef8b6c20","type":"group","text":"Helse","required":false,"item":[{"linkId":"dc7933b7-4bf6-41d1-9b0a-6955fb19aa05","type":"choice","text":"Har du hjertesykdom Choice","item":[{"linkId":"cd7d7685-c587-4d0d-8e18-fd141b3d9f9a","type":"string","text":"Hvilken sykdom? Text","required":false,"enableWhen":[{"question":"dc7933b7-4bf6-41d1-9b0a-6955fb19aa05","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"a49cd8ed-9ff1-46b9-8df5-694d537ef4cc","type":"date","text":"Når oppstod sykdommen?","required":false,"enableWhen":[{"question":"dc7933b7-4bf6-41d1-9b0a-6955fb19aa05","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]}],"required":false,"answerValueSet":"#1102"}]},{"linkId":"94aaa25e-ef6d-41b1-cb1a-0873d9ec442c","type":"group","text":"Oppsummering Table-HN1","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"table-hn1"},{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"summary"},{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"summary-container"}]}}],"required":false,"code":[{"code":"1","display":"Default","system":"http://helsenorge.no/fhir/CodeSystem/RenderOptions","id":"77f0de4b-fe80-44d3-80a8-d348c26db7c6"}],"item":[{"linkId":"44d7a94c-c474-4921-d538-00a8828785bd","type":"group","text":"Om deg","item":[{"linkId":"d188bdca-2474-4231-f2a0-ba0304d33970","type":"choice","text":"Har du behov for tolk?","item":[{"linkId":"d49af8c7-8b1f-4a64-9041-81f687bea423","type":"string","text":"Hvilket språk","required":false,"enableWhen":[{"question":"d188bdca-2474-4231-f2a0-ba0304d33970","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1101","code":"1"}},{"answerBoolean":true,"question":"0a1ab304-9e51-470a-8b18-3bf39916aca9","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='0a1ab304-9e51-470a-8b18-3bf39916aca9').answer.value"}],"readOnly":true}],"required":false,"answerValueSet":"#1101","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='b3daf93a-79d2-427b-97b6-851d47b6805d').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"b3daf93a-79d2-427b-97b6-851d47b6805d","operator":"exists"}]},{"linkId":"ee057a08-9ad7-4df5-f61e-36d81160f6b1","type":"date","text":"Dato for utfylling av skjema","required":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='0d145572-dbb4-4f31-dae4-8a4bd2541ecd').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"0d145572-dbb4-4f31-dae4-8a4bd2541ecd","operator":"exists"}]},{"linkId":"729283e2-7817-4fae-8988-ed1f34982fc6","type":"time","text":"Klokkeslett for utfylling av skjema","required":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='b50ee0da-fe63-4f34-85bb-70291f5b05dd').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"b50ee0da-fe63-4f34-85bb-70291f5b05dd","operator":"exists"}]},{"linkId":"42320bd5-d643-4ad2-ec91-b0592cbdc3a4","type":"boolean","text":"Bekrefter at alt er riktig Boolean","required":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='487e1464-464b-4f2d-864c-25b9f89743dd').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"487e1464-464b-4f2d-864c-25b9f89743dd","operator":"="}]}],"required":false},{"linkId":"0aecae09-86ab-4315-8060-140f1f9ac73e","type":"group","text":"Målinger","item":[{"linkId":"38f4c8e5-1f3c-4971-819c-2642f0fe75f6","type":"quantity","text":"Høyde Quantity","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"cm","display":"centimeter","system":"http://unitsofmeasure.org"}},{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='61e78c98-e944-44c8-aebf-31055175700b').answer.value"}],"required":false,"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"61e78c98-e944-44c8-aebf-31055175700b","operator":"exists"}]},{"linkId":"e0e06cb7-45a1-48e6-a377-ea04e1d56b61","type":"quantity","text":"Vekt Quantity","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"kg","display":"kilo","system":"http://unitsofmeasure.org"}},{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='e2039ab0-995e-4de5-8bad-7d55f1a07fd6').answer.value"}],"required":false,"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"e2039ab0-995e-4de5-8bad-7d55f1a07fd6","operator":"exists"}]},{"linkId":"306bc34b-8d5f-4fb6-8a0c-7c076afbd406","type":"integer","text":"Puls Int","required":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='25ffd08b-e426-4b3c-b57a-dc3af0cec5fd').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"25ffd08b-e426-4b3c-b57a-dc3af0cec5fd","operator":"exists"}]},{"linkId":"a3f471bb-18ce-4486-b5e0-01753787f2c2","type":"decimal","text":"Temperatur Desimal","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces","valueInteger":2},{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='f96da2f9-2867-4073-86c4-d0a7affe5a35').answer.value"}],"required":false,"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"f96da2f9-2867-4073-86c4-d0a7affe5a35","operator":"exists"}]}],"required":false},{"linkId":"f758033d-c805-422e-83a2-091e29ff6277","type":"group","text":"Helse","required":false,"item":[{"linkId":"cbe9a811-8dc8-456f-8763-650cff6a5683","type":"choice","text":"Har du hjertesykdom Choice","item":[{"linkId":"430f2524-6e2d-412b-a9b6-55f79532adae","type":"string","text":"Hvilken sykdom? Text","required":false,"enableWhen":[{"question":"cbe9a811-8dc8-456f-8763-650cff6a5683","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"cd7d7685-c587-4d0d-8e18-fd141b3d9f9a","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='cd7d7685-c587-4d0d-8e18-fd141b3d9f9a').answer.value"}],"readOnly":true},{"linkId":"c7ef29f7-ab32-4e4e-8f07-d09327da708b","type":"date","text":"Når oppstod sykdommen?","required":false,"enableWhen":[{"question":"cbe9a811-8dc8-456f-8763-650cff6a5683","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"a49cd8ed-9ff1-46b9-8df5-694d537ef4cc","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='a49cd8ed-9ff1-46b9-8df5-694d537ef4cc').answer.value"}],"readOnly":true}],"required":false,"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='dc7933b7-4bf6-41d1-9b0a-6955fb19aa05').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"dc7933b7-4bf6-41d1-9b0a-6955fb19aa05","operator":"exists"}]}]}]}]} \ No newline at end of file diff --git "a/src/preview/skjema/Table-hn1-underliggende-sp\303\270rsmaal.json" "b/src/preview/skjema/Table-hn1-underliggende-sp\303\270rsmaal.json" deleted file mode 100644 index a8b7f622..00000000 --- "a/src/preview/skjema/Table-hn1-underliggende-sp\303\270rsmaal.json" +++ /dev/null @@ -1,540 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "543509c4-f8f6-467c-98ed-a8d79eb7dd34", - "name": "NHN_Test_tableHN2_ToKolonner", - "title": "Skjema med spørsmål og svar i to kolonner HN1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], - "security": [{ "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }] - }, - "contact": [{ "name": "http://www.nhn.no" }], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - } - ] - } - } - ], - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" }, - { "code": "3", "display": "Vet ikke" } - ] - } - ] - } - }, - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1101", - "version": "1.0", - "name": "urn:oid:1101", - "title": "Ja / Nei (structor)", - "status": "draft", - "publisher": "NHN", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1101", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "233292d2-8b89-499f-80d7-0a3147f4beee", - "type": "group", - "text": "Om deg", - "item": [ - { - "linkId": "b3daf93a-79d2-427b-97b6-851d47b6805d", - "type": "choice", - "text": "Har du behov for tolk?", - "item": [ - { - "linkId": "0a1ab304-9e51-470a-8b18-3bf39916aca9", - "type": "string", - "text": "Hvilket språk", - "required": false, - "enableWhen": [ - { - "question": "b3daf93a-79d2-427b-97b6-851d47b6805d", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1101", "code": "1" } - } - ] - } - ], - "required": false, - "answerValueSet": "#1101" - }, - { "linkId": "0d145572-dbb4-4f31-dae4-8a4bd2541ecd", "type": "date", "text": "Dato for utfylling av skjema", "required": false }, - { - "linkId": "b50ee0da-fe63-4f34-85bb-70291f5b05dd", - "type": "time", - "text": "Klokkeslett for utfylling av skjema", - "required": false - }, - { - "linkId": "487e1464-464b-4f2d-864c-25b9f89743dd", - "type": "boolean", - "text": "Bekrefter at alt er riktig Boolean", - "required": false - } - ], - "required": false - }, - { - "linkId": "aa1adc47-0fc1-4816-9331-b30afd3cede1", - "type": "group", - "text": "Målinger", - "item": [ - { - "linkId": "61e78c98-e944-44c8-aebf-31055175700b", - "type": "quantity", - "text": "Høyde Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } - } - ], - "required": false - }, - { - "linkId": "e2039ab0-995e-4de5-8bad-7d55f1a07fd6", - "type": "quantity", - "text": "Vekt Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } - } - ], - "required": false - }, - { "linkId": "25ffd08b-e426-4b3c-b57a-dc3af0cec5fd", "type": "integer", "text": "Puls Int", "required": false }, - { - "linkId": "f96da2f9-2867-4073-86c4-d0a7affe5a35", - "type": "decimal", - "text": "Temperatur Desimal", - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], - "required": false - } - ], - "required": false - }, - { - "linkId": "c839b4d4-c865-40a8-f637-c7fdef8b6c20", - "type": "group", - "text": "Helse", - "required": false, - "item": [ - { - "linkId": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", - "type": "choice", - "text": "Har du hjertesykdom Choice", - "item": [ - { - "linkId": "cd7d7685-c587-4d0d-8e18-fd141b3d9f9a", - "type": "string", - "text": "Hvilken sykdom? Text", - "required": false, - "enableWhen": [ - { - "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "a49cd8ed-9ff1-46b9-8df5-694d537ef4cc", - "type": "date", - "text": "Når oppstod sykdommen?", - "required": false, - "enableWhen": [ - { - "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ], - "required": false, - "answerValueSet": "#1102" - } - ] - }, - { - "linkId": "94aaa25e-ef6d-41b1-cb1a-0873d9ec442c", - "type": "group", - "text": "Oppsummering Table-HN1", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn1" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "77f0de4b-fe80-44d3-80a8-d348c26db7c6" - } - ], - "item": [ - { - "linkId": "44d7a94c-c474-4921-d538-00a8828785bd", - "type": "group", - "text": "Om deg", - "item": [ - { - "linkId": "d188bdca-2474-4231-f2a0-ba0304d33970", - "type": "choice", - "text": "Har du behov for tolk?", - "item": [ - { - "linkId": "d49af8c7-8b1f-4a64-9041-81f687bea423", - "type": "string", - "text": "Hvilket språk", - "required": false, - "enableWhen": [ - { - "question": "d188bdca-2474-4231-f2a0-ba0304d33970", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1101", "code": "1" } - }, - { "answerBoolean": true, "question": "0a1ab304-9e51-470a-8b18-3bf39916aca9", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='0a1ab304-9e51-470a-8b18-3bf39916aca9').answer.value" - } - ], - "readOnly": true - } - ], - "required": false, - "answerValueSet": "#1101", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='b3daf93a-79d2-427b-97b6-851d47b6805d').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "b3daf93a-79d2-427b-97b6-851d47b6805d", "operator": "exists" }] - }, - { - "linkId": "ee057a08-9ad7-4df5-f61e-36d81160f6b1", - "type": "date", - "text": "Dato for utfylling av skjema", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='0d145572-dbb4-4f31-dae4-8a4bd2541ecd').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "0d145572-dbb4-4f31-dae4-8a4bd2541ecd", "operator": "exists" }] - }, - { - "linkId": "729283e2-7817-4fae-8988-ed1f34982fc6", - "type": "time", - "text": "Klokkeslett for utfylling av skjema", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='b50ee0da-fe63-4f34-85bb-70291f5b05dd').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "b50ee0da-fe63-4f34-85bb-70291f5b05dd", "operator": "exists" }] - }, - { - "linkId": "42320bd5-d643-4ad2-ec91-b0592cbdc3a4", - "type": "boolean", - "text": "Bekrefter at alt er riktig Boolean", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='487e1464-464b-4f2d-864c-25b9f89743dd').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "487e1464-464b-4f2d-864c-25b9f89743dd", "operator": "=" }] - } - ], - "required": false - }, - { - "linkId": "0aecae09-86ab-4315-8060-140f1f9ac73e", - "type": "group", - "text": "Målinger", - "item": [ - { - "linkId": "38f4c8e5-1f3c-4971-819c-2642f0fe75f6", - "type": "quantity", - "text": "Høyde Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='61e78c98-e944-44c8-aebf-31055175700b').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "61e78c98-e944-44c8-aebf-31055175700b", "operator": "exists" }] - }, - { - "linkId": "e0e06cb7-45a1-48e6-a377-ea04e1d56b61", - "type": "quantity", - "text": "Vekt Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='e2039ab0-995e-4de5-8bad-7d55f1a07fd6').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "e2039ab0-995e-4de5-8bad-7d55f1a07fd6", "operator": "exists" }] - }, - { - "linkId": "306bc34b-8d5f-4fb6-8a0c-7c076afbd406", - "type": "integer", - "text": "Puls Int", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='25ffd08b-e426-4b3c-b57a-dc3af0cec5fd').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "25ffd08b-e426-4b3c-b57a-dc3af0cec5fd", "operator": "exists" }] - }, - { - "linkId": "a3f471bb-18ce-4486-b5e0-01753787f2c2", - "type": "decimal", - "text": "Temperatur Desimal", - "extension": [ - { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f96da2f9-2867-4073-86c4-d0a7affe5a35').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "f96da2f9-2867-4073-86c4-d0a7affe5a35", "operator": "exists" }] - } - ], - "required": false - }, - { - "linkId": "f758033d-c805-422e-83a2-091e29ff6277", - "type": "group", - "text": "Helse", - "required": false, - "item": [ - { - "linkId": "cbe9a811-8dc8-456f-8763-650cff6a5683", - "type": "choice", - "text": "Har du hjertesykdom Choice", - "item": [ - { - "linkId": "430f2524-6e2d-412b-a9b6-55f79532adae", - "type": "string", - "text": "Hvilken sykdom? Text", - "required": false, - "enableWhen": [ - { - "question": "cbe9a811-8dc8-456f-8763-650cff6a5683", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "cd7d7685-c587-4d0d-8e18-fd141b3d9f9a", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='cd7d7685-c587-4d0d-8e18-fd141b3d9f9a').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "c7ef29f7-ab32-4e4e-8f07-d09327da708b", - "type": "date", - "text": "Når oppstod sykdommen?", - "required": false, - "enableWhen": [ - { - "question": "cbe9a811-8dc8-456f-8763-650cff6a5683", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "a49cd8ed-9ff1-46b9-8df5-694d537ef4cc", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='a49cd8ed-9ff1-46b9-8df5-694d537ef4cc').answer.value" - } - ], - "readOnly": true - } - ], - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='dc7933b7-4bf6-41d1-9b0a-6955fb19aa05').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", "operator": "exists" }] - } - ] - } - ] - } - ] -} diff --git a/src/preview/skjema/gtable-nb-NO-v0.1_sorterubg.json b/src/preview/skjema/gtable-nb-NO-v0.1_sorterubg.json deleted file mode 100644 index cea3bb70..00000000 --- a/src/preview/skjema/gtable-nb-NO-v0.1_sorterubg.json +++ /dev/null @@ -1,574 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "255e32d1-2cfc-4033-b714-31a6e15a2899", - "name": "NHN_Test_Repeterende_gtable", - "title": "Repeterende strukturer i tabell gtable", - "description": "Skjema før time for nyrepasient", - "version": "0.1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], - "security": [ - { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, - { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } - ] - }, - "useContext": [ - { - "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, - "valueCodeableConcept": { - "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Repeterende strukturer i tabell gtable" }] - } - } - ], - "contact": [{ "name": "http://www.nhn.no" }], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" }, - { "code": "3", "display": "Vet ikke" } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "4c8b9272-16b7-4fe0-8e16-6f86077709cb", - "type": "group", - "text": "Datakilde 1: repeterende: GTable", - "required": false, - "item": [ - { - "linkId": "ba62ebba-244d-43b0-ac53-39dab184c953", - "type": "group", - "text": "Urin", - "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], - "required": false, - "repeats": true, - "item": [ - { "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", "type": "date", "text": "Dato", "required": false }, - { "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "type": "time", "text": "Klokkeslett", "required": false }, - { - "linkId": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - } - ], - "required": false - }, - { - "linkId": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } - } - ], - "required": false - } - ] - } - ] - }, - { - "linkId": "72479ca2-444c-47e8-8288-1025194bfe51", - "type": "group", - "text": "Datakilde 2: repeterende: GTable nr 2 alle datatyper", - "required": false, - "item": [ - { - "linkId": "0d28d6ec-729c-4915-8575-b71074c90c93", - "type": "group", - "text": "Alt skal inn", - "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], - "required": false, - "repeats": true, - "item": [ - { - "linkId": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", - "type": "choice", - "text": "Alternativer", - "required": false, - "answerValueSet": "#1102" - }, - { "linkId": "22bf506e-f446-46d2-8b00-3b264f6479b8", "type": "date", "text": "Dato", "required": false }, - { "linkId": "522b65ef-02bc-4fcf-8041-1ca0872440ea", "type": "time", "text": "Klokkeslett", "required": false }, - { - "linkId": "df1e8a08-f0e6-404b-a420-856a416c1e16", - "type": "quantity", - "text": "Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - } - ], - "required": false - }, - { "linkId": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", "type": "integer", "text": "Tall", "required": false }, - { - "linkId": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", - "type": "decimal", - "text": "Desimaltall", - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], - "required": false - }, - { "linkId": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", "type": "boolean", "text": "Bekreftelse", "required": false } - ] - } - ] - }, - { - "linkId": "4d6ef3f2-423b-4aee-c43b-a5a37b460269", - "type": "group", - "text": "Oppsummering repeterende GTable Datakilde 1", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "0845d569-993b-418a-8a1d-7ce50400c65c", - "type": "group", - "text": "Oppsummering Her ligger kode for itemkontrol Gtable", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] - } - } - ], - "code": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", "code": "DESC", "display": "Descending" }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "ab203143-488d-4757-946b-ddfad942205a", - "display": "Dato" - } - ], - "item": [ - { - "linkId": "ab203143-488d-4757-946b-ddfad942205a", - "type": "date", - "text": "Dato", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", "operator": "exists" }], - "code": [ - { - "code": "ab203143-488d-4757-946b-ddfad942205a", - "display": "Dato", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "e90e650f-1928-47b1-a802-a00a5959ee8c" - } - ] - }, - { - "linkId": "01f1e567-abdc-46ee-8a41-cd571e930738", - "type": "time", - "text": "Klokkeslett", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "operator": "exists" }] - }, - { - "linkId": "7b1b5765-adb5-475b-a024-d9f68d5c9f8e", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", "operator": "exists" }] - }, - { - "linkId": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", "operator": "exists" }] - } - ] - } - ] - }, - { - "linkId": "b9431104-1af1-4de4-8b74-9188ec3e4479", - "type": "group", - "text": "Oppsummering repeterende GTable Datakilde 2", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "e806447b-ab9c-49d1-8e16-0eef94235f73", - "type": "group", - "text": "Oppsummering Her ligger kode for itemkontrol Gtable", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gTable" }] - } - } - ], - "code": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", - "display": "Bekreftelse" - }, - { "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", "code": "ASC", "display": "Ascending" } - ], - "item": [ - { - "linkId": "3918616c-bf21-4c8b-8579-2a68979b4474", - "type": "choice", - "text": "Alternativer", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='20e024a7-98f4-46f7-8224-6d4dcf736a7e').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", "operator": "exists" }] - }, - { - "linkId": "91f9a598-bb9f-4565-fa4a-518e3cbc65d4", - "type": "date", - "text": "Dato", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='22bf506e-f446-46d2-8b00-3b264f6479b8').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "22bf506e-f446-46d2-8b00-3b264f6479b8", "operator": "exists" }] - }, - { - "linkId": "82976047-81e4-4b20-da7a-a3dd9f0e797a", - "type": "time", - "text": "Klokkeslett", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='522b65ef-02bc-4fcf-8041-1ca0872440ea').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "522b65ef-02bc-4fcf-8041-1ca0872440ea", "operator": "exists" }] - }, - { - "linkId": "ec83212c-578f-4308-cdae-8be63d1d9889", - "type": "quantity", - "text": "Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='df1e8a08-f0e6-404b-a420-856a416c1e16').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "df1e8a08-f0e6-404b-a420-856a416c1e16", "operator": "exists" }] - }, - { - "linkId": "6fee57b2-7f5d-4990-8608-f12540d2cdd6", - "type": "integer", - "text": "Tall", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='a1c1db2b-2779-4e99-88d6-2d02c18d797c').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", "operator": "exists" }] - }, - { - "linkId": "25bbc49c-3bba-40b3-fb90-8684bcd176e2", - "type": "decimal", - "text": "Desimaltall", - "extension": [ - { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='81b77ece-6d3f-49cd-8cbf-1ff14de07964').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", "operator": "exists" }] - }, - { - "linkId": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", - "type": "boolean", - "text": "Bekreftelse", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='df586ed5-0b3b-43eb-ae05-fa1f201d3730').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", "operator": "=" }], - "code": [ - { - "code": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", - "display": "Bekreftelse", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "fe726126-fef7-4f3d-8ebd-30a67e24ae39" - } - ] - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - } - ] -} diff --git a/src/preview/skjema/kun_qest_hn1.json b/src/preview/skjema/kun_qest_hn1.json deleted file mode 100644 index 74c72f2d..00000000 --- a/src/preview/skjema/kun_qest_hn1.json +++ /dev/null @@ -1,311 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "292c4322-20d3-4893-a249-a6753994dadd", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [ - { - "system": "urn:ietf:bcp:47", - "code": "nb-NO", - "display": "Bokmål" - } - ], - "security": [ - { - "code": "3", - "display": "Helsehjelp (Full)", - "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - } - ] - }, - "contact": [ - { - "name": "http://www.nhn.no" - } - ], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-help", - "display": "Hide help texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - } - ] - } - } - ], - "item": [ - { - "linkId": "4233cb23-aff4-4e72-8c89-41cdc44f8939", - "type": "group", - "text": "Personalia", - "required": false, - "item": [ - { - "linkId": "855afb10-1dd5-46d4-ab56-d8b8587323a4", - "type": "string", - "text": "Hva heter du?", - "required": false - }, - { - "linkId": "314166c1-cb72-4c67-b0a9-d90581d658ad", - "type": "string", - "text": "Hvor gammel er du?", - "required": false - } - ] - }, - { - "linkId": "f6764114-86d9-402d-8e05-aca25f980f5f", - "type": "group", - "text": "Sykdommer", - "required": false, - "item": [ - { - "linkId": "3cf13e1a-a775-42cc-8182-babde16743aa", - "type": "string", - "text": "Har du hjertesykdom?", - "required": false - }, - { - "linkId": "e32a3b49-42df-4394-9560-2cf48155e182", - "type": "string", - "text": "Hvilken sykdom har du?", - "required": false - }, - { - "linkId": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", - "type": "string", - "text": "Kan du si litt mer om sykdommen din?", - "required": false - } - ] - }, - { - "linkId": "2e71aeb8-aa1c-4bc4-b3a9-b82ed16acc28", - "type": "group", - "text": "Oppsummering", - "required": false, - "item": [ - { - "linkId": "2f566ffe-3f0c-4b3b-8b55-bdcb8aaea08b", - "type": "group", - "text": "Oppsummering Table-HN1", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-hn1" - } - ] - } - } - ], - "item": [ - { - "linkId": "b0c00973-36bd-49ad-92cf-887bbcf6f9b6", - "type": "group", - "text": "Personalia", - "required": false, - "item": [ - { - "linkId": "fd70929b-7421-4f59-8c0d-d86366d260c7", - "type": "string", - "text": "Hva heter du?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='855afb10-1dd5-46d4-ab56-d8b8587323a4').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "855afb10-1dd5-46d4-ab56-d8b8587323a4", - "operator": "exists" - } - ] - }, - { - "linkId": "5a85ef28-51a0-45d7-899f-c87f7384a03e", - "type": "string", - "text": "Hvor gammel er du?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='314166c1-cb72-4c67-b0a9-d90581d658ad').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "314166c1-cb72-4c67-b0a9-d90581d658ad", - "operator": "exists" - } - ] - } - ] - }, - { - "linkId": "765cc891-f702-4361-8a5f-719bcb26ec34", - "type": "group", - "text": "Sykdommer", - "required": false, - "item": [ - { - "linkId": "0388ed83-02a8-4660-80e3-d05208bb1dea", - "type": "string", - "text": "Har du hjertesykdom?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='3cf13e1a-a775-42cc-8182-babde16743aa').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "3cf13e1a-a775-42cc-8182-babde16743aa", - "operator": "exists" - } - ] - }, - { - "linkId": "de1df328-4b5d-4831-90c0-e2fd7993067a", - "type": "string", - "text": "Hvilken sykdom har du?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='e32a3b49-42df-4394-9560-2cf48155e182').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "e32a3b49-42df-4394-9560-2cf48155e182", - "operator": "exists" - } - ] - }, - { - "linkId": "7789abe2-0594-4896-d930-e271972d13cd", - "type": "string", - "text": "Kan du si litt mer om sykdommen din?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='8caedfdb-dee1-47eb-8ee0-9c451fb4fb57').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "8caedfdb-dee1-47eb-8ee0-9c451fb4fb57", - "operator": "exists" - } - ] - } - ] - } - ] - } - ] - } - ] -} diff --git a/src/preview/skjema/kun_qest_hn2.json b/src/preview/skjema/kun_qest_hn2.json deleted file mode 100644 index 4f43175c..00000000 --- a/src/preview/skjema/kun_qest_hn2.json +++ /dev/null @@ -1,1146 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "1c90d68d-78d8-4c7b-b5fb-44c165babbcc", - "name": "NHN_Test_tableHN2", - "title": "tableHN2", - "description": "Skjema før time for nyrepasient", - "version": "0.1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [ - { - "system": "urn:ietf:bcp:47", - "code": "nb-NO", - "display": "Bokmål" - } - ], - "security": [ - { - "code": "3", - "display": "Helsehjelp (Full)", - "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - }, - { - "code": "1", - "display": "Kun innbygger selv", - "system": "http://helsenorge.no/fhir/KanUtforesAv" - } - ] - }, - "useContext": [ - { - "code": { - "system": "http://hl7.org/fhir/ValueSet/usage-context-type", - "code": "focus", - "display": "Clinical Focus" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1.8655", - "display": "tableHN2" - } - ] - } - } - ], - "contact": [ - { - "name": "http://www.nhn.no" - } - ], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", - "code": "1" - } - }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", - "valueReference": { - "reference": "Endpoint/1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-help", - "display": "Hide help texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "resourceType": "ValueSet", - "id": "5af64314-3dcd-47d9-89e6-3de83b51afff", - "version": "1.0", - "name": "Viktighet", - "title": "Viktighet", - "date": "2023-03-29T13:43:26.881Z", - "status": "draft", - "publisher": "Viktighet", - "compose": { - "include": [ - { - "system": "urn:uuid:b1924977-c27b-438e-89de-5593328c57be", - "concept": [ - { - "id": "c05c31bf-4eba-478e-9c70-3f32349d2a05", - "code": "0", - "display": "0" - }, - { - "id": "4133b7b9-d3a0-439c-84a6-3121e0b3324e", - "code": "1", - "display": "1" - }, - { - "id": "ad078dc0-ac85-40cf-82d5-7f6d8b4bbb7d", - "code": "2", - "display": "2" - }, - { - "id": "4a51c6dc-849a-4e9f-83e0-479121effd76", - "code": "3", - "display": "3" - }, - { - "id": "6b04acae-af9d-47e6-df64-fb1f78666df4", - "code": "4", - "display": "4" - }, - { - "id": "50e5f8f0-db46-45f9-8fda-67039933756e", - "code": "5", - "display": "5" - }, - { - "id": "ecc3398f-4c60-47e5-817a-3e3989482f03", - "code": "6", - "display": "6" - }, - { - "id": "a47d3433-d5ec-4649-8b56-a550ffa0914a", - "code": "7", - "display": "7" - }, - { - "id": "dc888467-ab8b-4412-82ca-0312edcc0695", - "code": "8", - "display": "8" - }, - { - "id": "9689eab7-eee7-4a08-8f3c-86de76e29f93", - "code": "9", - "display": "9" - }, - { - "id": "676e0284-0829-44c0-8084-a3e3a9424f4d", - "code": "10", - "display": "10" - } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "84492954-12c6-4900-dddf-a5b8fb703ef6", - "type": "group", - "text": "Data inn", - "required": false, - "item": [ - { - "linkId": "147ab493-0186-4a4e-8167-c10c829c09ca", - "type": "boolean", - "text": "Hoven i beina", - "required": false, - "item": [ - { - "linkId": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "type": "choice", - "text": "Viktighet Hoven i beina", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - } - ] - }, - { - "linkId": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "type": "boolean", - "text": "Kløe i huden", - "required": false, - "item": [ - { - "linkId": "926cc2a7-1853-46e6-8e98-cb3405730292", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "type": "choice", - "text": "Viktighet kløe i huden", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ] - } - ] - } - ] - }, - { - "linkId": "85bcab33-b84b-4f9f-cd98-6bfa6dedc8c7", - "type": "group", - "text": "Oppsummering med grupper. Innrykk trenger en ikke ta hensyn til, da data blir presentert i tabell. Gruppe benyttes kun til å få inn en verdi i kolonne 1", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary-container" - } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "c87dc79b-afd8-4ef5-8ebf-1b9d3a6a4d9f" - } - ], - "item": [ - { - "linkId": "f4c4c6af-b230-4739-8f92-63675174dec0", - "type": "group", - "text": "Oppsummering Her ligger kode for itemkontrol, kolonner og sortering", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-hn2" - } - ] - } - } - ], - "code": [ - { - "code": "1", - "display": "Sykdom", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "f8b92b36-bc8b-481c-8455-ba0a09e21f4a" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "812d0f5c-12a1-4bf1-db2b-aca20824ca38" - }, - { - "code": "3", - "display": "Alvorlighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumnName", - "id": "0019e517-4fbc-4a1a-8b8c-26c863d7622e" - }, - { - "code": "DESC", - "display": "Descending", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "id": "a09e81a9-4e30-42e5-8271-2e30b23902a5" - }, - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "id": "366b3ede-cbc0-49a1-8081-46d631d09b3b" - } - ], - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "exists", - "answerBoolean": true - }, - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "exists", - "answerBoolean": true - } - ], - "item": [ - { - "linkId": "268a7080-0067-4cbb-8a4d-8bea26b46296", - "type": "display", - "text": "Hoven i beina", - "code": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "196cf5f4-5f04-4a6e-8bdd-be218d5c0403", - "code": "1", - "display": "Sykdom" - } - ], - "required": false, - "enableWhen": [ - { - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=", - "answerBoolean": true - } - ] - }, - { - "linkId": "751e09be-da53-44bd-8e6c-cc4f7f7409f5", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "operator": "exists" - } - ], - "text": "Viktighet", - "code": [ - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "941622c1-0a8d-487d-8214-b7cf9cba6210" - } - ] - }, - { - "linkId": "3c783ec0-c165-4ca1-86aa-425f1237520d", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet", - "code": [ - { - "code": "3", - "display": "Alvorlighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "4a7d5ffd-54ed-433e-8d40-0173a9dbbfbc" - } - ] - }, - { - "linkId": "cc502a45-030f-4729-8ac8-3c982a43e379", - "type": "display", - "text": "Kløe i huden", - "required": false, - "enableWhen": [ - { - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=", - "answerBoolean": true - } - ], - "code": [ - { - "code": "1", - "display": "Sykdom", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "7c01e07f-58d2-43b0-8c87-0ddf595d49e9" - } - ] - }, - { - "linkId": "84650897-c339-4db7-8ff1-55a7c849bab5", - "type": "choice", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "operator": "exists" - } - ], - "text": "Viktiget", - "code": [ - { - "code": "2", - "display": "Viktighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "9bd380fc-8ca3-4fba-8a32-8d44f62a5645" - } - ] - }, - { - "linkId": "786d86e8-9972-4f35-c8d8-230661782dec", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "answerBoolean": true, - "question": "926cc2a7-1853-46e6-8e98-cb3405730292", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" - } - ], - "readOnly": true, - "text": "Alvorlighet", - "code": [ - { - "code": "3", - "display": "Alvorlighet", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "6344dcf1-ff0b-4dd0-8f07-3b9c54172155" - } - ] - } - ] - } - ] - }, - { - "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", - "type": "group", - "text": "Oppsummering med uten grupper, men display?", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary-container" - } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "076fe6bd-a31f-47fd-b471-593005d9e25c", - "type": "boolean", - "text": "Hoven i beina", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='147ab493-0186-4a4e-8167-c10c829c09ca').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "147ab493-0186-4a4e-8167-c10c829c09ca", - "operator": "=" - } - ] - }, - { - "linkId": "94205f06-49ee-4f90-8c7d-5239753f3968", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "question": "076fe6bd-a31f-47fd-b471-593005d9e25c", - "operator": "=", - "answerBoolean": true - }, - { - "answerBoolean": true, - "question": "839ef2ed-66eb-462d-8ba0-0671885371c9", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='839ef2ed-66eb-462d-8ba0-0671885371c9').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "97604dcd-38c1-456d-8f3c-586e59199d58", - "type": "choice", - "text": "Viktighet Hoven i beina", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [ - { - "question": "076fe6bd-a31f-47fd-b471-593005d9e25c", - "operator": "=", - "answerBoolean": true - }, - { - "answerBoolean": true, - "question": "ff11ec2f-ffc4-46fc-ee6e-537cd06e40f4", - "operator": "exists" - } - ], - "readOnly": true - }, - { - "linkId": "76ef29bc-ab50-4446-9fbd-5c7e67417659", - "type": "boolean", - "text": "Kløe i huden", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='c6cedf0b-70be-40ce-cc41-cff3cbcabc17').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "c6cedf0b-70be-40ce-cc41-cff3cbcabc17", - "operator": "=" - } - ] - }, - { - "linkId": "95541265-2a26-4ad6-8d4a-7f4990fb74e3", - "type": "choice", - "text": "Hvor alvorlig er det?", - "required": true, - "answerOption": [ - { - "valueCoding": { - "id": "a25d348d-41eb-4252-e607-71a111d4d72f", - "code": "1", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "1" - } - }, - { - "valueCoding": { - "id": "7daca9c9-e639-473a-a4d1-61528b78462e", - "code": "2", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "2" - } - }, - { - "valueCoding": { - "id": "7c093c43-e94b-4d23-8c91-b26627776d62", - "code": "3", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "3" - } - }, - { - "valueCoding": { - "id": "4c19dc9d-836f-410e-d601-c4d4ee1a7c05", - "code": "4", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "4" - } - }, - { - "valueCoding": { - "id": "6664da30-2bb1-477b-8165-2f046f27cbb9", - "code": "5", - "system": "urn:uuid:4222dd48-0e6f-41e9-80b7-e0c4d3be02c8", - "display": "5" - } - } - ], - "enableWhen": [ - { - "question": "76ef29bc-ab50-4446-9fbd-5c7e67417659", - "operator": "=", - "answerBoolean": true - }, - { - "answerBoolean": true, - "question": "926cc2a7-1853-46e6-8e98-cb3405730292", - "operator": "exists" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='926cc2a7-1853-46e6-8e98-cb3405730292').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "95ba859c-84a8-456f-8f9e-2d95ac75d1ed", - "type": "choice", - "text": "Viktighet kløe i huden", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "Velg viktighet på en skala fra 0-10" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f2b7dee9-ea56-490f-df8a-f4a58cb6b015').answer.value" - } - ], - "required": true, - "answerValueSet": "#5af64314-3dcd-47d9-89e6-3de83b51afff", - "enableWhen": [ - { - "question": "76ef29bc-ab50-4446-9fbd-5c7e67417659", - "operator": "=", - "answerBoolean": true - }, - { - "answerBoolean": true, - "question": "f2b7dee9-ea56-490f-df8a-f4a58cb6b015", - "operator": "exists" - } - ], - "readOnly": true - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-2", - "display": "SOT-2" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-3", - "display": "SOT-3" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - } - ] -} diff --git a/src/preview/skjema/kun_qest_repeatable.json b/src/preview/skjema/kun_qest_repeatable.json deleted file mode 100644 index c1f3e36e..00000000 --- a/src/preview/skjema/kun_qest_repeatable.json +++ /dev/null @@ -1,542 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "255e32d1-2cfc-4033-b714-31a6e15a2899", - "name": "NHN_Test_Repeterende_gtable", - "title": "Repeterende strukturer i tabell gtable", - "description": "Skjema før time for nyrepasient", - "version": "0.1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], - "security": [ - { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, - { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } - ] - }, - "useContext": [ - { - "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, - "valueCodeableConcept": { - "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Repeterende strukturer i tabell gtable" }] - } - } - ], - "contact": [{ "name": "http://www.nhn.no" }], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" }, - { "code": "3", "display": "Vet ikke" } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "4c8b9272-16b7-4fe0-8e16-6f86077709cb", - "type": "group", - "text": "Datakilde 1: repeterende: GTable", - "required": false, - "item": [ - { - "linkId": "ba62ebba-244d-43b0-ac53-39dab184c953", - "type": "group", - "text": "Urin", - "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], - "required": false, - "repeats": true, - "item": [ - { "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", "type": "date", "text": "Dato", "required": false }, - { "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "type": "time", "text": "Klokkeslett", "required": false }, - { - "linkId": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - } - ], - "required": false - }, - { - "linkId": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } - } - ], - "required": false - } - ] - } - ] - }, - { - "linkId": "72479ca2-444c-47e8-8288-1025194bfe51", - "type": "group", - "text": "Datakilde 2: repeterende: GTable nr 2 alle datatyper", - "required": false, - "item": [ - { - "linkId": "0d28d6ec-729c-4915-8575-b71074c90c93", - "type": "group", - "text": "Alt skal inn", - "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], - "required": false, - "repeats": true, - "item": [ - { - "linkId": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", - "type": "choice", - "text": "Alternativer", - "required": false, - "answerValueSet": "#1102" - }, - { "linkId": "22bf506e-f446-46d2-8b00-3b264f6479b8", "type": "date", "text": "Dato", "required": false }, - { "linkId": "522b65ef-02bc-4fcf-8041-1ca0872440ea", "type": "time", "text": "Klokkeslett", "required": false }, - { - "linkId": "df1e8a08-f0e6-404b-a420-856a416c1e16", - "type": "quantity", - "text": "Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - } - ], - "required": false - }, - { "linkId": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", "type": "integer", "text": "Tall", "required": false }, - { - "linkId": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", - "type": "decimal", - "text": "Desimaltall", - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], - "required": false - }, - { "linkId": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", "type": "boolean", "text": "Bekreftelse", "required": false } - ] - } - ] - }, - { - "linkId": "4d6ef3f2-423b-4aee-c43b-a5a37b460269", - "type": "group", - "text": "Oppsummering repeterende GTable Datakilde 1", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "0845d569-993b-418a-8a1d-7ce50400c65c", - "type": "group", - "text": "Oppsummering Her ligger kode for itemkontrol Gtable", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] - } - } - ], - "item": [ - { - "linkId": "ab203143-488d-4757-946b-ddfad942205a", - "type": "date", - "text": "Dato", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", "operator": "exists" }] - }, - { - "linkId": "01f1e567-abdc-46ee-8a41-cd571e930738", - "type": "time", - "text": "Klokkeslett", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "operator": "exists" }] - }, - { - "linkId": "7b1b5765-adb5-475b-a024-d9f68d5c9f8e", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", "operator": "exists" }] - }, - { - "linkId": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", "operator": "exists" }] - } - ] - } - ] - }, - { - "linkId": "b9431104-1af1-4de4-8b74-9188ec3e4479", - "type": "group", - "text": "Oppsummering repeterende GTable Datakilde 2", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "e806447b-ab9c-49d1-8e16-0eef94235f73", - "type": "group", - "text": "Oppsummering Her ligger kode for itemkontrol Gtable", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] - } - } - ], - "item": [ - { - "linkId": "3918616c-bf21-4c8b-8579-2a68979b4474", - "type": "choice", - "text": "Alternativer", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='20e024a7-98f4-46f7-8224-6d4dcf736a7e').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", "operator": "exists" }] - }, - { - "linkId": "91f9a598-bb9f-4565-fa4a-518e3cbc65d4", - "type": "date", - "text": "Dato", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='22bf506e-f446-46d2-8b00-3b264f6479b8').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "22bf506e-f446-46d2-8b00-3b264f6479b8", "operator": "exists" }] - }, - { - "linkId": "82976047-81e4-4b20-da7a-a3dd9f0e797a", - "type": "time", - "text": "Klokkeslett", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='522b65ef-02bc-4fcf-8041-1ca0872440ea').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "522b65ef-02bc-4fcf-8041-1ca0872440ea", "operator": "exists" }] - }, - { - "linkId": "ec83212c-578f-4308-cdae-8be63d1d9889", - "type": "quantity", - "text": "Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='df1e8a08-f0e6-404b-a420-856a416c1e16').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "df1e8a08-f0e6-404b-a420-856a416c1e16", "operator": "exists" }] - }, - { - "linkId": "6fee57b2-7f5d-4990-8608-f12540d2cdd6", - "type": "integer", - "text": "Tall", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='a1c1db2b-2779-4e99-88d6-2d02c18d797c').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", "operator": "exists" }] - }, - { - "linkId": "25bbc49c-3bba-40b3-fb90-8684bcd176e2", - "type": "decimal", - "text": "Desimaltall", - "extension": [ - { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='81b77ece-6d3f-49cd-8cbf-1ff14de07964').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", "operator": "exists" }] - }, - { - "linkId": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", - "type": "boolean", - "text": "Bekreftelse", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='df586ed5-0b3b-43eb-ae05-fa1f201d3730').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", "operator": "=" }] - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - } - ] -} diff --git a/src/preview/skjema/multitable-skjema.json b/src/preview/skjema/multitable-skjema.json deleted file mode 100644 index 87625269..00000000 --- a/src/preview/skjema/multitable-skjema.json +++ /dev/null @@ -1,738 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "e2f65f93-9d90-43f7-9fee-976b8fd9374b", - "name": "Multi_Table_Skjema", - "title": "Multi Table Skjema", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [ - { - "system": "urn:ietf:bcp:47", - "code": "nb-NO", - "display": "Bokmål" - } - ], - "security": [ - { - "code": "3", - "display": "Helsehjelp (Full)", - "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - } - ] - }, - "contact": [ - { - "name": "http://www.nhn.no" - } - ], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-help", - "display": "Hide help texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - } - ] - } - } - ], - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { - "code": "1", - "display": "Ja" - }, - { - "code": "2", - "display": "Nei" - }, - { - "code": "3", - "display": "Vet ikke" - } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "c839b4d4-c865-40a8-f637-c7fdef8b6c20", - "type": "group", - "text": "Helse", - "required": false, - "item": [ - { - "linkId": "2bbbd7d8-573f-4d48-dfaf-a3f755a964bf", - "type": "open-choice", - "text": "Hvilken av disse spiser du flest av?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "check-box" - } - ] - } - } - ], - "answerOption": [ - { - "valueCoding": { - "id": "db536210-abf9-455a-cddb-ab23eeba00f2", - "code": "kylling", - "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", - "display": "Kylling" - } - }, - { - "valueCoding": { - "id": "917ef708-6451-471f-8245-944041ceab1a", - "code": "fisk", - "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", - "display": "Fisk" - } - }, - { - "valueCoding": { - "id": "5681fe75-ece0-4727-82c1-8a51eba2fea9", - "code": "svin", - "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", - "display": "Svin" - } - }, - { - "valueCoding": { - "id": "a5d385f8-ed8d-4d22-82f3-1923379b7967", - "code": "sau", - "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", - "display": "Sau" - } - }, - { - "valueCoding": { - "id": "967cc0aa-5d8b-497b-e66c-57c908fc4c5a", - "code": "storfe", - "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", - "display": "Storfe" - } - } - ] - }, - { - "linkId": "a3eecb63-afbc-4902-dae6-aced13e18e23", - "type": "choice", - "text": "Hvilken av disse spiser du flest av?", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "c9c31623-8040-42a1-a48a-c7ab6c97e6ee", - "code": "epler", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Epler" - } - }, - { - "valueCoding": { - "id": "5a768e83-6540-4158-848d-7241d186481d", - "code": "pæree", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Pæree" - } - }, - { - "valueCoding": { - "id": "18a495a2-02f2-4e67-c117-1d906639d12e", - "code": "kirsebær", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Kirsebær" - } - }, - { - "valueCoding": { - "id": "bcd05afa-5e58-4641-9c9c-4ced67cb140c", - "code": "rips", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Rips" - } - }, - { - "valueCoding": { - "id": "85f54af8-7e5f-4506-bd1c-d3bd15fbdb79", - "code": "solbær", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Solbær" - } - }, - { - "valueCoding": { - "id": "3323bbff-8941-41d9-e015-cedfae35104b", - "code": "jordbær", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Jordbær" - } - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "check-box" - } - ] - } - } - ] - } - ] - }, - { - "linkId": "2d97ba20-b090-46f9-891c-8e5c86a333f4", - "type": "group", - "text": "Skjenner du bær", - "required": false, - "item": [ - { - "linkId": "544cac98-2fff-449e-95f9-f07b91d948f3", - "type": "choice", - "text": "Er jordbær et bær?\n", - "required": false, - "answerValueSet": "#1102" - }, - { - "linkId": "62e20b07-e7fe-4cdf-85dc-ef3e984751e0", - "type": "choice", - "required": false, - "text": "Er bjørnebær et bær?", - "answerValueSet": "#1102" - }, - { - "linkId": "e3d7f6d9-14dd-4b7c-cf59-68963d7ccb1f", - "type": "choice", - "text": "Er eple et bær?", - "required": false, - "answerValueSet": "#1102", - "item": [ - { - "linkId": "46b2f4f4-779a-493d-d706-b601755fbc2d", - "type": "string", - "required": false, - "enableWhen": [ - { - "question": "e3d7f6d9-14dd-4b7c-cf59-68963d7ccb1f", - "operator": "=", - "answerCoding": { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "code": "1" - } - } - ], - "text": "Forklar hvorfor" - } - ] - } - ] - }, - { - "linkId": "f38043c0-0a55-4631-e75e-6405360b9a2e", - "type": "group", - "text": "Mat", - "required": false, - "repeats": true, - "item": [ - { - "linkId": "cbd5a104-144d-4776-f4aa-46f4cd900106", - "type": "string", - "text": "Kan du nevne hva du spiser?", - "required": false - }, - { - "linkId": "653bbd50-dd1b-4957-8262-0158696a1346", - "type": "integer", - "text": "Hvor mange ganger per uke spiser du dette?", - "required": false - } - ] - }, - { - "linkId": "8377fcae-7633-4c28-8f68-c0a052bed789", - "type": "group", - "text": "Oppsummering", - "required": false, - "item": [ - { - "linkId": "94aaa25e-ef6d-41b1-cb1a-0873d9ec442c", - "type": "group", - "text": "Oppsummering Table-HN1", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table-hn1" - } - ] - } - } - ], - "required": false, - "item": [ - { - "linkId": "81547f29-47bd-402d-845c-f0b1fef9c0a2", - "type": "open-choice", - "text": "Hvilken av disse spiser du flest av?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "check-box" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='2bbbd7d8-573f-4d48-dfaf-a3f755a964bf').answer.value" - } - ], - "answerOption": [ - { - "valueCoding": { - "id": "db536210-abf9-455a-cddb-ab23eeba00f2", - "code": "kylling", - "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", - "display": "Kylling" - } - }, - { - "valueCoding": { - "id": "917ef708-6451-471f-8245-944041ceab1a", - "code": "fisk", - "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", - "display": "Fisk" - } - }, - { - "valueCoding": { - "id": "5681fe75-ece0-4727-82c1-8a51eba2fea9", - "code": "svin", - "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", - "display": "Svin" - } - }, - { - "valueCoding": { - "id": "a5d385f8-ed8d-4d22-82f3-1923379b7967", - "code": "sau", - "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", - "display": "Sau" - } - }, - { - "valueCoding": { - "id": "967cc0aa-5d8b-497b-e66c-57c908fc4c5a", - "code": "storfe", - "system": "urn:uuid:2c5898c8-1ea2-4ac9-9c3e-77dce9ca286b", - "display": "Storfe" - } - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "2bbbd7d8-573f-4d48-dfaf-a3f755a964bf", - "operator": "exists" - } - ] - }, - { - "linkId": "f19834f5-f210-4d09-8481-3d77dc5549ce", - "type": "choice", - "text": "Hvilken av disse spiser du flest av?", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "c9c31623-8040-42a1-a48a-c7ab6c97e6ee", - "code": "epler", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Epler" - } - }, - { - "valueCoding": { - "id": "5a768e83-6540-4158-848d-7241d186481d", - "code": "pæree", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Pæree" - } - }, - { - "valueCoding": { - "id": "18a495a2-02f2-4e67-c117-1d906639d12e", - "code": "kirsebær", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Kirsebær" - } - }, - { - "valueCoding": { - "id": "bcd05afa-5e58-4641-9c9c-4ced67cb140c", - "code": "rips", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Rips" - } - }, - { - "valueCoding": { - "id": "85f54af8-7e5f-4506-bd1c-d3bd15fbdb79", - "code": "solbær", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Solbær" - } - }, - { - "valueCoding": { - "id": "3323bbff-8941-41d9-e015-cedfae35104b", - "code": "jordbær", - "system": "urn:uuid:341deb45-3d00-4104-b4dc-2bb1fb702f63", - "display": "Jordbær" - } - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "check-box" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='a3eecb63-afbc-4902-dae6-aced13e18e23').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "a3eecb63-afbc-4902-dae6-aced13e18e23", - "operator": "exists" - } - ] - } - ] - }, - { - "linkId": "f0e7e687-3ef0-40ca-ee38-a4099d169fee", - "type": "group", - "text": "Oppsummering Table", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "table" - } - ] - } - } - ], - "required": false, - "item": [ - { - "linkId": "9bd8be7b-564b-4d77-ec03-37d56e7dc24f", - "type": "choice", - "text": "Er jordbær et bær?\n", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='544cac98-2fff-449e-95f9-f07b91d948f3').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "544cac98-2fff-449e-95f9-f07b91d948f3", - "operator": "exists" - } - ] - }, - { - "linkId": "88af9a85-e3ac-4ff8-8ad5-58eb717fd9dc", - "type": "choice", - "required": false, - "text": "Er bjørnebær et bær?", - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='62e20b07-e7fe-4cdf-85dc-ef3e984751e0').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "62e20b07-e7fe-4cdf-85dc-ef3e984751e0", - "operator": "exists" - } - ] - }, - { - "linkId": "37346692-cb61-4235-c2f4-ac8584d51765", - "type": "choice", - "text": "Er eple et bær?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='e3d7f6d9-14dd-4b7c-cf59-68963d7ccb1f').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "e3d7f6d9-14dd-4b7c-cf59-68963d7ccb1f", - "operator": "exists" - } - ], - "item": [ - { - "linkId": "d7ebbe31-49a4-4818-8a61-02d574629fa6", - "type": "string", - "required": false, - "enableWhen": [ - { - "answerBoolean": true, - "question": "46b2f4f4-779a-493d-d706-b601755fbc2d", - "operator": "exists" - } - ], - "text": "Forklar hvorfor", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='46b2f4f4-779a-493d-d706-b601755fbc2d').answer.value" - } - ], - "readOnly": true - } - ] - } - ] - }, - { - "linkId": "ce52673d-2a4b-4ff5-8dba-7537942225c9", - "type": "group", - "text": "Oppsummering GTable som vises på top", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary-container" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "gtable" - } - ] - } - } - ], - "required": false, - "item": [ - { - "linkId": "9a61b084-8623-4624-8ff4-a63e361e9a86", - "type": "string", - "text": "Kan du nevne hva du spiser?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='cbd5a104-144d-4776-f4aa-46f4cd900106').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "cbd5a104-144d-4776-f4aa-46f4cd900106", - "operator": "exists" - } - ] - }, - { - "linkId": "ae841515-4539-4fa7-cd98-a2c1a8a729bb", - "type": "integer", - "text": "Hvor mange ganger per uke spiser du dette?", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='653bbd50-dd1b-4957-8262-0158696a1346').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "653bbd50-dd1b-4957-8262-0158696a1346", - "operator": "exists" - } - ] - } - ] - } - ] - } - ] -} diff --git a/src/preview/skjema/text-bug.json b/src/preview/skjema/text-bug.json deleted file mode 100644 index 40550ce2..00000000 --- a/src/preview/skjema/text-bug.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [ - { - "system": "urn:ietf:bcp:47", - "code": "nb-NO", - "display": "Bokmål" - } - ], - "security": [ - { - "code": "3", - "display": "Helsehjelp (Full)", - "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - } - ] - }, - "contact": [ - { - "name": "http://www.nhn.no" - } - ], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-help", - "display": "Hide help texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - } - ] - } - } - ], - "id": "be22c6cd-4e7d-4405-96a8-8cddf25c2a87", - "item": [ - { - "linkId": "17a35d08-8d69-480e-e5da-ca74dbb6d04c", - "type": "text", - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sublabel", - "valueMarkdown": "asdasd adasda" - } - ], - "required": true, - "text": "hello der", - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "hello der" - } - ] - } - } - ] -} From 2ff4224fd7b1181d2e4c1d655cab2118967bfaa6 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:29:03 +0100 Subject: [PATCH 59/83] added version and changelog --- CHANGES | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index fedda073..a54cd42c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +## 14.0.0-beta02 + +- Added table feature to new major version + +--- ## 14.0.0-beta01 - Added table feature to new major version diff --git a/package.json b/package.json index f39c00a0..2a10ee6f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "14.0.0-beta01", + "version": "14.0.0-beta02", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From e66a37906eceb774aaf7c4c1597789360f91a018 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:32:17 +0100 Subject: [PATCH 60/83] removed extra singlequoutes from answer --- .../formcomponents/table/TableContainer.tsx | 1 - .../table/tables/table-hn1/utils.ts | 1 - .../formcomponents/table/tables/utils.ts | 4 +- src/preview/FormFillerPreview.tsx | 2 +- .../NHN_Test_tableHN2_ToKolonner-nb-NO.json | 540 ++++++++++++++++++ 5 files changed, 543 insertions(+), 5 deletions(-) create mode 100644 src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO.json diff --git a/src/components/formcomponents/table/TableContainer.tsx b/src/components/formcomponents/table/TableContainer.tsx index 31db27ff..465fc9ba 100644 --- a/src/components/formcomponents/table/TableContainer.tsx +++ b/src/components/formcomponents/table/TableContainer.tsx @@ -113,7 +113,6 @@ const mapStateToProps = (state: GlobalState, props: Props): EnhancedProps => { const group = props.item; const tableType = getCodingTextTableValues(group)[0]; const resource = getFormDefinition(state)?.Content?.contained; - return { headline: group.text ?? '', tableCodesCoding: group.code ?? [], diff --git a/src/components/formcomponents/table/tables/table-hn1/utils.ts b/src/components/formcomponents/table/tables/table-hn1/utils.ts index eccc0f05..f68a20c8 100644 --- a/src/components/formcomponents/table/tables/table-hn1/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn1/utils.ts @@ -28,7 +28,6 @@ export const getTableHN1bodyObject = ( export const createColumnsFromAnswers = (item: QuestionnaireResponseItem): ITableH1Column[] => { const combinedAnswer = transformAnswersToListOfStrings((item as QuestionnaireItem).type, item.answer || []).join(', '); - const columns: ITableH1Column[] = [ { id: `${item.linkId}-question`, diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index e2ca6cc6..369685d2 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -38,7 +38,7 @@ const extractValueFromQuantity = ( if (!quantity) return ''; switch (field) { case 'value': - return `${quantity.value ?? 0} ${quantity.unit ?? ''} `; + return `${quantity.value ?? 0} ${quantity.unit ?? ''}`.replace(/'/g, ''); case 'unit': return quantity.unit ?? ''; case 'system': @@ -54,7 +54,7 @@ const extractValueFromDate = (inputValue?: string): string => { return ''; } const date = parseDate(String(inputValue)); - return moment(date).locale('nb').format(DATEFORMATS.DATETIME); + return moment(date).locale('nb').format(DATEFORMATS.DATE); }; const extractValueFromTime = (inputTime?: string): string => { if (!inputTime) { diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 971f9fab..5f712665 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/kun_qest.json'; +import skjema from './skjema/NHN_Test_tableHN2_ToKolonner-nb-NO.json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; diff --git a/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO.json b/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO.json new file mode 100644 index 00000000..a8b7f622 --- /dev/null +++ b/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO.json @@ -0,0 +1,540 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "543509c4-f8f6-467c-98ed-a8d79eb7dd34", + "name": "NHN_Test_tableHN2_ToKolonner", + "title": "Skjema med spørsmål og svar i to kolonner HN1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], + "security": [{ "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }] + }, + "contact": [{ "name": "http://www.nhn.no" }], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + } + ] + } + } + ], + "contained": [ + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1102", + "version": "1.0", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", + "status": "draft", + "publisher": "Direktoratet for e-helse", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" }, + { "code": "3", "display": "Vet ikke" } + ] + } + ] + } + }, + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1101", + "version": "1.0", + "name": "urn:oid:1101", + "title": "Ja / Nei (structor)", + "status": "draft", + "publisher": "NHN", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1101", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "233292d2-8b89-499f-80d7-0a3147f4beee", + "type": "group", + "text": "Om deg", + "item": [ + { + "linkId": "b3daf93a-79d2-427b-97b6-851d47b6805d", + "type": "choice", + "text": "Har du behov for tolk?", + "item": [ + { + "linkId": "0a1ab304-9e51-470a-8b18-3bf39916aca9", + "type": "string", + "text": "Hvilket språk", + "required": false, + "enableWhen": [ + { + "question": "b3daf93a-79d2-427b-97b6-851d47b6805d", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1101", "code": "1" } + } + ] + } + ], + "required": false, + "answerValueSet": "#1101" + }, + { "linkId": "0d145572-dbb4-4f31-dae4-8a4bd2541ecd", "type": "date", "text": "Dato for utfylling av skjema", "required": false }, + { + "linkId": "b50ee0da-fe63-4f34-85bb-70291f5b05dd", + "type": "time", + "text": "Klokkeslett for utfylling av skjema", + "required": false + }, + { + "linkId": "487e1464-464b-4f2d-864c-25b9f89743dd", + "type": "boolean", + "text": "Bekrefter at alt er riktig Boolean", + "required": false + } + ], + "required": false + }, + { + "linkId": "aa1adc47-0fc1-4816-9331-b30afd3cede1", + "type": "group", + "text": "Målinger", + "item": [ + { + "linkId": "61e78c98-e944-44c8-aebf-31055175700b", + "type": "quantity", + "text": "Høyde Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + } + ], + "required": false + }, + { + "linkId": "e2039ab0-995e-4de5-8bad-7d55f1a07fd6", + "type": "quantity", + "text": "Vekt Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + } + ], + "required": false + }, + { "linkId": "25ffd08b-e426-4b3c-b57a-dc3af0cec5fd", "type": "integer", "text": "Puls Int", "required": false }, + { + "linkId": "f96da2f9-2867-4073-86c4-d0a7affe5a35", + "type": "decimal", + "text": "Temperatur Desimal", + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], + "required": false + } + ], + "required": false + }, + { + "linkId": "c839b4d4-c865-40a8-f637-c7fdef8b6c20", + "type": "group", + "text": "Helse", + "required": false, + "item": [ + { + "linkId": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", + "type": "choice", + "text": "Har du hjertesykdom Choice", + "item": [ + { + "linkId": "cd7d7685-c587-4d0d-8e18-fd141b3d9f9a", + "type": "string", + "text": "Hvilken sykdom? Text", + "required": false, + "enableWhen": [ + { + "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "a49cd8ed-9ff1-46b9-8df5-694d537ef4cc", + "type": "date", + "text": "Når oppstod sykdommen?", + "required": false, + "enableWhen": [ + { + "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ], + "required": false, + "answerValueSet": "#1102" + } + ] + }, + { + "linkId": "94aaa25e-ef6d-41b1-cb1a-0873d9ec442c", + "type": "group", + "text": "Oppsummering Table-HN1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn1" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "77f0de4b-fe80-44d3-80a8-d348c26db7c6" + } + ], + "item": [ + { + "linkId": "44d7a94c-c474-4921-d538-00a8828785bd", + "type": "group", + "text": "Om deg", + "item": [ + { + "linkId": "d188bdca-2474-4231-f2a0-ba0304d33970", + "type": "choice", + "text": "Har du behov for tolk?", + "item": [ + { + "linkId": "d49af8c7-8b1f-4a64-9041-81f687bea423", + "type": "string", + "text": "Hvilket språk", + "required": false, + "enableWhen": [ + { + "question": "d188bdca-2474-4231-f2a0-ba0304d33970", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1101", "code": "1" } + }, + { "answerBoolean": true, "question": "0a1ab304-9e51-470a-8b18-3bf39916aca9", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='0a1ab304-9e51-470a-8b18-3bf39916aca9').answer.value" + } + ], + "readOnly": true + } + ], + "required": false, + "answerValueSet": "#1101", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='b3daf93a-79d2-427b-97b6-851d47b6805d').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "b3daf93a-79d2-427b-97b6-851d47b6805d", "operator": "exists" }] + }, + { + "linkId": "ee057a08-9ad7-4df5-f61e-36d81160f6b1", + "type": "date", + "text": "Dato for utfylling av skjema", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='0d145572-dbb4-4f31-dae4-8a4bd2541ecd').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "0d145572-dbb4-4f31-dae4-8a4bd2541ecd", "operator": "exists" }] + }, + { + "linkId": "729283e2-7817-4fae-8988-ed1f34982fc6", + "type": "time", + "text": "Klokkeslett for utfylling av skjema", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='b50ee0da-fe63-4f34-85bb-70291f5b05dd').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "b50ee0da-fe63-4f34-85bb-70291f5b05dd", "operator": "exists" }] + }, + { + "linkId": "42320bd5-d643-4ad2-ec91-b0592cbdc3a4", + "type": "boolean", + "text": "Bekrefter at alt er riktig Boolean", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='487e1464-464b-4f2d-864c-25b9f89743dd').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "487e1464-464b-4f2d-864c-25b9f89743dd", "operator": "=" }] + } + ], + "required": false + }, + { + "linkId": "0aecae09-86ab-4315-8060-140f1f9ac73e", + "type": "group", + "text": "Målinger", + "item": [ + { + "linkId": "38f4c8e5-1f3c-4971-819c-2642f0fe75f6", + "type": "quantity", + "text": "Høyde Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='61e78c98-e944-44c8-aebf-31055175700b').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "61e78c98-e944-44c8-aebf-31055175700b", "operator": "exists" }] + }, + { + "linkId": "e0e06cb7-45a1-48e6-a377-ea04e1d56b61", + "type": "quantity", + "text": "Vekt Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e2039ab0-995e-4de5-8bad-7d55f1a07fd6').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "e2039ab0-995e-4de5-8bad-7d55f1a07fd6", "operator": "exists" }] + }, + { + "linkId": "306bc34b-8d5f-4fb6-8a0c-7c076afbd406", + "type": "integer", + "text": "Puls Int", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='25ffd08b-e426-4b3c-b57a-dc3af0cec5fd').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "25ffd08b-e426-4b3c-b57a-dc3af0cec5fd", "operator": "exists" }] + }, + { + "linkId": "a3f471bb-18ce-4486-b5e0-01753787f2c2", + "type": "decimal", + "text": "Temperatur Desimal", + "extension": [ + { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f96da2f9-2867-4073-86c4-d0a7affe5a35').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "f96da2f9-2867-4073-86c4-d0a7affe5a35", "operator": "exists" }] + } + ], + "required": false + }, + { + "linkId": "f758033d-c805-422e-83a2-091e29ff6277", + "type": "group", + "text": "Helse", + "required": false, + "item": [ + { + "linkId": "cbe9a811-8dc8-456f-8763-650cff6a5683", + "type": "choice", + "text": "Har du hjertesykdom Choice", + "item": [ + { + "linkId": "430f2524-6e2d-412b-a9b6-55f79532adae", + "type": "string", + "text": "Hvilken sykdom? Text", + "required": false, + "enableWhen": [ + { + "question": "cbe9a811-8dc8-456f-8763-650cff6a5683", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "cd7d7685-c587-4d0d-8e18-fd141b3d9f9a", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='cd7d7685-c587-4d0d-8e18-fd141b3d9f9a').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "c7ef29f7-ab32-4e4e-8f07-d09327da708b", + "type": "date", + "text": "Når oppstod sykdommen?", + "required": false, + "enableWhen": [ + { + "question": "cbe9a811-8dc8-456f-8763-650cff6a5683", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "a49cd8ed-9ff1-46b9-8df5-694d537ef4cc", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='a49cd8ed-9ff1-46b9-8df5-694d537ef4cc').answer.value" + } + ], + "readOnly": true + } + ], + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='dc7933b7-4bf6-41d1-9b0a-6955fb19aa05').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", "operator": "exists" }] + } + ] + } + ] + } + ] +} From 1dc0edc644845187ed5af5cffb5071c14a564686 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:33:53 +0100 Subject: [PATCH 61/83] remove schema --- src/preview/FormFillerPreview.tsx | 2 +- .../NHN_Test_tableHN2_ToKolonner-nb-NO.json | 540 ------------------ 2 files changed, 1 insertion(+), 541 deletions(-) delete mode 100644 src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO.json diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 5f712665..971f9fab 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -11,7 +11,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/NHN_Test_tableHN2_ToKolonner-nb-NO.json'; +import skjema from './skjema/kun_qest.json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; diff --git a/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO.json b/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO.json deleted file mode 100644 index a8b7f622..00000000 --- a/src/preview/skjema/NHN_Test_tableHN2_ToKolonner-nb-NO.json +++ /dev/null @@ -1,540 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "543509c4-f8f6-467c-98ed-a8d79eb7dd34", - "name": "NHN_Test_tableHN2_ToKolonner", - "title": "Skjema med spørsmål og svar i to kolonner HN1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], - "security": [{ "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }] - }, - "contact": [{ "name": "http://www.nhn.no" }], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - } - ] - } - } - ], - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" }, - { "code": "3", "display": "Vet ikke" } - ] - } - ] - } - }, - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1101", - "version": "1.0", - "name": "urn:oid:1101", - "title": "Ja / Nei (structor)", - "status": "draft", - "publisher": "NHN", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1101", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "233292d2-8b89-499f-80d7-0a3147f4beee", - "type": "group", - "text": "Om deg", - "item": [ - { - "linkId": "b3daf93a-79d2-427b-97b6-851d47b6805d", - "type": "choice", - "text": "Har du behov for tolk?", - "item": [ - { - "linkId": "0a1ab304-9e51-470a-8b18-3bf39916aca9", - "type": "string", - "text": "Hvilket språk", - "required": false, - "enableWhen": [ - { - "question": "b3daf93a-79d2-427b-97b6-851d47b6805d", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1101", "code": "1" } - } - ] - } - ], - "required": false, - "answerValueSet": "#1101" - }, - { "linkId": "0d145572-dbb4-4f31-dae4-8a4bd2541ecd", "type": "date", "text": "Dato for utfylling av skjema", "required": false }, - { - "linkId": "b50ee0da-fe63-4f34-85bb-70291f5b05dd", - "type": "time", - "text": "Klokkeslett for utfylling av skjema", - "required": false - }, - { - "linkId": "487e1464-464b-4f2d-864c-25b9f89743dd", - "type": "boolean", - "text": "Bekrefter at alt er riktig Boolean", - "required": false - } - ], - "required": false - }, - { - "linkId": "aa1adc47-0fc1-4816-9331-b30afd3cede1", - "type": "group", - "text": "Målinger", - "item": [ - { - "linkId": "61e78c98-e944-44c8-aebf-31055175700b", - "type": "quantity", - "text": "Høyde Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } - } - ], - "required": false - }, - { - "linkId": "e2039ab0-995e-4de5-8bad-7d55f1a07fd6", - "type": "quantity", - "text": "Vekt Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } - } - ], - "required": false - }, - { "linkId": "25ffd08b-e426-4b3c-b57a-dc3af0cec5fd", "type": "integer", "text": "Puls Int", "required": false }, - { - "linkId": "f96da2f9-2867-4073-86c4-d0a7affe5a35", - "type": "decimal", - "text": "Temperatur Desimal", - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], - "required": false - } - ], - "required": false - }, - { - "linkId": "c839b4d4-c865-40a8-f637-c7fdef8b6c20", - "type": "group", - "text": "Helse", - "required": false, - "item": [ - { - "linkId": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", - "type": "choice", - "text": "Har du hjertesykdom Choice", - "item": [ - { - "linkId": "cd7d7685-c587-4d0d-8e18-fd141b3d9f9a", - "type": "string", - "text": "Hvilken sykdom? Text", - "required": false, - "enableWhen": [ - { - "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "a49cd8ed-9ff1-46b9-8df5-694d537ef4cc", - "type": "date", - "text": "Når oppstod sykdommen?", - "required": false, - "enableWhen": [ - { - "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ], - "required": false, - "answerValueSet": "#1102" - } - ] - }, - { - "linkId": "94aaa25e-ef6d-41b1-cb1a-0873d9ec442c", - "type": "group", - "text": "Oppsummering Table-HN1", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn1" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "77f0de4b-fe80-44d3-80a8-d348c26db7c6" - } - ], - "item": [ - { - "linkId": "44d7a94c-c474-4921-d538-00a8828785bd", - "type": "group", - "text": "Om deg", - "item": [ - { - "linkId": "d188bdca-2474-4231-f2a0-ba0304d33970", - "type": "choice", - "text": "Har du behov for tolk?", - "item": [ - { - "linkId": "d49af8c7-8b1f-4a64-9041-81f687bea423", - "type": "string", - "text": "Hvilket språk", - "required": false, - "enableWhen": [ - { - "question": "d188bdca-2474-4231-f2a0-ba0304d33970", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1101", "code": "1" } - }, - { "answerBoolean": true, "question": "0a1ab304-9e51-470a-8b18-3bf39916aca9", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='0a1ab304-9e51-470a-8b18-3bf39916aca9').answer.value" - } - ], - "readOnly": true - } - ], - "required": false, - "answerValueSet": "#1101", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='b3daf93a-79d2-427b-97b6-851d47b6805d').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "b3daf93a-79d2-427b-97b6-851d47b6805d", "operator": "exists" }] - }, - { - "linkId": "ee057a08-9ad7-4df5-f61e-36d81160f6b1", - "type": "date", - "text": "Dato for utfylling av skjema", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='0d145572-dbb4-4f31-dae4-8a4bd2541ecd').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "0d145572-dbb4-4f31-dae4-8a4bd2541ecd", "operator": "exists" }] - }, - { - "linkId": "729283e2-7817-4fae-8988-ed1f34982fc6", - "type": "time", - "text": "Klokkeslett for utfylling av skjema", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='b50ee0da-fe63-4f34-85bb-70291f5b05dd').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "b50ee0da-fe63-4f34-85bb-70291f5b05dd", "operator": "exists" }] - }, - { - "linkId": "42320bd5-d643-4ad2-ec91-b0592cbdc3a4", - "type": "boolean", - "text": "Bekrefter at alt er riktig Boolean", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='487e1464-464b-4f2d-864c-25b9f89743dd').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "487e1464-464b-4f2d-864c-25b9f89743dd", "operator": "=" }] - } - ], - "required": false - }, - { - "linkId": "0aecae09-86ab-4315-8060-140f1f9ac73e", - "type": "group", - "text": "Målinger", - "item": [ - { - "linkId": "38f4c8e5-1f3c-4971-819c-2642f0fe75f6", - "type": "quantity", - "text": "Høyde Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='61e78c98-e944-44c8-aebf-31055175700b').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "61e78c98-e944-44c8-aebf-31055175700b", "operator": "exists" }] - }, - { - "linkId": "e0e06cb7-45a1-48e6-a377-ea04e1d56b61", - "type": "quantity", - "text": "Vekt Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='e2039ab0-995e-4de5-8bad-7d55f1a07fd6').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "e2039ab0-995e-4de5-8bad-7d55f1a07fd6", "operator": "exists" }] - }, - { - "linkId": "306bc34b-8d5f-4fb6-8a0c-7c076afbd406", - "type": "integer", - "text": "Puls Int", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='25ffd08b-e426-4b3c-b57a-dc3af0cec5fd').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "25ffd08b-e426-4b3c-b57a-dc3af0cec5fd", "operator": "exists" }] - }, - { - "linkId": "a3f471bb-18ce-4486-b5e0-01753787f2c2", - "type": "decimal", - "text": "Temperatur Desimal", - "extension": [ - { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f96da2f9-2867-4073-86c4-d0a7affe5a35').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "f96da2f9-2867-4073-86c4-d0a7affe5a35", "operator": "exists" }] - } - ], - "required": false - }, - { - "linkId": "f758033d-c805-422e-83a2-091e29ff6277", - "type": "group", - "text": "Helse", - "required": false, - "item": [ - { - "linkId": "cbe9a811-8dc8-456f-8763-650cff6a5683", - "type": "choice", - "text": "Har du hjertesykdom Choice", - "item": [ - { - "linkId": "430f2524-6e2d-412b-a9b6-55f79532adae", - "type": "string", - "text": "Hvilken sykdom? Text", - "required": false, - "enableWhen": [ - { - "question": "cbe9a811-8dc8-456f-8763-650cff6a5683", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "cd7d7685-c587-4d0d-8e18-fd141b3d9f9a", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='cd7d7685-c587-4d0d-8e18-fd141b3d9f9a').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "c7ef29f7-ab32-4e4e-8f07-d09327da708b", - "type": "date", - "text": "Når oppstod sykdommen?", - "required": false, - "enableWhen": [ - { - "question": "cbe9a811-8dc8-456f-8763-650cff6a5683", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "a49cd8ed-9ff1-46b9-8df5-694d537ef4cc", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='a49cd8ed-9ff1-46b9-8df5-694d537ef4cc').answer.value" - } - ], - "readOnly": true - } - ], - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='dc7933b7-4bf6-41d1-9b0a-6955fb19aa05').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "dc7933b7-4bf6-41d1-9b0a-6955fb19aa05", "operator": "exists" }] - } - ] - } - ] - } - ] -} From bce0cb297b00d8f08c0398c2b1f9eab20cb7e17f Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:36:58 +0100 Subject: [PATCH 62/83] version --- CHANGES | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 0b7dacb2..e8ed5bb8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,13 +1,22 @@ +## 14.0.1-beta01 + +- removing singlequoutes from units on quantity in table +- change the date output to norwegian format + +--- + ## 14.0.0-beta02 - Added table feature to new major version --- + ## 14.0.0-beta01 - Added table feature to new major version --- + ## 14.0.1 --- diff --git a/package.json b/package.json index af31001d..9813b063 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "14.0.1", + "version": "14.0.1-beta01", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 1be2181bc007fc06dcc0a448725c57e419e15823 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 8 Feb 2024 11:11:38 +0100 Subject: [PATCH 63/83] breakline after tables --- src/components/formcomponents/table/TableContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/formcomponents/table/TableContainer.tsx b/src/components/formcomponents/table/TableContainer.tsx index 465fc9ba..ece1507f 100644 --- a/src/components/formcomponents/table/TableContainer.tsx +++ b/src/components/formcomponents/table/TableContainer.tsx @@ -104,7 +104,7 @@ const TableContainer = ({ ); default: - return <>{'Nothing found'}; + return
; } } }; From ae321383498bce46b18076c49d5f3179007402a6 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:37:18 +0100 Subject: [PATCH 64/83] merge --- package-lock.json | 4 ++-- src/components/formcomponents/group/helpers.ts | 3 ++- src/components/formcomponents/table/TableContainer.tsx | 7 +++---- .../formcomponents/table/tables/gtable/GTable.tsx | 2 +- .../formcomponents/table/tables/gtable/utils.ts | 3 +-- .../formcomponents/table/tables/interface.ts | 2 +- .../formcomponents/table/tables/table-hn1/TableHn1.tsx | 2 +- .../formcomponents/table/tables/table-hn1/utils.ts | 2 +- .../table/tables/table-hn2/TableHeadHn2.tsx | 2 +- .../formcomponents/table/tables/table-hn2/TableHn2.tsx | 2 +- .../formcomponents/table/tables/table-hn2/utils.ts | 2 +- .../table/tables/table/StandardTable.tsx | 2 +- .../formcomponents/table/tables/table/utils.ts | 2 +- src/components/formcomponents/table/tables/utils.ts | 10 +++++----- src/components/index.tsx | 7 +++---- src/components/with-common-functions.tsx | 4 +--- src/constants/itemType.ts | 5 +++++ src/util/index.ts | 5 ++--- 18 files changed, 33 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index 35f61500..49f3845d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@helsenorge/refero", - "version": "14.0.1", + "version": "14.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@helsenorge/refero", - "version": "14.0.1", + "version": "14.0.4", "license": "MIT", "dependencies": { "@types/react-collapse": "^5.0.1", diff --git a/src/components/formcomponents/group/helpers.ts b/src/components/formcomponents/group/helpers.ts index 602cd1f5..6c08321b 100644 --- a/src/components/formcomponents/group/helpers.ts +++ b/src/components/formcomponents/group/helpers.ts @@ -1,5 +1,6 @@ +import { Questionnaire, QuestionnaireItem } from 'fhir/r4'; + import { RenderContextType } from '../../../constants/renderContextType'; -import { Questionnaire, QuestionnaireItem } from '../../../types/fhir'; import { getText, renderPrefix } from '../../../util'; import { getGroupItemControl } from '../../../util/group-item-control'; import { Path } from '../../../util/refero-core'; diff --git a/src/components/formcomponents/table/TableContainer.tsx b/src/components/formcomponents/table/TableContainer.tsx index 465fc9ba..d0dd770e 100644 --- a/src/components/formcomponents/table/TableContainer.tsx +++ b/src/components/formcomponents/table/TableContainer.tsx @@ -1,8 +1,5 @@ import React from 'react'; -import { connect } from 'react-redux'; -import { ThunkDispatch } from 'redux-thunk'; - import { Coding, Questionnaire, @@ -11,7 +8,9 @@ import { QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, Resource, -} from '../../../types/fhir'; +} from 'fhir/r4'; +import { connect } from 'react-redux'; +import { ThunkDispatch } from 'redux-thunk'; import LanguageLocales from '@helsenorge/core-utils/constants/languages'; diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx index 8feed80f..001f5c4c 100644 --- a/src/components/formcomponents/table/tables/gtable/GTable.tsx +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; -import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse } from 'fhir/r4'; import { TableBody, Table as HnTable, TableRow, TableCell, SortDirection } from '@helsenorge/designsystem-react/components/Table'; diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index 0035e9be..e09ee8bc 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -1,7 +1,6 @@ +import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from 'fhir/r4'; import * as uuid from 'uuid'; -import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from '../../../../../types/fhir'; - import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; import { IGTable, IGTableColumn, IGTableHeaderItem, IGTableRow } from './interface'; diff --git a/src/components/formcomponents/table/tables/interface.ts b/src/components/formcomponents/table/tables/interface.ts index ae2e118c..fe830c92 100644 --- a/src/components/formcomponents/table/tables/interface.ts +++ b/src/components/formcomponents/table/tables/interface.ts @@ -1,4 +1,4 @@ -import { QuestionnaireItem, QuestionnaireResponseItem } from '../../../../types/fhir'; +import { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; export type QuestionnaireItemWithAnswers = QuestionnaireItem & { answer?: QuestionnaireResponseItem['answer']; diff --git a/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx b/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx index c3f30c34..c470efe2 100644 --- a/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx +++ b/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; +import { QuestionnaireItem, QuestionnaireResponse } from 'fhir/r4'; import { Table as HnTable, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; diff --git a/src/components/formcomponents/table/tables/table-hn1/utils.ts b/src/components/formcomponents/table/tables/table-hn1/utils.ts index f68a20c8..b50036e1 100644 --- a/src/components/formcomponents/table/tables/table-hn1/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn1/utils.ts @@ -1,4 +1,4 @@ -import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from '../../../../../types/fhir'; +import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from 'fhir/r4'; import { ITableH1, ITableH1Column, ITableH1Row, TABLE_HN1_TABLE_TYPES } from './interface'; import ItemType from '../../../../../constants/itemType'; diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx index a4d9e810..dd57fbf9 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHeadHn2.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Coding } from '../../../../../types/fhir'; +import { Coding } from 'fhir/r4'; import { HeaderCategory, SortDirection, TableHead, TableHeadCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index b08a9e0a..23e6b798 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react'; -import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse } from 'fhir/r4'; import { Table as HnTable, SortDirection, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index 498b6633..68904648 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -1,4 +1,4 @@ -import { Coding, QuestionnaireItem, QuestionnaireResponse } from '../../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse } from 'fhir/r4'; import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; diff --git a/src/components/formcomponents/table/tables/table/StandardTable.tsx b/src/components/formcomponents/table/tables/table/StandardTable.tsx index 63ba2c5b..ec7ac15c 100644 --- a/src/components/formcomponents/table/tables/table/StandardTable.tsx +++ b/src/components/formcomponents/table/tables/table/StandardTable.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react'; -import { Coding, QuestionnaireItem, QuestionnaireResponse, Resource } from '../../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse, Resource } from 'fhir/r4'; import { Table as HnTable, ModeType, SortDirection, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; diff --git a/src/components/formcomponents/table/tables/table/utils.ts b/src/components/formcomponents/table/tables/table/utils.ts index 3e1f4745..2df4ca89 100644 --- a/src/components/formcomponents/table/tables/table/utils.ts +++ b/src/components/formcomponents/table/tables/table/utils.ts @@ -1,4 +1,4 @@ -import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, Resource } from '../../../../../types/fhir'; +import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, Resource } from 'fhir/r4'; import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 369685d2..02d57c65 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -1,16 +1,16 @@ -import moment from 'moment'; - import { Attachment, Coding, Quantity, QuestionnaireItem, - QuestionnaireItemEnableBehaviorCodes, QuestionnaireItemEnableWhen, QuestionnaireResponse, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, -} from '../../../../types/fhir'; +} from 'fhir/r4'; +import moment from 'moment'; + +import { QuestionnaireItemEnableBehaviorCodes } from '../../../../types/fhirEnums'; import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; @@ -200,7 +200,7 @@ export const getValueIfDataReceiver = ( return m.value; }); } - return getQuestionnaireResponseItemAnswer(item.type, result); + return getQuestionnaireResponseItemAnswer(item.type as Exclude, result); } return undefined; }; diff --git a/src/components/index.tsx b/src/components/index.tsx index 0281d452..40b22e5f 100644 --- a/src/components/index.tsx +++ b/src/components/index.tsx @@ -1,9 +1,5 @@ import * as React from 'react'; -import { connect } from 'react-redux'; -import { ThunkDispatch } from 'redux-thunk'; - -import { DispatchProps } from '../types/dispatchProps'; import { QuestionnaireResponseItem, Questionnaire, @@ -12,7 +8,10 @@ import { QuestionnaireResponseItemAnswer, Quantity, } from 'fhir/r4'; +import { connect } from 'react-redux'; +import { ThunkDispatch } from 'redux-thunk'; +import { DispatchProps } from '../types/dispatchProps'; import { ReferoProps } from '../types/referoProps'; import { State } from '../types/state'; diff --git a/src/components/with-common-functions.tsx b/src/components/with-common-functions.tsx index 1b7fd429..e7c29fce 100644 --- a/src/components/with-common-functions.tsx +++ b/src/components/with-common-functions.tsx @@ -2,9 +2,6 @@ import * as React from 'react'; import classNames from 'classnames'; import DOMPurify from 'dompurify'; - - -import { AutoSuggestProps } from '../types/autoSuggestProps'; import { Resource, Questionnaire, @@ -17,6 +14,7 @@ import { import { Collapse } from 'react-collapse'; import { ThunkDispatch } from 'redux-thunk'; +import { AutoSuggestProps } from '../types/autoSuggestProps'; import { OrgenhetHierarki } from '../types/orgenhetHierarki'; import { TextMessage } from '../types/text-message'; diff --git a/src/constants/itemType.ts b/src/constants/itemType.ts index 388dc732..cb2b339f 100644 --- a/src/constants/itemType.ts +++ b/src/constants/itemType.ts @@ -1,3 +1,5 @@ +// add all of thiese "string" | "boolean" | "group" | "display" | "decimal" | "date" | "dateTime" | "time" | "text" | "integer" | "choice" | "open-choice" | "attachment" | "quantity" | "question" | "url" | "reference"' is not assignable to parameter of type '"string" | "boolean" | "group" | "display" | "decimal" | "date" | "dateTime" | "time" | "text" | "integer" | "choice" | "open-choice" | "attachment" | "quantity" + export default { BOOLEAN: 'boolean', GROUP: 'group', @@ -13,4 +15,7 @@ export default { OPENCHOICE: 'open-choice', ATTATCHMENT: 'attachment', QUANTITY: 'quantity', + REFERENCE: 'reference', + URL: 'url', + QUESTION: 'question', } as const; diff --git a/src/util/index.ts b/src/util/index.ts index b323ca76..a22a3e91 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -1,6 +1,6 @@ +import { Questionnaire, QuestionnaireResponseItem, QuestionnaireItem, QuestionnaireResponseItemAnswer } from 'fhir/r4'; import marked from 'marked'; import { ComponentClass } from 'react-redux'; -import { Questionnaire, QuestionnaireResponseItem, QuestionnaireItem, QuestionnaireResponseItemAnswer } from 'fhir/r4'; import * as uuid from 'uuid'; import { isValid, invalidNodes } from '@helsenorge/core-utils/string-utils'; @@ -40,7 +40,6 @@ import Constants from '../constants/index'; import ItemType from '../constants/itemType'; import { RenderOptionCode } from '../constants/renderOptionCode'; import { TableCodes } from '../constants/tableTypes'; -import { RenderOptionCode } from '../constants/renderOptionCode'; import { Resources } from '../util/resources'; function openNewIfAbsolute(url: string): string { @@ -65,7 +64,7 @@ export const isTableCode = (extensionCode: string | string[]): boolean => { // eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function getComponentForItem(type: string, extensionCode?: string | string[]) { - if (String(type) === itemType.GROUP && !!extensionCode && isTableCode(extensionCode)) { + if (String(type) === ItemType.GROUP && !!extensionCode && isTableCode(extensionCode)) { return TableContainer as ComponentClass & Props>; } else if (String(type) === ItemType.GROUP) { return Group; From 42328799b295f23d1e0834abdddd0ff39d4c5721 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:44:22 +0100 Subject: [PATCH 65/83] fix import --- .../formcomponents/table/tables/__tests__/utils-spec.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/formcomponents/table/tables/__tests__/utils-spec.ts b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts index ae2a34a4..02026ad6 100644 --- a/src/components/formcomponents/table/tables/__tests__/utils-spec.ts +++ b/src/components/formcomponents/table/tables/__tests__/utils-spec.ts @@ -1,15 +1,10 @@ -import { - QuestionnaireResponseItemAnswer, - QuestionnaireItemEnableWhen, - QuestionnaireItemEnableBehaviorCodes, - QuestionnaireItem, - QuestionnaireResponse, -} from '../../../../../types/fhir'; +import { QuestionnaireResponseItemAnswer, QuestionnaireItemEnableWhen, QuestionnaireItem, QuestionnaireResponse } from 'fhir/r4'; import ItemType from '../../../../../constants/itemType'; import { extractValuesFromAnswer, getPrimitiveValueFromItemType, getQuestionnaireResponseItemAnswer, isConditionEnabled } from '../utils'; import * as questionnaireFunctions from '../utils'; import * as fhirUtils from '../../../../../util/refero-core'; +import { QuestionnaireItemEnableBehaviorCodes } from '../../../../../types/fhirEnums'; jest.mock('../../../../../util/refero-core'); From fb399036f96974dcf98ad410db9a5188d7fa29f7 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:55:52 +0100 Subject: [PATCH 66/83] sorting gtable --- .../formcomponents/table/tables/constants.ts | 1 + .../table/tables/gtable/interface.ts | 3 + .../table/tables/gtable/utils.ts | 17 +- .../formcomponents/table/tables/utils.ts | 48 +- src/constants/itemType.ts | 7 +- src/preview/FormFillerPreview.tsx | 5 +- ...peterende_gtable-nb-NO-v0.1_sorterubg.json | 890 ++++++++++++++++++ src/preview/skjema/NHN_Test_Table.json | 680 +++++++++++++ ...NHN_Test_Table_SvaralternativerStyrer.json | 1 + 9 files changed, 1642 insertions(+), 10 deletions(-) create mode 100644 src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1_sorterubg.json create mode 100644 src/preview/skjema/NHN_Test_Table.json create mode 100644 src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json diff --git a/src/components/formcomponents/table/tables/constants.ts b/src/components/formcomponents/table/tables/constants.ts index e291a3bc..814b8294 100644 --- a/src/components/formcomponents/table/tables/constants.ts +++ b/src/components/formcomponents/table/tables/constants.ts @@ -1,4 +1,5 @@ export const DATEFORMATS = { DATE: 'DD.MM.YYYY', DATETIME: 'DD MM YYYY HH:mm', + TIME: 'HH:mm', }; diff --git a/src/components/formcomponents/table/tables/gtable/interface.ts b/src/components/formcomponents/table/tables/gtable/interface.ts index 5a1e20b7..27232547 100644 --- a/src/components/formcomponents/table/tables/gtable/interface.ts +++ b/src/components/formcomponents/table/tables/gtable/interface.ts @@ -1,3 +1,5 @@ +import { IItemType } from '../../../../../constants/itemType'; + export interface IGTable { id: string; headerRow: IGTableHeaderItem[]; @@ -17,5 +19,6 @@ export interface IGTableRow { export interface IGTableColumn { id: string; index: number; + type?: IItemType; value: string; } diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index e09ee8bc..09fe65f6 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -6,7 +6,7 @@ import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; import { IGTable, IGTableColumn, IGTableHeaderItem, IGTableRow } from './interface'; import codeSystems from '../../../../../constants/codingsystems'; import { QuestionnaireItemWithAnswers } from '../interface'; -import { getCodeFromCodingSystem, getEnabledQuestionnaireItemsWithAnswers, getPrimitiveValueFromItemType } from '../utils'; +import { getCodeFromCodingSystem, getEnabledQuestionnaireItemsWithAnswers, getPrimitiveValueFromItemType, sortByItemType } from '../utils'; export const getNumberOfRowsGTable = (items: QuestionnaireResponseItem[]): number => { if (items.length === 0) { @@ -30,16 +30,19 @@ export const getValueFromAnswer = (rowIdx: number, item?: QuestionnaireItemWithA export const columnsForRowIndex = (answerItems: QuestionnaireItemWithAnswers[], rowIdx: number): IGTableColumn[] => { return Array.from({ length: answerItems.length }, (_, colIdx) => { const item = answerItems[colIdx]; + if (!item) { return { id: `empty-${rowIdx}-${colIdx}`, index: colIdx, + type: undefined, value: '', }; } return { id: item.linkId, index: colIdx, + type: item.type, value: getValueFromAnswer(rowIdx, item), }; }); @@ -95,10 +98,16 @@ export const sortTableRows = (table: IGTable, columnIndex: number, sortOrder: So headerRow: table.headerRow, id: table.id, rows: table.rows.sort((a, b) => { - const aValue = a?.columns.length > columnIndex ? a?.columns[columnIndex]?.value || '' : ''; - const bValue = b?.columns.length > columnIndex ? b?.columns[columnIndex]?.value || '' : ''; + if (a.columns.length <= columnIndex || b.columns.length <= columnIndex) { + return 0; + } + + const aColumn = a.columns[columnIndex]; + const bColumn = b.columns[columnIndex]; + const aValue = aColumn.value || ''; + const bValue = bColumn.value || ''; - return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + return sortByItemType(aValue, bValue, sortOrder, aColumn.type); }), }; return sortedTable; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 02d57c65..d1e0992c 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -21,7 +21,7 @@ import { DATEFORMATS } from './constants'; import { QuestionnaireItemWithAnswers } from './interface'; import { OPEN_CHOICE_SYSTEM } from '../../../../constants'; import codeSystems, { CodeSystems } from '../../../../constants/codingsystems'; -import ItemType from '../../../../constants/itemType'; +import ItemType, { IItemType } from '../../../../constants/itemType'; import { getQuestionnaireItemCodeValue } from '../../../../util/codingsystem'; import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; @@ -344,3 +344,49 @@ export const getCodeFromCodingSystem = (coding: Coding[], codingSystem: string): export function findCodeBySystem(coding: T[], system?: string): T[] { return coding.filter(code => code.system === system); } + +export const sortByItemType = (aValue: string, bValue: string, sortOrder: SortDirection, type?: IItemType): number => { + switch (type) { + case 'date': + return compareDates(aValue, bValue, sortOrder); + case 'dateTime': + return compareDates(aValue, bValue, sortOrder); + case 'time': + return compareTimes(aValue, bValue, sortOrder); + case 'integer': + case 'decimal': + return compareNumbers(aValue, bValue, sortOrder); + default: + return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + } +}; +function compareDates(aValue: string, bValue: string, sortOrder: SortDirection): number { + const dateA = moment(aValue, DATEFORMATS.DATETIME); + const dateB = moment(bValue, DATEFORMATS.DATETIME); + + let comparisonResult = 0; + if (dateA.isBefore(dateB)) { + comparisonResult = -1; + } else if (dateA.isAfter(dateB)) { + comparisonResult = 1; + } + return sortOrder === 'asc' ? comparisonResult : -comparisonResult; +} + +function compareTimes(aValue: string, bValue: string, sortOrder: SortDirection): number { + const format = DATEFORMATS.TIME; + const timeA = moment(aValue, format); + const timeB = moment(bValue, format); + + if (sortOrder === SortDirection.asc) { + return timeA.isBefore(timeB) ? -1 : timeA.isAfter(timeB) ? 1 : 0; + } else { + return timeA.isAfter(timeB) ? -1 : timeA.isBefore(timeB) ? 1 : 0; + } +} + +function compareNumbers(aValue: string, bValue: string, sortOrder: SortDirection): number { + const numberA = parseFloat(aValue); + const numberB = parseFloat(bValue); + return sortOrder === SortDirection.asc ? numberA - numberB : numberB - numberA; +} diff --git a/src/constants/itemType.ts b/src/constants/itemType.ts index cb2b339f..ab6ebf6e 100644 --- a/src/constants/itemType.ts +++ b/src/constants/itemType.ts @@ -1,6 +1,5 @@ // add all of thiese "string" | "boolean" | "group" | "display" | "decimal" | "date" | "dateTime" | "time" | "text" | "integer" | "choice" | "open-choice" | "attachment" | "quantity" | "question" | "url" | "reference"' is not assignable to parameter of type '"string" | "boolean" | "group" | "display" | "decimal" | "date" | "dateTime" | "time" | "text" | "integer" | "choice" | "open-choice" | "attachment" | "quantity" - -export default { +const ItemType = { BOOLEAN: 'boolean', GROUP: 'group', DISPLAY: 'display', @@ -19,3 +18,7 @@ export default { URL: 'url', QUESTION: 'question', } as const; + +export default ItemType; + +export type IItemType = typeof ItemType[keyof typeof ItemType]; diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 971f9fab..2ff26b34 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -1,17 +1,16 @@ import React, { useState } from 'react'; +import { QuestionnaireResponse } from 'fhir/r4'; import { Provider } from 'react-redux'; import { Store, legacy_createStore as createStore, applyMiddleware } from 'redux'; import thunk from 'redux-thunk'; -import { QuestionnaireResponse } from '../types/fhir'; - import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/kun_qest.json'; +import skjema from './skjema/NHN_Test_Table_SvaralternativerStyrer.json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; diff --git a/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1_sorterubg.json b/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1_sorterubg.json new file mode 100644 index 00000000..65a7a4f0 --- /dev/null +++ b/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1_sorterubg.json @@ -0,0 +1,890 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "255e32d1-2cfc-4033-b714-31a6e15a2899", + "name": "NHN_Test_Repeterende_gtable", + "title": "Repeterende strukturer i tabell gtable", + "description": "Skjema før time for nyrepasient", + "version": "0.1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + }, + { + "code": "1", + "display": "Kun innbygger selv", + "system": "http://helsenorge.no/fhir/KanUtforesAv" + } + ] + }, + "useContext": [ + { + "code": { + "system": "http://hl7.org/fhir/ValueSet/usage-context-type", + "code": "focus", + "display": "Clinical Focus" + }, + "valueCodeableConcept": { + "coding": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1.8655", + "display": "Repeterende strukturer i tabell gtable" + } + ] + } + } + ], + "contact": [ + { + "name": "http://www.nhn.no" + } + ], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } + }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", + "valueReference": { + "reference": "Endpoint/1" + } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", + "valueBoolean": true + } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1102", + "version": "1.0", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", + "status": "draft", + "publisher": "Direktoratet for e-helse", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "concept": [ + { + "code": "1", + "display": "Ja" + }, + { + "code": "2", + "display": "Nei" + }, + { + "code": "3", + "display": "Vet ikke" + } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "4c8b9272-16b7-4fe0-8e16-6f86077709cb", + "type": "group", + "text": "Datakilde 1: repeterende: GTable", + "required": false, + "item": [ + { + "linkId": "ba62ebba-244d-43b0-ac53-39dab184c953", + "type": "group", + "text": "Urin", + "extension": [ + { + "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", + "valueString": "Legg til registering" + } + ], + "required": false, + "repeats": true, + "item": [ + { + "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", + "type": "dateTime", + "text": "Dato", + "required": false + }, + { + "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", + "type": "time", + "text": "Klokkeslett", + "required": false + }, + { + "linkId": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", + "type": "quantity", + "text": "Milliliter urin", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "ml", + "display": "ml", + "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" + } + } + ], + "required": false + }, + { + "linkId": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", + "type": "quantity", + "text": "Vekt våt bleie", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "gram", + "display": "gram", + "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" + } + } + ], + "required": false + } + ] + } + ] + }, + { + "linkId": "72479ca2-444c-47e8-8288-1025194bfe51", + "type": "group", + "text": "Datakilde 2: repeterende: GTable nr 2 alle datatyper", + "required": false, + "code": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "code": "DESC", + "display": "Descending" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "code": "0d28d6ec-729c-4915-8575-b71074c90c93", + "display": "Alt skal inn" + } + ], + "item": [ + { + "linkId": "0d28d6ec-729c-4915-8575-b71074c90c93", + "type": "group", + "text": "Alt skal inn", + "extension": [ + { + "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", + "valueString": "Legg til registering" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "gtable" + } + ] + } + } + ], + "required": false, + "repeats": true, + "code": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "code": "DESC", + "display": "Descending" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "code": "22bf506e-f446-46d2-8b00-3b264f6479b8", + "display": "Dato" + } + ], + "item": [ + { + "linkId": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", + "type": "choice", + "text": "Alternativer", + "required": false, + "answerValueSet": "#1102" + }, + { + "linkId": "22bf506e-f446-46d2-8b00-3b264f6479b8", + "type": "dateTime", + "text": "Dato", + "required": false + }, + { + "linkId": "522b65ef-02bc-4fcf-8041-1ca0872440ea", + "type": "time", + "text": "Klokkeslett", + "required": false + }, + { + "linkId": "df1e8a08-f0e6-404b-a420-856a416c1e16", + "type": "quantity", + "text": "Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "ml", + "display": "ml", + "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" + } + } + ], + "required": false + }, + { + "linkId": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", + "type": "integer", + "text": "Tall", + "required": false + }, + { + "linkId": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", + "type": "decimal", + "text": "Desimaltall", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", + "valueInteger": 2 + } + ], + "required": false + }, + { + "linkId": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", + "type": "boolean", + "text": "Bekreftelse", + "required": false + } + ] + } + ] + }, + { + "linkId": "4d6ef3f2-423b-4aee-c43b-a5a37b460269", + "type": "group", + "text": "Oppsummering repeterende GTable Datakilde 1", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "0845d569-993b-418a-8a1d-7ce50400c65c", + "type": "group", + "text": "Oppsummering Her ligger kode for itemkontrol Gtable", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "gTable" + } + ] + } + } + ], + "code": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "code": "DESC", + "display": "Descending" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "code": "ab203143-488d-4757-946b-ddfad942205a", + "display": "Dato" + } + ], + "item": [ + { + "linkId": "ab203143-488d-4757-946b-ddfad942205a", + "type": "dateTime", + "text": "Dato", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", + "operator": "exists" + } + ], + "code": [ + { + "code": "ab203143-488d-4757-946b-ddfad942205a", + "display": "Dato", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "e90e650f-1928-47b1-a802-a00a5959ee8c" + } + ] + }, + { + "linkId": "01f1e567-abdc-46ee-8a41-cd571e930738", + "type": "time", + "text": "Klokkeslett", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", + "operator": "exists" + } + ] + }, + { + "linkId": "7b1b5765-adb5-475b-a024-d9f68d5c9f8e", + "type": "quantity", + "text": "Vekt våt bleie", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "gram", + "display": "gram", + "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", + "operator": "exists" + } + ] + }, + { + "linkId": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", + "type": "quantity", + "text": "Milliliter urin", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "ml", + "display": "ml", + "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", + "operator": "exists" + } + ] + } + ] + } + ] + }, + { + "linkId": "b9431104-1af1-4de4-8b74-9188ec3e4479", + "type": "group", + "text": "Oppsummering repeterende GTable Datakilde 2", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary" + }, + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "summary-container" + } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "e806447b-ab9c-49d1-8e16-0eef94235f73", + "type": "group", + "text": "Oppsummering Her ligger kode for itemkontrol Gtable", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "gTable" + } + ] + } + } + ], + "code": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "code": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", + "display": "Bekreftelse" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "code": "ASC", + "display": "Ascending" + } + ], + "item": [ + { + "linkId": "3918616c-bf21-4c8b-8579-2a68979b4474", + "type": "choice", + "text": "Alternativer", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='20e024a7-98f4-46f7-8224-6d4dcf736a7e').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", + "operator": "exists" + } + ] + }, + { + "linkId": "91f9a598-bb9f-4565-fa4a-518e3cbc65d4", + "type": "dateTime", + "text": "Dato", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='22bf506e-f446-46d2-8b00-3b264f6479b8').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "22bf506e-f446-46d2-8b00-3b264f6479b8", + "operator": "exists" + } + ] + }, + { + "linkId": "82976047-81e4-4b20-da7a-a3dd9f0e797a", + "type": "time", + "text": "Klokkeslett", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='522b65ef-02bc-4fcf-8041-1ca0872440ea').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "522b65ef-02bc-4fcf-8041-1ca0872440ea", + "operator": "exists" + } + ] + }, + { + "linkId": "ec83212c-578f-4308-cdae-8be63d1d9889", + "type": "quantity", + "text": "Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "ml", + "display": "ml", + "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='df1e8a08-f0e6-404b-a420-856a416c1e16').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "df1e8a08-f0e6-404b-a420-856a416c1e16", + "operator": "exists" + } + ] + }, + { + "linkId": "6fee57b2-7f5d-4990-8608-f12540d2cdd6", + "type": "integer", + "text": "Tall", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='a1c1db2b-2779-4e99-88d6-2d02c18d797c').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", + "operator": "exists" + } + ] + }, + { + "linkId": "25bbc49c-3bba-40b3-fb90-8684bcd176e2", + "type": "decimal", + "text": "Desimaltall", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", + "valueInteger": 2 + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='81b77ece-6d3f-49cd-8cbf-1ff14de07964').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", + "operator": "exists" + } + ] + }, + { + "linkId": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", + "type": "boolean", + "text": "Bekreftelse", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='df586ed5-0b3b-43eb-ae05-fa1f201d3730').answer.value" + } + ], + "readOnly": true, + "enableWhen": [ + { + "answerBoolean": true, + "question": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", + "operator": "=" + } + ], + "code": [ + { + "code": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", + "display": "Bekreftelse", + "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", + "id": "fe726126-fef7-4f3d-8ebd-30a67e24ae39" + } + ] + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-2", + "display": "SOT-2" + } + ], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-3", + "display": "SOT-3" + } + ], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + } + ] +} diff --git a/src/preview/skjema/NHN_Test_Table.json b/src/preview/skjema/NHN_Test_Table.json new file mode 100644 index 00000000..be7e9533 --- /dev/null +++ b/src/preview/skjema/NHN_Test_Table.json @@ -0,0 +1,680 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "89fad8fa-7193-4a80-a597-765c7c8a01ab", + "name": "NHN_Test_Table_SvaralternativerStyrer", + "title": "Table_SvaralternativerStyrer", + "version": "0.1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], + "security": [ + { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, + { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } + ] + }, + "useContext": [ + { + "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "valueCodeableConcept": { "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Table_SvaralternativerStyrer" }] } + } + ], + "contact": [{ "name": "http://www.nhn.no" }], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1102", + "version": "1.0", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", + "status": "draft", + "publisher": "Direktoratet for e-helse", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" }, + { "code": "3", "display": "Vet ikke" } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "82d5de9c-242d-4649-8c14-3ede137438b3", + "type": "group", + "text": "Data inn Table", + "required": false, + "item": [ + { + "linkId": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "type": "choice", + "text": "Er du syk", + "required": false, + "answerValueSet": "#1102", + "item": [ + { + "linkId": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", + "type": "string", + "text": "Hva feiler det deg?", + "required": false, + "enableWhen": [ + { + "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + }, + { + "linkId": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "type": "choice", + "text": "Er du uvel?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ], + "item": [ + { + "linkId": "7953faf6-55f4-406b-873b-ef167d7a1fbc", + "type": "time", + "text": "Når ble du uvel?", + "required": false, + "enableWhen": [ + { + "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "638764d4-baea-46d1-9e81-d98ff1c56b4d", + "type": "string", + "text": "Hva følte du?", + "required": false, + "enableWhen": [ + { + "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + }, + { + "linkId": "2db8bc54-237f-411c-e3c6-448cef6ec29c", + "type": "choice", + "text": "Vet du hvilken dag og hva klokken er?", + "item": [ + { + "linkId": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", + "type": "date", + "text": "Dato", + "required": false, + "enableWhen": [ + { + "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", + "type": "time", + "text": "Klokken", + "required": false, + "enableWhen": [ + { + "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ], + "required": false, + "answerValueSet": "#1102" + }, + { + "linkId": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "type": "choice", + "text": "Kan du notere ned data om deg?", + "item": [ + { + "linkId": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", + "type": "quantity", + "text": "Vekt", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + } + ], + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "e46b791e-7b83-47c7-8511-0e42751adc0a", + "type": "quantity", + "text": "Høyde", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + } + ], + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "f79dfabb-a788-445d-ba7a-a846b34e4b17", + "type": "integer", + "text": "Antall ganger du går på tur i løpet av uken", + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "1246b383-dc6e-43d9-a68e-03213b255739", + "type": "boolean", + "text": "Er disse verdiene korrekte, hak av", + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ], + "required": false, + "answerValueSet": "#1102" + } + ] + }, + { + "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", + "type": "group", + "text": "Oppsummering Table - Svaralternativer styrer", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", + "type": "group", + "text": "Oppsummering ", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table" }] + } + } + ], + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "7aef743f-0d06-45dc-9155-6566c203a3b6" + } + ], + "item": [ + { + "linkId": "a58a1ed6-30c3-409c-8578-ffccf6f378d0", + "type": "display", + "text": "Her kommer en oppsummering av dine svar \"Displaytext\"", + "required": false + }, + { + "linkId": "bab6ece9-d978-4601-9169-7dcf9c6e0007", + "type": "choice", + "text": "Er du syk", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='c01b4389-6597-4b81-95d9-f54f61ea2cb8').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", "operator": "exists" }], + "_text": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", "valueMarkdown": "Er du syk" }] + }, + "code": [ + { + "code": "Default", + "display": "Viser kun besvarte alternativer", + "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", + "id": "6530d2e2-9654-4f1d-84a4-65cd3f12941c" + } + ], + "item": [ + { + "linkId": "54338f3c-5922-4ff5-87d9-26477c966e7f", + "type": "string", + "text": "Hva feiler det deg?", + "required": false, + "enableWhen": [ + { + "question": "bab6ece9-d978-4601-9169-7dcf9c6e0007", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='260f5f7c-ada3-49f3-8d50-166ee1ba4afa').answer.value" + } + ], + "readOnly": true + } + ] + }, + { + "linkId": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "type": "choice", + "text": "Er du uvel?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='04ccb620-ba66-4bed-d29a-08fb9e95c41f').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", "operator": "exists" }], + "item": [ + { + "linkId": "7178ee96-a482-4e76-8f22-c3f3b31c08cd", + "type": "time", + "text": "Når ble du uvel?", + "required": false, + "enableWhen": [ + { + "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "7953faf6-55f4-406b-873b-ef167d7a1fbc", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='7953faf6-55f4-406b-873b-ef167d7a1fbc').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "7757a10f-e627-40ee-d105-170d07859c2f", + "type": "string", + "text": "Hva følte du?", + "required": false, + "enableWhen": [ + { + "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "638764d4-baea-46d1-9e81-d98ff1c56b4d", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='638764d4-baea-46d1-9e81-d98ff1c56b4d').answer.value" + } + ], + "readOnly": true + } + ] + }, + { + "linkId": "8fbf52cc-3bf3-4fa1-d1be-f2dff1bc0b24", + "type": "choice", + "text": "Vet du hvilken dag og hva klokken er?", + "item": [ + { + "linkId": "f49cf9ae-0ee5-4947-86b9-b2e82380f1ac", + "type": "date", + "text": "Dato", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='29c5579a-cf2b-43b9-f55c-0d239ccaf02c').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "8b86f173-d126-4c73-8c89-10ee9cc45535", + "type": "time", + "text": "Klokken", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='9acb4110-ea0a-48b4-985c-fdb2cf572de3').answer.value" + } + ], + "readOnly": true + } + ], + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='2db8bc54-237f-411c-e3c6-448cef6ec29c').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", "operator": "exists" }] + }, + { + "linkId": "1106fee1-475a-4018-f554-382985276782", + "type": "choice", + "text": "Kan du notere ned data om deg?", + "item": [ + { + "linkId": "5b935dbb-9041-480e-88e6-ef76ec1fb102", + "type": "quantity", + "text": "Vekt", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='56800262-18bb-4d0f-8a08-ea22f5fc4e01').answer.value" + } + ], + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", "operator": "exists" }], + "readOnly": true + }, + { + "linkId": "657c9c87-b5f9-4b0b-8fad-91ab8697f039", + "type": "quantity", + "text": "Høyde", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e46b791e-7b83-47c7-8511-0e42751adc0a').answer.value" + } + ], + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "e46b791e-7b83-47c7-8511-0e42751adc0a", "operator": "exists" }], + "readOnly": true + }, + { + "linkId": "c2be52a9-f7d6-4ea1-bdcf-8c5192ed25a5", + "type": "integer", + "text": "Antall ganger du går på tur i løpet av uken", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "f79dfabb-a788-445d-ba7a-a846b34e4b17", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f79dfabb-a788-445d-ba7a-a846b34e4b17').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "53847e9d-4cd4-4a92-8a8f-9c4fcd168e81", + "type": "boolean", + "text": "Er disse verdiene korrekte, hak av", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "1246b383-dc6e-43d9-a68e-03213b255739", "operator": "=" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='1246b383-dc6e-43d9-a68e-03213b255739').answer.value" + } + ], + "readOnly": true + } + ], + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "operator": "exists" }], + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='015337fd-a035-45ab-8fd5-286a2a5be7a1').answer.value" + } + ], + "readOnly": true + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + } + ] +} diff --git a/src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json b/src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json new file mode 100644 index 00000000..60b9db67 --- /dev/null +++ b/src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json @@ -0,0 +1 @@ +{"resourceType":"Questionnaire","language":"nb-NO","id":"89fad8fa-7193-4a80-a597-765c7c8a01ab","name":"NHN_Test_Table_SvaralternativerStyrer","title":"Table_SvaralternativerStyrer","version":"0.1","status":"draft","publisher":"NHN","meta":{"profile":["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"],"tag":[{"system":"urn:ietf:bcp:47","code":"nb-NO","display":"Bokmål"}],"security":[{"code":"3","display":"Helsehjelp (Full)","system":"urn:oid:2.16.578.1.12.4.1.1.7618"},{"code":"1","display":"Kun innbygger selv","system":"http://helsenorge.no/fhir/KanUtforesAv"}]},"useContext":[{"code":{"system":"http://hl7.org/fhir/ValueSet/usage-context-type","code":"focus","display":"Clinical Focus"},"valueCodeableConcept":{"coding":[{"system":"urn:oid:2.16.578.1.12.4.1.1.8655","display":"Table_SvaralternativerStyrer"}]}}],"contact":[{"name":"http://www.nhn.no"}],"subjectType":["Patient"],"extension":[{"url":"http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar","valueCoding":{"system":"http://helsenorge.no/fhir/ValueSet/sdf-sidebar","code":"1"}},{"url":"http://helsenorge.no/fhir/StructureDefinition/sdf-information-message","valueCoding":{"system":"http://helsenorge.no/fhir/ValueSet/sdf-information-message","code":"1"}},{"url":"http://ehelse.no/fhir/StructureDefinition/sdf-endpoint","valueReference":{"reference":"Endpoint/1"}},{"url":"http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility","valueCodeableConcept":{"coding":[{"system":"http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions","code":"hide-help","display":"Hide help texts"},{"system":"http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions","code":"hide-sublabel","display":"Hide sublabel texts"},{"system":"http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions","code":"hide-sidebar","display":"Hide sidebar texts"}]}},{"url":"http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf","valueBoolean":true}],"date":"2023-03-30T00:00:00+02:00","contained":[{"url":"http://ehelse.no/fhir/ValueSet/Predefined","resourceType":"ValueSet","id":"1102","version":"1.0","name":"urn:oid:1102","title":"Ja / Nei / Vet ikke (structor)","status":"draft","publisher":"Direktoratet for e-helse","compose":{"include":[{"system":"urn:oid:2.16.578.1.12.4.1.1102","concept":[{"code":"1","display":"Ja"},{"code":"2","display":"Nei"},{"code":"3","display":"Vet ikke"}]}]}},{"url":"http://ehelse.no/fhir/ValueSet/Predefined","resourceType":"ValueSet","id":"1101","version":"1.0","name":"urn:oid:1101","title":"Ja / Nei (structor)","status":"draft","publisher":"NHN","compose":{"include":[{"system":"urn:oid:2.16.578.1.12.4.1.1101","concept":[{"code":"1","display":"Ja"},{"code":"2","display":"Nei"}]}]}}],"item":[{"linkId":"82d5de9c-242d-4649-8c14-3ede137438b3","type":"group","text":"Data inn Table","required":false,"item":[{"linkId":"c01b4389-6597-4b81-95d9-f54f61ea2cb8","type":"choice","text":"Er du syk","required":false,"answerValueSet":"#1102","item":[{"linkId":"bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c","type":"choice","text":"Velg sykdom Denne er feil","required":false,"answerOption":[{"valueCoding":{"id":"8cdcaae1-19d0-4267-82a0-81cff288ea07","code":"1","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Hjerte"}},{"valueCoding":{"id":"810bbacf-80c2-46ec-8332-31b7ec95e00c","code":"2","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Lunge"}},{"valueCoding":{"id":"aa94ba53-57b5-4afa-8351-65b1d41d78c8","code":"3","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Mage"}}],"code":[{"code":"Full","display":"Full vising","system":"http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions","id":"615dddda-8c98-4ccd-ac63-adfe30f3ab70"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"check-box"}]}}]},{"linkId":"260f5f7c-ada3-49f3-8d50-166ee1ba4afa","type":"string","text":"Hva feiler det deg?","required":false,"enableWhen":[{"question":"c01b4389-6597-4b81-95d9-f54f61ea2cb8","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"2deae55a-f86a-4e41-8b42-8b1abfe5d538","type":"choice","text":"Er du veldig syk? Denne er feil","required":false,"answerValueSet":"#1101","enableWhen":[{"question":"c01b4389-6597-4b81-95d9-f54f61ea2cb8","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]}]},{"linkId":"04ccb620-ba66-4bed-d29a-08fb9e95c41f","type":"choice","text":"Er du uvel?","required":false,"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"check-box"}]}}],"item":[{"linkId":"7953faf6-55f4-406b-873b-ef167d7a1fbc","type":"time","text":"Når ble du uvel?","required":false,"enableWhen":[{"question":"04ccb620-ba66-4bed-d29a-08fb9e95c41f","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"638764d4-baea-46d1-9e81-d98ff1c56b4d","type":"string","text":"Hva følte du?","required":false,"enableWhen":[{"question":"04ccb620-ba66-4bed-d29a-08fb9e95c41f","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]}]},{"linkId":"2db8bc54-237f-411c-e3c6-448cef6ec29c","type":"choice","text":"Vet du hvilken dag og hva klokken er?","required":false,"answerValueSet":"#1102","item":[{"linkId":"29c5579a-cf2b-43b9-f55c-0d239ccaf02c","type":"date","text":"Dato","required":false,"enableWhen":[{"question":"2db8bc54-237f-411c-e3c6-448cef6ec29c","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"9acb4110-ea0a-48b4-985c-fdb2cf572de3","type":"time","text":"Klokken","required":false,"enableWhen":[{"question":"2db8bc54-237f-411c-e3c6-448cef6ec29c","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]}]},{"linkId":"015337fd-a035-45ab-8fd5-286a2a5be7a1","type":"choice","text":"Kan du notere ned data om deg?","required":false,"answerValueSet":"#1102","item":[{"linkId":"56800262-18bb-4d0f-8a08-ea22f5fc4e01","type":"quantity","text":"Vekt","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"kg","display":"kilo","system":"http://unitsofmeasure.org"}}],"required":false,"enableWhen":[{"question":"015337fd-a035-45ab-8fd5-286a2a5be7a1","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"e46b791e-7b83-47c7-8511-0e42751adc0a","type":"quantity","text":"Høyde","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"cm","display":"centimeter","system":"http://unitsofmeasure.org"}}],"required":false,"enableWhen":[{"question":"015337fd-a035-45ab-8fd5-286a2a5be7a1","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"f79dfabb-a788-445d-ba7a-a846b34e4b17","type":"integer","text":"Antall ganger du går på tur i løpet av uken","required":false,"enableWhen":[{"question":"015337fd-a035-45ab-8fd5-286a2a5be7a1","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"1246b383-dc6e-43d9-a68e-03213b255739","type":"boolean","text":"Er disse verdiene korrekte, hak av","required":false,"enableWhen":[{"question":"015337fd-a035-45ab-8fd5-286a2a5be7a1","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]}]},{"linkId":"38fd12b9-414c-4bce-b909-44aae9b762ac","type":"choice","text":"Likt kodeverk egendefinert","required":false,"answerOption":[{"valueCoding":{"id":"6ee199d1-2e0d-4599-821f-7d4b0b3808b4","code":"1","system":"urn:oid:2.16.578.1.12.4.1.1102","display":"Ja"}},{"valueCoding":{"id":"24224321-1c3e-46d5-835f-6d0edd04744e","code":"2","system":"urn:oid:2.16.578.1.12.4.1.1102","display":"Nei"}},{"valueCoding":{"id":"23396ebd-3e85-4913-ab3c-5b696dae5858","code":"3","system":"urn:oid:2.16.578.1.12.4.1.1102","display":"Vet ikke"}}]}]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"sidebar"}]}}],"linkId":"c5c27efb-76d7-4f1e-b7f9-cbe454846e8b","code":[{"system":"http://ehelse.no/fhir/ValueSet/SOTHeaders","code":"SOT-2","display":"SOT-2"}],"_text":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/rendering-markdown","valueMarkdown":"Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål."}]},"type":"text","required":false,"repeats":false,"readOnly":false},{"linkId":"f517041f-82d0-4680-b21a-c4462719a0aa","type":"group","text":"Oppsummering Table - Svaralternativer styrer","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"summary"},{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"summary-container"}]}}],"required":false,"code":[{"code":"1","display":"Default","system":"http://helsenorge.no/fhir/CodeSystem/RenderOptions","id":"160c445f-80c0-422e-e0c8-2b08354528bc"}],"item":[{"linkId":"44d1fa07-fe8c-4550-a497-bb1be9d92da7","type":"group","text":"Oppsummering ","required":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"table"}]}}],"code":[{"code":"1","display":"Default","system":"http://helsenorge.no/fhir/CodeSystem/RenderOptions","id":"7aef743f-0d06-45dc-9155-6566c203a3b6"},{"system":"http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions","code":"DESC","display":"Descending"}],"item":[{"linkId":"046d08ef-d812-4693-8dba-f349bdfafb15","type":"group","text":"Gruppe 1","item":[{"linkId":"bab6ece9-d978-4601-9169-7dcf9c6e0007","type":"choice","text":"Er du syk","required":false,"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='c01b4389-6597-4b81-95d9-f54f61ea2cb8').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"c01b4389-6597-4b81-95d9-f54f61ea2cb8","operator":"exists"}],"_text":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/rendering-markdown","valueMarkdown":"Er du syk"}]},"code":[{"code":"Default","display":"Viser kun besvarte alternativer","system":"http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions","id":"6530d2e2-9654-4f1d-84a4-65cd3f12941c"}],"item":[{"linkId":"0b7b7b2d-9cec-40d7-e428-7cc0f34fe6f5","type":"choice","text":"Er du veldig syk?","required":false,"answerValueSet":"#1101","enableWhen":[{"answerBoolean":true,"question":"2deae55a-f86a-4e41-8b42-8b1abfe5d538","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='2deae55a-f86a-4e41-8b42-8b1abfe5d538').answer.value"}],"readOnly":true},{"linkId":"54338f3c-5922-4ff5-87d9-26477c966e7f","type":"string","text":"Hva feiler det deg?","required":false,"enableWhen":[{"question":"bab6ece9-d978-4601-9169-7dcf9c6e0007","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"260f5f7c-ada3-49f3-8d50-166ee1ba4afa","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='260f5f7c-ada3-49f3-8d50-166ee1ba4afa').answer.value"}],"readOnly":true},{"linkId":"be541d70-cc91-4254-8268-0baa7f1c76b9","type":"open-choice","text":"Velg sykdom","required":false,"enableWhen":[{"question":"c01b4389-6597-4b81-95d9-f54f61ea2cb8","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c","operator":"exists"}],"answerOption":[{"valueCoding":{"id":"8cdcaae1-19d0-4267-82a0-81cff288ea07","code":"hjerte","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Hjerte"}},{"valueCoding":{"id":"810bbacf-80c2-46ec-8332-31b7ec95e00c","code":"lunge-","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Lunge "}},{"valueCoding":{"id":"aa94ba53-57b5-4afa-8351-65b1d41d78c8","code":"mage","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Mage"}}],"code":[{"code":"Full","display":"Full vising","system":"http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions","id":"615dddda-8c98-4ccd-ac63-adfe30f3ab70"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"check-box"},{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c').answer.value"}],"readOnly":true}]}],"required":false},{"linkId":"79c8d80e-325a-44a8-9fa2-adbe9ada594d","type":"group","text":"Gruppe 2","item":[{"linkId":"3528fa8b-c15c-4e8c-86dc-8380bd37ec3d","type":"choice","text":"Er du uvel?","required":false,"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"check-box"},{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='04ccb620-ba66-4bed-d29a-08fb9e95c41f').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"04ccb620-ba66-4bed-d29a-08fb9e95c41f","operator":"exists"}],"item":[{"linkId":"7178ee96-a482-4e76-8f22-c3f3b31c08cd","type":"time","text":"Når ble du uvel?","required":false,"enableWhen":[{"question":"3528fa8b-c15c-4e8c-86dc-8380bd37ec3d","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"7953faf6-55f4-406b-873b-ef167d7a1fbc","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='7953faf6-55f4-406b-873b-ef167d7a1fbc').answer.value"}],"readOnly":true},{"linkId":"7757a10f-e627-40ee-d105-170d07859c2f","type":"string","text":"Hva følte du?","required":false,"enableWhen":[{"question":"3528fa8b-c15c-4e8c-86dc-8380bd37ec3d","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"638764d4-baea-46d1-9e81-d98ff1c56b4d","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='638764d4-baea-46d1-9e81-d98ff1c56b4d').answer.value"}],"readOnly":true}]}],"required":false},{"linkId":"8fbf52cc-3bf3-4fa1-d1be-f2dff1bc0b24","type":"choice","text":"Vet du hvilken dag og hva klokken er?","required":false,"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='2db8bc54-237f-411c-e3c6-448cef6ec29c').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"2db8bc54-237f-411c-e3c6-448cef6ec29c","operator":"exists"}],"item":[{"linkId":"f49cf9ae-0ee5-4947-86b9-b2e82380f1ac","type":"date","text":"Dato","required":false,"enableWhen":[{"answerBoolean":true,"question":"29c5579a-cf2b-43b9-f55c-0d239ccaf02c","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='29c5579a-cf2b-43b9-f55c-0d239ccaf02c').answer.value"}],"readOnly":true},{"linkId":"8b86f173-d126-4c73-8c89-10ee9cc45535","type":"time","text":"Klokken","required":false,"enableWhen":[{"answerBoolean":true,"question":"9acb4110-ea0a-48b4-985c-fdb2cf572de3","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='9acb4110-ea0a-48b4-985c-fdb2cf572de3').answer.value"}],"readOnly":true}]},{"linkId":"1106fee1-475a-4018-f554-382985276782","type":"choice","text":"Kan du notere ned data om deg?","required":false,"enableWhen":[{"answerBoolean":true,"question":"015337fd-a035-45ab-8fd5-286a2a5be7a1","operator":"exists"}],"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='015337fd-a035-45ab-8fd5-286a2a5be7a1').answer.value"}],"readOnly":true,"item":[{"linkId":"5b935dbb-9041-480e-88e6-ef76ec1fb102","type":"quantity","text":"Vekt","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"kg","display":"kilo","system":"http://unitsofmeasure.org"}},{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='56800262-18bb-4d0f-8a08-ea22f5fc4e01').answer.value"}],"required":false,"enableWhen":[{"answerBoolean":true,"question":"56800262-18bb-4d0f-8a08-ea22f5fc4e01","operator":"exists"}],"readOnly":true},{"linkId":"657c9c87-b5f9-4b0b-8fad-91ab8697f039","type":"quantity","text":"Høyde","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"cm","display":"centimeter","system":"http://unitsofmeasure.org"}},{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='e46b791e-7b83-47c7-8511-0e42751adc0a').answer.value"}],"required":false,"enableWhen":[{"answerBoolean":true,"question":"e46b791e-7b83-47c7-8511-0e42751adc0a","operator":"exists"}],"readOnly":true},{"linkId":"c2be52a9-f7d6-4ea1-bdcf-8c5192ed25a5","type":"integer","text":"Antall ganger du går på tur i løpet av uken","required":false,"enableWhen":[{"answerBoolean":true,"question":"f79dfabb-a788-445d-ba7a-a846b34e4b17","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='f79dfabb-a788-445d-ba7a-a846b34e4b17').answer.value"}],"readOnly":true},{"linkId":"53847e9d-4cd4-4a92-8a8f-9c4fcd168e81","type":"boolean","text":"Er disse verdiene korrekte, hak av","required":false,"enableWhen":[{"answerBoolean":true,"question":"1246b383-dc6e-43d9-a68e-03213b255739","operator":"="}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='1246b383-dc6e-43d9-a68e-03213b255739').answer.value"}],"readOnly":true}]}]}]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"sidebar"}]}}],"linkId":"cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0","code":[{"system":"http://ehelse.no/fhir/ValueSet/SOTHeaders","code":"SOT-3","display":"SOT-3"}],"_text":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/rendering-markdown","valueMarkdown":"Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)"}]},"type":"text","required":false,"repeats":false,"readOnly":false}]} \ No newline at end of file From c2f363536672f4da2a1a22977c6375c183a2002e Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 9 Feb 2024 16:09:19 +0100 Subject: [PATCH 67/83] updated the sort function with the common function for sorting by table --- .../table/tables/table-hn2/interface.ts | 3 +++ .../table/tables/table-hn2/utils.ts | 7 ++++-- .../table/tables/table/interface.ts | 3 +++ .../table/tables/table/utils.ts | 23 +++++++++++++------ 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/components/formcomponents/table/tables/table-hn2/interface.ts b/src/components/formcomponents/table/tables/table-hn2/interface.ts index 67c1614a..bcd42780 100644 --- a/src/components/formcomponents/table/tables/table-hn2/interface.ts +++ b/src/components/formcomponents/table/tables/table-hn2/interface.ts @@ -1,6 +1,9 @@ +import { IItemType } from '../../../../../constants/itemType'; + export interface ITableH2Column { id: string; text: string; + type?: IItemType; index: number; } diff --git a/src/components/formcomponents/table/tables/table-hn2/utils.ts b/src/components/formcomponents/table/tables/table-hn2/utils.ts index 68904648..8e5f4a54 100644 --- a/src/components/formcomponents/table/tables/table-hn2/utils.ts +++ b/src/components/formcomponents/table/tables/table-hn2/utils.ts @@ -12,6 +12,7 @@ import { findIndexByCode, getCodeFromCodingSystem, getEnabledQuestionnaireItemsWithAnswers, + sortByItemType, transformAnswersToListOfStrings, } from '../utils'; @@ -56,6 +57,7 @@ export const createColumnsForRow = ( return { id: item.linkId, index: findIndexByCode(item, codeSystems.TableColumn), + type: item.type, text: getValueFromItemsToShow(item, itemsToShow), }; }); @@ -101,8 +103,9 @@ export const sortTableRows = (table: ITableH2Row[], columnIndex: number, sortOrd return table.sort((a, b) => { const aValue = a?.columns.length > columnIndex ? a?.columns[columnIndex]?.text || '' : ''; const bValue = b?.columns.length > columnIndex ? b?.columns[columnIndex]?.text || '' : ''; - - return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + const aColumn = a.columns[columnIndex]; + const type = aColumn?.type; + return sortByItemType(aValue, bValue, sortOrder, type); }); }; export const findCodeForColumnToSortBy = (coding: Coding[]): Coding | undefined => { diff --git a/src/components/formcomponents/table/tables/table/interface.ts b/src/components/formcomponents/table/tables/table/interface.ts index ed364fc8..b3007b18 100644 --- a/src/components/formcomponents/table/tables/table/interface.ts +++ b/src/components/formcomponents/table/tables/table/interface.ts @@ -1,6 +1,9 @@ +import { IItemType } from '../../../../../constants/itemType'; + export interface IStandardTableColumn { id: string; index: number; + type?: IItemType; value: string; } diff --git a/src/components/formcomponents/table/tables/table/utils.ts b/src/components/formcomponents/table/tables/table/utils.ts index 2df4ca89..1afd4f44 100644 --- a/src/components/formcomponents/table/tables/table/utils.ts +++ b/src/components/formcomponents/table/tables/table/utils.ts @@ -6,10 +6,15 @@ import { Options } from '@helsenorge/form/components/radio-group'; import { IStandardTable, IStandardTableColumn, IStandardTableRow } from './interface'; import codeSystems from '../../../../../constants/codingsystems'; -import ItemType from '../../../../../constants/itemType'; +import ItemType, { IItemType } from '../../../../../constants/itemType'; import { getContainedOptions } from '../../../../../util/choice'; import { QuestionnaireItemWithAnswers } from '../interface'; -import { getDisplayFromCodingSystem, getEnabledQuestionnaireItemsWithAnswers, transformAnswersToListOfStrings } from '../utils'; +import { + getDisplayFromCodingSystem, + getEnabledQuestionnaireItemsWithAnswers, + sortByItemType, + transformAnswersToListOfStrings, +} from '../utils'; export const emptyTable = (): IStandardTable => { return { @@ -27,9 +32,10 @@ export const emptyTableWithId = (id: string): IStandardTable => { }; }; -export const createTableColumn = (value: string, index: number, id: string): IStandardTableColumn => { +export const createTableColumn = (value: string, index: number, id: string, type: IItemType | undefined): IStandardTableColumn => { return { value, + type, index, id, }; @@ -91,11 +97,12 @@ export const createBodyRows = ( return answers.flatMap((item, index) => processItem(item, index, needsExtraColumn, choiceValues)); }; -export const createRowsFromAnswersCodes = (item: QuestionnaireResponseItem, choiceValues?: Options[]): IStandardTableColumn[] => { +export const createRowsFromAnswersCodes = (item: QuestionnaireItemWithAnswers, choiceValues?: Options[]): IStandardTableColumn[] => { return ( choiceValues?.map(value => ({ id: `${value.type}-${value.type}`, index: Number(value.type ?? 0), + type: item.type, value: item.answer?.some(x => { return x.valueCoding?.code === value.type; }) @@ -112,9 +119,9 @@ export const createColumnsFromAnswers = (item: QuestionnaireItemWithAnswers, cho const textAnswer = type && answer && choiceColumns.every(x => x.value === '') ? transformAnswersToListOfStrings(type, answer) : []; const columns: IStandardTableColumn[] = [ - createTableColumn(item.text || '', 0, `${item.linkId}-question`), + createTableColumn(item.text || '', 0, `${item.linkId}-question`, type), ...choiceColumns, - createTableColumn(textAnswer.join(', '), choiceColumns.length + 1, `${item.linkId}-answer`), + createTableColumn(textAnswer.join(', '), choiceColumns.length + 1, `${item.linkId}-answer`, type), ]; return columns; }; @@ -171,7 +178,9 @@ export const sortTableRows = (table: IStandardTable, columnIndex: number, sortOr const aValue = a?.columns.length > columnIndex ? a?.columns[columnIndex]?.value || '' : ''; const bValue = b?.columns.length > columnIndex ? b?.columns[columnIndex]?.value || '' : ''; - return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + const aColumn = a.columns[columnIndex]; + const type = aColumn?.type; + return sortByItemType(aValue, bValue, sortOrder, type); }), }; return sortedTable; From 8f21f1609218fc74d3ee8aad50d541258c76aaad Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Sun, 11 Feb 2024 12:38:08 +0100 Subject: [PATCH 68/83] fixes --- .../formcomponents/table/tables/table/StandardTable.tsx | 1 + src/components/formcomponents/table/tables/table/utils.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/formcomponents/table/tables/table/StandardTable.tsx b/src/components/formcomponents/table/tables/table/StandardTable.tsx index ec7ac15c..3cecae63 100644 --- a/src/components/formcomponents/table/tables/table/StandardTable.tsx +++ b/src/components/formcomponents/table/tables/table/StandardTable.tsx @@ -18,6 +18,7 @@ interface Props { export const StandardTable = ({ items, questionnaireResponse, resource, tableCodesCoding }: Props): JSX.Element => { const displayToSortBy = getDisplayToSortBy(tableCodesCoding); + const [sortDir, setSortDir] = useState(transformCodingToSortDirection(tableCodesCoding)); const [table, setTable] = useState( getStandardTableObject(items, questionnaireResponse, resource, sortDir, displayToSortBy) diff --git a/src/components/formcomponents/table/tables/table/utils.ts b/src/components/formcomponents/table/tables/table/utils.ts index 1afd4f44..58acd7d3 100644 --- a/src/components/formcomponents/table/tables/table/utils.ts +++ b/src/components/formcomponents/table/tables/table/utils.ts @@ -1,4 +1,4 @@ -import { Coding, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, Resource } from 'fhir/r4'; +import { Coding, QuestionnaireItem, QuestionnaireResponse, Resource } from 'fhir/r4'; import { SortDirection } from '@helsenorge/designsystem-react/components/Table'; From c9695de0728993b902c00a1df297fb2d5cf0a8dc Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:19:13 +0100 Subject: [PATCH 69/83] standard table --- .../table/tables/table/utils.ts | 70 +- ...NHN_Test_Table_SvaralternativerStyrer.json | 892 +++++++++++++++++- src/util/choice.ts | 16 + 3 files changed, 957 insertions(+), 21 deletions(-) diff --git a/src/components/formcomponents/table/tables/table/utils.ts b/src/components/formcomponents/table/tables/table/utils.ts index 58acd7d3..8a280c15 100644 --- a/src/components/formcomponents/table/tables/table/utils.ts +++ b/src/components/formcomponents/table/tables/table/utils.ts @@ -7,7 +7,7 @@ import { Options } from '@helsenorge/form/components/radio-group'; import { IStandardTable, IStandardTableColumn, IStandardTableRow } from './interface'; import codeSystems from '../../../../../constants/codingsystems'; import ItemType, { IItemType } from '../../../../../constants/itemType'; -import { getContainedOptions } from '../../../../../util/choice'; +import { getContainedOptions, getOptions, getSystemForItem } from '../../../../../util/choice'; import { QuestionnaireItemWithAnswers } from '../interface'; import { getDisplayFromCodingSystem, @@ -68,9 +68,11 @@ const processItem = ( item: QuestionnaireItemWithAnswers, index: number, needsExtraColumn: boolean, - choiceValues?: Options[] + choiceValues?: Options[], + system?: string, + resource?: Resource[] ): IStandardTableRow[] => { - const columns = createColumnsFromAnswers(item, choiceValues); + const columns = createColumnsFromAnswers(item, choiceValues, system, resource); const processedColumns = needsExtraColumn ? columns : columns.slice(0, -1); const row: IStandardTableRow = { @@ -80,7 +82,7 @@ const processItem = ( }; const childRows = item.item - ? item.item.flatMap((child, childIndex) => processItem(child, childIndex, needsExtraColumn, choiceValues)) + ? item.item.flatMap((child, childIndex) => processItem(child, childIndex, needsExtraColumn, choiceValues, system, resource)) : []; return [row, ...childRows]; @@ -90,32 +92,46 @@ export const createBodyRows = ( items: QuestionnaireItem[], responseItems: QuestionnaireResponse, needsExtraColumn: boolean, - choiceValues?: Options[] + choiceValues?: Options[], + system?: string, + resource?: Resource[] ): IStandardTableRow[] => { const answers = getEnabledQuestionnaireItemsWithAnswers(items, responseItems); - return answers.flatMap((item, index) => processItem(item, index, needsExtraColumn, choiceValues)); + return answers.flatMap((item, index) => processItem(item, index, needsExtraColumn, choiceValues, system, resource)); }; -export const createRowsFromAnswersCodes = (item: QuestionnaireItemWithAnswers, choiceValues?: Options[]): IStandardTableColumn[] => { +export const createRowsFromAnswersCodes = ( + item: QuestionnaireItemWithAnswers, + choiceValues?: Options[], + system?: string, + resource?: Resource[] +): IStandardTableColumn[] => { + const itemSystem = getSystemForItem(item, resource); return ( choiceValues?.map(value => ({ id: `${value.type}-${value.type}`, index: Number(value.type ?? 0), type: item.type, - value: item.answer?.some(x => { - return x.valueCoding?.code === value.type; - }) - ? 'X' - : '', + value: + item.answer?.some(x => { + return x.valueCoding?.code === value.type; + }) && itemSystem === system + ? 'X' + : '', })) || [] ); }; -export const createColumnsFromAnswers = (item: QuestionnaireItemWithAnswers, choiceValues?: Options[]): IStandardTableColumn[] => { +export const createColumnsFromAnswers = ( + item: QuestionnaireItemWithAnswers, + choiceValues?: Options[], + system?: string, + resource?: Resource[] +): IStandardTableColumn[] => { const type = item?.type; const answer = item?.answer; - const choiceColumns = createRowsFromAnswersCodes(item, choiceValues); + const choiceColumns = createRowsFromAnswersCodes(item, choiceValues, system, resource); const textAnswer = type && answer && choiceColumns.every(x => x.value === '') ? transformAnswersToListOfStrings(type, answer) : []; const columns: IStandardTableColumn[] = [ @@ -137,15 +153,15 @@ export const getStandardTableObject = ( return emptyTable(); } - const firstItem = findFirstChoiceItem(items); - if (!firstItem) { + const firstChoiceItem = findFirstChoiceItem(items); + if (!firstChoiceItem) { return emptyTableWithId(responseItems.id || ''); } - - const choiceValues = getContainedOptions(firstItem, resource) || []; + const system = getSystemForItem(firstChoiceItem, resource); + const choiceValues = getContainedOptions(firstChoiceItem, resource) || []; const extraColumnNeeded = needsExtraColumn(items, responseItems); - const rows = createBodyRows(items, responseItems, extraColumnNeeded, choiceValues); + const rows = createBodyRows(items, responseItems, extraColumnNeeded, choiceValues, system, resource); const header = createHeaderRow(choiceValues, extraColumnNeeded); if (displayToSortBy !== undefined && SortDirection) { @@ -160,7 +176,21 @@ export const getStandardTableObject = ( }; export const findFirstChoiceItem = (items: QuestionnaireItem[]): QuestionnaireItem | undefined => { - return items.find((item: QuestionnaireItem) => item.type === ItemType.CHOICE); + const findChoice = (item: QuestionnaireItem): QuestionnaireItem | undefined => { + if (item.type === ItemType.CHOICE || item.type === ItemType.OPENCHOICE) { + return item; + } + return item.item?.reduce((acc: QuestionnaireItem | undefined, currentItem: QuestionnaireItem) => { + return acc || findChoice(currentItem); + }, undefined); + }; + for (const item of items) { + const result = findChoice(item); + if (result !== undefined) { + return result; + } + } + return undefined; }; export const needsExtraColumn = (items: QuestionnaireItem[], responseItems: QuestionnaireResponse): boolean => { diff --git a/src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json b/src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json index 60b9db67..cd14cef5 100644 --- a/src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json +++ b/src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json @@ -1 +1,891 @@ -{"resourceType":"Questionnaire","language":"nb-NO","id":"89fad8fa-7193-4a80-a597-765c7c8a01ab","name":"NHN_Test_Table_SvaralternativerStyrer","title":"Table_SvaralternativerStyrer","version":"0.1","status":"draft","publisher":"NHN","meta":{"profile":["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"],"tag":[{"system":"urn:ietf:bcp:47","code":"nb-NO","display":"Bokmål"}],"security":[{"code":"3","display":"Helsehjelp (Full)","system":"urn:oid:2.16.578.1.12.4.1.1.7618"},{"code":"1","display":"Kun innbygger selv","system":"http://helsenorge.no/fhir/KanUtforesAv"}]},"useContext":[{"code":{"system":"http://hl7.org/fhir/ValueSet/usage-context-type","code":"focus","display":"Clinical Focus"},"valueCodeableConcept":{"coding":[{"system":"urn:oid:2.16.578.1.12.4.1.1.8655","display":"Table_SvaralternativerStyrer"}]}}],"contact":[{"name":"http://www.nhn.no"}],"subjectType":["Patient"],"extension":[{"url":"http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar","valueCoding":{"system":"http://helsenorge.no/fhir/ValueSet/sdf-sidebar","code":"1"}},{"url":"http://helsenorge.no/fhir/StructureDefinition/sdf-information-message","valueCoding":{"system":"http://helsenorge.no/fhir/ValueSet/sdf-information-message","code":"1"}},{"url":"http://ehelse.no/fhir/StructureDefinition/sdf-endpoint","valueReference":{"reference":"Endpoint/1"}},{"url":"http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility","valueCodeableConcept":{"coding":[{"system":"http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions","code":"hide-help","display":"Hide help texts"},{"system":"http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions","code":"hide-sublabel","display":"Hide sublabel texts"},{"system":"http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions","code":"hide-sidebar","display":"Hide sidebar texts"}]}},{"url":"http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf","valueBoolean":true}],"date":"2023-03-30T00:00:00+02:00","contained":[{"url":"http://ehelse.no/fhir/ValueSet/Predefined","resourceType":"ValueSet","id":"1102","version":"1.0","name":"urn:oid:1102","title":"Ja / Nei / Vet ikke (structor)","status":"draft","publisher":"Direktoratet for e-helse","compose":{"include":[{"system":"urn:oid:2.16.578.1.12.4.1.1102","concept":[{"code":"1","display":"Ja"},{"code":"2","display":"Nei"},{"code":"3","display":"Vet ikke"}]}]}},{"url":"http://ehelse.no/fhir/ValueSet/Predefined","resourceType":"ValueSet","id":"1101","version":"1.0","name":"urn:oid:1101","title":"Ja / Nei (structor)","status":"draft","publisher":"NHN","compose":{"include":[{"system":"urn:oid:2.16.578.1.12.4.1.1101","concept":[{"code":"1","display":"Ja"},{"code":"2","display":"Nei"}]}]}}],"item":[{"linkId":"82d5de9c-242d-4649-8c14-3ede137438b3","type":"group","text":"Data inn Table","required":false,"item":[{"linkId":"c01b4389-6597-4b81-95d9-f54f61ea2cb8","type":"choice","text":"Er du syk","required":false,"answerValueSet":"#1102","item":[{"linkId":"bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c","type":"choice","text":"Velg sykdom Denne er feil","required":false,"answerOption":[{"valueCoding":{"id":"8cdcaae1-19d0-4267-82a0-81cff288ea07","code":"1","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Hjerte"}},{"valueCoding":{"id":"810bbacf-80c2-46ec-8332-31b7ec95e00c","code":"2","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Lunge"}},{"valueCoding":{"id":"aa94ba53-57b5-4afa-8351-65b1d41d78c8","code":"3","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Mage"}}],"code":[{"code":"Full","display":"Full vising","system":"http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions","id":"615dddda-8c98-4ccd-ac63-adfe30f3ab70"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"check-box"}]}}]},{"linkId":"260f5f7c-ada3-49f3-8d50-166ee1ba4afa","type":"string","text":"Hva feiler det deg?","required":false,"enableWhen":[{"question":"c01b4389-6597-4b81-95d9-f54f61ea2cb8","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"2deae55a-f86a-4e41-8b42-8b1abfe5d538","type":"choice","text":"Er du veldig syk? Denne er feil","required":false,"answerValueSet":"#1101","enableWhen":[{"question":"c01b4389-6597-4b81-95d9-f54f61ea2cb8","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]}]},{"linkId":"04ccb620-ba66-4bed-d29a-08fb9e95c41f","type":"choice","text":"Er du uvel?","required":false,"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"check-box"}]}}],"item":[{"linkId":"7953faf6-55f4-406b-873b-ef167d7a1fbc","type":"time","text":"Når ble du uvel?","required":false,"enableWhen":[{"question":"04ccb620-ba66-4bed-d29a-08fb9e95c41f","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"638764d4-baea-46d1-9e81-d98ff1c56b4d","type":"string","text":"Hva følte du?","required":false,"enableWhen":[{"question":"04ccb620-ba66-4bed-d29a-08fb9e95c41f","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]}]},{"linkId":"2db8bc54-237f-411c-e3c6-448cef6ec29c","type":"choice","text":"Vet du hvilken dag og hva klokken er?","required":false,"answerValueSet":"#1102","item":[{"linkId":"29c5579a-cf2b-43b9-f55c-0d239ccaf02c","type":"date","text":"Dato","required":false,"enableWhen":[{"question":"2db8bc54-237f-411c-e3c6-448cef6ec29c","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"9acb4110-ea0a-48b4-985c-fdb2cf572de3","type":"time","text":"Klokken","required":false,"enableWhen":[{"question":"2db8bc54-237f-411c-e3c6-448cef6ec29c","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]}]},{"linkId":"015337fd-a035-45ab-8fd5-286a2a5be7a1","type":"choice","text":"Kan du notere ned data om deg?","required":false,"answerValueSet":"#1102","item":[{"linkId":"56800262-18bb-4d0f-8a08-ea22f5fc4e01","type":"quantity","text":"Vekt","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"kg","display":"kilo","system":"http://unitsofmeasure.org"}}],"required":false,"enableWhen":[{"question":"015337fd-a035-45ab-8fd5-286a2a5be7a1","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"e46b791e-7b83-47c7-8511-0e42751adc0a","type":"quantity","text":"Høyde","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"cm","display":"centimeter","system":"http://unitsofmeasure.org"}}],"required":false,"enableWhen":[{"question":"015337fd-a035-45ab-8fd5-286a2a5be7a1","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"f79dfabb-a788-445d-ba7a-a846b34e4b17","type":"integer","text":"Antall ganger du går på tur i løpet av uken","required":false,"enableWhen":[{"question":"015337fd-a035-45ab-8fd5-286a2a5be7a1","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]},{"linkId":"1246b383-dc6e-43d9-a68e-03213b255739","type":"boolean","text":"Er disse verdiene korrekte, hak av","required":false,"enableWhen":[{"question":"015337fd-a035-45ab-8fd5-286a2a5be7a1","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}}]}]},{"linkId":"38fd12b9-414c-4bce-b909-44aae9b762ac","type":"choice","text":"Likt kodeverk egendefinert","required":false,"answerOption":[{"valueCoding":{"id":"6ee199d1-2e0d-4599-821f-7d4b0b3808b4","code":"1","system":"urn:oid:2.16.578.1.12.4.1.1102","display":"Ja"}},{"valueCoding":{"id":"24224321-1c3e-46d5-835f-6d0edd04744e","code":"2","system":"urn:oid:2.16.578.1.12.4.1.1102","display":"Nei"}},{"valueCoding":{"id":"23396ebd-3e85-4913-ab3c-5b696dae5858","code":"3","system":"urn:oid:2.16.578.1.12.4.1.1102","display":"Vet ikke"}}]}]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"sidebar"}]}}],"linkId":"c5c27efb-76d7-4f1e-b7f9-cbe454846e8b","code":[{"system":"http://ehelse.no/fhir/ValueSet/SOTHeaders","code":"SOT-2","display":"SOT-2"}],"_text":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/rendering-markdown","valueMarkdown":"Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål."}]},"type":"text","required":false,"repeats":false,"readOnly":false},{"linkId":"f517041f-82d0-4680-b21a-c4462719a0aa","type":"group","text":"Oppsummering Table - Svaralternativer styrer","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"summary"},{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"summary-container"}]}}],"required":false,"code":[{"code":"1","display":"Default","system":"http://helsenorge.no/fhir/CodeSystem/RenderOptions","id":"160c445f-80c0-422e-e0c8-2b08354528bc"}],"item":[{"linkId":"44d1fa07-fe8c-4550-a497-bb1be9d92da7","type":"group","text":"Oppsummering ","required":false,"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"table"}]}}],"code":[{"code":"1","display":"Default","system":"http://helsenorge.no/fhir/CodeSystem/RenderOptions","id":"7aef743f-0d06-45dc-9155-6566c203a3b6"},{"system":"http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions","code":"DESC","display":"Descending"}],"item":[{"linkId":"046d08ef-d812-4693-8dba-f349bdfafb15","type":"group","text":"Gruppe 1","item":[{"linkId":"bab6ece9-d978-4601-9169-7dcf9c6e0007","type":"choice","text":"Er du syk","required":false,"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='c01b4389-6597-4b81-95d9-f54f61ea2cb8').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"c01b4389-6597-4b81-95d9-f54f61ea2cb8","operator":"exists"}],"_text":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/rendering-markdown","valueMarkdown":"Er du syk"}]},"code":[{"code":"Default","display":"Viser kun besvarte alternativer","system":"http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions","id":"6530d2e2-9654-4f1d-84a4-65cd3f12941c"}],"item":[{"linkId":"0b7b7b2d-9cec-40d7-e428-7cc0f34fe6f5","type":"choice","text":"Er du veldig syk?","required":false,"answerValueSet":"#1101","enableWhen":[{"answerBoolean":true,"question":"2deae55a-f86a-4e41-8b42-8b1abfe5d538","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='2deae55a-f86a-4e41-8b42-8b1abfe5d538').answer.value"}],"readOnly":true},{"linkId":"54338f3c-5922-4ff5-87d9-26477c966e7f","type":"string","text":"Hva feiler det deg?","required":false,"enableWhen":[{"question":"bab6ece9-d978-4601-9169-7dcf9c6e0007","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"260f5f7c-ada3-49f3-8d50-166ee1ba4afa","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='260f5f7c-ada3-49f3-8d50-166ee1ba4afa').answer.value"}],"readOnly":true},{"linkId":"be541d70-cc91-4254-8268-0baa7f1c76b9","type":"open-choice","text":"Velg sykdom","required":false,"enableWhen":[{"question":"c01b4389-6597-4b81-95d9-f54f61ea2cb8","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c","operator":"exists"}],"answerOption":[{"valueCoding":{"id":"8cdcaae1-19d0-4267-82a0-81cff288ea07","code":"hjerte","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Hjerte"}},{"valueCoding":{"id":"810bbacf-80c2-46ec-8332-31b7ec95e00c","code":"lunge-","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Lunge "}},{"valueCoding":{"id":"aa94ba53-57b5-4afa-8351-65b1d41d78c8","code":"mage","system":"urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45","display":"Mage"}}],"code":[{"code":"Full","display":"Full vising","system":"http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions","id":"615dddda-8c98-4ccd-ac63-adfe30f3ab70"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"check-box"},{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c').answer.value"}],"readOnly":true}]}],"required":false},{"linkId":"79c8d80e-325a-44a8-9fa2-adbe9ada594d","type":"group","text":"Gruppe 2","item":[{"linkId":"3528fa8b-c15c-4e8c-86dc-8380bd37ec3d","type":"choice","text":"Er du uvel?","required":false,"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"check-box"},{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='04ccb620-ba66-4bed-d29a-08fb9e95c41f').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"04ccb620-ba66-4bed-d29a-08fb9e95c41f","operator":"exists"}],"item":[{"linkId":"7178ee96-a482-4e76-8f22-c3f3b31c08cd","type":"time","text":"Når ble du uvel?","required":false,"enableWhen":[{"question":"3528fa8b-c15c-4e8c-86dc-8380bd37ec3d","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"7953faf6-55f4-406b-873b-ef167d7a1fbc","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='7953faf6-55f4-406b-873b-ef167d7a1fbc').answer.value"}],"readOnly":true},{"linkId":"7757a10f-e627-40ee-d105-170d07859c2f","type":"string","text":"Hva følte du?","required":false,"enableWhen":[{"question":"3528fa8b-c15c-4e8c-86dc-8380bd37ec3d","operator":"=","answerCoding":{"system":"urn:oid:2.16.578.1.12.4.1.1102","code":"1"}},{"answerBoolean":true,"question":"638764d4-baea-46d1-9e81-d98ff1c56b4d","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='638764d4-baea-46d1-9e81-d98ff1c56b4d').answer.value"}],"readOnly":true}]}],"required":false},{"linkId":"8fbf52cc-3bf3-4fa1-d1be-f2dff1bc0b24","type":"choice","text":"Vet du hvilken dag og hva klokken er?","required":false,"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='2db8bc54-237f-411c-e3c6-448cef6ec29c').answer.value"}],"readOnly":true,"enableWhen":[{"answerBoolean":true,"question":"2db8bc54-237f-411c-e3c6-448cef6ec29c","operator":"exists"}],"item":[{"linkId":"f49cf9ae-0ee5-4947-86b9-b2e82380f1ac","type":"date","text":"Dato","required":false,"enableWhen":[{"answerBoolean":true,"question":"29c5579a-cf2b-43b9-f55c-0d239ccaf02c","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='29c5579a-cf2b-43b9-f55c-0d239ccaf02c').answer.value"}],"readOnly":true},{"linkId":"8b86f173-d126-4c73-8c89-10ee9cc45535","type":"time","text":"Klokken","required":false,"enableWhen":[{"answerBoolean":true,"question":"9acb4110-ea0a-48b4-985c-fdb2cf572de3","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='9acb4110-ea0a-48b4-985c-fdb2cf572de3').answer.value"}],"readOnly":true}]},{"linkId":"1106fee1-475a-4018-f554-382985276782","type":"choice","text":"Kan du notere ned data om deg?","required":false,"enableWhen":[{"answerBoolean":true,"question":"015337fd-a035-45ab-8fd5-286a2a5be7a1","operator":"exists"}],"answerValueSet":"#1102","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='015337fd-a035-45ab-8fd5-286a2a5be7a1').answer.value"}],"readOnly":true,"item":[{"linkId":"5b935dbb-9041-480e-88e6-ef76ec1fb102","type":"quantity","text":"Vekt","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"kg","display":"kilo","system":"http://unitsofmeasure.org"}},{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='56800262-18bb-4d0f-8a08-ea22f5fc4e01').answer.value"}],"required":false,"enableWhen":[{"answerBoolean":true,"question":"56800262-18bb-4d0f-8a08-ea22f5fc4e01","operator":"exists"}],"readOnly":true},{"linkId":"657c9c87-b5f9-4b0b-8fad-91ab8697f039","type":"quantity","text":"Høyde","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-unit","valueCoding":{"code":"cm","display":"centimeter","system":"http://unitsofmeasure.org"}},{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='e46b791e-7b83-47c7-8511-0e42751adc0a').answer.value"}],"required":false,"enableWhen":[{"answerBoolean":true,"question":"e46b791e-7b83-47c7-8511-0e42751adc0a","operator":"exists"}],"readOnly":true},{"linkId":"c2be52a9-f7d6-4ea1-bdcf-8c5192ed25a5","type":"integer","text":"Antall ganger du går på tur i løpet av uken","required":false,"enableWhen":[{"answerBoolean":true,"question":"f79dfabb-a788-445d-ba7a-a846b34e4b17","operator":"exists"}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='f79dfabb-a788-445d-ba7a-a846b34e4b17').answer.value"}],"readOnly":true},{"linkId":"53847e9d-4cd4-4a92-8a8f-9c4fcd168e81","type":"boolean","text":"Er disse verdiene korrekte, hak av","required":false,"enableWhen":[{"answerBoolean":true,"question":"1246b383-dc6e-43d9-a68e-03213b255739","operator":"="}],"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"data-receiver"}]}},{"url":"http://hl7.org/fhir/StructureDefinition/cqf-expression","valueString":"QuestionnaireResponse.descendants().where(linkId='1246b383-dc6e-43d9-a68e-03213b255739').answer.value"}],"readOnly":true}]}]}]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl","valueCodeableConcept":{"coding":[{"system":"http://hl7.org/fhir/ValueSet/questionnaire-item-control","code":"sidebar"}]}}],"linkId":"cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0","code":[{"system":"http://ehelse.no/fhir/ValueSet/SOTHeaders","code":"SOT-3","display":"SOT-3"}],"_text":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/rendering-markdown","valueMarkdown":"Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)"}]},"type":"text","required":false,"repeats":false,"readOnly":false}]} \ No newline at end of file +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "89fad8fa-7193-4a80-a597-765c7c8a01ab", + "name": "NHN_Test_Table_SvaralternativerStyrer", + "title": "Table_SvaralternativerStyrer", + "version": "0.1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], + "security": [ + { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, + { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } + ] + }, + "useContext": [ + { + "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "valueCodeableConcept": { "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Table_SvaralternativerStyrer" }] } + } + ], + "contact": [{ "name": "http://www.nhn.no" }], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1102", + "version": "1.0", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", + "status": "draft", + "publisher": "Direktoratet for e-helse", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" }, + { "code": "3", "display": "Vet ikke" } + ] + } + ] + } + }, + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1101", + "version": "1.0", + "name": "urn:oid:1101", + "title": "Ja / Nei (structor)", + "status": "draft", + "publisher": "NHN", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1101", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "82d5de9c-242d-4649-8c14-3ede137438b3", + "type": "group", + "text": "Data inn Table", + "required": false, + "item": [ + { + "linkId": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "type": "choice", + "text": "Er du syk", + "required": false, + "answerValueSet": "#1102", + "item": [ + { + "linkId": "bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c", + "type": "choice", + "text": "Velg sykdom Denne er feil", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "8cdcaae1-19d0-4267-82a0-81cff288ea07", + "code": "1", + "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", + "display": "Hjerte" + } + }, + { + "valueCoding": { + "id": "810bbacf-80c2-46ec-8332-31b7ec95e00c", + "code": "2", + "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", + "display": "Lunge" + } + }, + { + "valueCoding": { + "id": "aa94ba53-57b5-4afa-8351-65b1d41d78c8", + "code": "3", + "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", + "display": "Mage" + } + } + ], + "code": [ + { + "code": "Full", + "display": "Full vising", + "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", + "id": "615dddda-8c98-4ccd-ac63-adfe30f3ab70" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ] + }, + { + "linkId": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", + "type": "string", + "text": "Hva feiler det deg?", + "required": false, + "enableWhen": [ + { + "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "2deae55a-f86a-4e41-8b42-8b1abfe5d538", + "type": "choice", + "text": "Er du veldig syk? Denne er feil", + "required": false, + "answerValueSet": "#1101", + "enableWhen": [ + { + "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + }, + { + "linkId": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "type": "choice", + "text": "Er du uvel?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] + } + } + ], + "item": [ + { + "linkId": "7953faf6-55f4-406b-873b-ef167d7a1fbc", + "type": "time", + "text": "Når ble du uvel?", + "required": false, + "enableWhen": [ + { + "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "638764d4-baea-46d1-9e81-d98ff1c56b4d", + "type": "string", + "text": "Hva følte du?", + "required": false, + "enableWhen": [ + { + "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + }, + { + "linkId": "2db8bc54-237f-411c-e3c6-448cef6ec29c", + "type": "choice", + "text": "Vet du hvilken dag og hva klokken er?", + "required": false, + "answerValueSet": "#1102", + "item": [ + { + "linkId": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", + "type": "date", + "text": "Dato", + "required": false, + "enableWhen": [ + { + "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", + "type": "time", + "text": "Klokken", + "required": false, + "enableWhen": [ + { + "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + }, + { + "linkId": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "type": "choice", + "text": "Kan du notere ned data om deg?", + "required": false, + "answerValueSet": "#1102", + "item": [ + { + "linkId": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", + "type": "quantity", + "text": "Vekt", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + } + ], + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "e46b791e-7b83-47c7-8511-0e42751adc0a", + "type": "quantity", + "text": "Høyde", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + } + ], + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "f79dfabb-a788-445d-ba7a-a846b34e4b17", + "type": "integer", + "text": "Antall ganger du går på tur i løpet av uken", + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + }, + { + "linkId": "1246b383-dc6e-43d9-a68e-03213b255739", + "type": "boolean", + "text": "Er disse verdiene korrekte, hak av", + "required": false, + "enableWhen": [ + { + "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + } + ] + } + ] + }, + { + "linkId": "38fd12b9-414c-4bce-b909-44aae9b762ac", + "type": "choice", + "text": "Likt kodeverk egendefinert", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "6ee199d1-2e0d-4599-821f-7d4b0b3808b4", + "code": "1", + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "display": "Ja" + } + }, + { + "valueCoding": { + "id": "24224321-1c3e-46d5-835f-6d0edd04744e", + "code": "2", + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "display": "Nei" + } + }, + { + "valueCoding": { + "id": "23396ebd-3e85-4913-ab3c-5b696dae5858", + "code": "3", + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "display": "Vet ikke" + } + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", + "type": "group", + "text": "Oppsummering Table - Svaralternativer styrer", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } + ] + } + } + ], + "required": false, + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "160c445f-80c0-422e-e0c8-2b08354528bc" + } + ], + "item": [ + { + "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", + "type": "group", + "text": "Oppsummering ", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table" }] + } + } + ], + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "7aef743f-0d06-45dc-9155-6566c203a3b6" + }, + { "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", "code": "DESC", "display": "Descending" } + ], + "item": [ + { + "linkId": "046d08ef-d812-4693-8dba-f349bdfafb15", + "type": "group", + "text": "Gruppe 1", + "item": [ + { + "linkId": "bab6ece9-d978-4601-9169-7dcf9c6e0007", + "type": "choice", + "text": "Er du syk", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='c01b4389-6597-4b81-95d9-f54f61ea2cb8').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", "operator": "exists" }], + "_text": { + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", "valueMarkdown": "Er du syk" }] + }, + "code": [ + { + "code": "Default", + "display": "Viser kun besvarte alternativer", + "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", + "id": "6530d2e2-9654-4f1d-84a4-65cd3f12941c" + } + ], + "item": [ + { + "linkId": "0b7b7b2d-9cec-40d7-e428-7cc0f34fe6f5", + "type": "choice", + "text": "Er du veldig syk?", + "required": false, + "answerValueSet": "#1101", + "enableWhen": [{ "answerBoolean": true, "question": "2deae55a-f86a-4e41-8b42-8b1abfe5d538", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='2deae55a-f86a-4e41-8b42-8b1abfe5d538').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "54338f3c-5922-4ff5-87d9-26477c966e7f", + "type": "string", + "text": "Hva feiler det deg?", + "required": false, + "enableWhen": [ + { + "question": "bab6ece9-d978-4601-9169-7dcf9c6e0007", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='260f5f7c-ada3-49f3-8d50-166ee1ba4afa').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "be541d70-cc91-4254-8268-0baa7f1c76b9", + "type": "open-choice", + "text": "Velg sykdom", + "required": false, + "enableWhen": [ + { + "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c", "operator": "exists" } + ], + "answerOption": [ + { + "valueCoding": { + "id": "8cdcaae1-19d0-4267-82a0-81cff288ea07", + "code": "hjerte", + "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", + "display": "Hjerte" + } + }, + { + "valueCoding": { + "id": "810bbacf-80c2-46ec-8332-31b7ec95e00c", + "code": "lunge-", + "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", + "display": "Lunge " + } + }, + { + "valueCoding": { + "id": "aa94ba53-57b5-4afa-8351-65b1d41d78c8", + "code": "mage", + "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", + "display": "Mage" + } + } + ], + "code": [ + { + "code": "Full", + "display": "Full vising", + "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", + "id": "615dddda-8c98-4ccd-ac63-adfe30f3ab70" + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c').answer.value" + } + ], + "readOnly": true + } + ] + } + ], + "required": false + }, + { + "linkId": "79c8d80e-325a-44a8-9fa2-adbe9ada594d", + "type": "group", + "text": "Gruppe 2", + "item": [ + { + "linkId": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "type": "choice", + "text": "Er du uvel?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='04ccb620-ba66-4bed-d29a-08fb9e95c41f').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", "operator": "exists" }], + "item": [ + { + "linkId": "7178ee96-a482-4e76-8f22-c3f3b31c08cd", + "type": "time", + "text": "Når ble du uvel?", + "required": false, + "enableWhen": [ + { + "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "7953faf6-55f4-406b-873b-ef167d7a1fbc", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='7953faf6-55f4-406b-873b-ef167d7a1fbc').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "7757a10f-e627-40ee-d105-170d07859c2f", + "type": "string", + "text": "Hva følte du?", + "required": false, + "enableWhen": [ + { + "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } + }, + { "answerBoolean": true, "question": "638764d4-baea-46d1-9e81-d98ff1c56b4d", "operator": "exists" } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='638764d4-baea-46d1-9e81-d98ff1c56b4d').answer.value" + } + ], + "readOnly": true + } + ] + } + ], + "required": false + }, + { + "linkId": "8fbf52cc-3bf3-4fa1-d1be-f2dff1bc0b24", + "type": "choice", + "text": "Vet du hvilken dag og hva klokken er?", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='2db8bc54-237f-411c-e3c6-448cef6ec29c').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", "operator": "exists" }], + "item": [ + { + "linkId": "f49cf9ae-0ee5-4947-86b9-b2e82380f1ac", + "type": "date", + "text": "Dato", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='29c5579a-cf2b-43b9-f55c-0d239ccaf02c').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "8b86f173-d126-4c73-8c89-10ee9cc45535", + "type": "time", + "text": "Klokken", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='9acb4110-ea0a-48b4-985c-fdb2cf572de3').answer.value" + } + ], + "readOnly": true + } + ] + }, + { + "linkId": "1106fee1-475a-4018-f554-382985276782", + "type": "choice", + "text": "Kan du notere ned data om deg?", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "operator": "exists" }], + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='015337fd-a035-45ab-8fd5-286a2a5be7a1').answer.value" + } + ], + "readOnly": true, + "item": [ + { + "linkId": "5b935dbb-9041-480e-88e6-ef76ec1fb102", + "type": "quantity", + "text": "Vekt", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='56800262-18bb-4d0f-8a08-ea22f5fc4e01').answer.value" + } + ], + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", "operator": "exists" }], + "readOnly": true + }, + { + "linkId": "657c9c87-b5f9-4b0b-8fad-91ab8697f039", + "type": "quantity", + "text": "Høyde", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='e46b791e-7b83-47c7-8511-0e42751adc0a').answer.value" + } + ], + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "e46b791e-7b83-47c7-8511-0e42751adc0a", "operator": "exists" }], + "readOnly": true + }, + { + "linkId": "c2be52a9-f7d6-4ea1-bdcf-8c5192ed25a5", + "type": "integer", + "text": "Antall ganger du går på tur i løpet av uken", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "f79dfabb-a788-445d-ba7a-a846b34e4b17", "operator": "exists" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='f79dfabb-a788-445d-ba7a-a846b34e4b17').answer.value" + } + ], + "readOnly": true + }, + { + "linkId": "53847e9d-4cd4-4a92-8a8f-9c4fcd168e81", + "type": "boolean", + "text": "Er disse verdiene korrekte, hak av", + "required": false, + "enableWhen": [{ "answerBoolean": true, "question": "1246b383-dc6e-43d9-a68e-03213b255739", "operator": "=" }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='1246b383-dc6e-43d9-a68e-03213b255739').answer.value" + } + ], + "readOnly": true + } + ] + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + } + ] +} diff --git a/src/util/choice.ts b/src/util/choice.ts index 4a11f8ce..a1436893 100644 --- a/src/util/choice.ts +++ b/src/util/choice.ts @@ -79,6 +79,22 @@ export function getSystem(item: QuestionnaireItem, code: string, containedResour return undefined; } +export function getSystemForItem(item: QuestionnaireItem, containedResources?: Resource[]): string | undefined { + if (item.answerValueSet && item.answerValueSet.startsWith('#')) { + const id: string = item.answerValueSet.replace('#', ''); + const resource = getContainedResource(id, containedResources); + console.log(resource); + + if (resource && resource.compose) { + return resource.compose.include[0].system; + } + } else if (item.answerOption) { + const foundOption = item.answerOption.find(option => option.valueCoding?.system); + return foundOption?.valueCoding?.system; + } + return undefined; +} + export function getDisplay(options: Array | undefined, value: string | undefined): string | undefined { if (!options || options.length === 0) { return undefined; From c2dacd190e01aff57d78757798bf0f9b5afa137b Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Mon, 12 Feb 2024 13:16:12 +0100 Subject: [PATCH 70/83] fix tests --- .../gtable/__tests__/gtable-utils-spec.ts | 8 ++-- .../__tests__/standartable-utils-spec.ts | 43 +++++++++++++------ .../table/tables/table/utils.ts | 2 +- src/util/choice.ts | 1 - 4 files changed, 36 insertions(+), 18 deletions(-) diff --git a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts index e7c6055d..c5545bab 100644 --- a/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts +++ b/src/components/formcomponents/table/tables/gtable/__tests__/gtable-utils-spec.ts @@ -125,8 +125,8 @@ describe('gtable-utils-spec', () => { ]; const columns = columnsForRowIndex(answerItems, 0); expect(columns).toEqual([ - { id: 'default-question-linkId', index: 0, value: 'Answer 1' }, - { id: 'default-question-linkId', index: 1, value: 'Another Answer 1' }, + { id: 'default-question-linkId', index: 0, value: 'Answer 1', type: ItemType.TEXT }, + { id: 'default-question-linkId', index: 1, value: 'Another Answer 1', type: ItemType.TEXT }, ]); }); @@ -137,8 +137,8 @@ describe('gtable-utils-spec', () => { ]; const columns = columnsForRowIndex(answerItems, 1); expect(columns).toEqual([ - { id: 'default-question-linkId', index: 0, value: '' }, - { id: 'default-question-linkId', index: 1, value: '' }, + { id: 'default-question-linkId', index: 0, value: '', type: ItemType.TEXT }, + { id: 'default-question-linkId', index: 1, value: '', type: ItemType.TEXT }, ]); }); diff --git a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts index 86da3b71..fa59ef5e 100644 --- a/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts +++ b/src/components/formcomponents/table/tables/table/__tests__/standartable-utils-spec.ts @@ -12,12 +12,12 @@ import { getStandardTableObject, needsExtraColumn, } from '../utils'; -import { QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem, Resource } from '../../../../../../types/fhir'; import * as choiceUtils from '../../../../../../util/choice'; import * as tableUtils from '../../utils'; import { QuestionnaireItemWithAnswers } from '../../interface'; +import { QuestionnaireResponseItem, QuestionnaireItem, QuestionnaireResponse, Resource } from 'fhir/r4'; jest.mock('../../utils'); jest.mock('../../../../../../util/choice'); @@ -264,25 +264,44 @@ describe('createBodyRows', () => { }); describe('createRowsFromAnswersCodes', () => { + beforeEach(() => { + jest.spyOn(choiceUtils, 'getSystemForItem'); + }); + afterEach(() => { + jest.restoreAllMocks(); + }); it('should create rows from the given response item and choice values', () => { - const item: QuestionnaireResponseItem = { + (choiceUtils.getSystemForItem as jest.Mock).mockImplementation(() => { + return 'sys'; + }); + const item: QuestionnaireItemWithAnswers = { linkId: '1', + type: ItemType.CHOICE, answer: [{ valueCoding: { code: '1' } }], }; + const choiceValues: Options[] = [ { type: '1', label: 'Option A' }, { type: '2', label: 'Option B' }, ]; - const rows = createRowsFromAnswersCodes(item, choiceValues); + const rows = createRowsFromAnswersCodes(item, choiceValues, 'sys', []); expect(rows).toEqual([ - { id: '1-1', index: 1, value: 'X' }, - { id: '2-2', index: 2, value: '' }, + { id: '1-1', index: 1, value: 'X', type: ItemType.CHOICE }, + { id: '2-2', index: 2, value: '', type: ItemType.CHOICE }, ]); }); it('should return an empty array if no choice values are provided', () => { - const item: QuestionnaireResponseItem = { + const item: QuestionnaireItemWithAnswers = { linkId: '1', + type: ItemType.CHOICE, + answerOption: [ + { + valueCoding: { + system: 'sys', + }, + }, + ], answer: [{ valueCoding: { code: '1' } }], }; const rows = createRowsFromAnswersCodes(item); @@ -324,10 +343,10 @@ describe('createColumnsFromAnswers', () => { ]; const columns = createColumnsFromAnswers(item, choiceValues); expect(columns).toEqual([ - { value: 'Question 1', index: 0, id: '1-question' }, - { value: '', index: 1, id: '1-1' }, - { value: '', index: 2, id: '2-2' }, - { value: '', index: 3, id: '1-answer' }, + { value: 'Question 1', index: 0, id: '1-question', type: ItemType.CHOICE }, + { value: '', index: 1, id: '1-1', type: ItemType.CHOICE }, + { value: '', index: 2, id: '2-2', type: ItemType.CHOICE }, + { value: '', index: 3, id: '1-answer', type: ItemType.CHOICE }, ]); }); @@ -354,8 +373,8 @@ describe('createColumnsFromAnswers', () => { }; const columns = createColumnsFromAnswers(item); expect(columns).toEqual([ - { value: 'Question 1', index: 0, id: '1-question' }, - { value: '', index: 1, id: '1-answer' }, + { value: 'Question 1', index: 0, id: '1-question', type: ItemType.CHOICE }, + { value: '', index: 1, id: '1-answer', type: ItemType.CHOICE }, ]); }); }); diff --git a/src/components/formcomponents/table/tables/table/utils.ts b/src/components/formcomponents/table/tables/table/utils.ts index 8a280c15..273a45cc 100644 --- a/src/components/formcomponents/table/tables/table/utils.ts +++ b/src/components/formcomponents/table/tables/table/utils.ts @@ -7,7 +7,7 @@ import { Options } from '@helsenorge/form/components/radio-group'; import { IStandardTable, IStandardTableColumn, IStandardTableRow } from './interface'; import codeSystems from '../../../../../constants/codingsystems'; import ItemType, { IItemType } from '../../../../../constants/itemType'; -import { getContainedOptions, getOptions, getSystemForItem } from '../../../../../util/choice'; +import { getContainedOptions, getSystemForItem } from '../../../../../util/choice'; import { QuestionnaireItemWithAnswers } from '../interface'; import { getDisplayFromCodingSystem, diff --git a/src/util/choice.ts b/src/util/choice.ts index a1436893..9019ddf7 100644 --- a/src/util/choice.ts +++ b/src/util/choice.ts @@ -83,7 +83,6 @@ export function getSystemForItem(item: QuestionnaireItem, containedResources?: R if (item.answerValueSet && item.answerValueSet.startsWith('#')) { const id: string = item.answerValueSet.replace('#', ''); const resource = getContainedResource(id, containedResources); - console.log(resource); if (resource && resource.compose) { return resource.compose.include[0].system; From f60e56cf0a81cc158c7122736192f56a03c6aa61 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 13 Feb 2024 09:09:04 +0100 Subject: [PATCH 71/83] bump-version --- CHANGES | 6 ++++++ package-lock.json | 8 -------- package.json | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index cf454325..c4a34fa8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 14.1.0-beta01 + +--- + +- fixed the sorting for tables and also changed logic for standardtable + ## 14.0.7 --- diff --git a/package-lock.json b/package-lock.json index 6ba5e6f5..e0322217 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,12 @@ { "name": "@helsenorge/refero", -<<<<<<< HEAD - "version": "14.0.4", -======= "version": "14.0.7", ->>>>>>> origin/master "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@helsenorge/refero", -<<<<<<< HEAD - "version": "14.0.4", -======= "version": "14.0.7", ->>>>>>> origin/master "license": "MIT", "dependencies": { "@types/react-collapse": "^5.0.1", diff --git a/package.json b/package.json index a62b6404..a0723d20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "14.0.7", + "version": "14.1.0-beta01", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From f2b3f9e624e249de039a0c55cd0c596488d68b90 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:37:36 +0100 Subject: [PATCH 72/83] fix calculated values in tables --- .../formcomponents/table/TableContainer.tsx | 6 +- .../formcomponents/table/tables/utils.ts | 25 +- src/components/index.tsx | 4 +- src/preview/FormFillerPreview.tsx | 2 +- ...pplysingerExtractTextOutput-nb-NO (3).json | 640 ++++++++++++++++++ src/util/fhirpathHelper.ts | 2 +- 6 files changed, 669 insertions(+), 10 deletions(-) create mode 100644 src/preview/skjema/NHNHelseopplysingerExtractTextOutput-nb-NO (3).json diff --git a/src/components/formcomponents/table/TableContainer.tsx b/src/components/formcomponents/table/TableContainer.tsx index 1d4beb53..b8735724 100644 --- a/src/components/formcomponents/table/TableContainer.tsx +++ b/src/components/formcomponents/table/TableContainer.tsx @@ -74,6 +74,7 @@ const TableContainer = ({ <>

{headline}

+
); case TableCodes.tableHn2: @@ -81,6 +82,7 @@ const TableContainer = ({ <>

{headline}

+
); case TableCodes.gtable: @@ -88,6 +90,7 @@ const TableContainer = ({ <>

{headline}

+
); case TableCodes.table: @@ -100,10 +103,11 @@ const TableContainer = ({ resource={resource} tableCodesCoding={tableCodesCoding} /> +
); default: - return
; + return <>; } } }; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index d1e0992c..41ed960b 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -25,7 +25,13 @@ import ItemType, { IItemType } from '../../../../constants/itemType'; import { getQuestionnaireItemCodeValue } from '../../../../util/codingsystem'; import { getCalculatedExpressionExtension, getCopyExtension } from '../../../../util/extension'; import { evaluateFhirpathExpressionToGetString } from '../../../../util/fhirpathHelper'; -import { Path, enableWhenMatchesAnswer, getQuestionnaireResponseItemsWithLinkId, isInGroupContext } from '../../../../util/refero-core'; +import { + Path, + enableWhenMatchesAnswer, + getQuestionnaireResponseItemsWithLinkId, + getResponseItemAndPathWithLinkId, + isInGroupContext, +} from '../../../../util/refero-core'; function extractValueFromCoding(coding: Coding | undefined, field: keyof Pick = 'display'): string { if (!coding) return ''; @@ -190,16 +196,24 @@ export const getValueIfDataReceiver = ( item: QuestionnaireItem, questionnaireResponse?: QuestionnaireResponse | null ): QuestionnaireResponseItemAnswer | QuestionnaireResponseItemAnswer[] | undefined => { - const extension = getCopyExtension(item); - - if (extension) { - let result = evaluateFhirpathExpressionToGetString(extension, questionnaireResponse); + const copyExtension = getCopyExtension(item); + const calculatedExpressionExtension = getCalculatedExpressionExtension(item); + if (calculatedExpressionExtension) { + if (questionnaireResponse) { + const res = getResponseItemAndPathWithLinkId(item.linkId, questionnaireResponse, []); + return res[0].item.answer; + } + return undefined; + } + if (copyExtension) { + let result = evaluateFhirpathExpressionToGetString(copyExtension, questionnaireResponse); if (!!getCalculatedExpressionExtension(item)) { result = result.map((m: { value: number }) => { return m.value; }); } + return getQuestionnaireResponseItemAnswer(item.type as Exclude, result); } return undefined; @@ -297,6 +311,7 @@ export const addAnswerToItems = ( } const processItem = (item: QuestionnaireItem): QuestionnaireItemWithAnswers => { const res = getValueIfDataReceiver(item, questionnaireResponse); + const clonedItems = structuredClone(item); const questionnaireResponseItem: QuestionnaireItemWithAnswers = { ...clonedItems, diff --git a/src/components/index.tsx b/src/components/index.tsx index 40b22e5f..093fbb62 100644 --- a/src/components/index.tsx +++ b/src/components/index.tsx @@ -155,12 +155,12 @@ class Refero extends React.Component", + "answerQuantity": { "value": 39.9, "system": "http://unitsofmeasure.org", "code": "BMI" } + } + ], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "**Du har fedme - grad 3**\n\nDu har høy risiko for flere helseproblemer, økt dødelighet og ytterligere økt helserisiko.\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" + } + ] + } + }, + { + "linkId": "7de10210-1258-46df-80eb-2be4480297c3", + "type": "display", + "text": "Du har fedme - grad 2 Du har høy risiko for flere helseproblemer, og økt dødelighet. En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", + "required": false, + "enableWhen": [ + { + "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", + "operator": ">", + "answerQuantity": { "value": 34.9, "system": "http://unitsofmeasure.org", "code": "BMI" } + }, + { + "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", + "operator": "<", + "answerQuantity": { "value": 40, "system": "http://unitsofmeasure.org", "code": "BMI" } + } + ], + "enableBehavior": "all", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "**Du har fedme - grad 2**\n\nDu har høy risiko for flere helseproblemer, og økt dødelighet.\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" + } + ] + } + }, + { + "linkId": "9b48c816-14be-48bc-826f-31702406553d", + "type": "display", + "text": "Du har fedme - grad 1 Du har økt for diabetes og økt dødelighet En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", + "required": false, + "enableWhen": [ + { + "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", + "operator": ">", + "answerQuantity": { "value": 29.9, "system": "http://unitsofmeasure.org", "code": "BMI" } + }, + { + "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", + "operator": "<", + "answerQuantity": { "value": 35, "system": "http://unitsofmeasure.org", "code": "BMI" } + } + ], + "enableBehavior": "all", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "**Du har fedme - grad 1**\n\nDu har økt for diabetes og økt dødelighet\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" + } + ] + } + }, + { + "linkId": "9a7eece3-1542-4d30-918c-aac4177692b9", + "type": "display", + "text": "Du er overvektig Du har økt risiko for diabetes En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", + "required": false, + "enableWhen": [ + { + "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", + "operator": "<", + "answerQuantity": { "value": 30, "system": "http://unitsofmeasure.org", "code": "BMI" } + }, + { + "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", + "operator": ">", + "answerQuantity": { "value": 24.9, "system": "http://unitsofmeasure.org", "code": "BMI" } + } + ], + "enableBehavior": "all", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "**Du er overvektig**\n\nDu har økt risiko for diabetes\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" + } + ] + } + }, + { + "linkId": "eb21a606-f887-463b-8e93-b6f401c58c78", + "type": "display", + "text": "Du har normalvektig En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", + "required": false, + "enableWhen": [ + { + "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", + "operator": ">", + "answerQuantity": { "value": 18.4, "system": "http://unitsofmeasure.org", "code": "BMI" } + }, + { + "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", + "operator": "<", + "answerQuantity": { "value": 25, "system": "http://unitsofmeasure.org", "code": "BMI" } + } + ], + "enableBehavior": "all", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "**Du har normalvektig**\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" + } + ] + } + } + ] + } + ] + }, + { + "linkId": "51c081da-0fd5-4cea-a90c-f6aa81a406d0", + "type": "display", + "text": "Du er undervektig. Du har lav risiko for diabetes, økt risiko for andre helseproblemer. En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", + "required": false, + "enableWhen": [ + { + "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", + "operator": "<", + "answerQuantity": { "value": 18.4, "system": "http://unitsofmeasure.org", "code": "BMI" } + } + ], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "**Du er undervektig.**\n\nDu har lav risiko for diabetes, økt risiko for andre helseproblemer.\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" + } + ] + } + }, + { + "linkId": "e78c5d17-6f04-4f4e-c376-09e6a874ed8b", + "type": "group", + "text": "Oppsummering", + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "16b354ef-6bd7-4724-8f2c-2cae678c654c" + } + ], + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn1" }] + } + } + ], + "item": [ + { + "linkId": "3aff8315-8bd0-4e24-8d81-f7f34b83c68c", + "type": "display", + "required": false, + "text": "Pasienten er en kvinne", + "enableWhen": [{ "question": "05eeb76d-9f28-4baa-a3b7-a94f9a1d4ee6", "operator": "=", "answerString": "Kvinne" }] + }, + { + "linkId": "077e6da2-a354-4192-829b-57d2f379b909", + "type": "display", + "text": "Pasienten er en mann", + "required": false, + "enableWhen": [{ "question": "05eeb76d-9f28-4baa-a3b7-a94f9a1d4ee6", "operator": "=", "answerString": "Mann" }] + }, + { + "linkId": "c156d21f-d2b3-4f5d-ca7e-0c0b8f7109b8", + "type": "string", + "text": "Pasienten har følgende alder: ", + "code": [ + { + "code": "1", + "display": "Default", + "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", + "id": "bad36938-1f23-41a2-887e-83bdf094ad92" + } + ], + "required": false, + "extension": [ + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-fhirpath", + "valueString": "Patient.extension.where(url = 'http://helsenorge.no/fhir/StructureDefinition/sdf-age').value" + }, + { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-guidanceparameter", "valueString": "alder" } + ], + "readOnly": true + }, + { + "linkId": "eb0c9151-acb9-47a6-e7eb-4f605bea45ad", + "type": "quantity", + "text": "Pasienten har en kroppsmasseindeks. Med re-kalkulasjon fra felter over. Virker uten tabell", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "BMI", "display": "KMI", "system": "http://unitsofmeasure.org" } + }, + { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='Vekt').answer.value.value / ((QuestionnaireResponse.descendants().where(linkId='Hoyde').answer.value.value/10000) * QuestionnaireResponse.descendants().where(linkId='Hoyde').answer.value.value)" + } + ], + "required": false, + "readOnly": true + }, + { + "linkId": "092af6eb-3680-438e-8f68-44fd402603b5", + "type": "quantity", + "text": "Pasienten har en kroppsmasseindeks UTEN kalkulasjon MED kopiering av data. Har fjernet det matematiske uttrykket manuelt- ", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "BMI", "display": "KMI", "system": "http://unitsofmeasure.org" } + }, + { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='6f7c076a-9324-4bf7-8ef0-6424b1bb999e').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", "operator": "exists" }] + }, + { + "linkId": "90b681c2-0064-47e5-8799-e9775b4b51e3", + "type": "choice", + "text": "Pasienten oppgir å ha følgende sykdommer:", + "required": false, + "answerOption": [ + { + "valueCoding": { + "id": "cd610686-7405-44d0-9e03-625856bf573d", + "code": "hjertesykdom", + "system": "urn:uuid:ba095104-a956-4ffe-b5e6-b855f33cd87d", + "display": "Hjertesykdom" + } + }, + { + "valueCoding": { + "id": "43ec43e0-49de-4858-89d5-8d21c5be8ab0", + "code": "lungesykdom", + "system": "urn:uuid:ba095104-a956-4ffe-b5e6-b855f33cd87d", + "display": "Lungesykdom" + } + }, + { + "valueCoding": { + "id": "7ceef4d4-ecca-408a-8987-1f30864388b2", + "code": "mage-tarm-sykdom", + "system": "urn:uuid:ba095104-a956-4ffe-b5e6-b855f33cd87d", + "display": "Mage-tarm sykdom" + } + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, + { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='7987d763-6556-4f2c-d305-09c52b37a829').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "7987d763-6556-4f2c-d305-09c52b37a829", "operator": "exists" }] + }, + { + "linkId": "8de0f72e-ab72-4d19-918b-fd41d8fb78c0", + "type": "display", + "text": "Pasienten har eneansvar for barn under 18 år eller andre med spesielle omsorgsbehov", + "required": false, + "enableWhen": [ + { + "question": "a50dbc6e-4bc1-4e0c-b4f8-0dbb13c6407e", + "operator": "=", + "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1101", "code": "1" } + } + ] + } + ] + } + ] +} diff --git a/src/util/fhirpathHelper.ts b/src/util/fhirpathHelper.ts index eebc3314..b3fa3154 100644 --- a/src/util/fhirpathHelper.ts +++ b/src/util/fhirpathHelper.ts @@ -25,7 +25,7 @@ export function evaluateFhirpathExpressionToGetString(fhirExtension: Extension, } } -export function evaluateExtension(path: string | object, questionnare?: QuestionnaireResponse | null, context?: 'object'): unknown { +export function evaluateExtension(path: string | object, questionnare?: QuestionnaireResponse | null, context?: 'object' | null): unknown { const qCopy = structuredClone(questionnare); /** * Evaluates the "path" FHIRPath expression on the given resource or part of the resource, From 6dcfa16c5d010292bb973015422af9801bbd7e45 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:47:04 +0100 Subject: [PATCH 73/83] release version --- CHANGES | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index c4a34fa8..e95da572 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 14.1.0-beta02 + +--- + +- Bugfix: fix calculated scoring fields being showed in tables, also added a linebreak after each table + ## 14.1.0-beta01 --- diff --git a/package.json b/package.json index a0723d20..68a684bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "14.1.0-beta01", + "version": "14.1.0-beta02", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From a8aa660a527e5ebc9ae3225a733d68a8385f95d3 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Thu, 15 Feb 2024 10:27:29 +0100 Subject: [PATCH 74/83] added undefined checks for sorting on gtable --- package-lock.json | 4 +- .../table/tables/gtable/utils.ts | 7 +- .../formcomponents/table/tables/utils.ts | 7 +- src/preview/FormFillerPreview.tsx | 2 +- ...est_Repeterende_gtable-nb-NO-v0.1 (9).json | 601 ++++++++++++++++++ 5 files changed, 615 insertions(+), 6 deletions(-) create mode 100644 src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json diff --git a/package-lock.json b/package-lock.json index e0322217..c0dcc064 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@helsenorge/refero", - "version": "14.0.7", + "version": "14.1.0-beta02", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@helsenorge/refero", - "version": "14.0.7", + "version": "14.1.0-beta02", "license": "MIT", "dependencies": { "@types/react-collapse": "^5.0.1", diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index 09fe65f6..f04c491d 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -104,8 +104,11 @@ export const sortTableRows = (table: IGTable, columnIndex: number, sortOrder: So const aColumn = a.columns[columnIndex]; const bColumn = b.columns[columnIndex]; - const aValue = aColumn.value || ''; - const bValue = bColumn.value || ''; + if (!aColumn || !bColumn) { + return 0; + } + const aValue = aColumn?.value || ''; + const bValue = bColumn?.value || ''; return sortByItemType(aValue, bValue, sortOrder, aColumn.type); }), diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 41ed960b..75d32fa1 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -372,9 +372,14 @@ export const sortByItemType = (aValue: string, bValue: string, sortOrder: SortDi case 'decimal': return compareNumbers(aValue, bValue, sortOrder); default: - return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); + return compareStrings(aValue, bValue, sortOrder); } }; + +function compareStrings(aValue: string, bValue: string, sortOrder: SortDirection): number { + return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); +} + function compareDates(aValue: string, bValue: string, sortOrder: SortDirection): number { const dateA = moment(aValue, DATEFORMATS.DATETIME); const dateB = moment(bValue, DATEFORMATS.DATETIME); diff --git a/src/preview/FormFillerPreview.tsx b/src/preview/FormFillerPreview.tsx index 7f5387cb..914374c4 100644 --- a/src/preview/FormFillerPreview.tsx +++ b/src/preview/FormFillerPreview.tsx @@ -10,7 +10,7 @@ import LanguageLocales from '@helsenorge/core-utils/constants/languages'; import FormFillerSidebar from './FormFillerSidebar'; import { emptyPropertyReplacer } from './helpers'; import { getResources } from './resources/referoResources'; -import skjema from './skjema/NHNHelseopplysingerExtractTextOutput-nb-NO (3).json'; +import skjema from './skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json'; import { ReferoContainer } from '../components'; import rootReducer from '../reducers'; diff --git a/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json b/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json new file mode 100644 index 00000000..5c805862 --- /dev/null +++ b/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json @@ -0,0 +1,601 @@ +{ + "resourceType": "Questionnaire", + "language": "nb-NO", + "id": "255e32d1-2cfc-4033-b714-31a6e15a2899", + "name": "NHN_Test_Repeterende_gtable", + "title": "Repeterende strukturer i tabell gtable", + "version": "0.1", + "status": "draft", + "publisher": "NHN", + "meta": { + "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], + "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], + "security": [{ "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }] + }, + "useContext": [ + { + "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "valueCodeableConcept": { + "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Repeterende strukturer i tabell gtable" }] + } + } + ], + "contact": [{ "name": "http://www.nhn.no" }], + "subjectType": ["Patient"], + "extension": [ + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + }, + { + "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", + "valueCodeableConcept": { + "coding": [ + { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sublabel", + "display": "Hide sublabel texts" + }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-sidebar", + "display": "Hide sidebar texts" + } + ] + } + }, + { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true }, + { + "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-save-capabilities", + "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-save-capabilities", "code": "2" } + } + ], + "date": "2023-03-30T00:00:00+02:00", + "contained": [ + { + "url": "http://ehelse.no/fhir/ValueSet/Predefined", + "resourceType": "ValueSet", + "id": "1102", + "version": "1.0", + "name": "urn:oid:1102", + "title": "Ja / Nei / Vet ikke (structor)", + "status": "draft", + "publisher": "Direktoratet for e-helse", + "compose": { + "include": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1102", + "concept": [ + { "code": "1", "display": "Ja" }, + { "code": "2", "display": "Nei" }, + { "code": "3", "display": "Vet ikke" } + ] + } + ] + } + } + ], + "item": [ + { + "linkId": "4c8b9272-16b7-4fe0-8e16-6f86077709cb", + "type": "group", + "text": "Datakilde 1: repeterende: GTable", + "required": false, + "item": [ + { + "linkId": "ba62ebba-244d-43b0-ac53-39dab184c953", + "type": "group", + "text": "Urin", + "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], + "required": false, + "repeats": true, + "item": [ + { "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", "type": "date", "text": "Dato", "required": false }, + { "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "type": "time", "text": "Klokkeslett", "required": false }, + { + "linkId": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", + "type": "quantity", + "text": "Milliliter urin", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + } + ], + "required": false + }, + { + "linkId": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", + "type": "quantity", + "text": "Vekt våt bleie", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } + } + ], + "required": false + } + ] + } + ] + }, + { + "linkId": "72479ca2-444c-47e8-8288-1025194bfe51", + "type": "group", + "text": "Datakilde 2: repeterende: GTable nr 2 alle datatyper", + "required": false, + "item": [ + { + "linkId": "0d28d6ec-729c-4915-8575-b71074c90c93", + "type": "group", + "text": "Alt skal inn", + "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], + "required": false, + "repeats": true, + "item": [ + { + "linkId": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", + "type": "choice", + "text": "Alternativer", + "required": false, + "answerValueSet": "#1102" + }, + { "linkId": "22bf506e-f446-46d2-8b00-3b264f6479b8", "type": "date", "text": "Dato", "required": false }, + { "linkId": "522b65ef-02bc-4fcf-8041-1ca0872440ea", "type": "time", "text": "Klokkeslett", "required": false }, + { + "linkId": "df1e8a08-f0e6-404b-a420-856a416c1e16", + "type": "quantity", + "text": "Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + } + ], + "required": false + }, + { "linkId": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", "type": "integer", "text": "Tall", "required": false }, + { + "linkId": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", + "type": "decimal", + "text": "Desimaltall", + "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], + "required": false + }, + { "linkId": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", "type": "boolean", "text": "Bekreftelse", "required": false } + ] + } + ] + }, + { + "linkId": "0845d569-993b-418a-8a1d-7ce50400c65c", + "type": "group", + "text": "Oppsummering datakilde 1 Sortering dato synkende", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] } + } + ], + "code": [ + { "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", "code": "DESC", "display": "Descending" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "code": "ab203143-488d-4757-946b-ddfad942205a", + "display": "Dato" + } + ], + "item": [ + { + "linkId": "ab203143-488d-4757-946b-ddfad942205a", + "type": "date", + "text": "Dato", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", "operator": "exists" }] + }, + { + "linkId": "01f1e567-abdc-46ee-8a41-cd571e930738", + "type": "time", + "text": "Klokkeslett", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "operator": "exists" }] + }, + { + "linkId": "7b1b5765-adb5-475b-a024-d9f68d5c9f8e", + "type": "quantity", + "text": "Vekt våt bleie", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", "operator": "exists" }] + }, + { + "linkId": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", + "type": "quantity", + "text": "Milliliter urin", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", "operator": "exists" }] + } + ] + }, + { + "linkId": "c976f895-7f14-44ce-8438-145cf9637b55", + "type": "group", + "text": "Oppsummering datakilde 1 Sortering dato stigende", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] } + } + ], + "code": [ + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", + "code": "ab203143-488d-4757-946b-ddfad942205a", + "display": "Dato" + }, + { "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", "code": "ASC", "display": "Ascending" } + ], + "item": [ + { + "linkId": "27936640-4b9b-4c5b-dea6-79db01fe37e1", + "type": "date", + "text": "Dato", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", "operator": "exists" }] + }, + { + "linkId": "b7c12f35-c3cc-40f1-fd28-810c957e27e1", + "type": "time", + "text": "Klokkeslett", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "operator": "exists" }] + }, + { + "linkId": "97e8e096-b360-4be0-9a7a-58d0cc5e379a", + "type": "quantity", + "text": "Vekt våt bleie", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", "operator": "exists" }] + }, + { + "linkId": "be9324aa-39e1-4c69-9122-95b9a5359a29", + "type": "quantity", + "text": "Milliliter urin", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", "operator": "exists" }] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + }, + { + "linkId": "e806447b-ab9c-49d1-8e16-0eef94235f73", + "type": "group", + "text": "Oppsummering datakilde 2", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] } + } + ], + "item": [ + { + "linkId": "3918616c-bf21-4c8b-8579-2a68979b4474", + "type": "choice", + "text": "Alternativer", + "required": false, + "answerValueSet": "#1102", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='20e024a7-98f4-46f7-8224-6d4dcf736a7e').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", "operator": "exists" }] + }, + { + "linkId": "91f9a598-bb9f-4565-fa4a-518e3cbc65d4", + "type": "date", + "text": "Dato", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='22bf506e-f446-46d2-8b00-3b264f6479b8').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "22bf506e-f446-46d2-8b00-3b264f6479b8", "operator": "exists" }] + }, + { + "linkId": "82976047-81e4-4b20-da7a-a3dd9f0e797a", + "type": "time", + "text": "Klokkeslett", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='522b65ef-02bc-4fcf-8041-1ca0872440ea').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "522b65ef-02bc-4fcf-8041-1ca0872440ea", "operator": "exists" }] + }, + { + "linkId": "ec83212c-578f-4308-cdae-8be63d1d9889", + "type": "quantity", + "text": "Quantity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='df1e8a08-f0e6-404b-a420-856a416c1e16').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "df1e8a08-f0e6-404b-a420-856a416c1e16", "operator": "exists" }] + }, + { + "linkId": "6fee57b2-7f5d-4990-8608-f12540d2cdd6", + "type": "integer", + "text": "Tall", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='a1c1db2b-2779-4e99-88d6-2d02c18d797c').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", "operator": "exists" }] + }, + { + "linkId": "25bbc49c-3bba-40b3-fb90-8684bcd176e2", + "type": "decimal", + "text": "Desimaltall", + "extension": [ + { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='81b77ece-6d3f-49cd-8cbf-1ff14de07964').answer.value" + } + ], + "required": false, + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", "operator": "exists" }] + }, + { + "linkId": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", + "type": "boolean", + "text": "Bekreftelse", + "required": false, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "QuestionnaireResponse.descendants().where(linkId='df586ed5-0b3b-43eb-ae05-fa1f201d3730').answer.value" + } + ], + "readOnly": true, + "enableWhen": [{ "answerBoolean": true, "question": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", "operator": "=" }] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + } + ], + "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", + "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", + "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" + } + ] + }, + "type": "text", + "required": false, + "repeats": false, + "readOnly": false + } + ] +} From cef1dbaaab911b20b148c25624a51eb10c14712b Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:37:58 +0100 Subject: [PATCH 75/83] fix sorting of different item.type --- .../table/tables/gtable/interface.ts | 1 + .../table/tables/gtable/utils.ts | 2 +- .../formcomponents/table/tables/utils.ts | 100 ++-- ...est_Repeterende_gtable-nb-NO-v0.1 (9).json | 502 +++++++++++++++--- 4 files changed, 497 insertions(+), 108 deletions(-) diff --git a/src/components/formcomponents/table/tables/gtable/interface.ts b/src/components/formcomponents/table/tables/gtable/interface.ts index 27232547..e13854a5 100644 --- a/src/components/formcomponents/table/tables/gtable/interface.ts +++ b/src/components/formcomponents/table/tables/gtable/interface.ts @@ -21,4 +21,5 @@ export interface IGTableColumn { index: number; type?: IItemType; value: string; + rawValue?: string | number | boolean; } diff --git a/src/components/formcomponents/table/tables/gtable/utils.ts b/src/components/formcomponents/table/tables/gtable/utils.ts index f04c491d..20640711 100644 --- a/src/components/formcomponents/table/tables/gtable/utils.ts +++ b/src/components/formcomponents/table/tables/gtable/utils.ts @@ -110,7 +110,7 @@ export const sortTableRows = (table: IGTable, columnIndex: number, sortOrder: So const aValue = aColumn?.value || ''; const bValue = bColumn?.value || ''; - return sortByItemType(aValue, bValue, sortOrder, aColumn.type); + return sortByItemType(aValue, bValue, sortOrder, aColumn?.type); }), }; return sortedTable; diff --git a/src/components/formcomponents/table/tables/utils.ts b/src/components/formcomponents/table/tables/utils.ts index 75d32fa1..c803fe82 100644 --- a/src/components/formcomponents/table/tables/utils.ts +++ b/src/components/formcomponents/table/tables/utils.ts @@ -32,19 +32,21 @@ import { getResponseItemAndPathWithLinkId, isInGroupContext, } from '../../../../util/refero-core'; +type QuantityKeys = keyof Pick | 'display'; +type Codingkeys = keyof Pick; +type AttachmentKeys = keyof Pick; -function extractValueFromCoding(coding: Coding | undefined, field: keyof Pick = 'display'): string { +function extractValueFromCoding(coding: Coding | undefined, field: Codingkeys = 'display'): string { if (!coding) return ''; return coding[field] ?? ''; } -const extractValueFromQuantity = ( - quantity: Quantity | undefined, - field: keyof Pick = 'value' -): string | number => { +const extractValueFromQuantity = (quantity: Quantity | undefined, field: QuantityKeys): string | number => { if (!quantity) return ''; switch (field) { - case 'value': + case 'display': return `${quantity.value ?? 0} ${quantity.unit ?? ''}`.replace(/'/g, ''); + case 'value': + return quantity.value ?? 0; case 'unit': return quantity.unit ?? ''; case 'system': @@ -79,10 +81,8 @@ const extractValueFromDateTime = (inputValue?: string): string => { const date = parseDate(String(inputValue)); return moment(date).locale('nb').format(DATEFORMATS.DATETIME); }; -export const extractValueFromAttachment = ( - inputValue?: Attachment, - field: keyof Pick = 'url' -): string | number => { + +export const extractValueFromAttachment = (inputValue?: Attachment, field: AttachmentKeys = 'url'): string | number => { if (inputValue) { switch (field) { case 'data': @@ -112,9 +112,30 @@ export const extractValueFromAttachment = ( } }; -export const getPrimitiveValueFromItemType = ( - type: typeof ItemType[keyof typeof ItemType], - res: QuestionnaireResponseItemAnswer +/* Typeguards */ +function isQuantityKey(key?: string): key is QuantityKeys { + return ['value', 'code', 'system', 'unit', 'display'].includes(key ?? ''); +} +function isCodingKey(key?: string): key is Codingkeys { + return ['code', 'display', 'system'].includes(key ?? ''); +} + +function isAttachmentKey(key?: string): key is AttachmentKeys { + return ['data', 'url', 'title', 'size', 'contentType', 'language', 'id', 'hash', 'creation'].includes(key ?? ''); +} + +type ItemTypeToDataTypeMap = { + Coding: Codingkeys; + Quantity: QuantityKeys; + Attachment: AttachmentKeys; +}; +export const getPrimitiveValueFromItemType = < + ItemType extends keyof ItemTypeToDataTypeMap, + DisplayType extends ItemTypeToDataTypeMap[ItemType] +>( + type: IItemType, + res: QuestionnaireResponseItemAnswer, + displayType?: DisplayType ): string | number | never => { switch (type) { case ItemType.STRING: @@ -134,11 +155,11 @@ export const getPrimitiveValueFromItemType = ( return extractValueFromTime(res.valueTime); case ItemType.CHOICE: case ItemType.OPENCHOICE: - return extractValueFromCoding(res.valueCoding, 'display'); + return extractValueFromCoding(res.valueCoding, isCodingKey(displayType) ? displayType : 'display'); case ItemType.QUANTITY: - return extractValueFromQuantity(res.valueQuantity); + return extractValueFromQuantity(res.valueQuantity, isQuantityKey(displayType) ? displayType : 'display'); case ItemType.ATTATCHMENT: - return extractValueFromAttachment(res.valueAttachment, 'data'); + return extractValueFromAttachment(res.valueAttachment, isAttachmentKey(displayType) ? displayType : 'data'); default: return ''; } @@ -200,7 +221,7 @@ export const getValueIfDataReceiver = ( const calculatedExpressionExtension = getCalculatedExpressionExtension(item); if (calculatedExpressionExtension) { if (questionnaireResponse) { - const res = getResponseItemAndPathWithLinkId(item.linkId, questionnaireResponse, []); + const res = getResponseItemAndPathWithLinkId(item.linkId, questionnaireResponse); return res[0].item.answer; } return undefined; @@ -362,25 +383,43 @@ export function findCodeBySystem(coding: T[], sys export const sortByItemType = (aValue: string, bValue: string, sortOrder: SortDirection, type?: IItemType): number => { switch (type) { - case 'date': + case ItemType.DATE: return compareDates(aValue, bValue, sortOrder); - case 'dateTime': + case ItemType.DATETIME: return compareDates(aValue, bValue, sortOrder); - case 'time': + case ItemType.TIME: return compareTimes(aValue, bValue, sortOrder); - case 'integer': - case 'decimal': + case ItemType.INTEGER: + case ItemType.DECIMAL: return compareNumbers(aValue, bValue, sortOrder); + case ItemType.QUANTITY: + return compareQuantities(aValue, bValue, sortOrder); + case ItemType.STRING: + case ItemType.TEXT: + case ItemType.OPENCHOICE: + return compareStrings(aValue, bValue, sortOrder); default: return compareStrings(aValue, bValue, sortOrder); } }; -function compareStrings(aValue: string, bValue: string, sortOrder: SortDirection): number { +const extractNumber = (value: string | undefined): number => { + if (!value) return 0; + const match = value.match(/\d+(\.\d+)?/); + return match ? parseFloat(match[0]) : 0; +}; + +const compareQuantities = (aValue: string | undefined, bValue: string | undefined, sortOrder: SortDirection): number => { + const numberA = extractNumber(aValue); + const numberB = extractNumber(bValue); + return sortOrder === SortDirection.asc ? numberA - numberB : numberB - numberA; +}; + +const compareStrings = (aValue: string, bValue: string, sortOrder: SortDirection): number => { return sortOrder === SortDirection.asc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue); -} +}; -function compareDates(aValue: string, bValue: string, sortOrder: SortDirection): number { +const compareDates = (aValue: string, bValue: string, sortOrder: SortDirection): number => { const dateA = moment(aValue, DATEFORMATS.DATETIME); const dateB = moment(bValue, DATEFORMATS.DATETIME); @@ -391,9 +430,9 @@ function compareDates(aValue: string, bValue: string, sortOrder: SortDirection): comparisonResult = 1; } return sortOrder === 'asc' ? comparisonResult : -comparisonResult; -} +}; -function compareTimes(aValue: string, bValue: string, sortOrder: SortDirection): number { +const compareTimes = (aValue: string, bValue: string, sortOrder: SortDirection): number => { const format = DATEFORMATS.TIME; const timeA = moment(aValue, format); const timeB = moment(bValue, format); @@ -403,10 +442,9 @@ function compareTimes(aValue: string, bValue: string, sortOrder: SortDirection): } else { return timeA.isAfter(timeB) ? -1 : timeA.isBefore(timeB) ? 1 : 0; } -} - -function compareNumbers(aValue: string, bValue: string, sortOrder: SortDirection): number { +}; +const compareNumbers = (aValue: string, bValue: string, sortOrder: SortDirection): number => { const numberA = parseFloat(aValue); const numberB = parseFloat(bValue); return sortOrder === SortDirection.asc ? numberA - numberB : numberB - numberA; -} +}; diff --git a/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json b/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json index 5c805862..3d518a61 100644 --- a/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json +++ b/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json @@ -9,33 +9,68 @@ "publisher": "NHN", "meta": { "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], - "security": [{ "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }] + "tag": [ + { + "system": "urn:ietf:bcp:47", + "code": "nb-NO", + "display": "Bokmål" + } + ], + "security": [ + { + "code": "3", + "display": "Helsehjelp (Full)", + "system": "urn:oid:2.16.578.1.12.4.1.1.7618" + } + ] }, "useContext": [ { - "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, + "code": { + "system": "http://hl7.org/fhir/ValueSet/usage-context-type", + "code": "focus", + "display": "Clinical Focus" + }, "valueCodeableConcept": { - "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Repeterende strukturer i tabell gtable" }] + "coding": [ + { + "system": "urn:oid:2.16.578.1.12.4.1.1.8655", + "display": "Repeterende strukturer i tabell gtable" + } + ] } } ], - "contact": [{ "name": "http://www.nhn.no" }], + "contact": [ + { + "name": "http://www.nhn.no" + } + ], "subjectType": ["Patient"], "extension": [ { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", + "code": "1" + } }, { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", + "code": "1" + } }, { "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", "valueCodeableConcept": { "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", + "code": "hide-help", + "display": "Hide help texts" + }, { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-sublabel", @@ -49,10 +84,16 @@ ] } }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true }, + { + "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", + "valueBoolean": true + }, { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-save-capabilities", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-save-capabilities", "code": "2" } + "valueCoding": { + "system": "http://helsenorge.no/fhir/ValueSet/sdf-save-capabilities", + "code": "2" + } } ], "date": "2023-03-30T00:00:00+02:00", @@ -71,9 +112,18 @@ { "system": "urn:oid:2.16.578.1.12.4.1.1102", "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" }, - { "code": "3", "display": "Vet ikke" } + { + "code": "1", + "display": "Ja" + }, + { + "code": "2", + "display": "Nei" + }, + { + "code": "3", + "display": "Vet ikke" + } ] } ] @@ -91,12 +141,27 @@ "linkId": "ba62ebba-244d-43b0-ac53-39dab184c953", "type": "group", "text": "Urin", - "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], + "extension": [ + { + "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", + "valueString": "Legg til registering" + } + ], "required": false, "repeats": true, "item": [ - { "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", "type": "date", "text": "Dato", "required": false }, - { "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "type": "time", "text": "Klokkeslett", "required": false }, + { + "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", + "type": "date", + "text": "Dato", + "required": false + }, + { + "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", + "type": "time", + "text": "Klokkeslett", + "required": false + }, { "linkId": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", "type": "quantity", @@ -104,7 +169,11 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + "valueCoding": { + "code": "ml", + "display": "ml", + "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" + } } ], "required": false @@ -116,7 +185,11 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } + "valueCoding": { + "code": "gram", + "display": "gram", + "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" + } } ], "required": false @@ -135,7 +208,12 @@ "linkId": "0d28d6ec-729c-4915-8575-b71074c90c93", "type": "group", "text": "Alt skal inn", - "extension": [{ "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", "valueString": "Legg til registering" }], + "extension": [ + { + "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", + "valueString": "Legg til registering" + } + ], "required": false, "repeats": true, "item": [ @@ -146,8 +224,18 @@ "required": false, "answerValueSet": "#1102" }, - { "linkId": "22bf506e-f446-46d2-8b00-3b264f6479b8", "type": "date", "text": "Dato", "required": false }, - { "linkId": "522b65ef-02bc-4fcf-8041-1ca0872440ea", "type": "time", "text": "Klokkeslett", "required": false }, + { + "linkId": "22bf506e-f446-46d2-8b00-3b264f6479b8", + "type": "date", + "text": "Dato", + "required": false + }, + { + "linkId": "522b65ef-02bc-4fcf-8041-1ca0872440ea", + "type": "time", + "text": "Klokkeslett", + "required": false + }, { "linkId": "df1e8a08-f0e6-404b-a420-856a416c1e16", "type": "quantity", @@ -155,20 +243,39 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + "valueCoding": { + "code": "ml", + "display": "ml", + "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" + } } ], "required": false }, - { "linkId": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", "type": "integer", "text": "Tall", "required": false }, + { + "linkId": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", + "type": "integer", + "text": "Tall", + "required": false + }, { "linkId": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", "type": "decimal", "text": "Desimaltall", - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", + "valueInteger": 2 + } + ], "required": false }, - { "linkId": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", "type": "boolean", "text": "Bekreftelse", "required": false } + { + "linkId": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", + "type": "boolean", + "text": "Bekreftelse", + "required": false + } ] } ] @@ -181,15 +288,26 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] } + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "gtable" + } + ] + } } ], "code": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", "code": "DESC", "display": "Descending" }, + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "code": "DESC", + "display": "Descending" + }, { "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "ab203143-488d-4757-946b-ddfad942205a", - "display": "Dato" + "code": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", + "display": "Milliliter urin" } ], "item": [ @@ -202,7 +320,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -211,7 +334,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", + "operator": "exists" + } + ] }, { "linkId": "01f1e567-abdc-46ee-8a41-cd571e930738", @@ -222,7 +351,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -231,7 +365,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", + "operator": "exists" + } + ] }, { "linkId": "7b1b5765-adb5-475b-a024-d9f68d5c9f8e", @@ -240,12 +380,21 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } + "valueCoding": { + "code": "gram", + "display": "gram", + "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" + } }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -255,31 +404,52 @@ ], "required": false, "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", + "operator": "exists" + } + ] }, { "linkId": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", "type": "quantity", "text": "Milliliter urin", "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } - }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "ml", + "display": "ml", + "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" + } } ], "required": false, "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", + "operator": "exists" + } + ] } ] }, @@ -291,16 +461,27 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] } + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "gtable" + } + ] + } } ], "code": [ { "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "ab203143-488d-4757-946b-ddfad942205a", + "code": "27936640-4b9b-4c5b-dea6-79db01fe37e1", "display": "Dato" }, - { "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", "code": "ASC", "display": "Ascending" } + { + "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", + "code": "ASC", + "display": "Ascending" + } ], "item": [ { @@ -312,7 +493,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -321,7 +507,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", + "operator": "exists" + } + ] }, { "linkId": "b7c12f35-c3cc-40f1-fd28-810c957e27e1", @@ -332,7 +524,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -341,7 +538,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", + "operator": "exists" + } + ] }, { "linkId": "97e8e096-b360-4be0-9a7a-58d0cc5e379a", @@ -350,12 +553,21 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "gram", "display": "gram", "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" } + "valueCoding": { + "code": "gram", + "display": "gram", + "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" + } }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -365,7 +577,13 @@ ], "required": false, "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", + "operator": "exists" + } + ] }, { "linkId": "be9324aa-39e1-4c69-9122-95b9a5359a29", @@ -374,12 +592,21 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + "valueCoding": { + "code": "ml", + "display": "ml", + "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" + } }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -389,7 +616,13 @@ ], "required": false, "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", + "operator": "exists" + } + ] } ] }, @@ -397,11 +630,24 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } } ], "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-2", + "display": "SOT-2" + } + ], "_text": { "extension": [ { @@ -423,7 +669,14 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "gtable" }] } + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "gtable" + } + ] + } } ], "item": [ @@ -437,7 +690,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -446,7 +704,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", + "operator": "exists" + } + ] }, { "linkId": "91f9a598-bb9f-4565-fa4a-518e3cbc65d4", @@ -457,7 +721,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -466,7 +735,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "22bf506e-f446-46d2-8b00-3b264f6479b8", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "22bf506e-f446-46d2-8b00-3b264f6479b8", + "operator": "exists" + } + ] }, { "linkId": "82976047-81e4-4b20-da7a-a3dd9f0e797a", @@ -477,7 +752,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -486,7 +766,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "522b65ef-02bc-4fcf-8041-1ca0872440ea", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "522b65ef-02bc-4fcf-8041-1ca0872440ea", + "operator": "exists" + } + ] }, { "linkId": "ec83212c-578f-4308-cdae-8be63d1d9889", @@ -495,12 +781,21 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "ml", "display": "ml", "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" } + "valueCoding": { + "code": "ml", + "display": "ml", + "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" + } }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -510,7 +805,13 @@ ], "required": false, "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "df1e8a08-f0e6-404b-a420-856a416c1e16", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "df1e8a08-f0e6-404b-a420-856a416c1e16", + "operator": "exists" + } + ] }, { "linkId": "6fee57b2-7f5d-4990-8608-f12540d2cdd6", @@ -521,7 +822,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -530,18 +836,32 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", + "operator": "exists" + } + ] }, { "linkId": "25bbc49c-3bba-40b3-fb90-8684bcd176e2", "type": "decimal", "text": "Desimaltall", "extension": [ - { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, + { + "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", + "valueInteger": 2 + }, { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -551,7 +871,13 @@ ], "required": false, "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", "operator": "exists" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", + "operator": "exists" + } + ] }, { "linkId": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", @@ -562,7 +888,12 @@ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "data-receiver" + } + ] } }, { @@ -571,7 +902,13 @@ } ], "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", "operator": "=" }] + "enableWhen": [ + { + "answerBoolean": true, + "question": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", + "operator": "=" + } + ] } ] }, @@ -579,11 +916,24 @@ "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", + "code": "sidebar" + } + ] + } } ], "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], + "code": [ + { + "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", + "code": "SOT-3", + "display": "SOT-3" + } + ], "_text": { "extension": [ { From eecc2d6548f88added6e96c613d40636b8927c11 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:41:33 +0100 Subject: [PATCH 76/83] release-14.1.0-beta03 --- CHANGES | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e95da572..6b7c229a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 14.1.0-beta03 + +--- + +- Bugfix: fix sorting of different itemtypes in tables, dates, quantity, string and numbers + ## 14.1.0-beta02 --- diff --git a/package.json b/package.json index 68a684bd..61bda141 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "14.1.0-beta02", + "version": "14.1.0-beta03", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From 1d76a1e95b54456f130d6077a7804607dd7f8064 Mon Sep 17 00:00:00 2001 From: Arezoo Ghalichi Date: Mon, 26 Feb 2024 14:55:40 +0100 Subject: [PATCH 77/83] Package 14.1.0 table view --- CHANGES | 18 +++--------------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/CHANGES b/CHANGES index f3a5abb6..587b885c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,20 +1,8 @@ -## 14.1.0-beta03 +## 14.1.0 --- - -- Bugfix: fix sorting of different itemtypes in tables, dates, quantity, string and numbers - -## 14.1.0-beta02 - ---- - -- Bugfix: fix calculated scoring fields being showed in tables, also added a linebreak after each table - -## 14.1.0-beta01 - ---- - -- fixed the sorting for tables and also changed logic for standardtable +- Has possibility to display summary as table. Can support types Table, Table-HN1, Table-HN2 and GTable +- Support for ordering in GTable, Table-HN2 og Table ## 14.0.8 diff --git a/package-lock.json b/package-lock.json index c0dcc064..b586a071 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@helsenorge/refero", - "version": "14.1.0-beta02", + "version": "14.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@helsenorge/refero", - "version": "14.1.0-beta02", + "version": "14.1.0", "license": "MIT", "dependencies": { "@types/react-collapse": "^5.0.1", diff --git a/package.json b/package.json index 61bda141..a2163b5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "14.1.0-beta03", + "version": "14.1.0", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" From b6e657f8ad320fdffc7191117ef1b7a82902627f Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 27 Feb 2024 08:29:51 +0100 Subject: [PATCH 78/83] added datalables, changed the setup of th and td --- .../table/tables/gtable/GTable.tsx | 8 +++- .../table/tables/table-hn1/TableHn1.tsx | 2 +- .../table/tables/table-hn2/TableHn2.tsx | 12 ++++-- .../table/tables/table/StandardTable.tsx | 38 ++++++++++++++--- .../tables/table/StandardTableHeader.tsx | 41 +++++++++++++------ 5 files changed, 76 insertions(+), 25 deletions(-) diff --git a/src/components/formcomponents/table/tables/gtable/GTable.tsx b/src/components/formcomponents/table/tables/gtable/GTable.tsx index 001f5c4c..3bc580d2 100644 --- a/src/components/formcomponents/table/tables/gtable/GTable.tsx +++ b/src/components/formcomponents/table/tables/gtable/GTable.tsx @@ -24,11 +24,15 @@ const GTable = ({ items, questionnaireResponse, tableCodesCoding }: Props): JSX. - {gTable.rows.map(item => { + {gTable.rows.map((item, index) => { return ( {item.columns.map(column => ( - + {column.value} ))} diff --git a/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx b/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx index c470efe2..82991f1e 100644 --- a/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx +++ b/src/components/formcomponents/table/tables/table-hn1/TableHn1.tsx @@ -20,7 +20,7 @@ const TableHn1 = ({ items, questionnaireResponse }: Props): JSX.Element => { {item.columns.map(({ value, id, type }) => ( - + {value ?? ''} diff --git a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx index 23e6b798..18297c79 100644 --- a/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx +++ b/src/components/formcomponents/table/tables/table-hn2/TableHn2.tsx @@ -6,7 +6,7 @@ import { Table as HnTable, SortDirection, TableBody, TableCell, TableRow } from import { ITableH2Row } from './interface'; import TableHeadHn2 from './TableHeadHn2'; -import { getTableHN2bodyObject } from './utils'; +import { getHeaderColumns, getTableHN2bodyObject } from './utils'; import { getIndexToSortBy } from './utils'; import { transformCodingToSortDirection } from '../utils'; @@ -17,7 +17,7 @@ interface Props { } const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JSX.Element => { const sortIndex = getIndexToSortBy(tableCodesCoding); - + const tableHeader = getHeaderColumns(tableCodesCoding); const [sortDir, setSortDir] = useState(transformCodingToSortDirection(tableCodesCoding)); const [rows, setRows] = useState(getTableHN2bodyObject(items, questionnaireResponse, sortIndex, sortDir)); @@ -28,11 +28,15 @@ const TableHn2 = ({ tableCodesCoding, items, questionnaireResponse }: Props): JS - {rows.map(item => { + {rows.map((item, index) => { return ( {item.columns.map(column => ( - + {column.text} ))} diff --git a/src/components/formcomponents/table/tables/table/StandardTable.tsx b/src/components/formcomponents/table/tables/table/StandardTable.tsx index 3cecae63..df77ebe6 100644 --- a/src/components/formcomponents/table/tables/table/StandardTable.tsx +++ b/src/components/formcomponents/table/tables/table/StandardTable.tsx @@ -2,7 +2,15 @@ import React, { useEffect, useState } from 'react'; import { Coding, QuestionnaireItem, QuestionnaireResponse, Resource } from 'fhir/r4'; -import { Table as HnTable, ModeType, SortDirection, TableBody, TableCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; +import { + Table as HnTable, + ModeType, + SortDirection, + TableBody, + TableCell, + TableHeadCell, + TableRow, +} from '@helsenorge/designsystem-react/components/Table'; import { IStandardTable } from './interface'; import { StandardTableHeader } from './StandardTableHeader'; @@ -33,13 +41,31 @@ export const StandardTable = ({ items, questionnaireResponse, resource, tableCod {table.rows.map(item => ( - {item.columns.map(({ value, id }) => ( - - + {item.columns.map(({ value, id }, colIndex) => { + if (colIndex === 0) { + return ( + + {value} + + ); + } + if (colIndex === item.columns.length - 1) { + return ( + + {value} + + ); + } + return ( + {value} - - ))} + ); + })} ))} diff --git a/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx b/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx index 3a9ebf1e..5ad51177 100644 --- a/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx +++ b/src/components/formcomponents/table/tables/table/StandardTableHeader.tsx @@ -1,6 +1,13 @@ import React from 'react'; -import { HeaderCategory, SortDirection, TableHead, TableHeadCell, TableRow } from '@helsenorge/designsystem-react/components/Table'; +import { + HeaderCategory, + SortDirection, + TableCell, + TableHead, + TableHeadCell, + TableRow, +} from '@helsenorge/designsystem-react/components/Table'; import { IStandardTableColumn } from './interface'; @@ -20,17 +27,27 @@ export const StandardTableHeader = ({ headerRow, setSortDir, sortDir, displayToS return ( - {headerRow.map(column => ( - - {column.value} - - ))} + {headerRow.map((column, index) => { + if (index === 0 || index === headerRow.length - 1) { + return ( + +   + + ); + } else { + return ( + + {column.value} + + ); + } + })} ); From 49e2b21c4fd4b8233d89cc8d3d3734553e56202b Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:36:21 +0100 Subject: [PATCH 79/83] updated refero with new tables, aslo preview mode for development --- CHANGES | 6 + package.json | 2 +- ...pplysingerExtractTextOutput-nb-NO (3).json | 640 ------------ ...est_Repeterende_gtable-nb-NO-v0.1 (9).json | 951 ------------------ ...peterende_gtable-nb-NO-v0.1_sorterubg.json | 890 ---------------- src/preview/skjema/NHN_Test_Table.json | 680 ------------- ...NHN_Test_Table_SvaralternativerStyrer.json | 891 ---------------- 7 files changed, 7 insertions(+), 4053 deletions(-) delete mode 100644 src/preview/skjema/NHNHelseopplysingerExtractTextOutput-nb-NO (3).json delete mode 100644 src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json delete mode 100644 src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1_sorterubg.json delete mode 100644 src/preview/skjema/NHN_Test_Table.json delete mode 100644 src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json diff --git a/CHANGES b/CHANGES index 2b99f726..39eed1a3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +## 15.0.0 + +--- + +- New group extensions table, table-hn1, table-hn2, gtable. + ## 14.1.0-beta03 --- diff --git a/package.json b/package.json index a2163b5d..42c21b0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@helsenorge/refero", - "version": "14.1.0", + "version": "15.0.0", "engines": { "node": "^18.0.0", "npm": ">=9.0.0" diff --git a/src/preview/skjema/NHNHelseopplysingerExtractTextOutput-nb-NO (3).json b/src/preview/skjema/NHNHelseopplysingerExtractTextOutput-nb-NO (3).json deleted file mode 100644 index 7bf10ec7..00000000 --- a/src/preview/skjema/NHNHelseopplysingerExtractTextOutput-nb-NO (3).json +++ /dev/null @@ -1,640 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "36af06fa-58ce-4e2f-84e4-070635fa86d1", - "name": "NHNHelseopplysingerExtractTextOutput", - "title": "Helseopplysinger", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], - "security": [{ "code": "1", "display": "Helseregister (Basis)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }] - }, - "contact": [{ "name": "http://www.nhn.no" }], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "2" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "2" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-save-capabilities", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-save-capabilities", "code": "3" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-presentationbuttons", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/presentationbuttons", "code": "none" } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": false } - ], - "date": "2023-09-27T00:00:00+02:00", - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1101", - "version": "1.0", - "name": "urn:oid:1101", - "title": "Ja / Nei (structor)", - "status": "draft", - "publisher": "NHN", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1101", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "3fd5a056-f5a3-450e-ffaa-cbcb62f35a2e", - "type": "group", - "text": "Personopplysninger", - "required": false, - "item": [ - { - "linkId": "f2af9ec6-0628-4ef2-86f1-d65601989e88", - "type": "string", - "text": "Fødselsnummer", - "required": false, - "extension": [ - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-fhirpath", - "valueString": "Patient.identifier.where(use = 'official' and (system = 'urn:oid:2.16.578.1.12.4.1.4.1' or system = 'urn:oid:2.16.578.1.12.4.1.4.2')).value" - } - ], - "readOnly": true - }, - { - "linkId": "ae72bbdd-73fb-44e3-81d1-b031e13ce7ff", - "type": "string", - "text": "Navn", - "required": false, - "extension": [ - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-fhirpath", - "valueString": "Patient.name.where(use = 'official').select(given.join(' ') & ' ' & family)" - } - ], - "readOnly": true - }, - { - "linkId": "7b441197-66c3-4580-8eaf-99996c242664", - "type": "string", - "text": "Alder", - "required": false, - "extension": [ - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-fhirpath", - "valueString": "Patient.extension.where(url = 'http://helsenorge.no/fhir/StructureDefinition/sdf-age').value" - }, - { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", "valueBoolean": true } - ], - "readOnly": true - }, - { - "linkId": "05eeb76d-9f28-4baa-a3b7-a94f9a1d4ee6", - "type": "string", - "text": "Kjønn", - "required": false, - "extension": [ - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-fhirpath", - "valueString": "iif(%patient.gender.empty() or %patient.gender = 'other' or %patient.gender = 'unknown', 'Ukjent', iif(%patient.gender = 'female', 'Kvinne', 'Mann'))" - }, - { "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", "valueBoolean": true } - ], - "readOnly": true - } - ] - }, - { - "linkId": "1c774f61-44dc-4357-9b3f-949a172922b6", - "type": "group", - "text": "Pårørende", - "required": false, - "item": [ - { "linkId": "c7b3a7e4-cca0-4641-997e-ccf40195f590", "type": "string", "text": "Navn", "required": false }, - { "linkId": "cad026bd-22df-4d32-8985-dfe5828c7cbf", "type": "date", "text": "Fødselsdato", "required": false }, - { - "linkId": "360030d1-2ab6-4598-e01f-c145389c7f3e", - "type": "string", - "text": "Telefonnummer", - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/regex", "valueString": "^((\\+|00)(\\d{1,3}))?\\d{5,12}$" }], - "required": false - }, - { - "linkId": "c01f89d9-f0b7-4fe8-878e-1c7d61431a74", - "type": "choice", - "text": "Relasjon", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "b409d91a-0d28-4266-8b02-f45f782ed21f", - "code": "ektefelle", - "system": "urn:uuid:a771df21-467f-4562-8320-c13069353a2a", - "display": "Ektefelle" - } - }, - { - "valueCoding": { - "id": "b9416d91-1b44-4710-fcd4-7de4d57a350c", - "code": "samboer", - "system": "urn:uuid:a771df21-467f-4562-8320-c13069353a2a", - "display": "Samboer" - } - }, - { - "valueCoding": { - "id": "096858a1-5169-4610-807d-7b8d0b5e8283", - "code": "sønn", - "system": "urn:uuid:a771df21-467f-4562-8320-c13069353a2a", - "display": "Sønn" - } - }, - { - "valueCoding": { - "id": "f9ad92ef-bad3-48f7-852f-895c0c49714c", - "code": "datter", - "system": "urn:uuid:a771df21-467f-4562-8320-c13069353a2a", - "display": "Datter" - } - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "radio-button" }] - } - } - ] - }, - { - "linkId": "a50dbc6e-4bc1-4e0c-b4f8-0dbb13c6407e", - "type": "choice", - "text": "Har du eneansvar for barn under 18 år eller andre med spesielle omsorgsbehov?", - "required": false, - "answerValueSet": "#1101" - } - ] - }, - { - "linkId": "255d8642-52fe-4c09-841e-4c7e88be735e", - "type": "group", - "text": "Dine data", - "required": false, - "item": [ - { - "linkId": "7987d763-6556-4f2c-d305-09c52b37a829", - "type": "choice", - "text": "Hvilke sykdommer har du?", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "cd610686-7405-44d0-9e03-625856bf573d", - "code": "hjertesykdom", - "system": "urn:uuid:ba095104-a956-4ffe-b5e6-b855f33cd87d", - "display": "Hjertesykdom" - } - }, - { - "valueCoding": { - "id": "43ec43e0-49de-4858-89d5-8d21c5be8ab0", - "code": "lungesykdom", - "system": "urn:uuid:ba095104-a956-4ffe-b5e6-b855f33cd87d", - "display": "Lungesykdom" - } - }, - { - "valueCoding": { - "id": "7ceef4d4-ecca-408a-8987-1f30864388b2", - "code": "mage-tarm-sykdom", - "system": "urn:uuid:ba095104-a956-4ffe-b5e6-b855f33cd87d", - "display": "Mage-tarm sykdom" - } - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } - } - ] - }, - { - "linkId": "15657eda-6fe9-4b19-d26c-581315e35de1", - "type": "group", - "text": "Høyde, vekt og kroppsmasseindeks", - "required": false, - "item": [ - { - "linkId": "Hoyde", - "type": "quantity", - "text": "Høyde", - "required": true, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } - }, - { "url": "http://hl7.org/fhir/StructureDefinition/minValue", "valueInteger": 10 }, - { "url": "http://hl7.org/fhir/StructureDefinition/maxValue", "valueInteger": 250 }, - { "url": "http://ehelse.no/fhir/StructureDefinition/validationtext", "valueString": "Legg inn en verdi mellom 10 og 250" } - ] - }, - { - "linkId": "Vekt", - "type": "quantity", - "text": "Vekt", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } - }, - { "url": "http://hl7.org/fhir/StructureDefinition/minValue", "valueInteger": 1 }, - { "url": "http://hl7.org/fhir/StructureDefinition/maxValue", "valueInteger": 750 }, - { "url": "http://ehelse.no/fhir/StructureDefinition/validationtext", "valueString": "Legg inn en verdi mellom 1 og 750" } - ], - "required": true - }, - { - "linkId": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "type": "quantity", - "text": "Kroppsmasseindeks", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "BMI", "display": "KMI", "system": "http://unitsofmeasure.org" } - }, - { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='Vekt').answer.value.value / ((QuestionnaireResponse.descendants().where(linkId='Hoyde').answer.value.value/10000) * QuestionnaireResponse.descendants().where(linkId='Hoyde').answer.value.value)" - } - ], - "required": false, - "readOnly": true - }, - { - "linkId": "281eda1b-4ca9-41c2-8ac5-9bc7983dfade", - "type": "display", - "text": "Du har fedme - grad 3 Du har høy risiko for flere helseproblemer, økt dødelighet og ytterligere økt helserisiko. En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", - "required": false, - "enableWhen": [ - { - "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "operator": ">", - "answerQuantity": { "value": 39.9, "system": "http://unitsofmeasure.org", "code": "BMI" } - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "**Du har fedme - grad 3**\n\nDu har høy risiko for flere helseproblemer, økt dødelighet og ytterligere økt helserisiko.\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" - } - ] - } - }, - { - "linkId": "7de10210-1258-46df-80eb-2be4480297c3", - "type": "display", - "text": "Du har fedme - grad 2 Du har høy risiko for flere helseproblemer, og økt dødelighet. En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", - "required": false, - "enableWhen": [ - { - "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "operator": ">", - "answerQuantity": { "value": 34.9, "system": "http://unitsofmeasure.org", "code": "BMI" } - }, - { - "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "operator": "<", - "answerQuantity": { "value": 40, "system": "http://unitsofmeasure.org", "code": "BMI" } - } - ], - "enableBehavior": "all", - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "**Du har fedme - grad 2**\n\nDu har høy risiko for flere helseproblemer, og økt dødelighet.\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" - } - ] - } - }, - { - "linkId": "9b48c816-14be-48bc-826f-31702406553d", - "type": "display", - "text": "Du har fedme - grad 1 Du har økt for diabetes og økt dødelighet En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", - "required": false, - "enableWhen": [ - { - "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "operator": ">", - "answerQuantity": { "value": 29.9, "system": "http://unitsofmeasure.org", "code": "BMI" } - }, - { - "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "operator": "<", - "answerQuantity": { "value": 35, "system": "http://unitsofmeasure.org", "code": "BMI" } - } - ], - "enableBehavior": "all", - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "**Du har fedme - grad 1**\n\nDu har økt for diabetes og økt dødelighet\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" - } - ] - } - }, - { - "linkId": "9a7eece3-1542-4d30-918c-aac4177692b9", - "type": "display", - "text": "Du er overvektig Du har økt risiko for diabetes En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", - "required": false, - "enableWhen": [ - { - "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "operator": "<", - "answerQuantity": { "value": 30, "system": "http://unitsofmeasure.org", "code": "BMI" } - }, - { - "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "operator": ">", - "answerQuantity": { "value": 24.9, "system": "http://unitsofmeasure.org", "code": "BMI" } - } - ], - "enableBehavior": "all", - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "**Du er overvektig**\n\nDu har økt risiko for diabetes\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" - } - ] - } - }, - { - "linkId": "eb21a606-f887-463b-8e93-b6f401c58c78", - "type": "display", - "text": "Du har normalvektig En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", - "required": false, - "enableWhen": [ - { - "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "operator": ">", - "answerQuantity": { "value": 18.4, "system": "http://unitsofmeasure.org", "code": "BMI" } - }, - { - "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "operator": "<", - "answerQuantity": { "value": 25, "system": "http://unitsofmeasure.org", "code": "BMI" } - } - ], - "enableBehavior": "all", - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "**Du har normalvektig**\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" - } - ] - } - } - ] - } - ] - }, - { - "linkId": "51c081da-0fd5-4cea-a90c-f6aa81a406d0", - "type": "display", - "text": "Du er undervektig. Du har lav risiko for diabetes, økt risiko for andre helseproblemer. En svakhet ved kroppsmasseindeks er at den ikke skiller mellom fett- og muskelmasse. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett. Kilde: Folkehelseinstituttet", - "required": false, - "enableWhen": [ - { - "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", - "operator": "<", - "answerQuantity": { "value": 18.4, "system": "http://unitsofmeasure.org", "code": "BMI" } - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "**Du er undervektig.**\n\nDu har lav risiko for diabetes, økt risiko for andre helseproblemer.\n\nEn svakhet ved kroppsmasseindeks er at den **ikke skiller mellom fett- og muskelmasse**. For helsen har det dessuten betydning hvordan fettet er fordelt på kroppen. Fett som samles rundt de indre organene (innvollsfett), vurderes å være mer helseskadelig enn såkalt underhudsfett.\n\nKilde: Folkehelseinstituttet" - } - ] - } - }, - { - "linkId": "e78c5d17-6f04-4f4e-c376-09e6a874ed8b", - "type": "group", - "text": "Oppsummering", - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "16b354ef-6bd7-4724-8f2c-2cae678c654c" - } - ], - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table-hn1" }] - } - } - ], - "item": [ - { - "linkId": "3aff8315-8bd0-4e24-8d81-f7f34b83c68c", - "type": "display", - "required": false, - "text": "Pasienten er en kvinne", - "enableWhen": [{ "question": "05eeb76d-9f28-4baa-a3b7-a94f9a1d4ee6", "operator": "=", "answerString": "Kvinne" }] - }, - { - "linkId": "077e6da2-a354-4192-829b-57d2f379b909", - "type": "display", - "text": "Pasienten er en mann", - "required": false, - "enableWhen": [{ "question": "05eeb76d-9f28-4baa-a3b7-a94f9a1d4ee6", "operator": "=", "answerString": "Mann" }] - }, - { - "linkId": "c156d21f-d2b3-4f5d-ca7e-0c0b8f7109b8", - "type": "string", - "text": "Pasienten har følgende alder: ", - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "bad36938-1f23-41a2-887e-83bdf094ad92" - } - ], - "required": false, - "extension": [ - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-fhirpath", - "valueString": "Patient.extension.where(url = 'http://helsenorge.no/fhir/StructureDefinition/sdf-age').value" - }, - { "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-guidanceparameter", "valueString": "alder" } - ], - "readOnly": true - }, - { - "linkId": "eb0c9151-acb9-47a6-e7eb-4f605bea45ad", - "type": "quantity", - "text": "Pasienten har en kroppsmasseindeks. Med re-kalkulasjon fra felter over. Virker uten tabell", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "BMI", "display": "KMI", "system": "http://unitsofmeasure.org" } - }, - { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-calculatedExpression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='Vekt').answer.value.value / ((QuestionnaireResponse.descendants().where(linkId='Hoyde').answer.value.value/10000) * QuestionnaireResponse.descendants().where(linkId='Hoyde').answer.value.value)" - } - ], - "required": false, - "readOnly": true - }, - { - "linkId": "092af6eb-3680-438e-8f68-44fd402603b5", - "type": "quantity", - "text": "Pasienten har en kroppsmasseindeks UTEN kalkulasjon MED kopiering av data. Har fjernet det matematiske uttrykket manuelt- ", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "BMI", "display": "KMI", "system": "http://unitsofmeasure.org" } - }, - { "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", "valueInteger": 2 }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='6f7c076a-9324-4bf7-8ef0-6424b1bb999e').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "6f7c076a-9324-4bf7-8ef0-6424b1bb999e", "operator": "exists" }] - }, - { - "linkId": "90b681c2-0064-47e5-8799-e9775b4b51e3", - "type": "choice", - "text": "Pasienten oppgir å ha følgende sykdommer:", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "cd610686-7405-44d0-9e03-625856bf573d", - "code": "hjertesykdom", - "system": "urn:uuid:ba095104-a956-4ffe-b5e6-b855f33cd87d", - "display": "Hjertesykdom" - } - }, - { - "valueCoding": { - "id": "43ec43e0-49de-4858-89d5-8d21c5be8ab0", - "code": "lungesykdom", - "system": "urn:uuid:ba095104-a956-4ffe-b5e6-b855f33cd87d", - "display": "Lungesykdom" - } - }, - { - "valueCoding": { - "id": "7ceef4d4-ecca-408a-8987-1f30864388b2", - "code": "mage-tarm-sykdom", - "system": "urn:uuid:ba095104-a956-4ffe-b5e6-b855f33cd87d", - "display": "Mage-tarm sykdom" - } - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7987d763-6556-4f2c-d305-09c52b37a829').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "7987d763-6556-4f2c-d305-09c52b37a829", "operator": "exists" }] - }, - { - "linkId": "8de0f72e-ab72-4d19-918b-fd41d8fb78c0", - "type": "display", - "text": "Pasienten har eneansvar for barn under 18 år eller andre med spesielle omsorgsbehov", - "required": false, - "enableWhen": [ - { - "question": "a50dbc6e-4bc1-4e0c-b4f8-0dbb13c6407e", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1101", "code": "1" } - } - ] - } - ] - } - ] -} diff --git a/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json b/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json deleted file mode 100644 index 3d518a61..00000000 --- a/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1 (9).json +++ /dev/null @@ -1,951 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "255e32d1-2cfc-4033-b714-31a6e15a2899", - "name": "NHN_Test_Repeterende_gtable", - "title": "Repeterende strukturer i tabell gtable", - "version": "0.1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [ - { - "system": "urn:ietf:bcp:47", - "code": "nb-NO", - "display": "Bokmål" - } - ], - "security": [ - { - "code": "3", - "display": "Helsehjelp (Full)", - "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - } - ] - }, - "useContext": [ - { - "code": { - "system": "http://hl7.org/fhir/ValueSet/usage-context-type", - "code": "focus", - "display": "Clinical Focus" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1.8655", - "display": "Repeterende strukturer i tabell gtable" - } - ] - } - } - ], - "contact": [ - { - "name": "http://www.nhn.no" - } - ], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-help", - "display": "Hide help texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", - "valueBoolean": true - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-save-capabilities", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-save-capabilities", - "code": "2" - } - } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { - "code": "1", - "display": "Ja" - }, - { - "code": "2", - "display": "Nei" - }, - { - "code": "3", - "display": "Vet ikke" - } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "4c8b9272-16b7-4fe0-8e16-6f86077709cb", - "type": "group", - "text": "Datakilde 1: repeterende: GTable", - "required": false, - "item": [ - { - "linkId": "ba62ebba-244d-43b0-ac53-39dab184c953", - "type": "group", - "text": "Urin", - "extension": [ - { - "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", - "valueString": "Legg til registering" - } - ], - "required": false, - "repeats": true, - "item": [ - { - "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", - "type": "date", - "text": "Dato", - "required": false - }, - { - "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", - "type": "time", - "text": "Klokkeslett", - "required": false - }, - { - "linkId": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "ml", - "display": "ml", - "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" - } - } - ], - "required": false - }, - { - "linkId": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "gram", - "display": "gram", - "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" - } - } - ], - "required": false - } - ] - } - ] - }, - { - "linkId": "72479ca2-444c-47e8-8288-1025194bfe51", - "type": "group", - "text": "Datakilde 2: repeterende: GTable nr 2 alle datatyper", - "required": false, - "item": [ - { - "linkId": "0d28d6ec-729c-4915-8575-b71074c90c93", - "type": "group", - "text": "Alt skal inn", - "extension": [ - { - "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", - "valueString": "Legg til registering" - } - ], - "required": false, - "repeats": true, - "item": [ - { - "linkId": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", - "type": "choice", - "text": "Alternativer", - "required": false, - "answerValueSet": "#1102" - }, - { - "linkId": "22bf506e-f446-46d2-8b00-3b264f6479b8", - "type": "date", - "text": "Dato", - "required": false - }, - { - "linkId": "522b65ef-02bc-4fcf-8041-1ca0872440ea", - "type": "time", - "text": "Klokkeslett", - "required": false - }, - { - "linkId": "df1e8a08-f0e6-404b-a420-856a416c1e16", - "type": "quantity", - "text": "Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "ml", - "display": "ml", - "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" - } - } - ], - "required": false - }, - { - "linkId": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", - "type": "integer", - "text": "Tall", - "required": false - }, - { - "linkId": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", - "type": "decimal", - "text": "Desimaltall", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", - "valueInteger": 2 - } - ], - "required": false - }, - { - "linkId": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", - "type": "boolean", - "text": "Bekreftelse", - "required": false - } - ] - } - ] - }, - { - "linkId": "0845d569-993b-418a-8a1d-7ce50400c65c", - "type": "group", - "text": "Oppsummering datakilde 1 Sortering dato synkende", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "gtable" - } - ] - } - } - ], - "code": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "code": "DESC", - "display": "Descending" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", - "display": "Milliliter urin" - } - ], - "item": [ - { - "linkId": "ab203143-488d-4757-946b-ddfad942205a", - "type": "date", - "text": "Dato", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", - "operator": "exists" - } - ] - }, - { - "linkId": "01f1e567-abdc-46ee-8a41-cd571e930738", - "type": "time", - "text": "Klokkeslett", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", - "operator": "exists" - } - ] - }, - { - "linkId": "7b1b5765-adb5-475b-a024-d9f68d5c9f8e", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "gram", - "display": "gram", - "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", - "operator": "exists" - } - ] - }, - { - "linkId": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "ml", - "display": "ml", - "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" - } - } - ], - "required": false, - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", - "operator": "exists" - } - ] - } - ] - }, - { - "linkId": "c976f895-7f14-44ce-8438-145cf9637b55", - "type": "group", - "text": "Oppsummering datakilde 1 Sortering dato stigende", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "gtable" - } - ] - } - } - ], - "code": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "27936640-4b9b-4c5b-dea6-79db01fe37e1", - "display": "Dato" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "code": "ASC", - "display": "Ascending" - } - ], - "item": [ - { - "linkId": "27936640-4b9b-4c5b-dea6-79db01fe37e1", - "type": "date", - "text": "Dato", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", - "operator": "exists" - } - ] - }, - { - "linkId": "b7c12f35-c3cc-40f1-fd28-810c957e27e1", - "type": "time", - "text": "Klokkeslett", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", - "operator": "exists" - } - ] - }, - { - "linkId": "97e8e096-b360-4be0-9a7a-58d0cc5e379a", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "gram", - "display": "gram", - "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", - "operator": "exists" - } - ] - }, - { - "linkId": "be9324aa-39e1-4c69-9122-95b9a5359a29", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "ml", - "display": "ml", - "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", - "operator": "exists" - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-2", - "display": "SOT-2" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "linkId": "e806447b-ab9c-49d1-8e16-0eef94235f73", - "type": "group", - "text": "Oppsummering datakilde 2", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "gtable" - } - ] - } - } - ], - "item": [ - { - "linkId": "3918616c-bf21-4c8b-8579-2a68979b4474", - "type": "choice", - "text": "Alternativer", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='20e024a7-98f4-46f7-8224-6d4dcf736a7e').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", - "operator": "exists" - } - ] - }, - { - "linkId": "91f9a598-bb9f-4565-fa4a-518e3cbc65d4", - "type": "date", - "text": "Dato", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='22bf506e-f446-46d2-8b00-3b264f6479b8').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "22bf506e-f446-46d2-8b00-3b264f6479b8", - "operator": "exists" - } - ] - }, - { - "linkId": "82976047-81e4-4b20-da7a-a3dd9f0e797a", - "type": "time", - "text": "Klokkeslett", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='522b65ef-02bc-4fcf-8041-1ca0872440ea').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "522b65ef-02bc-4fcf-8041-1ca0872440ea", - "operator": "exists" - } - ] - }, - { - "linkId": "ec83212c-578f-4308-cdae-8be63d1d9889", - "type": "quantity", - "text": "Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "ml", - "display": "ml", - "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='df1e8a08-f0e6-404b-a420-856a416c1e16').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "df1e8a08-f0e6-404b-a420-856a416c1e16", - "operator": "exists" - } - ] - }, - { - "linkId": "6fee57b2-7f5d-4990-8608-f12540d2cdd6", - "type": "integer", - "text": "Tall", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='a1c1db2b-2779-4e99-88d6-2d02c18d797c').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", - "operator": "exists" - } - ] - }, - { - "linkId": "25bbc49c-3bba-40b3-fb90-8684bcd176e2", - "type": "decimal", - "text": "Desimaltall", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", - "valueInteger": 2 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='81b77ece-6d3f-49cd-8cbf-1ff14de07964').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", - "operator": "exists" - } - ] - }, - { - "linkId": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", - "type": "boolean", - "text": "Bekreftelse", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='df586ed5-0b3b-43eb-ae05-fa1f201d3730').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", - "operator": "=" - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-3", - "display": "SOT-3" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - } - ] -} diff --git a/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1_sorterubg.json b/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1_sorterubg.json deleted file mode 100644 index 65a7a4f0..00000000 --- a/src/preview/skjema/NHN_Test_Repeterende_gtable-nb-NO-v0.1_sorterubg.json +++ /dev/null @@ -1,890 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "255e32d1-2cfc-4033-b714-31a6e15a2899", - "name": "NHN_Test_Repeterende_gtable", - "title": "Repeterende strukturer i tabell gtable", - "description": "Skjema før time for nyrepasient", - "version": "0.1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [ - { - "system": "urn:ietf:bcp:47", - "code": "nb-NO", - "display": "Bokmål" - } - ], - "security": [ - { - "code": "3", - "display": "Helsehjelp (Full)", - "system": "urn:oid:2.16.578.1.12.4.1.1.7618" - }, - { - "code": "1", - "display": "Kun innbygger selv", - "system": "http://helsenorge.no/fhir/KanUtforesAv" - } - ] - }, - "useContext": [ - { - "code": { - "system": "http://hl7.org/fhir/ValueSet/usage-context-type", - "code": "focus", - "display": "Clinical Focus" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1.8655", - "display": "Repeterende strukturer i tabell gtable" - } - ] - } - } - ], - "contact": [ - { - "name": "http://www.nhn.no" - } - ], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", - "code": "1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { - "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", - "code": "1" - } - }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", - "valueReference": { - "reference": "Endpoint/1" - } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-help", - "display": "Hide help texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - }, - { - "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", - "valueBoolean": true - } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { - "code": "1", - "display": "Ja" - }, - { - "code": "2", - "display": "Nei" - }, - { - "code": "3", - "display": "Vet ikke" - } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "4c8b9272-16b7-4fe0-8e16-6f86077709cb", - "type": "group", - "text": "Datakilde 1: repeterende: GTable", - "required": false, - "item": [ - { - "linkId": "ba62ebba-244d-43b0-ac53-39dab184c953", - "type": "group", - "text": "Urin", - "extension": [ - { - "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", - "valueString": "Legg til registering" - } - ], - "required": false, - "repeats": true, - "item": [ - { - "linkId": "888738a0-7aaf-4b6e-b409-faca4ace258a", - "type": "dateTime", - "text": "Dato", - "required": false - }, - { - "linkId": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", - "type": "time", - "text": "Klokkeslett", - "required": false - }, - { - "linkId": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "ml", - "display": "ml", - "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" - } - } - ], - "required": false - }, - { - "linkId": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "gram", - "display": "gram", - "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" - } - } - ], - "required": false - } - ] - } - ] - }, - { - "linkId": "72479ca2-444c-47e8-8288-1025194bfe51", - "type": "group", - "text": "Datakilde 2: repeterende: GTable nr 2 alle datatyper", - "required": false, - "code": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "code": "DESC", - "display": "Descending" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "0d28d6ec-729c-4915-8575-b71074c90c93", - "display": "Alt skal inn" - } - ], - "item": [ - { - "linkId": "0d28d6ec-729c-4915-8575-b71074c90c93", - "type": "group", - "text": "Alt skal inn", - "extension": [ - { - "url": "http://ehelse.no/fhir/StructureDefinition/repeatstext", - "valueString": "Legg til registering" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "gtable" - } - ] - } - } - ], - "required": false, - "repeats": true, - "code": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "code": "DESC", - "display": "Descending" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "22bf506e-f446-46d2-8b00-3b264f6479b8", - "display": "Dato" - } - ], - "item": [ - { - "linkId": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", - "type": "choice", - "text": "Alternativer", - "required": false, - "answerValueSet": "#1102" - }, - { - "linkId": "22bf506e-f446-46d2-8b00-3b264f6479b8", - "type": "dateTime", - "text": "Dato", - "required": false - }, - { - "linkId": "522b65ef-02bc-4fcf-8041-1ca0872440ea", - "type": "time", - "text": "Klokkeslett", - "required": false - }, - { - "linkId": "df1e8a08-f0e6-404b-a420-856a416c1e16", - "type": "quantity", - "text": "Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "ml", - "display": "ml", - "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" - } - } - ], - "required": false - }, - { - "linkId": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", - "type": "integer", - "text": "Tall", - "required": false - }, - { - "linkId": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", - "type": "decimal", - "text": "Desimaltall", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", - "valueInteger": 2 - } - ], - "required": false - }, - { - "linkId": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", - "type": "boolean", - "text": "Bekreftelse", - "required": false - } - ] - } - ] - }, - { - "linkId": "4d6ef3f2-423b-4aee-c43b-a5a37b460269", - "type": "group", - "text": "Oppsummering repeterende GTable Datakilde 1", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary-container" - } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "0845d569-993b-418a-8a1d-7ce50400c65c", - "type": "group", - "text": "Oppsummering Her ligger kode for itemkontrol Gtable", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "gTable" - } - ] - } - } - ], - "code": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "code": "DESC", - "display": "Descending" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "ab203143-488d-4757-946b-ddfad942205a", - "display": "Dato" - } - ], - "item": [ - { - "linkId": "ab203143-488d-4757-946b-ddfad942205a", - "type": "dateTime", - "text": "Dato", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='888738a0-7aaf-4b6e-b409-faca4ace258a').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "888738a0-7aaf-4b6e-b409-faca4ace258a", - "operator": "exists" - } - ], - "code": [ - { - "code": "ab203143-488d-4757-946b-ddfad942205a", - "display": "Dato", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "e90e650f-1928-47b1-a802-a00a5959ee8c" - } - ] - }, - { - "linkId": "01f1e567-abdc-46ee-8a41-cd571e930738", - "type": "time", - "text": "Klokkeslett", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='bcc1eb7c-1db5-44fb-8b79-9118f676c48d').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "bcc1eb7c-1db5-44fb-8b79-9118f676c48d", - "operator": "exists" - } - ] - }, - { - "linkId": "7b1b5765-adb5-475b-a024-d9f68d5c9f8e", - "type": "quantity", - "text": "Vekt våt bleie", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "gram", - "display": "gram", - "system": "urn:uuid:28f031e2-70e4-41fa-92ee-c38757a17b2a" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7b507e06-67f9-4c9f-9e1e-0cca76faecb4').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "7b507e06-67f9-4c9f-9e1e-0cca76faecb4", - "operator": "exists" - } - ] - }, - { - "linkId": "5b9ef3a0-5b68-4cc1-8a98-565cee7ef5eb", - "type": "quantity", - "text": "Milliliter urin", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "ml", - "display": "ml", - "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='ae60e306-fb9a-460c-88a7-4aa4389f74fc').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "ae60e306-fb9a-460c-88a7-4aa4389f74fc", - "operator": "exists" - } - ] - } - ] - } - ] - }, - { - "linkId": "b9431104-1af1-4de4-8b74-9188ec3e4479", - "type": "group", - "text": "Oppsummering repeterende GTable Datakilde 2", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary" - }, - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "summary-container" - } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "e806447b-ab9c-49d1-8e16-0eef94235f73", - "type": "group", - "text": "Oppsummering Her ligger kode for itemkontrol Gtable", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "gTable" - } - ] - } - } - ], - "code": [ - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingColumn", - "code": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", - "display": "Bekreftelse" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", - "code": "ASC", - "display": "Ascending" - } - ], - "item": [ - { - "linkId": "3918616c-bf21-4c8b-8579-2a68979b4474", - "type": "choice", - "text": "Alternativer", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='20e024a7-98f4-46f7-8224-6d4dcf736a7e').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "20e024a7-98f4-46f7-8224-6d4dcf736a7e", - "operator": "exists" - } - ] - }, - { - "linkId": "91f9a598-bb9f-4565-fa4a-518e3cbc65d4", - "type": "dateTime", - "text": "Dato", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='22bf506e-f446-46d2-8b00-3b264f6479b8').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "22bf506e-f446-46d2-8b00-3b264f6479b8", - "operator": "exists" - } - ] - }, - { - "linkId": "82976047-81e4-4b20-da7a-a3dd9f0e797a", - "type": "time", - "text": "Klokkeslett", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='522b65ef-02bc-4fcf-8041-1ca0872440ea').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "522b65ef-02bc-4fcf-8041-1ca0872440ea", - "operator": "exists" - } - ] - }, - { - "linkId": "ec83212c-578f-4308-cdae-8be63d1d9889", - "type": "quantity", - "text": "Quantity", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { - "code": "ml", - "display": "ml", - "system": "urn:uuid:5d337475-47fb-4f5b-9201-af883c2aad49" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='df1e8a08-f0e6-404b-a420-856a416c1e16').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "df1e8a08-f0e6-404b-a420-856a416c1e16", - "operator": "exists" - } - ] - }, - { - "linkId": "6fee57b2-7f5d-4990-8608-f12540d2cdd6", - "type": "integer", - "text": "Tall", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='a1c1db2b-2779-4e99-88d6-2d02c18d797c').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "a1c1db2b-2779-4e99-88d6-2d02c18d797c", - "operator": "exists" - } - ] - }, - { - "linkId": "25bbc49c-3bba-40b3-fb90-8684bcd176e2", - "type": "decimal", - "text": "Desimaltall", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces", - "valueInteger": 2 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='81b77ece-6d3f-49cd-8cbf-1ff14de07964').answer.value" - } - ], - "required": false, - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "81b77ece-6d3f-49cd-8cbf-1ff14de07964", - "operator": "exists" - } - ] - }, - { - "linkId": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", - "type": "boolean", - "text": "Bekreftelse", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "data-receiver" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='df586ed5-0b3b-43eb-ae05-fa1f201d3730').answer.value" - } - ], - "readOnly": true, - "enableWhen": [ - { - "answerBoolean": true, - "question": "df586ed5-0b3b-43eb-ae05-fa1f201d3730", - "operator": "=" - } - ], - "code": [ - { - "code": "1fd60768-94c6-4f19-8949-c4f1b9dfd50d", - "display": "Bekreftelse", - "system": "http://helsenorge.no/fhir/CodeSystem/TableColumn", - "id": "fe726126-fef7-4f3d-8ebd-30a67e24ae39" - } - ] - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-2", - "display": "SOT-2" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", - "code": "sidebar" - } - ] - } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [ - { - "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", - "code": "SOT-3", - "display": "SOT-3" - } - ], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - } - ] -} diff --git a/src/preview/skjema/NHN_Test_Table.json b/src/preview/skjema/NHN_Test_Table.json deleted file mode 100644 index be7e9533..00000000 --- a/src/preview/skjema/NHN_Test_Table.json +++ /dev/null @@ -1,680 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "89fad8fa-7193-4a80-a597-765c7c8a01ab", - "name": "NHN_Test_Table_SvaralternativerStyrer", - "title": "Table_SvaralternativerStyrer", - "version": "0.1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], - "security": [ - { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, - { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } - ] - }, - "useContext": [ - { - "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, - "valueCodeableConcept": { "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Table_SvaralternativerStyrer" }] } - } - ], - "contact": [{ "name": "http://www.nhn.no" }], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" }, - { "code": "3", "display": "Vet ikke" } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "82d5de9c-242d-4649-8c14-3ede137438b3", - "type": "group", - "text": "Data inn Table", - "required": false, - "item": [ - { - "linkId": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "type": "choice", - "text": "Er du syk", - "required": false, - "answerValueSet": "#1102", - "item": [ - { - "linkId": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", - "type": "string", - "text": "Hva feiler det deg?", - "required": false, - "enableWhen": [ - { - "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ] - }, - { - "linkId": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "type": "choice", - "text": "Er du uvel?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } - } - ], - "item": [ - { - "linkId": "7953faf6-55f4-406b-873b-ef167d7a1fbc", - "type": "time", - "text": "Når ble du uvel?", - "required": false, - "enableWhen": [ - { - "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "638764d4-baea-46d1-9e81-d98ff1c56b4d", - "type": "string", - "text": "Hva følte du?", - "required": false, - "enableWhen": [ - { - "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ] - }, - { - "linkId": "2db8bc54-237f-411c-e3c6-448cef6ec29c", - "type": "choice", - "text": "Vet du hvilken dag og hva klokken er?", - "item": [ - { - "linkId": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", - "type": "date", - "text": "Dato", - "required": false, - "enableWhen": [ - { - "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", - "type": "time", - "text": "Klokken", - "required": false, - "enableWhen": [ - { - "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ], - "required": false, - "answerValueSet": "#1102" - }, - { - "linkId": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "type": "choice", - "text": "Kan du notere ned data om deg?", - "item": [ - { - "linkId": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", - "type": "quantity", - "text": "Vekt", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } - } - ], - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "e46b791e-7b83-47c7-8511-0e42751adc0a", - "type": "quantity", - "text": "Høyde", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } - } - ], - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "f79dfabb-a788-445d-ba7a-a846b34e4b17", - "type": "integer", - "text": "Antall ganger du går på tur i løpet av uken", - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "1246b383-dc6e-43d9-a68e-03213b255739", - "type": "boolean", - "text": "Er disse verdiene korrekte, hak av", - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ], - "required": false, - "answerValueSet": "#1102" - } - ] - }, - { - "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", - "type": "group", - "text": "Oppsummering Table - Svaralternativer styrer", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", - "type": "group", - "text": "Oppsummering ", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table" }] - } - } - ], - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "7aef743f-0d06-45dc-9155-6566c203a3b6" - } - ], - "item": [ - { - "linkId": "a58a1ed6-30c3-409c-8578-ffccf6f378d0", - "type": "display", - "text": "Her kommer en oppsummering av dine svar \"Displaytext\"", - "required": false - }, - { - "linkId": "bab6ece9-d978-4601-9169-7dcf9c6e0007", - "type": "choice", - "text": "Er du syk", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='c01b4389-6597-4b81-95d9-f54f61ea2cb8').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", "operator": "exists" }], - "_text": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", "valueMarkdown": "Er du syk" }] - }, - "code": [ - { - "code": "Default", - "display": "Viser kun besvarte alternativer", - "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", - "id": "6530d2e2-9654-4f1d-84a4-65cd3f12941c" - } - ], - "item": [ - { - "linkId": "54338f3c-5922-4ff5-87d9-26477c966e7f", - "type": "string", - "text": "Hva feiler det deg?", - "required": false, - "enableWhen": [ - { - "question": "bab6ece9-d978-4601-9169-7dcf9c6e0007", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='260f5f7c-ada3-49f3-8d50-166ee1ba4afa').answer.value" - } - ], - "readOnly": true - } - ] - }, - { - "linkId": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "type": "choice", - "text": "Er du uvel?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='04ccb620-ba66-4bed-d29a-08fb9e95c41f').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", "operator": "exists" }], - "item": [ - { - "linkId": "7178ee96-a482-4e76-8f22-c3f3b31c08cd", - "type": "time", - "text": "Når ble du uvel?", - "required": false, - "enableWhen": [ - { - "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "7953faf6-55f4-406b-873b-ef167d7a1fbc", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7953faf6-55f4-406b-873b-ef167d7a1fbc').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "7757a10f-e627-40ee-d105-170d07859c2f", - "type": "string", - "text": "Hva følte du?", - "required": false, - "enableWhen": [ - { - "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "638764d4-baea-46d1-9e81-d98ff1c56b4d", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='638764d4-baea-46d1-9e81-d98ff1c56b4d').answer.value" - } - ], - "readOnly": true - } - ] - }, - { - "linkId": "8fbf52cc-3bf3-4fa1-d1be-f2dff1bc0b24", - "type": "choice", - "text": "Vet du hvilken dag og hva klokken er?", - "item": [ - { - "linkId": "f49cf9ae-0ee5-4947-86b9-b2e82380f1ac", - "type": "date", - "text": "Dato", - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", "operator": "exists" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='29c5579a-cf2b-43b9-f55c-0d239ccaf02c').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "8b86f173-d126-4c73-8c89-10ee9cc45535", - "type": "time", - "text": "Klokken", - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", "operator": "exists" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='9acb4110-ea0a-48b4-985c-fdb2cf572de3').answer.value" - } - ], - "readOnly": true - } - ], - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='2db8bc54-237f-411c-e3c6-448cef6ec29c').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", "operator": "exists" }] - }, - { - "linkId": "1106fee1-475a-4018-f554-382985276782", - "type": "choice", - "text": "Kan du notere ned data om deg?", - "item": [ - { - "linkId": "5b935dbb-9041-480e-88e6-ef76ec1fb102", - "type": "quantity", - "text": "Vekt", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='56800262-18bb-4d0f-8a08-ea22f5fc4e01').answer.value" - } - ], - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", "operator": "exists" }], - "readOnly": true - }, - { - "linkId": "657c9c87-b5f9-4b0b-8fad-91ab8697f039", - "type": "quantity", - "text": "Høyde", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='e46b791e-7b83-47c7-8511-0e42751adc0a').answer.value" - } - ], - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "e46b791e-7b83-47c7-8511-0e42751adc0a", "operator": "exists" }], - "readOnly": true - }, - { - "linkId": "c2be52a9-f7d6-4ea1-bdcf-8c5192ed25a5", - "type": "integer", - "text": "Antall ganger du går på tur i løpet av uken", - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "f79dfabb-a788-445d-ba7a-a846b34e4b17", "operator": "exists" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f79dfabb-a788-445d-ba7a-a846b34e4b17').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "53847e9d-4cd4-4a92-8a8f-9c4fcd168e81", - "type": "boolean", - "text": "Er disse verdiene korrekte, hak av", - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "1246b383-dc6e-43d9-a68e-03213b255739", "operator": "=" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='1246b383-dc6e-43d9-a68e-03213b255739').answer.value" - } - ], - "readOnly": true - } - ], - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "operator": "exists" }], - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='015337fd-a035-45ab-8fd5-286a2a5be7a1').answer.value" - } - ], - "readOnly": true - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - } - ] -} diff --git a/src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json b/src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json deleted file mode 100644 index cd14cef5..00000000 --- a/src/preview/skjema/NHN_Test_Table_SvaralternativerStyrer.json +++ /dev/null @@ -1,891 +0,0 @@ -{ - "resourceType": "Questionnaire", - "language": "nb-NO", - "id": "89fad8fa-7193-4a80-a597-765c7c8a01ab", - "name": "NHN_Test_Table_SvaralternativerStyrer", - "title": "Table_SvaralternativerStyrer", - "version": "0.1", - "status": "draft", - "publisher": "NHN", - "meta": { - "profile": ["http://ehelse.no/fhir/StructureDefinition/sdf-Questionnaire"], - "tag": [{ "system": "urn:ietf:bcp:47", "code": "nb-NO", "display": "Bokmål" }], - "security": [ - { "code": "3", "display": "Helsehjelp (Full)", "system": "urn:oid:2.16.578.1.12.4.1.1.7618" }, - { "code": "1", "display": "Kun innbygger selv", "system": "http://helsenorge.no/fhir/KanUtforesAv" } - ] - }, - "useContext": [ - { - "code": { "system": "http://hl7.org/fhir/ValueSet/usage-context-type", "code": "focus", "display": "Clinical Focus" }, - "valueCodeableConcept": { "coding": [{ "system": "urn:oid:2.16.578.1.12.4.1.1.8655", "display": "Table_SvaralternativerStyrer" }] } - } - ], - "contact": [{ "name": "http://www.nhn.no" }], - "subjectType": ["Patient"], - "extension": [ - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-sidebar", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-sidebar", "code": "1" } - }, - { - "url": "http://helsenorge.no/fhir/StructureDefinition/sdf-information-message", - "valueCoding": { "system": "http://helsenorge.no/fhir/ValueSet/sdf-information-message", "code": "1" } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-endpoint", "valueReference": { "reference": "Endpoint/1" } }, - { - "url": "http://helsenorge.no/fhir/StructureDefintion/sdf-itemControl-visibility", - "valueCodeableConcept": { - "coding": [ - { "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", "code": "hide-help", "display": "Hide help texts" }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sublabel", - "display": "Hide sublabel texts" - }, - { - "system": "http://helsenorge.no/fhir/CodeSystem/AttachmentRenderOptions", - "code": "hide-sidebar", - "display": "Hide sidebar texts" - } - ] - } - }, - { "url": "http://ehelse.no/fhir/StructureDefinition/sdf-generatepdf", "valueBoolean": true } - ], - "date": "2023-03-30T00:00:00+02:00", - "contained": [ - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1102", - "version": "1.0", - "name": "urn:oid:1102", - "title": "Ja / Nei / Vet ikke (structor)", - "status": "draft", - "publisher": "Direktoratet for e-helse", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" }, - { "code": "3", "display": "Vet ikke" } - ] - } - ] - } - }, - { - "url": "http://ehelse.no/fhir/ValueSet/Predefined", - "resourceType": "ValueSet", - "id": "1101", - "version": "1.0", - "name": "urn:oid:1101", - "title": "Ja / Nei (structor)", - "status": "draft", - "publisher": "NHN", - "compose": { - "include": [ - { - "system": "urn:oid:2.16.578.1.12.4.1.1101", - "concept": [ - { "code": "1", "display": "Ja" }, - { "code": "2", "display": "Nei" } - ] - } - ] - } - } - ], - "item": [ - { - "linkId": "82d5de9c-242d-4649-8c14-3ede137438b3", - "type": "group", - "text": "Data inn Table", - "required": false, - "item": [ - { - "linkId": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "type": "choice", - "text": "Er du syk", - "required": false, - "answerValueSet": "#1102", - "item": [ - { - "linkId": "bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c", - "type": "choice", - "text": "Velg sykdom Denne er feil", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "8cdcaae1-19d0-4267-82a0-81cff288ea07", - "code": "1", - "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", - "display": "Hjerte" - } - }, - { - "valueCoding": { - "id": "810bbacf-80c2-46ec-8332-31b7ec95e00c", - "code": "2", - "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", - "display": "Lunge" - } - }, - { - "valueCoding": { - "id": "aa94ba53-57b5-4afa-8351-65b1d41d78c8", - "code": "3", - "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", - "display": "Mage" - } - } - ], - "code": [ - { - "code": "Full", - "display": "Full vising", - "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", - "id": "615dddda-8c98-4ccd-ac63-adfe30f3ab70" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } - } - ] - }, - { - "linkId": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", - "type": "string", - "text": "Hva feiler det deg?", - "required": false, - "enableWhen": [ - { - "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "2deae55a-f86a-4e41-8b42-8b1abfe5d538", - "type": "choice", - "text": "Er du veldig syk? Denne er feil", - "required": false, - "answerValueSet": "#1101", - "enableWhen": [ - { - "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ] - }, - { - "linkId": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "type": "choice", - "text": "Er du uvel?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }] - } - } - ], - "item": [ - { - "linkId": "7953faf6-55f4-406b-873b-ef167d7a1fbc", - "type": "time", - "text": "Når ble du uvel?", - "required": false, - "enableWhen": [ - { - "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "638764d4-baea-46d1-9e81-d98ff1c56b4d", - "type": "string", - "text": "Hva følte du?", - "required": false, - "enableWhen": [ - { - "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ] - }, - { - "linkId": "2db8bc54-237f-411c-e3c6-448cef6ec29c", - "type": "choice", - "text": "Vet du hvilken dag og hva klokken er?", - "required": false, - "answerValueSet": "#1102", - "item": [ - { - "linkId": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", - "type": "date", - "text": "Dato", - "required": false, - "enableWhen": [ - { - "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", - "type": "time", - "text": "Klokken", - "required": false, - "enableWhen": [ - { - "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ] - }, - { - "linkId": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "type": "choice", - "text": "Kan du notere ned data om deg?", - "required": false, - "answerValueSet": "#1102", - "item": [ - { - "linkId": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", - "type": "quantity", - "text": "Vekt", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } - } - ], - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "e46b791e-7b83-47c7-8511-0e42751adc0a", - "type": "quantity", - "text": "Høyde", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } - } - ], - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "f79dfabb-a788-445d-ba7a-a846b34e4b17", - "type": "integer", - "text": "Antall ganger du går på tur i løpet av uken", - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - }, - { - "linkId": "1246b383-dc6e-43d9-a68e-03213b255739", - "type": "boolean", - "text": "Er disse verdiene korrekte, hak av", - "required": false, - "enableWhen": [ - { - "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - } - ] - } - ] - }, - { - "linkId": "38fd12b9-414c-4bce-b909-44aae9b762ac", - "type": "choice", - "text": "Likt kodeverk egendefinert", - "required": false, - "answerOption": [ - { - "valueCoding": { - "id": "6ee199d1-2e0d-4599-821f-7d4b0b3808b4", - "code": "1", - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "display": "Ja" - } - }, - { - "valueCoding": { - "id": "24224321-1c3e-46d5-835f-6d0edd04744e", - "code": "2", - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "display": "Nei" - } - }, - { - "valueCoding": { - "id": "23396ebd-3e85-4913-ab3c-5b696dae5858", - "code": "3", - "system": "urn:oid:2.16.578.1.12.4.1.1102", - "display": "Vet ikke" - } - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } - } - ], - "linkId": "c5c27efb-76d7-4f1e-b7f9-cbe454846e8b", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-2", "display": "SOT-2" }], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Helse Sør-Øst er ansvarlig for innholdet i skjemaet. Se kontaktinformasjon i innkallingsbrevet ved eventuelle spørsmål." - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - }, - { - "linkId": "f517041f-82d0-4680-b21a-c4462719a0aa", - "type": "group", - "text": "Oppsummering Table - Svaralternativer styrer", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "summary-container" } - ] - } - } - ], - "required": false, - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "160c445f-80c0-422e-e0c8-2b08354528bc" - } - ], - "item": [ - { - "linkId": "44d1fa07-fe8c-4550-a497-bb1be9d92da7", - "type": "group", - "text": "Oppsummering ", - "required": false, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "table" }] - } - } - ], - "code": [ - { - "code": "1", - "display": "Default", - "system": "http://helsenorge.no/fhir/CodeSystem/RenderOptions", - "id": "7aef743f-0d06-45dc-9155-6566c203a3b6" - }, - { "system": "http://helsenorge.no/fhir/CodeSystem/TableOrderingFunctions", "code": "DESC", "display": "Descending" } - ], - "item": [ - { - "linkId": "046d08ef-d812-4693-8dba-f349bdfafb15", - "type": "group", - "text": "Gruppe 1", - "item": [ - { - "linkId": "bab6ece9-d978-4601-9169-7dcf9c6e0007", - "type": "choice", - "text": "Er du syk", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='c01b4389-6597-4b81-95d9-f54f61ea2cb8').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", "operator": "exists" }], - "_text": { - "extension": [{ "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", "valueMarkdown": "Er du syk" }] - }, - "code": [ - { - "code": "Default", - "display": "Viser kun besvarte alternativer", - "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", - "id": "6530d2e2-9654-4f1d-84a4-65cd3f12941c" - } - ], - "item": [ - { - "linkId": "0b7b7b2d-9cec-40d7-e428-7cc0f34fe6f5", - "type": "choice", - "text": "Er du veldig syk?", - "required": false, - "answerValueSet": "#1101", - "enableWhen": [{ "answerBoolean": true, "question": "2deae55a-f86a-4e41-8b42-8b1abfe5d538", "operator": "exists" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='2deae55a-f86a-4e41-8b42-8b1abfe5d538').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "54338f3c-5922-4ff5-87d9-26477c966e7f", - "type": "string", - "text": "Hva feiler det deg?", - "required": false, - "enableWhen": [ - { - "question": "bab6ece9-d978-4601-9169-7dcf9c6e0007", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "260f5f7c-ada3-49f3-8d50-166ee1ba4afa", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='260f5f7c-ada3-49f3-8d50-166ee1ba4afa').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "be541d70-cc91-4254-8268-0baa7f1c76b9", - "type": "open-choice", - "text": "Velg sykdom", - "required": false, - "enableWhen": [ - { - "question": "c01b4389-6597-4b81-95d9-f54f61ea2cb8", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c", "operator": "exists" } - ], - "answerOption": [ - { - "valueCoding": { - "id": "8cdcaae1-19d0-4267-82a0-81cff288ea07", - "code": "hjerte", - "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", - "display": "Hjerte" - } - }, - { - "valueCoding": { - "id": "810bbacf-80c2-46ec-8332-31b7ec95e00c", - "code": "lunge-", - "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", - "display": "Lunge " - } - }, - { - "valueCoding": { - "id": "aa94ba53-57b5-4afa-8351-65b1d41d78c8", - "code": "mage", - "system": "urn:uuid:752541dd-c6b2-471f-86a3-40c892c20b45", - "display": "Mage" - } - } - ], - "code": [ - { - "code": "Full", - "display": "Full vising", - "system": "http://helsenorge.no/fhir/CodeSystem/ChoiceRenderOptions", - "id": "615dddda-8c98-4ccd-ac63-adfe30f3ab70" - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='bc8f7b02-2bd7-47ff-8a6d-341ded6aa62c').answer.value" - } - ], - "readOnly": true - } - ] - } - ], - "required": false - }, - { - "linkId": "79c8d80e-325a-44a8-9fa2-adbe9ada594d", - "type": "group", - "text": "Gruppe 2", - "item": [ - { - "linkId": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "type": "choice", - "text": "Er du uvel?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "check-box" }, - { "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" } - ] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='04ccb620-ba66-4bed-d29a-08fb9e95c41f').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "04ccb620-ba66-4bed-d29a-08fb9e95c41f", "operator": "exists" }], - "item": [ - { - "linkId": "7178ee96-a482-4e76-8f22-c3f3b31c08cd", - "type": "time", - "text": "Når ble du uvel?", - "required": false, - "enableWhen": [ - { - "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "7953faf6-55f4-406b-873b-ef167d7a1fbc", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='7953faf6-55f4-406b-873b-ef167d7a1fbc').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "7757a10f-e627-40ee-d105-170d07859c2f", - "type": "string", - "text": "Hva følte du?", - "required": false, - "enableWhen": [ - { - "question": "3528fa8b-c15c-4e8c-86dc-8380bd37ec3d", - "operator": "=", - "answerCoding": { "system": "urn:oid:2.16.578.1.12.4.1.1102", "code": "1" } - }, - { "answerBoolean": true, "question": "638764d4-baea-46d1-9e81-d98ff1c56b4d", "operator": "exists" } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='638764d4-baea-46d1-9e81-d98ff1c56b4d').answer.value" - } - ], - "readOnly": true - } - ] - } - ], - "required": false - }, - { - "linkId": "8fbf52cc-3bf3-4fa1-d1be-f2dff1bc0b24", - "type": "choice", - "text": "Vet du hvilken dag og hva klokken er?", - "required": false, - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='2db8bc54-237f-411c-e3c6-448cef6ec29c').answer.value" - } - ], - "readOnly": true, - "enableWhen": [{ "answerBoolean": true, "question": "2db8bc54-237f-411c-e3c6-448cef6ec29c", "operator": "exists" }], - "item": [ - { - "linkId": "f49cf9ae-0ee5-4947-86b9-b2e82380f1ac", - "type": "date", - "text": "Dato", - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "29c5579a-cf2b-43b9-f55c-0d239ccaf02c", "operator": "exists" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='29c5579a-cf2b-43b9-f55c-0d239ccaf02c').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "8b86f173-d126-4c73-8c89-10ee9cc45535", - "type": "time", - "text": "Klokken", - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "9acb4110-ea0a-48b4-985c-fdb2cf572de3", "operator": "exists" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='9acb4110-ea0a-48b4-985c-fdb2cf572de3').answer.value" - } - ], - "readOnly": true - } - ] - }, - { - "linkId": "1106fee1-475a-4018-f554-382985276782", - "type": "choice", - "text": "Kan du notere ned data om deg?", - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "015337fd-a035-45ab-8fd5-286a2a5be7a1", "operator": "exists" }], - "answerValueSet": "#1102", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='015337fd-a035-45ab-8fd5-286a2a5be7a1').answer.value" - } - ], - "readOnly": true, - "item": [ - { - "linkId": "5b935dbb-9041-480e-88e6-ef76ec1fb102", - "type": "quantity", - "text": "Vekt", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "kg", "display": "kilo", "system": "http://unitsofmeasure.org" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='56800262-18bb-4d0f-8a08-ea22f5fc4e01').answer.value" - } - ], - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "56800262-18bb-4d0f-8a08-ea22f5fc4e01", "operator": "exists" }], - "readOnly": true - }, - { - "linkId": "657c9c87-b5f9-4b0b-8fad-91ab8697f039", - "type": "quantity", - "text": "Høyde", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", - "valueCoding": { "code": "cm", "display": "centimeter", "system": "http://unitsofmeasure.org" } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='e46b791e-7b83-47c7-8511-0e42751adc0a').answer.value" - } - ], - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "e46b791e-7b83-47c7-8511-0e42751adc0a", "operator": "exists" }], - "readOnly": true - }, - { - "linkId": "c2be52a9-f7d6-4ea1-bdcf-8c5192ed25a5", - "type": "integer", - "text": "Antall ganger du går på tur i løpet av uken", - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "f79dfabb-a788-445d-ba7a-a846b34e4b17", "operator": "exists" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='f79dfabb-a788-445d-ba7a-a846b34e4b17').answer.value" - } - ], - "readOnly": true - }, - { - "linkId": "53847e9d-4cd4-4a92-8a8f-9c4fcd168e81", - "type": "boolean", - "text": "Er disse verdiene korrekte, hak av", - "required": false, - "enableWhen": [{ "answerBoolean": true, "question": "1246b383-dc6e-43d9-a68e-03213b255739", "operator": "=" }], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "data-receiver" }] - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "QuestionnaireResponse.descendants().where(linkId='1246b383-dc6e-43d9-a68e-03213b255739').answer.value" - } - ], - "readOnly": true - } - ] - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { "coding": [{ "system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control", "code": "sidebar" }] } - } - ], - "linkId": "cf1c48a4-93a9-4a2d-fa5a-b5abfcc708d0", - "code": [{ "system": "http://ehelse.no/fhir/ValueSet/SOTHeaders", "code": "SOT-3", "display": "SOT-3" }], - "_text": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/rendering-markdown", - "valueMarkdown": "Sykehuset du sender skjemaet til er dataansvarlig for personopplysningene oppgitt i skjemaet. \n[Les mer om personvern hos mottaker her](https://www.helse-sorost.no/informasjonssikkerhet-og-personvern/personvernerklering)" - } - ] - }, - "type": "text", - "required": false, - "repeats": false, - "readOnly": false - } - ] -} From 4fec148188f77a0a5804a94a21b63a60c0fe1138 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:38:30 +0100 Subject: [PATCH 80/83] chagnes --- CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index 39eed1a3..ff9270d9 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,10 @@ - New group extensions table, table-hn1, table-hn2, gtable. + - Shows data as tables in different formats. + +- Preview mode for development with vite. + ## 14.1.0-beta03 --- From ed03a0a5bbfc7e6b847e40d83a8e0cfef833c39e Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:40:32 +0100 Subject: [PATCH 81/83] update changelog --- CHANGES | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/CHANGES b/CHANGES index ff9270d9..066310c6 100644 --- a/CHANGES +++ b/CHANGES @@ -2,37 +2,15 @@ --- -- New group extensions table, table-hn1, table-hn2, gtable. - - - Shows data as tables in different formats. +- Has possibility to display summary as table. Can support types Table, Table-HN1, Table-HN2 and GTable +- Support for ordering in GTable, Table-HN2 og Table - Preview mode for development with vite. -## 14.1.0-beta03 - ---- - -- Bugfix: fix sorting of different itemtypes in tables, dates, quantity, string and numbers - -## 14.1.0-beta02 - ---- - -- Bugfix: fix calculated scoring fields being showed in tables, also added a linebreak after each table - -## 14.1.0-beta01 - ---- - -- fixed the sorting for tables and also changed logic for standardtable - ## 14.1.0 --- -- Has possibility to display summary as table. Can support types Table, Table-HN1, Table-HN2 and GTable -- Support for ordering in GTable, Table-HN2 og Table - ## 14.0.10 --- From 31a318d71e626f587f3e244009713cf4eefcaca2 Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:42:53 +0100 Subject: [PATCH 82/83] cleaned up the changes frile --- CHANGES | 88 --------------------------------------------------------- 1 file changed, 88 deletions(-) diff --git a/CHANGES b/CHANGES index 066310c6..0f90ea50 100644 --- a/CHANGES +++ b/CHANGES @@ -59,25 +59,6 @@ - fixed slidercomponent not showing children -## 14.0.1-beta01 - -- removing singlequoutes from units on quantity in table -- change the date output to norwegian format - ---- - -## 14.0.0-beta02 - -- Added table feature to new major version - ---- - -## 14.0.0-beta01 - -- Added table feature to new major version - ---- - ## 14.0.0 --- @@ -85,75 +66,6 @@ - Added component for slider view - Upgraded Helsenorge packages to v29 -## 13.2.4-beta08 - ---- - -- remove time test - -## 13.2.4-beta07 - ---- - -- fix failing test - -## 13.2.4-beta06 - ---- - -- fix HN2-TABLE bug with enablewhen -- added type for QuestionnaireItemWithAnswers -- fix datetime formatting - -## 13.2.4-beta05 - ---- - -- fix displaying the correct values in tables -- fix standardtable to be displayed correct with child items - -## 13.2.4-beta04 - ---- - -- bump to correct version - -## 13.2.4-beta03 - ---- - -- added displaying of table with the "table" extension set on group in fhir schema - -## 13.2.4-beta01 - ---- - -- added package to mock structuredClone in tests - -## 13.2.2-beta06 - ---- - -- added package to mock structuredClone in tests - -## 13.2.2-beta05 - ---- - -- correct version - -## 13.2.2-beta04 - ---- - -- Added support for table-hn2 and table-hn1 code in summary. - -## 13.2.2-beta01 - ---- - -- Added a preview for refero using vite. - ## 13.2.2 --- From cdba952efba25c948645bea8451d950a45ebe9cd Mon Sep 17 00:00:00 2001 From: rinrub <99617143+rinrub@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:45:05 +0100 Subject: [PATCH 83/83] removed beta tags and cleand up --- CHANGES | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CHANGES b/CHANGES index 0f90ea50..033cc431 100644 --- a/CHANGES +++ b/CHANGES @@ -7,10 +7,6 @@ - Preview mode for development with vite. -## 14.1.0 - ---- - ## 14.0.10 ---