For making thesis in buffy coat its use in nepal what data should i collect …and how to proceed further
What is the specific focus of your buffy coat thesis? · What degree/level is this thesis for? · Where will you collect data?
Dm level topic febrile neutropenia in hematological maligancies in civil service hoapital
febrile neutropenia hematological malignancy management outcomes
buffy coat blood culture bacteremia diagnosis febrile neutropenia
febrile neutropenia hematological malignancy Nepal study outcomes
febrile neutropenia leukemia Nepal South Asia microbiology bacteremia
buffy coat examination leukemia blast detection peripheral blood
febrile neutropenia hematological malignancy South Asia developing country bacteremia outcomes
Tip: For a DM thesis in Nepal, option 1 or 2 is more feasible and publishable. The buffy coat can be incorporated as one of the diagnostic tools evaluated.
| Variable | How to Collect |
|---|---|
| Age, sex, address | Case records |
| BMI, performance status (ECOG) | Clinical assessment |
| Socioeconomic status | Patient interview |
| Duration of illness before admission | History |
| Variable | How to Collect |
|---|---|
| Diagnosis (AML, ALL, CML, CLL, NHL, HL, MM, MDS) | Bone marrow report, flow cytometry |
| Disease status (new/relapsed/refractory/remission) | Previous records |
| Treatment line (1st, 2nd, salvage) | Treatment chart |
| Chemotherapy regimen and last dose date | Case file |
| HSCT recipient (yes/no) | Case file |
| Variable | How to Collect |
|---|---|
| Absolute Neutrophil Count (ANC) at fever onset | CBC with differential |
| Neutropenia grade (mild/severe/profound) | ANC <1000 / <500 / <100 per mm³ |
| Duration of neutropenia | Daily CBC tracking |
| Nadir ANC | Daily CBC |
| Variable | How to Collect |
|---|---|
| Temperature at onset, pattern | Nursing notes + clinical chart |
| MASCC Risk Score (key for DM level) | Calculate from admission data |
| Clinically documented infection site | Physical exam (oral, perianal, catheter sites, lung) |
| Mucositis grade | WHO mucositis scale |
| Central venous catheter in situ | Clinical assessment |
| Signs of sepsis/septic shock | BP, HR, RR, GCS, lactate |
| Investigation | Purpose |
|---|---|
| CBC with differential (daily) | Neutrophil recovery tracking |
| Blood culture x2 (peripheral + CVC if present) | Primary microbiology |
| Buffy coat preparation (Leishman/Giemsa stain) | Rapid organism detection, blast %, WBC morphology |
| Urine culture | UTI source |
| CXR / CT chest | Pulmonary infection |
| Serum procalcitonin (PCT) | Bacteremia marker (validated in Nepal by Shilpakar 2019) |
| CRP, ESR | Inflammatory markers |
| LFT, RFT, electrolytes | Organ function baseline |
| Serum LDH | Disease activity marker |
| Galactomannan (if fungal suspected) | Aspergillus |
| Blood culture for fungus (if available) | Fungemia |
| Ferritin, fibrinogen, D-dimer | HLH/DIC workup if relevant |
| Variable | Details |
|---|---|
| Preparation method | Centrifuge 3000 rpm x 5 min; take buffy coat layer; spread on glass slide; air dry; Leishman or Giemsa stain |
| Organism visualized (yes/no) | Bacteria, fungi (Candida, Histoplasma), Leishmania amastigotes, microfilariae |
| WBC differential on buffy coat | Compare with automated analyzer |
| Blast percentage on buffy coat | Vs. bone marrow if done |
| Time to result (buffy coat vs. blood culture) | Buffy coat: ~2-3 hours vs. blood culture: 24-72 hours |
| Sensitivity/specificity vs. blood culture | Calculate using blood culture as gold standard |
| Variable | Details |
|---|---|
| Blood culture positive/negative | BACTEC or equivalent system at CSH |
| Organism identified | Gram-negative (E. coli, Klebsiella, Pseudomonas, Acinetobacter) vs. Gram-positive (Staph, Strep, Enterococcus) vs. fungal |
| Antimicrobial sensitivity testing (AST) | CLSI/EUCAST breakpoints; note ESBL, CRE, MRSA |
| MDR/XDR organism (yes/no) | Key for Nepal data |
| Concordance between buffy coat and blood culture | Statistical analysis |
| Variable | Details |
|---|---|
| Empirical antibiotic used | Piperacillin-tazobactam, meropenem, etc. |
| Time to first antibiotic dose | Target: <60 min of fever in high-risk |
| Antibiotic de-escalation done (yes/no) | Based on culture sensitivity |
| Antifungal added (yes/no) | When and which agent |
| G-CSF used (yes/no) | Filgrastim/pegfilgrastim |
| Duration of antibiotic therapy | Days |
| GCSF prophylaxis prior to episode | Yes/no |
| Outcome | Definition |
|---|---|
| Treatment success | Fever defervescence + ANC recovery without ICU/death |
| ICU admission | Yes/no; reason |
| 30-day all-cause mortality | Primary outcome for DM level |
| FN episode resolution time | Days to afebrile + ANC >500 |
| Length of hospital stay | Days |
| Secondary infection during same admission | New organism/site |
| Parameter | Recommendation |
|---|---|
| Design | Prospective observational (or cross-sectional) - feasible for 1-2 year DM program |
| Duration | 12-18 months enrollment |
| Sample size | Use proportion formula: expected bacteremia rate ~30-40% in FN in South Asia; at 95% CI, 5% margin of error → ~120-150 episodes (consult your statistician with exact prevalence) |
| Unit of analysis | FN episodes (one patient can have multiple episodes - define per-episode or per-patient analysis upfront) |
| Inclusion criteria | Diagnosed hematological malignancy; ANC <500/mm³; Temp ≥38.3°C once or ≥38°C for 1 hour; age ≥16 years |
| Exclusion criteria | Non-hematological malignancy; fever with clear non-infectious source (drug fever, transfusion reaction); incomplete data; refusal of consent |
| Analysis | Method |
|---|---|
| Descriptive stats | Mean ± SD or median (IQR) for continuous; frequencies (%) for categorical |
| Bacteremia rate | % with 95% CI |
| Organism frequency | Bar chart/table |
| Risk factors for bacteremia/mortality | Univariate then multivariate logistic regression |
| Buffy coat vs. blood culture yield | Sensitivity, specificity, PPV, NPV (blood culture as reference) |
| Concordance | Kappa statistic |
| Time to diagnosis | Kaplan-Meier or simple mean comparison |
| MASCC score performance | ROC curve, AUROC |
| Software | SPSS v26 or STATA; free option: Epi Info / JASP |
Dm level article..in civil service..use of buffy coat in febrile neutopenia pt in hematological malignancy as granulocyte infusion costs more like nrs 40000 make completle thesis protocol and all data which needs to be collected not to miss single thing as make it to publish in ash
buffy coat granulocyte transfusion febrile neutropenia hematological malignancy
granulocyte infusion transfusion neutropenia infection randomized trial
buffy coat granulocyte infusion febrile neutropenia cost-effective alternative Nepal developing country
PMID: 38023414
granulocyte transfusion neutropenia infection outcomes mortality
https://pmc.ncbi.nlm.nih.gov/articles/PMC10658032
ASH Blood journal submission guidelines hematology clinical trial original article 2024
| Product | Source | Cost at CSH (estimated) | Availability |
|---|---|---|---|
| Apheresis granulocytes | Single-donor leukapheresis | NPR 35,000-40,000+ per unit | Not routinely available; requires G-CSF donor stimulation |
| Buffy coat granulocytes | Pooled from standard whole blood donations | NPR 2,000-4,000 per pool (by-product of component separation) | Available at CSH blood bank |
| Parameter | Detail |
|---|---|
| Design | Prospective, open-label, parallel-group RCT |
| Setting | Department of Clinical Hematology, Civil Service Hospital, Kathmandu |
| Duration | 18 months enrollment + 3 months follow-up |
| Randomization | 1:1; computer-generated block randomization (block size 4 or 6); sealed envelopes |
| Allocation concealment | Sequentially numbered opaque sealed envelopes (SNOSE) |
| Blinding | Open-label (blinding not feasible for transfusion intervention); outcome assessors blinded for 90-day survival |
| Registration | CTRI (Clinical Trials Registry-India - accepted for Nepal) before enrollment |
Study ID: _______ Date of Enrollment: ___/___/____
Arm (GT/ST): _______ Randomization envelope no.: _______
1. Full name (initials only for data): _______
2. Age (years): _______
3. Sex: M / F / Other
4. Address (district/zone): _______ (urban / peri-urban / rural)
5. Ethnicity/caste: Brahmin/Chhetri / Janajati / Madhesi / Dalit / Other
6. Occupation: _______
7. Monthly household income (NPR): <10,000 / 10,000-30,000 / >30,000
8. Health insurance: Yes / No (type: _______)
9. Referral from: OPD / IPD (same hospital) / External referral (hospital name: _______)
10. Height (cm): _______ Weight (kg): _______ BMI: _______
11. ECOG Performance Status at admission: 0 / 1 / 2 / 3 / 4
12. Smoking: Yes / No / Ex-smoker Alcohol: Yes / No
13. Comorbidities: DM / HTN / CKD / CLD / IHD / HIV / TB / None / Other: _______
14. Primary diagnosis:
[ ] AML [ ] ALL [ ] CML (blast crisis) [ ] CLL
[ ] Diffuse Large B-cell Lymphoma (DLBCL)
[ ] Hodgkin Lymphoma (HL)
[ ] Multiple Myeloma (MM)
[ ] MDS [ ] MDS/AML [ ] HSCT recipient
[ ] Other: _______
15. WHO/ICC 2022 subtype (if AML/ALL): _______
16. Cytogenetics/molecular markers:
- FISH/PCR results: _______
- Key markers: FLT3-ITD / NPM1 / BCR-ABL1 / RUNX1::RUNX1T1 / PML::RARA / Other: _______
- Risk stratification (ELN 2022 for AML): Favorable / Intermediate / Adverse
17. Date of initial diagnosis: ___/___/____
18. Disease status at time of FN episode:
[ ] Newly diagnosed, on induction
[ ] Complete remission (CR1/CR2/CR3: ___)
[ ] Partial remission
[ ] Relapsed [ ] Refractory
[ ] Post-HSCT (Day post-transplant: ___)
19. Chemotherapy regimen received:
Regimen name: _______ (e.g., 7+3, HyperCVAD, DHAP, BEP)
Cycle number: _______
Last day of chemotherapy: ___/___/____
Days from last chemo to fever onset: _______
20. G-CSF prophylaxis given (before this FN episode): Yes / No
If yes: Agent: Filgrastim / Pegfilgrastim Dose/day: _______
21. Prior lines of therapy: 1 / 2 / 3 / >3
22. Prior HSCT: Yes / No (autologous / allogeneic; donor type: _______)
23. Bone marrow biopsy result (most recent):
Cellularity: _______% Blasts: _______% Date: ___/___/____
24. Date and time of fever onset: ___/___/____ ____:____
25. Fever pattern: Continuous / Intermittent / Hectic
26. Maximum recorded temperature (°C): _______
27. ANC at fever onset (/mm³): _______
Neutropenia grade: Mild (500-1000) / Severe (<500) / Profound (<100)
28. Hemoglobin at fever onset (g/dL): _______
29. Platelet count at fever onset (/mm³): _______
30. MASCC RISK SCORE (calculate at admission):
Burden of illness (mild/no symptoms = 5; moderate = 3): ___
No hypotension: +5
No COPD: +4
Solid tumor OR no prior fungal infection: +4
No dehydration: +3
Outpatient status: +3
Age <60 years: +2
TOTAL MASCC SCORE: _______ (≥21 = low risk; <21 = HIGH RISK)
31. CISNE score (if applicable for outpatient consideration):
ECOG ≥2: +2; Stress-induced hyperglycemia: +2; COPD: +1; CVC: +1;
Mucositis grade ≥2: +1; Monocytes <200: +1
TOTAL CISNE: _______
32. Clinical site of infection (if identified):
[ ] No focus identified (primary bacteremia)
[ ] Pneumonia (radiological/clinical)
[ ] Urinary tract infection
[ ] Skin/soft tissue (cellulitis, wound)
[ ] Central line/catheter-related infection (CLABSI)
[ ] Oropharyngeal mucositis ± infection
[ ] Perianal infection/typhlitis (neutropenic enterocolitis)
[ ] Intra-abdominal
[ ] CNS (meningitis/encephalitis)
[ ] Sinusitis (fungal sinusitis?)
[ ] Bacteremia/sepsis (no clear focus)
[ ] Multiple sites
[ ] Other: _______
33. Mucositis: Yes / No
WHO Mucositis Grade: 0 / 1 / 2 / 3 / 4
34. Central venous catheter in situ: Yes / No
If yes: Type: PICC / Hickman / Port-a-cath / Temporary CVL
Duration of catheter (days): _______
Signs of catheter infection: Yes / No
35. Sepsis criteria (Sepsis-3):
Suspected infection: Yes
SOFA score: _______ (increase ≥2 = sepsis)
Septic shock: Yes / No (vasopressor required + lactate >2 mmol/L)
36. Shock at presentation: Yes / No
If yes: Type: Septic / Distributive Vasopressor needed: Yes / No
=== HEMATOLOGY ===
37. CBC with 5-part differential (Daily for first 14 days, then every 48h):
- WBC (/mm³): _______
- ANC (/mm³): _______ [= WBC × (Neutrophil% + Band%)]
- Hemoglobin (g/dL): _______
- Platelets (/mm³): _______
- Reticulocytes (%): _______
- Peripheral blood blast %: _______
- Metamyelocytes/bands seen: Yes / No (count: ___)
=== BIOCHEMISTRY ===
38. Serum creatinine (mg/dL): _______ eGFR: _______
39. Blood urea nitrogen (mg/dL): _______
40. Serum sodium (mEq/L): _______ Potassium: _______ Chloride: _______
41. Total bilirubin (mg/dL): _______ Direct: _______
42. AST (U/L): _______ ALT: _______ ALP: _______ GGT: _______
43. Total protein (g/dL): _______ Albumin: _______
44. Serum LDH (U/L): _______
45. Serum uric acid (mg/dL): _______
46. Blood glucose (mg/dL): _______ (random / fasting)
47. PT (sec): _______ INR: _______ aPTT: _______
48. Fibrinogen (mg/dL): _______
49. D-dimer (mg/L): _______
50. Serum ferritin (ng/mL): _______ (screen for HLH)
51. Triglycerides (mg/dL): _______ (screen for HLH)
52. Serum lactate (mmol/L): _______
=== INFLAMMATORY MARKERS ===
53. C-Reactive Protein (mg/L): _______ (Day 0, 3, 7, at defervescence)
54. Erythrocyte Sedimentation Rate (mm/hr): _______
55. Procalcitonin (ng/mL): _______ (key: <0.5 = unlikely bacteremia)
56. Interleukin-6 (pg/mL): _______ (if available - for ASH publication bonus data)
=== MICROBIOLOGY ===
57. Blood culture x2 (peripheral vein, 10 mL each into aerobic + anaerobic bottles):
- Collection time: ____:____
- Bottle 1: Organism: _______ Sensitivity: _______ Result day: ___
- Bottle 2: Organism: _______ Sensitivity: _______ Result day: ___
58. If CVC present - Blood culture from CVC port:
- Collection time: ____:____
- Organism: _______ Sensitivity: _______
- Differential time to positivity (DTP): _______min (CVC vs. peripheral)
(DTP ≥120min = CLABSI)
59. Urine culture (midstream/catheter):
- Organism: _______ Colony count: _______ Sensitivity: _______
60. Sputum/BAL culture (if cough/pulmonary infiltrates):
- Organism: _______ Sensitivity: _______
61. Wound/skin swab culture (if applicable): _______
62. CSF culture (if neurological signs): Organism: _______ Cell count: _______
63. Stool culture (if diarrhea): Organism: _______
64. Throat swab culture: _______
65. Fungal markers:
- Serum Galactomannan (Aspergillus Ag) index: _______ (>0.5 = positive)
- Beta-D-Glucan (pg/mL): _______ (>80 = positive, >200 = strongly positive)
- KOH mount (any specimen): Positive / Negative / Not done
- Fungal blood culture: Organism: _______
66. Viral screening:
- CMV PCR (copies/mL): _______ (pre- and post-transfusion)
- EBV PCR: _______
- HSV serology: IgM / IgG
- HIV Ag/Ab: Positive / Negative
- HBsAg: _______ Anti-HCV: _______
67. ORGANISM CHARACTERIZATION TABLE (fill per isolate):
| # | Specimen | Organism | Gram +/- | Antibiogram | ESBL | CRE | MRSA | MDR |
|---|---|---|---|---|---|---|---|---|
| 1 | | | | | | | | |
| 2 | | | | | | | | |
=== IMAGING ===
68. Chest X-Ray (PA/AP): Date: ___ Findings: _______
69. CT Thorax (HRCT/contrast): Date: ___ Findings: _______
Specific findings: Tree-in-bud / Ground glass / Consolidation / Nodules /
Halo sign (Aspergillus?) / Air crescent sign / Pleural effusion / Normal
70. CT Abdomen/Pelvis (if suspected enterocolitis/abdominal source):
Date: ___ Findings: _______
71. CT Sinuses (if fungal sinusitis suspected): Date: ___ Findings: _______
72. Echocardiogram (if endocarditis suspected): Date: ___ Findings: _______
=== BUFFY COAT-SPECIFIC DATA ===
(To be recorded for ALL patients in GT arm; also record buffy coat smear diagnostic data for ST arm if done)
73. Buffy coat preparation details (GT arm, per transfusion episode):
- Transfusion number (1st/2nd/3rd/4th/5th): _______
- Date/time prepared: ___/___/____ ____:____
- Number of whole blood units pooled: _______
- ABO/Rh groups of donors: _______
- Final granulocyte count of product (×10¹⁰): _______
- Irradiation dose (Gy): _______ (confirm 25 Gy)
- Time from preparation to transfusion (hours): _______ (must be <6h)
- Volume transfused (mL): _______ Dose (mL/kg): _______
74. Pre-transfusion check:
- Patient ABO/Rh: _______
- Cross-match compatible: Yes / No
- CMV status of product: Negative / Positive / Unknown
- Pre-medication given: Paracetamol / Hydrocortisone / Chlorpheniramine (tick all)
75. Buffy coat smear (DIAGNOSTIC use - ALL patients):
- Preparation: Leishman / Giemsa stain
- Time from blood draw to smear result (hours): _______
- WBC differential on smear: N: ___ L: ___ M: ___ E: ___ B: ___
- Blast % on buffy coat smear: _______
- Organisms visualized: Yes / No
If yes: Gram-positive cocci / Gram-negative rods / Yeast forms /
Leishmania amastigotes / Microfilariae / Other: _______
- Concordance with peripheral blood automated analyzer: Yes / No
- Time advantage vs. blood culture result (hours): _______
(This is your KEY diagnostic comparison data for the publication)
=== ANTIBIOTICS ===
76. Time from fever onset to first antibiotic dose (minutes): _______ (target <60 min)
77. Empirical antibiotic regimen (Day 0):
Agent 1: _______ Dose: _______ Route: IV
Agent 2 (if combination): _______ Dose: _______
78. Antibiotic modifications:
Day modified: ___ Reason: Culture result / Non-response / Adverse effect / De-escalation
New regimen: _______
79. Antifungal therapy:
Started: Yes / No Day started: ___
Agent: Fluconazole / Voriconazole / Caspofungin / Amphotericin B
Indication: Empirical (>96h no response) / Targeted (confirmed fungal)
Duration: _____ days
80. Antibiotic de-escalation performed: Yes / No
Day de-escalated: ___ Based on: Culture sensitivity / Clinical response
81. Total duration of IV antibiotics (days): _______
82. Antifungal prophylaxis received prior to this episode: Yes / No
Agent: Fluconazole / Posaconazole / Other: _______
=== GRANULOCYTE TRANSFUSION (GT ARM ONLY) ===
83. Total number of GT administered: _______
84. Day of first GT (from FN onset): _______
85. Days between GTs: _______
86. Reason for stopping GT (tick one):
[ ] ANC ≥500 achieved [ ] Afebrile ≥24h
[ ] Adverse event [ ] Completed 5 cycles [ ] Patient refusal [ ] Death
87. GT ADVERSE EVENT LOG (per transfusion):
| GT# | Fever | Chills/Rigor | Urticaria | Dyspnea | SpO2 drop | TRALI | Transfusion stopped |
|---|---|---|---|---|---|---|---|
| 1 | | | | | | | |
| 2 | | | | | | | |
| 3 | | | | | | | |
| 4 | | | | | | | |
| 5 | | | | | | | |
88. Post-transfusion CMV PCR (Day 7, Day 14): _______
89. Post-transfusion HLA alloimmunization screening (Day 30): Positive / Negative
=== SUPPORTIVE CARE ===
90. G-CSF administered during this episode: Yes / No
Agent: Filgrastim / Pegfilgrastim Dose: _______ Start day: ___ Total doses: ___
91. PRBC transfusion: Yes / No Units given: ___ Hb threshold: _______
92. Platelet transfusion: Yes / No Units given: ___ Platelet threshold: _______
93. Nutritional support: IV TPN / Enteral / Oral Calorie goal met: Yes / No
94. Foley catheter inserted: Yes / No
95. ICU admission: Yes / No Date: ___/___/____ Duration (days): _______
96. Vasopressor used: Yes / No Agent: Noradrenaline / Adrenaline / Both
Duration of vasopressors (hours): _______
97. Mechanical ventilation: Yes / No Duration (hours): _______
98. Renal replacement therapy: Yes / No Duration (days): _______
=== PRIMARY OUTCOME ===
99. 28-day all-cause mortality: ALIVE / DEAD
If dead: Date of death: ___/___/____ Cause of death: _______
(Septic shock / Respiratory failure / MDR infection / Disease progression /
GT adverse event / Other: _______)
=== SECONDARY OUTCOMES ===
100. Time to ANC ≥500/mm³ (days from FN onset): _______
Date of ANC recovery: ___/___/____ ANC value: _______
Confirmed on 2 consecutive days: Yes / No
101. Time to defervescence (days from FN onset): _______
Date of last fever: ___/___/____
Definition used: Afebrile >24 hours without antipyretics
102. Blood culture conversion to negative:
Date of first negative culture: ___/___/____
Days to culture clearance: _______
103. Duration of IV antibiotic therapy (days): _______
104. Total length of hospital stay (days): _______
105. ICU admission during this episode: Yes / No ICU days: _______
106. 30-day overall survival: ALIVE / DEAD
107. 90-day overall survival: ALIVE / DEAD
If dead: Date: ___ Cause: _______
=== CLINICAL RESPONSE CLASSIFICATION ===
108. Clinical response at Day 7:
Complete response (CR): Afebrile + ANC recovering + no active infection
Partial response (PR): Afebrile but ANC not recovered / Infection controlled
No response (NR): Still febrile or infection progressing
Progressive disease (PD): Worsening infection / new focus
=== COST DATA ===
109. GT cost per episode (NPR):
- Whole blood units purchased: ___ × NPR ___/unit = NPR _______
- Irradiation cost: NPR _______
- Blood bank processing cost: NPR _______
- Pre-medications: NPR _______
- TOTAL GT COST (NPR): _______
110. Total antibiotic cost (NPR): _______
111. Total hospitalization cost (NPR): _______
112. Total episode cost (NPR): _______ vs. ST arm patient: _______
113. Estimated cost if apheresis GT was used (for comparison): NPR _______
(Based on institutional quote or published pricing)
114. Patient status at Day 30: Alive / Dead / Lost to follow-up
115. Patient status at Day 60: Alive / Dead / Lost to follow-up
116. Patient status at Day 90: Alive / Dead / Lost to follow-up
117. Underlying malignancy status at Day 90: CR / PR / Stable / Progression / Relapse
118. Any subsequent FN episode requiring re-hospitalization: Yes / No
If yes: Same organism / Different organism
119. ANC at Day 30 follow-up (/mm³): _______
120. Post-GT alloimmunization (HLA antibody) at Day 30: Positive / Negative
| Analysis | Method | Software |
|---|---|---|
| Baseline characteristics | Mean±SD or median(IQR); frequency(%) | SPSS v26 / STATA |
| Primary outcome (28-day mortality) | Chi-square / Fisher's exact; Risk Ratio + 95%CI | SPSS |
| Time-to-event outcomes | Kaplan-Meier curves; Log-rank test | SPSS / R (survminer) |
| Time to ANC recovery | Kaplan-Meier; hazard ratio by Cox regression | SPSS/R |
| Multivariate analysis | Logistic regression (adjust for MASCC, malignancy type, ANC nadir) | SPSS |
| Subgroup analyses | AML vs. ALL vs. lymphoma; profound vs. severe neutropenia; fungal vs. bacterial infection | Pre-specified |
| Cost analysis | Mean cost per episode (GT arm vs. ST arm); paired t-test or Mann-Whitney | SPSS |
| Buffy coat diagnostic yield | Sensitivity/specificity vs. blood culture; Kappa statistic | MedCalc |
| Adverse event rate | Frequency table; Fisher's exact between arms | SPSS |
| CONSORT flow diagram | Mandatory for RCT reporting | Flow diagram |
Make an excel sheet which will make my data entry easier
ls -la /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace/fn-thesis && echo "workspace ready"
mkdir -p /home/daytona/workspace/fn-thesis && python3 << 'PYEOF' import openpyxl from openpyxl.styles import ( PatternFill, Font, Alignment, Border, Side, GradientFill ) from openpyxl.utils import get_column_letter from openpyxl.worksheet.datavalidation import DataValidation from openpyxl.styles.numbers import FORMAT_DATE_DDMMYY import openpyxl.styles.colors as colors wb = openpyxl.Workbook() # ─── Color palette ─────────────────────────────────────────────── COL_HEADER_DARK = "1F3864" # dark navy - sheet tab / main header COL_HEADER_MID = "2E75B6" # mid blue - section headers COL_HEADER_LIGHT = "BDD7EE" # pale blue - sub-headers COL_GT_ARM = "E2EFDA" # pale green - GT-arm rows COL_ST_ARM = "FFF2CC" # pale yellow- ST-arm rows COL_OUTCOME = "FCE4D6" # pale orange- outcome cells COL_REQUIRED = "FFD7D7" # pale red - mandatory fields COL_CALC = "F2F2F2" # grey - auto-calculated COL_WHITE = "FFFFFF" COL_YELLOW_HL = "FFFF00" def hdr(ws, row, col, text, bg=COL_HEADER_MID, fg="FFFFFF", bold=True, sz=11, wrap=True, merge_to=None): cell = ws.cell(row=row, column=col, value=text) cell.fill = PatternFill("solid", fgColor=bg) cell.font = Font(bold=bold, color=fg, size=sz, name="Arial") cell.alignment = Alignment(horizontal="center", vertical="center", wrap_text=wrap) if merge_to: ws.merge_cells(start_row=row, start_column=col, end_row=row, end_column=merge_to) return cell def lbl(ws, row, col, text, bg=COL_HEADER_LIGHT, bold=False, sz=9, wrap=True): cell = ws.cell(row=row, column=col, value=text) cell.fill = PatternFill("solid", fgColor=bg) cell.font = Font(bold=bold, color="1F3864", size=sz, name="Arial") cell.alignment = Alignment(horizontal="left", vertical="center", wrap_text=wrap) return cell def inp(ws, row, col, value="", bg=COL_WHITE, sz=9): cell = ws.cell(row=row, column=col, value=value) cell.fill = PatternFill("solid", fgColor=bg) cell.font = Font(size=sz, name="Arial") cell.alignment = Alignment(horizontal="left", vertical="center", wrap_text=True) return cell def thin_border(ws, min_row, min_col, max_row, max_col): thin = Side(style="thin", color="AAAAAA") for row in ws.iter_rows(min_row=min_row, min_col=min_col, max_row=max_row, max_col=max_col): for cell in row: cell.border = Border(top=thin, left=thin, right=thin, bottom=thin) def add_dv_list(ws, formula1, sq_ref): dv = DataValidation(type="list", formula1=formula1, allow_blank=True, showDropDown=False) dv.showErrorMessage = True dv.error = "Please select from list" dv.errorTitle = "Invalid entry" ws.add_data_validation(dv) dv.sqref = sq_ref return dv # ═══════════════════════════════════════════════════════════════════ # SHEET 1 - COVER / INSTRUCTIONS # ═══════════════════════════════════════════════════════════════════ ws0 = wb.active ws0.title = "📋 Instructions" ws0.sheet_properties.tabColor = COL_HEADER_DARK ws0.column_dimensions["A"].width = 5 ws0.column_dimensions["B"].width = 60 ws0.column_dimensions["C"].width = 40 hdr(ws0, 1, 1, "FEBRILE NEUTROPENIA IN HEMATOLOGICAL MALIGNANCIES — RESEARCH DATA ENTRY SYSTEM", bg=COL_HEADER_DARK, fg="FFFFFF", bold=True, sz=14, merge_to=3) ws0.row_dimensions[1].height = 35 rows_info = [ (3, "Civil Service Hospital, Kathmandu, Nepal", "DM Thesis — Clinical Hematology"), (4, "Study: Buffy Coat-Derived Granulocyte Transfusion vs Standard Care in High-Risk FN", ""), (5, "Investigator: ___________________________ Supervisor: ___________________________", ""), (6, "Ethical Approval No.: _________________ CTRI Reg No.: ________________________", ""), ] for r, t1, t2 in rows_info: ws0.cell(row=r, column=2, value=t1).font = Font(bold=True, size=10, name="Arial", color="1F3864") ws0.cell(row=r, column=3, value=t2).font = Font(size=9, name="Arial", color="2E75B6") hdr(ws0, 8, 1, "SHEET GUIDE", bg=COL_HEADER_MID, merge_to=3, sz=11) sheets_guide = [ ("1. 👤 Patient_Demographics", "Age, sex, address, BMI, comorbidities, ECOG — fill once per patient"), ("2. 🩸 Malignancy_Chemo", "Diagnosis, cytogenetics, chemotherapy regimen, disease status"), ("3. 🌡️ FN_Episode", "FN definition, MASCC score, clinical site, sepsis criteria"), ("4. 🔬 Lab_Microbiology", "CBC daily, biochemistry, cultures, inflammatory markers, imaging"), ("5. 💉 GT_Transfusion_Log", "Buffy coat prep details, dose, adverse events — GT arm only"), ("6. 💊 Treatment", "Antibiotics, antifungals, G-CSF, supportive care, ICU"), ("7. ✅ Outcomes", "Primary/secondary outcomes, mortality, ANC recovery, cost"), ("8. 📅 Follow_Up", "Day 30/60/90 follow-up, survival, disease status"), ("9. 📊 Summary_Dashboard", "Auto-calculated summary statistics for quick review"), ("10. 📝 Codebook", "Variable definitions, normal ranges, coding guide"), ] for i, (sheet, desc) in enumerate(sheets_guide): r = 9 + i ws0.cell(row=r, column=2, value=sheet).font = Font(bold=True, size=10, name="Arial", color="1F3864") ws0.cell(row=r, column=2).fill = PatternFill("solid", fgColor=COL_HEADER_LIGHT) ws0.cell(row=r, column=3, value=desc).font = Font(size=9, name="Arial") ws0.row_dimensions[r].height = 16 hdr(ws0, 20, 1, "DATA ENTRY RULES", bg=COL_HEADER_DARK, merge_to=3, sz=11) rules = [ "🔴 RED cells = MANDATORY — must not be left blank", "🟡 YELLOW cells = Auto-calculated — do not type in these cells", "🟢 GREEN cells = GT arm only — leave blank for ST arm patients", "📌 Use dropdown menus wherever provided — do NOT type free text in dropdown cells", "📅 Enter all dates as DD/MM/YYYY format", "🔢 Enter lab values as numbers only — units are in the column header", "❌ For negative/absent findings, select 'No' or enter '0' — do NOT leave blank", "💾 Save after each patient entry — use Study_ID as filename suffix", "🔒 Do not modify column headers or add/delete rows in data sheets", ] for i, rule in enumerate(rules): r = 21 + i ws0.cell(row=r, column=2, value=rule).font = Font(size=9, name="Arial", color="1F3864") ws0.row_dimensions[r].height = 14 thin_border(ws0, 1, 1, 30, 3) # ═══════════════════════════════════════════════════════════════════ # SHEET 2 - PATIENT DEMOGRAPHICS # ═══════════════════════════════════════════════════════════════════ ws1 = wb.create_sheet("👤 Patient_Demographics") ws1.sheet_properties.tabColor = "2E75B6" # Column widths col_widths = [5, 18, 22, 25, 12, 14, 14, 14, 14, 14, 14, 14, 22, 22, 22, 22] for i, w in enumerate(col_widths, 1): ws1.column_dimensions[get_column_letter(i)].width = w hdr(ws1, 1, 1, "PATIENT DEMOGRAPHICS & BASELINE DATA", bg=COL_HEADER_DARK, fg="FFFFFF", bold=True, sz=13, merge_to=16) ws1.row_dimensions[1].height = 30 # Sub-headers row headers = [ "#", "Study ID\n(Mandatory)", "Enrollment\nDate (DD/MM/YY)", "Arm\n(GT / ST)", "Age\n(Years)", "Sex\n(M/F/O)", "Height\n(cm)", "Weight\n(kg)", "BMI\n(Auto)", "ECOG\n(0-4)", "District", "Urban/Rural", "Monthly Income\n(NPR)", "Insurance\n(Yes/No)", "Comorbidities\n(see codebook)", "Referral Source" ] for col, h in enumerate(headers, 1): c = lbl(ws1, 2, col, h, bg=COL_HEADER_MID, bold=True) c.font = Font(bold=True, color="FFFFFF", size=9, name="Arial") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws1.row_dimensions[2].height = 32 # Extra info row extra = [ "", "Format: CSH-001", "First FN episode date", "Randomized arm", "Numeric", "M/F/Other", "Numeric", "Numeric", "=Wt/(Ht/100)²", "0=Normal, 4=Bedridden", "Free text", "Urban/Peri-urban/Rural", "Approximate", "Yes/No/Type", "DM,HTN,CKD,CLD,IHD,HIV,TB,None", "OPD/IPD/Referral" ] for col, e in enumerate(extra, 1): c = ws1.cell(row=3, column=col, value=e) c.fill = PatternFill("solid", fgColor="E8F4FD") c.font = Font(italic=True, size=8, name="Arial", color="555555") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws1.row_dimensions[3].height = 20 # Data rows (20 patients) for row in range(4, 24): ws1.cell(row=row, column=1, value=row-3) # Study ID - mandatory red c = ws1.cell(row=row, column=2, value="") c.fill = PatternFill("solid", fgColor=COL_REQUIRED) # Enrollment date ws1.cell(row=row, column=3, value="") # Arm dropdown c_arm = ws1.cell(row=row, column=4, value="") c_arm.fill = PatternFill("solid", fgColor=COL_REQUIRED) # Age ws1.cell(row=row, column=5, value="") # Sex ws1.cell(row=row, column=6, value="") # Height ws1.cell(row=row, column=7, value="") # Weight ws1.cell(row=row, column=8, value="") # BMI auto-calculated c_bmi = ws1.cell(row=row, column=9) c_bmi.value = f"=IF(AND(H{row}<>\"\",G{row}<>\"\"),ROUND(H{row}/(G{row}/100)^2,1),\"\")" c_bmi.fill = PatternFill("solid", fgColor=COL_CALC) c_bmi.font = Font(size=9, name="Arial", color="444444") # Remaining columns for col in range(10, 17): ws1.cell(row=row, column=col, value="") ws1.row_dimensions[row].height = 16 # Add dropdowns dv_arm = add_dv_list(ws1, '"GT,ST"', f"D4:D23") dv_sex = add_dv_list(ws1, '"M,F,Other"', f"F4:F23") dv_ecog = add_dv_list(ws1, '"0,1,2,3,4"', f"J4:J23") dv_urban = add_dv_list(ws1, '"Urban,Peri-urban,Rural"', f"L4:L23") dv_ins = add_dv_list(ws1, '"Yes,No"', f"N4:N23") dv_ref = add_dv_list(ws1, '"OPD,IPD-Same Hospital,External Referral"', f"P4:P23") thin_border(ws1, 2, 1, 23, 16) # ═══════════════════════════════════════════════════════════════════ # SHEET 3 - MALIGNANCY & CHEMO # ═══════════════════════════════════════════════════════════════════ ws2 = wb.create_sheet("🩸 Malignancy_Chemo") ws2.sheet_properties.tabColor = "C55A11" col_w2 = [5, 14, 20, 22, 22, 18, 16, 20, 18, 20, 14, 14, 14, 14, 18, 18] for i, w in enumerate(col_w2, 1): ws2.column_dimensions[get_column_letter(i)].width = w hdr(ws2, 1, 1, "HEMATOLOGICAL MALIGNANCY & CHEMOTHERAPY DATA", bg="C55A11", fg="FFFFFF", bold=True, sz=13, merge_to=16) ws2.row_dimensions[1].height = 30 headers2 = [ "#", "Study ID", "Primary\nDiagnosis", "WHO/ICC 2022\nSubtype", "Key Molecular\nMarkers", "ELN Risk\n(AML)", "Disease\nStatus", "Chemotherapy\nRegimen", "Cycle\nNumber", "Last Chemo\nDate", "Days Chemo→\nFever", "G-CSF\nProphylaxis", "Prior HSCT", "Prior Lines\nof Therapy", "BM Biopsy\nBlasts%", "BM Biopsy\nDate" ] for col, h in enumerate(headers2, 1): c = ws2.cell(row=2, column=col, value=h) c.fill = PatternFill("solid", fgColor="C55A11") c.font = Font(bold=True, color="FFFFFF", size=9, name="Arial") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws2.row_dimensions[2].height = 32 for row in range(3, 23): ws2.cell(row=row, column=1, value=row-2) for col in range(2, 17): c = ws2.cell(row=row, column=col, value="") ws2.row_dimensions[row].height = 16 dv_dx = add_dv_list(ws2, '"AML,ALL,CML-Blast Crisis,CLL,DLBCL,HL,Multiple Myeloma,MDS,MDS/AML,HSCT Recipient,Other"', "C3:C22") dv_risk = add_dv_list(ws2, '"Favorable,Intermediate,Adverse,N/A"', "F3:F22") dv_status = add_dv_list(ws2, '"Newly Diagnosed-Induction,CR1,CR2,CR3,Partial Remission,Relapsed,Refractory,Post-HSCT"', "G3:G22") dv_gcsf = add_dv_list(ws2, '"Yes-Filgrastim,Yes-Pegfilgrastim,No"', "L3:L22") dv_hsct = add_dv_list(ws2, '"No,Yes-Autologous,Yes-Allogeneic-MRD,Yes-Allogeneic-MUD"', "M3:M22") thin_border(ws2, 2, 1, 22, 16) # ═══════════════════════════════════════════════════════════════════ # SHEET 4 - FN EPISODE # ═══════════════════════════════════════════════════════════════════ ws3 = wb.create_sheet("🌡️ FN_Episode") ws3.sheet_properties.tabColor = "FF0000" col_w3 = [5, 14, 16, 14, 14, 14, 14, 12, 12, 12, 12, 12, 12, 12, 20, 22, 20, 20] for i, w in enumerate(col_w3, 1): ws3.column_dimensions[get_column_letter(i)].width = w hdr(ws3, 1, 1, "FEBRILE NEUTROPENIA EPISODE — CLINICAL CHARACTERIZATION & MASCC SCORE", bg="C00000", fg="FFFFFF", bold=True, sz=13, merge_to=18) ws3.row_dimensions[1].height = 30 # MASCC score components header block hdr(ws3, 2, 1, "PATIENT ID", bg=COL_HEADER_MID, fg="FFFFFF", sz=9, merge_to=1) hdr(ws3, 2, 2, "Study ID", bg=COL_HEADER_MID, fg="FFFFFF", sz=9, merge_to=2) hdr(ws3, 2, 3, "FN DEFINITION", bg="C00000", fg="FFFFFF", sz=9, merge_to=5) hdr(ws3, 2, 6, "MASCC SCORE COMPONENTS", bg="843C0C", fg="FFFFFF", sz=9, merge_to=13) hdr(ws3, 2, 14, "MASCC TOTAL\n(AUTO)", bg=COL_CALC, fg="1F3864", sz=9) hdr(ws3, 2, 15, "CLINICAL SITE\nOF INFECTION", bg=COL_HEADER_MID, fg="FFFFFF", sz=9) hdr(ws3, 2, 16, "SEPSIS\n(Sepsis-3)", bg="C00000", fg="FFFFFF", sz=9) hdr(ws3, 2, 17, "MUCOSITIS\nGRADE (0-4)", bg=COL_HEADER_MID, fg="FFFFFF", sz=9) hdr(ws3, 2, 18, "CVC In Situ\n(Yes/No/Type)", bg=COL_HEADER_MID, fg="FFFFFF", sz=9) ws3.row_dimensions[2].height = 28 # Sub-headers row 3 subhdrs3 = [ "#", "Study ID", "Fever Onset\nDate", "Max Temp\n(°C)", "ANC at\nFever(/mm³)", "Fever\nPattern", "Burden\nIllness\n(5/3/0)", "No\nHypo\ntension(5)", "No\nCOPD\n(4)", "Solid/No\nFungal\n(4)", "No\nDehydr\n(3)", "Outp\ntient\n(3)", "Age\n<60\n(2)", "MASCC\nTOTAL", "Infection\nSite", "Sepsis\n(Y/N/Shock)", "Mucositis\nGrade", "CVC\nType" ] for col, h in enumerate(subhdrs3, 1): c = ws3.cell(row=3, column=col, value=h) c.fill = PatternFill("solid", fgColor=COL_HEADER_LIGHT) c.font = Font(bold=True, size=8, name="Arial", color="1F3864") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws3.row_dimensions[3].height = 40 for row in range(4, 24): ws3.cell(row=row, column=1, value=row-3) ws3.cell(row=row, column=2, value="") for col in range(3, 14): ws3.cell(row=row, column=col, value="") # MASCC auto total c_mascc = ws3.cell(row=row, column=14) c_mascc.value = f"=IF(G{row}=\"\",\"\",IFERROR(G{row}+H{row}+I{row}+J{row}+K{row}+L{row}+M{row},\"\"))" c_mascc.fill = PatternFill("solid", fgColor=COL_CALC) c_mascc.font = Font(bold=True, size=9, name="Arial", color="C00000") c_mascc.alignment = Alignment(horizontal="center", vertical="center") for col in range(15, 19): ws3.cell(row=row, column=col, value="") ws3.row_dimensions[row].height = 16 dv_fever_pat = add_dv_list(ws3, '"Continuous,Intermittent,Hectic"', "F4:F23") dv_burden = add_dv_list(ws3, '"5,3,0"', "G4:G23") dv_yn5 = add_dv_list(ws3, '"5,0"', "H4:H23") dv_yn4a = add_dv_list(ws3, '"4,0"', "I4:I23") dv_yn4b = add_dv_list(ws3, '"4,0"', "J4:J23") dv_yn3 = add_dv_list(ws3, '"3,0"', "K4:K23") dv_yn3b = add_dv_list(ws3, '"3,0"', "L4:L23") dv_yn2 = add_dv_list(ws3, '"2,0"', "M4:M23") dv_site = add_dv_list(ws3, '"No Focus-Primary Bacteremia,Pneumonia,UTI,CLABSI,Mucositis,Perianal/Typhlitis,Intra-abdominal,CNS,Sinusitis,Skin/Soft Tissue,Multiple Sites,Other"', "O4:O23") dv_sepsis = add_dv_list(ws3, '"No,Yes-Sepsis,Yes-Septic Shock"', "P4:P23") dv_muc = add_dv_list(ws3, '"0,1,2,3,4"', "Q4:Q23") dv_cvc = add_dv_list(ws3, '"No,PICC,Hickman,Port-a-cath,Temporary CVL"', "R4:R23") thin_border(ws3, 2, 1, 23, 18) # ═══════════════════════════════════════════════════════════════════ # SHEET 5 - LAB & MICROBIOLOGY (multi-timepoint) # ═══════════════════════════════════════════════════════════════════ ws4 = wb.create_sheet("🔬 Lab_Microbiology") ws4.sheet_properties.tabColor = "7030A0" col_w4 = [5, 14, 12, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 22, 22, 18, 18] for i, w in enumerate(col_w4, 1): ws4.column_dimensions[get_column_letter(i)].width = w hdr(ws4, 1, 1, "LABORATORY DATA — HEMATOLOGY | BIOCHEMISTRY | MICROBIOLOGY | INFLAMMATORY MARKERS", bg="7030A0", fg="FFFFFF", bold=True, sz=12, merge_to=22) ws4.row_dimensions[1].height = 28 # Section headers row 2 hdr(ws4, 2, 1, "ID", bg="7030A0", fg="FFFFFF", sz=9) hdr(ws4, 2, 2, "Study ID", bg="7030A0", fg="FFFFFF", sz=9) hdr(ws4, 2, 3, "TIMEPOINT", bg="7030A0", fg="FFFFFF", sz=9) hdr(ws4, 2, 4, "CBC / HEMATOLOGY", bg="1F3864", fg="FFFFFF", sz=9, merge_to=9) hdr(ws4, 2, 10, "BIOCHEMISTRY", bg="375623", fg="FFFFFF", sz=9, merge_to=14) hdr(ws4, 2, 15, "INFLAM. MARKERS", bg="843C0C", fg="FFFFFF", sz=9, merge_to=18) hdr(ws4, 2, 19, "MICROBIOLOGY", bg="C00000", fg="FFFFFF", sz=9, merge_to=22) ws4.row_dimensions[2].height = 22 # Column sub-headers row 3 subhdrs4 = [ "#", "Study ID", "Day/Timepoint", "WBC\n(/mm³)", "ANC\n(/mm³)", "Hgb\n(g/dL)", "Platelets\n(/mm³)", "Blasts\n(%PB)", "Bands\n(%)", "Retics\n(%)", "Cr\n(mg/dL)", "BUN\n(mg/dL)", "ALT\n(U/L)", "Total Bili\n(mg/dL)", "LDH\n(U/L)", "CRP\n(mg/L)", "PCT\n(ng/mL)", "Ferritin\n(ng/mL)", "Lactate\n(mmol/L)", "Blood Cx-1\nOrganism", "Blood Cx-2\nOrganism", "Galacto-\nmannan Index", "Beta-D\nGlucan(pg/mL)" ] for col, h in enumerate(subhdrs4, 1): c = ws4.cell(row=3, column=col, value=h) c.fill = PatternFill("solid", fgColor=COL_HEADER_LIGHT) c.font = Font(bold=True, size=8, name="Arial", color="1F3864") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws4.row_dimensions[3].height = 35 # Data rows - 7 timepoints per patient, 20 patients = 140 rows (truncate to 15 patients for usability) timepoints = ["Day 0 (Admission)", "Day 3", "Day 7", "Day 14", "Day 21", "Day 28", "At Defervescence", "At ANC Recovery", "At Discharge"] patient_count = 20 row_num = 4 for pt in range(1, patient_count + 1): for tp_i, tp in enumerate(timepoints): ws4.cell(row=row_num, column=1, value=pt if tp_i == 0 else "") ws4.cell(row=row_num, column=2, value="" if tp_i == 0 else "") ws4.cell(row=row_num, column=3, value=tp) # Color alternate patients bg_row = "F3E5F5" if pt % 2 == 0 else COL_WHITE for col in range(4, 23): c = ws4.cell(row=row_num, column=col, value="") c.fill = PatternFill("solid", fgColor=bg_row) ws4.row_dimensions[row_num].height = 14 row_num += 1 thin_border(ws4, 2, 1, row_num - 1, 22) # ═══════════════════════════════════════════════════════════════════ # SHEET 6 - ANTIBIOGRAM / ORGANISM DETAIL # ═══════════════════════════════════════════════════════════════════ ws5 = wb.create_sheet("🦠 Antibiogram") ws5.sheet_properties.tabColor = "FF0000" col_w5 = [5, 14, 16, 16, 14, 14, 14, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14] for i, w in enumerate(col_w5, 1): ws5.column_dimensions[get_column_letter(i)].width = w hdr(ws5, 1, 1, "MICROBIOLOGICAL CULTURE RESULTS & ANTIBIOGRAM", bg="C00000", fg="FFFFFF", bold=True, sz=13, merge_to=18) ws5.row_dimensions[1].height = 28 hdrs5 = [ "#", "Study ID", "Specimen\nType", "Collection\nDate", "Organism\nIsolated", "Gram\n+/-", "Days to\nPositivity", "Amox-Clav\n(S/R/I)", "Pip-Tazo\n(S/R/I)", "Cefepime\n(S/R/I)", "Meropenem\n(S/R/I)", "Cotrimox\n(S/R/I)", "Colistin\n(S/R/I)", "Vancomycin\n(S/R/I)", "ESBL\n(+/-)", "CRE\n(+/-)", "MRSA\n(+/-)", "MDR\n(Y/N)" ] for col, h in enumerate(hdrs5, 1): c = ws5.cell(row=2, column=col, value=h) c.fill = PatternFill("solid", fgColor="C00000") c.font = Font(bold=True, color="FFFFFF", size=9, name="Arial") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws5.row_dimensions[2].height = 35 for row in range(3, 43): ws5.cell(row=row, column=1, value=row-2) for col in range(2, 19): ws5.cell(row=row, column=col, value="") ws5.row_dimensions[row].height = 15 dv_spec = add_dv_list(ws5, '"Blood-Peripheral,Blood-CVC,Urine,Sputum,BAL,CSF,Wound Swab,Stool,Throat Swab,Fungal Culture"', "C3:C42") dv_gram = add_dv_list(ws5, '"Gram Positive,Gram Negative,Fungal,Anaerobe,Not done"', "F3:F42") for col_letter in ["H", "I", "J", "K", "L", "M", "N"]: add_dv_list(ws5, '"S,R,I,Not tested"', f"{col_letter}3:{col_letter}42") for col_letter in ["O", "P", "Q", "R"]: add_dv_list(ws5, '"Positive,Negative,Not done"', f"{col_letter}3:{col_letter}42") thin_border(ws5, 2, 1, 42, 18) # ═══════════════════════════════════════════════════════════════════ # SHEET 7 - GT TRANSFUSION LOG # ═══════════════════════════════════════════════════════════════════ ws6 = wb.create_sheet("💉 GT_Transfusion_Log") ws6.sheet_properties.tabColor = "00B050" col_w6 = [5, 14, 10, 14, 12, 12, 12, 14, 14, 12, 14, 14, 16, 16, 14, 14, 14, 14] for i, w in enumerate(col_w6, 1): ws6.column_dimensions[get_column_letter(i)].width = w hdr(ws6, 1, 1, "🟢 BUFFY COAT GRANULOCYTE TRANSFUSION LOG — GT ARM ONLY", bg="375623", fg="FFFFFF", bold=True, sz=13, merge_to=18) ws6.row_dimensions[1].height = 28 hdr(ws6, 2, 1, "GT ARM PATIENTS ONLY — Leave blank for ST arm", bg="E2EFDA", fg="375623", bold=True, sz=10, merge_to=18) ws6.row_dimensions[2].height = 18 hdrs6 = [ "#", "Study ID", "GT #\n(1-5)", "Date of\nTransfusion", "WBC Units\nPooled", "ABO/Rh\nProduct", "Granulocyte\nCount(×10¹⁰)", "Irradiation\nDose(Gy)", "Time Prep→\nTransfusion(h)", "Volume\n(mL)", "Dose\n(mL/kg)", "CMV\nStatus", "Cross-match\nCompatible", "Pre-med\nGiven(Y/N)", "Adverse\nEvent(Y/N)", "AE\nDescription", "Transfusion\nStopped(Y/N)", "ANC Post-GT\n(/mm³)" ] for col, h in enumerate(hdrs6, 1): c = ws6.cell(row=3, column=col, value=h) c.fill = PatternFill("solid", fgColor="375623") c.font = Font(bold=True, color="FFFFFF", size=9, name="Arial") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws6.row_dimensions[3].height = 35 for row in range(4, 54): ws6.cell(row=row, column=1, value=row-3) for col in range(2, 19): c = ws6.cell(row=row, column=col, value="") c.fill = PatternFill("solid", fgColor=COL_GT_ARM) ws6.row_dimensions[row].height = 15 dv_gtnum = add_dv_list(ws6, '"1,2,3,4,5"', "C4:C53") dv_cmv = add_dv_list(ws6, '"CMV Negative,CMV Positive,Unknown"', "L4:L53") dv_compat = add_dv_list(ws6, '"Compatible,Incompatible,Not done"', "M4:M53") for col_letter in ["N", "O", "Q"]: add_dv_list(ws6, '"Yes,No"', f"{col_letter}4:{col_letter}53") thin_border(ws6, 3, 1, 53, 18) # ═══════════════════════════════════════════════════════════════════ # SHEET 8 - TREATMENT # ═══════════════════════════════════════════════════════════════════ ws7 = wb.create_sheet("💊 Treatment") ws7.sheet_properties.tabColor = "00B0F0" col_w7 = [5, 14, 14, 16, 16, 14, 16, 14, 14, 14, 14, 14, 14, 12, 14, 14, 14, 14] for i, w in enumerate(col_w7, 1): ws7.column_dimensions[get_column_letter(i)].width = w hdr(ws7, 1, 1, "TREATMENT DATA — ANTIBIOTICS | ANTIFUNGALS | G-CSF | SUPPORTIVE CARE | ICU", bg="1F3864", fg="FFFFFF", bold=True, sz=13, merge_to=18) ws7.row_dimensions[1].height = 28 hdr(ws7, 2, 1, "ANTIBIOTIC", bg="1F3864", fg="FFFFFF", sz=9, merge_to=6) hdr(ws7, 2, 7, "ANTIFUNGAL", bg="375623", fg="FFFFFF", sz=9, merge_to=9) hdr(ws7, 2, 10, "G-CSF", bg="843C0C", fg="FFFFFF", sz=9, merge_to=12) hdr(ws7, 2, 13, "SUPPORTIVE CARE", bg="7030A0", fg="FFFFFF", sz=9, merge_to=15) hdr(ws7, 2, 16, "ICU / ORGAN SUPPORT", bg="C00000", fg="FFFFFF", sz=9, merge_to=18) ws7.row_dimensions[2].height = 18 hdrs7 = [ "#", "Study ID", "Time Fever→\n1st Abx(min)", "Empirical\nRegimen", "Antibiotic\nModified(Y/N)", "Total Abx\nDuration(d)", "Antifungal\nStarted(Y/N)", "Antifungal\nAgent", "Antifungal\nDuration(d)", "G-CSF\n(Y/N)", "G-CSF\nAgent", "G-CSF\nDoses", "pRBC\nUnits", "Platelets\nUnits", "TPN\n(Y/N)", "ICU\n(Y/N)", "Vasopressor\n(Y/N)", "Mech Vent\n(Y/N)" ] for col, h in enumerate(hdrs7, 1): c = ws7.cell(row=3, column=col, value=h) c.fill = PatternFill("solid", fgColor=COL_HEADER_LIGHT) c.font = Font(bold=True, size=9, name="Arial", color="1F3864") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws7.row_dimensions[3].height = 35 for row in range(4, 24): ws7.cell(row=row, column=1, value=row-3) for col in range(2, 19): ws7.cell(row=row, column=col, value="") ws7.row_dimensions[row].height = 15 dv_empreg = add_dv_list(ws7, '"Pip-Tazobactam,Cefepime,Meropenem,Imipenem,Combination:Pip-Tazo+Amikacin,Other"', "D4:D23") dv_af = add_dv_list(ws7, '"Fluconazole,Voriconazole,Caspofungin,Amphotericin B,Posaconazole"', "H4:H23") dv_gcsf2 = add_dv_list(ws7, '"Filgrastim,Pegfilgrastim,No"', "K4:K23") for col_letter in ["E", "G", "J", "O", "P", "Q", "R"]: add_dv_list(ws7, '"Yes,No"', f"{col_letter}4:{col_letter}23") thin_border(ws7, 2, 1, 23, 18) # ═══════════════════════════════════════════════════════════════════ # SHEET 9 - OUTCOMES # ═══════════════════════════════════════════════════════════════════ ws8 = wb.create_sheet("✅ Outcomes") ws8.sheet_properties.tabColor = "FF0000" col_w8 = [5, 14, 14, 16, 16, 14, 14, 16, 16, 14, 14, 14, 18, 18, 18] for i, w in enumerate(col_w8, 1): ws8.column_dimensions[get_column_letter(i)].width = w hdr(ws8, 1, 1, "PRIMARY & SECONDARY OUTCOMES — MORTALITY | ANC RECOVERY | DEFERVESCENCE | COST", bg="C00000", fg="FFFFFF", bold=True, sz=13, merge_to=15) ws8.row_dimensions[1].height = 28 hdr(ws8, 2, 1, "PRIMARY OUTCOME", bg="C00000", fg="FFFFFF", sz=9, merge_to=4) hdr(ws8, 2, 5, "SECONDARY OUTCOMES — TIME-TO-EVENT", bg="843C0C", fg="FFFFFF", sz=9, merge_to=10) hdr(ws8, 2, 11, "CLINICAL RESPONSE", bg="375623", fg="FFFFFF", sz=9, merge_to=12) hdr(ws8, 2, 13, "COST ANALYSIS (NPR)", bg="1F3864", fg="FFFFFF", sz=9, merge_to=15) ws8.row_dimensions[2].height = 18 hdrs8 = [ "#", "Study ID", "28-Day\nMortality\n(Alive/Dead)", "If Dead:\nCause of Death", "Days to\nANC≥500\n(from FN onset)", "ANC Recovery\nDate", "Days to\nDefervescence", "Defervescence\nDate", "Days to Cx\nClearance", "Total Abx\nDuration(d)", "Total Hospital\nStay(d)", "ICU\nDays", "Clinical Response\nDay 7", "Total Episode\nCost (NPR)", "GT Cost\n(NPR)" ] for col, h in enumerate(hdrs8, 1): c = ws8.cell(row=3, column=col, value=h) c.fill = PatternFill("solid", fgColor=COL_OUTCOME) c.font = Font(bold=True, size=9, name="Arial", color="1F3864") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws8.row_dimensions[3].height = 40 for row in range(4, 24): ws8.cell(row=row, column=1, value=row-3) for col in range(2, 16): c = ws8.cell(row=row, column=col, value="") c.fill = PatternFill("solid", fgColor="FFF2CC" if col in [14, 15] else COL_WHITE) ws8.row_dimensions[row].height = 15 dv_28d = add_dv_list(ws8, '"Alive,Dead"', "C4:C23") dv_cause = add_dv_list(ws8, '"Septic Shock,Respiratory Failure,MDR Infection,Disease Progression,GT Adverse Event,Unknown,N/A-Alive"', "D4:D23") dv_cr7 = add_dv_list(ws8, '"Complete Response,Partial Response,No Response,Progressive Disease"', "M4:M23") thin_border(ws8, 2, 1, 23, 15) # ═══════════════════════════════════════════════════════════════════ # SHEET 10 - FOLLOW UP # ═══════════════════════════════════════════════════════════════════ ws9 = wb.create_sheet("📅 Follow_Up") ws9.sheet_properties.tabColor = "00B050" col_w9 = [5, 14, 14, 14, 14, 14, 14, 14, 14, 18, 18, 18, 20] for i, w in enumerate(col_w9, 1): ws9.column_dimensions[get_column_letter(i)].width = w hdr(ws9, 1, 1, "FOLLOW-UP DATA — DAY 30 / DAY 60 / DAY 90", bg="375623", fg="FFFFFF", bold=True, sz=13, merge_to=13) ws9.row_dimensions[1].height = 28 hdr(ws9, 2, 1, "", bg=COL_WHITE) hdr(ws9, 2, 2, "Study ID", bg=COL_HEADER_MID, fg="FFFFFF", sz=9) hdr(ws9, 2, 3, "DAY 30", bg="375623", fg="FFFFFF", sz=9, merge_to=5) hdr(ws9, 2, 6, "DAY 60", bg="375623", fg="FFFFFF", sz=9, merge_to=8) hdr(ws9, 2, 9, "DAY 90", bg="375623", fg="FFFFFF", sz=9, merge_to=11) hdr(ws9, 2, 12, "MALIGNANCY STATUS\nDAY 90", bg="843C0C", fg="FFFFFF", sz=9) hdr(ws9, 2, 13, "POST-GT\nALLOIMMUNIZATION", bg="7030A0", fg="FFFFFF", sz=9) ws9.row_dimensions[2].height = 28 subhdrs9 = [ "#", "Study ID", "D30 Status\n(Alive/Dead/LTFU)", "D30 Date", "Reason if Dead", "D60 Status", "D60 Date", "Notes", "D90 Status", "D90 Date", "Reason if Dead", "Disease Status\nD90", "HLA Antibody\n(Pos/Neg/ND)" ] for col, h in enumerate(subhdrs9, 1): c = ws9.cell(row=3, column=col, value=h) c.fill = PatternFill("solid", fgColor=COL_HEADER_LIGHT) c.font = Font(bold=True, size=9, name="Arial", color="1F3864") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws9.row_dimensions[3].height = 35 for row in range(4, 24): ws9.cell(row=row, column=1, value=row-3) for col in range(2, 14): ws9.cell(row=row, column=col, value="") ws9.row_dimensions[row].height = 15 for col_letter in ["C", "F", "I"]: add_dv_list(ws9, '"Alive,Dead,Lost to Follow-Up"', f"{col_letter}4:{col_letter}23") dv_ds90 = add_dv_list(ws9, '"Complete Remission,Partial Remission,Stable Disease,Progression,Relapse,Not assessed"', "L4:L23") dv_hla = add_dv_list(ws9, '"Positive,Negative,Not done"', "M4:M23") thin_border(ws9, 2, 1, 23, 13) # ═══════════════════════════════════════════════════════════════════ # SHEET 11 - SUMMARY DASHBOARD # ═══════════════════════════════════════════════════════════════════ ws10 = wb.create_sheet("📊 Summary_Dashboard") ws10.sheet_properties.tabColor = "FF9900" ws10.column_dimensions["A"].width = 35 ws10.column_dimensions["B"].width = 18 ws10.column_dimensions["C"].width = 18 ws10.column_dimensions["D"].width = 18 ws10.column_dimensions["E"].width = 25 hdr(ws10, 1, 1, "RESEARCH DASHBOARD — LIVE SUMMARY", bg="FF9900", fg="1F3864", bold=True, sz=14, merge_to=5) ws10.row_dimensions[1].height = 32 hdr(ws10, 2, 1, "VARIABLE", bg=COL_HEADER_MID, fg="FFFFFF", sz=10) hdr(ws10, 2, 2, "GT ARM", bg="375623", fg="FFFFFF", sz=10) hdr(ws10, 2, 3, "ST ARM", bg="843C0C", fg="FFFFFF", sz=10) hdr(ws10, 2, 4, "TOTAL", bg="1F3864", fg="FFFFFF", sz=10) hdr(ws10, 2, 5, "NOTES / INTERPRETATION", bg=COL_HEADER_LIGHT, fg="1F3864", sz=10) ws10.row_dimensions[2].height = 22 dash_data = [ ("Total patients enrolled", '=COUNTIF(\'👤 Patient_Demographics\'!D4:D23,"GT")', '=COUNTIF(\'👤 Patient_Demographics\'!D4:D23,"ST")', '=B3+C3', "Target: 30-40 per arm"), ("Male : Female ratio", "", "", "", "Calculate from Demographics sheet"), ("Mean age (years)", "", "", "", "Use AVERAGE() on Demographics col E"), ("AML patients (n)", "", "", "", "Count from Malignancy sheet"), ("ALL patients (n)", "", "", "", "Count from Malignancy sheet"), ("Mean MASCC score", "", "", "", "Use AVERAGE() on FN Episode col N"), ("High-risk FN (<21) n(%)", "", "", "", "MASCC<21 count"), ("Bacteremia rate n(%)", "", "", "", "Count positive blood cultures"), ("Gram-negative bacteremia n", "", "", "", "From Antibiogram sheet"), ("MDR organism n(%)", "", "", "", "From Antibiogram sheet - MDR=Yes"), ("28-day mortality n(%)", '=COUNTIFS(\'✅ Outcomes\'!C4:C23,"Dead",\'👤 Patient_Demographics\'!D4:D23,"GT")', '=COUNTIFS(\'✅ Outcomes\'!C4:C23,"Dead",\'👤 Patient_Demographics\'!D4:D23,"ST")', '=B14+C14', "PRIMARY OUTCOME"), ("Mean days to ANC recovery", "", "", "", "AVERAGE() from Outcomes col E"), ("Mean days to defervescence", "", "", "", "AVERAGE() from Outcomes col G"), ("Mean hospital stay (days)", "", "", "", "AVERAGE() from Outcomes col K"), ("ICU admission rate n(%)", "", "", "", "From Treatment sheet"), ("TRALI/adverse events n", "", "", "", "From GT Transfusion Log"), ("Mean GT cost per patient (NPR)", "", "", "", "From Outcomes col O"), ("Mean total cost per episode (NPR)", "", "", "", "From Outcomes col N"), ("30-day survival rate (%)", "", "", "", "From Follow-up sheet"), ("90-day survival rate (%)", "", "", "", "From Follow-up sheet"), ] for i, (label, gt_val, st_val, total_val, note) in enumerate(dash_data): r = 3 + i ws10.cell(row=r, column=1, value=label).font = Font(bold=True if label in ["28-day mortality n(%)", "Mean days to ANC recovery"] else False, size=10, name="Arial", color="1F3864") ws10.cell(row=r, column=1).fill = PatternFill("solid", fgColor=COL_HEADER_LIGHT if i % 2 == 0 else COL_WHITE) c2 = ws10.cell(row=r, column=2, value=gt_val) c2.fill = PatternFill("solid", fgColor="E2EFDA") c2.font = Font(size=10, name="Arial", color="375623", bold=True) c3 = ws10.cell(row=r, column=3, value=st_val) c3.fill = PatternFill("solid", fgColor="FFF2CC") c3.font = Font(size=10, name="Arial", color="843C0C", bold=True) c4 = ws10.cell(row=r, column=4, value=total_val) c4.fill = PatternFill("solid", fgColor=COL_CALC) c4.font = Font(size=10, name="Arial", bold=True) c5 = ws10.cell(row=r, column=5, value=note) c5.fill = PatternFill("solid", fgColor=COL_WHITE) c5.font = Font(italic=True, size=9, name="Arial", color="555555") ws10.row_dimensions[r].height = 16 thin_border(ws10, 2, 1, 22, 5) # ═══════════════════════════════════════════════════════════════════ # SHEET 12 - CODEBOOK # ═══════════════════════════════════════════════════════════════════ ws11 = wb.create_sheet("📝 Codebook") ws11.sheet_properties.tabColor = "AAAAAA" ws11.column_dimensions["A"].width = 5 ws11.column_dimensions["B"].width = 28 ws11.column_dimensions["C"].width = 20 ws11.column_dimensions["D"].width = 35 ws11.column_dimensions["E"].width = 20 ws11.column_dimensions["F"].width = 25 hdr(ws11, 1, 1, "CODEBOOK — VARIABLE DEFINITIONS, NORMAL RANGES & CODING GUIDE", bg="595959", fg="FFFFFF", bold=True, sz=13, merge_to=6) ws11.row_dimensions[1].height = 28 hdrs11 = ["#", "Variable Name", "Data Type", "Definition / Normal Range", "Code Values", "Sheet Location"] for col, h in enumerate(hdrs11, 1): c = ws11.cell(row=2, column=col, value=h) c.fill = PatternFill("solid", fgColor="595959") c.font = Font(bold=True, color="FFFFFF", size=10, name="Arial") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws11.row_dimensions[2].height = 22 codebook = [ ("FN Definition", "Clinical", "Fever ≥38.3°C once OR ≥38.0°C >1h + ANC <500/mm³", "As defined", "FN_Episode"), ("ANC", "Numeric (/mm³)", "Absolute Neutrophil Count = WBC × (Neut% + Band%)/100", "Normal: 1500-8000; Severe: <500; Profound: <100", "Lab_Microbiology"), ("MASCC Score", "Score (0-26)", "Multinational Association Supportive Care Cancer score", "≥21=Low Risk; <21=HIGH RISK", "FN_Episode"), ("CISNE Score", "Score (0-8)", "Clinical Index of Stable Febrile Neutropenia", "0=low risk; ≥3=high risk for complications", "FN_Episode"), ("PCT (Procalcitonin)", "Numeric (ng/mL)", "Bacteremia marker validated in Nepal (Shilpakar 2019)", "<0.5=unlikely bacteremia; 0.5-2=possible; >2=likely", "Lab_Microbiology"), ("CRP", "Numeric (mg/L)", "C-Reactive Protein", "Normal <10; Infection often >50", "Lab_Microbiology"), ("Galactomannan", "Index", "Aspergillus antigen", "Index >0.5=Positive; >1.0=Strongly positive", "Lab_Microbiology"), ("Beta-D-Glucan", "Numeric (pg/mL)", "Broad fungal marker (not specific for Cryptococcus/Mucoromycetes)", ">80=positive; >200=strongly positive", "Lab_Microbiology"), ("ESBL", "Y/N", "Extended-Spectrum Beta-Lactamase producing organism", "Positive/Negative/Not done", "Antibiogram"), ("CRE", "Y/N", "Carbapenem-Resistant Enterobacteriaceae", "Positive/Negative/Not done", "Antibiogram"), ("MRSA", "Y/N", "Methicillin-Resistant Staphylococcus aureus", "Positive/Negative/Not done", "Antibiogram"), ("MDR", "Y/N", "Multi-Drug Resistant: Resistant to ≥3 antibiotic classes", "Yes/No", "Antibiogram"), ("ECOG PS", "Score 0-4", "Eastern Cooperative Oncology Group Performance Status", "0=Normal; 1=Ambulatory; 2=<50% in bed; 3=>50% in bed; 4=Completely disabled", "Patient_Demographics"), ("GT Dose", "mL/kg", "Buffy coat granulocyte transfusion dose", "Target: 10 mL/kg per transfusion", "GT_Transfusion_Log"), ("Granulocyte Count", "×10¹⁰", "Final granulocyte count in buffy coat product", "Target: ≥1×10¹⁰ per transfusion", "GT_Transfusion_Log"), ("TRALI", "Clinical", "Transfusion-Related Acute Lung Injury", "New hypoxia + bilateral infiltrates within 6h of transfusion", "GT_Transfusion_Log"), ("DTP", "Minutes", "Differential Time to Positivity (CLABSI indicator)", "CVC positive ≥120 min before peripheral = CLABSI", "Lab_Microbiology"), ("28-day mortality", "Binary", "Death from any cause within 28 days of FN episode onset", "Alive/Dead — PRIMARY OUTCOME", "Outcomes"), ("ANC Recovery", "Days", "Days from FN onset to ANC ≥500 for 2 consecutive days", "Numeric; SECONDARY OUTCOME", "Outcomes"), ("Defervescence", "Days", "Days from FN onset to afebrile >24h without antipyretics", "Numeric; SECONDARY OUTCOME", "Outcomes"), ("ELN 2022 Risk", "Category", "European LeukemiaNet 2022 AML risk stratification", "Favorable/Intermediate/Adverse", "Malignancy_Chemo"), ("Clinical Response D7", "Category", "Response assessment at Day 7 of treatment", "CR=Afebrile+ANC recovering; PR=One criterion; NR=Neither; PD=Worsening", "Outcomes"), ("HLH Screen", "Panel", "Hemophagocytic Lymphohistiocytosis: Ferritin>10000, Triglycerides high, Fibrinogen low, D-dimer high", "Ferritin/Triglycerides/Fibrinogen/D-dimer from Lab sheet", "Lab_Microbiology"), ("Mucositis Grade", "WHO 0-4", "WHO Mucositis Scale", "0=None; 1=Soreness; 2=Erythema+Ulcers; 3=Ulcers+Liquid diet; 4=Alimentation impossible", "FN_Episode"), ("Sepsis-3 Criteria", "Clinical", "Suspected infection + SOFA increase ≥2", "SOFA score: Resp+Coag+Liver+CV+CNS+Renal", "FN_Episode"), ] for i, (var, dtype, defn, code, sheet) in enumerate(codebook): r = 3 + i ws11.cell(row=r, column=1, value=i+1) ws11.cell(row=r, column=2, value=var).font = Font(bold=True, size=9, name="Arial", color="1F3864") ws11.cell(row=r, column=3, value=dtype).font = Font(size=9, name="Arial") ws11.cell(row=r, column=4, value=defn).font = Font(size=9, name="Arial") ws11.cell(row=r, column=4).alignment = Alignment(wrap_text=True) ws11.cell(row=r, column=5, value=code).font = Font(size=9, name="Arial", color="C00000") ws11.cell(row=r, column=6, value=sheet).font = Font(size=9, name="Arial", color="2E75B6") bg = COL_HEADER_LIGHT if i % 2 == 0 else COL_WHITE for col in range(1, 7): ws11.cell(row=r, column=col).fill = PatternFill("solid", fgColor=bg) ws11.row_dimensions[r].height = 18 thin_border(ws11, 2, 1, 3 + len(codebook) - 1, 6) # ═══════════════════════════════════════════════════════════════════ # BUFFY COAT DIAGNOSTIC COMPARISON SHEET # ═══════════════════════════════════════════════════════════════════ ws12 = wb.create_sheet("🧫 Buffy_Coat_Diagnostic") ws12.sheet_properties.tabColor = "9900CC" col_w12 = [5, 14, 16, 16, 14, 14, 16, 16, 14, 14, 20, 14] for i, w in enumerate(col_w12, 1): ws12.column_dimensions[get_column_letter(i)].width = w hdr(ws12, 1, 1, "🧫 BUFFY COAT SMEAR — DIAGNOSTIC DATA vs BLOOD CULTURE COMPARISON (ALL PATIENTS)", bg="7030A0", fg="FFFFFF", bold=True, sz=13, merge_to=12) ws12.row_dimensions[1].height = 28 hdr(ws12, 2, 1, "BUFFY COAT SMEAR", bg="7030A0", fg="FFFFFF", sz=9, merge_to=7) hdr(ws12, 2, 8, "BLOOD CULTURE (REFERENCE)", bg="C00000", fg="FFFFFF", sz=9, merge_to=10) hdr(ws12, 2, 11, "CONCORDANCE", bg="375623", fg="FFFFFF", sz=9, merge_to=12) ws12.row_dimensions[2].height = 18 hdrs12 = [ "#", "Study ID", "Time Draw→\nSmear Result(h)", "Organisms\nVisualised(Y/N)", "Organism\nType on Smear", "Blast %\non Smear", "WBC Diff\nMatch Analyzer(Y/N)", "Blood Cx\nResult", "Blood Cx\nOrganism", "Days to\nCulture Result", "Concordance\nSmear vs Cx", "Time Saved\n(hours)" ] for col, h in enumerate(hdrs12, 1): c = ws12.cell(row=3, column=col, value=h) c.fill = PatternFill("solid", fgColor="F3E5F5") c.font = Font(bold=True, size=9, name="Arial", color="7030A0") c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True) ws12.row_dimensions[3].height = 40 for row in range(4, 24): ws12.cell(row=row, column=1, value=row-3) for col in range(2, 11): ws12.cell(row=row, column=col, value="") # Concordance auto c_conc = ws12.cell(row=row, column=11) c_conc.value = f'=IF(OR(D{row}="",H{row}=""),"",IF(AND(D{row}="Yes",H{row}="Positive"),"True Positive",IF(AND(D{row}="No",H{row}="Negative"),"True Negative",IF(AND(D{row}="Yes",H{row}="Negative"),"False Positive","False Negative"))))' c_conc.fill = PatternFill("solid", fgColor=COL_CALC) c_conc.font = Font(size=9, name="Arial", bold=True, color="375623") # Time saved auto c_time = ws12.cell(row=row, column=12) c_time.value = f'=IF(AND(C{row}<>"",J{row}<>""),ROUND(J{row}*24-C{row},1),"")' c_time.fill = PatternFill("solid", fgColor=COL_CALC) c_time.font = Font(size=9, name="Arial", bold=True, color="375623") ws12.row_dimensions[row].height = 15 dv_org_vis = add_dv_list(ws12, '"Yes,No"', "D4:D23") dv_smear_org = add_dv_list(ws12, '"Gram-pos cocci,Gram-neg rods,Gram-neg cocci,Yeast forms,Leishmania amastigotes,Microfilariae,Multiple,None visualized"', "E4:E23") dv_match = add_dv_list(ws12, '"Yes,No,Not applicable"', "G4:G23") dv_cx_res = add_dv_list(ws12, '"Positive,Negative,Contaminated,Pending"', "H4:H23") thin_border(ws12, 2, 1, 23, 12) # ═══════════════════════════════════════════════════════════════════ # SAVE # ═══════════════════════════════════════════════════════════════════ output_path = "/home/daytona/workspace/fn-thesis/FN_HematMalig_DataEntry_CSH.xlsx" wb.save(output_path) print(f"SUCCESS: File saved to {output_path}") PYEOF
ls -la /home/daytona/workspace/fn-thesis/ && df -h /home/daytona/workspace/
mkdir -p /home/daytona/workspace/fn-thesis && ls -la /home/daytona/workspace/ && df -h /home/daytona/workspace/
python3 -c " import os os.makedirs('/home/daytona/workspace/fn-thesis', exist_ok=True) print('dir created:', os.path.isdir('/home/daytona/workspace/fn-thesis')) print('writable:', os.access('/home/daytona/workspace/fn-thesis', os.W_OK)) # test write with open('/home/daytona/workspace/fn-thesis/test.txt', 'w') as f: f.write('test') print('write test ok') os.remove('/home/daytona/workspace/fn-thesis/test.txt') "
python3 -c " import os, stat # find writable directory for p in ['/home/daytona', '/tmp', '/var/tmp']: if os.path.isdir(p) and os.access(p, os.W_OK): print('WRITABLE:', p) "
python3 << 'PYEOF' import openpyxl from openpyxl.styles import PatternFill, Font, Alignment, Border, Side from openpyxl.utils import get_column_letter from openpyxl.worksheet.datavalidation import DataValidation import os os.makedirs('/home/daytona/fn-thesis', exist_ok=True) wb = openpyxl.Workbook() # Colors C_NAVY = "1F3864" C_BLUE = "2E75B6" C_LBLUE = "BDD7EE" C_GREEN = "375623" C_LGREEN = "E2EFDA" C_RED = "C00000" C_ORANGE = "843C0C" C_CALC = "F2F2F2" C_REQ = "FFD7D7" C_WHITE = "FFFFFF" C_YELLOW = "FFF2CC" C_PURPLE = "7030A0" C_LPURP = "F3E5F5" def fill(color): return PatternFill("solid", fgColor=color) def fnt(bold=False, sz=9, color="000000", italic=False): return Font(name="Arial", size=sz, bold=bold, color=color, italic=italic) def aln(h="center", v="center", wrap=True): return Alignment(horizontal=h, vertical=v, wrap_text=wrap) def thin(): s = Side(style="thin", color="CCCCCC") return Border(left=s, right=s, top=s, bottom=s) def hdr(ws, r, c, txt, bg=C_BLUE, fg=C_WHITE, bold=True, sz=10, mc=None, rh=None): cell = ws.cell(row=r, column=c, value=txt) cell.fill = fill(bg); cell.font = fnt(bold=bold, sz=sz, color=fg) cell.alignment = aln(); cell.border = thin() if mc: ws.merge_cells(start_row=r, start_column=c, end_row=r, end_column=mc) if rh: ws.row_dimensions[r].height = rh return cell def lbl(ws, r, c, txt, bg=C_LBLUE, bold=False, sz=9): cell = ws.cell(row=r, column=c, value=txt) cell.fill = fill(bg); cell.font = fnt(bold=bold, sz=sz, color=C_NAVY) cell.alignment = aln(h="left"); cell.border = thin() return cell def inp(ws, r, c, val="", bg=C_WHITE, sz=9, bold=False, color="000000"): cell = ws.cell(row=r, column=c, value=val) cell.fill = fill(bg); cell.font = fnt(bold=bold, sz=sz, color=color) cell.alignment = aln(h="left"); cell.border = thin() return cell def formula(ws, r, c, f, bg=C_CALC, sz=9): cell = ws.cell(row=r, column=c, value=f) cell.fill = fill(bg); cell.font = fnt(sz=sz, color="444444") cell.alignment = aln(); cell.border = thin() return cell def dv_list(ws, opts, sq): dv = DataValidation(type="list", formula1=f'"{opts}"', allow_blank=True) dv.error = "Select from list"; dv.errorTitle = "Invalid" dv.showErrorMessage = True ws.add_data_validation(dv) dv.sqref = sq def set_cols(ws, widths): for i, w in enumerate(widths, 1): ws.column_dimensions[get_column_letter(i)].width = w # ═══════════════════════════════════════════════ # SHEET 1 — INSTRUCTIONS # ═══════════════════════════════════════════════ ws0 = wb.active ws0.title = "INSTRUCTIONS" ws0.sheet_properties.tabColor = C_NAVY set_cols(ws0, [4, 55, 35]) hdr(ws0,1,1,"FEBRILE NEUTROPENIA IN HEMATOLOGICAL MALIGNANCIES — DATA ENTRY WORKBOOK", bg=C_NAVY, sz=13, mc=3, rh=32) for r,t in [(2,"Civil Service Hospital, Kathmandu | DM Thesis — Clinical Hematology"), (3,"Study: Efficacy of Buffy Coat-Derived Granulocyte Transfusion in High-Risk FN"), (4,"Investigator: _______________________ Supervisor: _______________________"), (5,"IRC Approval No.: _______________ CTRI Registration No.: _______________")]: ws0.cell(row=r,column=2,value=t).font=fnt(bold=True,sz=10,color=C_NAVY) ws0.row_dimensions[r].height=16 hdr(ws0,7,1,"SHEET GUIDE",bg=C_BLUE,sz=11,mc=3,rh=22) guides=[ ("1. PATIENT_DEMOGRAPHICS","Age, sex, BMI, comorbidities, ECOG — 1 row per patient"), ("2. MALIGNANCY_CHEMO","Diagnosis, cytogenetics, regimen, disease status"), ("3. FN_EPISODE + MASCC","FN definition, MASCC score, clinical site of infection"), ("4. LAB_CBC_DAILY","Daily CBC — WBC, ANC, Hgb, Platelets, Blasts (fill each day row)"), ("5. LAB_BIOCHEM_MARKERS","Biochemistry, LFT, RFT, LDH, inflammatory markers — per timepoint"), ("6. MICROBIOLOGY","Blood cultures, organism, antibiogram, ESBL/CRE/MDR"), ("7. GT_TRANSFUSION_LOG","Buffy coat prep, dose, adverse events — GT arm patients only"), ("8. BUFFY_COAT_DIAGNOSTIC","Smear findings vs blood culture — ALL patients (key comparison)"), ("9. TREATMENT","Antibiotics, antifungals, G-CSF, ICU, vasopressors"), ("10. OUTCOMES","28-day mortality, ANC recovery, defervescence, costs"), ("11. FOLLOW_UP","Day 30/60/90 survival and disease status"), ("12. DASHBOARD","Auto-calculated summary — do not edit"), ("13. CODEBOOK","Variable definitions, codes, normal ranges"), ] for i,(s,d) in enumerate(guides): r=8+i ws0.cell(row=r,column=2,value=s).font=fnt(bold=True,sz=10,color=C_NAVY) ws0.cell(row=r,column=2).fill=fill(C_LBLUE) ws0.cell(row=r,column=3,value=d).font=fnt(sz=9) ws0.row_dimensions[r].height=15 hdr(ws0,22,1,"COLOUR CODE LEGEND",bg=C_NAVY,sz=11,mc=3,rh=22) legend=[(C_REQ,"RED = MANDATORY — must not be blank"), (C_CALC,"GREY = AUTO-CALCULATED — do not type"), (C_LGREEN,"GREEN = GT ARM ONLY — blank for ST patients"), (C_YELLOW,"YELLOW = COST / FINANCIAL DATA"), (C_LBLUE,"LIGHT BLUE = LABEL / HELPER ROW")] for i,(c,t) in enumerate(legend): r=23+i ws0.cell(row=r,column=2,value=t).font=fnt(sz=10,color=C_NAVY,bold=True) ws0.cell(row=r,column=2).fill=fill(c) ws0.row_dimensions[r].height=16 rules=["Enter all dates as DD/MM/YYYY", "Use dropdowns where provided — do NOT override with free text", "Negative / absent = 'No' or '0' — never leave blank", "Lab values: numbers only (units are in column header)", "Save file as CSH_FN_Data_[YourName].xlsx"] hdr(ws0,29,1,"RULES",bg=C_BLUE,sz=11,mc=3,rh=20) for i,r_txt in enumerate(rules): ws0.cell(row=30+i,column=2,value=r_txt).font=fnt(sz=9,color=C_NAVY) ws0.row_dimensions[30+i].height=14 # ═══════════════════════════════════════════════ # SHEET 2 — PATIENT DEMOGRAPHICS # ═══════════════════════════════════════════════ ws1 = wb.create_sheet("1.DEMOGRAPHICS") ws1.sheet_properties.tabColor = C_BLUE set_cols(ws1,[4,14,14,12,10,8,9,9,10,10,18,14,16,14,22,20]) hdr(ws1,1,1,"PATIENT DEMOGRAPHICS & BASELINE",bg=C_NAVY,sz=12,mc=16,rh=28) cols1=[("#",C_NAVY),("Study ID\n(MANDATORY)",C_RED),("Enroll\nDate",C_BLUE), ("Arm\nGT/ST",C_RED),("Age\n(yrs)",C_BLUE),("Sex",C_BLUE), ("Ht\n(cm)",C_BLUE),("Wt\n(kg)",C_BLUE),("BMI\n(auto)",C_CALC), ("ECOG\n(0-4)",C_BLUE),("District",C_BLUE),("Urban/\nRural",C_BLUE), ("Monthly\nIncome(NPR)",C_BLUE),("Insurance",C_BLUE), ("Comorbidities",C_BLUE),("Referral\nSource",C_BLUE)] for c,(h,bg) in enumerate(cols1,1): hdr(ws1,2,c,h,bg=bg,sz=9,rh=35) for row in range(3,23): ws1.cell(row=row,column=1,value=row-2).font=fnt(sz=9) inp(ws1,row,2,"",bg=C_REQ) # Study ID mandatory inp(ws1,row,3,"",bg=C_WHITE) inp(ws1,row,4,"",bg=C_REQ) # Arm mandatory for c in range(5,9): inp(ws1,row,c) formula(ws1,row,9,f'=IF(AND(H{row}<>"",G{row}<>""),ROUND(H{row}/(G{row}/100)^2,1),"")') for c in range(10,17): inp(ws1,row,c) ws1.row_dimensions[row].height=15 dv_list(ws1,'"GT,ST"','D3:D22') dv_list(ws1,'"M,F,Other"','F3:F22') dv_list(ws1,'"0,1,2,3,4"','J3:J22') dv_list(ws1,'"Urban,Peri-urban,Rural"','L3:L22') dv_list(ws1,'"Yes,No"','N3:N22') dv_list(ws1,'"OPD,Same Hospital IPD,External Referral"','P3:P22') # ═══════════════════════════════════════════════ # SHEET 3 — MALIGNANCY & CHEMO # ═══════════════════════════════════════════════ ws2 = wb.create_sheet("2.MALIGNANCY_CHEMO") ws2.sheet_properties.tabColor = "C55A11" set_cols(ws2,[4,14,20,22,22,16,18,20,10,14,12,14,16,14,14,14]) hdr(ws2,1,1,"HEMATOLOGICAL MALIGNANCY & CHEMOTHERAPY",bg="C55A11",sz=12,mc=16,rh=28) hdrs2=["#","Study ID","Primary Diagnosis","WHO/ICC 2022\nSubtype", "Key Molecular\nMarkers","ELN 2022\nRisk","Disease\nStatus", "Chemo\nRegimen","Cycle\n#","Last Chemo\nDate", "Days Chemo\n→Fever","G-CSF\nProphylaxis", "Prior HSCT","Prior Lines\nof Therapy","BM Blasts\n(%)","BM Biopsy\nDate"] for c,h in enumerate(hdrs2,1): hdr(ws2,2,c,h,bg="C55A11",sz=9,rh=35) for row in range(3,23): ws2.cell(row=row,column=1,value=row-2).font=fnt(sz=9) inp(ws2,row,2,"",bg=C_REQ) for c in range(3,17): inp(ws2,row,c) ws2.row_dimensions[row].height=15 dv_list(ws2,'"AML,ALL,CML-Blast Crisis,CLL,DLBCL,Hodgkin Lymphoma,Multiple Myeloma,MDS,MDS/AML,HSCT Recipient,Other"','C3:C22') dv_list(ws2,'"Favorable,Intermediate,Adverse,N/A"','F3:F22') dv_list(ws2,'"Newly Diagnosed-Induction,CR1,CR2,CR3,Partial Remission,Relapsed,Refractory,Post-HSCT"','G3:G22') dv_list(ws2,'"Yes-Filgrastim,Yes-Pegfilgrastim,No"','L3:L22') dv_list(ws2,'"No,Yes-Autologous,Yes-Allogeneic-MRD,Yes-Allogeneic-MUD"','M3:M22') # ═══════════════════════════════════════════════ # SHEET 4 — FN EPISODE + MASCC # ═══════════════════════════════════════════════ ws3 = wb.create_sheet("3.FN_EPISODE+MASCC") ws3.sheet_properties.tabColor = C_RED set_cols(ws3,[4,14,14,12,12,12,10,10,10,10,10,10,10,13,18,16,12,16]) hdr(ws3,1,1,"FN EPISODE CHARACTERIZATION + MASCC SCORE (AUTO-CALCULATED)",bg=C_RED,sz=12,mc=18,rh=28) hdr(ws3,2,1,"PATIENT",bg=C_NAVY,sz=9,mc=2) hdr(ws3,2,3,"FN DEFINITION",bg=C_RED,sz=9,mc=5) hdr(ws3,2,8,"MASCC SCORE — Enter points per component",bg="843C0C",sz=9,mc=13) hdr(ws3,2,14,"MASCC\nTOTAL",bg=C_CALC,fg=C_NAVY,sz=9) hdr(ws3,2,15,"INFECTION\nSITE",bg=C_BLUE,sz=9) hdr(ws3,2,16,"SEPSIS\n(Sepsis-3)",bg=C_RED,sz=9) hdr(ws3,2,17,"MUCOSITIS\nGRADE",bg=C_BLUE,sz=9) hdr(ws3,2,18,"CVC IN\nSITU",bg=C_BLUE,sz=9) ws3.row_dimensions[2].height=22 sh3=["#","Study ID", "Fever Onset\nDate","Max Temp\n(°C)","ANC at\nFever(/mm³)","Fever\nPattern", "Burden\nIllness\n(5/3/0)","No Hypo-\ntension\n(5/0)","No\nCOPD\n(4/0)", "Solid/No\nFungal\n(4/0)","No Dehy-\ndration\n(3/0)","Out-\npatient\n(3/0)","Age\n<60\n(2/0)", "MASCC\nTOTAL","Infection\nSite","Sepsis-3\nStatus","Mucositis\nGrade","CVC\nType"] for c,h in enumerate(sh3,1): hdr(ws3,3,c,h,bg=C_LBLUE,fg=C_NAVY,sz=8,rh=40) for row in range(4,24): ws3.cell(row=row,column=1,value=row-3).font=fnt(sz=9) inp(ws3,row,2,"",bg=C_REQ) for c in range(3,14): inp(ws3,row,c) formula(ws3,row,14, f'=IF(G{row}="","",IFERROR(G{row}+H{row}+I{row}+J{row}+K{row}+L{row}+M{row},""))', bg="FFE0E0") ws3.cell(row=row,column=14).font=fnt(bold=True,sz=10,color=C_RED) for c in range(15,19): inp(ws3,row,c) ws3.row_dimensions[row].height=16 dv_list(ws3,'"Continuous,Intermittent,Hectic,Sustained"','F4:F23') dv_list(ws3,'"5,3,0"','G4:G23') for col in ['H','I','J']: dv_list(ws3,f'"5,0"' if col=='H' else '"4,0"',f'{col}4:{col}23') dv_list(ws3,'"3,0"','K4:K23') dv_list(ws3,'"3,0"','L4:L23') dv_list(ws3,'"2,0"','M4:M23') dv_list(ws3,'"No Focus-Primary Bacteremia,Pneumonia,UTI,CLABSI,Mucositis/Oropharyngeal,Perianal/Typhlitis,Sinusitis-Fungal,Skin/Soft Tissue,CNS,Intra-abdominal,Multiple,Other"','O4:O23') dv_list(ws3,'"No,Yes-Sepsis,Yes-Septic Shock"','P4:P23') dv_list(ws3,'"0,1,2,3,4"','Q4:Q23') dv_list(ws3,'"No,PICC,Hickman,Port-a-cath,Temporary CVL"','R4:R23') # ═══════════════════════════════════════════════ # SHEET 5 — DAILY CBC # ═══════════════════════════════════════════════ ws4 = wb.create_sheet("4.LAB_CBC_DAILY") ws4.sheet_properties.tabColor = "375623" set_cols(ws4,[4,14,14,10,10,10,10,10,10,10,10]) hdr(ws4,1,1,"DAILY CBC — COMPLETE BLOOD COUNT (1 ROW PER PATIENT PER TIMEPOINT)",bg=C_NAVY,sz=12,mc=11,rh=28) hdr(ws4,2,1,"ENTER ONE ROW PER DAY/TIMEPOINT — Use dropdown for Timepoint",bg=C_LGREEN,fg=C_GREEN,sz=10,mc=11,rh=18) sh4=["#","Study ID","Timepoint","Date","WBC\n(/mm³)","ANC\n(/mm³)","Hgb\n(g/dL)","Platelets\n(/mm³)","Blasts\n(%PB)","Bands\n(%)","Retics\n(%)"] for c,h in enumerate(sh4,1): hdr(ws4,3,c,h,bg=C_GREEN,fg=C_WHITE,sz=9,rh=32) timepoints=["Day 0-Admission","Day 1","Day 2","Day 3","Day 4","Day 5","Day 6","Day 7","Day 10","Day 14","Day 21","Day 28","At Defervescence","At ANC Recovery","At Discharge"] tp_str=",".join(timepoints) row=4; pt=1 for p in range(1,21): for i,tp in enumerate(timepoints): ws4.cell(row=row,column=1,value=p if i==0 else "").font=fnt(sz=9) inp(ws4,row,2,"" if i>0 else "",bg=C_REQ if i==0 else C_WHITE) inp(ws4,row,3,tp) for c in range(4,12): bg = "F0FFF0" if row%2==0 else C_WHITE inp(ws4,row,c,bg=bg) ws4.row_dimensions[row].height=13 row+=1 dv_list(ws4,f'"{tp_str}"',f'C4:C{row-1}') # ═══════════════════════════════════════════════ # SHEET 6 — BIOCHEM & INFLAMMATORY MARKERS # ═══════════════════════════════════════════════ ws5 = wb.create_sheet("5.LAB_BIOCHEM_MARKERS") ws5.sheet_properties.tabColor = "843C0C" set_cols(ws5,[4,14,14,10,10,10,12,12,12,12,12,12,12,14,14,14,14]) hdr(ws5,1,1,"BIOCHEMISTRY + INFLAMMATORY MARKERS (per timepoint)",bg="843C0C",sz=12,mc=17,rh=28) hdr(ws5,2,1,"RENAL/HEPATIC",bg="843C0C",fg=C_WHITE,sz=9,mc=7) hdr(ws5,2,8,"COAGULATION/OTHER",bg=C_NAVY,fg=C_WHITE,sz=9,mc=11) hdr(ws5,2,12,"INFLAMMATORY MARKERS",bg=C_RED,fg=C_WHITE,sz=9,mc=15) hdr(ws5,2,16,"FUNGAL",bg=C_PURPLE,fg=C_WHITE,sz=9,mc=17) ws5.row_dimensions[2].height=18 sh5=["#","Study ID","Timepoint","Creat\n(mg/dL)","BUN\n(mg/dL)","ALT\n(U/L)","Total Bili\n(mg/dL)", "LDH\n(U/L)","Fibrinogen\n(mg/dL)","D-dimer\n(mg/L)","INR","Lactate\n(mmol/L)", "CRP\n(mg/L)","PCT\n(ng/mL)","Ferritin\n(ng/mL)","Triglyc\n(mg/dL)", "Galacto-\nmannan","Beta-D\nGlucan\n(pg/mL)"] for c,h in enumerate(sh5,1): hdr(ws5,3,c,h,bg=C_LBLUE,fg=C_NAVY,sz=8,rh=38) tps5=["Day 0-Admission","Day 3","Day 7","Day 14","At Defervescence","At Discharge"] row=4 for p in range(1,21): for i,tp in enumerate(tps5): ws5.cell(row=row,column=1,value=p if i==0 else "").font=fnt(sz=9) inp(ws5,row,2,"",bg=C_REQ if i==0 else C_WHITE) inp(ws5,row,3,tp) for c in range(4,19): bg = "FFF8F0" if row%2==0 else C_WHITE inp(ws5,row,c,bg=bg) ws5.row_dimensions[row].height=13 row+=1 dv_list(ws5,f'"{",".join(tps5)}"',f'C4:C{row-1}') # ═══════════════════════════════════════════════ # SHEET 7 — MICROBIOLOGY + ANTIBIOGRAM # ═══════════════════════════════════════════════ ws6 = wb.create_sheet("6.MICROBIOLOGY") ws6.sheet_properties.tabColor = C_RED set_cols(ws6,[4,14,16,14,18,14,12,12,12,12,12,12,12,12,14,14,14,12]) hdr(ws6,1,1,"MICROBIOLOGY — CULTURE RESULTS & ANTIBIOGRAM",bg=C_RED,sz=12,mc=18,rh=28) hdr(ws6,2,1,"ISOLATE DETAILS",bg=C_RED,fg=C_WHITE,sz=9,mc=7) hdr(ws6,2,8,"ANTIBIOTIC SENSITIVITY (S=Sensitive R=Resistant I=Intermediate)",bg=C_NAVY,fg=C_WHITE,sz=9,mc=14) hdr(ws6,2,15,"RESISTANCE\nPATTERN",bg=C_ORANGE,fg=C_WHITE,sz=9,mc=18) ws6.row_dimensions[2].height=22 sh6=["#","Study ID","Specimen","Culture\nDate","Organism\nIsolated","Gram +/-", "Days to\nPositivity", "Pip-Tazo","Cefepime","Meropenem","Gentamicin","Amikacin","Cotrimox","Vancomycin", "ESBL","CRE","MRSA","MDR\n(Y/N)"] for c,h in enumerate(sh6,1): hdr(ws6,3,c,h,bg=C_RED if c<=7 else (C_NAVY if c<=14 else C_ORANGE),fg=C_WHITE,sz=8,rh=38) for row in range(4,44): ws6.cell(row=row,column=1,value=row-3).font=fnt(sz=9) inp(ws6,row,2,"",bg=C_REQ) for c in range(3,19): inp(ws6,row,c) ws6.row_dimensions[row].height=14 dv_list(ws6,'"Blood-Peripheral,Blood-CVC,Urine,Sputum,BAL,CSF,Wound Swab,Stool,Fungal Culture"','C4:C43') dv_list(ws6,'"Gram Positive,Gram Negative,Fungal,Anaerobe"','F4:F43') for col in ['H','I','J','K','L','M','N']: dv_list(ws6,'"S,R,I,Not tested"',f'{col}4:{col}43') for col in ['O','P','Q']: dv_list(ws6,'"Positive,Negative,Not done"',f'{col}4:{col}43') dv_list(ws6,'"Yes,No"','R4:R43') # ═══════════════════════════════════════════════ # SHEET 8 — GT TRANSFUSION LOG # ═══════════════════════════════════════════════ ws7 = wb.create_sheet("7.GT_TRANSFUSION_LOG") ws7.sheet_properties.tabColor = "00B050" set_cols(ws7,[4,14,8,14,10,12,14,10,12,10,10,12,14,12,14,18,12,12]) hdr(ws7,1,1,"GT TRANSFUSION LOG — BUFFY COAT — GT ARM PATIENTS ONLY",bg=C_GREEN,sz=12,mc=18,rh=28) hdr(ws7,2,1,"GT ARM PATIENTS ONLY — Leave entirely blank for ST arm",bg=C_LGREEN,fg=C_GREEN,sz=10,mc=18,rh=18) hdr(ws7,3,1,"PREP DETAILS",bg=C_GREEN,fg=C_WHITE,sz=9,mc=9) hdr(ws7,3,10,"TRANSFUSION",bg="1E6E42",fg=C_WHITE,sz=9,mc=14) hdr(ws7,3,15,"ADVERSE EVENTS",bg=C_RED,fg=C_WHITE,sz=9,mc=18) ws7.row_dimensions[3].height=18 sh7=["#","Study ID","GT\n#","Prep\nDate","WB Units\nPooled","Final Gran\nCount(×10¹⁰)","Irrad\nDose(Gy)","Time Prep\n→Transfusion(h)","ABO/Rh\nProduct", "Volume\n(mL)","Dose\n(mL/kg)","CMV\nStatus","Cross-match","Pre-med\nGiven", "AE\n(Y/N)","AE\nDescription","Transfusion\nStopped(Y/N)","ANC Post-GT(/mm³)"] for c,h in enumerate(sh7,1): hdr(ws7,4,c,h,bg=C_GREEN if c<=9 else ("1E6E42" if c<=14 else C_RED),fg=C_WHITE,sz=8,rh=38) for row in range(5,55): ws7.cell(row=row,column=1,value=row-4).font=fnt(sz=9) for c in range(2,19): inp(ws7,row,c,bg=C_LGREEN) ws7.row_dimensions[row].height=14 dv_list(ws7,'"1,2,3,4,5"','C5:C54') dv_list(ws7,'"CMV Negative,CMV Positive,Unknown"','L5:L54') dv_list(ws7,'"Compatible,Incompatible,Not done"','M5:M54') for col in ['N','O','Q']: dv_list(ws7,'"Yes,No"',f'{col}5:{col}54') # ═══════════════════════════════════════════════ # SHEET 9 — BUFFY COAT DIAGNOSTIC COMPARISON # ═══════════════════════════════════════════════ ws8 = wb.create_sheet("8.BUFFY_COAT_DIAGNOSTIC") ws8.sheet_properties.tabColor = C_PURPLE set_cols(ws8,[4,14,14,14,22,12,14,16,18,14,16,12]) hdr(ws8,1,1,"BUFFY COAT SMEAR vs BLOOD CULTURE — DIAGNOSTIC COMPARISON — ALL PATIENTS",bg=C_PURPLE,sz=12,mc=12,rh=28) hdr(ws8,2,1,"BUFFY COAT SMEAR FINDINGS",bg=C_PURPLE,fg=C_WHITE,sz=9,mc=7) hdr(ws8,2,8,"BLOOD CULTURE (REFERENCE STANDARD)",bg=C_RED,fg=C_WHITE,sz=9,mc=10) hdr(ws8,2,11,"AUTO-ANALYSIS",bg=C_CALC,fg=C_NAVY,sz=9,mc=12) ws8.row_dimensions[2].height=18 sh8=["#","Study ID","Time Draw→\nSmear Result(h)","Organisms\nSeen (Y/N)","Organism\nType on Smear", "Blast%\non Smear","WBC Diff Matches\nAnalyzer(Y/N)", "Cx Result\n(+/-)","Organism\nIdentified","Days to Cx\nResult", "Concordance\n(Auto)","Time Saved\n(hours, Auto)"] for c,h in enumerate(sh8,1): hdr(ws8,3,c,h,bg=C_PURPLE if c<=7 else (C_RED if c<=10 else C_CALC), fg=C_WHITE if c!=11 else C_NAVY,sz=8,rh=40) for row in range(4,24): ws8.cell(row=row,column=1,value=row-3).font=fnt(sz=9) inp(ws8,row,2,"",bg=C_REQ) for c in range(3,11): inp(ws8,row,c,bg=C_LPURP) # Concordance auto formula(ws8,row,11, f'=IF(OR(D{row}="",H{row}=""),"",IF(AND(D{row}="Yes",H{row}="Positive"),"True Positive",IF(AND(D{row}="No",H{row}="Negative"),"True Negative",IF(AND(D{row}="Yes",H{row}="Negative"),"False Positive","False Negative"))))') ws8.cell(row=row,column=11).font=fnt(bold=True,sz=9,color=C_GREEN) # Time saved auto formula(ws8,row,12, f'=IF(AND(C{row}<>"",J{row}<>""),ROUND(J{row}*24-C{row},1),"")') ws8.cell(row=row,column=12).font=fnt(bold=True,sz=9,color=C_NAVY) ws8.row_dimensions[row].height=15 dv_list(ws8,'"Yes,No"','D4:D23') dv_list(ws8,'"Gram-pos cocci,Gram-neg rods,Gram-neg cocci,Yeast forms,Leishmania amastigotes,Microfilariae,Mixed,None visualized"','E4:E23') dv_list(ws8,'"Yes,No,Not applicable"','G4:G23') dv_list(ws8,'"Positive,Negative,Contaminated,Pending"','H4:H23') # ═══════════════════════════════════════════════ # SHEET 10 — TREATMENT # ═══════════════════════════════════════════════ ws9 = wb.create_sheet("9.TREATMENT") ws9.sheet_properties.tabColor = "00B0F0" set_cols(ws9,[4,14,16,18,14,12,14,16,12,12,14,12,10,10,12,12,12,12]) hdr(ws9,1,1,"TREATMENT — ANTIBIOTICS | ANTIFUNGALS | G-CSF | ICU SUPPORT",bg=C_NAVY,sz=12,mc=18,rh=28) hdr(ws9,2,1,"ANTIBIOTICS",bg=C_NAVY,fg=C_WHITE,sz=9,mc=6) hdr(ws9,2,7,"ANTIFUNGALS",bg=C_GREEN,fg=C_WHITE,sz=9,mc=9) hdr(ws9,2,10,"G-CSF",bg="843C0C",fg=C_WHITE,sz=9,mc=12) hdr(ws9,2,13,"TRANSFUSION SUPPORT",bg=C_BLUE,fg=C_WHITE,sz=9,mc=15) hdr(ws9,2,16,"ICU & ORGAN SUPPORT",bg=C_RED,fg=C_WHITE,sz=9,mc=18) ws9.row_dimensions[2].height=18 sh9=["#","Study ID", "Time Fever→\n1st Abx(min)","Empirical\nRegimen","Abx\nModified(Y/N)","Total Abx\nDuration(d)", "Antifungal\n(Y/N)","Antifungal\nAgent","AF Duration\n(d)", "G-CSF(Y/N)","G-CSF Agent","G-CSF\nDoses", "pRBC\nUnits","Platelets\nUnits","TPN(Y/N)", "ICU(Y/N)","Vasopressor\n(Y/N)","Mech Vent\n(Y/N)"] for c,h in enumerate(sh9,1): bg = C_NAVY if c<=6 else (C_GREEN if c<=9 else ("843C0C" if c<=12 else (C_BLUE if c<=15 else C_RED))) hdr(ws9,3,c,h,bg=bg,fg=C_WHITE,sz=8,rh=38) for row in range(4,24): ws9.cell(row=row,column=1,value=row-3).font=fnt(sz=9) inp(ws9,row,2,"",bg=C_REQ) for c in range(3,19): inp(ws9,row,c) ws9.row_dimensions[row].height=15 dv_list(ws9,'"Pip-Tazobactam,Cefepime,Meropenem,Imipenem,Pip-Tazo+Amikacin,Other"','D4:D23') dv_list(ws9,'"Fluconazole,Voriconazole,Caspofungin,Amphotericin B,Posaconazole"','H4:H23') dv_list(ws9,'"Filgrastim,Pegfilgrastim"','K4:K23') for col in ['E','G','J','O','P','Q','R']: dv_list(ws9,'"Yes,No"',f'{col}4:{col}23') # ═══════════════════════════════════════════════ # SHEET 11 — OUTCOMES # ═══════════════════════════════════════════════ ws10 = wb.create_sheet("10.OUTCOMES") ws10.sheet_properties.tabColor = C_RED set_cols(ws10,[4,14,16,22,14,14,14,14,14,14,14,12,18,18,18]) hdr(ws10,1,1,"PRIMARY & SECONDARY OUTCOMES",bg=C_RED,sz=12,mc=15,rh=28) hdr(ws10,2,1,"PRIMARY",bg=C_RED,fg=C_WHITE,sz=9,mc=4) hdr(ws10,2,5,"SECONDARY — TIME-TO-EVENT",bg="843C0C",fg=C_WHITE,sz=9,mc=12) hdr(ws10,2,13,"COST ANALYSIS (NPR)",bg=C_NAVY,fg=C_WHITE,sz=9,mc=15) ws10.row_dimensions[2].height=18 sh10=["#","Study ID","28-Day\nMortality","Cause of\nDeath (if dead)", "Days to\nANC≥500","ANC Recovery\nDate","Days to\nDefervescence", "Defervescence\nDate","Days to Cx\nClearance","Abx Duration\n(d)", "Hospital Stay\n(d)","ICU Days", "Day-7 Clinical\nResponse","Total Episode\nCost (NPR)","GT Product\nCost (NPR)"] for c,h in enumerate(sh10,1): hdr(ws10,3,c,h,bg=C_RED if c<=4 else ("843C0C" if c<=12 else C_NAVY),fg=C_WHITE,sz=8,rh=40) for row in range(4,24): ws10.cell(row=row,column=1,value=row-3).font=fnt(sz=9) inp(ws10,row,2,"",bg=C_REQ) for c in range(3,13): inp(ws10,row,c) for c in range(13,16): inp(ws10,row,c,bg=C_YELLOW) ws10.row_dimensions[row].height=15 dv_list(ws10,'"Alive,Dead"','C4:C23') dv_list(ws10,'"Septic Shock,Respiratory Failure,MDR Infection,Disease Progression,GT Adverse Event,Unknown,N/A-Alive"','D4:D23') dv_list(ws10,'"Complete Response,Partial Response,No Response,Progressive Disease"','M4:M23') # ═══════════════════════════════════════════════ # SHEET 12 — FOLLOW UP # ═══════════════════════════════════════════════ ws11 = wb.create_sheet("11.FOLLOW_UP") ws11.sheet_properties.tabColor = C_GREEN set_cols(ws11,[4,14,18,12,18,18,12,18,18,12,18,20,18]) hdr(ws11,1,1,"FOLLOW-UP — DAY 30 / 60 / 90",bg=C_GREEN,sz=12,mc=13,rh=28) hdr(ws11,2,3,"DAY 30",bg=C_GREEN,fg=C_WHITE,sz=9,mc=5) hdr(ws11,2,6,"DAY 60",bg="1E6E42",fg=C_WHITE,sz=9,mc=8) hdr(ws11,2,9,"DAY 90",bg=C_GREEN,fg=C_WHITE,sz=9,mc=11) hdr(ws11,2,12,"DISEASE STATUS D90",bg="843C0C",fg=C_WHITE,sz=9) hdr(ws11,2,13,"POST-GT HLA Ab",bg=C_PURPLE,fg=C_WHITE,sz=9) ws11.row_dimensions[2].height=22 sh11=["#","Study ID", "D30 Status","D30 Date","Reason if Dead", "D60 Status","D60 Date","Reason if Dead", "D90 Status","D90 Date","Reason if Dead", "Disease Status D90","HLA Ab (Post-GT)"] for c,h in enumerate(sh11,1): bg = C_GREEN if c in [3,4,5] else ("1E6E42" if c in [6,7,8] else (C_GREEN if c in [9,10,11] else ("843C0C" if c==12 else C_PURPLE))) hdr(ws11,3,c,h,bg=bg if c>2 else C_BLUE,fg=C_WHITE,sz=9,rh=32) for row in range(4,24): ws11.cell(row=row,column=1,value=row-3).font=fnt(sz=9) inp(ws11,row,2,"",bg=C_REQ) for c in range(3,14): inp(ws11,row,c,bg=C_LGREEN) ws11.row_dimensions[row].height=15 for col in ['C','F','I']: dv_list(ws11,'"Alive,Dead,Lost to Follow-Up"',f'{col}4:{col}23') dv_list(ws11,'"Complete Remission,Partial Remission,Stable Disease,Progression,Relapse,Not assessed"','L4:L23') dv_list(ws11,'"Positive,Negative,Not done"','M4:M23') # ═══════════════════════════════════════════════ # SHEET 13 — DASHBOARD # ═══════════════════════════════════════════════ ws12 = wb.create_sheet("12.DASHBOARD") ws12.sheet_properties.tabColor = "FF9900" ws12.column_dimensions["A"].width = 38 ws12.column_dimensions["B"].width = 16 ws12.column_dimensions["C"].width = 16 ws12.column_dimensions["D"].width = 16 ws12.column_dimensions["E"].width = 28 hdr(ws12,1,1,"RESEARCH DASHBOARD — LIVE AUTO-SUMMARY",bg="FF9900",fg=C_NAVY,sz=14,mc=5,rh=32) hdr(ws12,2,1,"METRIC",bg=C_NAVY,fg=C_WHITE,sz=10) hdr(ws12,2,2,"GT ARM",bg=C_GREEN,fg=C_WHITE,sz=10) hdr(ws12,2,3,"ST ARM",bg="843C0C",fg=C_WHITE,sz=10) hdr(ws12,2,4,"TOTAL",bg=C_NAVY,fg=C_WHITE,sz=10) hdr(ws12,2,5,"NOTES",bg=C_LBLUE,fg=C_NAVY,sz=10) ws12.row_dimensions[2].height=22 dashboard=[ ("Total patients enrolled", '=COUNTIF(\'1.DEMOGRAPHICS\'!D3:D22,"GT")', '=COUNTIF(\'1.DEMOGRAPHICS\'!D3:D22,"ST")', '=B3+C3', "Target: 60-80 total"), ("28-day mortality (PRIMARY OUTCOME)", '=COUNTIFS(\'10.OUTCOMES\'!C4:C23,"Dead",\'1.DEMOGRAPHICS\'!D3:D22,"GT")', '=COUNTIFS(\'10.OUTCOMES\'!C4:C23,"Dead",\'1.DEMOGRAPHICS\'!D3:D22,"ST")', '=B4+C4', "*** KEY OUTCOME ***"), ("28-day mortality rate (%)", '=IF(B3>0,ROUND(B4/B3*100,1),"—")', '=IF(C3>0,ROUND(C4/C3*100,1),"—")', '=IF(D3>0,ROUND(D4/D3*100,1),"—")', "Compare GT vs ST"), ("Bacteremia (positive blood culture) n", '=COUNTIFS(\'6.MICROBIOLOGY\'!H4:H43,"Positive",\'6.MICROBIOLOGY\'!C4:C43,"Blood-Peripheral")', "","","Divide by arm if needed"), ("MDR organisms n", '=COUNTIF(\'6.MICROBIOLOGY\'!R4:R43,"Yes")', "","","Key for Nepal AMR data"), ("Mean days to ANC recovery (GT arm)","=AVERAGEIFS('10.OUTCOMES'!E4:E23,'1.DEMOGRAPHICS'!D3:D22,\"GT\")","","","Secondary outcome"), ("Mean days to ANC recovery (ST arm)","","=AVERAGEIFS('10.OUTCOMES'!E4:E23,'1.DEMOGRAPHICS'!D3:D22,\"ST\")","",""), ("Mean days to defervescence (GT)","=AVERAGEIFS('10.OUTCOMES'!G4:G23,'1.DEMOGRAPHICS'!D3:D22,\"GT\")","","",""), ("Mean days to defervescence (ST)","","=AVERAGEIFS('10.OUTCOMES'!G4:G23,'1.DEMOGRAPHICS'!D3:D22,\"ST\")","",""), ("Mean hospital stay (GT arm days)","=AVERAGEIFS('10.OUTCOMES'!K4:K23,'1.DEMOGRAPHICS'!D3:D22,\"GT\")","","",""), ("Mean hospital stay (ST arm days)","","=AVERAGEIFS('10.OUTCOMES'!K4:K23,'1.DEMOGRAPHICS'!D3:D22,\"ST\")","",""), ("ICU admissions n","","","","From Treatment sheet"), ("True positive buffy coat smear n","=COUNTIF('8.BUFFY_COAT_DIAGNOSTIC'!K4:K23,\"True Positive\")","","","Diagnostic value"), ("True negative smear n","=COUNTIF('8.BUFFY_COAT_DIAGNOSTIC'!K4:K23,\"True Negative\")","","",""), ("Mean time saved vs culture (h)","=IFERROR(AVERAGE('8.BUFFY_COAT_DIAGNOSTIC'!L4:L23),\"—\")","","",""), ("Mean GT product cost (NPR)","=IFERROR(AVERAGE('10.OUTCOMES'!O4:O23),\"—\")","","","vs ~35000-40000 for apheresis"), ("Mean total episode cost (NPR)","=IFERROR(AVERAGEIFS('10.OUTCOMES'!N4:N23,'1.DEMOGRAPHICS'!D3:D22,\"GT\"),\"—\")", "=IFERROR(AVERAGEIFS('10.OUTCOMES'!N4:N23,'1.DEMOGRAPHICS'!D3:D22,\"ST\"),\"—\")","","Cost-effectiveness"), ("90-day survival (GT arm %)", '=IFERROR(ROUND(COUNTIFS(\'11.FOLLOW_UP\'!I4:I23,"Alive",\'1.DEMOGRAPHICS\'!D3:D22,"GT")/COUNTIF(\'1.DEMOGRAPHICS\'!D3:D22,"GT")*100,1),"—")', '=IFERROR(ROUND(COUNTIFS(\'11.FOLLOW_UP\'!I4:I23,"Alive",\'1.DEMOGRAPHICS\'!D3:D22,"ST")/COUNTIF(\'1.DEMOGRAPHICS\'!D3:D22,"ST")*100,1),"—")', "",""), ] for i,(label,gt,st,tot,note) in enumerate(dashboard): r=3+i ws12.cell(row=r,column=1,value=label) ws12.cell(row=r,column=1).font=fnt(bold=(i in [0,1,2]),sz=10,color=C_NAVY) ws12.cell(row=r,column=1).fill=fill(C_LBLUE if i%2==0 else C_WHITE) for c,v,bg in [(2,gt,C_LGREEN),(3,st,"FFF2CC"),(4,tot,C_CALC),(5,note,C_WHITE)]: ws12.cell(row=r,column=c,value=v) ws12.cell(row=r,column=c).fill=fill(bg) ws12.cell(row=r,column=c).font=fnt(sz=10,bold=(i in [1,2]),color=C_RED if i==1 else (C_GREEN if c==2 else "843C0C" if c==3 else C_NAVY)) ws12.cell(row=r,column=c).border=thin() ws12.cell(row=r,column=c).alignment=aln() ws12.cell(row=r,column=1).border=thin() ws12.row_dimensions[r].height=18 # ═══════════════════════════════════════════════ # SHEET 14 — CODEBOOK # ═══════════════════════════════════════════════ ws13 = wb.create_sheet("13.CODEBOOK") ws13.sheet_properties.tabColor = "808080" set_cols(ws13,[4,25,16,40,22,16]) hdr(ws13,1,1,"CODEBOOK — VARIABLE DEFINITIONS, NORMAL RANGES & CODING GUIDE",bg="595959",sz=12,mc=6,rh=28) for c,h in enumerate(["#","Variable","Data Type","Definition / Normal Range","Code Values","Sheet"],1): hdr(ws13,2,c,h,bg="595959",fg=C_WHITE,sz=10,rh=22) codebook=[ ("FN Definition","Clinical","Fever ≥38.3°C once OR ≥38°C >1h + ANC <500/mm³","As defined","3.FN_EPISODE"), ("ANC","Numeric /mm³","WBC × (Neutrophil%+Band%)/100 | Normal 1500-8000","<1000=neutropenia; <500=severe; <100=profound","4.LAB_CBC"), ("MASCC Score","Score 0-26","Multinational Assoc Supportive Care Cancer score","≥21=Low Risk; <21=HIGH RISK (hospitalize)","3.FN_EPISODE"), ("PCT (Procalcitonin)","Numeric ng/mL","Bacteremia marker (Shilpakar Nepal 2019)","<0.5=unlikely bact; 0.5-2=possible; >2=likely","5.LAB_BIOCHEM"), ("Galactomannan","Index","Aspergillus antigen","Index >0.5=positive; >1.0=strongly positive","5.LAB_BIOCHEM"), ("Beta-D-Glucan","Numeric pg/mL","Broad fungal marker (not Cryptococcus/Mucor)","<80=negative; >80=positive; >200=strongly positive","5.LAB_BIOCHEM"), ("ESBL","Categorical","Extended-Spectrum Beta-Lactamase","Positive/Negative/Not done","6.MICROBIOLOGY"), ("CRE","Categorical","Carbapenem-Resistant Enterobacteriaceae","Positive/Negative/Not done","6.MICROBIOLOGY"), ("MDR","Binary","Multi-Drug Resistant: resistant to ≥3 antibiotic classes","Yes/No","6.MICROBIOLOGY"), ("DTP","Minutes","Differential Time to Positivity (CLABSI indicator)","CVC positive ≥120 min before peripheral = CLABSI","6.MICROBIOLOGY"), ("GT Dose","mL/kg","Buffy coat granulocyte transfusion dose per infusion","Target 10 mL/kg per transfusion; ≥1×10¹⁰ cells","7.GT_TRANSFUSION"), ("TRALI","Clinical","Transfusion-Related Acute Lung Injury","New hypoxia + bilateral CXR infiltrates within 6h of transfusion","7.GT_TRANSFUSION"), ("Concordance","Auto","Buffy coat smear vs blood culture agreement","True Pos / True Neg / False Pos / False Neg","8.BUFFY_COAT"), ("28-day mortality","Binary","Death from any cause ≤28 days of FN onset","Alive / Dead — PRIMARY OUTCOME","10.OUTCOMES"), ("ANC Recovery","Days","Days from FN onset to ANC ≥500 for 2 consecutive days","Numeric — SECONDARY OUTCOME","10.OUTCOMES"), ("Defervescence","Days","Days from FN onset to afebrile >24h without antipyretics","Numeric — SECONDARY OUTCOME","10.OUTCOMES"), ("ELN 2022 Risk","Category","European LeukemiaNet AML risk stratification","Favorable/Intermediate/Adverse","2.MALIGNANCY"), ("ECOG PS","Score 0-4","Performance Status","0=Normal; 1=Ambulatory; 2=<50% bed; 3=>50% bed; 4=Bedbound","1.DEMOGRAPHICS"), ("HLH Screen","Panel","Hemophagocytic Lymphohistiocytosis","Ferritin>10000+Triglyc elevated+Fibrinogen low+D-dimer high","5.LAB_BIOCHEM"), ("Mucositis","WHO 0-4","WHO Mucositis Scale","0=None; 1=Soreness; 2=Erythema+ulcers; 3=Ulcers-liquid diet only; 4=No alimentation","3.FN_EPISODE"), ("Sepsis-3","Clinical","Sepsis=SOFA increase ≥2 + suspected infection","Septic Shock=vasopressor needed + lactate >2 mmol/L","3.FN_EPISODE"), ("BMI","Auto-calc","Body Mass Index — auto from height/weight","Normal 18.5-24.9; Underweight <18.5 (common in Nepal patients)","1.DEMOGRAPHICS"), ("Clinical Response D7","Category","Response at Day 7 of treatment","CR=Afebrile+ANC recovering; PR=one criterion; NR=neither; PD=worsening","10.OUTCOMES"), ("DM Degree Level","Context","This is a DM (Doctorate of Medicine) thesis — higher evidence standard required","RCT design; CONSORT reporting; CTRI registration","All sheets"), ("ASH Submission","Target","Blood Advances (IF 7.7) — Category: Phagocytes/Granulocytes/Myelopoiesis","Max 4500 words; 250-word abstract; numbered NLM refs; CONSORT diagram","N/A"), ] for i,(v,dt,defn,code,sh) in enumerate(codebook): r=3+i ws13.cell(row=r,column=1,value=i+1).font=fnt(sz=9) ws13.cell(row=r,column=2,value=v).font=fnt(bold=True,sz=9,color=C_NAVY) ws13.cell(row=r,column=3,value=dt).font=fnt(sz=9) ws13.cell(row=r,column=4,value=defn).font=fnt(sz=9) ws13.cell(row=r,column=4).alignment=aln(h="left",wrap=True) ws13.cell(row=r,column=5,value=code).font=fnt(sz=9,color=C_RED) ws13.cell(row=r,column=6,value=sh).font=fnt(sz=9,color=C_BLUE) bg = C_LBLUE if i%2==0 else C_WHITE for c in range(1,7): ws13.cell(row=r,column=c).fill=fill(bg) ws13.cell(row=r,column=c).border=thin() ws13.row_dimensions[r].height=18 # Save output="/home/daytona/fn-thesis/FN_HematMalig_DataEntry_CSH.xlsx" wb.save(output) print("SUCCESS:", output) PYEOF
ls -lh /home/daytona/fn-thesis/
FN HematMalig DataEntry CSH
Spreadsheet · XLSX
| Sheet | Purpose |
|---|---|
| INSTRUCTIONS | Colour legend, rules, sheet guide |
| 1. DEMOGRAPHICS | Age, sex, BMI (auto), ECOG, income, referral |
| 2. MALIGNANCY_CHEMO | Diagnosis, ELN risk, regimen, disease status |
| 3. FN_EPISODE + MASCC | MASCC score auto-calculated from 6 components |
| 4. LAB_CBC_DAILY | 1 row per day per patient - 15 timepoints available |
| 5. LAB_BIOCHEM_MARKERS | Creatinine, LFT, LDH, PCT, CRP, Ferritin, Galactomannan |
| 6. MICROBIOLOGY | 40 rows, full antibiogram (S/R/I), ESBL/CRE/MDR dropdowns |
| 7. GT_TRANSFUSION_LOG | GT arm only - prep details, granulocyte count, irradiation, AEs |
| 8. BUFFY_COAT_DIAGNOSTIC | Auto-calculates True Positive/Negative AND hours saved vs blood culture |
| 9. TREATMENT | Antibiotics, antifungals, G-CSF, ICU, vasopressors |
| 10. OUTCOMES | 28-day mortality (primary), ANC recovery days, costs in NPR |
| 11. FOLLOW_UP | Day 30/60/90 survival, disease status, HLA alloimmunization |
| 12. DASHBOARD | Auto-pulls key numbers from all sheets - GT vs ST comparison at a glance |
| 13. CODEBOOK | Every variable defined with normal ranges and coding guide |