50 year old woman with diabtetes on meds viliga -M also on levothyroxine 75 mcg hasfamily history of diabetes in father and father passed away due to lung cancer and mother has rheumatoid arthritis patient has long standing history or
Long standing history of varicose veins and now her lower legs on the back inner and oiter side have turned pigmented has constant itchying urge also feels numbing on sitting crosslegged and then getting up after 20-30 mins has also had dry cough since 2 weeks what all do you think this woman need to undergo checking for as part or screening routine and spefcific tobher
| Test | Reason |
|---|---|
| Duplex Venous Ultrasound (bilateral lower limb) | Gold standard - maps superficial and deep venous reflux, identifies incompetent perforators, rules out DVT |
| ABI (Ankle-Brachial Index) | Must rule out arterial disease before compression therapy, especially in diabetics |
| Skin biopsy (if diagnosis uncertain) | Rule out contact dermatitis, vasculitis, or diabetic dermopathy |
| D-Dimer + Doppler | If acute DVT component cannot be excluded |
| Test | Reason |
|---|---|
| 10-g monofilament test (Semmes-Weinstein) | Detects LOPS - mandatory annual test |
| 128 Hz tuning fork at base of great toe | Vibration sensation screening |
| Ankle reflexes | Reduced/absent in peripheral neuropathy |
| Nerve Conduction Studies (NCS) / EMG | If clinical examination is ambiguous - quantifies neuropathy |
| HbA1c | Glycemic control drives neuropathy progression |
| Pinprick sensation testing | Small fiber neuropathy |
| Orthostatic blood pressure | Autonomic neuropathy - screen at diagnosis of T2DM |
| Test | Frequency | Reason |
|---|---|---|
| HbA1c | Every 3-6 months | Glycemic control target |
| Fasting glucose / SMBG log | Ongoing | Day-to-day monitoring |
| Urine Albumin-to-Creatinine Ratio (UACR) | Annual | Early diabetic nephropathy |
| Serum Creatinine + eGFR | Annual | Renal function; also required for metformin dosing |
| Lipid profile (LDL, HDL, TG, Total Chol) | Annual | Cardiovascular risk - high in diabetics |
| Retinal examination (fundoscopy/slit lamp) | Annual | Diabetic retinopathy |
| Foot examination | Annual (every visit ideally) | Ulcer risk, LOPS |
| Blood pressure | Every visit | Target <130/80 in diabetics |
| ECG | Annual (or as indicated) | Silent ischemia common in diabetic women |
| Dental exam | Biannual | Periodontal disease more frequent in DM |
| Test | Reason |
|---|---|
| Chest X-ray | First-line for cough + lung cancer family history |
| Low-dose CT chest (LDCT) | If smoking history ≥10 pack-years or clinical suspicion |
| TSH + Free T4 | Check levothyroxine adequacy; hypothyroidism can cause dry cough/hoarseness |
| Spirometry / PFTs | Rule out obstructive/restrictive lung disease |
| Review Vildagliptin | If cough began after medication start/dose change - consider switch to SGLT2i or GLP-1 agonist |
| GERD workup | Diabetic gastroparesis predisposes to GERD-induced cough |
| ENT referral | If UACS (upper airway cough syndrome) or postnasal drip |
| Test | Frequency |
|---|---|
| TSH | Every 6-12 months once stable |
| Free T4 | If TSH is abnormal |
| Anti-TPO antibodies | If not previously done (confirms Hashimoto's etiology) |
| Thyroid ultrasound | If goiter or nodule detected |
| Test | Reason |
|---|---|
| Rheumatoid Factor (RF) + Anti-CCP antibodies | Early RA screening - most specific marker |
| ANA (Antinuclear Antibody) | Screening for broader autoimmune disease (SLE, Sjogren's) |
| ESR + CRP | Systemic inflammation marker |
| Schirmer's test / dry eye and dry mouth symptoms | Rule out Sjogren's syndrome (commonly comorbid with Hashimoto's + RA family history) |
| Screening | Recommendation |
|---|---|
| Mammography | Annual or biennial from age 40-50 (varies by guideline) |
| Pap smear + HPV co-test | Every 5 years (if previous normal) |
| Colonoscopy | From age 45 (ACS) - due for first if never done |
| Low-dose CT chest | If smoking history - father's lung cancer adds context |
| DEXA scan (bone density) | Perimenopausal women with hypothyroidism (levothyroxine at supraphysiologic dose suppresses bone density) |
| Test | Reason |
|---|---|
| Fasting lipid profile | Dyslipidemia in DM + hypothyroidism |
| ECG | Baseline; silent ischemia |
| ECHO or stress test | If chest symptoms or multiple risk factors |
| Carotid intima-media thickness (CIMT) or coronary calcium score | 10-year cardiovascular risk stratification in high-risk women |
| Framingham / ASCVD risk score calculation | Guides statin initiation |
Clinical note: This patient has overlapping metabolic, venous, autoimmune, and medication-related issues. A methodical systems review with the above panel will avoid missing any of the key diagnoses.
Create a tracking table for annual diabetes screening dates 42/43 maybe for autoimmune itself father didnt have smoking history nor does she early menarche early menopause
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"
Diagnosed with thyroiditis when she was taking diabtets meds from her diabetologist diabetes screening dates 42/43 maybe for autoimmune itself father didnt have smoking history nor does she early menarche early menopause
mkdir -p /home/daytona/workspace/patient-tracker && ls /home/daytona/workspace/patient-tracker/
~/patient-tracker/build_tracker.py
import openpyxl
from openpyxl.styles import (
Font, PatternFill, Alignment, Border, Side, GradientFill
)
from openpyxl.utils import get_column_letter
from openpyxl.styles.numbers import FORMAT_DATE_DDMMYY
from datetime import date
wb = openpyxl.Workbook()
# ── colour palette ──────────────────────────────────────────────────────────
C_HEADER_DARK = "1F3864" # deep navy
C_HEADER_MID = "2E75B6" # mid blue
C_SECTION_DM = "D6E4F0" # light blue – Diabetes
C_SECTION_TH = "E8F5E9" # light green – Thyroid / Autoimmune
C_SECTION_VEN = "FFF3E0" # light amber – Venous / Vascular
C_SECTION_GYN = "FCE4EC" # light pink – Gynaecology / Hormonal
C_SECTION_CAN = "F3E5F5" # light lavender – Cancer screening
C_SECTION_CV = "FFEBEE" # light red – Cardiovascular
C_SECTION_MED = "E8EAF6" # light indigo – Medication review
C_WHITE = "FFFFFF"
C_DONE = "C8E6C9" # tick-green
C_DUE = "FFF9C4" # amber-yellow
C_OVERDUE = "FFCDD2" # soft red
C_TEXT_DARK = "1A1A2E"
C_ACCENT = "FF6F00" # orange for alerts
def mk_fill(hex_col):
return PatternFill("solid", fgColor=hex_col)
def mk_font(bold=False, size=10, color=C_TEXT_DARK, italic=False):
return Font(name="Arial", bold=bold, size=size, color=color, italic=italic)
def mk_border(style="thin"):
s = Side(style=style, color="BDBDBD")
return Border(left=s, right=s, top=s, bottom=s)
def mk_align(h="center", v="center", wrap=True):
return Alignment(horizontal=h, vertical=v, wrap_text=wrap)
# ═══════════════════════════════════════════════════════════════════════════
# SHEET 1 – PATIENT SUMMARY
# ═══════════════════════════════════════════════════════════════════════════
ws_sum = wb.active
ws_sum.title = "Patient Summary"
ws_sum.sheet_view.showGridLines = False
# Title banner
ws_sum.merge_cells("A1:H1")
ws_sum["A1"] = "PATIENT HEALTH TRACKING RECORD"
ws_sum["A1"].font = mk_font(bold=True, size=16, color=C_WHITE)
ws_sum["A1"].fill = mk_fill(C_HEADER_DARK)
ws_sum["A1"].alignment = mk_align()
ws_sum.merge_cells("A2:H2")
ws_sum["A2"] = "Confidential – Clinical Screening & Follow-up Tracker"
ws_sum["A2"].font = mk_font(italic=True, size=10, color="BDBDBD")
ws_sum["A2"].fill = mk_fill(C_HEADER_DARK)
ws_sum["A2"].alignment = mk_align()
ws_sum.row_dimensions[1].height = 30
ws_sum.row_dimensions[2].height = 18
# ── Profile block ────────────────────────────────────────────────────────
profile = [
("Age", "50 years"),
("Sex", "Female"),
("Diabetes Dx", "Type 2 DM – approx age 42-43"),
("Thyroid Dx", "Autoimmune Thyroiditis (Hashimoto's) – diagnosed ~age 42-43 during DM workup"),
("Current Meds", "Vildagliptin-M (Vildagliptin + Metformin) | Levothyroxine 75 mcg"),
("Menstrual Hx", "Early Menarche | Early Menopause (~50 or before) – prolonged estrogen window THEN abrupt loss"),
("Family Hx", "Father: Type 2 DM (no smoking) | Mother: Rheumatoid Arthritis"),
("Venous Hx", "Long-standing Varicose Veins → CVI with hemosiderin pigmentation & stasis dermatitis"),
("Current Complaint", "Leg pigmentation (inner/outer/posterior), itching, positional numbness, dry cough 2 weeks"),
]
ws_sum.merge_cells("A4:B4")
ws_sum["A4"] = "PATIENT PROFILE"
ws_sum["A4"].font = mk_font(bold=True, size=11, color=C_WHITE)
ws_sum["A4"].fill = mk_fill(C_HEADER_MID)
ws_sum["A4"].alignment = mk_align()
ws_sum.merge_cells("C4:H4")
ws_sum["C4"] = ""
ws_sum["C4"].fill = mk_fill(C_HEADER_MID)
for i, (label, value) in enumerate(profile, start=5):
r = i
ws_sum[f"A{r}"] = label
ws_sum[f"A{r}"].font = mk_font(bold=True, size=10)
ws_sum[f"A{r}"].fill = mk_fill("EBF5FB")
ws_sum[f"A{r}"].alignment = mk_align(h="left")
ws_sum[f"A{r}"].border = mk_border()
ws_sum.merge_cells(f"B{r}:H{r}")
ws_sum[f"B{r}"] = value
ws_sum[f"B{r}"].font = mk_font(size=10)
ws_sum[f"B{r}"].fill = mk_fill(C_WHITE)
ws_sum[f"B{r}"].alignment = mk_align(h="left")
ws_sum[f"B{r}"].border = mk_border()
ws_sum.row_dimensions[r].height = 28
# Key risk flags
flag_row = len(profile) + 6
ws_sum.merge_cells(f"A{flag_row}:H{flag_row}")
ws_sum[f"A{flag_row}"] = "⚠ KEY RISK FLAGS FOR THIS PATIENT"
ws_sum[f"A{flag_row}"].font = mk_font(bold=True, size=11, color=C_WHITE)
ws_sum[f"A{flag_row}"].fill = mk_fill(C_ACCENT)
ws_sum[f"A{flag_row}"].alignment = mk_align()
ws_sum.row_dimensions[flag_row].height = 22
flags = [
("1", "BREAST CANCER RISK ELEVATED",
"Early menarche + early menopause = prolonged estrogen exposure window. Park's Preventive Medicine: '40+ years menstruation doubles breast cancer risk.' Annual mammography mandatory."),
("2", "OVARIAN / ENDOMETRIAL CANCER RISK",
"Early menarche is a risk factor for ovarian cancer (Schwartz Surgery). Early menopause adds pelvic atrophy. Pelvic ultrasound + CA-125 baseline warranted."),
("3", "CARDIOVASCULAR RISK – EARLY MENOPAUSE",
"Harrison's 22E: early menopause associated with 1.5x CVD/stroke risk. Combined with DM + autoimmune disease = high cardiac risk. Statin therapy + ECG + ECHO review."),
("4", "AUTOIMMUNE CLUSTER RISK",
"Hashimoto's thyroiditis confirmed + mother with RA = autoimmune diathesis. Screen for RA (Anti-CCP), Sjogren's (ANA, Schirmer's), Celiac (anti-tTG IgA), Vitiligo, Pernicious anaemia."),
("5", "DRY COUGH – VILDAGLIPTIN OR THYROID",
"DPP-4 inhibitors cause cough via bradykinin pathway. Also check levothyroxine adequacy (TSH). Father had lung cancer (non-smoker) – LDCT chest if suspicious."),
("6", "DIABETIC NEUROPATHY vs POSITIONAL COMPRESSION",
"Numbness on cross-legged sitting may be early LOPS from DPN OR peroneal entrapment (worsened in diabetics). Monofilament + NCS mandatory."),
("7", "OSTEOPOROSIS RISK – EARLY MENOPAUSE + LEVOTHYROXINE",
"Early menopause = estrogen withdrawal → bone loss. Levothyroxine at suppressive doses further accelerates bone loss. DEXA scan urgently required."),
]
for row_off, (num, title, detail) in enumerate(flags, start=flag_row+1):
r = row_off
ws_sum[f"A{r}"] = num
ws_sum[f"A{r}"].font = mk_font(bold=True, size=10, color=C_WHITE)
ws_sum[f"A{r}"].fill = mk_fill("E53935")
ws_sum[f"A{r}"].alignment = mk_align()
ws_sum[f"A{r}"].border = mk_border()
ws_sum[f"B{r}"] = title
ws_sum[f"B{r}"].font = mk_font(bold=True, size=10)
ws_sum[f"B{r}"].fill = mk_fill("FFEBEE")
ws_sum[f"B{r}"].alignment = mk_align(h="left")
ws_sum[f"B{r}"].border = mk_border()
ws_sum.merge_cells(f"C{r}:H{r}")
ws_sum[f"C{r}"] = detail
ws_sum[f"C{r}"].font = mk_font(size=9, italic=True)
ws_sum[f"C{r}"].fill = mk_fill(C_WHITE)
ws_sum[f"C{r}"].alignment = mk_align(h="left")
ws_sum[f"C{r}"].border = mk_border()
ws_sum.row_dimensions[r].height = 42
# Column widths
ws_sum.column_dimensions["A"].width = 6
ws_sum.column_dimensions["B"].width = 28
for col in ["C","D","E","F","G","H"]:
ws_sum.column_dimensions[col].width = 18
# ═══════════════════════════════════════════════════════════════════════════
# SHEET 2 – ANNUAL SCREENING TRACKER
# ═══════════════════════════════════════════════════════════════════════════
ws = wb.create_sheet("Annual Screening Tracker")
ws.sheet_view.showGridLines = False
# Title
ws.merge_cells("A1:L1")
ws["A1"] = "ANNUAL DIABETES & MULTISYSTEM SCREENING TRACKER"
ws["A1"].font = mk_font(bold=True, size=14, color=C_WHITE)
ws["A1"].fill = mk_fill(C_HEADER_DARK)
ws["A1"].alignment = mk_align()
ws.row_dimensions[1].height = 28
ws.merge_cells("A2:L2")
ws["A2"] = "Patient: 50F | T2DM (dx ~42-43) | Hashimoto's Thyroiditis | Varicose Veins / CVI | Early Menarche & Early Menopause | Mother: RA"
ws["A2"].font = mk_font(italic=True, size=9, color="CCCCCC")
ws["A2"].fill = mk_fill(C_HEADER_DARK)
ws["A2"].alignment = mk_align()
ws.row_dimensions[2].height = 16
# Column headers
headers = [
"Category", "Investigation / Screening", "Why Specific to This Patient",
"Frequency", "Last Done (Date)", "Next Due (Date)",
"Result / Value", "Normal Range / Target", "Action Required",
"Done By", "Priority", "Notes"
]
ws.row_dimensions[4].height = 36
for col_i, h in enumerate(headers, start=1):
cell = ws.cell(row=4, column=col_i, value=h)
cell.font = mk_font(bold=True, size=10, color=C_WHITE)
cell.fill = mk_fill(C_HEADER_MID)
cell.alignment = mk_align()
cell.border = mk_border()
# ── Data rows ──────────────────────────────────────────────────────────────
# Format: (category, test, why, freq, last, next, result, normal, action, done_by, priority, notes, section_color)
rows = [
# ── DIABETES MONITORING ────────────────────────────────────────────────
("DIABETES\nMONITORING", "HbA1c", "T2DM on Vildagliptin-M; primary glycaemic control marker", "Every 3 months", "", "", "", "< 7.0% (53 mmol/mol)", "Adjust Vildagliptin-M if above target", "Diabetologist", "URGENT", "Dx ~age 42-43; now 50 → ~7-8 yrs of DM", C_SECTION_DM),
("DIABETES\nMONITORING", "Fasting Blood Glucose", "Daily monitoring; detect hypo/hyperglycaemia episodes", "Every visit / at home daily", "", "", "", "70-130 mg/dL (fasting)", "Review medication if persistently high", "Self / GP", "HIGH", "", C_SECTION_DM),
("DIABETES\nMONITORING", "Urine Albumin:Creatinine Ratio (UACR)", "Earliest marker of diabetic nephropathy; 7-8 yrs DM = prime onset window", "Annual", "", "", "", "< 30 mg/g", "Refer nephrology if > 300 (macroalbuminuria)", "GP / Diabetologist", "URGENT", "Metformin requires eGFR check before continuing", C_SECTION_DM),
("DIABETES\nMONITORING", "Serum Creatinine + eGFR", "Metformin must be dose-adjusted/stopped if eGFR < 45", "Annual", "", "", "", "eGFR > 60 mL/min/1.73m²", "Stop metformin if eGFR < 30", "GP", "URGENT", "", C_SECTION_DM),
("DIABETES\nMONITORING", "Lipid Profile (LDL, HDL, TG, Total)", "DM + autoimmune + early menopause = very high CVD risk; statin likely indicated", "Annual", "", "", "", "LDL < 70 mg/dL (high-risk target)", "Initiate/optimise statin; Metformin helps TG", "GP / Cardiologist", "HIGH", "Menopause worsens lipid profile independently", C_SECTION_DM),
("DIABETES\nMONITORING", "Retinal Examination (Fundoscopy)", "Diabetic retinopathy risk; 7-8 yrs DM", "Annual", "", "", "", "No retinopathy", "Ophthalmology referral if any changes", "Ophthalmologist", "HIGH", "Hypothyroidism can also cause ocular changes", C_SECTION_DM),
("DIABETES\nMONITORING", "Foot Examination (Monofilament 10g + 128Hz tuning fork + ankle reflexes)", "Diabetic peripheral neuropathy; also explains positional numbness", "Every visit (formal annual)", "", "", "", "Intact sensation; no LOPS", "Refer podiatry; Nerve Conduction Study if LOPS", "GP / Diabetologist", "URGENT", "Varicose veins + DM = compound foot ulcer risk", C_SECTION_DM),
("DIABETES\nMONITORING", "Orthostatic Blood Pressure", "Autonomic neuropathy screening; ADA recommends at T2DM diagnosis", "Annual", "", "", "", "< 20 mmHg systolic drop on standing", "Refer if symptomatic orthostatic hypotension", "GP", "MODERATE", "", C_SECTION_DM),
("DIABETES\nMONITORING", "Dental Examination", "Periodontal disease more frequent and severe in DM", "Every 6 months", "", "", "", "No periodontitis", "Refer dentist; improved glycaemia helps gums", "Dentist", "MODERATE", "", C_SECTION_DM),
# ── THYROID / AUTOIMMUNE ───────────────────────────────────────────────
("THYROID &\nAUTOIMMUNE", "TSH (Thyroid Stimulating Hormone)", "On Levothyroxine 75 mcg; Hashimoto's diagnosed during DM workup ~42-43", "Every 6 months", "", "", "", "0.5 – 4.0 mIU/L (aim 1-2.5 in treated)", "Adjust levothyroxine dose; over-treatment causes AF + bone loss", "Endocrinologist / GP", "URGENT", "TSH also explains dry cough if undertreated", C_SECTION_TH),
("THYROID &\nAUTOIMMUNE", "Free T4 (FT4)", "Confirm levothyroxine adequacy", "With TSH or if symptoms", "", "", "", "12–22 pmol/L", "Dose adjust; refer endocrinology", "GP", "HIGH", "", C_SECTION_TH),
("THYROID &\nAUTOIMMUNE", "Anti-TPO Antibodies", "Confirms Hashimoto's; titre correlates with activity", "Once (if not done); repeat every 2 yrs", "", "", "", "< 35 IU/mL", "High titres = active autoimmune disease", "Endocrinologist", "HIGH", "Mother has RA → autoimmune diathesis confirmed", C_SECTION_TH),
("THYROID &\nAUTOIMMUNE", "Anti-Thyroglobulin (Anti-Tg) Antibodies", "Hashimoto's can be seronegative for TPO but positive for Tg", "Once", "", "", "", "< 40 IU/mL", "", "Endocrinologist", "MODERATE", "", C_SECTION_TH),
("THYROID &\nAUTOIMMUNE", "Thyroid Ultrasound", "Hashimoto's → nodule surveillance; rule out malignant transformation", "Annual", "", "", "", "No nodule > 1 cm or suspicious echogenicity", "Fine needle aspiration if TIRADS 4/5", "Endocrinologist / Radiologist", "HIGH", "", C_SECTION_TH),
("THYROID &\nAUTOIMMUNE", "Rheumatoid Factor (RF) + Anti-CCP", "Mother has RA; autoimmune clustering; Anti-CCP is most specific", "Annual", "", "", "", "RF < 14 IU/mL; Anti-CCP negative", "Refer rheumatology if positive", "Rheumatologist / GP", "HIGH", "RA + DM + Hypothyroid = triple autoimmune risk", C_SECTION_TH),
("THYROID &\nAUTOIMMUNE", "ANA (Antinuclear Antibody)", "Screen for SLE, mixed CT disease, Sjogren's – all cluster with Hashimoto's", "Every 2 years", "", "", "", "Negative or low titre < 1:80", "If positive, refer rheumatology + sub-type (anti-dsDNA, anti-Ro/La)", "Rheumatologist", "MODERATE", "", C_SECTION_TH),
("THYROID &\nAUTOIMMUNE", "Anti-tTG IgA (Coeliac Screen)", "Coeliac disease clusters with Hashimoto's and T1DM; affects levothyroxine absorption", "Once; repeat if symptoms", "", "", "", "Negative", "GI referral + duodenal biopsy if positive", "Gastroenterologist", "MODERATE", "Malabsorption can cause erratic thyroid control", C_SECTION_TH),
("THYROID &\nAUTOIMMUNE", "Serum B12 + Folate", "Pernicious anaemia clusters with autoimmune thyroiditis; metformin also depletes B12", "Annual", "", "", "", "B12 > 200 pg/mL", "Supplement if low; metformin is key culprit", "GP", "HIGH", "Metformin depletes B12 → worsens neuropathy", C_SECTION_TH),
("THYROID &\nAUTOIMMUNE", "ESR + CRP", "Systemic inflammation marker; baseline for autoimmune monitoring", "Annual or if symptoms", "", "", "", "ESR < 20 mm/hr; CRP < 5 mg/L", "Elevated = active autoimmune flare", "GP", "MODERATE", "", C_SECTION_TH),
# ── VENOUS / VASCULAR ─────────────────────────────────────────────────
("VENOUS &\nVASCULAR", "Bilateral Lower Limb Duplex Venous Ultrasound", "Long-standing varicose veins + hemosiderin pigmentation = advanced CVI; CEAP staging required", "Annual (or sooner if ulcer)", "", "", "", "No DVT; reflux mapped", "Vascular surgery referral; grading directs treatment", "Vascular Surgeon", "URGENT", "Gold standard for venous disease staging (Sabiston Surgery)", C_SECTION_VEN),
("VENOUS &\nVASCULAR", "Ankle-Brachial Index (ABI)", "Diabetic patient: MUST rule out PAD before any compression therapy", "Annual", "", "", "", "ABI 0.9 – 1.3", "ABI < 0.9 = PAD; avoid compression bandaging", "Vascular Surgeon / GP", "URGENT", "DM + venous disease = high PAD risk", C_SECTION_VEN),
("VENOUS &\nVASCULAR", "Nerve Conduction Studies (NCS) / EMG", "Positional numbness: distinguish DPN from peroneal nerve entrapment", "Once baseline; repeat if worsening", "", "", "", "Normal conduction velocities", "Neurology referral if abnormal", "Neurologist", "HIGH", "DM makes nerves more vulnerable to compression injury", C_SECTION_VEN),
("VENOUS &\nVASCULAR", "D-Dimer + Compression Ultrasound (if acute)", "Rule out DVT if sudden unilateral swelling or calf tenderness", "As clinically indicated", "", "", "", "D-Dimer < 500 ng/mL", "Anticoagulate if DVT confirmed", "Emergency / GP", "AS NEEDED", "", C_SECTION_VEN),
# ── CARDIOVASCULAR ────────────────────────────────────────────────────
("CARDIO-\nVASCULAR", "ECG (12-lead)", "DM + early menopause + dyslipidaemia = silent ischaemia risk; Levothyroxine affects rhythm", "Annual", "", "", "", "Normal sinus rhythm; no ischaemic changes", "Cardiology referral if abnormal", "Cardiologist / GP", "HIGH", "Hyperthyroidism from over-treatment causes AF", C_SECTION_CV),
("CARDIO-\nVASCULAR", "Echocardiogram", "Early menopause + RA family history = accelerated atherosclerosis; venous hypertension can stress right heart", "Every 2-3 years or if symptomatic", "", "", "", "Normal LV/RV function; EF > 55%", "Cardiology referral", "Cardiologist", "MODERATE", "Harrison's 22E: early menopause → 1.5x CVD risk", C_SECTION_CV),
("CARDIO-\nVASCULAR", "ASCVD 10-Year Risk Score + Blood Pressure", "Calculate at every visit; multiple risk factors present", "Every visit", "", "", "", "BP < 130/80 mmHg; ASCVD < 7.5%", "Start statin if ASCVD > 7.5%; ACEI/ARB for BP if needed", "GP / Cardiologist", "HIGH", "Avoid ACE inhibitors – she already has dry cough!", C_SECTION_CV),
# ── GYNAECOLOGY / HORMONAL ────────────────────────────────────────────
("GYNAECOLOGY\n& HORMONAL", "Mammography (Digital)", "Early menarche + early menopause = prolonged estrogen exposure → DOUBLED breast cancer risk (Park's Preventive Medicine)", "Annual", "", "", "", "BI-RADS 1 or 2 (normal/benign)", "Core biopsy if BI-RADS 4/5", "Radiologist / Breast Surgeon", "URGENT", "This is her HIGHEST cancer risk given hormonal history", C_SECTION_GYN),
("GYNAECOLOGY\n& HORMONAL", "Pelvic Ultrasound (TVS) + CA-125", "Early menarche = ovarian cancer risk factor (Schwartz Surgery); early menopause = endometrial changes", "Annual pelvic USS; CA-125 if clinical concern", "", "", "", "No adnexal mass; CA-125 < 35 U/mL", "Gynaecology referral if abnormal", "Gynaecologist", "HIGH", "", C_SECTION_GYN),
("GYNAECOLOGY\n& HORMONAL", "Pap Smear + HPV Co-test", "Routine cervical cancer screening; early sexual activity with early menarche may increase exposure window", "Every 5 years (if prior normal + HPV neg)", "", "", "", "Negative for intraepithelial lesion; HPV neg", "Colposcopy if HSIL or HPV positive", "Gynaecologist", "HIGH", "", C_SECTION_GYN),
("GYNAECOLOGY\n& HORMONAL", "FSH + LH + Estradiol", "Confirm menopause status and severity; guide HRT decision (if T2DM allows)", "Once at menopause onset; repeat annually", "", "", "", "FSH > 40 IU/L + Estradiol < 20 pg/mL = menopause", "Discuss HRT risk-benefit (DM + CVD risk may limit options)", "Gynaecologist / Endocrinologist", "HIGH", "HRT may improve glycaemic control and lipids in some women", C_SECTION_GYN),
("GYNAECOLOGY\n& HORMONAL", "DEXA Bone Density Scan", "TRIPLE risk: early menopause (estrogen loss) + Levothyroxine (bone resorption) + DM (bone quality impaired)", "Every 2 years", "", "", "", "T-score > -1.0 (normal)", "Bisphosphonate + Ca2+/Vit D if T-score < -2.5", "Rheumatologist / Endocrinologist", "URGENT", "Levothyroxine at even slightly supraphysiologic dose suppresses bone", C_SECTION_GYN),
("GYNAECOLOGY\n& HORMONAL", "Vitamin D + Calcium", "Menopause + DM = bone loss; also Vit D deficiency worsens insulin resistance", "Annual", "", "", "", "Vit D > 30 ng/mL; Ca 8.5-10.5 mg/dL", "Supplement if deficient", "GP", "HIGH", "", C_SECTION_GYN),
# ── CANCER SCREENING ──────────────────────────────────────────────────
("CANCER\nSCREENING", "Colonoscopy / FIT (Faecal Immunochemical Test)", "T2DM is an independent colorectal cancer risk factor; age 50", "Colonoscopy every 10 yrs (if normal); FIT annually", "", "", "", "No polyps / negative FIT", "Polypectomy if adenoma found", "Gastroenterologist", "HIGH", "DM increases CRC risk ~30%", C_SECTION_CAN),
("CANCER\nSCREENING", "Chest X-Ray", "Dry cough 2 weeks; father had lung cancer (non-smoker); DPP-4 cough must be distinguished", "Now (urgent) + annual if symptoms persist", "", "", "", "Clear lung fields", "CT chest if any opacity; review Vildagliptin", "Radiologist / Pulmonologist", "URGENT", "Father = non-smoker with lung cancer → possible genetic risk (e.g. EGFR mutation familial)", C_SECTION_CAN),
("CANCER\nSCREENING", "Low-Dose CT Chest (LDCT)", "Father died of lung cancer (non-smoker) – possible familial/genetic risk (EGFR, ALK mutations common in non-smoking women)", "Consider baseline now; annual if risk confirmed", "", "", "", "No nodule or mass", "Pulmonology + genetic counselling referral", "Radiologist / Oncologist", "HIGH", "Non-smoker lung adenocarcinoma is common in South Asian women with family history", C_SECTION_CAN),
("CANCER\nSCREENING", "CA-125 + Pelvic USS (Ovarian)", "Early menarche = ovarian cancer risk", "Annual (listed also under Gynaecology)", "", "", "", "CA-125 < 35 U/mL", "", "Gynaecologist", "HIGH", "", C_SECTION_CAN),
# ── MEDICATION REVIEW ─────────────────────────────────────────────────
("MEDICATION\nREVIEW", "Review Vildagliptin for Cough", "DPP-4 inhibitors cause dry cough via bradykinin; she has 2-week dry cough", "Now (urgent)", "", "", "", "No cough = acceptable", "Switch to SGLT2i (empagliflozin) or GLP-1 RA if cough confirms DPP-4 origin", "Diabetologist", "URGENT", "Bonus: SGLT2i reduces CV events + CKD progression; GLP-1 RA aids weight", C_SECTION_MED),
("MEDICATION\nREVIEW", "Metformin + Vitamin B12 Level", "Long-term metformin depletes B12 → worsens peripheral neuropathy (already symptomatic)", "Annual B12 check", "", "", "", "B12 > 200 pg/mL", "Supplement B12 orally or IM", "GP / Diabetologist", "HIGH", "Critical: B12 depletion mimics/worsens DPN", C_SECTION_MED),
("MEDICATION\nREVIEW", "Levothyroxine Dose Review (TSH target)", "Supraphysiologic levothyroxine = bone loss + AF risk. Under-treatment = cough, fatigue, worsened lipids", "Every 6 months TSH", "", "", "", "TSH 1.0–2.5 mIU/L (optimal for Hashimoto's)", "Adjust dose by 12.5-25 mcg increments", "Endocrinologist", "HIGH", "", C_SECTION_MED),
("MEDICATION\nREVIEW", "Statin Therapy Initiation Assessment", "DM + early menopause + dyslipidaemia + autoimmune disease = high ASCVD risk; statin likely indicated", "Now", "", "", "", "LDL < 70 mg/dL (goal)", "Initiate rosuvastatin or atorvastatin", "GP / Cardiologist", "HIGH", "", C_SECTION_MED),
("MEDICATION\nREVIEW", "Aspirin / Antiplatelet Review", "Low-dose aspirin in high ASCVD risk DM patients (individualize)", "Annual review", "", "", "", "Per ASCVD risk score", "Discuss risk vs GI bleed benefit", "Cardiologist / GP", "MODERATE", "", C_SECTION_MED),
]
priority_colors = {
"URGENT": "B71C1C",
"HIGH": "E65100",
"MODERATE": "1565C0",
"AS NEEDED": "388E3C",
}
for row_i, row_data in enumerate(rows, start=5):
r = row_i
cat, test, why, freq, last, nxt, result, normal, action, done_by, priority, notes, sec_color = row_data
ws.row_dimensions[r].height = 45
values = [cat, test, why, freq, last, nxt, result, normal, action, done_by, priority, notes]
for col_i, val in enumerate(values, start=1):
c = ws.cell(row=r, column=col_i, value=val)
c.border = mk_border()
c.alignment = mk_align(h="left")
c.font = mk_font(size=9)
if col_i == 1: # category
c.font = mk_font(bold=True, size=9, color=C_HEADER_DARK)
c.fill = mk_fill(sec_color)
c.alignment = mk_align(h="center")
elif col_i == 2: # test name
c.font = mk_font(bold=True, size=9)
c.fill = mk_fill(C_WHITE)
elif col_i == 11: # priority
pcolor = priority_colors.get(val, "757575")
c.font = mk_font(bold=True, size=9, color=C_WHITE)
c.fill = mk_fill(pcolor)
c.alignment = mk_align()
elif col_i in [5, 6]: # date fields
c.fill = mk_fill(C_DUE)
c.alignment = mk_align()
elif col_i == 7: # result
c.fill = mk_fill("F5F5F5")
else:
c.fill = mk_fill(C_WHITE)
# Column widths
col_widths = [14, 32, 38, 18, 14, 14, 18, 22, 36, 16, 10, 30]
for ci, w in enumerate(col_widths, start=1):
ws.column_dimensions[get_column_letter(ci)].width = w
# Freeze header row
ws.freeze_panes = "A5"
# ═══════════════════════════════════════════════════════════════════════════
# SHEET 3 – TIMELINE CALENDAR (by year / age)
# ═══════════════════════════════════════════════════════════════════════════
ws_cal = wb.create_sheet("Screening Timeline")
ws_cal.sheet_view.showGridLines = False
ws_cal.merge_cells("A1:M1")
ws_cal["A1"] = "SCREENING TIMELINE BY AGE / YEAR"
ws_cal["A1"].font = mk_font(bold=True, size=13, color=C_WHITE)
ws_cal["A1"].fill = mk_fill(C_HEADER_DARK)
ws_cal["A1"].alignment = mk_align()
ws_cal.row_dimensions[1].height = 26
# Year columns
years = list(range(2026, 2032))
ages = list(range(50, 56))
ws_cal.row_dimensions[3].height = 32
ws_cal.row_dimensions[4].height = 20
ws_cal["A3"] = "Test / Screening"
ws_cal["A3"].font = mk_font(bold=True, size=10, color=C_WHITE)
ws_cal["A3"].fill = mk_fill(C_HEADER_MID)
ws_cal["A3"].alignment = mk_align()
ws_cal["A3"].border = mk_border()
ws_cal.column_dimensions["A"].width = 36
ws_cal["B3"] = "Priority"
ws_cal["B3"].font = mk_font(bold=True, size=10, color=C_WHITE)
ws_cal["B3"].fill = mk_fill(C_HEADER_MID)
ws_cal["B3"].alignment = mk_align()
ws_cal["B3"].border = mk_border()
ws_cal.column_dimensions["B"].width = 10
for ci, (yr, ag) in enumerate(zip(years, ages), start=3):
col = get_column_letter(ci)
ws_cal.merge_cells(f"{col}3:{col}4")
ws_cal[f"{col}3"] = f"{yr}\n(Age {ag})"
ws_cal[f"{col}3"].font = mk_font(bold=True, size=10, color=C_WHITE)
ws_cal[f"{col}3"].fill = mk_fill(C_HEADER_MID)
ws_cal[f"{col}3"].alignment = mk_align()
ws_cal[f"{col}3"].border = mk_border()
ws_cal.column_dimensions[col].width = 13
# Tests with schedule (test, priority, yr2026, yr2027, yr2028, yr2029, yr2030, yr2031)
# Legend: A = Annual, 2Y = Every 2 yrs, 3Y = Every 3 yrs, 6M = Every 6 months, NOW = Immediate, --- = Not due
tl_rows = [
("── DIABETES ──────────────────", "", "", "", "", "", "", ""),
("HbA1c", "URGENT", "Q3M", "Q3M", "Q3M", "Q3M", "Q3M", "Q3M"),
("UACR (Urine Albumin:Cr Ratio)", "URGENT", "A", "A", "A", "A", "A", "A"),
("eGFR / Serum Creatinine", "URGENT", "A", "A", "A", "A", "A", "A"),
("Lipid Profile", "HIGH", "A", "A", "A", "A", "A", "A"),
("Retinal Examination", "HIGH", "A", "A", "A", "A", "A", "A"),
("Foot Exam (Monofilament etc.)", "URGENT", "A", "A", "A", "A", "A", "A"),
("Autonomic / Orthostatic BP", "MOD", "A", "A", "A", "A", "A", "A"),
("── THYROID / AUTOIMMUNE ──────", "", "", "", "", "", "", ""),
("TSH + Free T4", "URGENT", "6M", "6M", "6M", "6M", "6M", "6M"),
("Anti-TPO / Anti-Tg Antibodies", "HIGH", "A", "---", "A", "---", "A", "---"),
("Thyroid Ultrasound", "HIGH", "A", "A", "A", "A", "A", "A"),
("RF + Anti-CCP", "HIGH", "A", "A", "A", "A", "A", "A"),
("ANA Screen", "MOD", "A", "---", "A", "---", "A", "---"),
("Anti-tTG IgA (Coeliac)", "MOD", "NOW", "---", "---", "A", "---", "---"),
("Serum B12 + Folate", "HIGH", "A", "A", "A", "A", "A", "A"),
("── VENOUS / VASCULAR ─────────", "", "", "", "", "", "", ""),
("Duplex Venous USS (Bilateral LL)", "URGENT", "NOW", "A", "A", "A", "A", "A"),
("Ankle-Brachial Index (ABI)", "URGENT", "NOW", "A", "A", "A", "A", "A"),
("NCS / EMG (Neuropathy)", "HIGH", "NOW", "---", "A", "---", "A", "---"),
("── CARDIOVASCULAR ────────────", "", "", "", "", "", "", ""),
("ECG (12-lead)", "HIGH", "A", "A", "A", "A", "A", "A"),
("Echocardiogram", "MOD", "NOW", "---", "---", "A", "---", "---"),
("ASCVD Score + BP", "HIGH", "A", "A", "A", "A", "A", "A"),
("── GYNAECOLOGY / HORMONAL ────", "", "", "", "", "", "", ""),
("Mammography", "URGENT", "A", "A", "A", "A", "A", "A"),
("Pelvic USS + CA-125", "HIGH", "A", "A", "A", "A", "A", "A"),
("Pap Smear + HPV Co-test", "HIGH", "NOW", "---", "---", "---", "---", "A"),
("FSH / LH / Estradiol", "HIGH", "A", "A", "A", "A", "A", "A"),
("DEXA Bone Density Scan", "URGENT", "NOW", "---", "A", "---", "A", "---"),
("Vitamin D + Calcium", "HIGH", "A", "A", "A", "A", "A", "A"),
("── CANCER SCREENING ──────────", "", "", "", "", "", "", ""),
("Colonoscopy (baseline)", "HIGH", "NOW", "---", "---", "---", "---", "---"),
("Chest X-Ray", "URGENT", "NOW", "A", "A", "A", "A", "A"),
("Low-Dose CT Chest (LDCT)", "HIGH", "NOW", "---", "A", "---", "A", "---"),
("── MEDICATION REVIEW ─────────", "", "", "", "", "", "", ""),
("Review Vildagliptin (cough)", "URGENT", "NOW", "---", "---", "---", "---", "---"),
("Metformin B12 monitoring", "HIGH", "A", "A", "A", "A", "A", "A"),
("Levothyroxine dose review", "HIGH", "6M", "6M", "6M", "6M", "6M", "6M"),
("Statin initiation assessment", "HIGH", "NOW", "A", "A", "A", "A", "A"),
]
cell_colors = {
"A": "C8E6C9", # green
"Q3M": "B3E5FC", # light blue
"6M": "B2EBF2", # cyan
"2Y": "FFF9C4", # yellow
"NOW": "FFCDD2", # red/urgent
"---": "F5F5F5", # grey
"MOD": "1565C0",
}
section_header_fill = "37474F"
for ri, trow in enumerate(tl_rows, start=5):
r = ri
ws_cal.row_dimensions[r].height = 22
test, priority = trow[0], trow[1]
schedule = trow[2:]
is_section = test.startswith("──")
a_cell = ws_cal.cell(row=r, column=1, value=test)
a_cell.border = mk_border()
if is_section:
a_cell.font = mk_font(bold=True, size=9, color=C_WHITE)
a_cell.fill = mk_fill(section_header_fill)
a_cell.alignment = mk_align(h="left")
ws_cal.merge_cells(f"A{r}:M{r}")
else:
a_cell.font = mk_font(bold=False, size=9)
a_cell.fill = mk_fill(C_WHITE)
a_cell.alignment = mk_align(h="left")
b_cell = ws_cal.cell(row=r, column=2, value=priority)
b_cell.border = mk_border()
if not is_section:
pcolor = priority_colors.get(priority, priority_colors.get("MOD","757575"))
b_cell.font = mk_font(bold=True, size=8, color=C_WHITE)
b_cell.fill = mk_fill(pcolor)
b_cell.alignment = mk_align()
else:
b_cell.fill = mk_fill(section_header_fill)
for sci, sval in enumerate(schedule, start=3):
sc = ws_cal.cell(row=r, column=sci, value=sval if not is_section else "")
sc.border = mk_border()
sc.alignment = mk_align()
if is_section:
sc.fill = mk_fill(section_header_fill)
else:
fc = cell_colors.get(sval, "FFFFFF")
sc.fill = mk_fill(fc)
sc.font = mk_font(bold=(sval not in ["---", ""]), size=9,
color="1A1A2E" if sval not in ["---"] else "9E9E9E")
ws_cal.freeze_panes = "C5"
# Legend
legend_row = len(tl_rows) + 7
ws_cal[f"A{legend_row}"] = "LEGEND:"
ws_cal[f"A{legend_row}"].font = mk_font(bold=True, size=9)
legend_items = [
("B", "NOW", "FFCDD2", "Immediate / Urgent"),
("C", "A", "C8E6C9", "Annual"),
("D", "Q3M", "B3E5FC", "Every 3 months"),
("E", "6M", "B2EBF2", "Every 6 months"),
("F", "---", "F5F5F5", "Not due this year"),
]
for col_l, code, fc, desc in legend_items:
cell_code = ws_cal[f"{col_l}{legend_row}"]
cell_code.value = f"{code} = {desc}"
cell_code.fill = mk_fill(fc)
cell_code.font = mk_font(size=9)
cell_code.border = mk_border()
cell_code.alignment = mk_align(h="left")
# ── Save ────────────────────────────────────────────────────────────────────
out_path = "/home/daytona/workspace/patient-tracker/Diabetes_Multisystem_Screening_Tracker.xlsx"
wb.save(out_path)
print(f"Saved: {out_path}")
cd /home/daytona/workspace/patient-tracker && python build_tracker.py
~/patient-tracker/build_tracker.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/patient-tracker/build_tracker.py'
~/patient-tracker/build_tracker.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/patient-tracker/build_tracker.py'
cd /home/daytona/workspace/patient-tracker && python build_tracker.py
ls /home/daytona/workspace/patient-tracker/ && df -h /home/daytona/workspace/
~/patient-tracker/build_tracker.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/patient-tracker/build_tracker.py'
cd /home/daytona/workspace/patient-tracker && python build_tracker.py
~/patient-tracker/build_tracker.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/patient-tracker/build_tracker.py'
cd /home/daytona/workspace/patient-tracker && python build_tracker.py && ls -lh /home/daytona/workspace/patient-tracker/