Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update frontend libraries based on those from upstream repo #153

Open
wants to merge 533 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
533 commits
Select commit Hold shift + click to select a range
e7890f8
refactor code
Nov 30, 2023
8573f9a
code fix
Dec 4, 2023
bad8de2
fix is number check, minor styling fix
Dec 4, 2023
1746ecb
fix code for rendering graph
Dec 5, 2023
1c387a2
fix body diagram code
Dec 5, 2023
17d9527
reformatting
Dec 5, 2023
8b61960
no date display bug fix
Dec 7, 2023
ff35f8f
fix date selector bug
Dec 7, 2023
6e2244c
fix code for displaying date on slider
Dec 7, 2023
5a539d2
fix null checks
Dec 7, 2023
82daadf
fix code
Dec 7, 2023
d8f2d0c
fix display of questionnaire title
Dec 8, 2023
100bc26
fix bug from last commit
Dec 8, 2023
6174d61
fix code related to Body Diagram, scrolling
Dec 8, 2023
dce377d
do not show slider when data points are less than 1 month apart
Dec 8, 2023
ca57189
update CQL
Dec 20, 2023
aab3d55
add comments
Dec 20, 2023
8b4b858
fix PEG Lib
Dec 20, 2023
64681a0
add comment
Dec 20, 2023
ac0bf6c
CQL code clean up
Dec 21, 2023
70ed8d1
fix graph
Dec 22, 2023
0a0d4fd
bug fix
Dec 22, 2023
31e2837
address React warning
Dec 22, 2023
ae99360
rename function
Jan 8, 2024
c8011b0
add image type, display error message from copy error
Jan 18, 2024
904c462
check offsetHeight
Jan 18, 2024
7e726b7
add test copy button to test
Jan 22, 2024
18b266e
fix copy code
Jan 23, 2024
924604f
fix copy code
Jan 23, 2024
ab206ad
fix width attribute
Jan 25, 2024
a1f7604
fix table style
Jan 25, 2024
7a99ec3
fix alt text
Jan 25, 2024
538c1ad
remove test copy button
Feb 2, 2024
26ce5ff
add temporary copy & paste tab for testing
Mar 4, 2024
2c0e8e5
bug fix
Mar 4, 2024
b292b8c
fix instruction
Mar 4, 2024
e49fe4b
fix execute code, instruction
Mar 5, 2024
510c2ad
bug fix
Mar 5, 2024
ab2f22a
fix bugs
Mar 6, 2024
34045fe
fix css
Mar 6, 2024
72d3c0b
fix name display
Mar 6, 2024
57a4530
fix progress indicator
Mar 7, 2024
8b63a32
fix per feedback
Mar 7, 2024
078f5eb
styling fix
Mar 7, 2024
09d80c8
fix label styling
Mar 7, 2024
2993375
fix copy button func
Mar 7, 2024
66027a6
fix formatting
Mar 7, 2024
cdc1825
fix formatting
Mar 7, 2024
741268b
add warning back
Mar 7, 2024
7df5107
make box readonly
Mar 7, 2024
9131963
fix formatting
Mar 7, 2024
a673f63
fix formatting
Mar 7, 2024
ec05bb7
add button to copy as image
Mar 8, 2024
3a188dd
fix typo
Mar 8, 2024
a7f60cd
fix copy code
Mar 8, 2024
2c60655
remove commented out code
Mar 8, 2024
224909e
fix warning, update code
Mar 11, 2024
45d2118
fix width
Mar 11, 2024
10d16b9
fix label
Mar 12, 2024
e6a60af
fix warning styling
Mar 13, 2024
20af93f
fix scale label rendering
Mar 13, 2024
6c0c156
minor slider label styling fix
Mar 13, 2024
b0ecdbe
tocbot fix
Mar 13, 2024
75510cd
fix tocbot item
Mar 13, 2024
d0a15dc
fix label position
Mar 13, 2024
922552e
fix slider labeling
Mar 14, 2024
9f44d58
fix slider labels
Mar 14, 2024
25acc50
fix copy image - set width/height
Mar 14, 2024
af08ee1
add copy button for score summary table
Mar 14, 2024
4dcf325
fix condition check
Mar 14, 2024
1c76c0c
update tocbot version
Mar 14, 2024
29fd9c9
fix scale rendering
Mar 14, 2024
063beda
fix scale display
Mar 14, 2024
278d90d
fix scale label css
Mar 14, 2024
7ae5868
simplify code
Mar 15, 2024
f9bc8e5
code fixes
Mar 15, 2024
4a67a27
add copy button for scoring summary
Mar 29, 2024
bd03d12
code cleanup, refactor
Apr 3, 2024
58237c4
remove debugging code
Apr 3, 2024
9b1da04
slight refactor, nav animation fix
Apr 4, 2024
b8ec308
bug fix from last commit, refactor
Apr 8, 2024
a41bc6d
styling fixes
Apr 18, 2024
ff097f9
changes based on feedback
Apr 23, 2024
c715698
bug fix, refactor marker code, styling fixes
Apr 24, 2024
5774ae9
fix legend rendering code
Apr 24, 2024
26ed87c
fix copy code
Apr 24, 2024
8378af1
fix copying code
Apr 24, 2024
243322c
fix legend, copy code
Apr 24, 2024
db4f133
fix dot size
Apr 24, 2024
4960837
fix button styling
Apr 24, 2024
e4c1369
add legend marker options
Apr 24, 2024
ba64872
fix image copy issue
Apr 24, 2024
eae28a3
fix text
Apr 24, 2024
11ac557
code and styling fixes
Apr 25, 2024
a7ffa9b
remove copy paste tab, changes based on feedback
Apr 25, 2024
5634499
fix copy code for scoring summary
Apr 26, 2024
6fb6d83
refactor copy code
Apr 26, 2024
e84ae17
Update ScoringSummary.js - fix caption bg color
achen2401 Apr 27, 2024
2ea51f0
fix survey width, copy code
Apr 29, 2024
eee50a5
Merge branch 'feature/paintracker-cosri-integration' of https://githu…
Apr 29, 2024
bf7ed8d
don't show copy button when no summary data
Apr 29, 2024
84a2be6
fix animation duration
Apr 29, 2024
6025cd6
remove commented out code and debug statement
Apr 29, 2024
8a554cf
fix copy button css
Apr 30, 2024
631ca5f
add ranked responses component, styling fixes
May 1, 2024
2592894
minor styling fix
May 1, 2024
0abd2a5
icon styling fix
May 1, 2024
76b248d
code cleanup, chart icon replacement
May 2, 2024
116404f
fix styling
May 2, 2024
dc3b8fb
landing component refactor
May 3, 2024
a2530ee
re-arrange code
May 3, 2024
996c4e3
fix typo
May 3, 2024
95b80d8
bug fix
May 3, 2024
3124fb4
re-arrange code
May 3, 2024
8fd3a23
fix landing and summary components
May 6, 2024
c8d944f
fix error checking
May 6, 2024
162d93a
move function
May 6, 2024
f626214
refactor code
May 7, 2024
b325951
fix reference to Report component
May 7, 2024
3f91db0
move to report components to temp folder
May 7, 2024
75132b7
rename back to Report
May 7, 2024
ae53ea1
fix error handling
May 7, 2024
44e145c
fix variable name in graph config
May 7, 2024
eb3629b
move code to util
May 8, 2024
3fe6ce0
fix code syntax, styling fix
May 8, 2024
f360def
fix graph rendering
May 8, 2024
be328c3
remove debug statements
May 8, 2024
14eddda
fix no graph check
May 8, 2024
f376cbf
fix null check for summary data
May 9, 2024
de92e50
fix tocbot issue
May 10, 2024
0381008
minor styling fix
May 10, 2024
102c24d
add date selector for 10 years
May 14, 2024
2909694
fix responses summary styling
May 14, 2024
7e33140
fix no graph no data message
May 15, 2024
a9efdcf
fix style code
May 15, 2024
54be450
graph scale displays fix
May 15, 2024
0890bc6
fix prev num
May 15, 2024
b7e47c8
fix check for active class
May 15, 2024
8b4f8db
styling fix
May 15, 2024
86976b2
questionnaire description bug fix
May 16, 2024
78705d6
fix variable reference
May 16, 2024
499bcd2
fix text
May 16, 2024
afad23b
side nav responsiveness fix
May 24, 2024
8ddb043
styling fixes
May 28, 2024
daa4e4e
fix user icon
May 30, 2024
ec8e392
minor styling fix
May 30, 2024
c45b6e7
minor styilng fix
May 30, 2024
fbf24b8
fix name display
May 30, 2024
e7b5526
null check, code clean up
May 31, 2024
1fd34ef
rename folder
Jun 10, 2024
f95d548
remove unwanted image
Jun 10, 2024
a1ecc39
fix reformatting, number check
Jun 10, 2024
32a1add
fix null array checks
Jun 10, 2024
a50191c
fix scale styling
Jun 10, 2024
f1153f2
minor styling fix
Jun 10, 2024
85e2989
styling fixes
Jun 11, 2024
15800e6
fix table formatting
Jun 11, 2024
9c47865
minor styling fix
Jun 25, 2024
bcd0415
tocbot click event fix
Jul 8, 2024
f27d596
rename funcs, minor styling fixes
Jul 11, 2024
18ed638
rename
Jul 11, 2024
1e4bd9a
tocbot nav fix, ranked responses component
Jul 12, 2024
6cd95be
fix agreement icon
Jul 13, 2024
bb05b6c
fix section icon
Jul 13, 2024
6bf34ab
fix icons
Jul 15, 2024
e9cdddb
fix code for rankedResponses
Jul 15, 2024
438c6fc
fix common logic code
Jul 16, 2024
582871f
fix runtime errors, remove debug statement
Jul 16, 2024
6223886
remove un-used code
Jul 16, 2024
998a949
remove flag icons from report page
Jul 16, 2024
a15feeb
fix goals icon
Jul 16, 2024
c61e09e
fix lib code
Jul 17, 2024
ea87df9
add re-usable constants
Jul 17, 2024
4e657bb
fix dataKey name
Jul 17, 2024
102cb5c
fix get answer logic
Jul 17, 2024
008360f
fix lib code, fix date selector
Jul 19, 2024
d8ccd6b
fix scoring summary table
Jul 19, 2024
8646674
add default logic library
Jul 22, 2024
e558d77
restructure lib directory
Jul 22, 2024
72e3a91
fix tocbot init, remove redundant setState, styling fix
Jul 23, 2024
a0d635f
re-arrange code
Jul 23, 2024
774558c
fix error handling, rename funcs
Jul 24, 2024
0222ff3
fix fetch code, add new util functions
Jul 24, 2024
2fac3ce
fix tocbot init issue, refactor code
Jul 25, 2024
ab46417
styling fix
Jul 25, 2024
a04c2f2
refactor landing code
Jul 29, 2024
1c0abf5
fix set vis code
Jul 29, 2024
21bd94d
minor styling fix
Jul 29, 2024
6842fee
minor styling fix
Jul 31, 2024
6444529
fix header code
Aug 1, 2024
9213f7c
fix error handling, remove debug statement
Aug 2, 2024
709ba53
fix lib code, remove unneeded files
Aug 6, 2024
96856e1
move common table styles
Aug 7, 2024
7e0f62b
bug fix, styling fix
Aug 7, 2024
3e7fd8d
table styling fix
Aug 7, 2024
c3370a1
table styling fix
Aug 8, 2024
24021be
fix table border
Aug 8, 2024
429b4b1
Merge branch 'develop' of https://github.com/uwcirg/AHRQ-CDS-Connect-…
Aug 8, 2024
52cec50
fix params
Aug 8, 2024
ac0e56d
remove unneeded code, add white space
Aug 8, 2024
54c341d
fix load instrument code
Aug 8, 2024
68e5b8e
Merge branch 'develop' of https://github.com/uwcirg/AHRQ-CDS-Connect-…
Aug 8, 2024
31553ec
Merge branch 'develop' of https://github.com/uwcirg/cosri-pain-manage…
Aug 9, 2024
f2fffb9
fix empty log error message
Aug 9, 2024
fa8cbc3
Merge branch 'feature/lib-upgrades' of https://github.com/uwcirg/cosr…
Aug 12, 2024
c69ea4d
linting code
Aug 12, 2024
a6c0a55
Update src/__tests__/components/Summary.test.js
achen2401 Aug 12, 2024
32d8e60
Merge branch 'develop' of https://github.com/uwcirg/AHRQ-CDS-Connect-…
Aug 12, 2024
9ac8a08
fix failing tests
Aug 12, 2024
1a128e5
add report changes
Aug 13, 2024
fc10002
remove unnecessary dependency
Aug 13, 2024
62dc10a
minor error checking fix
Aug 13, 2024
c849bc8
Merge branch 'feature/paintracker-cosri-integration' of https://githu…
Aug 13, 2024
c9ffc39
remove incompatible dependency
Aug 13, 2024
561d229
fix failed test
Aug 13, 2024
d35d3a9
remove debug statements, commented out code, fix promise code
Aug 14, 2024
37ba305
Merge branch 'develop' of https://github.com/uwcirg/cosri-pain-manage…
Sep 3, 2024
7a95fe2
switch to vite build tool
Sep 4, 2024
c6295e2
Merge branch 'develop' of https://github.com/uwcirg/cosri-pain-manage…
Sep 4, 2024
45690c0
remove un-intended files
Sep 4, 2024
5edb968
update .gitignore
Sep 4, 2024
4a5f435
remove unwanted dependencies
Sep 4, 2024
ffe4912
remove unwanted files
Sep 4, 2024
960b30a
fix version
Sep 4, 2024
5af0e35
resolve conflicts
Sep 5, 2024
1e96488
Merge branch 'develop' of https://github.com/uwcirg/cosri-pain-manage…
Sep 5, 2024
c6b1ee1
put change back
Sep 5, 2024
8abc739
Merge branch 'develop' of https://github.com/uwcirg/cosri-pain-manage…
Sep 9, 2024
c7864ee
Merge branch 'develop' of https://github.com/uwcirg/cosri-pain-manage…
Sep 16, 2024
ae5cb39
Merge branch 'develop' of https://github.com/uwcirg/cosri-pain-manage…
Sep 17, 2024
f94918d
fix column sizes
Sep 17, 2024
5ab1ae3
fix table keys
Sep 17, 2024
b8b147f
Merge branch 'develop' of https://github.com/uwcirg/cosri-pain-manage…
Nov 15, 2024
62626f6
Merge branch 'develop' of https://github.com/uwcirg/cosri-pain-manage…
Nov 15, 2024
2d8d2c5
fix test
Nov 15, 2024
ea8b33d
fix env prefix
Nov 15, 2024
6b81fdb
fix README
Nov 15, 2024
0a7b69d
fix env prefix
Nov 15, 2024
d86c42e
fix .env
Nov 15, 2024
fd1a5c1
fix sass deprecation warning
Nov 18, 2024
fcd034d
styling fixes
Nov 19, 2024
9c0fe33
bug fixes, merge branch 'develop' of https://github.com/uwcirg/cosri-…
Dec 17, 2024
6d3c5f2
update readme
Dec 17, 2024
39af904
Merge branch 'develop' of https://github.com/uwcirg/cosri-pain-manage…
Dec 23, 2024
ea71312
Update README.md
achen2401 Dec 30, 2024
79b03b0
fix unresolved conflict per feedback
Dec 30, 2024
9bb3d41
Merge branch 'feature/lib-upgrades' of https://github.com/uwcirg/cosr…
Dec 30, 2024
2d425be
fix exception
Dec 30, 2024
5ccdb42
check graph config
Jan 23, 2025
9435c77
fix null check for consultation line attributes
Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PORT=8000
REACT_APP_EPIC_SUPPORTED_QUERIES=false
GENERATE_SOURCEMAP=false

