Skip to content
Snippets Groups Projects

Resolve "import of serology data"

Merged Piotr Gawron requested to merge 335-import-of-serology-data into master
10 files
+ 266
30
Compare changes
  • Side-by-side
  • Inline
Files
10
@@ -437,13 +437,17 @@ class smashProvider(BaseProvider):
virus_test_1_updated = fake.date_between(start_date='-30d', end_date='-4d')
#inconclusive results have a date
virus_test_1_updated = choice([None, virus_test_1_updated], 1, p=[0.7, 0.3])[0]
virus_test_1_collection_date = choice([None, virus_test_1_updated], 1, p=[0.7, 0.3])[0]
elif virus_test_1 == True:
virus_test_1_updated = fake.date_between(start_date='-30d', end_date='-4d')
virus_test_1_collection_date = fake.date_between(start_date='-30d', end_date='-4d')
else:
virus_test_1_updated = fake.date_between(start_date='-30d', end_date='-4d')
virus_test_1_collection_date = fake.date_between(start_date='-30d', end_date='-4d')
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,
defaults={'default_location': default_location, 'type': type,
'screening_number': screening_number, 'study': study})
Loading