knowledgesystems / cmo-pipelines

GNU Affero General Public License v3.0
3 stars 10 forks source link

Fix logic bug in CVR seq date backfill #1186

Closed jamesqo closed 3 months ago

jamesqo commented 3 months ago

Problem

CVR seq date file had blank seq dates for some samples. This was occurring with samples from the AZ / Sophia cohorts.

Cause

Once a sample was in the CVR clinical sample file, its seq date would never get updated even if it was pulled again from the queue. This is because even though the queue contains the correct date, the value would get overwritten by a subsequent call to processSeqDateFile which backfills the old value from seq_date.txt.

Solution

This PR updates the code so that the JSON seq date is pulled after the existing one. This way, the value is only backfilled for pre-existing samples that do not have an incoming update from the CVR queue.

/cc @averyniceday @callachennault @sheridancbio