Prepare notes of this in easy language and give It should cover all the points
| Parameter | Frequency |
|---|---|
| Pulse | Every 30 min |
| Blood Pressure (BP) | Every 1 hour |
| Temperature | Every 2 hours |
| Urine Output | Volume, protein, acetone |
| Any drug given (e.g. oxytocin) | Recorded in partograph |
Most important stage of labour - highest risk of complications (PPH)
Key Memory Points:
- Vaginal exam: minimum, indicated at specific times
- Maternal monitoring: Pulse every 30 min, BP every 1 hr, Temp every 2 hrs
- FHR: every 30 min in 1st stage, every 15 min in 2nd stage
- Delivery of head: Ritgen's manoeuvre, maintain flexion, episiotomy when needed
- Cord clamping: 6-10 cm from umbilicus, delayed in preterm
- AMTSL is the preferred method for 3rd stage
- Oxytocic injection must be given within 1 minute of delivery
Create a visual flowchart poster of the 3 stages of labour
A detailed medical education flowchart poster titled "Management of the 3 Stages of Labour" with a clean clinical design on a white background. The poster is divided into 3 vertical columns side by side, each representing one stage of labour. COLUMN 1 - "1st STAGE OF LABOUR" (blue theme): Header box: "1st Stage: Onset of Labour ā Full Cervical Dilatation (10 cm)" Subheader: "Latent phase (0-4 cm) + Active phase (4-10 cm)" Flowchart boxes with downward arrows: ā "Preliminaries: History, General + Obstetric Exam, Review ANC records" ā "General Care: Antiseptic dressing, Emotional support, Constant supervision" ā "Position: Ambulant if membranes intact. Avoid dorsal supine" ā "Diet: Fluids in early labour. No food in active labour" ā "Bladder Care: Encourage voiding. Catheterize if needed" ā "Pain Relief: Epidural analgesia (WHO recommended)" ā "Monitoring (Partograph): Pulse every 30 min | BP every 1 hr | Temp every 2 hrs | FHR every 30 min" ā "Vaginal Exam every 3-4 hrs: Cervical dilation, Station, Position, Liquor color, Moulding" COLUMN 2 - "2nd STAGE OF LABOUR" (green theme): Header box: "2nd Stage: Full Dilatation (10 cm) ā Delivery of Baby" Signs of entry box: "Stronger contractions, Bearing down urge, Complete dilatation" Flowchart boxes with downward arrows: ā "Patient in bed | FHR every 5 min | Inhalation analgesia" ā "Prepare for Delivery: Clean genitalia, Sterile drapes, Catheterize if bladder full" ā "DELIVERY OF HEAD: Maintain flexion, Ritgen's Manoeuvre, Episiotomy if needed, Slow delivery between contractions" ā "After Head: Clear airway, Wipe eyes, Check for nuchal cord" ā "DELIVERY OF SHOULDERS: Wait for restitution, Anterior then posterior shoulder" ā "DELIVERY OF TRUNK: Insert fingers under axillae, Lateral flexion" ā "Immediate Newborn Care: Clear airway, Apgar at 1 & 5 min, Cord clamping at 6-10 cm" COLUMN 3 - "3rd STAGE OF LABOUR" (orange/red theme): Header box: "3rd Stage: Delivery of Baby ā Delivery of Placenta" Warning banner: "ā Most Critical Stage ā Risk of PPH" Flowchart boxes: ā "2 Methods: Active Management (preferred) vs Expectant Management" ā "AMTSL Steps: 1. Give oxytocin within 1 min of delivery 2. Controlled cord traction 3. Uterine massage" ā "Advantages of AMTSL: Less blood loss, Shorter 3rd stage, Less maternal anaemia, Reduces PPH" ā "Check Placenta: Completeness, Cord vessels" ā "Identify Baby & Mother: Identification tape on both wrists" ā "Post-delivery monitoring: BP, Pulse, Bleeding, Uterine contraction" At the bottom, a horizontal summary timeline bar showing: "Labour begins ā 1st Stage (Cervical dilation) ā 2nd Stage (Expulsion) ā 3rd Stage (Placental delivery) ā Complete" Use medical illustration style with icons, color-coded boxes, clear bold headings, arrows connecting each step, professional typography.

