diff --git a/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 42847922MDD3003 Subject Summary 1306.xlsx b/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 42847922MDD3003 Subject Summary 1306.xlsx new file mode 100644 index 0000000..8e81c20 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 42847922MDD3003 Subject Summary 1306.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 42847922MDD3003 Subject Summary.xlsx b/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 42847922MDD3003 Subject Summary.xlsx new file mode 100644 index 0000000..6971da4 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 42847922MDD3003 Subject Summary.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 77242113UCO3001 Subject Summary 1306.xlsx b/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 77242113UCO3001 Subject Summary 1306.xlsx new file mode 100644 index 0000000..31d24d0 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 77242113UCO3001 Subject Summary 1306.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 77242113UCO3001 Subject Summary.xlsx b/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 77242113UCO3001 Subject Summary.xlsx new file mode 100644 index 0000000..b315716 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/CreatedReports/2026-05-04 77242113UCO3001 Subject Summary.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 42847922MDD3003 Subject Summary Report 1307.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 42847922MDD3003 Subject Summary Report 1307.xlsx new file mode 100644 index 0000000..db5feb1 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 42847922MDD3003 Subject Summary Report 1307.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 42847922MDD3003 Subject Summary Report.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 42847922MDD3003 Subject Summary Report.xlsx new file mode 100644 index 0000000..7e090c7 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 42847922MDD3003 Subject Summary Report.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 77242113UCO3001 Subject Summary Report 1307.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 77242113UCO3001 Subject Summary Report 1307.xlsx new file mode 100644 index 0000000..5dc2af9 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 77242113UCO3001 Subject Summary Report 1307.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 77242113UCO3001 Subject Summary Report.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 77242113UCO3001 Subject Summary Report.xlsx new file mode 100644 index 0000000..4847786 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReports/2026-05-04 77242113UCO3001 Subject Summary Report.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040001 Subject Detail.xlsx new file mode 100644 index 0000000..1822af5 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040002 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040002 Subject Detail.xlsx new file mode 100644 index 0000000..f2d863a Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040002 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040003 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040003 Subject Detail.xlsx new file mode 100644 index 0000000..4c89bf0 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040003 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040004 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040004 Subject Detail.xlsx new file mode 100644 index 0000000..1dfe6d6 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040004 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040005 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040005 Subject Detail.xlsx new file mode 100644 index 0000000..dc1c704 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040005 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040006 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040006 Subject Detail.xlsx new file mode 100644 index 0000000..92e87cc Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040006 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040007 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040007 Subject Detail.xlsx new file mode 100644 index 0000000..239501a Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040007 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040008 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040008 Subject Detail.xlsx new file mode 100644 index 0000000..2920a9c Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040008 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040009 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040009 Subject Detail.xlsx new file mode 100644 index 0000000..ff79f79 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100040009 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100050001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100050001 Subject Detail.xlsx new file mode 100644 index 0000000..08285c2 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100050001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100050002 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100050002 Subject Detail.xlsx new file mode 100644 index 0000000..950cd34 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100050002 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080001 Subject Detail.xlsx new file mode 100644 index 0000000..fb694d1 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080002 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080002 Subject Detail.xlsx new file mode 100644 index 0000000..b89ecb8 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080002 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080003 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080003 Subject Detail.xlsx new file mode 100644 index 0000000..b421c1a Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080003 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080004 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080004 Subject Detail.xlsx new file mode 100644 index 0000000..c89a7a3 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080004 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080005 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080005 Subject Detail.xlsx new file mode 100644 index 0000000..edd9ad6 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080005 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080006 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080006 Subject Detail.xlsx new file mode 100644 index 0000000..9ebf643 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080006 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080007 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080007 Subject Detail.xlsx new file mode 100644 index 0000000..c1f5e68 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100080007 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110001 Subject Detail.xlsx new file mode 100644 index 0000000..76d1603 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110002 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110002 Subject Detail.xlsx new file mode 100644 index 0000000..99a3249 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110002 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110003 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110003 Subject Detail.xlsx new file mode 100644 index 0000000..13a7bb6 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110003 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110004 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110004 Subject Detail.xlsx new file mode 100644 index 0000000..d331b77 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110004 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110005 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110005 Subject Detail.xlsx new file mode 100644 index 0000000..21a6502 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110005 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110006 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110006 Subject Detail.xlsx new file mode 100644 index 0000000..18c38a2 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110006 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110007 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110007 Subject Detail.xlsx new file mode 100644 index 0000000..bdfd1ad Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110007 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110008 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110008 Subject Detail.xlsx new file mode 100644 index 0000000..7206498 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110008 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110009 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110009 Subject Detail.xlsx new file mode 100644 index 0000000..2427dc5 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110009 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110010 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110010 Subject Detail.xlsx new file mode 100644 index 0000000..050dc3f Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110010 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110011 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110011 Subject Detail.xlsx new file mode 100644 index 0000000..6c2d76b Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110011 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110012 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110012 Subject Detail.xlsx new file mode 100644 index 0000000..b9f8f97 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100110012 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120001 Subject Detail.xlsx new file mode 100644 index 0000000..d7028d0 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120002 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120002 Subject Detail.xlsx new file mode 100644 index 0000000..be224d9 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120002 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120003 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120003 Subject Detail.xlsx new file mode 100644 index 0000000..f87cb0d Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120003 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120004 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120004 Subject Detail.xlsx new file mode 100644 index 0000000..f658dd7 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120004 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120005 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120005 Subject Detail.xlsx new file mode 100644 index 0000000..3790a7e Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120005 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120006 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120006 Subject Detail.xlsx new file mode 100644 index 0000000..ad507fd Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/42847922MDD3003/2026-05-04 42847922MDD3003 CZ100120006 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100012001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100012001 Subject Detail.xlsx new file mode 100644 index 0000000..83a9b42 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100012001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100012002 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100012002 Subject Detail.xlsx new file mode 100644 index 0000000..8db6fad Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100012002 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100012003 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100012003 Subject Detail.xlsx new file mode 100644 index 0000000..1ffe97f Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100012003 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100062001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100062001 Subject Detail.xlsx new file mode 100644 index 0000000..d761fff Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100062001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100062002 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100062002 Subject Detail.xlsx new file mode 100644 index 0000000..05420ba Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100062002 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100092001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100092001 Subject Detail.xlsx new file mode 100644 index 0000000..9246f95 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100092001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100092002 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100092002 Subject Detail.xlsx new file mode 100644 index 0000000..116a889 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100092002 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100122001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100122001 Subject Detail.xlsx new file mode 100644 index 0000000..3091469 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100122001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100132001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100132001 Subject Detail.xlsx new file mode 100644 index 0000000..2928cf3 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100132001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100132002 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100132002 Subject Detail.xlsx new file mode 100644 index 0000000..1b973d1 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100132002 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100162001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100162001 Subject Detail.xlsx new file mode 100644 index 0000000..a0fe8e7 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100162001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100201001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100201001 Subject Detail.xlsx new file mode 100644 index 0000000..9febb21 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100201001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100212001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100212001 Subject Detail.xlsx new file mode 100644 index 0000000..d78e4e8 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100212001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222001 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222001 Subject Detail.xlsx new file mode 100644 index 0000000..74e4004 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222001 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222002 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222002 Subject Detail.xlsx new file mode 100644 index 0000000..599ddc7 Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222002 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222003 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222003 Subject Detail.xlsx new file mode 100644 index 0000000..0e2259b Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222003 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222004 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222004 Subject Detail.xlsx new file mode 100644 index 0000000..d0a02db Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222004 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222005 Subject Detail.xlsx b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222005 Subject Detail.xlsx new file mode 100644 index 0000000..0fea67a Binary files /dev/null and b/IWRS/Přehledpacientůstručný/IncomingSourceReportsDetails/77242113UCO3001/2026-05-04 77242113UCO3001 CZ100222005 Subject Detail.xlsx differ diff --git a/IWRS/Přehledpacientůstručný/create_subject_report.py b/IWRS/Přehledpacientůstručný/create_subject_report.py new file mode 100644 index 0000000..2b5af71 --- /dev/null +++ b/IWRS/Přehledpacientůstručný/create_subject_report.py @@ -0,0 +1,310 @@ +import os +import glob +import datetime +import pandas as pd +from openpyxl import Workbook +from openpyxl.styles import ( + Font, PatternFill, Alignment, Border, Side, GradientFill +) +from openpyxl.utils import get_column_letter + +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) +INCOMING_DIR = os.path.join(BASE_DIR, "IncomingSourceReports") +CREATED_DIR = os.path.join(BASE_DIR, "CreatedReports") + +STUDIES = ["77242113UCO3001", "42847922MDD3003"] + +SOURCE_COLS = [ + "Subject", + "Investigator", + "Subject's age collection", + "Cohort per IRT", + "IRT Subject Status", + "Last Recorded IRT Transaction", + "Next Expected IRT Transaction", + "Next Expected IRT Transaction Date [Local]", +] + +DISPLAY_HEADERS = [ + "Subject", + "Investigator", + "Věk", + "Cohort", + "Status", + "Last IRT", + "Next Visit", + "Next Date", +] + +COL_WIDTHS = [14, 22, 6, 12, 14, 12, 12, 13] + +# ── Styles ─────────────────────────────────────────────────────────────────── +HEADER_FILL = PatternFill("solid", fgColor="1F4E79") +HEADER_FONT = Font(name="Arial", bold=True, color="FFFFFF", size=10) +NORMAL_FONT = Font(name="Arial", size=10) +BOLD_FONT = Font(name="Arial", bold=True, size=10) +STRIKE_FONT = Font(name="Arial", size=10, strike=True, color="999999") +ADOLESC_FONT = Font(name="Arial", bold=True, size=10) + +THIN = Side(style="thin", color="CCCCCC") +BORDER = Border(left=THIN, right=THIN, top=THIN, bottom=THIN) + +EVEN_FILL = PatternFill("solid", fgColor="EBF3FB") +ODD_FILL = PatternFill("solid", fgColor="FFFFFF") + +CENTER = Alignment(horizontal="center", vertical="center", wrap_text=False) +LEFT = Alignment(horizontal="left", vertical="center", wrap_text=False) + + +def unique_path(directory, stem): + path = os.path.join(directory, f"{stem}.xlsx") + if not os.path.exists(path): + return path + time_tag = datetime.datetime.now().strftime("%H%M") + return os.path.join(directory, f"{stem} {time_tag}.xlsx") + + +def find_latest_source(study): + pattern = os.path.join(INCOMING_DIR, f"* {study} Subject Summary Report.xlsx") + files = sorted( + [f for f in glob.glob(pattern) if not os.path.basename(f).startswith("~$")], + key=os.path.getmtime, + reverse=True, + ) + if not files: + raise FileNotFoundError(f"Nenalezen zdrojový soubor pro {study} v {INCOMING_DIR}") + return files[0] + + +def load_source(path): + raw = pd.read_excel(path, header=None) + # find header row (row with "Subject" in first cell) + header_row = None + for i, row in raw.iterrows(): + if "Subject" in [str(v).strip() for v in row]: + header_row = i + break + if header_row is None: + raise ValueError("Hlavičkový řádek nenalezen") + df = pd.read_excel(path, header=header_row) + return df + + +def simplify_cohort(val): + if pd.isna(val): + return "" + val = str(val) + if "dolescent" in val: + return "Adolescent" + if val.startswith("Adult"): + return "Adult" + # MDD3003: "Part 1", "Part 2" — keep as-is + return val + + +def format_date(val): + if pd.isna(val): + return "" + if hasattr(val, "strftime"): + return val.strftime("%Y-%m-%d") + return str(val)[:10] + + +def write_zdroj(wb, df_raw, source_path): + mtime = datetime.datetime.fromtimestamp(os.path.getmtime(source_path)) + sheet_name = f"ZDROJ ({mtime.strftime('%d%b%Y').upper()})" + ws = wb.create_sheet(sheet_name) + ws.sheet_view.showGridLines = True + + # write raw headers + data as plain table + headers = list(df_raw.columns) + for c, h in enumerate(headers, 1): + cell = ws.cell(row=1, column=c, value=h) + cell.font = Font(name="Arial", bold=True, size=9, color="FFFFFF") + cell.fill = PatternFill("solid", fgColor="404040") + cell.alignment = LEFT + cell.border = BORDER + ws.column_dimensions[get_column_letter(c)].width = 20 + + for r, (_, row) in enumerate(df_raw.iterrows(), 2): + fill = EVEN_FILL if r % 2 == 0 else ODD_FILL + for c, col in enumerate(headers, 1): + val = row[col] + if pd.isna(val): + val = "" + elif hasattr(val, "strftime"): + val = val.strftime("%Y-%m-%d") + cell = ws.cell(row=r, column=c, value=val) + cell.font = Font(name="Arial", size=9) + cell.fill = fill + cell.border = BORDER + cell.alignment = LEFT + + ws.freeze_panes = "A2" + ws.auto_filter.ref = f"A1:{get_column_letter(len(headers))}1" + + +def write_prehled(wb, df_raw, study): + ws = wb.create_sheet("Přehled") + ws.sheet_view.showGridLines = False + ws.sheet_view.showRowColHeaders = True + + # ── title row ──────────────────────────────────────────────────────────── + ws.merge_cells("A1:H1") + title = ws["A1"] + title.value = f"Subject Summary — {study} ({datetime.date.today().strftime('%d-%b-%Y')})" + title.font = Font(name="Arial", bold=True, size=12, color="1F4E79") + title.alignment = Alignment(horizontal="left", vertical="center") + ws.row_dimensions[1].height = 22 + + # ── header row ─────────────────────────────────────────────────────────── + for c, (h, w) in enumerate(zip(DISPLAY_HEADERS, COL_WIDTHS), 1): + cell = ws.cell(row=2, column=c, value=h) + cell.font = HEADER_FONT + cell.fill = HEADER_FILL + cell.alignment = CENTER + cell.border = BORDER + ws.column_dimensions[get_column_letter(c)].width = w + ws.row_dimensions[2].height = 18 + + # ── build display dataframe ─────────────────────────────────────────────── + display = pd.DataFrame() + display["Subject"] = df_raw["Subject"].fillna("") + display["Investigator"]= df_raw["Investigator"].fillna("") + display["Věk"] = df_raw["Subject's age collection"].apply( + lambda v: "" if pd.isna(v) else int(v)) + display["Cohort"] = df_raw["Cohort per IRT"].apply(simplify_cohort) + display["Status"] = df_raw["IRT Subject Status"].fillna("") + display["Last IRT"] = df_raw["Last Recorded IRT Transaction"].fillna("—") + display["Next Visit"] = df_raw["Next Expected IRT Transaction"].fillna("—") + display["Next Date"] = df_raw["Next Expected IRT Transaction Date [Local]"].apply(format_date) + + display = display.sort_values("Subject").reset_index(drop=True) + + # ── data rows ──────────────────────────────────────────────────────────── + for r_idx, row in display.iterrows(): + excel_row = r_idx + 3 # row 1=title, row 2=header + status = str(row["Status"]) + is_failed = "Screen Failed" in status or "Discontinued" in status + is_randomized = "Randomized" in status + is_adolescent = row["Cohort"] == "Adolescent" + fill = EVEN_FILL if r_idx % 2 == 0 else ODD_FILL + + values = [ + row["Subject"], row["Investigator"], row["Věk"], + row["Cohort"], row["Status"], row["Last IRT"], + row["Next Visit"], row["Next Date"], + ] + + for c_idx, val in enumerate(values, 1): + cell = ws.cell(row=excel_row, column=c_idx, value=val if val != "" else None) + cell.fill = fill + cell.border = BORDER + + # alignment + cell.alignment = CENTER if c_idx in (3,) else LEFT + + # font logic + if is_failed: + cell.font = STRIKE_FONT + elif c_idx == 5 and is_randomized: + cell.font = BOLD_FONT + elif c_idx == 4 and is_adolescent: + cell.font = ADOLESC_FONT + else: + cell.font = NORMAL_FONT + + ws.row_dimensions[excel_row].height = 16 + + ws.freeze_panes = "A3" + last_data_row = len(display) + 2 + ws.auto_filter.ref = f"A2:H{last_data_row}" + + +def write_next_visits(wb, df_raw, study): + ws = wb.create_sheet("Next Visits") + ws.sheet_view.showGridLines = False + + # title + ws.merge_cells("A1:D1") + title = ws["A1"] + title.value = f"Next Expected Visits — {study} ({datetime.date.today().strftime('%d-%b-%Y')})" + title.font = Font(name="Arial", bold=True, size=12, color="1F4E79") + title.alignment = Alignment(horizontal="left", vertical="center") + ws.row_dimensions[1].height = 22 + + # headers + nv_headers = ["Subject", "Investigator", "Next Visit", "Datum"] + nv_widths = [14, 22, 26, 13] + for c, (h, w) in enumerate(zip(nv_headers, nv_widths), 1): + cell = ws.cell(row=2, column=c, value=h) + cell.font = HEADER_FONT + cell.fill = HEADER_FILL + cell.alignment = CENTER + cell.border = BORDER + ws.column_dimensions[get_column_letter(c)].width = w + ws.row_dimensions[2].height = 18 + + # data — only rows with a Next Date, exclude Screen Failed / Discontinued + df = pd.DataFrame() + df["Subject"] = df_raw["Subject"].fillna("") + df["Investigator"]= df_raw["Investigator"].fillna("") + df["Next Visit"] = df_raw["Next Expected IRT Transaction"].fillna("") + df["Datum"] = df_raw["Next Expected IRT Transaction Date [Local]"] + df["Status"] = df_raw["IRT Subject Status"].fillna("") + + df = df[df["Datum"].notna()] + df = df[~df["Status"].str.contains("Screen Failed|Discontinued", na=False)] + df = df.sort_values("Datum").reset_index(drop=True) + + for r_idx, row in df.iterrows(): + excel_row = r_idx + 3 + fill = EVEN_FILL if r_idx % 2 == 0 else ODD_FILL + datum_val = row["Datum"] + datum_str = datum_val.strftime("%Y-%m-%d") if hasattr(datum_val, "strftime") else str(datum_val)[:10] + + values = [row["Subject"], row["Investigator"], row["Next Visit"], datum_str] + for c_idx, val in enumerate(values, 1): + cell = ws.cell(row=excel_row, column=c_idx, value=val if val != "" else None) + cell.fill = fill + cell.border = BORDER + cell.font = NORMAL_FONT + cell.alignment = LEFT + ws.row_dimensions[excel_row].height = 16 + + ws.freeze_panes = "A3" + last_data_row = len(df) + 2 + ws.auto_filter.ref = f"A2:D{last_data_row}" + + +def create_report(study): + source_path = find_latest_source(study) + print(f"[{study}] Čtu: {os.path.basename(source_path)}") + + df_raw = load_source(source_path) + + wb = Workbook() + wb.remove(wb.active) # remove default sheet + + write_prehled(wb, df_raw, study) + write_next_visits(wb, df_raw, study) + write_zdroj(wb, df_raw, source_path) + + today = datetime.date.today().strftime("%Y-%m-%d") + out_path = unique_path(CREATED_DIR, f"{today} {study} Subject Summary") + wb.save(out_path) + print(f"[{study}] Uloženo: {out_path}") + return out_path + + +def main(): + os.makedirs(CREATED_DIR, exist_ok=True) + for study in STUDIES: + try: + create_report(study) + except FileNotFoundError as e: + print(f"[{study}] PŘESKOČENO: {e}") + print("\nHotovo.") + + +main() diff --git a/IWRS/Přehledpacientůstručný/download_subject_details.py b/IWRS/Přehledpacientůstručný/download_subject_details.py new file mode 100644 index 0000000..2080a6e --- /dev/null +++ b/IWRS/Přehledpacientůstručný/download_subject_details.py @@ -0,0 +1,114 @@ +from playwright.sync_api import sync_playwright +import os +import glob +import datetime + +import pandas as pd + +# ── CONFIG ────────────────────────────────────────────────────────────────── +BASE_URL = "https://janssen.4gclinical.com" +EMAIL = "vbuzalka@its.jnj.com" +PASSWORD = "Vlado123++-+" + +STUDIES = ["77242113UCO3001", "42847922MDD3003"] + +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) +INCOMING_DIR = os.path.join(BASE_DIR, "IncomingSourceReports") +DETAILS_DIR = os.path.join(BASE_DIR, "IncomingSourceReportsDetails") +# ──────────────────────────────────────────────────────────────────────────── + + +def get_subjects(study): + pattern = os.path.join(INCOMING_DIR, f"* {study} Subject Summary Report.xlsx") + files = sorted( + [f for f in glob.glob(pattern) if not os.path.basename(f).startswith("~$")], + key=os.path.getmtime, + reverse=True, + ) + if not files: + raise FileNotFoundError(f"Nenalezen Subject Summary Report pro {study}") + today = datetime.date.today().strftime("%Y-%m-%d") + if not os.path.basename(files[0]).startswith(today): + raise FileNotFoundError(f"Dnešní Subject Summary Report pro {study} neexistuje — spusť nejdříve download_subject_summary.py") + path = files[0] + print(f" Čtu subjekty z: {os.path.basename(path)}") + + raw = pd.read_excel(path, header=None) + header_row = None + for i, row in raw.iterrows(): + if "Subject" in [str(v).strip() for v in row]: + header_row = i + break + if header_row is None: + raise ValueError("Hlavičkový řádek nenalezen") + + df = pd.read_excel(path, header=header_row) + subjects = df["Subject"].dropna().astype(str).str.strip().tolist() + return subjects + + +def run(page, study): + out_dir = os.path.join(DETAILS_DIR, study) + os.makedirs(out_dir, exist_ok=True) + + subjects = get_subjects(study) + print(f" Nalezeno {len(subjects)} subjektů") + today = datetime.date.today().strftime("%Y-%m-%d") + + page.goto(f"{BASE_URL}/report/patient_detail_report") + page.wait_for_load_state("networkidle", timeout=120000) + + for subject in subjects: + filename = os.path.join(out_dir, f"{today} {study} {subject} Subject Detail.xlsx") + print(f" [{subject}] Stahuji...") + input_field = page.locator('input[placeholder="search"], input[type="text"]').first + input_field.click() + input_field.fill(subject) + page.wait_for_timeout(500) + page.locator("mat-option").first.dispatch_event("click") + page.wait_for_load_state("networkidle", timeout=120000) + + with page.expect_download(timeout=120000) as dl: + page.get_by_role("button", name="Download XLS").click() + dl.value.save_as(filename) + print(f" [{subject}] OK") + + page.get_by_role("button", name="Clear").click() + page.wait_for_load_state("networkidle", timeout=120000) + + print(f" [{study}] Subject details hotovo.") + + +def main(): + os.makedirs(DETAILS_DIR, exist_ok=True) + + with sync_playwright() as p: + for study in STUDIES: + print(f"\n[{study}] Přihlášení...") + browser = p.chromium.launch(headless=False) + context = browser.new_context(accept_downloads=True) + page = context.new_page() + + page.goto(BASE_URL) + page.wait_for_load_state("networkidle") + page.get_by_label("Email *").fill(EMAIL) + page.get_by_label("Password *").fill(PASSWORD) + page.locator("#login__submit").click() + page.wait_for_load_state("networkidle") + + page.get_by_label("Study *").click() + page.get_by_role("option", name=study).click() + page.get_by_role("button", name="SELECT").click() + page.wait_for_load_state("networkidle") + + try: + run(page, study) + except Exception as e: + print(f" [{study}] CHYBA: {e}") + + browser.close() + + print("\nVše hotovo.") + + +main() diff --git a/IWRS/Přehledpacientůstručný/download_subject_summary.py b/IWRS/Přehledpacientůstručný/download_subject_summary.py new file mode 100644 index 0000000..517f2bc --- /dev/null +++ b/IWRS/Přehledpacientůstručný/download_subject_summary.py @@ -0,0 +1,76 @@ +from playwright.sync_api import sync_playwright +import os +import datetime + +# ── CONFIG ────────────────────────────────────────────────────────────────── +BASE_URL = "https://janssen.4gclinical.com" +EMAIL = "vbuzalka@its.jnj.com" +PASSWORD = "Vlado123++-+" + +STUDIES = ["77242113UCO3001", "42847922MDD3003"] + +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) +INCOMING_DIR = os.path.join(BASE_DIR, "IncomingSourceReports") +CREATED_DIR = os.path.join(BASE_DIR, "CreatedReports") +# ──────────────────────────────────────────────────────────────────────────── + + +def unique_path(directory, stem): + path = os.path.join(directory, f"{stem}.xlsx") + if not os.path.exists(path): + return path + time_tag = datetime.datetime.now().strftime("%H%M") + return os.path.join(directory, f"{stem} {time_tag}.xlsx") + + +def download_study(page, study, today): + print(f"\n[{study}] Prihlaseni...") + page.goto(BASE_URL) + page.wait_for_load_state("networkidle") + page.get_by_label("Email *").fill(EMAIL) + page.get_by_label("Password *").fill(PASSWORD) + page.locator("#login__submit").click() + page.wait_for_load_state("networkidle") + + print(f"[{study}] Vyber studie...") + page.get_by_label("Study *").click() + page.get_by_role("option", name=study).click() + page.get_by_role("button", name="SELECT").click() + page.wait_for_load_state("networkidle") + + print(f"[{study}] Stahuji Subject Summary Report...") + page.goto(f"{BASE_URL}/report/patient_summary_report") + page.wait_for_load_state("networkidle", timeout=120000) + + filename = unique_path(INCOMING_DIR, f"{today} {study} Subject Summary Report") + with page.expect_download(timeout=120000) as dl: + page.get_by_role("button", name="Download XLS").click() + dl.value.save_as(filename) + print(f"[{study}] OK -> {filename}") + return filename + + +def main(): + today = datetime.date.today().strftime("%Y-%m-%d") + os.makedirs(INCOMING_DIR, exist_ok=True) + os.makedirs(CREATED_DIR, exist_ok=True) + + downloaded = [] + + with sync_playwright() as p: + for study in STUDIES: + browser = p.chromium.launch(headless=False) + context = browser.new_context(accept_downloads=True) + page = context.new_page() + + filename = download_study(page, study, today) + downloaded.append((study, filename)) + + browser.close() + + print("\nVse stazeno:") + for study, path in downloaded: + print(f" {study}: {path}") + + +main()