drajer-health / eCRNow

Repository for eCRNow app.
Apache License 2.0
40 stars 54 forks source link

Script to enable users to phase-out an old eRSD definition file #540

Open lisa-cabrera-modmed opened 1 year ago

lisa-cabrera-modmed commented 1 year ago

Use Case / Problem Statement:

As an eCRNow app user, we are following the following procedure to bring new practices onto the latest eRSD file:

1 - Load new eRSD files onto server file system (eRSDv2_new.json)

2 - Update all Healthcare Settings to point from old eRSD file to new eRSD file (eRSDv2.json to eRSDv2_new.json). This step will DISABLE the old eRSD file in KAR settings and ENABLE the new eRSD file in KAR settings.

[EXISTING ISSUE TO RESOLVE] - Scheduled jobs using old KAR settings should still complete even after the old eRSD is DISABLED

3 - Once all Healthcare Settings have been migrated to use new eRSD file KAR settings, the old eRSD file can be removed from system and removed from KAR settings, so it no longer appears as an available KAR settings for Healthcare Settings

Proposed Solution by Dragon:

eCRNow app development team will provide a PostgreSQL script to do the following:

It would be nice to schedule this script so the app users I can flag an eRSD as 'to delete' and the application will take the PostgreSQL and file removal steps automatically for user.

nbashyam commented 8 months ago

Add to baseline 3.1.4

nbashyam commented 2 weeks ago

Updated processing logic to use inactive KARS / ERSD files as needed in 3.1.5 A script can now be created to delete the inactive KARS after all timers are expired.