Make time table for final year mbbs

Asking for Preferences
Asking for Preferences
Reading File
Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"

Running Command

mkdir -p /home/daytona/workspace/mbbs-timetable

Writing File

~/mbbs-timetable/create_timetable.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_TEXT

wb = openpyxl.Workbook()

# ─────────────────────────────────────────────
# COLOUR PALETTE
# ─────────────────────────────────────────────
HEADER_BG   = "1F3864"   # dark navy
HEADER_FG   = "FFFFFF"
MED_BG      = "D6E4F7"   # light blue
SUR_BG      = "D5F5E3"   # light green
OBG_BG      = "FDE8D8"   # light orange
PAE_BG      = "EDE7F6"   # light purple
ENT_BG      = "FEF9C3"   # light yellow (ENT/Ophth/Ortho allied)
REV_BG      = "FCE4EC"   # light pink (revision/mock)
REST_BG     = "F5F5F5"   # light grey (Sunday/rest)
TITLE_BG    = "0D47A1"   # deep blue title bar

SUBJECT_COLORS = {
    "Medicine":      MED_BG,
    "Surgery":       SUR_BG,
    "Obs & Gynae":   OBG_BG,
    "Paediatrics":   PAE_BG,
    "Allied":        ENT_BG,
    "Revision":      REV_BG,
    "Sunday":        REST_BG,
}

def fill(hex_col):
    return PatternFill("solid", start_color=hex_col, fgColor=hex_col)

def thin_border():
    s = Side(style="thin", color="BDBDBD")
    return Border(left=s, right=s, top=s, bottom=s)

def cell_style(ws, row, col, value, bg=None, bold=False, font_size=10,
               font_color="000000", wrap=False, align="center",
               valign="center"):
    c = ws.cell(row=row, column=col, value=value)
    c.font = Font(name="Arial", bold=bold, size=font_size, color=font_color)
    if bg:
        c.fill = fill(bg)
    c.alignment = Alignment(horizontal=align, vertical=valign,
                             wrap_text=wrap)
    c.border = thin_border()
    return c

# ════════════════════════════════════════════════════════
#  SHEET 1 – WEEKLY TIMETABLE (Mon-Sat rotation)
# ════════════════════════════════════════════════════════
ws1 = wb.active
ws1.title = "Weekly Timetable"

# Freeze panes
ws1.freeze_panes = "B3"

# ---- Big title ----
ws1.merge_cells("A1:H1")
c = ws1.cell(row=1, column=1,
             value="FINAL YEAR MBBS – WEEKLY STUDY TIMETABLE  |  6 Days/Week  |  4-6 Hours/Day")
c.font = Font(name="Arial", bold=True, size=14, color=HEADER_FG)
c.fill = fill(TITLE_BG)
c.alignment = Alignment(horizontal="center", vertical="center")
ws1.row_dimensions[1].height = 30

# ---- Column headers ----
days = ["TIME SLOT", "MONDAY", "TUESDAY", "WEDNESDAY",
        "THURSDAY", "FRIDAY", "SATURDAY"]
col_colors = [HEADER_BG, MED_BG, SUR_BG, OBG_BG,
              PAE_BG, ENT_BG, REV_BG]

for ci, (d, bg) in enumerate(zip(days, col_colors), start=1):
    c = ws1.cell(row=2, column=ci, value=d)
    c.font = Font(name="Arial", bold=True, size=10,
                  color=HEADER_FG if ci == 1 else "000000")
    c.fill = fill(HEADER_BG if ci == 1 else bg)
    c.alignment = Alignment(horizontal="center", vertical="center",
                             wrap_text=True)
    c.border = thin_border()
ws1.row_dimensions[2].height = 22

