drajer-health / eCRNow

Repository for eCRNow app.
Apache License 2.0
41 stars 55 forks source link

Relaunch API not working as expected #580

Open Nikiitha opened 1 year ago

Nikiitha commented 1 year ago

Expected workflow: When a relaunch api call is made from clinicals, it should schedule a job and execute at off-hours only once without any further rescheduling.

Current Implementation: When a relaunch api call is made from clinicals, it directly executes check reportable call irrespective of the current time whether it is in business or off-hours.

Point to consider: Create with a different workflow name Justification: If we schedule a job for the relaunch call and placed it in scheduled_tasks table, it falls into the common pool In this case, We have to differentiate the relaunch tasks from the check-reportable tasks. Else it will create timers for the next possible off-hours and this behaviour is not expected

nbashyam commented 1 year ago

Nikitha

Can you provide more details on when the relaunch API is called and how often it is called, because we had not considered offhours for Relaunch API.

Nikiitha commented 1 year ago

nbashyam

Right now, the only time we call the relaunch API is when a user clicks “amend encounter” button within an encounter. The amend encounter is called between 2 to 25 times. Average being 5.

Hope this clarifies.

nbashyam commented 12 months ago

Discuss with Athena on regular call on 12/4/2023

nbashyam commented 11 months ago

Small percentage of encounters have been modified after 5 to 8 days and that is when the relaunch is invoked. The tiimer should execute only once.

nbashyam commented 1 month ago

Add to 3.1.7