Migrate IWRS from MySQL to MongoDB
- Add IWRS/common/mongo_writer.py with shared connection, indexes, upsert+snapshot helpers - Add IWRS/Patients/import_to_mongo.py (subject_summary + visits) - Add IWRS/Patients/import_notifications_to_mongo.py: parse PDF/JSON directly to Mongo (incl. PDF as BinData), replaces 2-step MySQL flow - Add IWRS/Drugs/import_to_mongo.py (shipments, items, inventory, destruction) - Add IWRS/backfill_mysql_to_mongo.py: one-shot history backfill - Switch IWRS/Patients/run_all.py and IWRS/Drugs/run_all.py to Mongo - Rewrite IWRS/Drugs/create_report.py data loaders to read from Mongo - 8 main collections (upsert = latest state) + 5 snapshot collections (append-only with import_id) under studie database; notifications and destruction are immutable and need no snapshots Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pk": 3237,
|
||||
"title": "Subject_Number_Creation",
|
||||
"label": "Janssen 77242113UCO3001 Subject CZ100132003 has been created in IRT at site DD5-CZ10013",
|
||||
"event": "Create",
|
||||
"actual_date": "2026-05-06",
|
||||
"subject": "CZ100132003",
|
||||
"study": "77242113UCO3001",
|
||||
"text": "77242113UCO3001\n\nJanssen Pharmaceuticals\nhttps://janssen.4gclinical.com\n\nSubject CZ100132003 has been created in IRT.\n\nSite Details\n\nLocation: CZE\n\nSite: DD5-CZ10013\n\nInvestigator: David Stepek\n\nSubject Details\n\nSubject: CZ100132003\n\nIRT Subject Status: Screened\n\nRescreened Subject: No\n\nCohort: Adult subjects (18 years or older)\n\nInformed Consent Date at Subject Creation: 06-May-2026\n\n ADT-IR: No\n\n 3 or More Advanced Therapies: No\n\n Ustekinumab: No\n\n Only Oral 5-ASA Compounds: No\n\nDate of Subject Creation in IRT: 06-May-2026\n\nTransaction Date/Time (site local): 06-May-2026 10:33:13\n\nTransaction Date/Time (system local): 06-May-2026 08:33:13\n\nTransaction performed by: dstepek@vnbrno.cz\n\nIf you have questions about this notification, please contact 4G Clinical Support at http://support.4gclinical.com"
|
||||
}
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pk": 3237,
|
||||
"title": "Subject_Number_Creation",
|
||||
"label": "Janssen 77242113UCO3001 Subject CZ100132003 has been created in IRT at site DD5-CZ10013",
|
||||
"event": "Create",
|
||||
"actual_date": "2026-05-06",
|
||||
"subject": "CZ100132003",
|
||||
"study": "77242113UCO3001",
|
||||
"text": "77242113UCO3001\n\nJanssen Pharmaceuticals\nhttps://janssen.4gclinical.com\n\nSubject CZ100132003 has been created in IRT.\n\nSite Details\n\nLocation: CZE\n\nSite: DD5-CZ10013\n\nInvestigator: David Stepek\n\nSubject Details\n\nSubject: CZ100132003\n\nIRT Subject Status: Screened\n\nRescreened Subject: No\n\nCohort: Adult subjects (18 years or older)\n\nInformed Consent Date at Subject Creation: 06-May-2026\n\n ADT-IR: No\n\n 3 or More Advanced Therapies: No\n\n Ustekinumab: No\n\n Only Oral 5-ASA Compounds: No\n\nDate of Subject Creation in IRT: 06-May-2026\n\nTransaction Date/Time (site local): 06-May-2026 10:33:13\n\nTransaction Date/Time (system local): 06-May-2026 08:33:13\n\nTransaction performed by: dstepek@vnbrno.cz\n\nIf you have questions about this notification, please contact 4G Clinical Support at http://support.4gclinical.com"
|
||||
}
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pk": 3510,
|
||||
"title": "Subject_Number_Creation",
|
||||
"label": "Janssen 77242113UCO3001 Subject CZ100032001 has been created in IRT at site DD5-CZ10003",
|
||||
"event": "Create",
|
||||
"actual_date": "2026-05-13",
|
||||
"subject": "CZ100032001",
|
||||
"study": "77242113UCO3001",
|
||||
"text": "77242113UCO3001\n\nJanssen Pharmaceuticals\nhttps://janssen.4gclinical.com\n\nSubject CZ100032001 has been created in IRT.\n\nSite Details\n\nLocation: CZE\n\nSite: DD5-CZ10003\n\nInvestigator: Leksa Vaclav\n\nSubject Details\n\nSubject: CZ100032001\n\nIRT Subject Status: Screened\n\nRescreened Subject: No\n\nCohort: Adult subjects (18 years or older)\n\nInformed Consent Date at Subject Creation: 13-May-2026\n\n ADT-IR: No\n\n 3 or More Advanced Therapies: No\n\n Ustekinumab: No\n\n Only Oral 5-ASA Compounds: No\n\nDate of Subject Creation in IRT: 13-May-2026\n\nTransaction Date/Time (site local): 13-May-2026 07:44:11\n\nTransaction Date/Time (system local): 13-May-2026 05:44:11\n\nTransaction performed by: vaclav.leksa@seznam.cz\n\nIf you have questions about this notification, please contact 4G Clinical Support at http://support.4gclinical.com"
|
||||
}
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pk": 3510,
|
||||
"title": "Subject_Number_Creation",
|
||||
"label": "Janssen 77242113UCO3001 Subject CZ100032001 has been created in IRT at site DD5-CZ10003",
|
||||
"event": "Create",
|
||||
"actual_date": "2026-05-13",
|
||||
"subject": "CZ100032001",
|
||||
"study": "77242113UCO3001",
|
||||
"text": "77242113UCO3001\n\nJanssen Pharmaceuticals\nhttps://janssen.4gclinical.com\n\nSubject CZ100032001 has been created in IRT.\n\nSite Details\n\nLocation: CZE\n\nSite: DD5-CZ10003\n\nInvestigator: Leksa Vaclav\n\nSubject Details\n\nSubject: CZ100032001\n\nIRT Subject Status: Screened\n\nRescreened Subject: No\n\nCohort: Adult subjects (18 years or older)\n\nInformed Consent Date at Subject Creation: 13-May-2026\n\n ADT-IR: No\n\n 3 or More Advanced Therapies: No\n\n Ustekinumab: No\n\n Only Oral 5-ASA Compounds: No\n\nDate of Subject Creation in IRT: 13-May-2026\n\nTransaction Date/Time (site local): 13-May-2026 07:44:11\n\nTransaction Date/Time (system local): 13-May-2026 05:44:11\n\nTransaction performed by: vaclav.leksa@seznam.cz\n\nIf you have questions about this notification, please contact 4G Clinical Support at http://support.4gclinical.com"
|
||||
}
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pk": 4231,
|
||||
"title": "Subject_Number_Creation",
|
||||
"label": "Janssen 77242113UCO3001 Subject CZ100162002 has been created in IRT at site DD5-CZ10016",
|
||||
"event": "Create",
|
||||
"actual_date": "2026-05-27",
|
||||
"subject": "CZ100162002",
|
||||
"study": "77242113UCO3001",
|
||||
"text": "77242113UCO3001\n\nJanssen Pharmaceuticals\nhttps://janssen.4gclinical.com\n\nSubject CZ100162002 has been created in IRT.\n\nSite Details\n\nLocation: CZE\n\nSite: DD5-CZ10016\n\nInvestigator: Robert Mudr\n\nSubject Details\n\nSubject: CZ100162002\n\nIRT Subject Status: Screened\n\nRescreened Subject: No\n\nCohort: Adult subjects (18 years or older)\n\nInformed Consent Date at Subject Creation: 27-May-2026\n\n ADT-IR: Yes\n\n 3 or More Advanced Therapies: No\n\n Ustekinumab: No\n\n Only Oral 5-ASA Compounds: No\n\nDate of Subject Creation in IRT: 27-May-2026\n\nTransaction Date/Time (site local): 27-May-2026 11:55:28\n\nTransaction Date/Time (system local): 27-May-2026 09:55:28\n\nTransaction performed by: petr.pekny@nmskb.cz\n\nIf you have questions about this notification, please contact 4G Clinical Support at http://support.4gclinical.com"
|
||||
}
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pk": 4231,
|
||||
"title": "Subject_Number_Creation",
|
||||
"label": "Janssen 77242113UCO3001 Subject CZ100162002 has been created in IRT at site DD5-CZ10016",
|
||||
"event": "Create",
|
||||
"actual_date": "2026-05-27",
|
||||
"subject": "CZ100162002",
|
||||
"study": "77242113UCO3001",
|
||||
"text": "77242113UCO3001\n\nJanssen Pharmaceuticals\nhttps://janssen.4gclinical.com\n\nSubject CZ100162002 has been created in IRT.\n\nSite Details\n\nLocation: CZE\n\nSite: DD5-CZ10016\n\nInvestigator: Robert Mudr\n\nSubject Details\n\nSubject: CZ100162002\n\nIRT Subject Status: Screened\n\nRescreened Subject: No\n\nCohort: Adult subjects (18 years or older)\n\nInformed Consent Date at Subject Creation: 27-May-2026\n\n ADT-IR: Yes\n\n 3 or More Advanced Therapies: No\n\n Ustekinumab: No\n\n Only Oral 5-ASA Compounds: No\n\nDate of Subject Creation in IRT: 27-May-2026\n\nTransaction Date/Time (site local): 27-May-2026 11:55:28\n\nTransaction Date/Time (system local): 27-May-2026 09:55:28\n\nTransaction performed by: petr.pekny@nmskb.cz\n\nIf you have questions about this notification, please contact 4G Clinical Support at http://support.4gclinical.com"
|
||||
}
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pk": 4271,
|
||||
"title": "Subject_Number_Creation",
|
||||
"label": "Janssen 77242113UCO3001 Subject CZ100012004 has been created in IRT at site DD5-CZ10001",
|
||||
"event": "Create",
|
||||
"actual_date": "2026-05-28",
|
||||
"subject": "CZ100012004",
|
||||
"study": "77242113UCO3001",
|
||||
"text": "77242113UCO3001\n\nJanssen Pharmaceuticals\nhttps://janssen.4gclinical.com\n\nSubject CZ100012004 has been created in IRT.\n\nSite Details\n\nLocation: CZE\n\nSite: DD5-CZ10001\n\nInvestigator: Matej Falc\n\nSubject Details\n\nSubject: CZ100012004\n\nIRT Subject Status: Screened\n\nRescreened Subject: No\n\nCohort: Adult subjects (18 years or older)\n\nInformed Consent Date at Subject Creation: 28-May-2026\n\n ADT-IR: No\n\n 3 or More Advanced Therapies: No\n\n Ustekinumab: No\n\n Only Oral 5-ASA Compounds: No\n\nDate of Subject Creation in IRT: 28-May-2026\n\nTransaction Date/Time (site local): 28-May-2026 07:14:21\n\nTransaction Date/Time (system local): 28-May-2026 05:14:21\n\nTransaction performed by: matesfalc@seznam.cz\n\nIf you have questions about this notification, please contact 4G Clinical Support at http://support.4gclinical.com"
|
||||
}
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pk": 4271,
|
||||
"title": "Subject_Number_Creation",
|
||||
"label": "Janssen 77242113UCO3001 Subject CZ100012004 has been created in IRT at site DD5-CZ10001",
|
||||
"event": "Create",
|
||||
"actual_date": "2026-05-28",
|
||||
"subject": "CZ100012004",
|
||||
"study": "77242113UCO3001",
|
||||
"text": "77242113UCO3001\n\nJanssen Pharmaceuticals\nhttps://janssen.4gclinical.com\n\nSubject CZ100012004 has been created in IRT.\n\nSite Details\n\nLocation: CZE\n\nSite: DD5-CZ10001\n\nInvestigator: Matej Falc\n\nSubject Details\n\nSubject: CZ100012004\n\nIRT Subject Status: Screened\n\nRescreened Subject: No\n\nCohort: Adult subjects (18 years or older)\n\nInformed Consent Date at Subject Creation: 28-May-2026\n\n ADT-IR: No\n\n 3 or More Advanced Therapies: No\n\n Ustekinumab: No\n\n Only Oral 5-ASA Compounds: No\n\nDate of Subject Creation in IRT: 28-May-2026\n\nTransaction Date/Time (site local): 28-May-2026 07:14:21\n\nTransaction Date/Time (system local): 28-May-2026 05:14:21\n\nTransaction performed by: matesfalc@seznam.cz\n\nIf you have questions about this notification, please contact 4G Clinical Support at http://support.4gclinical.com"
|
||||
}
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pk": 4461,
|
||||
"title": "Randomized",
|
||||
"label": "Janssen 77242113UCO3001 Subject randomized CZ100132003 at site DD5-CZ10013",
|
||||
"event": "I0",
|
||||
"actual_date": "2026-06-02",
|
||||
"subject": "CZ100132003",
|
||||
"study": "77242113UCO3001",
|
||||
"text": "77242113UCO3001\n\nJanssen Pharmaceuticals\nhttps://janssen.4gclinical.com\n\nSubject CZ100132003 has been randomized.\n\n The following medication(s) has been assigned to the subject:\n\n \n \n Medication No\n Medication Type\n Packaged Lot No\n Expiration Date\n \n \n \n 1056513\n Icotrokinra 320mg / placebo\n 4393030\n 19-Jan-2027\n \n \n \n\nSite Details\n\nLocation: CZE\n\nSite: DD5-CZ10013\n\nInvestigator: David Stepek\n\nSubject Details\n\nSubject: CZ100132003\n\nIRT Subject Status: Randomized\n\nCohort: Adult subjects (18 years or older)\n\n ADT-IR: No\n\n 3 or More Advanced Therapies: No\n\n Ustekinumab: No\n\n Only Oral 5-ASA Compounds: No\n \n Isolated Proctitis: No\n\nTransaction Date/Time (site local): 02-Jun-2026 08:19:11\n\nTransaction Date/Time (system local): 02-Jun-2026 06:19:11\n\nTransaction performed by: dstepek@vnbrno.cz\n\nIf you have questions about this notification, please contact 4G Clinical Support at http://support.4gclinical.com"
|
||||
}
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"pk": 4461,
|
||||
"title": "Randomized",
|
||||
"label": "Janssen 77242113UCO3001 Subject randomized CZ100132003 at site DD5-CZ10013",
|
||||
"event": "I0",
|
||||
"actual_date": "2026-06-02",
|
||||
"subject": "CZ100132003",
|
||||
"study": "77242113UCO3001",
|
||||
"text": "77242113UCO3001\n\nJanssen Pharmaceuticals\nhttps://janssen.4gclinical.com\n\nSubject CZ100132003 has been randomized.\n\n The following medication(s) has been assigned to the subject:\n\n \n \n Medication No\n Medication Type\n Packaged Lot No\n Expiration Date\n \n \n \n 1056513\n Icotrokinra 320mg / placebo\n 4393030\n 19-Jan-2027\n \n \n \n\nSite Details\n\nLocation: CZE\n\nSite: DD5-CZ10013\n\nInvestigator: David Stepek\n\nSubject Details\n\nSubject: CZ100132003\n\nIRT Subject Status: Randomized\n\nCohort: Adult subjects (18 years or older)\n\n ADT-IR: No\n\n 3 or More Advanced Therapies: No\n\n Ustekinumab: No\n\n Only Oral 5-ASA Compounds: No\n \n Isolated Proctitis: No\n\nTransaction Date/Time (site local): 02-Jun-2026 08:19:11\n\nTransaction Date/Time (system local): 02-Jun-2026 06:19:11\n\nTransaction performed by: dstepek@vnbrno.cz\n\nIf you have questions about this notification, please contact 4G Clinical Support at http://support.4gclinical.com"
|
||||
}
|
||||
Reference in New Issue
Block a user