# ---- Time slots & content ----
# Each row: (time_label, Mon, Tue, Wed, Thu, Fri, Sat)
# Subjects: Medicine, Surgery, Obs & Gynae, Paeds, Allied (ENT/Ophth/Ortho)
schedule = [
    ("7:00 – 8:00 AM",
     "Medicine\n(Self-Reading)", "Surgery\n(Self-Reading)",
     "Obs & Gynae\n(Self-Reading)", "Paediatrics\n(Self-Reading)",
     "Allied Subjects\n(ENT/Ophth/Ortho)", "Weekly Revision\n& Mock MCQs"),

    ("8:00 – 9:00 AM",
     "Medicine\nLectures / Ward", "Surgery\nLectures / Ward",
     "Obs & Gynae\nLectures / OPD", "Paediatrics\nLectures / Ward",
     "Allied Subjects\nLectures / OPD", "Previous Year\nPaper Practice"),

    ("BREAK  9:00 – 9:30 AM",
     "—", "—", "—", "—", "—", "—"),

    ("9:30 – 11:30 AM",
     "Medicine\n(Clinical Topics)", "Surgery\n(Clinical Topics)",
     "Obs & Gynae\n(Clinical Topics)", "Paediatrics\n(Clinical Topics)",
     "Allied Subjects\n(Key Topics)", "Full-Length\nMock Test"),

    ("LUNCH  11:30 AM – 1:00 PM",
     "—", "—", "—", "—", "—", "—"),

    ("1:00 – 2:30 PM",
     "Medicine\nMCQ Drill", "Surgery\nMCQ Drill",
     "Obs & Gynae\nMCQ Drill", "Paediatrics\nMCQ Drill",
     "Allied MCQ Drill", "Test Review\n& Correction"),

    ("2:30 – 3:00 PM",
     "Short Break", "Short Break", "Short Break",
     "Short Break", "Short Break", "Short Break"),

    ("3:00 – 4:00 PM",
     "Medicine\nNotes / Flashcards", "Surgery\nNotes / Flashcards",
     "Obs & Gynae\nNotes / Flashcards", "Paediatrics\nNotes / Flashcards",
     "Allied Notes\n/ Flashcards", "Plan Next Week\n+ Rest"),
]

row_bg_map = {
    0: MED_BG, 1: MED_BG, 3: MED_BG, 5: MED_BG, 7: MED_BG
}
day_bg = [None, MED_BG, SUR_BG, OBG_BG, PAE_BG, ENT_BG, REV_BG]

for ri, slot in enumerate(schedule, start=3):
    ws1.row_dimensions[ri].height = 45
    time_val = slot[0]
    is_break = "BREAK" in time_val or "LUNCH" in time_val or "Short" in time_val

    for ci, val in enumerate(slot, start=1):
        if ci == 1:
            bg = HEADER_BG if is_break else "263238"
            fg = HEADER_FG
            c = ws1.cell(row=ri, column=ci, value=val)
            c.font = Font(name="Arial", bold=True, size=9, color=fg)
            c.fill = fill("B0BEC5" if is_break else "37474F")
            c.alignment = Alignment(horizontal="center", vertical="center",
                                    wrap_text=True)
            c.border = thin_border()
        else:
            bg = "E0E0E0" if is_break else day_bg[ci]
            cell_style(ws1, ri, ci, val, bg=bg, bold=False,
                       font_size=9, wrap=True)

# Column widths
ws1.column_dimensions["A"].width = 22
for col in range(2, 9):
    ws1.column_dimensions[get_column_letter(col)].width = 20

# ════════════════════════════════════════════════════════
#  SHEET 2 – SUBJECT TOPIC PLAN (all 5 subjects)
# ════════════════════════════════════════════════════════
ws2 = wb.create_sheet("Topic Plan")
ws2.freeze_panes = "A3"

ws2.merge_cells("A1:E1")
c = ws2.cell(row=1, column=1,
             value="FINAL YEAR MBBS – TOPIC-WISE STUDY PLAN  (Approx. 9 Months)")
c.font = Font(name="Arial", bold=True, size=13, color=HEADER_FG)
c.fill = fill(TITLE_BG)
c.alignment = Alignment(horizontal="center", vertical="center")
ws2.row_dimensions[1].height = 28

