CARDS-2790: YE: Re-import patient information daily to update inpatient status #2117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When an inpatient is imported which has a visit:
Important notes while testing this PR:
Testing
SubjectSelector.jsxcode to make it easier to generate the correct patients:createSubjectsfunction to generate the node name from the entered name, not a uuidto:
Edit the
docker-compose.ymlto add the following environment variable:- NIGHTLY_NOTIFICATIONS_SCHEDULE=0 * * * * ? *Set the current date to 08/28
Launch cards
docker-compose build && docker-compose upCreate a new patient information form. When creating the patient subject, name the subject 111111. Fill out name, DoB, mrn, consents to being contacted by email = yes, email address
Create a new visit information form for the new patient. Fill out clinic to Integrated Care, Time to the current computer date, provider, location and status.
Set the date to 09/12. Create a new patient with MRN 111222 and an integrated care visit and a new patient 222111 with an inpatient visit
Set the date to 9/19, wait a minute and verify that an initial invitation email was sent for 222111
Set the date to 9/26, wait a minute for 222111's reminder email
Set the date to 9/28, wait a minute for 111111's invitation email
Set the date to 10/3, wait for 222111's second reminder
Set the date to 10/5, wait for 111111's reminder
Set the date to 10/12, create a new patient 111333 with an integrated care visit and 222222 with an inpatient visit. During this time, 111111 should get a second reminder
Set the date to 10/13, wait for 111222's invitation email
Set the date to 10/19, wait for 222222's invitation
Set the date to 10/20, wait for 111222's reminder
Set the date to 10/26, wait for 222222's reminder
Set the date to 10/27, create a new patient 222333 with an inpatient visit. During this time, 111222 should get a second reminder
Set the date to 10/30. Import a sample inpatient status table:
In cards/compose-cluster/mssql, run
python3 ./generate_test_inpatient_status.py -n 10 inpatient_sample.sqlEdit the generated
inpatient_sample.sqlso it includes MRNs 111111, 111222, 111333, 222111, 222222 and 222333Sign into adminer http://localhost:1435/?mssql=mssql&username=sa&db=master&ns=path&import= (password testPassword_)
Import the inpatient sample sql file (browse, select the file, execute)
Run the inpatient status import by navigating to http://localhost:8080/Subjects.importClarity?config=Inpatient%20Status
Verify that patients 111111 and 222111 are unaffected. Verify that patients 111222 and 222222 have their visit information form updated with status on hold. Verify that patients 111333 and 222333 have their visits deleted but patient information form unchanged.
Set the date to 11/3. Verify that no second reminder email is sent for 222222