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.
An empty mark could be created at the time the patient was originally created, simply for consistency.
Another mark could be created that is effective some reasonable datetime.
A reasonable choice would be two weeks prior to the application of the migration. This would continue to preserve a "stable" view, although in practice these patients must not be active (i.e., because somebody would have marked them).
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.
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.