attachment
attachment

Pdf of mlc template is provides use 2 images attached to make mlc summary for the patient mentioned in 2 pages

Checking Date & Time
Reading File
Running Command

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

Running Command

mkdir -p /home/daytona/workspace/mlc-jehanbanu && python3 << 'EOF' from reportlab.lib.pagesizes import A4 from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import mm, cm from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable from reportlab.lib import colors from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY from reportlab.platypus import KeepTogether doc = SimpleDocTemplate( "/home/daytona/workspace/mlc-jehanbanu/MLC_Jehanbanu_45F.pdf", pagesize=A4, rightMargin=20*mm, leftMargin=20*mm, topMargin=20*mm, bottomMargin=20*mm ) styles = getSampleStyleSheet() title_style = ParagraphStyle( 'Title', parent=styles['Normal'], fontSize=13, fontName='Helvetica-Bold', alignment=TA_CENTER, spaceAfter=4 ) center_style = ParagraphStyle( 'Center', parent=styles['Normal'], fontSize=11, fontName='Helvetica-Bold', alignment=TA_CENTER, spaceAfter=2 ) bold_style = ParagraphStyle( 'Bold', parent=styles['Normal'], fontSize=10, fontName='Helvetica-Bold', spaceBefore=4, spaceAfter=2 ) normal_style = ParagraphStyle( 'Body', parent=styles['Normal'], fontSize=10, fontName='Helvetica', spaceBefore=2, spaceAfter=2, leading=14 ) heading_style = ParagraphStyle( 'Heading', parent=styles['Normal'], fontSize=10, fontName='Helvetica-Bold', spaceBefore=6, spaceAfter=2, underlineWidth=0.5 ) small_style = ParagraphStyle( 'Small', parent=styles['Normal'], fontSize=9, fontName='Helvetica', spaceBefore=1, spaceAfter=1, leading=12 ) story = [] # ── HEADER ────────────────────────────────────────────────────────────────── story.append(Paragraph("MEDICO-LEGAL CASE (MLC) SUMMARY", title_style)) story.append(HRFlowable(width="100%", thickness=1.5, color=colors.black)) story.append(Spacer(1, 4*mm)) # Patient Demographics Table demo_data = [ [Paragraph("<b>NAME:</b>", normal_style), Paragraph("JEHANBANU", normal_style), Paragraph("<b>AGE/SEX:</b>", normal_style), Paragraph("45 YEARS / FEMALE", normal_style)], [Paragraph("<b>DATE:</b>", normal_style), Paragraph("27/04/2026", normal_style), Paragraph("<b>REFERRED FROM:</b>", normal_style), Paragraph("NIRMAN HOSPITAL", normal_style)], [Paragraph("<b>MLC NO.:</b>", normal_style), Paragraph("________________", normal_style), Paragraph("<b>DEPARTMENT:</b>", normal_style), Paragraph("EMERGENCY / MEDICINE", normal_style)], ] demo_table = Table(demo_data, colWidths=[38*mm, 55*mm, 38*mm, 55*mm]) demo_table.setStyle(TableStyle([ ('BOX', (0,0), (-1,-1), 0.8, colors.black), ('INNERGRID', (0,0), (-1,-1), 0.5, colors.grey), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('BACKGROUND', (0,0), (-1,-1), colors.whitesmoke), ('ROWBACKGROUNDS', (0,0), (-1,-1), [colors.white, colors.HexColor('#f5f5f5')]), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ])) story.append(demo_table) story.append(Spacer(1, 4*mm)) # ── INFORMANT ────────────────────────────────────────────────────────────── story.append(Paragraph("INFORMANT: NOT SPECIFIED (REFERRED FROM NIRMAN HOSPITAL)", normal_style)) story.append(HRFlowable(width="100%", thickness=0.5, color=colors.grey)) story.append(Spacer(1, 3*mm)) # ── ALLEGED HISTORY ──────────────────────────────────────────────────────── story.append(Paragraph("ALLEGED HISTORY / REASON FOR REFERRAL", heading_style)) story.append(Paragraph( "Patient was admitted at Nirman Hospital from <b>15/04/2026 to 25/04/2026</b> with diagnosis of " "<b>Meningoencephalitis</b> (Blood C/S positive) and <b>Tuberculous Meningitis</b> (CSF ADA = 27). " "CSF tapping was performed. Patient was referred to this hospital for further management.", normal_style )) story.append(Paragraph( "Additionally, patient had alleged <b>H/O Road Traffic Accident (RTA)</b> — motor vehicle accident at <b>6:00 AM, " "04/01/2026</b>, at Nirman Limbdi, Suchi area / Paldi road. Sustained <b>left eye injury</b>.", normal_style )) story.append(Spacer(1, 2*mm)) # ── PRESENTING COMPLAINTS ───────────────────────────────────────────────── story.append(Paragraph("PRESENTING COMPLAINTS", heading_style)) complaints = [ ["1.", "Altered sensorium in the form of reduced responsiveness — onset 10 PM, previous night (01/04/25); patient was relatively asymptomatic before this."], ["2.", "Low grade fever without chills and rigors — since 2 days."], ["3.", "Loss of weight (approximately 2–3 kg) — over last 2–3 months."], ["4.", "Headache — since 15 days."], ["5.", "History of 8–10 episodes of vomiting — 10 days ago."], ] for c in complaints: story.append(Paragraph(f"{c[0]} {c[1]}", normal_style)) story.append(Spacer(1, 2*mm)) # ── NEGATIVE HISTORY ────────────────────────────────────────────────────── story.append(Paragraph("HISTORY NOT SIGNIFICANT FOR", heading_style)) story.append(Paragraph( "Seizures | Loss of consciousness (LOC) | Pedal edema | Chest pain | Cough | " "Tuberculosis | RT | COVID-19 | Jaundice | Addictions | Carcinoma", normal_style )) story.append(Spacer(1, 2*mm)) # ── PAST HISTORY ───────────────────────────────────────────────────────── story.append(Paragraph("PAST HISTORY / TREATMENT HISTORY", heading_style)) story.append(Paragraph( "Previous operative history: <b>Present (details not available)</b>. " "Haemoglobin was reportedly 8 g/dL. " "Admitted at Nirman Hospital from 15/04/2026 to 25/04/2026 for meningoencephalitis / tuberculous meningitis; " "CSF tapping performed there.", normal_style )) story.append(Spacer(1, 2*mm)) # ── OUTSIDE INVESTIGATIONS ──────────────────────────────────────────────── story.append(Paragraph("OUTSIDE INVESTIGATIONS (NIRMAN HOSPITAL — 15/04/2026)", heading_style)) inv_data = [ [Paragraph("<b>Investigation</b>", bold_style), Paragraph("<b>Result</b>", bold_style)], ["CBC (Hb/TLC/Plt)", "8.9 / 12.3 / 77"], ["CRP", "106"], ["CSF Appearance", "Slightly turbid"], ["CSF Protein", "353 mg/dL"], ["CSF Glucose", "22 mg/dL"], ["CSF TC (TLC)", "800 cells/μL (Poly/Lympho = 90/30)"], ["CSF GenXpert (CFT)", "N/SS (Negative)"], ["CSF ADA", "27 U/L"], ["Peripheral smear", "Poikilocytosis, Anisocytosis, Anisopoikilocytosis; Drop cells, Elliptyrocytes noted"], ] # 23/4/26 repeat labs repeat_data = [ [Paragraph("<b>Investigation (23/04/2026)</b>", bold_style), Paragraph("<b>Result</b>", bold_style)], ["Potassium (K)", "2.94 mEq/L"], ["Sodium (Na)", "131 mEq/L"], ["SGPT", "63 U/L"], ["Uric Acid", "2.53 mg/dL"], ["CBC (Hb/TLC/Plt)", "7.6 / 188 / 193"], ["CRP", "106"], ] inv_table = Table(inv_data, colWidths=[80*mm, 100*mm]) inv_table.setStyle(TableStyle([ ('BOX', (0,0), (-1,-1), 0.8, colors.black), ('INNERGRID', (0,0), (-1,-1), 0.4, colors.grey), ('BACKGROUND', (0,0), (1,0), colors.HexColor('#dce6f1')), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 3), ('BOTTOMPADDING', (0,0), (-1,-1), 3), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f9f9f9')]), ])) story.append(inv_table) story.append(Spacer(1, 2*mm)) rep_table = Table(repeat_data, colWidths=[80*mm, 100*mm]) rep_table.setStyle(TableStyle([ ('BOX', (0,0), (-1,-1), 0.8, colors.black), ('INNERGRID', (0,0), (-1,-1), 0.4, colors.grey), ('BACKGROUND', (0,0), (1,0), colors.HexColor('#dce6f1')), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 3), ('BOTTOMPADDING', (0,0), (-1,-1), 3), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f9f9f9')]), ])) story.append(rep_table) story.append(Spacer(1, 3*mm)) # ── VITALS ON ADMISSION ─────────────────────────────────────────────────── story.append(Paragraph("VITALS ON ADMISSION (TO THIS HOSPITAL)", heading_style)) vitals_data = [ [Paragraph("<b>Parameter</b>", bold_style), Paragraph("<b>Value</b>", bold_style)], ["Temperature", "100.5°F"], ["Pulse Rate", "90/min"], ["Respiratory Rate", "28/min (GASPING)"], ["Blood Pressure", "122/70 mmHg"], ["SpO₂", "50% on Room Air → 77–100% on VCM (Ventilator)"], ] vitals_table = Table(vitals_data, colWidths=[80*mm, 100*mm]) vitals_table.setStyle(TableStyle([ ('BOX', (0,0), (-1,-1), 0.8, colors.black), ('INNERGRID', (0,0), (-1,-1), 0.4, colors.grey), ('BACKGROUND', (0,0), (1,0), colors.HexColor('#dce6f1')), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 3), ('BOTTOMPADDING', (0,0), (-1,-1), 3), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f9f9f9')]), ])) story.append(vitals_table) story.append(Spacer(1, 3*mm)) # ── SYSTEMIC EXAMINATION ────────────────────────────────────────────────── story.append(Paragraph("SYSTEMIC EXAMINATION ON ADMISSION", heading_style)) exam_data = [ [Paragraph("<b>System</b>", bold_style), Paragraph("<b>Findings</b>", bold_style)], ["Respiratory System (RS)", "Bilateral Air Entry — Clear"], ["Cardiovascular System (CVS)", "S1 S2 — Not audible (S1S2 = 0)"], ["Central Nervous System (CNS)", "GCS: E1V1M1 — Intubated (deeply unconscious)"], ["Pupils", "Not documented / Intubated"], ["Plantar Response", "Bilateral Flexor"], ["Power / Tone", "Not assessable (intubated); Tone 1/6"], ] exam_table = Table(exam_data, colWidths=[80*mm, 100*mm]) exam_table.setStyle(TableStyle([ ('BOX', (0,0), (-1,-1), 0.8, colors.black), ('INNERGRID', (0,0), (-1,-1), 0.4, colors.grey), ('BACKGROUND', (0,0), (1,0), colors.HexColor('#dce6f1')), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 3), ('BOTTOMPADDING', (0,0), (-1,-1), 3), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, colors.HexColor('#f9f9f9')]), ])) story.append(exam_table) story.append(Spacer(1, 3*mm)) # ── PROVISIONAL DIAGNOSIS ───────────────────────────────────────────────── story.append(Paragraph("PROVISIONAL DIAGNOSIS", heading_style)) story.append(Paragraph( "1. <b>Tuberculous Meningitis (TBM)</b> — CSF ADA elevated (27 U/L), CSF protein markedly raised (353 mg/dL), " "CSF glucose low (22 mg/dL), CSF TC = 800 cells with lymphocytic predominance.<br/>" "2. <b>Meningoencephalitis</b> (Blood culture positive — organism pending).<br/>" "3. <b>Anaemia</b> — Hb 7.6–8.9 g/dL with peripheral smear showing poikilocytosis and anisocytosis.<br/>" "4. <b>Hypokalaemia</b> — K = 2.94 mEq/L.<br/>" "5. <b>Hyponatraemia</b> — Na = 131 mEq/L.<br/>" "6. <b>H/O RTA with left eye injury</b> — 04/01/2026.", normal_style )) story.append(Spacer(1, 3*mm)) # ── MANAGEMENT ──────────────────────────────────────────────────────────── story.append(Paragraph("MANAGEMENT / TREATMENT GIVEN", heading_style)) story.append(Paragraph( "Patient intubated and on mechanical ventilation (VCM). " "Syrup Glycerol given (as anti-cerebral oedema measure). " "Paracetamol administered. " "Admitted under ICU care for monitoring and further anti-tubercular and antimicrobial management. " "I/O monitoring commenced.", normal_style )) story.append(Spacer(1, 4*mm)) # ── SIGNATURE BOX ───────────────────────────────────────────────────────── story.append(HRFlowable(width="100%", thickness=0.8, color=colors.black)) story.append(Spacer(1, 3*mm)) sig_data = [ [Paragraph("Prepared by (Doctor's Name & Signature):", small_style), Paragraph("Date & Time:", small_style)], [Paragraph("____________________________", small_style), Paragraph("____________________________", small_style)], [Paragraph("Designation:", small_style), Paragraph("Hospital Stamp:", small_style)], [Paragraph("____________________________", small_style), Paragraph("____________________________", small_style)], ] sig_table = Table(sig_data, colWidths=[93*mm, 93*mm]) sig_table.setStyle(TableStyle([ ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 3), ('BOTTOMPADDING', (0,0), (-1,-1), 3), ])) story.append(sig_table) story.append(Spacer(1, 2*mm)) story.append(Paragraph( "<i>This MLC summary has been prepared based on the available clinical notes and outside investigation records. " "All information is as documented; any additional findings to be appended after further evaluation.</i>", ParagraphStyle('italic', parent=styles['Normal'], fontSize=8, fontName='Helvetica-Oblique', alignment=TA_CENTER, textColor=colors.grey) )) doc.build(story) print("PDF created successfully.") EOF