headers2 = ["Subject", "Topic / Module", "Key Sub-topics",
            "Target Week", "Status"]
hdr_bgs = [HEADER_BG] * 5
for ci, (h, bg) in enumerate(zip(headers2, hdr_bgs), start=1):
    c = ws2.cell(row=2, column=ci, value=h)
    c.font = Font(name="Arial", bold=True, size=10, color=HEADER_FG)
    c.fill = fill(HEADER_BG)
    c.alignment = Alignment(horizontal="center", vertical="center",
                            wrap_text=True)
    c.border = thin_border()
ws2.row_dimensions[2].height = 20

# (Subject, Topic, Sub-topics, Week, Status)
topics = [
    # MEDICINE
    ("Medicine", "Cardiology",
     "IHD, Heart Failure, Arrhythmias, Valvular diseases, Hypertension", "1-2", ""),
    ("Medicine", "Respiratory",
     "COPD, Asthma, Pneumonia, TB, Pleural effusion, Lung carcinoma", "2-3", ""),
    ("Medicine", "Gastroenterology",
     "Peptic ulcer, IBD, Liver cirrhosis, Hepatitis, Jaundice, GI bleed", "3-4", ""),
    ("Medicine", "Nephrology",
     "AKI, CKD, Glomerulonephritis, Nephrotic/Nephritic syndrome", "4-5", ""),
    ("Medicine", "Endocrinology",
     "Diabetes, Thyroid disorders, Adrenal diseases, Pituitary", "5-6", ""),
    ("Medicine", "Neurology",
     "Stroke, Epilepsy, Meningitis, Parkinson's, Multiple Sclerosis", "6-7", ""),
    ("Medicine", "Haematology",
     "Anaemias, Leukaemias, Lymphomas, Coagulation disorders", "7-8", ""),
    ("Medicine", "Rheumatology & ID",
     "RA, SLE, Infective Endocarditis, Sepsis, HIV, Malaria, Typhoid", "8-9", ""),
    ("Medicine", "Dermatology (Med)",
     "Psoriasis, Eczema, Acne, Vitiligo, Leprosy, Skin infections", "9", ""),
    ("Medicine", "Medicine Revision",
     "High-yield MCQs, Previous papers, Short cases", "10", ""),

    # SURGERY
    ("Surgery", "General Surgery Principles",
     "Wounds, Burns, Fluid/Electrolytes, Shock, Pre/Post-op care", "11-12", ""),
    ("Surgery", "GIT Surgery",
     "Appendicitis, Hernia, Intestinal obstruction, Colorectal Ca", "12-13", ""),
    ("Surgery", "Hepato-biliary",
     "Gallstones, Cholecystitis, Pancreatitis, Portal hypertension", "13-14", ""),
    ("Surgery", "Breast & Thyroid",
     "Breast carcinoma, FNAC, Thyroid surgery, Parathyroid", "14-15", ""),
    ("Surgery", "Urology",
     "BPH, Bladder Ca, Renal calculi, UTI, Urethral stricture", "15-16", ""),
    ("Surgery", "Vascular & Ortho",
     "Varicose veins, DVT, Fractures, Osteomyelitis, Bone tumours", "16-17", ""),
    ("Surgery", "Neurosurgery & Trauma",
     "Head injury, Spinal cord injury, Raised ICP, ATLS principles", "17-18", ""),
    ("Surgery", "Surgery Revision",
     "High-yield MCQs, OSCEs, Previous papers", "18-19", ""),

    # OBS & GYNAE
    ("Obs & Gynae", "Normal Obstetrics",
     "Antenatal care, Labour, Delivery, Puerperium, Lactation", "19-20", ""),
    ("Obs & Gynae", "High-Risk Obstetrics",
     "PIH/Pre-eclampsia, GDM, APH, PPH, IUGR, Malpresentations", "20-21", ""),
    ("Obs & Gynae", "Complications of Pregnancy",
     "Ectopic, Abortion, Hyperemesis, Placenta praevia, Abruptio", "21-22", ""),
    ("Obs & Gynae", "Labour & Obstetric Emergencies",
     "Dystocia, Obstructed labour, Uterine rupture, Instrumental delivery", "22-23", ""),
    ("Obs & Gynae", "Gynaecology",
     "Menstrual disorders, PCOS, Fibroids, Ovarian cysts, Endometriosis", "23-24", ""),
    ("Obs & Gynae", "Gynaecological Oncology",
     "Cervical/Endometrial/Ovarian Ca, STIs, PID, Infertility", "24-25", ""),
    ("Obs & Gynae", "Obs & Gynae Revision",
     "MCQs, Clinical scenarios, Previous papers", "25-26", ""),

    # PAEDIATRICS
    ("Paediatrics", "Growth & Development",
     "Milestones, Nutrition, Immunisation schedule, Anthropometry", "26-27", ""),
    ("Paediatrics", "Neonatology",
     "NNJ, Birth asphyxia, Prematurity, Sepsis, RDS, Congenital anomalies", "27-28", ""),
    ("Paediatrics", "Respiratory Paeds",
     "Bronchiolitis, Pneumonia, Asthma, Croup, Whooping cough", "28-29", ""),
    ("Paediatrics", "GIT & Nutrition",
     "Diarrhoea/ORS, Malnutrition (PEM), Coeliac, Intussusception", "29-30", ""),
    ("Paediatrics", "Neurology Paeds",
     "Febrile seizures, Epilepsy, Meningitis, Cerebral palsy, NTDs", "30-31", ""),
    ("Paediatrics", "Haematology & Oncology Paeds",
     "Anaemias, ALL, Wilms tumour, Thalassaemia, Haemophilia", "31-32", ""),
    ("Paediatrics", "Congenital Heart Disease",
     "ASD, VSD, TOF, PDA, Coarctation, Cyanotic vs Acyanotic", "32-33", ""),
    ("Paediatrics", "Paediatrics Revision",
     "High-yield MCQs, Growth charts, Vaccine schedules, Previous papers", "33-34", ""),

    # ALLIED (ENT + Ophth + Ortho – rotational)
    ("Allied: ENT", "Ear",
     "Otitis media/externa, CSOM, Cholesteatoma, Hearing loss, Vertigo", "35", ""),
    ("Allied: ENT", "Nose & Throat",
     "Sinusitis, DNS, Epistaxis, Tonsillitis, Laryngeal Ca, Tracheostomy", "35-36", ""),
    ("Allied: Ophthalmology", "Anterior Segment",
     "Conjunctivitis, Corneal ulcer, Cataract, Glaucoma, Uveitis", "36", ""),
    ("Allied: Ophthalmology", "Posterior Segment & Neuro-ophth",
     "Retinal detachment, DR, ARMD, Optic neuritis, Squint", "36-37", ""),
    ("Allied: Orthopaedics", "Trauma",
     "Fractures (Colles, NOF, Femur), Dislocations, Spinal injuries", "37", ""),
    ("Allied: Orthopaedics", "Infections & Tumours",
     "Osteomyelitis, Septic arthritis, Bone tumours, TB spine", "37-38", ""),
    ("Allied: Orthopaedics", "Joint & Degenerative",
     "OA, RA joints, Scoliosis, Club foot, CTEV, Congenital hip dislocation", "38", ""),

    # FINAL REVISION
    ("Revision", "Grand Revision – Medicine & Surgery",
     "Full syllabus rapid review + MCQ banks", "39-40", ""),
    ("Revision", "Grand Revision – OG & Paeds",
     "Full syllabus rapid review + MCQ banks", "40-41", ""),
    ("Revision", "Grand Revision – Allied",
     "Rapid review + Previous year papers", "41", ""),
    ("Revision", "Full Mock Exams",
     "Timed theory papers + Clinical/OSCE practice", "42-43", ""),
    ("Revision", "Final Touch-up & Rest",
     "Weak areas only, short notes, relaxation", "44+", ""),
]

