meta-edc 1.1.0__py3-none-any.whl → 1.1.2__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.
- meta_analytics/README.rst +1 -2
- meta_analytics/dataframes/glucose_endpoints/glucose_endpoints_by_date.py +8 -0
- meta_analytics/notebooks/endpoints/meta_endpoints_by_date.ipynb +38 -46
- meta_analytics/notebooks/monitoring_report.ipynb +329 -246
- meta_analytics/notebooks/qa.ipynb +265 -0
- meta_consent/admin/actions/create_missing_prescriptions.py +1 -1
- meta_consent/admin/modeladmin_mixins.py +1 -1
- meta_consent/management/commands/create_missing_prescriptions.py +1 -1
- meta_consent/models/signals.py +1 -1
- meta_edc/settings/debug.py +2 -2
- {meta_edc-1.1.0.dist-info → meta_edc-1.1.2.dist-info}/METADATA +4 -4
- {meta_edc-1.1.0.dist-info → meta_edc-1.1.2.dist-info}/RECORD +30 -29
- meta_labs/tests/test_reportables.py +1 -1
- meta_prn/admin/offschedule_pregnancy_admin.py +3 -3
- meta_prn/admin/onschedule_dm_referral_admin.py +5 -5
- meta_prn/form_validators/end_of_study.py +2 -2
- meta_reports/admin/last_imp_refill_admin.py +3 -2
- meta_reports/models/endpoints.py +3 -0
- meta_reports/tasks.py +3 -2
- meta_subject/action_items.py +1 -1
- meta_subject/form_validators/delivery_form_validator.py +1 -0
- meta_subject/forms/delivery_form.py +2 -0
- meta_subject/management/commands/create_missing_rx.py +1 -1
- meta_subject/migrations/0107_auto_20220415_0043.py +1 -1
- meta_subject/models/signals.py +1 -1
- meta_subject/tests/tests/test_study_medication.py +1 -2
- {meta_edc-1.1.0.dist-info → meta_edc-1.1.2.dist-info}/WHEEL +0 -0
- {meta_edc-1.1.0.dist-info → meta_edc-1.1.2.dist-info}/licenses/AUTHORS.rst +0 -0
- {meta_edc-1.1.0.dist-info → meta_edc-1.1.2.dist-info}/licenses/LICENSE +0 -0
- {meta_edc-1.1.0.dist-info → meta_edc-1.1.2.dist-info}/top_level.txt +0 -0
meta_analytics/README.rst
CHANGED
@@ -304,6 +304,14 @@ class GlucoseEndpointsByDate:
|
|
304
304
|
model_cls = django_apps.get_model(model)
|
305
305
|
if self.subject_identifiers:
|
306
306
|
model_cls.objects.filter(subject_identifier__in=self.subject_identifiers).delete()
|
307
|
+
df = (
|
308
|
+
self.endpoint_only_df[
|
309
|
+
self.endpoint_only_df["subject_identifier"].isin(self.subject_identifiers)
|
310
|
+
]
|
311
|
+
.copy()
|
312
|
+
.sort_values(by=["subject_identifier"])
|
313
|
+
.reset_index(drop=True)
|
314
|
+
)
|
307
315
|
else:
|
308
316
|
model_cls.objects.all().delete()
|
309
317
|
created = 0
|
@@ -10,8 +10,10 @@
|
|
10
10
|
"%%capture\n",
|
11
11
|
"import os\n",
|
12
12
|
"from pathlib import Path\n",
|
13
|
+
"\n",
|
13
14
|
"import pandas as pd\n",
|
14
15
|
"from dj_notebook import activate\n",
|
16
|
+
"\n",
|
15
17
|
"env_file = os.environ[\"META_ENV\"]\n",
|
16
18
|
"reports_folder = Path(os.environ[\"META_REPORTS_FOLDER\"])\n",
|
17
19
|
"analysis_folder = Path(os.environ[\"META_ANALYSIS_FOLDER\"])\n",
|
@@ -29,13 +31,13 @@
|
|
29
31
|
"source": [
|
30
32
|
"import numpy as np\n",
|
31
33
|
"import io\n",
|
32
|
-
"import msoffcrypto\n",
|
34
|
+
"# import msoffcrypto\n",
|
33
35
|
"import mempass\n",
|
34
36
|
"\n",
|
35
37
|
"from datetime import datetime\n",
|
36
38
|
"from edc_appointment.constants import ONTIME_APPT, NEW_APPT, CANCELLED_APPT, MISSED_APPT\n",
|
37
39
|
"from edc_pdutils.dataframes import get_crf, get_subject_visit\n",
|
38
|
-
"from tabulate import tabulate\n",
|
40
|
+
"# from tabulate import tabulate\n",
|
39
41
|
"from meta_analytics.dataframes import get_glucose_fbg_ogtt_df, get_glucose_fbg_df\n",
|
40
42
|
"from meta_analytics.dataframes import GlucoseEndpointsByDate\n",
|
41
43
|
"from meta_analytics.dataframes import get_glucose_df\n",
|
@@ -78,16 +80,6 @@
|
|
78
80
|
"id": "5",
|
79
81
|
"metadata": {},
|
80
82
|
"outputs": [],
|
81
|
-
"source": [
|
82
|
-
"cls.endpoint_only_df"
|
83
|
-
]
|
84
|
-
},
|
85
|
-
{
|
86
|
-
"cell_type": "code",
|
87
|
-
"execution_count": null,
|
88
|
-
"id": "6",
|
89
|
-
"metadata": {},
|
90
|
-
"outputs": [],
|
91
83
|
"source": [
|
92
84
|
"df_glu = get_glucose_df()\n",
|
93
85
|
"df_glu.query(\"subject_identifier=='105-40-0379-1'\")\n",
|
@@ -100,7 +92,7 @@
|
|
100
92
|
{
|
101
93
|
"cell_type": "code",
|
102
94
|
"execution_count": null,
|
103
|
-
"id": "
|
95
|
+
"id": "6",
|
104
96
|
"metadata": {},
|
105
97
|
"outputs": [],
|
106
98
|
"source": [
|
@@ -110,7 +102,7 @@
|
|
110
102
|
{
|
111
103
|
"cell_type": "code",
|
112
104
|
"execution_count": null,
|
113
|
-
"id": "
|
105
|
+
"id": "7",
|
114
106
|
"metadata": {},
|
115
107
|
"outputs": [],
|
116
108
|
"source": [
|
@@ -120,7 +112,7 @@
|
|
120
112
|
{
|
121
113
|
"cell_type": "code",
|
122
114
|
"execution_count": null,
|
123
|
-
"id": "
|
115
|
+
"id": "8",
|
124
116
|
"metadata": {},
|
125
117
|
"outputs": [],
|
126
118
|
"source": [
|
@@ -130,7 +122,7 @@
|
|
130
122
|
{
|
131
123
|
"cell_type": "code",
|
132
124
|
"execution_count": null,
|
133
|
-
"id": "
|
125
|
+
"id": "9",
|
134
126
|
"metadata": {},
|
135
127
|
"outputs": [],
|
136
128
|
"source": [
|
@@ -140,7 +132,7 @@
|
|
140
132
|
{
|
141
133
|
"cell_type": "code",
|
142
134
|
"execution_count": null,
|
143
|
-
"id": "
|
135
|
+
"id": "10",
|
144
136
|
"metadata": {},
|
145
137
|
"outputs": [],
|
146
138
|
"source": [
|
@@ -151,7 +143,7 @@
|
|
151
143
|
{
|
152
144
|
"cell_type": "code",
|
153
145
|
"execution_count": null,
|
154
|
-
"id": "
|
146
|
+
"id": "11",
|
155
147
|
"metadata": {},
|
156
148
|
"outputs": [],
|
157
149
|
"source": [
|
@@ -161,7 +153,7 @@
|
|
161
153
|
{
|
162
154
|
"cell_type": "code",
|
163
155
|
"execution_count": null,
|
164
|
-
"id": "
|
156
|
+
"id": "12",
|
165
157
|
"metadata": {},
|
166
158
|
"outputs": [],
|
167
159
|
"source": [
|
@@ -180,7 +172,7 @@
|
|
180
172
|
{
|
181
173
|
"cell_type": "code",
|
182
174
|
"execution_count": null,
|
183
|
-
"id": "
|
175
|
+
"id": "13",
|
184
176
|
"metadata": {},
|
185
177
|
"outputs": [],
|
186
178
|
"source": [
|
@@ -218,7 +210,7 @@
|
|
218
210
|
{
|
219
211
|
"cell_type": "code",
|
220
212
|
"execution_count": null,
|
221
|
-
"id": "
|
213
|
+
"id": "14",
|
222
214
|
"metadata": {},
|
223
215
|
"outputs": [],
|
224
216
|
"source": [
|
@@ -229,7 +221,7 @@
|
|
229
221
|
{
|
230
222
|
"cell_type": "code",
|
231
223
|
"execution_count": null,
|
232
|
-
"id": "
|
224
|
+
"id": "15",
|
233
225
|
"metadata": {},
|
234
226
|
"outputs": [],
|
235
227
|
"source": [
|
@@ -289,7 +281,7 @@
|
|
289
281
|
{
|
290
282
|
"cell_type": "code",
|
291
283
|
"execution_count": null,
|
292
|
-
"id": "
|
284
|
+
"id": "16",
|
293
285
|
"metadata": {},
|
294
286
|
"outputs": [],
|
295
287
|
"source": [
|
@@ -333,7 +325,7 @@
|
|
333
325
|
{
|
334
326
|
"cell_type": "code",
|
335
327
|
"execution_count": null,
|
336
|
-
"id": "
|
328
|
+
"id": "17",
|
337
329
|
"metadata": {},
|
338
330
|
"outputs": [],
|
339
331
|
"source": [
|
@@ -345,7 +337,7 @@
|
|
345
337
|
{
|
346
338
|
"cell_type": "code",
|
347
339
|
"execution_count": null,
|
348
|
-
"id": "
|
340
|
+
"id": "18",
|
349
341
|
"metadata": {},
|
350
342
|
"outputs": [],
|
351
343
|
"source": [
|
@@ -357,7 +349,7 @@
|
|
357
349
|
{
|
358
350
|
"cell_type": "code",
|
359
351
|
"execution_count": null,
|
360
|
-
"id": "
|
352
|
+
"id": "19",
|
361
353
|
"metadata": {},
|
362
354
|
"outputs": [],
|
363
355
|
"source": [
|
@@ -369,7 +361,7 @@
|
|
369
361
|
{
|
370
362
|
"cell_type": "code",
|
371
363
|
"execution_count": null,
|
372
|
-
"id": "
|
364
|
+
"id": "20",
|
373
365
|
"metadata": {},
|
374
366
|
"outputs": [],
|
375
367
|
"source": [
|
@@ -381,7 +373,7 @@
|
|
381
373
|
{
|
382
374
|
"cell_type": "code",
|
383
375
|
"execution_count": null,
|
384
|
-
"id": "
|
376
|
+
"id": "21",
|
385
377
|
"metadata": {},
|
386
378
|
"outputs": [],
|
387
379
|
"source": [
|
@@ -392,7 +384,7 @@
|
|
392
384
|
{
|
393
385
|
"cell_type": "code",
|
394
386
|
"execution_count": null,
|
395
|
-
"id": "
|
387
|
+
"id": "22",
|
396
388
|
"metadata": {},
|
397
389
|
"outputs": [],
|
398
390
|
"source": [
|
@@ -405,7 +397,7 @@
|
|
405
397
|
{
|
406
398
|
"cell_type": "code",
|
407
399
|
"execution_count": null,
|
408
|
-
"id": "
|
400
|
+
"id": "23",
|
409
401
|
"metadata": {},
|
410
402
|
"outputs": [],
|
411
403
|
"source": [
|
@@ -429,7 +421,7 @@
|
|
429
421
|
{
|
430
422
|
"cell_type": "code",
|
431
423
|
"execution_count": null,
|
432
|
-
"id": "
|
424
|
+
"id": "24",
|
433
425
|
"metadata": {},
|
434
426
|
"outputs": [],
|
435
427
|
"source": [
|
@@ -470,7 +462,7 @@
|
|
470
462
|
{
|
471
463
|
"cell_type": "code",
|
472
464
|
"execution_count": null,
|
473
|
-
"id": "
|
465
|
+
"id": "25",
|
474
466
|
"metadata": {},
|
475
467
|
"outputs": [],
|
476
468
|
"source": [
|
@@ -483,7 +475,7 @@
|
|
483
475
|
{
|
484
476
|
"cell_type": "code",
|
485
477
|
"execution_count": null,
|
486
|
-
"id": "
|
478
|
+
"id": "26",
|
487
479
|
"metadata": {},
|
488
480
|
"outputs": [],
|
489
481
|
"source": [
|
@@ -497,13 +489,13 @@
|
|
497
489
|
"df['Total'] = df[['10', '20', '30', '40', '60']].sum(axis=1)\n",
|
498
490
|
"df.fillna(0, inplace=True)\n",
|
499
491
|
"df\n",
|
500
|
-
"print(tabulate(df[['label', '10', '20', '30', '40', '60', 'Total']], showindex=False, headers=\"keys\", tablefmt=\"simple_grid\"))\n"
|
492
|
+
"# print(tabulate(df[['label', '10', '20', '30', '40', '60', 'Total']], showindex=False, headers=\"keys\", tablefmt=\"simple_grid\"))\n"
|
501
493
|
]
|
502
494
|
},
|
503
495
|
{
|
504
496
|
"cell_type": "code",
|
505
497
|
"execution_count": null,
|
506
|
-
"id": "
|
498
|
+
"id": "27",
|
507
499
|
"metadata": {},
|
508
500
|
"outputs": [],
|
509
501
|
"source": [
|
@@ -513,7 +505,7 @@
|
|
513
505
|
{
|
514
506
|
"cell_type": "code",
|
515
507
|
"execution_count": null,
|
516
|
-
"id": "
|
508
|
+
"id": "28",
|
517
509
|
"metadata": {},
|
518
510
|
"outputs": [],
|
519
511
|
"source": [
|
@@ -523,7 +515,7 @@
|
|
523
515
|
{
|
524
516
|
"cell_type": "code",
|
525
517
|
"execution_count": null,
|
526
|
-
"id": "
|
518
|
+
"id": "29",
|
527
519
|
"metadata": {},
|
528
520
|
"outputs": [],
|
529
521
|
"source": [
|
@@ -533,7 +525,7 @@
|
|
533
525
|
{
|
534
526
|
"cell_type": "code",
|
535
527
|
"execution_count": null,
|
536
|
-
"id": "
|
528
|
+
"id": "30",
|
537
529
|
"metadata": {},
|
538
530
|
"outputs": [],
|
539
531
|
"source": [
|
@@ -543,7 +535,7 @@
|
|
543
535
|
{
|
544
536
|
"cell_type": "code",
|
545
537
|
"execution_count": null,
|
546
|
-
"id": "
|
538
|
+
"id": "31",
|
547
539
|
"metadata": {},
|
548
540
|
"outputs": [],
|
549
541
|
"source": [
|
@@ -553,7 +545,7 @@
|
|
553
545
|
{
|
554
546
|
"cell_type": "code",
|
555
547
|
"execution_count": null,
|
556
|
-
"id": "
|
548
|
+
"id": "32",
|
557
549
|
"metadata": {},
|
558
550
|
"outputs": [],
|
559
551
|
"source": [
|
@@ -563,7 +555,7 @@
|
|
563
555
|
{
|
564
556
|
"cell_type": "code",
|
565
557
|
"execution_count": null,
|
566
|
-
"id": "
|
558
|
+
"id": "33",
|
567
559
|
"metadata": {},
|
568
560
|
"outputs": [],
|
569
561
|
"source": [
|
@@ -573,7 +565,7 @@
|
|
573
565
|
{
|
574
566
|
"cell_type": "code",
|
575
567
|
"execution_count": null,
|
576
|
-
"id": "
|
568
|
+
"id": "34",
|
577
569
|
"metadata": {},
|
578
570
|
"outputs": [],
|
579
571
|
"source": [
|
@@ -586,7 +578,7 @@
|
|
586
578
|
{
|
587
579
|
"cell_type": "code",
|
588
580
|
"execution_count": null,
|
589
|
-
"id": "
|
581
|
+
"id": "35",
|
590
582
|
"metadata": {},
|
591
583
|
"outputs": [],
|
592
584
|
"source": [
|
@@ -598,7 +590,7 @@
|
|
598
590
|
{
|
599
591
|
"cell_type": "code",
|
600
592
|
"execution_count": null,
|
601
|
-
"id": "
|
593
|
+
"id": "36",
|
602
594
|
"metadata": {},
|
603
595
|
"outputs": [],
|
604
596
|
"source": [
|
@@ -609,7 +601,7 @@
|
|
609
601
|
{
|
610
602
|
"cell_type": "code",
|
611
603
|
"execution_count": null,
|
612
|
-
"id": "
|
604
|
+
"id": "37",
|
613
605
|
"metadata": {},
|
614
606
|
"outputs": [],
|
615
607
|
"source": [
|
@@ -621,7 +613,7 @@
|
|
621
613
|
{
|
622
614
|
"cell_type": "code",
|
623
615
|
"execution_count": null,
|
624
|
-
"id": "
|
616
|
+
"id": "38",
|
625
617
|
"metadata": {},
|
626
618
|
"outputs": [],
|
627
619
|
"source": [
|