Running Command

ls -lh /home/daytona/workspace/mlc-jehanbanu/

The MLC Summary PDF is ready for download:

MLC Jehanbanu 45F

PDF Document · PDF


Here is a summary of what was compiled into the MLC document:

MLC SUMMARY — JEHANBANU, 45 Y/F

Referred from: Nirman Hospital
Alleged History / Reason for Referral:
  • Admitted at Nirman Hospital (15/04/2026 – 25/04/2026) with Meningoencephalitis (Blood C/S positive) and Tuberculous Meningitis (CSF ADA = 27); CSF tapping performed there.
  • Additional alleged H/O RTA (motor vehicle accident, 6:00 AM, 04/01/2026) with left eye injury.
Presenting Complaints:
  1. Altered sensorium (reduced responsiveness) — onset 10 PM night prior (patient was asymptomatic before)
  2. Low grade fever without chills/rigors — 2 days
  3. Weight loss ~2–3 kg — last 2–3 months
  4. Headache — 15 days
  5. 8–10 episodes of vomiting — 10 days ago
Outside Investigations (Nirman Hospital):
CBCHb 8.9 / TLC 12.3 / Plt 77
CSF Protein353 mg/dL
CSF Glucose22 mg/dL
CSF TC800 cells (Poly:Lympho = 90:30)
CSF ADA27 U/L
CSF GenXpertNegative
CRP106
Peripheral smearPoikilocytosis, Anisocytosis
Repeat CBC (23/4)Hb 7.6 / TLC 188 / Plt 193
K / Na2.94 / 131 mEq/L
Vitals on Admission:
  • T: 100.5°F | P: 90/min | RR: 28/min (gasping) | BP: 122/70 mmHg
  • SpO₂: 50% RA → 77–100% on ventilator
CNS: GCS E1V1M1 — Intubated; Plantar B/L Flexor; Tone 1/6
Provisional Diagnosis: Tuberculous Meningitis | Meningoencephalitis | Anaemia | Hypokalaemia | Hyponatraemia | H/O RTA with left eye injury

Note: Some handwriting in the images was partially illegible (notably the right-side vitals column in image 2 and some abbreviations). Please review and correct any entries before official submission.
This is a shared conversation. Sign in to Orris to start your own chat.