subj_bg_map = {
    "Medicine":  MED_BG,
    "Surgery":   SUR_BG,
    "Obs & Gynae": OBG_BG,
    "Paediatrics": PAE_BG,
    "Allied: ENT": ENT_BG,
    "Allied: Ophthalmology": ENT_BG,
    "Allied: Orthopaedics": ENT_BG,
    "Revision": REV_BG,
}

for ri, (subj, topic, sub, week, status) in enumerate(topics, start=3):
    ws2.row_dimensions[ri].height = 30
    bg = subj_bg_map.get(subj, "FFFFFF")
    cell_style(ws2, ri, 1, subj,   bg=bg, bold=True, font_size=9, wrap=True)
    cell_style(ws2, ri, 2, topic,  bg=bg, bold=True, font_size=9, wrap=True, align="left")
    cell_style(ws2, ri, 3, sub,    bg="FFFFFF", font_size=8, wrap=True, align="left")
    cell_style(ws2, ri, 4, f"Week {week}", bg=bg, font_size=9)
    cell_style(ws2, ri, 5, status, bg="FFFFFF", font_size=9)

# Column widths sheet 2
ws2.column_dimensions["A"].width = 22
ws2.column_dimensions["B"].width = 28
ws2.column_dimensions["C"].width = 50
ws2.column_dimensions["D"].width = 12
ws2.column_dimensions["E"].width = 14

