Analyticsphere / metricsReportsRequests

Used to provide issue tracking for changes and additions to the Connect Metrics reporting.
MIT License
0 stars 0 forks source link

QC report- if date/time stamp present for sample, collection setting should also be present #183

Open erincschwartz opened 1 week ago

erincschwartz commented 1 week ago

Add check for consistency, if any of the three variables are populated for each specimen type (blood, urine, mouthwash), then all should be populated:

Research Blood: If BioFin_BaseBloodCol_v1r0= yes, and BioSpm_BloodSettingBL_v1r0= Research, then BioFin_ResearchBldTmBL_v1r0 must be populated If BioSpm_BloodSettingBL_v1r0 is populated, then BioFin_BaseBloodCol_v1r0= yes If BioFin_BaseBloodCol_v1r0= yes, then BioSpm_BloodSettingBL_v1r0 must be populated If BioFin_ResearchBldTmBL_v1r0 is populated, then BioSpm_BloodSettingBL_v1r0 must be Research and BioFin_BaseBloodCol_v1r0 must be yes

Research Urine: BioFin_BaseUrineCol_v1r0, BioSpm_UrineSettingBL_v1r0, BioFin_ResearchUrnTmBL_v1r0 Research Mouthwash: BioFin_BaseMouthCol_v1r0, BioSpm_MWSettingBL_v1r0, BioFin_BMTimeBL_v1r0 Clincial Blood: BioFin_BaseBloodCol_v1r0, BioSpm_BloodSettingBL_v1r0, BioClin_ClinBloodTmBL_v1r0 Clincal Urine: BioFin_BaseUrineCol_v1r0, BioSpm_UrineSettingBL_v1r0, BioClin_ClinicalUrnTmBL_v1r0 Home Mouthwash: BioFin_BaseMouthCol_v1r0, BioSpm_MWSettingBL_v1r0, BioFin_BMTimeBL_v1r0

KELSEYDOWLING7 commented 1 week ago

@erincschwartz Just about done, but are research mw and home mw supposed to have the same variables?

erincschwartz commented 1 week ago

Yes, research and home mouthwash have the same variable, the setting indicates the difference

KELSEYDOWLING7 commented 1 week ago

Ok, in that case I just can't make two separate rules because the logic would be the same.

When I tested these rules I'm getting hundreds, if not thousands of errors. There has to be more conditionality added to it. I added that the specimen has to be collected (BioFin_BaseBloodCol_v1r0/BioFin_BaseurineCol_v1r0/BioFin_BaseMouthCol_v1r0 = yes), but anything else that should be added? Finalized? Any delays?

erincschwartz commented 1 week ago

The issue may be coming due to the difference in date/time variable for research vs. clinical. We will discuss on a call. Finalization status and delays should not be factors.

KELSEYDOWLING7 commented 5 days ago

Hmm these updates helped for some of the rules, but some are still have a huge number of errors:

If BioFin_BaseBloodCol_v1r0= yes, and BioSpm_BloodSettingBL_v1r0= Clinical, then BioClin_ClinBloodTmBL_v1r0 must be populated. If BioFin_BaseUrineCol_v1r0= yes, and BioSpm_UrineSettingBL_v1r0= Clinical, then BioClin_ClinicalUrnTmBL_v1r0 must be populated.

KELSEYDOWLING7 commented 5 days ago

https://nih.app.box.com/file/1587551786119