uwscope / scope-web

0 stars 5 forks source link

Any Future Migration Must Account for Patients without Any Mark #540

Open jayfo opened 2 months ago

jayfo commented 2 months ago

Prior to #538, newly-created patients did not have any review mark.

In #524, initial logic for defining new data therefore applied a two week cutoff.

In #533, the addition of "Mark Reviewed" functionality preserved that two week cutoff for patients who lacked any mark. This was intentional, as it kept patients "stable" in what they displayed a "new" at the time of deploying #533.

In #538, patient creation was updated to create a default mark for every patient. This effectively removes the two week cutoff for new patients, as being "stable" with two weeks of new data is not a concern for them.

However, the next time a data migration is conducted, a default mark will be created for every patient. This includes patients who currently do not have any mark. Any patients still applying the two week cutoff will therefore suddenly display all prior data as "new".

To prevent this, any future migration will also need to create default marks.

After such a migration, the logic in #533 accounting for patients without any mark would also become irrelevant. It could be removed, and patient collection testing could be updated to include a test that every patient has at least one mark.