meta-edc 1.0.1__py3-none-any.whl → 1.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: meta-edc
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: META Trial EDC (http://www.isrctn.com/ISRCTN76157257)
5
5
  Home-page: https://github.com/meta-trial/meta-edc
6
6
  Author: Erik van Widenfelt
@@ -693,7 +693,7 @@ Requires-Python: >=3.12
693
693
  Description-Content-Type: text/x-rst
694
694
  License-File: LICENSE
695
695
  License-File: AUTHORS
696
- Requires-Dist: edc==1.0.0
696
+ Requires-Dist: edc==1.0.2
697
697
  Requires-Dist: edc-microscopy
698
698
  Requires-Dist: beautifulsoup4
699
699
  Requires-Dist: celery[redis]
@@ -491,7 +491,7 @@ meta_reports/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
491
491
  meta_reports/admin/__init__.py,sha256=om3lFa4YxsZSNlYIi2sZv8li2irOMoSeBtOpPk4V3lk,488
492
492
  meta_reports/admin/endpoints_admin.py,sha256=7wZCdC-D-QHI1bb_ucgyDZYlnYD7mWtcZpcH_LftkLs,514
493
493
  meta_reports/admin/endpoints_all_admin.py,sha256=_czdezZf9fSjwZJmO-3HbmdXrXP6nk8-HdiweqUzPRE,476
494
- meta_reports/admin/last_imp_refill_admin.py,sha256=w-0wIanAk7vXwUufd9v_ZEWhYJ3s8Q2fDP3csRRxgls,5946
494
+ meta_reports/admin/last_imp_refill_admin.py,sha256=RKODpodLqQsKx1v4ybqVULo38s2bNXd1nsUpCdPlJ1A,6431
495
495
  meta_reports/admin/list_filters.py,sha256=pByBzz9-qGwqBfdZFlByxJUZDTJQXOTWfNLjmK8KF00,870
496
496
  meta_reports/admin/modeladmin_mixins.py,sha256=tEZYw0xNMfBvo2RLDrYfi_S9lbZU02dwtLxdRDZob4Q,3663
497
497
  meta_reports/admin/dbviews/__init__.py,sha256=2yPu0SO7ZX9yjan0OS9izzws14YYoXcGXmZhwJhax1I,675
@@ -1184,9 +1184,9 @@ tests/etc/user-rsa-restricted-private.pem,sha256=CUcHW9bznWdmmASN00hCzvxFPAFl4N2
1184
1184
  tests/etc/user-rsa-restricted-public.pem,sha256=mt84djoL-uHw6Wc5SJh0zml6VzXulnf8eQSFg7-fheg,450
1185
1185
  tests/etc/user-salt-local.key,sha256=x5anBw9fvbHurczouT3CjrkWb_xs7Ypm1htIJsgiuiw,256
1186
1186
  tests/etc/user-salt-restricted.key,sha256=pxmpcfBRNB-4C6wTvHXz-9fOfJgKIFOjaAF8ZFfa4q4,256
1187
- meta_edc-1.0.1.dist-info/AUTHORS,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1188
- meta_edc-1.0.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
1189
- meta_edc-1.0.1.dist-info/METADATA,sha256=OcYKUsbo2PnuZveW1hIdmIxH8zc9s38qo-rQRCoAWFU,43527
1190
- meta_edc-1.0.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
1191
- meta_edc-1.0.1.dist-info/top_level.txt,sha256=RkzjNXwRq2kg_uZ_1bDwPUntijSXoY2YBqtByDwvvrc,244
1192
- meta_edc-1.0.1.dist-info/RECORD,,
1187
+ meta_edc-1.0.3.dist-info/AUTHORS,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1188
+ meta_edc-1.0.3.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
1189
+ meta_edc-1.0.3.dist-info/METADATA,sha256=oR_0N4H1Hizx_OekvtjQH--oacuwLIOD5Ge5w8s6wqQ,43527
1190
+ meta_edc-1.0.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
1191
+ meta_edc-1.0.3.dist-info/top_level.txt,sha256=RkzjNXwRq2kg_uZ_1bDwPUntijSXoY2YBqtByDwvvrc,244
1192
+ meta_edc-1.0.3.dist-info/RECORD,,
@@ -1,3 +1,4 @@
1
+ import pandas as pd
1
2
  from django.contrib import admin, messages
2
3
  from django.core.exceptions import FieldDoesNotExist
3
4
  from django.db import models
@@ -42,14 +43,24 @@ def update_report(modeladmin, request, queryset):
42
43
  modeladmin.model(
43
44
  subject_identifier=row["subject_identifier"],
44
45
  site_id=row["site_id"],
45
- imp_visit_date=row["imp_visit_date"],
46
+ imp_visit_date=(
47
+ None if pd.isna(row["imp_visit_date"]) else row["imp_visit_date"]
48
+ ),
46
49
  imp_visit_code=row["imp_visit_code"],
47
- next_appt_date=row["next_appt_datetime"],
48
- next_visit_code=row["next_visit_code"],
50
+ next_appt_date=(
51
+ None if pd.isna(row["next_appt_datetime"]) else row["next_appt_datetime"]
52
+ ),
53
+ next_visit_code=(
54
+ None if pd.isna(row["next_visit_code"]) else row["next_visit_code"]
55
+ ),
49
56
  days_since=row["days_since"].days,
50
- days_until=row["days_until"].days,
51
- visit_code=str(int(row["imp_visit_code"])),
52
- visit_code_sequence=row["imp_visit_code"] % 1,
57
+ days_until=None if pd.isna(row["days_until"]) else row["days_until"].days,
58
+ visit_code=(
59
+ None if pd.isna(row["imp_visit_code"]) else str(int(row["imp_visit_code"]))
60
+ ),
61
+ visit_code_sequence=(
62
+ None if pd.isna(row["imp_visit_code"]) else row["imp_visit_code"] % 1
63
+ ),
53
64
  report_model=modeladmin.model._meta.label_lower,
54
65
  created=now,
55
66
  )