# ════════════════════════════════════════════════════════
#  SHEET 3 – DAILY HOUR-BY-HOUR TEMPLATE
# ════════════════════════════════════════════════════════
ws3 = wb.create_sheet("Daily Schedule Template")

ws3.merge_cells("A1:C1")
c = ws3.cell(row=1, column=1,
             value="DAILY SCHEDULE TEMPLATE  (Customise for each day)")
c.font = Font(name="Arial", bold=True, size=13, color=HEADER_FG)
c.fill = fill(TITLE_BG)
c.alignment = Alignment(horizontal="center", vertical="center")
ws3.row_dimensions[1].height = 28

headers3 = ["TIME", "ACTIVITY / SUBJECT", "NOTES / DONE?"]
for ci, h in enumerate(headers3, start=1):
    c = ws3.cell(row=2, column=ci, value=h)
    c.font = Font(name="Arial", bold=True, size=10, color=HEADER_FG)
    c.fill = fill(HEADER_BG)
    c.alignment = Alignment(horizontal="center", vertical="center")
    c.border = thin_border()
ws3.row_dimensions[2].height = 20

daily_slots = [
    ("5:30 – 6:00 AM",  "Wake up / Prayer / Light exercise", ""),
    ("6:00 – 7:00 AM",  "Personal study (Difficult topic)", ""),
    ("7:00 – 8:00 AM",  "Self-reading (Today's subject)", ""),
    ("8:00 – 9:00 AM",  "Lectures / Ward / OPD attendance", ""),
    ("9:00 – 9:30 AM",  "BREAK – Tea / Freshen up", ""),
    ("9:30 – 11:30 AM", "Main study block (Clinical topics + theory)", ""),
    ("11:30 AM – 1:00 PM", "LUNCH BREAK", ""),
    ("1:00 – 2:00 PM",  "MCQ practice (Subject of the day)", ""),
    ("2:00 – 2:30 PM",  "Short nap / rest", ""),
    ("2:30 – 4:00 PM",  "Notes writing / Flashcard review", ""),
    ("4:00 – 5:00 PM",  "Exercise / Sports / Relaxation", ""),
    ("5:00 – 6:30 PM",  "Extra reading / Previous year papers", ""),
    ("6:30 – 7:30 PM",  "Dinner + family time", ""),
    ("7:30 – 9:00 PM",  "Evening study – weak topics / revision", ""),
    ("9:00 – 9:30 PM",  "Daily review – what was covered today?", ""),
    ("9:30 PM onwards", "Sleep (≥7 hours)", ""),
]

