I am collecting data of spo2 monitoring in delivery room for all neonates born. Can you suggest me a QIP, clinical audit topic for the same
SpO2 monitoring delivery room neonates oxygen saturation
QIP clinical audit SpO2 pulse oximetry neonatal delivery room quality improvement project
pulse oximetry neonatal resuscitation delivery room oxygen saturation targets
neonatal SpO2 delivery room audit standards pre-ductal saturation normal values NRP ILCOR 2024 2025
"To ensure that pre-ductal SpO2 monitoring is initiated within 2 minutes of birth in ≥90% of all neonates born in [your unit], and that FiO2 adjustments are documented in response to out-of-range readings, within 6 months."
"To audit current delivery room SpO2 monitoring practice against NRP/ILCOR 2024 standards across all live births over a 3-month period."
| # | Standard | Target |
|---|---|---|
| 1 | Pulse oximeter applied to right hand (pre-ductal) within 2 minutes of birth for all neonates requiring any intervention | 100% |
| 2 | Pulse oximeter applied for all neonates (including well babies) for CCHD screening before discharge | 100% |
| 3 | SpO2 documented at 1, 2, 3, 5, and 10 minutes of life for neonates receiving respiratory support | ≥90% |
| 4 | FiO2 adjusted when SpO2 falls outside target range at any time point | 100% |
| 5 | Pre-ductal SpO2 targets met (NRP table): 60-65% at 1 min, 65-70% at 2 min, 70-75% at 3 min, 75-80% at 4 min, 80-85% at 5 min, 85-95% at 10 min | ≥80% of eligible neonates |
| 6 | SpO2 probe placement documented in delivery records | ≥95% |
| 7 | Neonates with SpO2 <90% at 10 min referred to neonatal team / escalated | 100% |
| 8 | CCHD screening SpO2 (pre- and post-ductal) performed before discharge or at 24 h in well babies | ≥95% |
"Delivery Room SpO2 Monitoring in Neonates: A Closed-Loop Clinical Audit and Quality Improvement Initiative at [Hospital Name]"
This audit is according to WHO guidelines or NRP guidelines?
WHO guidelines neonatal resuscitation SpO2 oxygen saturation delivery room 2024 2025
WHO neonatal resuscitation guidelines oxygen saturation delivery room
| Feature | NRP / ILCOR | WHO (HBB / Essential Newborn Care) |
|---|---|---|
| Primary tool | Pulse oximeter + blended O2 | Clinical assessment (color, tone, cry) |
| SpO2 targets | Specific minute-by-minute table | Not specified - not required |
| Oxygen use | Start at 21% (term), titrate by SpO2 | Use oxygen only if available; room air preferred |
| Technology assumed | Pulse oximeter mandatory for any resuscitation | Pulse oximeter is recommended but NOT mandatory |
| Main program | NRP 8th edition | Helping Babies Breathe (HBB) 2nd edition |
| Setting | Any hospital with equipment | Health facilities of all resource levels |
"This audit benchmarks delivery room SpO2 monitoring against NRP/ILCOR 2025 standards, which represent international best practice and are endorsed by national societies including [NNF India / RCPCH UK / AAP USA]. WHO HBB guidelines do not specify pre-ductal SpO2 targets and are primarily designed for low-resource settings."
"Audit standards were based on NRP (AAP, 8th edition) and ILCOR 2025 Consensus on Science With Treatment Recommendations (Liley et al., Circulation 2025), which define targeted pre-ductal SpO2 values during neonatal transition. WHO Helping Babies Breathe guidelines were not used as the primary standard as they do not specify SpO2 targets and are designed for low-resource settings without pulse oximetry infrastructure."
If o include temperature at birth and after one hour does this help and improve clinical audit?
neonatal hypothermia delivery room temperature admission quality improvement
neonatal temperature at birth one hour WHO NRP standard 36.5 37.5 delivery room thermoregulation audit
| Guideline | Temperature Target |
|---|---|
| WHO (Thermal Protection of the Newborn) | 36.5 - 37.5°C after birth |
| NRP / AAP | 36.5 - 37.5°C from birth to admission |
| ILCOR 2025 CoSTR | 36.5 - 37.5°C; hypothermia AND hyperthermia both to be avoided |
| NNAP (UK National Neonatal Audit Programme) | Temperature within 36.5 - 37.5°C, measured within 1 hour of birth - official audit standard, target ≥90% |
"Admission temperature should be recorded as a predictor of outcomes as well as a quality indicator of good resuscitation."
| Without temperature | With temperature added |
|---|---|
| Single-domain audit (oxygenation only) | Dual-domain audit (oxygenation + thermoregulation) |
| 1 QIP intervention area | 2 QIP intervention areas |
| Moderate impact for publication | High-impact - mirrors NNAP / NQF standards |
| Limited outcome correlation | Can link both to NICU admission, morbidity, mortality |
| # | Standard | Target | Guideline Source |
|---|---|---|---|
| T1 | Temperature recorded at birth (axillary or rectal) | ≥95% of all births | NRP, WHO |
| T2 | Temperature recorded at 1 hour of life | ≥95% of all births | NNAP, NRP |
| T3 | Normothermia (36.5-37.5°C) achieved at 1 hour | ≥90% of all neonates | WHO, ILCOR, NNAP |
| T4 | Hypothermia (<36.5°C) at 1 hour documented and acted upon | 100% | NRP, WHO |
| T5 | Hyperthermia (>37.5°C) at 1 hour documented and acted upon | 100% | ILCOR 2025 |
| T6 | Thermoprotective interventions documented (hat, wrap, warm room, skin-to-skin, radiant warmer) | ≥90% | WHO, ILCOR |
"SpO2 and Temperature Monitoring in the Delivery Room: A Dual-Domain Quality Improvement Audit of Neonatal Transition Care at [Hospital Name]"
Can you make me a master sheet where I can start collecting all the data?
mkdir -p /tmp/workspace/neonatal-audit && ls /tmp/workspace/neonatal-audit/
~/neonatal-audit/build_sheet.py
import openpyxl
from openpyxl.styles import (
Font, PatternFill, Alignment, Border, Side, GradientFill
)
from openpyxl.utils import get_column_letter
from openpyxl.worksheet.datavalidation import DataValidation
from openpyxl.styles.numbers import FORMAT_NUMBER_00
wb = openpyxl.Workbook()
# ── Colour palette ──────────────────────────────────────────────────────────
DARK_BLUE = "1F3864" # title bar
MID_BLUE = "2E75B6" # section headers
LIGHT_BLUE = "D6E4F0" # section header text bg
SKY_BLUE = "BDD7EE" # sub-header row bg
WHITE = "FFFFFF"
LIGHT_GREY = "F2F2F2" # alternate data row
YELLOW_HL = "FFFF00" # mandatory / key field
GREEN_HDR = "375623" # pass indicator
RED_HDR = "C00000" # fail indicator
ORANGE = "ED7D31" # caution
MINT = "E2EFDA" # normal range cells
PEACH = "FCE4D6" # abnormal range cells
def hdr_font(bold=True, colour=WHITE, size=10):
return Font(name="Arial", bold=bold, color=colour, size=size)
def cell_font(bold=False, colour="000000", size=9):
return Font(name="Arial", bold=bold, color=colour, size=size)
def fill(hex_col):
return PatternFill("solid", fgColor=hex_col)
def thin_border():
s = Side(style="thin", color="BFBFBF")
return Border(left=s, right=s, top=s, bottom=s)
def med_border():
s = Side(style="medium", color="000000")
return Border(left=s, right=s, top=s, bottom=s)
def center():
return Alignment(horizontal="center", vertical="center", wrap_text=True)
def left():
return Alignment(horizontal="left", vertical="center", wrap_text=True)
# ============================================================
# SHEET 1 – DATA ENTRY MASTER SHEET
# ============================================================
ws = wb.active
ws.title = "Data Entry"
ws.sheet_view.showGridLines = False
ws.freeze_panes = "A5" # freeze title + header rows
# ── Title bar (row 1-2) ──────────────────────────────────────
ws.merge_cells("A1:AK2")
title_cell = ws["A1"]
title_cell.value = "NEONATAL DELIVERY ROOM SpO2 & TEMPERATURE MONITORING — CLINICAL AUDIT MASTER SHEET"
title_cell.font = Font(name="Arial", bold=True, color=WHITE, size=13)
title_cell.fill = fill(DARK_BLUE)
title_cell.alignment = center()
ws.row_dimensions[1].height = 22
ws.row_dimensions[2].height = 8
# ── Subtitle / info bar (row 3) ──────────────────────────────
ws.merge_cells("A3:P3")
ws["A3"].value = "Hospital / Unit: ___________________________"
ws["A3"].font = Font(name="Arial", bold=False, color="000000", size=9)
ws["A3"].fill = fill("D9E1F2")
ws["A3"].alignment = left()
ws.merge_cells("Q3:AK3")
ws["Q3"].value = "Audit Period: _______________ Auditor: ___________________________ NRP/ILCOR 2025 & WHO Standards"
ws["Q3"].font = Font(name="Arial", bold=False, color="000000", size=9)
ws["Q3"].fill = fill("D9E1F2")
ws["Q3"].alignment = left()
ws.row_dimensions[3].height = 16
# ── Column definitions ───────────────────────────────────────
# Each tuple: (header_text, width, section_colour, notes)
SECTIONS = [
# SECTION A – Patient Identifiers
("S.No", 6, MID_BLUE, ""),
("Date of Birth", 13, MID_BLUE, "DD/MM/YYYY"),
("MRN / Baby ID", 13, MID_BLUE, ""),
("Mother's Name", 18, MID_BLUE, ""),
("IP No.", 10, MID_BLUE, ""),
# SECTION B – Baby Demographics
("Gestational Age\n(weeks)", 10, "1F6391", ""),
("Birth Weight (g)", 12, "1F6391", ""),
("Sex", 8, "1F6391", "M/F/Ambiguous"),
("Mode of Delivery", 13, "1F6391", "SVD/LSCS/Forceps/Vacuum"),
("Singleton / Multiple", 12, "1F6391", "Singleton/Twin/Triplet"),
# SECTION C – Apgar Scores
("Apgar\n1 min", 8, "375623", "0-10"),
("Apgar\n5 min", 8, "375623", "0-10"),
("Apgar\n10 min", 8, "375623", "0-10 (if applicable)"),
# SECTION D – Resuscitation
("Resuscitation\nRequired", 13, "7030A0", "Yes / No"),
("Resuscitation\nType", 18, "7030A0", "None/Stim/O2/BVM/CPAP/Intubation/CC"),
("Starting FiO2 (%)", 12, "7030A0", "21/30/40/60/100"),
("Who Attended\nDelivery", 15, "7030A0", "Midwife/Resident/Neonatologist/MO"),
# SECTION E – SpO2 Monitoring
("SpO2 Probe\nApplied", 12, "C00000", "Yes / No"),
("Probe Site", 12, "C00000", "Right Hand/Left Hand/Foot"),
("Time to Probe\nPlacement (min)", 13, "C00000", "Minutes from birth"),
("SpO2 at\n1 min (%)", 10, "C00000", "Target: 60-65%"),
("SpO2 at\n2 min (%)", 10, "C00000", "Target: 65-70%"),
("SpO2 at\n3 min (%)", 10, "C00000", "Target: 70-75%"),
("SpO2 at\n5 min (%)", 10, "C00000", "Target: 80-85%"),
("SpO2 at\n10 min (%)", 10, "C00000", "Target: 85-95%"),
("SpO2 met\nTargets?", 12, "C00000", "Yes/No/Not Monitored"),
("FiO2 Adjusted\nfor SpO2?", 12, "C00000", "Yes/No/NA"),
# SECTION F – Temperature
("Temp at\nBirth (°C)", 11, "843C0C", "Axillary preferred"),
("Temp at\n1 Hour (°C)", 11, "843C0C", "Target: 36.5-37.5°C"),
("Temp\nStatus at 1h", 13, "843C0C", "Normal/Hypothermia/Hyperthermia"),
("Thermoprotective\nBundle Used", 16, "843C0C", "Hat/Wrap/Radiant Warmer/SSC/Mattress"),
# SECTION G – CCHD Screening
("Pre-ductal\nSpO2 (RH %)", 13, "1F3864", "Right Hand - for CCHD screen"),
("Post-ductal\nSpO2 (RF %)", 13, "1F3864", "Right Foot - for CCHD screen"),
("CCHD\nResult", 12, "1F3864", "Pass/Fail/Repeat/Not Done"),
# SECTION H – Oxygen Use Details
("O2 Therapy\nUsed", 12, "375623", "Yes/No"),
("O2 Delivery\nMethod", 15, "375623", "Room Air/Face Mask/CPAP/Intubation/HFNC"),
("Duration of\nO2 (min)", 12, "375623", ""),
# SECTION I – Outcome
("Disposition", 14, "1F3864", "Rooming-in/NICU/SNCU/Transferred/Death"),
("Reason for\nAdmission", 20, "1F3864", "If NICU/SNCU admitted"),
("Comments", 25, "1F3864", "Any relevant notes"),
]
# ── Section banner (row 4): group labels ────────────────────
SECTION_GROUPS = [
("A — Patient Identifiers", 1, 5, "2E4057"),
("B — Baby Demographics", 6, 10, "1F6391"),
("C — Apgar Scores", 11, 13, "375623"),
("D — Resuscitation", 14, 17, "7030A0"),
("E — SpO2 Monitoring", 18, 27, "C00000"),
("F — Temperature", 28, 31, "843C0C"),
("G — CCHD Screening", 32, 34, "1F3864"),
("H — Oxygen Details", 35, 37, "375623"),
("I — Outcome", 38, 40, "2E4057"),
]
ws.row_dimensions[4].height = 16
for label, col_start, col_end, colour in SECTION_GROUPS:
start_letter = get_column_letter(col_start)
end_letter = get_column_letter(col_end)
ws.merge_cells(f"{start_letter}4:{end_letter}4")
c = ws[f"{start_letter}4"]
c.value = label
c.font = Font(name="Arial", bold=True, color=WHITE, size=9)
c.fill = fill(colour)
c.alignment = center()
c.border = med_border()
# ── Column headers (row 5) ───────────────────────────────────
ws.row_dimensions[5].height = 48
for col_idx, (hdr, width, colour, notes) in enumerate(SECTIONS, start=1):
col_letter = get_column_letter(col_idx)
ws.column_dimensions[col_letter].width = width
c = ws.cell(row=5, column=col_idx)
c.value = hdr
c.font = Font(name="Arial", bold=True, color=WHITE, size=8)
c.fill = fill(colour)
c.alignment = center()
c.border = thin_border()
# ── Data rows 6-105 (100 entries) ────────────────────────────
for row in range(6, 106):
row_fill = fill(LIGHT_GREY) if row % 2 == 0 else fill(WHITE)
for col in range(1, len(SECTIONS) + 1):
c = ws.cell(row=row, column=col)
c.fill = row_fill
c.font = cell_font()
c.alignment = left()
c.border = thin_border()
# Auto-fill serial number
ws.cell(row=row, column=1).value = row - 5
ws.cell(row=row, column=1).alignment = center()
ws.cell(row=row, column=1).font = cell_font(bold=True)
# ── Data Validations ────────────────────────────────────────
def add_dv(ws, formula, col, row_start=6, row_end=105):
dv = DataValidation(type="list", formula1=formula, allow_blank=True)
dv.sqref = f"{get_column_letter(col)}{row_start}:{get_column_letter(col)}{row_end}"
ws.add_data_validation(dv)
# Sex
add_dv(ws, '"Male,Female,Ambiguous"', 8)
# Mode of delivery
add_dv(ws, '"SVD,LSCS,Forceps,Vacuum,Breech"', 9)
# Singleton/Multiple
add_dv(ws, '"Singleton,Twin,Triplet,Higher Order"', 10)
# Resuscitation required
add_dv(ws, '"Yes,No"', 14)
# Resuscitation type
add_dv(ws, '"None,Stimulation Only,Supplemental O2,Bag-Mask Ventilation,CPAP,Intubation,Chest Compressions"', 15)
# Starting FiO2
add_dv(ws, '"21,30,40,60,100"', 16)
# Who attended
add_dv(ws, '"Midwife,Resident,Neonatologist,Medical Officer,Nurse"', 17)
# Probe applied
add_dv(ws, '"Yes,No"', 18)
# Probe site
add_dv(ws, '"Right Hand (pre-ductal),Left Hand,Right Foot,Left Foot"', 19)
# SpO2 met targets
add_dv(ws, '"Yes,No,Partial,Not Monitored"', 26)
# FiO2 adjusted
add_dv(ws, '"Yes,No,Not Applicable"', 27)
# Temp status
add_dv(ws, '"Normal (36.5-37.5),Mild Hypothermia (36.0-36.4),Moderate Hypothermia (32-35.9),Severe Hypothermia (<32),Hyperthermia (>37.5)"', 30)
# CCHD result
add_dv(ws, '"Pass,Fail - Refer Cardiology,Repeat in 1-2h,Not Done"', 34)
# O2 therapy used
add_dv(ws, '"Yes,No"', 35)
# O2 delivery method
add_dv(ws, '"Room Air,Free-Flow O2,Face Mask,CPAP,HFNC,Intubation + Ventilator"', 36)
# Disposition
add_dv(ws, '"Rooming-in with Mother,NICU Admission,SNCU Admission,Transferred,Death in DR,Discharged"', 39)
# ── Conditional formatting hints for SpO2 columns ───────────
# Color the SpO2 target header cells with mint / note text
spo2_targets = {
20: "60-65%",
21: "65-70%",
22: "70-75%",
23: "80-85%",
24: "85-95%",
}
# ============================================================
# SHEET 2 – AUDIT STANDARDS REFERENCE
# ============================================================
ws2 = wb.create_sheet("Audit Standards")
ws2.sheet_view.showGridLines = False
ws2.column_dimensions["A"].width = 5
ws2.column_dimensions["B"].width = 45
ws2.column_dimensions["C"].width = 20
ws2.column_dimensions["D"].width = 20
ws2.column_dimensions["E"].width = 20
# Title
ws2.merge_cells("A1:E2")
ws2["A1"].value = "AUDIT STANDARDS & TARGETS — SpO2 + TEMPERATURE DELIVERY ROOM AUDIT"
ws2["A1"].font = Font(name="Arial", bold=True, color=WHITE, size=12)
ws2["A1"].fill = fill(DARK_BLUE)
ws2["A1"].alignment = center()
ws2.row_dimensions[1].height = 22
headers2 = ["#", "Audit Standard", "Target (%)", "Guideline Source", "Pass Criteria"]
for col_idx, h in enumerate(headers2, 1):
c = ws2.cell(row=3, column=col_idx)
c.value = h
c.font = Font(name="Arial", bold=True, color=WHITE, size=9)
c.fill = fill(MID_BLUE)
c.alignment = center()
c.border = thin_border()
ws2.row_dimensions[3].height = 20
standards = [
# SpO2 Standards
("SpO2 Standards", "", "", "", ""),
("S1", "Pulse oximeter applied (right hand, pre-ductal) within 2 min of birth for all neonates needing intervention", "100%", "NRP 8th Ed, ILCOR 2025", "Probe applied to right hand ≤2 min"),
("S2", "Pulse oximeter applied to ALL neonates born", "≥90%", "NRP, WHO", "SpO2 documented for every birth"),
("S3", "Probe site correctly pre-ductal (right hand) for resuscitation guidance", "100%", "NRP 8th Ed", "Right hand documented"),
("S4", "SpO2 documented at 1, 2, 3, 5, and 10 minutes for babies needing respiratory support", "≥90%", "NRP 8th Ed, ILCOR 2025", "All 5 time-points recorded"),
("S5", "SpO2 meets NRP target at 1 min: 60-65%", "≥80% of eligible babies", "NRP, ILCOR 2025", "SpO2 ≥60% & ≤65% at 1 min"),
("S6", "SpO2 meets NRP target at 5 min: 80-85%", "≥80% of eligible babies", "NRP, ILCOR 2025", "SpO2 ≥80% & ≤85% at 5 min"),
("S7", "SpO2 meets NRP target at 10 min: 85-95%", "≥80% of eligible babies", "NRP, ILCOR 2025", "SpO2 ≥85% & ≤95% at 10 min"),
("S8", "FiO2 adjusted when SpO2 out of target range", "100%", "NRP 8th Ed", "FiO2 change documented"),
("S9", "CCHD screening (pre- and post-ductal SpO2) done before discharge", "≥95%", "AAP, NHS, ILCOR", "Both readings documented"),
("S10", "Neonates with SpO2 <90% at 10 min referred/escalated", "100%", "NRP, ILCOR", "Escalation documented"),
# Temperature Standards
("Temperature Standards", "", "", "", ""),
("T1", "Temperature recorded at birth (axillary)", "≥95%", "WHO, NRP", "Temperature value documented at birth"),
("T2", "Temperature recorded at 1 hour of life", "≥95%", "NNAP, NRP, ILCOR 2025", "Temperature value documented at 1 hour"),
("T3", "Normothermia (36.5-37.5°C) achieved at 1 hour", "≥90%", "WHO, ILCOR, NNAP 2024", "Temp 36.5-37.5°C at 1 hour"),
("T4", "Hypothermia (<36.5°C) at 1 hour documented and acted upon", "100%", "NRP, WHO", "Action documented if hypothermic"),
("T5", "Hyperthermia (>37.5°C) documented and acted upon", "100%", "ILCOR 2025", "Action documented if hyperthermic"),
("T6", "Thermoprotective bundle used (hat + wrap/plastic bag for preterm)", "≥90%", "WHO, ILCOR", "Bundle documented"),
]
row_num = 4
for std in standards:
for col_idx, val in enumerate(std, 1):
c = ws2.cell(row=row_num, column=col_idx)
c.value = val
c.font = cell_font(bold=(col_idx == 1 or val in ("SpO2 Standards", "Temperature Standards")))
c.alignment = left()
c.border = thin_border()
if val in ("SpO2 Standards", "Temperature Standards"):
c.fill = fill(SKY_BLUE)
c.font = Font(name="Arial", bold=True, color=DARK_BLUE, size=9)
if col_idx == 1:
ws2.merge_cells(f"A{row_num}:E{row_num}")
elif row_num % 2 == 0:
c.fill = fill(LIGHT_GREY)
else:
c.fill = fill(WHITE)
row_num += 1
# ============================================================
# SHEET 3 – SpO2 TARGET REFERENCE CARD
# ============================================================
ws3 = wb.create_sheet("SpO2 Target Card")
ws3.sheet_view.showGridLines = False
ws3.merge_cells("A1:D2")
ws3["A1"].value = "NRP / ILCOR 2025 — Pre-Ductal SpO2 Targets After Birth"
ws3["A1"].font = Font(name="Arial", bold=True, color=WHITE, size=12)
ws3["A1"].fill = fill(DARK_BLUE)
ws3["A1"].alignment = center()
ws3.row_dimensions[1].height = 22
ws3.merge_cells("A3:D3")
ws3["A3"].value = "Probe site: RIGHT HAND (pre-ductal) | Apply within 2 minutes of birth"
ws3["A3"].font = Font(name="Arial", bold=True, color=DARK_BLUE, size=10)
ws3["A3"].fill = fill(SKY_BLUE)
ws3["A3"].alignment = center()
ws3.row_dimensions[3].height = 18
spo2_hdrs = ["Time After Birth", "Target SpO2 Range", "Action if Below Range", "Action if Above Range"]
for col_idx, h in enumerate(spo2_hdrs, 1):
c = ws3.cell(row=4, column=col_idx)
c.value = h
c.font = Font(name="Arial", bold=True, color=WHITE, size=10)
c.fill = fill(MID_BLUE)
c.alignment = center()
c.border = thin_border()
ws3.column_dimensions[get_column_letter(col_idx)].width = 28
ws3.row_dimensions[4].height = 18
spo2_targets_data = [
("1 minute", "60 – 65%", "Stimulate; consider supplemental O2", "Reduce FiO2 / wean O2"),
("2 minutes", "65 – 70%", "Increase FiO2; ensure airway open", "Reduce FiO2"),
("3 minutes", "70 – 75%", "Increase FiO2; consider PPV", "Reduce FiO2"),
("4 minutes", "75 – 80%", "Increase FiO2; PPV if not improving", "Reduce FiO2"),
("5 minutes", "80 – 85%", "Increase FiO2; escalate to senior", "Reduce FiO2"),
("10 minutes","85 – 95%", "Escalate urgently; consider CCHD", "Wean O2; avoid hyperoxia"),
]
for row_offset, (time, target, below, above) in enumerate(spo2_targets_data, start=5):
row_f = fill(MINT) if row_offset % 2 == 0 else fill(WHITE)
for col_idx, val in enumerate([time, target, below, above], 1):
c = ws3.cell(row=row_offset, column=col_idx)
c.value = val
c.font = Font(name="Arial", bold=(col_idx <= 2), size=10,
color=("C00000" if col_idx == 2 else "000000"))
c.fill = row_f
c.alignment = center() if col_idx <= 2 else left()
c.border = thin_border()
ws3.row_dimensions[row_offset].height = 22
# Note row
ws3.merge_cells("A11:D11")
ws3["A11"].value = (
"NOTE: These are TARGETED PRE-DUCTAL values for room air start (term) or 21-30% O2 (preterm <35w). "
"Adjust FiO2 in 10% increments every ~60 seconds. Source: NRP 8th Ed / ILCOR 2025 CoSTR."
)
ws3["A11"].font = Font(name="Arial", italic=True, size=8, color="404040")
ws3["A11"].fill = fill("FFF2CC")
ws3["A11"].alignment = Alignment(horizontal="left", vertical="center", wrap_text=True)
ws3["A11"].border = thin_border()
ws3.row_dimensions[11].height = 36
# ============================================================
# SHEET 4 – TEMPERATURE REFERENCE CARD
# ============================================================
ws4 = wb.create_sheet("Temperature Card")
ws4.sheet_view.showGridLines = False
ws4.merge_cells("A1:C2")
ws4["A1"].value = "WHO / NRP / ILCOR — Neonatal Temperature Standards"
ws4["A1"].font = Font(name="Arial", bold=True, color=WHITE, size=12)
ws4["A1"].fill = fill("843C0C")
ws4["A1"].alignment = center()
ws4.row_dimensions[1].height = 22
temp_categories = [
("Category", "Temperature Range", "Classification", "Immediate Action Required"),
("Normal / Target", "36.5 – 37.5 °C", "Normothermia", "Continue monitoring; maintain thermoprotection"),
("Mild Hypothermia", "36.0 – 36.4 °C", "Cold Stress", "Skin-to-skin care; check environment; re-warm"),
("Moderate Hypoth.", "32.0 – 35.9 °C", "Moderate Hypothermia", "Radiant warmer; senior review; monitor glucose & SpO2"),
("Severe Hypoth.", "< 32.0 °C", "Severe Hypothermia", "URGENT: Radiant warmer; NICU transfer; IV access; glucose"),
("Hyperthermia", "> 37.5 °C", "Hyperthermia", "Remove excess clothing/blankets; check room temp; exclude infection/maternal fever"),
]
temp_fills = [fill(MID_BLUE), fill(MINT), fill("FFF2CC"), fill(PEACH), fill("C00000"), fill("FCE4D6")]
temp_fonts = [
Font(name="Arial", bold=True, color=WHITE, size=9),
Font(name="Arial", bold=False, color="000000", size=9),
Font(name="Arial", bold=False, color="000000", size=9),
Font(name="Arial", bold=True, color="000000", size=9),
Font(name="Arial", bold=True, color=WHITE, size=9),
Font(name="Arial", bold=True, color="843C0C", size=9),
]
for row_idx, (row_data, row_fill, row_font) in enumerate(zip(temp_categories, temp_fills, temp_fonts), start=3):
for col_idx, val in enumerate(row_data, 1):
c = ws4.cell(row=row_idx, column=col_idx)
c.value = val
c.font = row_font
c.fill = row_fill
c.alignment = center() if col_idx <= 3 else left()
c.border = thin_border()
ws4.column_dimensions[get_column_letter(col_idx)].width = 22
ws4.row_dimensions[row_idx].height = 28
# Thermoprotective bundle box
ws4.merge_cells("A9:C9")
ws4["A9"].value = "THERMOPROTECTIVE BUNDLE (document which used for each baby)"
ws4["A9"].font = Font(name="Arial", bold=True, color=WHITE, size=10)
ws4["A9"].fill = fill("843C0C")
ws4["A9"].alignment = center()
ws4.row_dimensions[9].height = 18
bundle_items = [
("All babies", "Warm room ≥26°C (28-30°C for preterm)"),
("All babies", "Dry and warm blanket / towel"),
("All babies", "Woollen hat immediately after birth"),
("All babies", "Skin-to-skin with mother (if stable)"),
("Preterm <32w", "Plastic wrap / polyethylene bag — do NOT dry first"),
("Preterm <32w", "Exothermic (chemical) warming mattress"),
("Preterm <32w", "Heated humidified respiratory gases"),
("Preterm <32w", "Radiant warmer during stabilisation"),
]
for row_offset, (applies_to, action) in enumerate(bundle_items, start=10):
ws4.cell(row=row_offset, column=1).value = applies_to
ws4.cell(row=row_offset, column=1).font = Font(name="Arial", bold=True, size=9, color="843C0C")
ws4.cell(row=row_offset, column=1).fill = fill(LIGHT_GREY if row_offset%2==0 else WHITE)
ws4.cell(row=row_offset, column=1).alignment = center()
ws4.cell(row=row_offset, column=1).border = thin_border()
ws4.merge_cells(f"B{row_offset}:C{row_offset}")
ws4.cell(row=row_offset, column=2).value = action
ws4.cell(row=row_offset, column=2).font = Font(name="Arial", size=9)
ws4.cell(row=row_offset, column=2).fill = fill(LIGHT_GREY if row_offset%2==0 else WHITE)
ws4.cell(row=row_offset, column=2).alignment = left()
ws4.cell(row=row_offset, column=2).border = thin_border()
ws4.row_dimensions[row_offset].height = 18
# ============================================================
# SHEET 5 – SUMMARY DASHBOARD (auto-calculated)
# ============================================================
ws5 = wb.create_sheet("Summary Dashboard")
ws5.sheet_view.showGridLines = False
ws5.merge_cells("A1:F2")
ws5["A1"].value = "AUDIT SUMMARY DASHBOARD — Auto-calculated from Data Entry sheet"
ws5["A1"].font = Font(name="Arial", bold=True, color=WHITE, size=12)
ws5["A1"].fill = fill(DARK_BLUE)
ws5["A1"].alignment = center()
ws5.row_dimensions[1].height = 22
# Summary table headers
dash_headers = ["Metric", "Numerator\n(formula)", "Denominator\n(formula)", "Result (%)", "Target", "Pass / Fail"]
for col_idx, h in enumerate(dash_headers, 1):
c = ws5.cell(row=3, column=col_idx)
c.value = h
c.font = Font(name="Arial", bold=True, color=WHITE, size=9)
c.fill = fill(MID_BLUE)
c.alignment = center()
c.border = thin_border()
ws5.column_dimensions[get_column_letter(col_idx)].width = [38, 22, 22, 14, 12, 14][col_idx-1]
ws5.row_dimensions[3].height = 36
# Dashboard rows: metric name, numerator formula, denominator formula, target, pass threshold
dash_rows = [
("SpO2 Metrics", "", "", "", "", ""),
("S1: Probe applied within 2 min (all intervention babies)",
'=COUNTIFS(\'Data Entry\'!T6:T105,"<="&2,\'Data Entry\'!N6:N105,"Yes")',
'=COUNTIF(\'Data Entry\'!N6:N105,"Yes")',
"", "100%", ""),
("S2: SpO2 documented for all births",
'=COUNTA(\'Data Entry\'!T6:T105)',
'=COUNTA(\'Data Entry\'!B6:B105)',
"", "≥90%", ""),
("S3: Probe site correctly pre-ductal (Right Hand)",
'=COUNTIF(\'Data Entry\'!S6:S105,"Right Hand (pre-ductal)")',
'=COUNTIF(\'Data Entry\'!R6:R105,"Yes")',
"", "100%", ""),
("S9: CCHD screening completed before discharge",
'=COUNTIFS(\'Data Entry\'!AH6:AH105,"<>",\'Data Entry\'!AH6:AH105,"<>Not Done")',
'=COUNTA(\'Data Entry\'!B6:B105)',
"", "≥95%", ""),
("Temperature Metrics", "", "", "", "", ""),
("T1: Temperature recorded at birth",
'=COUNTA(\'Data Entry\'!AB6:AB105)',
'=COUNTA(\'Data Entry\'!B6:B105)',
"", "≥95%", ""),
("T2: Temperature recorded at 1 hour",
'=COUNTA(\'Data Entry\'!AC6:AC105)',
'=COUNTA(\'Data Entry\'!B6:B105)',
"", "≥95%", ""),
("T3: Normothermia (36.5-37.5°C) at 1 hour",
'=COUNTIF(\'Data Entry\'!AD6:AD105,"Normal (36.5-37.5)")',
'=COUNTA(\'Data Entry\'!AC6:AC105)',
"", "≥90%", ""),
("T4: Hypothermia rate at 1 hour",
'=COUNTIFS(\'Data Entry\'!AD6:AD105,"Mild Hypothermia (36.0-36.4)")+COUNTIFS(\'Data Entry\'!AD6:AD105,"Moderate Hypothermia (32-35.9)")+COUNTIFS(\'Data Entry\'!AD6:AD105,"Severe Hypothermia (<32)")',
'=COUNTA(\'Data Entry\'!AC6:AC105)',
"", "<10%", ""),
]
for row_offset, row_data in enumerate(dash_rows, start=4):
metric, num_f, den_f, result, target, pf = row_data
is_section = metric in ("SpO2 Metrics", "Temperature Metrics")
row_num_ws5 = row_offset
ws5.row_dimensions[row_num_ws5].height = 22
c_metric = ws5.cell(row=row_num_ws5, column=1)
c_metric.value = metric
c_metric.alignment = left()
c_metric.border = thin_border()
if is_section:
ws5.merge_cells(f"A{row_num_ws5}:F{row_num_ws5}")
c_metric.font = Font(name="Arial", bold=True, color=DARK_BLUE, size=10)
c_metric.fill = fill(SKY_BLUE)
continue
c_metric.font = Font(name="Arial", size=9)
c_metric.fill = fill(WHITE) if row_offset % 2 == 0 else fill(LIGHT_GREY)
# Numerator
c_num = ws5.cell(row=row_num_ws5, column=2)
c_num.value = num_f
c_num.font = Font(name="Arial", size=9, color="0000FF")
c_num.alignment = center()
c_num.border = thin_border()
c_num.fill = c_metric.fill
# Denominator
c_den = ws5.cell(row=row_num_ws5, column=3)
c_den.value = den_f
c_den.font = Font(name="Arial", size=9, color="0000FF")
c_den.alignment = center()
c_den.border = thin_border()
c_den.fill = c_metric.fill
# Result % (formula referencing num/den)
result_row = row_num_ws5
result_col = 4
c_res = ws5.cell(row=result_row, column=result_col)
c_res.value = f"=IF(C{result_row}=0,\"N/A\",B{result_row}/C{result_row})"
c_res.font = Font(name="Arial", bold=True, size=9)
c_res.number_format = "0.0%"
c_res.alignment = center()
c_res.border = thin_border()
c_res.fill = c_metric.fill
# Target
c_tgt = ws5.cell(row=result_row, column=5)
c_tgt.value = target
c_tgt.font = Font(name="Arial", bold=True, size=9, color=DARK_BLUE)
c_tgt.alignment = center()
c_tgt.border = thin_border()
c_tgt.fill = c_metric.fill
# Pass/Fail placeholder (manual for now)
c_pf = ws5.cell(row=result_row, column=6)
c_pf.value = "— enter after data"
c_pf.font = Font(name="Arial", italic=True, size=8, color="808080")
c_pf.alignment = center()
c_pf.border = thin_border()
c_pf.fill = c_metric.fill
# Instructions note at bottom
note_row = 4 + len(dash_rows) + 1
ws5.merge_cells(f"A{note_row}:F{note_row+1}")
ws5[f"A{note_row}"].value = (
"HOW TO USE: Enter all data in the 'Data Entry' sheet. "
"This dashboard auto-calculates numerators and denominators using COUNTIF formulas. "
"Result (%) calculates automatically. Compare against Target column to determine Pass/Fail. "
"Blue text = formula cells. Do not edit columns B, C, D in this sheet."
)
ws5[f"A{note_row}"].font = Font(name="Arial", italic=True, size=8, color="404040")
ws5[f"A{note_row}"].fill = fill("FFF2CC")
ws5[f"A{note_row}"].alignment = Alignment(horizontal="left", vertical="center", wrap_text=True)
ws5[f"A{note_row}"].border = thin_border()
ws5.row_dimensions[note_row].height = 30
ws5.row_dimensions[note_row+1].height = 20
# ============================================================
# Save
# ============================================================
output_path = "/tmp/workspace/neonatal-audit/Neonatal_DR_SpO2_Temperature_Audit_Master.xlsx"
wb.save(output_path)
print(f"Saved: {output_path}")
cd /tmp/workspace/neonatal-audit && python build_sheet.py
~/neonatal-audit/build_sheet.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/neonatal-audit/build_sheet.py'
cd /tmp/workspace/neonatal-audit && python build_sheet.py
cd /tmp/workspace/neonatal-audit && python -c " import openpyxl, traceback # find line 299 context with open('build_sheet.py') as f: lines = f.readlines() for i, l in enumerate(lines[293:305], start=294): print(i, l, end='') "
~/neonatal-audit/build_sheet.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/neonatal-audit/build_sheet.py'
cd /tmp/workspace/neonatal-audit && python build_sheet.py
~/neonatal-audit/build_sheet.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/neonatal-audit/build_sheet.py'
cd /tmp/workspace/neonatal-audit && python build_sheet.py
python -c " import openpyxl wb = openpyxl.load_workbook('/tmp/workspace/neonatal-audit/Neonatal_DR_SpO2_Temperature_Audit_Master.xlsx') print('Sheets:', wb.sheetnames) ws = wb['Data Entry'] print('Data Entry dims:', ws.dimensions) print('Row 5 headers (first 10):') for col in range(1, 11): print(f' Col {col}:', ws.cell(5, col).value) "
Neonatal DR SpO2 Temperature Audit Master
Spreadsheet · XLSX
| Section | Fields |
|---|---|
| A - Patient Identifiers | Date, MRN, Mother's name, IP number |
| B - Baby Demographics | Gestational age, birth weight, sex, mode of delivery, singleton/multiple |
| C - Apgar Scores | 1 min, 5 min, 10 min |
| D - Resuscitation | Required?, type, starting FiO2, who attended |
| E - SpO2 Monitoring | Probe applied, site, time to placement, SpO2 at 1/2/3/5/10 min, targets met?, FiO2 adjusted? |
| F - Temperature | Temp at birth, temp at 1 hour, status (normal/hypothermia/hyperthermia), thermoprotective bundle |
| G - CCHD Screening | Pre-ductal (right hand), post-ductal (right foot), result |
| H - Oxygen Details | O2 used, delivery method, duration |
| I - Outcome | Disposition, reason for admission, comments |