ouhft / COPE

Project Repository for Work Package 4 of the COPE Transplant Trial
https://cope.nds.ox.ac.uk
1 stars 0 forks source link

Correct the Randomisation.allocated_on data #228

Open marshalc opened 7 years ago

marshalc commented 7 years ago

We will be relying on the allocated_on date to calculate the Follow Up windows, so we need to ensure this data is accurate. However, all data entered from prior to the system going live in mid-Jan 2016 shows the allocated date of the system going live, rather than the actual date of randomisation. This needs manually fixing.

See also the data needed to complete #223 as this can be done after the system is put live

marshalc commented 7 years ago

Awaiting #235 so that we can do data cleanup

AllyBradley commented 7 years ago

The offline randomisation dates for the UK are:

Trial ID Date/Time Randomised WP415901L 18/07/2015 00:00 WP415901R 18/07/2015 00:00 WP415902L 27/08/2015 00:00 WP415902R 27/08/2015 00:00 WP415903L 18/11/2015 00:00 WP415903R 18/11/2015 00:00 WP415904L 23/11/2015 00:00 WP415904R 23/11/2015 00:00

marshalc commented 7 years ago

Randomisation IDs to amend for UK 545 UK OFFline List WP415901 --> 18/07/2015
546 UK OFFline List WP415902 --> 27/08/2015 547 UK OFFline List WP415903 --> 18/11/2015 548 UK OFFline List WP415904 --> 23/11/2015

Need to do two more things:

marshalc commented 7 years ago

Moving this clean up task to 0.8.2 release because it needs #261 to be completed before I can edit the data in an auditable fashion

AllyBradley commented 7 years ago

Rest of Europe randomisation dates:

Offline Code ID Assigned To Date randomised (based on date of procurement) 462 WP441901 19/03/2015 464 WP441902 28/04/2015 486 WP441903 18/09/2015 488 WP441904 05/10/2015 493 WP441905 30/09/2015 496 WP441906 31/10/2015 503 WP441907 12/11/2015 514 WP441908 23/12/2015 520 WP441909 03/01/2016 466 WP442901 25/05/2015 465 WP443901 19/05/2015 485 WP443902 17/09/2015 500 WP443903 06/11/2015 505 WP443904 17/11/2015 509 WP443905 04/12/2015 468 WP444901 08/07/2015 473 WP444902 06/08/2015 525 WP444903 01/02/2016 461 WP445901 15/03/2015 467 WP445902 13/06/2015 479 WP445903 20/08/2015 508 WP445904 02/12/2015 516 WP445905 27/12/2015 529 WP445906 no date 463 WP446901 09/04/2015 477 WP446902 13/08/2015 494 WP446903 not transplantable 502 WP446904 10/11/2015 517 WP446905 15/12/2015 469 WP451901 20/07/2016 470 WP451902 22/07/2015 472 WP451903 04/08/2015 478 WP451904 19/08/2015 481 WP451905 27/08/2015 482 WP451906 08/09/2015 483 WP451907 09/09/2015 495 WP451908 29/10/2015 519 WP451909 03/01/2016 484 WP452901 14/09/2015 492 WP452902 21/10/2015 511 WP452903 09/12/2015 512 WP452904 10/12/2015 513 WP452905 11/12/2015 522 WP452906 14/01/2016 528 WP452907 02/01/2017 471 WP453901 31/07/2015 490 WP453902 12/10/2015 501 WP453903 07/11/2015 507 WP453904 22/11/2015 510 WP453905 06/12/2015 515 WP453906 24/12/2015 518 WP453907 01/01/2016 521 WP453908 07/01/2016 523 WP453909 19/01/2016 527 WP453910 no date 474 WP456901 08/08/2015 489 WP456902 10/10/2015 491 WP456903 14/10/2015 497 WP456904 31/10/2015 498 WP456905 01/11/2015 506 WP456906 20/11/2015 475 WP457901 08/08/2015 476 WP457902 10/08/2015 480 WP457903 26/08/2015 487 WP457904 23/09/2015 499 WP457905 05/11/2015 504 WP457906 16/06/2015 524 WP457907 28/01/2016 526 WP457908 29/04/2016

marshalc commented 7 years ago

Remove the default data for non-allocated randomisations:

UPDATE compare_randomisation
SET allocated_on = NULL, allocated_by_id = NULL
WHERE donor_id ISNULL 
marshalc commented 7 years ago

Done to live data

marshalc commented 7 years ago

Offline EU and UK records updated. Now working through the EU Online ones to correct Allocation data.

marshalc commented 7 years ago

Manually run the follow up activation process...

from wp4.followups.utils import activate_followups_in_window
activate_followups_in_window()
marshalc commented 7 years ago

Note

https://cope.nds.ox.ac.uk/en-gb/wp4/administration/completed-pairs

Looking at the completed pairs report based on the amended dates and updated reporting on timely cc values, we have a total of 8 kidney pairs complete for analysis. The other 52 eligible pairs presently lack both cc values at 12 months.

marshalc commented 7 years ago

Manually run again (see #242 about automating this). Manual steps:

# Local shell
ssh copeuser@cope.nds.ox.ac.uk

# On cope.nds
workon py3_cope
cd /sites/py3_cope/cope_repo/
alias pm="python manage.py"
pm shell

# In python shell
from wp4.followups.utils import activate_followups_in_window
activate_followups_in_window()
marshalc commented 7 years ago

NB: Still some EU Online data results to clean up, so this task isn't over yet.