SORMAS (Surveillance, Outbreak Response Management and Analysis System) is an early warning and management system to fight the spread of infectious diseases.
When event participant or contact is converted to case as a result of a positive pathogen test, map the test variant to the resulting case variant #5243
5029 added a varint to a pathogen test with the expectation of migrating this variant to the disease varaint of the case when ever a pathogen test of the any sample of the case has a variant.
unknown test variant can override user specified case variant when test is updated
Steps to Reproduce
Create a positive PCR test of a sample of a contact or EP
Convert the ep/ contact to a case when asked by system
Have a look at the variant of the resulting case, this is NA
Expected Behavior
Since a sample can be referenced by many cases (of different diseases), when saving the case OR converting a contact/ ep to the case OR saving a pathogen test of a sample of the case(s), check if the pathogen test has a variant of any of the diseases of the cases of the sample and map accordingly to the cases.
Updating case variant using test result variant:
If variant of test is missing, no matter variant of the case, do not ask user to update case variant (works fine)
If variant of test is unknown, and variant of case is missing, then ask user and update case variant to unknown else do nothing. This would make sure that unknown test variant does not override user specified case variant.
if variant of test is not (missing or unknown) and different from variant of case, then always ask and update case variant with test variant.
Updating case variant by user input
Here we control to make sure that users can only choose a category among the registered application variants of the disease among the test of all samples linked to the case. Thus forcing case variant to depend on test variant when available.
If there is no pathogen test among all samples of the case or all test has variant == (NA or unknown), then users can choose any category including NA as variant of case.
else users should be able to chose only among the variants of the tests of the samples.
If user tries to choose a different variant than that of the test of the samples, then show a warning message:
"There are samples of this case having a test with variant: "list those that are present".., you are only allowed to choose among these variants types"
I added the refinement on the logic to map the disease variant to a case at the end of this ticket. Please have a look if all is fine.
One point that was not clear to me is if the test has variant of type "A" say and case has missing variant and user refuse to update disease variant while saving the test, should we save such a data? or always map the variant of test to that of case if missing or Unknown?
I'm not sure if preventing the user from saving is necessary. I guess an information upon saving informing the user about the difference would be fine too.
Bug Description
5029 added a varint to a pathogen test with the expectation of migrating this variant to the disease varaint of the case when ever a pathogen test of the any sample of the case has a variant.
Steps to Reproduce
Expected Behavior
Updating case variant using test result variant:
Updating case variant by user input Here we control to make sure that users can only choose a category among the registered application variants of the disease among the test of all samples linked to the case. Thus forcing case variant to depend on test variant when available.
Screenshots
System Details
Additional Information