Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ VITE_LAUNCH_URL = http://localhost:4040/launch
VITE_PASSWORD = alice
VITE_PATIENT_FHIR_QUERY = Patient?_sort=identifier&_count=12
VITE_PIMS_SERVER = http://localhost:5051/ncpdp/script
VITE_USE_PHARMACY_INTERMEDIARY = false
VITE_PHARMACY_INTERMEDIARY = http://localhost:3003/ncpdp/script
VITE_PPA_LOCATOR_MODE = true
VITE_PPA_SUBSTITUTION_ALLOWED = true
VITE_PPA_ENDPOINTS = [{"enabled":true,"id":"Pharmacy123","name":"PIMS Pharmacy A","url":"http://localhost:5051/ncpdp/script","scriptUrl":"http://localhost:5051/ncpdp/script"},{"enabled":true,"id":"Pharmacy456","name":"PIMS Pharmacy B","url":"http://localhost:5151/ncpdp/script","scriptUrl":"http://localhost:5151/ncpdp/script"}]
VITE_PPA_DEFAULT_STATE = MA
VITE_PPA_DEFAULT_POSTAL_CODE =
VITE_PPA_GENERIC_CANDIDATES = [{"baseNdc":"65597-407-20","ndc":"99999-407-20","display":"Pexidartinib Hydrochloride 200 MG Oral Capsule"}]
VITE_PUBLIC_KEYS = http://localhost:3000/request-generator/.well-known/jwks.json
VITE_REALM = ClientFhirServer
VITE_RESPONSE_EXPIRATION_DAYS = 30
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ Following are a list of modifiable paths:
| VITE_PASSWORD | `alice` | The default password for logging in as the default user, defined by VITE_USER. This should be changed if using a different default user. |
| VITE_PATIENT_FHIR_QUERY | `Patient?_sort=identifier&_count=12` | The FHIR query the app makes when searching for patients in the EHR. This should be modified if a different behavior is desired by the apps patient selection popup. This can also be modified directly in the app's settings. |
| VITE_PIMS_SERVER | `http://localhost:5051/ncpdp/script` | The Pharmacy System endpoint for submitting medications. This should be changed depending on which pharmacy system you want to connect with. |
| VITE_USE_PHARMACY_INTERMEDIARY | `false` | When true, NCPDP messages, including NewRx and Product Availability JSON, are sent to the pharmacy intermediary endpoint. |
| VITE_PHARMACY_INTERMEDIARY | `http://localhost:3003/ncpdp/script` | Pharmacy intermediary NCPDP Script endpoint for NewRx and Product Availability routing. |
| VITE_PPA_LOCATOR_MODE | `true` | When true, Product Availability lookup searches all enabled pharmacy endpoints and equivalent products before choosing a pharmacy/product. |
| VITE_PPA_SUBSTITUTION_ALLOWED | `true` | Default value for whether Product Availability requests allow substitute products. |
| VITE_PPA_ENDPOINTS | `[{...Pharmacy123...},{...Pharmacy456...}]` | JSON array used to seed the PPA Pharmacy Endpoints settings table. Local entries should point `url`/`scriptUrl` at each pharmacy `/ncpdp/script` endpoint. |
| VITE_PPA_DEFAULT_STATE | `MA` | Fallback pickup state for Product Availability requests when the selected patient does not have an address state. |
| VITE_PPA_DEFAULT_POSTAL_CODE | empty | Fallback pickup ZIP code for Product Availability requests when the selected patient does not have an address postal code. |
| VITE_PPA_GENERIC_CANDIDATES | `[{...65597-407-20 -> 99999-407-20...}]` | Advanced JSON override for direct-mode product equivalence candidates. In normal local testing, use the built-in Pexidartinib mapping and configure pharmacy endpoints in the settings table. |
| VITE_PUBLIC_KEYS | `http://localhost:3000/request-generator/.well-known/jwks.json` | The endpoint which contains the public keys for authentication with the REMS admin. Should be changed if the keys are moved elsewhere. |
| VITE_REALM | `ClientFhirServer` | The Keycloak realm to use. Only relevant is using Keycloak as an authentication server. This only affects direct logins like through the Patient Portal, not SMART launches like opening the app normally. |
| VITE_RESPONSE_EXPIRATION_DAYS | `30` | The number of days old a Questionnaire Response can be before it is ignored and filtered out. This ensures the patient search excludes outdated or obsolete prior sessions from creating clutter. |
Expand Down
29 changes: 18 additions & 11 deletions dockerRunnerDev.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh

# Handle closing application on signal interrupt (ctrl + c)
trap 'kill $CONTINUOUS_INSTALL_PID $SERVER_PID; gradle --stop; exit' INT
trap 'kill $CONTINUOUS_INSTALL_PID $SERVER_PID 2>/dev/null; exit' INT TERM

mkdir logs
mkdir -p logs
# Reset log file content for new application boot
echo "*** Logs for continuous installer ***" > ./logs/installer.log
echo "*** Logs for 'npm run start' ***" > ./logs/runner.log
Expand All @@ -13,23 +13,31 @@ echo "starting application in watch mode..."

# Start the continious build listener process
echo "starting continuous installer..."
npm install
if [ ! -d node_modules ]; then
npm install | tee ./logs/installer.log
fi

( package_modify_time=$(stat -c %Y package.json)
package_lock_modify_time=$(stat -c %Y package-lock.json)
( file_hash() {
cksum "$1" 2>/dev/null || echo "missing $1"
}

package_hash=$(file_hash package.json)
package_lock_hash=$(file_hash package-lock.json)
while sleep 1
do
new_package_modify_time=$(stat -c %Y package.json)
new_package_lock_modify_time=$(stat -c %Y package-lock.json)
new_package_hash=$(file_hash package.json)
new_package_lock_hash=$(file_hash package-lock.json)

if [[ "$package_modify_time" != "$new_package_modify_time" ]] || [[ "$package_lock_modify_time" != "$new_package_lock_modify_time" ]]
if [ "$package_hash" != "$new_package_hash" ] || [ "$package_lock_hash" != "$new_package_lock_hash" ]
then
echo "running npm install..."
npm install | tee ./logs/installer.log
new_package_hash=$(file_hash package.json)
new_package_lock_hash=$(file_hash package-lock.json)
fi

package_modify_time=$new_package_modify_time
package_lock_modify_time=$new_package_lock_modify_time
package_hash=$new_package_hash
package_lock_hash=$new_package_lock_hash

done ) & CONTINUOUS_INSTALL_PID=$!

Expand All @@ -40,4 +48,3 @@ done ) & CONTINUOUS_INSTALL_PID=$!
wait $CONTINUOUS_INSTALL_PID $SERVER_PID
EXIT_CODE=$?
echo "application exited with exit code $EXIT_CODE..."

Loading
Loading