row_colors = [
    "FAFAFA", "E3F2FD", "E3F2FD",
    "E8F5E9", "FFF9C4",
    "E3F2FD", "FFF9C4",
    "E3F2FD", "FFF9C4",
    "E8F5E9", "FCE4EC",
    "E3F2FD", "FFF9C4",
    "E8F5E9", "E3F2FD", "FCE4EC",
]

for ri, (slot, activity, note), bg in zip(
        range(3, 3+len(daily_slots)), daily_slots, row_colors):
    ws3.row_dimensions[ri].height = 22
    cell_style(ws3, ri, 1, slot,     bg=bg, font_size=9)
    cell_style(ws3, ri, 2, activity, bg=bg, font_size=9, align="left", wrap=True)
    cell_style(ws3, ri, 3, note,     bg="FFFFFF", font_size=9)

ws3.column_dimensions["A"].width = 22
ws3.column_dimensions["B"].width = 42
ws3.column_dimensions["C"].width = 22

# ════════════════════════════════════════════════════════
#  SHEET 4 – SUBJECT DISTRIBUTION & MONTH PLANNER
# ════════════════════════════════════════════════════════
ws4 = wb.create_sheet("Month Planner")
ws4.freeze_panes = "B3"

ws4.merge_cells("A1:11")
c = ws4.cell(row=1, column=1,
             value="FINAL YEAR MBBS – 9-MONTH PLANNER  (Jun 2026 – Feb 2027)")
c.font = Font(name="Arial", bold=True, size=13, color=HEADER_FG)
c.fill = fill(TITLE_BG)
c.alignment = Alignment(horizontal="center", vertical="center")
ws4.merge_cells("A1:K1")
ws4.row_dimensions[1].height = 28

# Months and subjects per month
months = ["Jun 2026", "Jul 2026", "Aug 2026", "Sep 2026", "Oct 2026",
          "Nov 2026", "Dec 2026", "Jan 2027", "Feb 2027"]
month_plans = [
    # (month, Focus1, Focus2, Focus3, Goal)
    ("Jun 2026", "Medicine (Cardio, Resp)", "Surgery (Principles, GIT)", "", "Establish routine; cover 2 subjects in parallel"),
    ("Jul 2026", "Medicine (GI, Nephro)", "Surgery (HB, Breast, Thyroid)", "", "Complete Medicine Part-1, Surgery Part-1"),
    ("Aug 2026", "Medicine (Endo, Neuro, Haem)", "Surgery (Urology, Vascular, Neuro)", "", "Complete core Medicine & Surgery"),
    ("Sep 2026", "Medicine Revision + MCQs", "Surgery Revision + MCQs", "Obs & Gynae – Normal Obstetrics", "Revise M&S; start OG"),
    ("Oct 2026", "Obs & Gynae (High-risk, complications)", "Paediatrics (Growth, Neonates)", "", "OG half done; Paeds started"),
    ("Nov 2026", "Obs & Gynae Revision", "Paediatrics (Resp, GI, Neuro, CVS)", "", "Complete OG; Paeds core done"),
    ("Dec 2026", "Paediatrics Revision + MCQs", "Allied – ENT + Ophth", "", "Paeds done; Allied started"),
    ("Jan 2027", "Allied – Ortho", "Grand Revision (Medicine, Surgery)", "Full Mock Tests", "All subjects covered; Grand revision begins"),
    ("Feb 2027", "Grand Revision (OG, Paeds, Allied)", "Previous Year Papers", "OSCE/Clinical prep", "Final polish; exam-ready"),
]

col_heads = ["Month", "Primary Focus", "Secondary Focus", "Tertiary Focus", "Month Goal"]
for ci, h in enumerate(col_heads, start=1):
    c = ws4.cell(row=2, column=ci, value=h)
    c.font = Font(name="Arial", bold=True, size=10, color=HEADER_FG)
    c.fill = fill(HEADER_BG)
    c.alignment = Alignment(horizontal="center", vertical="center",
                            wrap_text=True)
    c.border = thin_border()
ws4.row_dimensions[2].height = 22

