From 13475e3c0c1e598151d1ceae2408ca015b6843e3 Mon Sep 17 00:00:00 2001 From: Patrick LaRocque Date: Mon, 11 Dec 2023 12:49:21 -0500 Subject: [PATCH 01/14] Fix issues with checking required fields --- src/views/Questionnaire/QuestionnaireForm.tsx | 3 ++- src/views/Questionnaire/SmartApp.tsx | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/Questionnaire/QuestionnaireForm.tsx b/src/views/Questionnaire/QuestionnaireForm.tsx index 9cd434b..5298168 100644 --- a/src/views/Questionnaire/QuestionnaireForm.tsx +++ b/src/views/Questionnaire/QuestionnaireForm.tsx @@ -145,7 +145,8 @@ export function QuestionnaireForm(props: QuestionnaireProps) { loadAndMergeForms(savedResponse); const formErrors = LForms.Util.checkValidity(); setFormValidationErrors(formErrors == null ? [] : formErrors); - document.addEventListener('change', event => { + + document.addEventListener('click', event => { if ( props.filterChecked && event.target instanceof Element && diff --git a/src/views/Questionnaire/SmartApp.tsx b/src/views/Questionnaire/SmartApp.tsx index e6cf402..bb73bd1 100644 --- a/src/views/Questionnaire/SmartApp.tsx +++ b/src/views/Questionnaire/SmartApp.tsx @@ -348,7 +348,9 @@ export function SmartApp(props: SmartAppProps) { const updateRequired = (defaultFilter: boolean) => { let checked: boolean, requiredCheckbox: HTMLInputElement; if (!defaultFilter) { - requiredCheckbox = document.getElementById('required-fields-checkbox') as HTMLInputElement; + const requiredCheckbox = document.getElementById( + questionnaire ? `required-fields-checkbox-${questionnaire.id}` : 'required-fields-checkbox' + ) as HTMLInputElement; checked = requiredCheckbox ? requiredCheckbox.checked : false; } else { checked = true; From e76c973371fd0a2dc2e48a59a73cf6020aaad387 Mon Sep 17 00:00:00 2001 From: Patrick LaRocque Date: Mon, 11 Dec 2023 15:05:01 -0500 Subject: [PATCH 02/14] run prettier --- src/views/Questionnaire/QuestionnaireForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Questionnaire/QuestionnaireForm.tsx b/src/views/Questionnaire/QuestionnaireForm.tsx index 5298168..8990b30 100644 --- a/src/views/Questionnaire/QuestionnaireForm.tsx +++ b/src/views/Questionnaire/QuestionnaireForm.tsx @@ -145,7 +145,7 @@ export function QuestionnaireForm(props: QuestionnaireProps) { loadAndMergeForms(savedResponse); const formErrors = LForms.Util.checkValidity(); setFormValidationErrors(formErrors == null ? [] : formErrors); - + document.addEventListener('click', event => { if ( props.filterChecked && From a12c4be36822f21a338dd5a2b9924e8152d14b3d Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 29 Dec 2023 17:14:06 -0500 Subject: [PATCH 03/14] Remove auto assign since we don't use it anymore --- .github/auto_assign.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/auto_assign.yml diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml deleted file mode 100644 index 407ed6d..0000000 --- a/.github/auto_assign.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Set to true to add reviewers to pull requests -addReviewers: true - -# Set to true to add assignees to pull requests -addAssignees: false - -# A list of reviewers to be added to pull requests (GitHub user name) -reviewers: - - zacharyrobin - - KeeyanGhoreshi - - smalho01 - - plarocque4 - - kennyEung - -# A number of reviewers added to the pull request, Set to 0 to add all reviewers -numberOfReviewers: 0 From 06358a28e3ebc45608215df3ef2ded9ef7d5c1e3 Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 29 Dec 2023 17:16:03 -0500 Subject: [PATCH 04/14] Remove unused file --- README.old.md | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 README.old.md diff --git a/README.old.md b/README.old.md deleted file mode 100644 index 7792133..0000000 --- a/README.old.md +++ /dev/null @@ -1,2 +0,0 @@ -# rems-smart-on-fhir -REMS SMART on FHIR Application From bb4b4e25787ee4f1cab9722081c75010cc0d63d9 Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 29 Dec 2023 17:16:54 -0500 Subject: [PATCH 05/14] Alphabetize env vars and remove comment since its text is duplicated in the README --- .env | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.env b/.env index c65871f..307a966 100644 --- a/.env +++ b/.env @@ -1,20 +1,14 @@ -# Development URLS - -REACT_APP_REMS_ADMIN_SERVER_BASE = http://localhost:8090 -REACT_APP_REMS_HOOKS_PATH = /cds-services/rems- -REACT_APP_PHARMACY_SERVER_BASE = http://localhost:5051 -REACT_APP_ETASU_STATUS_ENABLED = true -REACT_APP_PHARMACY_STATUS_ENABLED = true -REACT_APP_SEND_RX_ENABLED = true -REACT_APP_SEND_FHIR_AUTH_ENABLED = false +BROWSER=none +GENERATE_SOURCEMAP=false PORT=4040 +REACT_APP_CLIENT_SCOPES = launch openid profile user/Patient.read patient/Patient.read user/Practitioner.read REACT_APP_DEFAULT_CLIENT_ID = app-login REACT_APP_DEFAULT_ISS = http://localhost:8080/test-ehr/r4 -REACT_APP_CLIENT_SCOPES = launch openid profile user/Patient.read patient/Patient.read user/Practitioner.read REACT_APP_DEVELOPER_MODE = true -GENERATE_SOURCEMAP=false -BROWSER=none - -# To Override start command: -# REACT_APP_REMS_HOOKS_PATH=http://example.com PORT=6000 npm start -# Note that .env values can only be accessed by react app starting with 'REACT_APP_' \ No newline at end of file +REACT_APP_ETASU_STATUS_ENABLED = true +REACT_APP_PHARMACY_SERVER_BASE = http://localhost:5051 +REACT_APP_PHARMACY_STATUS_ENABLED = true +REACT_APP_REMS_ADMIN_SERVER_BASE = http://localhost:8090 +REACT_APP_REMS_HOOKS_PATH = /cds-services/rems- +REACT_APP_SEND_FHIR_AUTH_ENABLED = false +REACT_APP_SEND_RX_ENABLED = true From bc9e7f6ea3aeb9ce05858f576d928f2402c4bf6d Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 29 Dec 2023 17:17:11 -0500 Subject: [PATCH 06/14] Run Prettier --- README.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 5c750ba..26882c3 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ # Getting Started with REMS SMART on FHIR -The REMS SMART on FHIR application can be launched from an EHR that does not support CDS Hooks. The application will interact with the REMS Administrator using CDS Hooks on behalf of the EHR, allowing the provider to complete the normal REMS workflow. +The REMS SMART on FHIR application can be launched from an EHR that does not support CDS Hooks. The application will interact with the REMS Administrator using CDS Hooks on behalf of the EHR, allowing the provider to complete the normal REMS workflow. This application must be launched by an EHR or SMART sandbox imitating an EHR. ## Initialization + After cloning the repository, the submodules must be initialized. To do this you can run: ### `git submodule update --init` @@ -22,25 +23,25 @@ The page will reload if you make edits.\ You will also see any lint errors in the console. ### How To Override Defaults + The .env file contains the default URI paths, these can be overwritten from the start command as follows: - `REACT_APP_REMS_HOOKS_PATH=http://example.com PORT=6000 npm start` - -Following are a list of modifiable paths: +`REACT_APP_REMS_HOOKS_PATH=http://example.com PORT=6000 npm start` -| URI Name | Default | -| ----------- | ----------- | -| REACT_APP_REMS_ADMIN_SERVER_BASE | `http://localhost:8090` | -| REACT_APP_REMS_HOOKS_PATH | `/cds-services/rems-order-sign` | -| REACT_APP_PHARMACY_SERVER_BASE | `http://localhost:5051` | -| REACT_APP_ETASU_STATUS_ENABLED | `true` | -| REACT_APP_PHARMACY_STATUS_ENABLED | `true` | -| REACT_APP_DEVELOPER_MODE | `true` | -| REACT_APP_SEND_RX_ENABLED | `true` | -| REACT_APP_SEND_FHIR_AUTH_ENABLED | `false` | -| PORT | `4040`| +Following are a list of modifiable paths: - *Note that .env values can only be accessed by react app starting with `REACT_APP_`* +| URI Name | Default | +| --------------------------------- | ------------------------------- | +| REACT_APP_REMS_ADMIN_SERVER_BASE | `http://localhost:8090` | +| REACT_APP_REMS_HOOKS_PATH | `/cds-services/rems-order-sign` | +| REACT_APP_PHARMACY_SERVER_BASE | `http://localhost:5051` | +| REACT_APP_ETASU_STATUS_ENABLED | `true` | +| REACT_APP_PHARMACY_STATUS_ENABLED | `true` | +| REACT_APP_DEVELOPER_MODE | `true` | +| REACT_APP_SEND_RX_ENABLED | `true` | +| REACT_APP_SEND_FHIR_AUTH_ENABLED | `false` | +| PORT | `4040` | +_Note that .env values can only be accessed by react app starting with `REACT_APP_`_ ### `npm test` @@ -56,4 +57,3 @@ The build is minified and the filenames include the hashes.\ Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - From dc0992a154cd90f1942cc94c33c3e369f497268d Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 29 Dec 2023 17:22:51 -0500 Subject: [PATCH 07/14] Add new env vars and alphabetize them, update links, update section on overriding env vars --- README.md | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 26882c3..718bf13 100644 --- a/README.md +++ b/README.md @@ -25,28 +25,33 @@ You will also see any lint errors in the console. ### How To Override Defaults The .env file contains the default URI paths, these can be overwritten from the start command as follows: -`REACT_APP_REMS_HOOKS_PATH=http://example.com PORT=6000 npm start` +`REACT_APP_LAUNCH_URL=http://example.com PORT=6000 npm start` or by specifying the environment variables and desired values in a `.env.local`. Following are a list of modifiable paths: -| URI Name | Default | -| --------------------------------- | ------------------------------- | -| REACT_APP_REMS_ADMIN_SERVER_BASE | `http://localhost:8090` | -| REACT_APP_REMS_HOOKS_PATH | `/cds-services/rems-order-sign` | -| REACT_APP_PHARMACY_SERVER_BASE | `http://localhost:5051` | -| REACT_APP_ETASU_STATUS_ENABLED | `true` | -| REACT_APP_PHARMACY_STATUS_ENABLED | `true` | -| REACT_APP_DEVELOPER_MODE | `true` | -| REACT_APP_SEND_RX_ENABLED | `true` | -| REACT_APP_SEND_FHIR_AUTH_ENABLED | `false` | -| PORT | `4040` | - -_Note that .env values can only be accessed by react app starting with `REACT_APP_`_ +| URI Name | Default | +| --------------------------------- | ------------------------------------------------------------------------------------- | +| BROWSER | `none` | +| GENERATE_SOURCEMAP | `false` | +| PORT | `4040` | +| REACT_APP_CLIENT_SCOPES | `launch openid profile user/Patient.read patient/Patient.read user/Practitioner.read` | +| REACT_APP_DEFAULT_CLIENT_ID | `app-login` | +| REACT_APP_DEFAULT_ISS | `http://localhost:8080/test-ehr/r4` | +| REACT_APP_DEVELOPER_MODE | `true` | +| REACT_APP_ETASU_STATUS_ENABLED | `true` | +| REACT_APP_PHARMACY_SERVER_BASE | `http://localhost:5051` | +| REACT_APP_PHARMACY_STATUS_ENABLED | `true` | +| REACT_APP_REMS_ADMIN_SERVER_BASE | `http://localhost:8090` | +| REACT_APP_REMS_HOOKS_PATH | `/cds-services/rems-` | +| REACT_APP_SEND_FHIR_AUTH_ENABLED | `false` | +| REACT_APP_SEND_RX_ENABLED | `true` | + +_Note that .env values can only be accessed by the React app starting with `REACT_APP_`\_ ### `npm test` Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. +See the section about [running tests](https://create-react-app.dev/docs/running-tests/) for more information. ### `npm run build` @@ -56,4 +61,4 @@ It correctly bundles React in production mode and optimizes the build for the be The build is minified and the filenames include the hashes.\ Your app is ready to be deployed! -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. +See the section about [deployment](https://create-react-app.dev/docs/deployment/) for more information. From a10abb9e59b8e7fbc730761575e634d89e6235e6 Mon Sep 17 00:00:00 2001 From: Joyce Quach Date: Fri, 29 Dec 2023 17:24:26 -0500 Subject: [PATCH 08/14] Fix grammar --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 718bf13..4a0fd6b 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ You will also see any lint errors in the console. ### How To Override Defaults -The .env file contains the default URI paths, these can be overwritten from the start command as follows: -`REACT_APP_LAUNCH_URL=http://example.com PORT=6000 npm start` or by specifying the environment variables and desired values in a `.env.local`. +The .env file contains the default URI paths, which can be overwritten from the start command as follows: +a) `REACT_APP_LAUNCH_URL=http://example.com PORT=6000 npm start` or b) by specifying the environment variables and desired values in a `.env.local`. Following are a list of modifiable paths: From 31f1f9980583bedf245ce84d1e35e7a8efcbbb8b Mon Sep 17 00:00:00 2001 From: KeeyanGhoreshi Date: Wed, 10 Jan 2024 14:49:28 -0500 Subject: [PATCH 09/14] modify patient info ui --- src/views/Patient/PatientView.tsx | 72 ++++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 20 deletions(-) diff --git a/src/views/Patient/PatientView.tsx b/src/views/Patient/PatientView.tsx index 465217a..87f03f7 100644 --- a/src/views/Patient/PatientView.tsx +++ b/src/views/Patient/PatientView.tsx @@ -27,6 +27,7 @@ interface PatientViewProps { client: Client; tabCallback: (n: ReactElement, m: string, o: string) => void; } +type InfoRow = { header: string; data: string }[]; export interface MedicationBundle { data: MedicationRequest[]; @@ -182,19 +183,53 @@ function PatientView(props: PatientViewProps) { client.patient.read().then((patient: any) => setPatient(patient)); }, [client.patient, client]); - const rows: { header: string; data: string }[] = [ - { header: 'ID', data: patient?.['id'] || '' }, + function getAge(dateString: string) { + const today = new Date(); + const birthDate = new Date(dateString); + let age = today.getFullYear() - birthDate.getFullYear(); + const m = today.getMonth() - birthDate.getMonth(); + if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) { + age--; + } + return age; + } + const renderRows = (rows: InfoRow) => { + return rows.map(({ header, data }, i) => { + let backgroundColor = '#fdfdfd'; + if (i % 2 === 0) { + // is even + backgroundColor = '#dcdcdc'; + } + return ( + + + {header} + + + {data} + + + ); + }); + }; + let birthday = patient?.birthDate; + let age; + if (birthday) { + age = getAge(birthday); + birthday = `${birthday} (${age} years old)`; + } + const patientName = `${patient?.name?.[0]?.given?.[0]} ${patient?.name?.[0]?.family}`; + const patientFullName = `${patient?.name?.[0]?.given?.join(' ')} ${patient?.name?.[0]?.family}`; + const rows: InfoRow = [ { header: 'Full Name', - data: `${patient?.name?.[0]?.given?.[0]} ${patient?.name?.[0]?.family}` + data: patientFullName }, { header: 'Gender', data: patient?.['gender'] || '' }, - { header: 'Date of Birth', data: patient?.['birthDate'] || '' }, + { header: 'Date of Birth', data: birthday || '' }, { header: 'Address', - data: `${(patient?.address?.[0].line, patient?.address?.[0]['city'])}\n${ - patient?.address?.[0]?.state - }, ${patient?.address?.[0]?.postalCode}` + data: `${patient?.address?.[0].line?.[0]}\n${patient?.address?.[0].city}\n${patient?.address?.[0]?.state}, ${patient?.address?.[0]?.postalCode}` } ]; @@ -206,12 +241,12 @@ function PatientView(props: PatientViewProps) { - + - Patient information loaded from patient context + Patient: - + submitToREMS(cdsHook, setHooksCards)} @@ -220,19 +255,16 @@ function PatientView(props: PatientViewProps) { + +
+ {patientName}{' '} + {`(ID: ${patient.id})`} +
+
- - {rows.map(({ header, data }) => ( - - - {header} - - {data} - - ))} - + {renderRows(rows)}
From e88cf5d9f0338d84fbafb7928628faf8e780734a Mon Sep 17 00:00:00 2001 From: Ariel Virgulto Date: Wed, 10 Jan 2024 15:34:23 -0500 Subject: [PATCH 10/14] Caplitalize gender --- src/views/Patient/PatientView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Patient/PatientView.tsx b/src/views/Patient/PatientView.tsx index 87f03f7..4a5d5b6 100644 --- a/src/views/Patient/PatientView.tsx +++ b/src/views/Patient/PatientView.tsx @@ -225,7 +225,7 @@ function PatientView(props: PatientViewProps) { header: 'Full Name', data: patientFullName }, - { header: 'Gender', data: patient?.['gender'] || '' }, + { header: 'Gender', data: patient?.['gender'] ? patient.gender.charAt(0).toUpperCase() + patient.gender.slice(1) : '' }, { header: 'Date of Birth', data: birthday || '' }, { header: 'Address', From 4bee3d33060b059703f67d7968e398122009c318 Mon Sep 17 00:00:00 2001 From: Ariel Virgulto Date: Wed, 10 Jan 2024 15:39:55 -0500 Subject: [PATCH 11/14] Fix prettier error --- src/views/Patient/PatientView.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/Patient/PatientView.tsx b/src/views/Patient/PatientView.tsx index 4a5d5b6..07d11df 100644 --- a/src/views/Patient/PatientView.tsx +++ b/src/views/Patient/PatientView.tsx @@ -225,7 +225,12 @@ function PatientView(props: PatientViewProps) { header: 'Full Name', data: patientFullName }, - { header: 'Gender', data: patient?.['gender'] ? patient.gender.charAt(0).toUpperCase() + patient.gender.slice(1) : '' }, + { + header: 'Gender', + data: patient?.['gender'] + ? patient.gender.charAt(0).toUpperCase() + patient.gender.slice(1) + : '' + }, { header: 'Date of Birth', data: birthday || '' }, { header: 'Address', From 88929d17947c58828eb29d81623a8449845f6d20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 04:58:39 +0000 Subject: [PATCH 12/14] Bump follow-redirects from 1.15.3 to 1.15.4 Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d58b57a..f515ac9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13416,9 +13416,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "funding": [ { "type": "individual", From 0db199e933fbfa73f7722afb442f7380e1342735 Mon Sep 17 00:00:00 2001 From: KeeyanGhoreshi Date: Thu, 11 Jan 2024 16:44:43 -0500 Subject: [PATCH 13/14] fixes null alert due to https/http variance in vsac --- src/views/Questionnaire/SmartApp.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/views/Questionnaire/SmartApp.tsx b/src/views/Questionnaire/SmartApp.tsx index bb73bd1..812701b 100644 --- a/src/views/Questionnaire/SmartApp.tsx +++ b/src/views/Questionnaire/SmartApp.tsx @@ -132,6 +132,8 @@ export function SmartApp(props: SmartAppProps) { // TODO: this could be redone like in original DTR to have a big fancy display for errors but I don't think it's necessary or useful. // The previous version was persistent at the top of the page. An alert gets the job done just fine. errors.forEach(e => { + console.log('<<<<<'); + console.log(e); alert(e.details); }); }, [errors]); @@ -525,9 +527,17 @@ export function SmartApp(props: SmartAppProps) { // iterate over valueSet definitions elm.library.valueSets.def.forEach(valueSetDef => { // find FHIR value set artifact - const valueSetDefId = valueSetDef.id.replace(/https:\/\//, 'http://'); // vsac only returns urls with http in the resource - const valueSet = artifacts.valueSets.find( - valueSet => valueSet.id == valueSetDefId || valueSet.url == valueSetDefId + const valueSetDefId = valueSetDef.id; + const valueSet = artifacts.valueSets.find((valueSet) => { + if(valueSet.id && valueSetDefId.includes(valueSet.id)) { + return true; + } else { + if(valueSet.url && valueSetDefId.includes(valueSet.url)) { + return true; + } + } + return false; + } ); if (valueSet != null) { // make sure it has an expansion From 8454ff06e4e49e919cc7141d7b0d1ec5439285c6 Mon Sep 17 00:00:00 2001 From: KeeyanGhoreshi Date: Thu, 11 Jan 2024 16:46:34 -0500 Subject: [PATCH 14/14] rid of console --- src/views/Questionnaire/SmartApp.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/views/Questionnaire/SmartApp.tsx b/src/views/Questionnaire/SmartApp.tsx index 812701b..8e781c4 100644 --- a/src/views/Questionnaire/SmartApp.tsx +++ b/src/views/Questionnaire/SmartApp.tsx @@ -132,8 +132,6 @@ export function SmartApp(props: SmartAppProps) { // TODO: this could be redone like in original DTR to have a big fancy display for errors but I don't think it's necessary or useful. // The previous version was persistent at the top of the page. An alert gets the job done just fine. errors.forEach(e => { - console.log('<<<<<'); - console.log(e); alert(e.details); }); }, [errors]); @@ -528,17 +526,16 @@ export function SmartApp(props: SmartAppProps) { elm.library.valueSets.def.forEach(valueSetDef => { // find FHIR value set artifact const valueSetDefId = valueSetDef.id; - const valueSet = artifacts.valueSets.find((valueSet) => { - if(valueSet.id && valueSetDefId.includes(valueSet.id)) { + const valueSet = artifacts.valueSets.find(valueSet => { + if (valueSet.id && valueSetDefId.includes(valueSet.id)) { return true; } else { - if(valueSet.url && valueSetDefId.includes(valueSet.url)) { + if (valueSet.url && valueSetDefId.includes(valueSet.url)) { return true; } } return false; - } - ); + }); if (valueSet != null) { // make sure it has an expansion if (valueSet.expansion != null) {