Skip to content
Snippets Groups Projects

Resolve "import of serology data"

Merged Piotr Gawron requested to merge 335-import-of-serology-data into master
9 files
+ 377
29
Compare changes
  • Side-by-side
  • Inline
Files
9
@@ -433,6 +433,8 @@ class smashProvider(BaseProvider):
default_location.prefix)
virus_test_1 = choice([None, True, False], 1, p=[0.2, 0.3, 0.5])[0]
virus_iga_1 = choice(["Borderline", "Positive", "Negative"], 1, p=[0.02, 0.03, 0.95])[0]
virus_igg_1 = choice(["Borderline", "Positive", "Negative"], 1, p=[0.02, 0.03, 0.95])[0]
if virus_test_1 is None:
virus_test_1_updated = fake.date_between(start_date='-30d', end_date='-4d')
#inconclusive results have a date
@@ -448,6 +450,8 @@ class smashProvider(BaseProvider):
study_subject, _ = StudySubject.objects.update_or_create(nd_number=nd_number, subject=subject,
virus_test_1=virus_test_1, virus_test_1_updated=virus_test_1_updated,
virus_test_1_collection_date=virus_test_1_collection_date,
virus_test_1_iga_status=virus_iga_1,
virus_test_1_igg_status=virus_igg_1,
defaults={'default_location': default_location, 'type': type,
'screening_number': screening_number, 'study': study})
Loading