month_row_colors = [MED_BG, MED_BG, MED_BG, SUR_BG,
                    OBG_BG, OBG_BG, PAE_BG, ENT_BG, REV_BG]
for ri, ((month, f1, f2, f3, goal), rc) in enumerate(
        zip(month_plans, month_row_colors), start=3):
    ws4.row_dimensions[ri].height = 38
    cell_style(ws4, ri, 1, month, bg=rc, bold=True, font_size=9)
    cell_style(ws4, ri, 2, f1,   bg=rc, font_size=9, wrap=True, align="left")
    cell_style(ws4, ri, 3, f2,   bg=rc, font_size=9, wrap=True, align="left")
    cell_style(ws4, ri, 4, f3,   bg="FFFFFF", font_size=9, wrap=True, align="left")
    cell_style(ws4, ri, 5, goal, bg="FFFFFF", font_size=9, wrap=True, align="left")

ws4.column_dimensions["A"].width = 14
ws4.column_dimensions["B"].width = 28
ws4.column_dimensions["C"].width = 28
ws4.column_dimensions["D"].width = 24
ws4.column_dimensions["E"].width = 38

# ════════════════════════════════════════════════════════
#  SHEET 5 – TIPS & STRATEGY
# ════════════════════════════════════════════════════════
ws5 = wb.create_sheet("Tips & Strategy")

ws5.merge_cells("A1:B1")
c = ws5.cell(row=1, column=1, value="STUDY TIPS & STRATEGY – Final Year MBBS")
c.font = Font(name="Arial", bold=True, size=13, color=HEADER_FG)
c.fill = fill(TITLE_BG)
c.alignment = Alignment(horizontal="center", vertical="center")
ws5.row_dimensions[1].height = 28

tips = [
    ("BOOKS / RESOURCES",
     "Medicine: Harrison's (selective) / Davidson's / Kumar & Clark / CMDT\n"
     "Surgery: Bailey & Love / SRB / Schwartz (selective)\n"
     "Obs & Gynae: Dutta (Obs) / Shaw (Gynae) / Williams (ref)\n"
     "Paediatrics: Nelson (selective) / Ghai / OP Ghai\n"
     "Allied: Logan Turner (ENT), AK Khurana (Ophth), Maheshwari (Ortho)"),
    ("MCQ BANKS",
     "Marrow / DAMS / PrepLadder / ACROSS – target 100 MCQs/day minimum\n"
     "Subject-wise banks first; then mixed/grand tests"),
    ("CLINICAL SKILLS",
     "Daily bedside clinicals – history taking, examination, case presentation\n"
     "OSCE practice – at least 1 structured case per week per subject\n"
     "Common case lists: cardiac, respiratory, abdominal, neuro, obstetric"),
    ("REVISION STRATEGY",
     "Use spaced repetition (Anki or paper flashcards)\n"
     "Revise each topic at day 1, day 7, day 30 after first study\n"
     "Saturday mock tests – compulsory every week from Month 3 onwards"),
    ("EXAM PATTERN (typical)",
     "Theory: Long questions (20-30 marks) + Short questions (10-15 marks)\n"
     "Clinicals: Long case + Short cases + OSCE stations\n"
     "Viva: spot diagnoses, instruments, specimens, ECG/X-ray/CT"),
    ("HEALTH & WELLBEING",
     "Sleep ≥7 hours – non-negotiable for memory consolidation\n"
     "Exercise 30 min/day – proven to improve concentration\n"
     "Group study 2-3x/week for case discussions; solo study for theory"),
    ("WEEKLY TARGETS",
     "Cover 1 full topic/day with MCQ drill\n"
     "Write at least 2 long-answer style questions per week (timed)\n"
     "Sunday: light review only + meal prep + planning next week"),
    ("RED FLAGS (avoid)",
     "Skipping MCQ practice – theory alone is insufficient\n"
     "Neglecting clinicals – viva marks are critical for passing\n"
     "Starting revision too late – begin by Month 3, not Month 8"),
]

