meta-edc 1.1.5__py3-none-any.whl → 1.1.7__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.4
2
2
  Name: meta-edc
3
- Version: 1.1.5
3
+ Version: 1.1.7
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
@@ -694,7 +694,7 @@ Requires-Python: >=3.12
694
694
  Description-Content-Type: text/x-rst
695
695
  License-File: LICENSE
696
696
  License-File: AUTHORS.rst
697
- Requires-Dist: edc==1.1.4
697
+ Requires-Dist: edc==1.1.6
698
698
  Requires-Dist: beautifulsoup4
699
699
  Requires-Dist: celery[redis]
700
700
  Requires-Dist: django-pylabels
@@ -290,8 +290,8 @@ meta_edc/tests/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
290
290
  meta_edc/tests/tests/test_endpoints.py,sha256=5FdIHTd1xhUIgQLBzMV-Ml3VoFrlBrLLUbNarme5raw,23541
291
291
  meta_edc/views/__init__.py,sha256=TBXTih4Mpsg5Oh2jbyXqL9kH7bu3vWNRgVe93hvLCl8,32
292
292
  meta_edc/views/home_view.py,sha256=BXydy77TcdcM0-R3S_uHI4DtfnLMIzPJMyqjFJZFSsA,916
293
- meta_edc-1.1.5.dist-info/licenses/AUTHORS.rst,sha256=wL4KUOd7FAFThhkLAJxSLQ2BPzd3ikG9q0UVZr3BbLg,244
294
- meta_edc-1.1.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
293
+ meta_edc-1.1.7.dist-info/licenses/AUTHORS.rst,sha256=wL4KUOd7FAFThhkLAJxSLQ2BPzd3ikG9q0UVZr3BbLg,244
294
+ meta_edc-1.1.7.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
295
295
  meta_export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
296
296
  meta_export/admin_site.py,sha256=CiKAf0gDFvBKVc-1VM6KwM905ayVZuiY1tgaTeUeCi0,167
297
297
  meta_export/apps.py,sha256=3_5LB1MLtzfKekI2vT9Cm6puAx6t6AjtIfTTVdItdKg,226
@@ -303,10 +303,10 @@ meta_labs/lab_profiles.py,sha256=I3s07bzAQaRzNSAqBuprx6uIO048ovffL5gD28ZE2N0,957
303
303
  meta_labs/labs.py,sha256=0mpfORDUsjxBeyJdEC5NiF4kQHSQTfKiQuMKZ9Svaqw,128
304
304
  meta_labs/list_data.py,sha256=ZWvQ7ZuOgNZ8Cz-y5lzrAYCZC2HarlnlleFXdsI1P9c,477
305
305
  meta_labs/processing_profiles.py,sha256=fRX72FOl2rsnOJYhgup5QacfGSXKtWqn2gD3Giz2GDA,500
306
- meta_labs/reportables.py,sha256=OX1rxiWKmsi7_ODxH1O8yBGgOq56HAaiG1XTEDGaOhM,586
306
+ meta_labs/reportables.py,sha256=AgONHYWB7QsQ53ZsQOYcpgtV7Tl8yyt28GEkgjZ5lms,2204
307
307
  meta_labs/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
308
308
  meta_labs/tests/test_labs.py,sha256=49COK2X8F5kvwsIuuPaxBSzDo665J2ctd1DZzo-O4Cs,967
309
- meta_labs/tests/test_reportables.py,sha256=VxTQDScHxaQP1PNut7i4ATr4hTqVpmYUjDK7HQJ7vOI,1302
309
+ meta_labs/tests/test_reportables.py,sha256=Otp9ILx44Bmz59pNt85UJSEScPE0lo69MRJkLMwX05g,2659
310
310
  meta_labs/tests/urls.py,sha256=_sVCnQeiAFRYKhxga3_DjoKj_4bgs1s2gjcynDiapvA,111
311
311
  meta_lists/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
312
312
  meta_lists/admin.py,sha256=g05vpXfVIEBVG03aiPD8Vn-AnR7gL60MbPJAfzsO6R8,2157
@@ -1241,7 +1241,7 @@ tests/etc/user-rsa-restricted-private.pem,sha256=CUcHW9bznWdmmASN00hCzvxFPAFl4N2
1241
1241
  tests/etc/user-rsa-restricted-public.pem,sha256=mt84djoL-uHw6Wc5SJh0zml6VzXulnf8eQSFg7-fheg,450
1242
1242
  tests/etc/user-salt-local.key,sha256=x5anBw9fvbHurczouT3CjrkWb_xs7Ypm1htIJsgiuiw,256
1243
1243
  tests/etc/user-salt-restricted.key,sha256=pxmpcfBRNB-4C6wTvHXz-9fOfJgKIFOjaAF8ZFfa4q4,256