#REACT_APP_SYSTEM_TYPE=
#REACT_APP_SITE_ID=
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# /node_modules/* and /bower_components/* ignored by default

node_modules
dist/*
build/*
coverage/*
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
"react-app",
"plugin:jsx-a11y/recommended"
],
"globals": {
"vi": true
},
"rules": {
"comma-dangle": 0,
"max-len": ["error", { "code": 120, "ignoreUrls": true , "ignoreTrailingComments": true, "ignoreRegExpLiterals": true }],
//"max-len": ["error", { "code": 120, "ignoreUrls": true , "ignoreTrailingComments": true, "ignoreRegExpLiterals": true }],
"no-console": 0,
"no-param-reassign": ["error", {"props": false}],
"no-unused-vars": [ "error", { "args": "none" } ],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 10.x
node-version: 20.x

- name: Install dependencies
run: yarn install
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
/node_modules
/src/cql/valueset-db.json.original
/build
/dist
/coverage
/tx_bundle_dump
/test_patient_dump
*.css
.DS_Store
yarn*
3 changes: 2 additions & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
8.11.3
20.17.0

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.17.0
144 changes: 0 additions & 144 deletions .rescriptsrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 20.17.0
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10 as build-deps
FROM node:20 as build-deps

WORKDIR /opt/app

Expand All @@ -15,7 +15,7 @@ ARG REACT_APP_VERSION_STRING
ENV REACT_APP_VERSION_STRING=$REACT_APP_VERSION_STRING

COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
COPY --from=build-deps /opt/app/build /usr/share/nginx/html
COPY --from=build-deps /opt/app/dist /usr/share/nginx/html

# write environment variables to config file and start
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
Expand Down
51 changes: 37 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Pain Management Summary SMART on FHIR application was developed to support t

The Pain Management Summary SMART on FHIR application was piloted during Summer 2018. Local modifications and development were needed to fully support this application in the pilot environment. For example, custom development was needed to expose pain assessments via the FHIR API. See the pilot reports for more information.

This application was originally piloted with support for FHIR DSTU2. The app has been updated since the pilot to also support FHIR R4, ~~although pilot R4 support has not been piloted in a clinical setting~~ and COSRI production implementations now user R4.
This application was originally piloted with support for FHIR DSTU2. The app has been updated since the pilot to also support FHIR R4. In addition, value sets and standardized codes have been updated since the pilot. See the comments in the bundled CQL for details.

This prototype application is part of the [CDS Connect](https://cds.ahrq.gov/cdsconnect) project, sponsored by the [Agency for Healthcare Research and Quality](https://www.ahrq.gov/) (AHRQ), and developed under contract with AHRQ by [MITRE's CAMH](https://www.mitre.org/centers/cms-alliances-to-modernize-healthcare/who-we-are) FFRDC.

Expand All @@ -32,11 +32,6 @@ This CDS logic queries for several concepts that do not yet have standardized co

| Code | System | Display |
| --- | --- | --- |
| PEGASSESSMENT | http://cds.ahrq.gov/cdsconnect/pms | Pain Enjoyment General Activity (PEG) Assessment |
| PEGPAIN | http://cds.ahrq.gov/cdsconnect/pms | Pain |
| PEGENJOYMENT | http://cds.ahrq.gov/cdsconnect/pms | Enjoyment of life |
| PEGGENERALACTIVITY | http://cds.ahrq.gov/cdsconnect/pms | General activity |
| STARTBACK | http://cds.ahrq.gov/cdsconnect/pms | STarT Back Screening Tool |
| SQETOHUSE | http://cds.ahrq.gov/cdsconnect/pms | Single question r/t ETOH use |
| SQDRUGUSE | http://cds.ahrq.gov/cdsconnect/pms | Single question r/t drug use |
| MME | http://cds.ahrq.gov/cdsconnect/pms | Morphine Milligram Equivalent (MME) |
Expand All @@ -45,7 +40,7 @@ Systems integrating the Pain Management Summary will need to expose the correspo

### To build and run in development:

1. Install [Node.js](https://nodejs.org/en/download/) (LTS edition, currently 8.x)
1. Install [Node.js](https://nodejs.org/en/download/) (LTS edition, currently 20.x)
2. Install [Yarn](https://yarnpkg.com/en/docs/install) (1.3.x or above)
3. Install dependencies by executing `yarn` from the project's root directory
4. If you have a SMART-on-FHIR client ID, edit `public/launch-context.json` to specify it
Expand All @@ -57,21 +52,49 @@ Systems integrating the Pain Management Summary will need to expose the correspo

The Pain Management Summary can be deployed as static web resources on any HTTP server. There are several customizations, however, that need to be made based on the site where it is deployed.

1. Install [Node.js](https://nodejs.org/en/download/) (LTS edition, currently 8.x)
1. Install [Node.js](https://nodejs.org/en/download/) (LTS edition, currently 20.x)
2. Install [Yarn](https://yarnpkg.com/en/docs/install) (1.3.x or above)
3. Install dependencies by executing `yarn` from the project's root directory
4. Modify the `homepage` value in `package.json` to reflect the path (after the hostname) at which it will be deployed
a. For example, if deploying to https://my-server/pain-mgmt-summary/, the `homepage` value should be `"http://localhost:8000/pain-mgmt-summary"` (note that the hostname need not match)
b. If deploying to the root of the domain, you can leave `homepage` as `"."`
4. Modify the `base` value in `vite.config.mjs` to reflect the path (after the hostname) at which it will be deployed
a. The path must start and end with a forward slash (`/`).
b. For example, if deploying to https://my-server/pain-mgmt-summary/, the `base` value should be `"/pain-mgmt-summary/"`.
c. If deploying to the root of the domain, set the `base` value to `"/"` or comment out the `base` property.
5. Modify the `clientId` in `public/launch-context.json` to match the unique client ID you registered with the EHR from which this app will be launched
6. NOTE: The launch context contains `"completeInTarget": true`. This is needed if you are running in an environment that initializes the app in a separate window (such as the public SMART sandbox). It can be safely removed in other cases.
7. If you've set up an analytics endpoint (see below), set the `analytics_endpoint` and `x_api_key` in `public/config.json`
8. If you'll be launching the app from an Epic EHR, modify `.env` to set `REACT_APP_EPIC_SUPPORTED_QUERIES` to `true`
a. This modifies some queries based on Epic-specific requirements
9. Run `yarn build` to compile the code to static files in the `build` folder
10. Deploy the output from the `build` folder to a standard web server
9. Run `yarn build` to compile the code to static files in the `dist` folder
10. Deploy the output from the `dist` folder to a standard web server

Optionally to step 9, you can run the static build contents in a simple Node http-server via the command: `yarn start-static`.
Optionally to step 9, you can run `yarn serve` to use Vite's built-in server to host the code in `dist`. This approach, however, should not be used in production.

### To update the valueset-db.json file

The value set content used by the CQL is cached in a file named `valueset-db.json`. If the CQL has been modified to add or remove value sets, or if the value sets themselves have been updated, you may wish to update the valueset-db.json with the latest codes. To do this, you will need a [UMLS Terminology Services account](https://uts.nlm.nih.gov//license.html).

To update the `valueset-db.json` file:

1. Run `node src/utils/updateValueSetDB.js UMLS_API_KEY` _(replacing UMLS\_API\_KEY with your actual UMLS API key)_

To get you UMLS API Key:

1. Sign into your UMLS account at [https://uts.nlm.nih.gov/uts.html](https://uts.nlm.nih.gov/uts.html)
2. Click 'My Profile' in the orange banner at the top of the screen
3. Your API key should be listed below your username in the table
4. If no API key is listed:
1. Click 'Edit Profile'
2. Select the 'Generate new API Key' checkbox
3. Click 'Save Profile'
4. Your new API key should now be listed.

### To update the test patients' date-based fields

Testing this SMART App is more meaningful when we can supply test patients that exercise various aspects of the application. Test patients are represented as FHIR bundles at `src/utils/dstu2_test_patients` and `r4_test_patients`. Since the CDS uses lookbacks (for example, only show MME in the last 6 months), the patient data occasionally needs to be updated to fit within the lookback windows. To automatically update the data to fit within the lookback windows as of today's date:

1. Run `yarn update-test-patients`

This will update all of the entries in the patient bundles to be appropriate relative to today's date. In addition, it sets each bundle's `meta.lastUpdated` to the current date. This is essential for ensuring that future updates work correctly since it uses the `meta.lastUpdated` date to determine how far back each other date should be relative to today.

### To run the unit tests

Expand Down
3 changes: 0 additions & 3 deletions default.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
PORT=8000
REACT_APP_EPIC_SUPPORTED_QUERIES=false


# confidential backend API endpoint
# NB: domain is required for cookies to be set
REACT_APP_CONF_API_URL=http://localtest.me:5000
Expand All @@ -18,5 +17,3 @@ USE_DEMO=false

#url for patient search
REACT_APP_DASHBOARD_URL:http://localtest.me:5000


21 changes: 21 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Use Internet Explorer Edge Standards mode -->
<meta http-equiv="x-ua-compatible" content="IE=edge" >
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<link rel="manifest" href="/manifest.json">
<link rel="shortcut icon" href="/favicon.ico">
<title>Pain Management Summary</title>
</head>

<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
22 changes: 22 additions & 0 deletions launch.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- Use Internet Explorer Edge Standards mode -->
<meta http-equiv="x-ua-compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="/manifest.json" />
<link rel="shortcut icon" href="/favicon.ico" />
<title>Pain Management Summary</title>
</head>

<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root"></div>
<script type="module" src="/src/launch.js"></script>
</body>
</html>
Loading
Loading