for ci, h in enumerate(["CATEGORY", "DETAIL"], start=1):
    c = ws5.cell(row=2, column=ci, value=h)
    c.font = Font(name="Arial", bold=True, size=10, color=HEADER_FG)
    c.fill = fill(HEADER_BG)
    c.alignment = Alignment(horizontal="center", vertical="center")
    c.border = thin_border()
ws5.row_dimensions[2].height = 20

tips_colors = [MED_BG, SUR_BG, OBG_BG, PAE_BG,
               ENT_BG, REV_BG, MED_BG, "FFE0E0"]
for ri, ((cat, detail), bg) in enumerate(zip(tips, tips_colors), start=3):
    ws5.row_dimensions[ri].height = 70
    cell_style(ws5, ri, 1, cat,    bg=bg, bold=True, font_size=9,
               wrap=True, valign="top")
    cell_style(ws5, ri, 2, detail, bg="FFFFFF", font_size=9,
               wrap=True, align="left", valign="top")

ws5.column_dimensions["A"].width = 24
ws5.column_dimensions["B"].width = 80

# ════════════════════════════════════════════════════════
#  SAVE
# ════════════════════════════════════════════════════════
out_path = "/home/daytona/workspace/mbbs-timetable/Final_Year_MBBS_Timetable.xlsx"
wb.save(out_path)
print(f"Saved to: {out_path}")
Running Command

python /home/daytona/workspace/mbbs-timetable/create_timetable.py

Editing File

~/mbbs-timetable/create_timetable.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mbbs-timetable/create_timetable.py'
Running Command

python /home/daytona/workspace/mbbs-timetable/create_timetable.py

Editing File

~/mbbs-timetable/create_timetable.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mbbs-timetable/create_timetable.py'
Running Command

python /home/daytona/workspace/mbbs-timetable/create_timetable.py

Editing File

~/mbbs-timetable/create_timetable.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/mbbs-timetable/create_timetable.py'
Running Command

python /home/daytona/workspace/mbbs-timetable/create_timetable.py

Running Command

ls -lh /home/daytona/workspace/mbbs-timetable/Final_Year_MBBS_Timetable.xlsx

Your timetable is ready. Download it here:

Final Year MBBS Timetable

Spreadsheet · XLSX


What's Inside (5 Sheets)

1. Weekly Timetable

Color-coded by subject - Mon (Medicine/blue), Tue (Surgery/green), Wed (OG/orange), Thu (Paeds/purple), Fri (Allied/yellow), Sat (Revision/pink). Each day has structured slots:
  • 7:00-8:00 AM: Self-reading
  • 8:00-9:00 AM: Lectures/Ward
  • 9:30-11:30 AM: Main study block
  • 1:00-2:30 PM: MCQ drill
  • 3:00-4:00 PM: Notes/flashcards

2. Topic Plan (44 topics across all subjects)

Week-by-week breakdown of every module with key sub-topics listed. Includes a "Status" column you can fill in as you complete each topic.

3. Daily Schedule Template

Hour-by-hour personal day plan from 5:30 AM to bedtime - customise it for each day.

4. 9-Month Planner (Jun 2026 - Feb 2027)

Month-by-month focus areas with goals. Structure:
  • Jun-Aug: Medicine + Surgery
  • Sep-Oct: Revision of M&S + start OG + Paeds
  • Nov-Dec: OG done, Paeds done, Allied started
  • Jan-Feb: Grand revision + mock exams

5. Tips & Strategy

Recommended books for each subject (Davidson's, Bailey & Love, Dutta, Ghai, etc.), MCQ bank strategy, clinical exam prep, revision techniques, and common pitfalls to avoid.

Quick tips to get started:
  • Start with Medicine (most weightage) alongside Surgery from Day 1
  • Do 100 MCQs daily from Week 1 - don't wait till "you've finished the chapter"
  • Never skip Saturday mock tests - they are your actual exam simulator
  • Clinicals/viva prep starts from Month 1, not just before exams
This is a shared conversation. Sign in to Orris to start your own chat.