Can you make pdf of whatever u have given till now and give me
mkdir -p /tmp/workspace/labour-notes && ls /tmp/workspace/
cd /tmp/workspace/labour-notes && python3 -c " import urllib.request url = 'https://cdn.orris.care/image-gen/aef8b31185764920a3b9a0d02af0b29e.png' urllib.request.urlretrieve(url, 'flowchart.png') print('Downloaded flowchart image') import os print('File size:', os.path.getsize('flowchart.png'), 'bytes') "
~/labour-notes/create_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, Image, PageBreak, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import ListFlowable, ListItem
PAGE_W, PAGE_H = A4
doc = SimpleDocTemplate(
"Management_of_Labour_Notes.pdf",
pagesize=A4,
leftMargin=1.8*cm, rightMargin=1.8*cm,
topMargin=2*cm, bottomMargin=2*cm
)
styles = getSampleStyleSheet()
# Custom styles
title_style = ParagraphStyle(
'MainTitle', fontSize=20, fontName='Helvetica-Bold',
textColor=colors.HexColor('#1a237e'), alignment=TA_CENTER,
spaceAfter=6, spaceBefore=4
)
subtitle_style = ParagraphStyle(
'SubTitle', fontSize=11, fontName='Helvetica',
textColor=colors.HexColor('#3949ab'), alignment=TA_CENTER,
spaceAfter=12
)
h1_style = ParagraphStyle(
'H1', fontSize=14, fontName='Helvetica-Bold',
textColor=colors.white, alignment=TA_LEFT,
spaceAfter=4, spaceBefore=10,
backColor=colors.HexColor('#1565c0'),
leftPadding=8, rightPadding=8, topPadding=5, bottomPadding=5
)
h2_style = ParagraphStyle(
'H2', fontSize=12, fontName='Helvetica-Bold',
textColor=colors.white, alignment=TA_LEFT,
spaceAfter=3, spaceBefore=8,
backColor=colors.HexColor('#1976d2'),
leftPadding=6, rightPadding=6, topPadding=4, bottomPadding=4
)
h3_style = ParagraphStyle(
'H3', fontSize=11, fontName='Helvetica-Bold',
textColor=colors.HexColor('#0d47a1'), alignment=TA_LEFT,
spaceAfter=3, spaceBefore=6,
borderPad=3
)
body_style = ParagraphStyle(
'Body', fontSize=9.5, fontName='Helvetica',
textColor=colors.HexColor('#212121'),
spaceAfter=3, spaceBefore=1, leading=14,
leftIndent=0
)
bullet_style = ParagraphStyle(
'Bullet', fontSize=9.5, fontName='Helvetica',
textColor=colors.HexColor('#212121'),
spaceAfter=2, spaceBefore=1, leading=13,
leftIndent=12, bulletIndent=0
)
note_style = ParagraphStyle(
'Note', fontSize=9, fontName='Helvetica-Oblique',
textColor=colors.HexColor('#e65100'),
spaceAfter=4, spaceBefore=4,
backColor=colors.HexColor('#fff8e1'),
leftPadding=8, rightPadding=8, topPadding=4, bottomPadding=4,
borderColor=colors.HexColor('#ffa000'), borderWidth=1, borderPad=4
)
green_h1 = ParagraphStyle(
'GreenH1', fontSize=14, fontName='Helvetica-Bold',
textColor=colors.white, alignment=TA_LEFT,
spaceAfter=4, spaceBefore=10,
backColor=colors.HexColor('#2e7d32'),
leftPadding=8, rightPadding=8, topPadding=5, bottomPadding=5
)
orange_h1 = ParagraphStyle(
'OrangeH1', fontSize=14, fontName='Helvetica-Bold',
textColor=colors.white, alignment=TA_LEFT,
spaceAfter=4, spaceBefore=10,
backColor=colors.HexColor('#e65100'),
leftPadding=8, rightPadding=8, topPadding=5, bottomPadding=5
)
def bullet(text, indent=12):
return Paragraph(f"⢠{text}", bullet_style)
def sub_bullet(text):
s = ParagraphStyle('subbullet', parent=bullet_style, leftIndent=24)
return Paragraph(f"ā {text}", s)
def h1(text): return Paragraph(text, h1_style)
def h2(text): return Paragraph(text, h2_style)
def h3(text): return Paragraph(text, h3_style)
def body(text): return Paragraph(text, body_style)
def sp(n=6): return Spacer(1, n)
def hr(): return HRFlowable(width="100%", thickness=1, color=colors.HexColor('#bbdefb'), spaceAfter=4, spaceBefore=4)
content = []
# āāā COVER / TITLE āāā
content.append(sp(20))
content.append(Paragraph("Management of Labour", title_style))
content.append(Paragraph("Complete Study Notes with Flowchart Poster", subtitle_style))
content.append(HRFlowable(width="100%", thickness=3, color=colors.HexColor('#1565c0'), spaceAfter=10, spaceBefore=2))
content.append(sp(8))
# AIM
content.append(h1("AIM OF MANAGEMENT OF LABOUR"))
content.append(sp(4))
content.append(bullet("Watch carefully with <b>minimum interference</b> in the natural process"))
content.append(bullet("Keep everything <b>normal</b> and catch any problem <b>as early as possible</b>"))
content.append(sp(4))
# INDICATIONS FOR VE
content.append(h1("INDICATIONS FOR VAGINAL EXAMINATION IN NORMAL LABOUR"))
content.append(sp(4))
content.append(body("<b>Keep vaginal exams to a minimum.</b> Do it only when:"))
content.append(sp(3))
content.append(bullet("<b>At onset of labour</b> ā To confirm labour has started, find presenting part position"))
content.append(bullet("<b>During progress of labour</b> ā Every <b>3ā4 hours</b>: check cervical dilation and station"))
content.append(bullet("<b>After rupture of membranes</b> ā To rule out cord prolapse"))
content.append(bullet("<b>To confirm 2nd stage</b> ā Full dilatation (10 cm)"))
content.append(sp(6))
# 1ST STAGE
content.append(Paragraph("MANAGEMENT OF 1st STAGE OF LABOUR", h1_style))
content.append(sp(4))
content.append(h3("Principles"))
content.append(bullet("<b>Non-interference</b> ā watchful expectancy for natural birth"))
content.append(bullet("<b>Monitor carefully</b> ā labour progress, maternal (Pulse/BP), fetal (FHR), detect complications early"))
content.append(sp(4))
content.append(h2("PRELIMINARIES (On Admission)"))
content.append(bullet("Basic clinical evaluation of current condition"))
content.append(bullet("Ask about onset of labour pains / any leakage of liquor"))
content.append(bullet("Thorough general + obstetrical exam including vaginal exam ā record all findings"))
content.append(bullet("Review antenatal visit records, investigation reports, medicines given"))
content.append(sp(4))
content.append(h2("ACTUAL MANAGEMENT"))
content.append(sp(3))
content.append(h3("A) General Care"))
content.append(bullet("Antiseptic dressing"))
content.append(bullet("Emotional support, encouragement and assurance to the mother"))
content.append(bullet("Constant supervision"))
content.append(sp(3))
content.append(h3("B) Position"))
content.append(bullet("In early normal labour, <b>mother need NOT stay in bed</b>"))
content.append(bullet("If in bed ā use the <b>most comfortable position</b>"))
content.append(bullet("<b>Avoid dorsal supine position</b> (compresses major vessels)"))
content.append(sp(3))
content.append(h3("C) Bowel"))
content.append(bullet("<b>Enema is NOT recommended</b>"))
content.append(sp(3))
content.append(h3("D) Ambulation (Walking)"))
content.append(bullet("If membranes are intact ā patient is <b>allowed to walk</b>"))
content.append(sp(3))
content.append(h3("E) Diet"))
content.append(bullet("<b>Early labour:</b> Plain water or fruit juice allowed"))
content.append(bullet("<b>Active labour:</b> Food is <b>withheld</b> (in case surgery is needed)"))
content.append(sp(3))
content.append(h3("F) Bladder Care"))
content.append(bullet("Encourage patient to pass urine regularly"))
content.append(bullet("If she cannot pass urine (esp. in late 1st stage) ā <b>Catheterization</b>"))
content.append(sp(3))
content.append(h3("G) Pain Relief"))
content.append(bullet("<b>Epidural analgesia</b> recommended if mother asks for it (WHO recommendation)"))
content.append(sp(6))
# MONITORING TABLE
content.append(h2("ASSESSMENT OF PROGRESS & PARTOGRAPH RECORDING"))
content.append(sp(4))
monitor_data = [
['Parameter', 'Frequency / Details'],
['Pulse', 'Every 30 minutes'],
['Blood Pressure (BP)', 'Every 1 hour'],
['Temperature', 'Every 2 hours'],
['Urine Output', 'Volume, protein, acetone'],
['Any drug (e.g. Oxytocin)', 'Record immediately in partograph'],
['FHR (Fetal Heart Rate)', '1st stage: every 30 min | 2nd stage: every 15 min'],
]
t = Table(monitor_data, colWidths=[7*cm, 10.5*cm])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1565c0')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('FONTSIZE', (0,0), (-1,-1), 9.5),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e3f2fd'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#90caf9')),
('PADDING', (0,0), (-1,-1), 6),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
content.append(t)
content.append(sp(6))
content.append(h2("ABDOMINAL PALPATION"))
content.append(bullet("<b>a) Uterine contractions:</b> Frequency, intensity, duration ā No. of contractions in 10 min and duration in seconds recorded in partograph"))
content.append(bullet("<b>Labour progress:</b> Cervical dilatation from 5 cm to 10 cm"))
content.append(bullet("<b>b) Pelvic grip:</b> Descent of fetal head in fifths above the brim"))
content.append(bullet("<b>c) Shifting of fetal heart beat:</b> Moves downward and medially = descending fetus"))
content.append(sp(4))
content.append(h2("VAGINAL EXAMINATION FINDINGS"))
content.append(bullet("<b>a)</b> Dilatation of cervix in cm"))
content.append(bullet("<b>b)</b> Position of head and degree of flexion"))
content.append(bullet("<b>c)</b> Station of head in relation to ischial spines"))
content.append(bullet("<b>d)</b> Colour of liquor ā clear OR meconium-stained (if membranes ruptured)"))
content.append(bullet("<b>e)</b> Degree of moulding of the head"))
content.append(sp(4))
content.append(h2("SIGNS OF MATERNAL DISTRESS ā "))
content.append(Paragraph(
"Watch for: Anxious look | Pulse ā„ 100/min | Dehydration, dry tongue | Hot dry vagina | "
"Acetone smell in breath | Scanty high-coloured urine with acetone",
note_style
))
content.append(sp(8))
# 2ND STAGE
content.append(Paragraph("MANAGEMENT OF 2nd STAGE OF LABOUR", green_h1))
content.append(sp(4))
content.append(h3("Signs of Transition from 1st to 2nd Stage"))
content.append(bullet("Stronger / more intense uterine contractions"))
content.append(bullet("Bearing down efforts (involuntary pushing urge)"))
content.append(bullet("Urge to push or defecate with descent of presenting part"))
content.append(bullet("Complete dilatation of cervix (10 cm) on vaginal exam"))
content.append(sp(4))
content.append(h3("Principles"))
content.append(bullet("Help baby come out <b>slowly and steadily</b>"))
content.append(bullet("<b>Prevent perineal injuries</b>"))
content.append(sp(4))
content.append(h2("GENERAL MEASURES"))
content.append(bullet("Patient <b>must be in bed</b>"))
content.append(bullet("<b>Constant supervision</b> is mandatory; FHR recorded every <b>5 minutes</b>"))
content.append(bullet("Administer <b>inhalation analgesia</b> to relieve pain during contractions"))
content.append(bullet("<b>Vaginal exam at start of 2nd stage</b> ā confirm onset, detect cord prolapse, note descent"))
content.append(sp(4))
content.append(h2("PREPARATION FOR DELIVERY"))
content.append(bullet("<b>Position:</b> Lateral, squatting or partial sitting (45°). Dorsal with <b>15° left lateral tilt</b> is commonly used"))
content.append(bullet("Attendant stands on the right side"))
content.append(bullet("Clean (toilet) external genitalia + inner thighs with cotton swabs in Savlon/Dettol"))
content.append(bullet("Place one sterile sheet under buttocks, one over abdomen"))
content.append(bullet("<b>Catheterize bladder</b> if full"))
content.append(sp(6))
content.append(h2("CONDUCTION OF DELIVERY ā 3 PHASES"))
content.append(sp(4))
content.append(h3("Phase 1: Delivery of Head"))
content.append(body("<b>Principles:</b> Maintain flexion | Prevent early extension | Regulate slow escape through vulval outlet"))
content.append(sp(3))
content.append(bullet("Encourage mother to <b>bear down during contractions</b>"))
content.append(bullet("When scalp visible ~5 cm ā maintain flexion using <b>thumb + index finger of left hand</b> on occiput"))
content.append(bullet("Press perineum with right palm + sterile vulval pad = <b>Ritgen's Manoeuvre</b> (prevents laceration)"))
content.append(bullet("Repeat until sub-occiput is under pubic symphysis ā <b>Crowning</b>"))
content.append(bullet("When perineum fully stretched ā <b>Episiotomy</b> after <b>10 ml of 1% Lignocaine</b>"))
content.append(bullet("<b>Slow delivery of head between contractions</b>"))
content.append(bullet("Forehead ā nose ā mouth ā chin delivered by <b>extension</b>"))
content.append(sp(4))
content.append(h3("Care Immediately After Delivery of Head"))
content.append(bullet("Wipe <b>mucus and blood</b> from mouth and pharynx with sterile gauze on little finger"))
content.append(bullet("Wipe <b>eyelids</b> with dry sterile cotton swabs ā medial to lateral canthus"))
content.append(bullet("Palpate <b>neck for nuchal cord:</b>"))
content.append(sub_bullet("Loose ā slip it over the head"))
content.append(sub_bullet("Tight ā cut between 2 Kocher's forceps placed 1 inch apart"))
content.append(sp(4))
content.append(h3("Prevention of Perineal Laceration"))
content.append(bullet("Avoid early extension of head"))
content.append(bullet("Avoid forcible/spontaneous rapid delivery"))
content.append(bullet("Deliver head <b>between contractions</b>"))
content.append(bullet("Perform <b>timely episiotomy</b> when indicated"))
content.append(bullet("Take care during delivery of shoulders"))
content.append(sp(4))
content.append(h3("Phase 2: Delivery of Shoulders"))
content.append(bullet("<b>Do NOT rush</b> ā wait for next uterine contraction"))
content.append(bullet("Let <b>restitution and external rotation</b> of head occur naturally"))
content.append(bullet("Bisacromial diameter aligns with ant-post diameter of pelvis"))
content.append(bullet("Anterior shoulder born <b>spontaneously</b> with next contraction"))
content.append(bullet("If delayed ā grasp head with both hands, draw <b>posteriorly</b> until anterior shoulder released from under pubis"))
content.append(bullet("Draw head <b>upward</b> ā posterior shoulder delivered over perineum"))
content.append(sp(4))
content.append(h3("Phase 3: Delivery of Trunk"))
content.append(bullet("Insert <b>forefingers of each hand</b> under the axillae"))
content.append(bullet("Trunk delivered gently by <b>lateral flexion</b>"))
content.append(sp(6))
content.append(h2("IMMEDIATE CARE OF NEWBORN"))
content.append(bullet("Place baby on tray with clean dry linen, <b>head slightly down (15°)</b>"))
content.append(bullet("Tray at <b>lower level than uterus</b> ā for gravitational blood flow from placenta to infant"))
content.append(bullet("<b>Clear the airway</b>"))
content.append(bullet("<b>Apgar score</b> at <b>1 minute</b> and <b>5 minutes</b>"))
content.append(sp(4))
content.append(h3("Clamping and Ligature of the Cord"))
content.append(bullet("Clamp with <b>2 Kocher's forceps</b> ā nearer one <b>6ā10 cm from umbilicus</b>, cut in between"))
content.append(bullet("Check for abnormality in cord vessels"))
content.append(bullet("<b>Delayed clamping:</b> Preterm neonates"))
content.append(bullet("<b>Early clamping:</b> Rh incompatibility, asphyxiated baby"))
content.append(bullet("Quick check for gross abnormalities"))
content.append(bullet("Wrap in <b>dry warm towel</b>"))
content.append(bullet("<b>Identification tape</b> on wrist of baby AND mother"))
content.append(sp(8))
# 3RD STAGE
content.append(Paragraph("MANAGEMENT OF 3rd STAGE OF LABOUR", orange_h1))
content.append(sp(4))
content.append(Paragraph(
"ā MOST CRITICAL STAGE OF LABOUR ā Highest risk of PPH (Postpartum Haemorrhage)",
note_style
))
content.append(sp(4))
content.append(body("<b>Principle:</b> Strict vigilance + follow management guidelines to <b>prevent PPH</b>"))
content.append(sp(4))
content.append(h2("TWO METHODS OF MANAGEMENT"))
content.append(bullet("<b>1. Active Management (AMTSL) ā Preferred</b>"))
content.append(bullet("2. Expectant Management"))
content.append(sp(4))
content.append(h3("Active Management of 3rd Stage of Labour (AMTSL)"))
content.append(body("<i>Involves: Separation of placenta ā Controlled contraction ā Delivery of placenta</i>"))
content.append(sp(3))
content.append(body("<b>Principle:</b> Stimulate powerful uterine contractions within <b>1 minute of baby's delivery</b> by giving <b>parenteral oxytocic drug</b>"))
content.append(sp(4))
amtsl_data = [
['AMTSL Steps'],
['1. Give oxytocin injection within 1 minute of delivery'],
['2. Controlled cord traction (Brandt-Andrews manoeuvre)'],
['3. Uterine massage after placental delivery'],
]
t2 = Table(amtsl_data, colWidths=[17.5*cm])
t2.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#e65100')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('FONTSIZE', (0,0), (-1,-1), 9.5),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#fff3e0'), colors.HexColor('#ffe0b2')]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ffb74d')),
('PADDING', (0,0), (-1,-1), 7),
]))
content.append(t2)
content.append(sp(6))
content.append(h3("Advantages of AMTSL"))
content.append(bullet("Minimizes <b>blood loss</b> in 3rd stage"))
content.append(bullet("Shortens the <b>duration</b> of 3rd stage"))
content.append(bullet("Reduces <b>maternal anaemia</b>"))
content.append(bullet("Decreases <b>incidence of PPH</b>"))
content.append(sp(8))
# QUICK REVISION BOX
content.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#1565c0'), spaceAfter=6))
content.append(h2("ā” QUICK REVISION ā KEY POINTS"))
content.append(sp(4))
key_data = [
['Parameter', 'Value / Detail'],
['Vaginal exam interval (1st stage)', 'Every 3ā4 hours'],
['Pulse monitoring', 'Every 30 minutes'],
['BP monitoring', 'Every 1 hour'],
['Temperature monitoring', 'Every 2 hours'],
['FHR ā 1st stage', 'Every 30 minutes'],
['FHR ā 2nd stage', 'Every 15 minutes (or after ROM)'],
['FHR ā 2nd stage (delivery room)', 'Every 5 minutes'],
['Cord clamping distance', '6ā10 cm from umbilicus'],
['Episiotomy anaesthesia', '10 ml of 1% Lignocaine'],
['Oxytocin timing (AMTSL)', 'Within 1 minute of baby delivery'],
['Apgar score timing', '1 minute and 5 minutes after birth'],
['Position in 2nd stage', 'Dorsal with 15° left lateral tilt'],
]
t3 = Table(key_data, colWidths=[9*cm, 8.5*cm])
t3.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#283593')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('FONTSIZE', (0,0), (-1,-1), 9),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8eaf6'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#9fa8da')),
('PADDING', (0,0), (-1,-1), 6),
('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'),
]))
content.append(t3)
content.append(sp(8))
# FLOWCHART PAGE
content.append(PageBreak())
content.append(Paragraph("VISUAL FLOWCHART: 3 Stages of Labour", title_style))
content.append(HRFlowable(width="100%", thickness=3, color=colors.HexColor('#1565c0'), spaceAfter=16, spaceBefore=4))
# Insert image
from PIL import Image as PILImage
img_path = "flowchart.png"
pil_img = PILImage.open(img_path)
iw, ih = pil_img.size
available_w = PAGE_W - 3.6*cm
available_h = PAGE_H - 8*cm
ratio = min(available_w / iw, available_h / ih)
draw_w = iw * ratio
draw_h = ih * ratio
img = Image(img_path, width=draw_w, height=draw_h)
img.hAlign = 'CENTER'
content.append(img)
doc.build(content)
print("PDF created successfully!")
cd /tmp/workspace/labour-notes && python3 create_pdf.py 2>&1
ls -lh /tmp/workspace/labour-notes/Management_of_Labour_Notes.pdf
Management of Labour Notes
PDF Document Ā· PDF