1244
- meta_edc-1.1.5.dist-info/METADATA,sha256=tGv9WuDrOcQPZYvqP1TGT2_RodSMFYL3Vcbtz4Eg2gY,43587
1245
- meta_edc-1.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1246
- meta_edc-1.1.5.dist-info/top_level.txt,sha256=RkzjNXwRq2kg_uZ_1bDwPUntijSXoY2YBqtByDwvvrc,244
1247
- meta_edc-1.1.5.dist-info/RECORD,,
1244
+ meta_edc-1.1.7.dist-info/METADATA,sha256=x8g7TgVmIZHGaqFK1KPhyc2yOIC-H0FelJqXFlNt-7A,43587
1245
+ meta_edc-1.1.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1246
+ meta_edc-1.1.7.dist-info/top_level.txt,sha256=RkzjNXwRq2kg_uZ_1bDwPUntijSXoY2YBqtByDwvvrc,244
1247
+ meta_edc-1.1.7.dist-info/RECORD,,
meta_labs/reportables.py CHANGED
@@ -1,4 +1,8 @@
1
+ from edc_constants.constants import FEMALE, MALE
2
+ from edc_reportable import MILLIGRAMS_PER_DECILITER, MILLIMOLES_PER_LITER, Formula
3
+ from edc_reportable.adult_age_options import adult_age_options
1
4
  from edc_reportable.data import africa, daids_july_2017
5
+ from edc_reportable.units import MICRO_IU_MILLILITER
2
6
 
3
7
  grading_data = {}
4
8
  grading_data.update(**daids_july_2017.dummies)
@@ -10,6 +14,63 @@ normal_data = africa.normal_data
10
14
  reportable_grades = [3, 4]
11
15
  reportable_grades_exceptions = {}
12
16
 
17
+ normal_data.update(
18
+ {
19
+ "glucose": [
20
+ Formula(
21
+ "0<=x<=99999",
22
+ units=MILLIMOLES_PER_LITER,
23
+ gender=[MALE, FEMALE],
24
+ **adult_age_options,
25
+ ),
26
+ Formula(
27
+ "0<=x<=99999",
28
+ units=MILLIGRAMS_PER_DECILITER,
29
+ gender=[MALE, FEMALE],
30
+ **adult_age_options,
31
+ ),
32
+ ],
33
+ "ins": [
34
+ Formula(
35
+ "0<=x<=99999",
36
+ units=MICRO_IU_MILLILITER,
37
+ gender=[MALE, FEMALE],
38
+ **adult_age_options,
39
+ ),
40
+ ],
41
+ }
42
+ )
43
+
44
+ grading_data.update(
45
+ {
46
+ "glucose": [
47
+ Formula(
48
+ "x<0",
49
+ grade=0,
50
+ units=MILLIMOLES_PER_LITER,
51
+ gender=[MALE, FEMALE],
52
+ **adult_age_options,
53
+ ),
54
+ Formula(
55
+ "x<0",
56
+ grade=0,
57
+ units=MILLIGRAMS_PER_DECILITER,
58
+ gender=[MALE, FEMALE],
59
+ **adult_age_options,
60
+ ),
61
+ ],
62
+ "ins": [
63
+ Formula(
64
+ "x<0",
65
+ grade=0,
66
+ units=MICRO_IU_MILLILITER,
67
+ gender=[MALE, FEMALE],
68
+ **adult_age_options,
69
+ ),
70
+ ],
71
+ }
72
+ )
73
+
13
74
  reference_range_options = dict(
14
75
  collection_name=collection_name,
15
76
  normal_data=africa.normal_data,
@@ -1,9 +1,11 @@
1
- from django.test import TestCase
1
+ from django.test import TestCase, tag
2
+ from edc_lab import site_labs
2
3
  from edc_reportable.models import GradingData, NormalData, ReferenceRangeCollection
3
4
  from edc_reportable.utils import load_reference_ranges
4
5
 
5
6
 
6
7
  class TestReportables(TestCase):
8
+ @tag("37")
7
9
  def test_load_reference_ranges(self):
8
10
 
9
11
  from meta_labs.reportables import (
@@ -23,15 +25,46 @@ class TestReportables(TestCase):
23
25
  )
24
26
  self.assertTrue(ReferenceRangeCollection.objects.filter(name=collection_name).exists())
25
27
  reference_range_collection = ReferenceRangeCollection.objects.get(name=collection_name)
28
+
29
+ for panel_name, requisition_panel in site_labs.lab_profiles.get(
30
+ "subject_lab_profile"
31
+ ).panels.items():
32
+ for utest_id in requisition_panel.utest_ids:
33
+ try:
34
+ utest_id, _ = utest_id
35
+ except ValueError:
36
+ pass
37
+ if not NormalData.objects.filter(label=utest_id).exists():
38
+ print(f"{utest_id} does not exist in NormalData")
39
+ if not GradingData.objects.filter(label=utest_id).exists():
40
+ print(f"{utest_id} does not exist in GradingData")
41
+
42
+ for panel_name, requisition_panel in site_labs.lab_profiles.get(
43
+ "subject_lab_profile"
44
+ ).panels.items():
45
+ for utest_id in requisition_panel.utest_ids:
46
+ try:
47
+ utest_id, _ = utest_id
48
+ except ValueError:
49
+ pass
50
+ self.assertTrue(
51
+ NormalData.objects.filter(label=utest_id).exists(),
52
+ msg=f"{utest_id} does not exist in NormalData",
53
+ )
54
+ self.assertTrue(
55
+ GradingData.objects.filter(label=utest_id).exists(),
56
+ msg=f"{utest_id} does not exist in GradingData",
57
+ )
58
+
26
59
  self.assertEqual(
27
60
  NormalData.objects.filter(
28
61
  reference_range_collection=reference_range_collection
29
62
  ).count(),
30
- 82,
63
+ 88,
31
64
  )
32
65
  self.assertEqual(
33
66
  GradingData.objects.filter(
34
67
  reference_range_collection=reference_range_collection
35
68
  ).count(),
36
- 174,
69
+ 180,
37
70
  )