Rickets in 2 yr old approach and treatment as per nelson
rickets AND treatment
Global Consensus Recommendations nutritional rickets 2022 treatment vitamin D children
https://pmc.ncbi.nlm.nih.gov/articles/PMC4880117
| Cause | Calcium | Phosphate | ALP | PTH | 25(OH)D |
|---|---|---|---|---|---|
| Vitamin D deficiency | Low or normal | Low | High | High | Low |
| Dietary calcium deficiency | Low or normal | Low | High | High | Often normal or mildly low |
| Hypophosphatemic rickets | Usually normal | Persistently low | High | Normal or mildly high | Usually normal |
| Renal rickets / CKD | Variable | Often high in CKD | High | High | Variable |
| Renal tubular acidosis / Fanconi | Variable | Low | High | High | Usually normal |
Create a vaccination card for my clinic include all vaccines as per nis and add extra vaccines also as in iap schedule
Choose the deliverable format. · How should I handle clinic branding?
| Cause | Calcium | Phosphate | ALP | PTH | 25(OH)D |
|---|---|---|---|---|---|
| Vitamin D deficiency | Low or normal | Low | High | High | Low |
| Dietary calcium deficiency | Low or normal | Low | High | High | Often normal or mildly low |
| Hypophosphatemic rickets | Usually normal | Persistently low | High | Normal or mildly high | Usually normal |
| Renal rickets / CKD | Variable | Often high in CKD | High | High | Variable |
| Renal tubular acidosis / Fanconi | Variable | Low | High | High | Usually normal |
Add clinic branding and patient-detail fields
India immunization schedule children
India National Immunization Schedule 2025 UIP PDF IAP immunization schedule 2025 children
PMID: 41954836
https://prod-cdn.preprod.co-vin.in/uwin-prod/pdf/National+Im…
"Recommended Immunization Schedule (2025)" "Indian Pediatrics" vaccine schedule table
~/
mkdir -p "/tmp/workspace/clinic-vaccination-card/src" "/tmp/workspace/clinic-vaccination-card/output" && python3 - <<'PY' from docx import Document from docx.shared import Inches, Pt, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT, WD_CELL_VERTICAL_ALIGNMENT from docx.oxml import OxmlElement from docx.oxml.ns import qn from docx.enum.section import WD_SECTION from docx.enum.style import WD_STYLE_TYPE from docx.enum.text import WD_BREAK from pathlib import Path out=Path('/tmp/workspace/clinic-vaccination-card/output/Clinic_Vaccination_Card_India_NIS_IAP.docx') doc=Document() sec=doc.sections[0] sec.top_margin=Inches(.45); sec.bottom_margin=Inches(.45); sec.left_margin=Inches(.48); sec.right_margin=Inches(.48) # colours NAVY='0B3C5D'; TEAL='087E8B'; GOLD='F4B942'; PALE='EAF4F6'; LIGHT='F7FAFC'; RED='A82424'; GREY='5B6573' styles=doc.styles styles['Normal'].font.name='Arial'; styles['Normal'].font.size=Pt(8) for n,size,color in [('Title',22,NAVY),('Heading 1',13,NAVY),('Heading 2',10,TEAL)]: st=styles[n]; st.font.name='Arial'; st.font.size=Pt(size); st.font.bold=True; st.font.color.rgb=RGBColor.from_string(color) st.paragraph_format.space_before=Pt(5); st.paragraph_format.space_after=Pt(3) # helpers def shade(cell, fill): tcPr=cell._tc.get_or_add_tcPr(); shd=OxmlElement('w:shd'); shd.set(qn('w:fill'),fill); tcPr.append(shd) def set_cell_margins(cell, top=60, start=80, bottom=60, end=80): tc=cell._tc; tcPr=tc.get_or_add_tcPr(); tcMar=tcPr.first_child_found_in('w:tcMar') if tcMar is None: tcMar=OxmlElement('w:tcMar'); tcPr.append(tcMar) for m,v in [('top',top),('start',start),('bottom',bottom),('end',end)]: node=tcMar.find(qn('w:'+m)) if node is None: node=OxmlElement('w:'+m); tcMar.append(node) node.set(qn('w:w'),str(v)); node.set(qn('w:type'),'dxa') def borders(table, color='B9CDD5', size='6'): tblPr=table._tbl.tblPr; b=tblPr.first_child_found_in('w:tblBorders') if b is None: b=OxmlElement('w:tblBorders'); tblPr.append(b) for edge in ('top','left','bottom','right','insideH','insideV'): tag=qn('w:'+edge); el=b.find(tag) if el is None: el=OxmlElement('w:'+edge); b.append(el) el.set(qn('w:val'),'single'); el.set(qn('w:sz'),size); el.set(qn('w:color'),color) def celltxt(cell,text,bold=False,color=None,size=7.5,align=None): cell.text=''; p=cell.paragraphs[0]; p.paragraph_format.space_after=Pt(0); p.paragraph_format.space_before=Pt(0) if align: p.alignment=align r=p.add_run(text); r.bold=bold; r.font.name='Arial'; r.font.size=Pt(size) if color:r.font.color.rgb=RGBColor.from_string(color) cell.vertical_alignment=WD_CELL_VERTICAL_ALIGNMENT.CENTER; set_cell_margins(cell) def add_table(headers, rows, widths=None, font=7.2): t=doc.add_table(rows=1, cols=len(headers)); t.alignment=WD_TABLE_ALIGNMENT.CENTER; t.autofit=False; borders(t) for i,h in enumerate(headers): c=t.rows[0].cells[i]; shade(c,NAVY); celltxt(c,h,True,'FFFFFF',font,WD_ALIGN_PARAGRAPH.CENTER) if widths: c.width=Inches(widths[i]) for ri,row in enumerate(rows): cells=t.add_row().cells for i,v in enumerate(row): if ri%2==0: shade(cells[i],LIGHT) celltxt(cells[i],v,False,None,font) if widths: cells[i].width=Inches(widths[i]) return t def label(text): p=doc.add_paragraph(); p.paragraph_format.space_before=Pt(5); p.paragraph_format.space_after=Pt(2) r=p.add_run(text);r.bold=True;r.font.size=Pt(10);r.font.color.rgb=RGBColor.from_string(TEAL) def note(text,color=GREY): p=doc.add_paragraph();p.paragraph_format.space_after=Pt(3);p.paragraph_format.space_before=Pt(1) r=p.add_run(text);r.italic=True;r.font.size=Pt(7);r.font.color.rgb=RGBColor.from_string(color) def header(): t=doc.add_table(rows=1,cols=2);t.autofit=False;t.columns[0].width=Inches(1.05);t.columns[1].width=Inches(6.8) c=t.cell(0,0);shade(c,TEAL);celltxt(c,'CLINIC\nLOGO',True,'FFFFFF',12,WD_ALIGN_PARAGRAPH.CENTER) c=t.cell(0,1);shade(c,'FFFFFF');celltxt(c,'[CLINIC NAME]\nChild Health & Immunization Centre\n[Doctor Name, Qualification] | [Phone] | [Address / Email]',True,NAVY,12) p=doc.add_paragraph();p.paragraph_format.space_after=Pt(3);p.paragraph_format.space_before=Pt(2);p.alignment=WD_ALIGN_PARAGRAPH.CENTER r=p.add_run('CHILD VACCINATION RECORD');r.bold=True;r.font.size=Pt(16);r.font.color.rgb=RGBColor.from_string(NAVY) r=p.add_run(' | INDIA: NIS/UIP + IAP-ACVIP');r.font.size=Pt(9);r.font.color.rgb=RGBColor.from_string(TEAL) header() # patient panel pt=doc.add_table(rows=4,cols=4);pt.autofit=False;borders(pt,'9FBCC7','8') fields=[('Child’s name','____________________________'),('Record / UHID no.','________________'),('Date of birth','____ / ____ / ______'),('Sex','□ Female □ Male □ Other'),('Parent / guardian','____________________________'),('Mobile no.','________________'),('Address','____________________________________________'),('Blood group (if known)','________'),('Birth weight','________ kg'),('Hospital / place of birth','____________________________'),('Allergy / medical alert','____________________________________________'),('Emergency contact','____________________________'),('Previous vaccine records checked','□ Yes □ No'),('Special risk / condition','________________________________'),('Primary paediatrician','____________________________'),('Next visit due','____ / ____ / ______')] for idx,(a,b) in enumerate(fields): c=pt.cell(idx//4,idx%4);shade(c,PALE if idx//4%2==0 else 'FFFFFF');celltxt(c,a+'\n'+b,True if a else False,NAVY,7) note('Bring this card at every visit. Record the date, product/brand, batch number, vaccinator signature and next due date for each vaccine. This record does not replace clinical assessment or a catch-up plan.') label('A. National Immunization Schedule (NIS / UIP) - routine vaccines') nis=[ ('Birth / within 24 h','BCG; bOPV-0; Hepatitis B birth dose','________','________________','________'), ('6 weeks','bOPV-1; Pentavalent-1; fIPV-1; RVV-1; PCV-1','________','________________','________'), ('10 weeks','bOPV-2; Pentavalent-2; RVV-2','________','________________','________'), ('14 weeks','bOPV-3; Pentavalent-3; fIPV-2; RVV-3; PCV-2','________','________________','________'), ('9-11 months','MR-1; PCV booster; fIPV-3; Vitamin A-1; JE-1*','________','________________','________'), ('16-23 months','MR-2; DPT booster-1; bOPV booster; Vitamin A; JE-2*','________','________________','________'), ('Every 6 months to 5 y','Vitamin A: doses 3-9, as due','________','________________','________'), ('5-6 years','DPT booster-2','________','________________','________'), ('10 years','Td','________','________________','________'), ('16 years','Td','________','________________','________'),] add_table(['Age due','NIS / UIP vaccine(s)','Date given','Brand / batch / site','Signature'],nis,[.85,3.15,.7,1.35,.7],6.5) note('*JE only in designated endemic districts. NIS details are based on India’s current U-WIN/NIS chart. Follow state programme instructions where they differ.') # Page 2 p=doc.add_paragraph();p.add_run().add_break(WD_BREAK.PAGE) header() label('B. IAP-ACVIP schedule - clinic record and IAP-added protection') note('Use this section to document IAP-recommended doses, including vaccines commonly given as private-clinic products. When an equivalent NIS dose has already been administered, record it here rather than repeat it unnecessarily. Dose selection and catch-up require clinician review.') iap=[ ('Birth','BCG; OPV; Hep B-1','________','________________','________'), ('6 weeks','DTwP/DTaP-1; IPV-1; Hib-1; Hep B-2; Rotavirus-1; PCV-1','________','________________','________'), ('10 weeks','DTwP/DTaP-2; IPV-2; Hib-2; Hep B-3; Rotavirus-2; PCV-2','________','________________','________'), ('14 weeks','DTwP/DTaP-3; IPV-3; Hib-3; Hep B-4; Rotavirus-3†; PCV-3','________','________________','________'), ('6 months onward','Influenza dose 1, then annual influenza vaccination','________','________________','________'), ('6-9 months onward','Typhoid conjugate vaccine (TCV)','________','________________','________'), ('9 months','MMR-1','________','________________','________'), ('12 months','Hepatitis A: live 1 dose OR inactivated dose 1','________','________________','________'), ('15 months','MMR-2; Varicella-1; PCV booster','________','________________','________'), ('16-18 months','DTwP/DTaP booster-1; IPV booster-1; Hib booster','________','________________','________'), ('18-19 months','Hepatitis A dose 2 if inactivated; Varicella-2','________','________________','________'), ('4-6 years','DTwP/DTaP booster-2; IPV booster-2; MMR-3','________','________________','________'), ('10-12 years','Tdap booster','________','________________','________'), ('16-18 years','Td','________','________________','________'),] add_table(['Age due','IAP routine vaccine(s)','Date given','Brand / batch / site','Signature'],iap,[.85,3.15,.7,1.35,.7],6.4) note('†Rotavirus schedule depends on product: monovalent products use 2 doses; other products may use 3 doses. Respect product-specific maximum age limits. Use an age-appropriate licensed influenza formulation yearly.') label('C. Additional / risk-based IAP vaccines and special circumstances') extra=[ ('HPV','Girls and boys 9-15 years: 1 dose may be used in immunocompetent children under the 2025 IAP update; use 3-dose schedule when started at age 15 years or in immunocompromised children. Record product and schedule.','________','________________','________'), ('Meningococcal ACWY','Not routine for all. Consider high-risk medical conditions, outbreaks, travel, hostel / institutional requirements, or clinician advice.','________','________________','________'), ('Meningococcal B','Risk-based / travel-based where a licensed product is available and indicated.','________','________________','________'), ('Dengue','Only according to currently licensed product, age indication, local epidemiology, prior infection requirements and IAP/authority guidance.','________','________________','________'), ('COVID-19','As per currently authorised Indian age group, product availability, risk status and national guidance.','________','________________','________'), ('RSV prevention','Nirsevimab may be considered for eligible high-risk infants after clinician-parent discussion; document separately.','________','________________','________'), ('Rabies PEP / PrEP','Not a routine childhood series. Start urgently after an exposure or use pre-exposure vaccination for selected high-risk persons.','________','________________','________'), ('Cholera / Yellow fever / travel vaccines','Travel, outbreak, or region-specific indication only. Prepare a separate travel plan.','________','________________','________')] add_table(['Vaccine / service','Who / when to consider','Date','Brand / batch / site','Signature'],extra,[1.05,2.95,.55,1.45,.7],6.25) # page 3 vaccine visits p=doc.add_paragraph();p.add_run().add_break(WD_BREAK.PAGE) header() label('D. Vaccination visit log') logs=[('','','','','','') for _ in range(16)] add_table(['Visit date','Vaccine(s) administered','Dose / route / site','Brand & batch no.','Next due date','Vaccinator signature'],logs,[.75,2.25,1.1,1.35,.8,1.05],7) label('E. Adverse event / clinical note log') logs2=[('','','','') for _ in range(6)] add_table(['Date','Event / clinical observation','Action / advice / follow-up','Clinician signature'],logs2,[.7,3.4,1.8,1.4],7) label('Important reminders') rem=[ '• Check the child’s previous documentation and contraindications before every dose. Do not restart a vaccine series merely because of delay; use an approved catch-up schedule.', '• Record vaccine brand, batch number, route, site, date, and vaccinator identity. Give parents the next due date before they leave.', '• Refer for individual advice in immunodeficiency, cancer therapy, organ transplant, chronic renal/hepatic disease, pregnancy, severe allergy, previous serious AEFI, or after an interrupted schedule.', '• For fever, pain, rash, breathing difficulty, persistent crying, seizures, or any concern after vaccination, contact the clinic / emergency service promptly.' ] for x in rem: p=doc.add_paragraph(style='Normal');p.paragraph_format.space_after=Pt(2);r=p.add_run(x);r.font.size=Pt(8);r.font.color.rgb=RGBColor.from_string(GREY) # footer each section for section in doc.sections: fp=section.footer.paragraphs[0];fp.alignment=WD_ALIGN_PARAGRAPH.CENTER r=fp.add_run('Clinic vaccination record | NIS/UIP + IAP-ACVIP | Review annually against official guidance | Version: 23 Sep 2026') r.font.name='Arial';r.font.size=Pt(6.5);r.font.color.rgb=RGBColor.from_string(GREY) doc.save(out) print(out, out.stat().st_size) PY
python3 - <<'PY' from docx import Document from pathlib import Path p=Path('/tmp/workspace/clinic-vaccination-card/output/Clinic_Vaccination_Card_India_NIS_IAP.docx') d=Document(p) print('exists=',p.exists(),'bytes=',p.stat().st_size) print('tables=',len(d.tables),'paragraphs=',len(d.paragraphs),'sections=',len(d.sections)) print('first=',d.paragraphs[1].text if len(d.paragraphs)>1 else '') for i,t in enumerate(d.tables): print(i, len(t.rows), len(t.columns), t.cell(0,0).text[:45]) PY
Clinic Vaccination Card India NIS IAP
Word Document · DOCX
Add a child-friendly vaccine catch-up page
India child immunization catch-up
IAP ACVIP 2025 catch-up immunization India children vaccination schedule
~/clinic-vaccination-card/output
python3 - <<'PY' from docx import Document p='/tmp/workspace/clinic-vaccination-card/output/Clinic_Vaccination_Card_India_NIS_IAP.docx' d=Document(p) print('Document read successfully.') print('Paragraphs:', len(d.paragraphs), 'Tables:', len(d.tables)) for i,p in enumerate(d.paragraphs[-8:]): print(i, p.text[:160]) PY
python3 - <<'PY' from docx import Document from docx.shared import Inches, Pt, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH, WD_BREAK from docx.enum.table import WD_TABLE_ALIGNMENT, WD_CELL_VERTICAL_ALIGNMENT from docx.oxml import OxmlElement from docx.oxml.ns import qn from pathlib import Path p=Path('/tmp/workspace/clinic-vaccination-card/output/Clinic_Vaccination_Card_India_NIS_IAP.docx') doc=Document(p) NAVY='0B3C5D'; TEAL='087E8B'; GOLD='F4B942'; PALE='EAF4F6'; LIGHT='F7FAFC'; GREEN='3E8E5B'; PURPLE='6B4E9B'; GREY='5B6573'; WHITE='FFFFFF' def shade(cell, fill): tcPr=cell._tc.get_or_add_tcPr(); shd=OxmlElement('w:shd'); shd.set(qn('w:fill'),fill); tcPr.append(shd) def set_cell_margins(cell, top=70, start=90, bottom=70, end=90): tcPr=cell._tc.get_or_add_tcPr(); tcMar=tcPr.first_child_found_in('w:tcMar') if tcMar is None: tcMar=OxmlElement('w:tcMar');tcPr.append(tcMar) for m,v in [('top',top),('start',start),('bottom',bottom),('end',end)]: el=tcMar.find(qn('w:'+m)) if el is None: el=OxmlElement('w:'+m);tcMar.append(el) el.set(qn('w:w'),str(v));el.set(qn('w:type'),'dxa') def borders(table,color='B9CDD5',size='6'): tp=table._tbl.tblPr;b=tp.first_child_found_in('w:tblBorders') if b is None:b=OxmlElement('w:tblBorders');tp.append(b) for e in ('top','left','bottom','right','insideH','insideV'): x=b.find(qn('w:'+e)) if x is None:x=OxmlElement('w:'+e);b.append(x) x.set(qn('w:val'),'single');x.set(qn('w:sz'),size);x.set(qn('w:color'),color) def celltxt(cell,text,bold=False,color=None,size=8,align=None): cell.text='';p=cell.paragraphs[0];p.paragraph_format.space_after=Pt(0);p.paragraph_format.space_before=Pt(0) if align is not None:p.alignment=align r=p.add_run(text);r.font.name='Arial';r.font.size=Pt(size);r.bold=bold if color:r.font.color.rgb=RGBColor.from_string(color) cell.vertical_alignment=WD_CELL_VERTICAL_ALIGNMENT.CENTER;set_cell_margins(cell) def header(): t=doc.add_table(rows=1,cols=2);t.autofit=False t.columns[0].width=Inches(1.05);t.columns[1].width=Inches(6.8) shade(t.cell(0,0),TEAL);celltxt(t.cell(0,0),'CLINIC\nLOGO',True,WHITE,12,WD_ALIGN_PARAGRAPH.CENTER) celltxt(t.cell(0,1),'[CLINIC NAME]\nChild Health & Immunization Centre\n[Doctor Name, Qualification] | [Phone] | [Address / Email]',True,NAVY,12) def table(headers,rows,widths): t=doc.add_table(rows=1,cols=len(headers));t.alignment=WD_TABLE_ALIGNMENT.CENTER;t.autofit=False;borders(t) for i,h in enumerate(headers): shade(t.cell(0,i),NAVY);celltxt(t.cell(0,i),h,True,WHITE,7.4,WD_ALIGN_PARAGRAPH.CENTER);t.cell(0,i).width=Inches(widths[i]) for ri,row in enumerate(rows): cells=t.add_row().cells for i,x in enumerate(row): if ri%2==0:shade(cells[i],LIGHT) celltxt(cells[i],x,False,None,7.2);cells[i].width=Inches(widths[i]) return t def textp(text,size=8,color=GREY,bold=False,align=None,space_after=2): p=doc.add_paragraph();p.paragraph_format.space_after=Pt(space_after);p.paragraph_format.space_before=Pt(1) if align:p.alignment=align r=p.add_run(text);r.font.name='Arial';r.font.size=Pt(size);r.font.color.rgb=RGBColor.from_string(color);r.bold=bold # New catch-up page p0=doc.add_paragraph();p0.add_run().add_break(WD_BREAK.PAGE) header() p=doc.add_paragraph();p.alignment=WD_ALIGN_PARAGRAPH.CENTER;p.paragraph_format.space_before=Pt(4);p.paragraph_format.space_after=Pt(2) r=p.add_run('MY VACCINE CATCH-UP ADVENTURE');r.font.name='Arial';r.font.size=Pt(19);r.font.bold=True;r.font.color.rgb=RGBColor.from_string(PURPLE) p=doc.add_paragraph();p.alignment=WD_ALIGN_PARAGRAPH.CENTER;p.paragraph_format.space_after=Pt(5) r=p.add_run('Every visit is a brave step that helps keep me protected!');r.font.name='Arial';r.font.size=Pt(10);r.font.bold=True;r.font.color.rgb=RGBColor.from_string(TEAL) # child info colorful strip t=doc.add_table(rows=1,cols=3);t.autofit=False;borders(t,'E2C46C','8') for i,(lab,txt,col) in enumerate([('My name','____________________________',GOLD),('Today is','____ / ____ / ______',PALE),('My next visit','____ / ____ / ______', 'DDF0E4')]): shade(t.cell(0,i),col);celltxt(t.cell(0,i),lab+'\n'+txt,True,NAVY,8.5,WD_ALIGN_PARAGRAPH.CENTER) textp('OUR FAMILY PROMISE',10,PURPLE,True,WD_ALIGN_PARAGRAPH.CENTER,2) promise=doc.add_table(rows=1,cols=3);promise.autofit=False;borders(promise,'CBBCE7','7') for i,(a,b) in enumerate([('1. Bring my card','Bring this card to every clinic visit.'),('2. Ask questions','We will explain each vaccine in simple words.'),('3. Celebrate progress','After each visit, add a sticker or colour a star!')]): shade(promise.cell(0,i),'F4F0FB');celltxt(promise.cell(0,i),a+'\n'+b,True,PURPLE,8,WD_ALIGN_PARAGRAPH.CENTER) textp('MY CATCH-UP ROAD MAP',10,TEAL,True,WD_ALIGN_PARAGRAPH.CENTER,2) textp('Your clinic team will fill in the vaccines that are right for your child. A delayed schedule can usually continue from where it stopped - it does not usually need to start all over again.',7.5,GREY,False,WD_ALIGN_PARAGRAPH.CENTER,3) road=[ ('VISIT 1 - Start today','Vaccines planned: ________________________________________________\nDate given: __________ Next step: ______________________________'), ('VISIT 2 - Keep going','Vaccines planned: ________________________________________________\nDate given: __________ Next step: ______________________________'), ('VISIT 3 - Almost there','Vaccines planned: ________________________________________________\nDate given: __________ Next step: ______________________________'), ('VISIT 4 - Protection grows','Vaccines planned: ________________________________________________\nDate given: __________ Next step: ______________________________'), ('VISIT 5 - Booster day','Vaccines planned: ________________________________________________\nDate given: __________ Next step: ______________________________')] rt=doc.add_table(rows=0,cols=2);rt.autofit=False;borders(rt,'9BCACF','6') for idx,(h,body) in enumerate(road): cells=rt.add_row().cells cells[0].width=Inches(1.4);cells[1].width=Inches(5.85) shade(cells[0], [GOLD,'DDF0E4','E7E0F5','D7EDF5','FCE2B5'][idx]);shade(cells[1],LIGHT if idx%2==0 else WHITE) celltxt(cells[0],h,True,NAVY,8,WD_ALIGN_PARAGRAPH.CENTER);celltxt(cells[1],body,False,NAVY,8) textp('MY BRAVE-STAR TRACKER',10,PURPLE,True,WD_ALIGN_PARAGRAPH.CENTER,2) stars=doc.add_table(rows=2,cols=5);stars.autofit=False;borders(stars,'D4B85C','6') for i in range(5): shade(stars.cell(0,i),'FFF6D9');celltxt(stars.cell(0,i),'VISIT '+str(i+1),True,NAVY,8,WD_ALIGN_PARAGRAPH.CENTER) shade(stars.cell(1,i),'FFFFFF');celltxt(stars.cell(1,i),'Colour / sticker\n\n____________',False,GREY,8,WD_ALIGN_PARAGRAPH.CENTER) textp('A NOTE FOR PARENTS / GUARDIANS',10,TEAL,True,WD_ALIGN_PARAGRAPH.CENTER,2) parent=doc.add_table(rows=1,cols=2);parent.autofit=False;borders(parent,'9BCACF','6') shade(parent.cell(0,0),PALE);shade(parent.cell(0,1),'F9FBFC') celltxt(parent.cell(0,0),'What to bring\n• This vaccination card\n• Any previous vaccine records\n• Your questions and concerns\n\nCall us if your child is unwell, has had a serious reaction before, or has a condition or medicine affecting immunity.',True,NAVY,7.6) celltxt(parent.cell(0,1),'Important\n• The clinician will check age, previous doses, vaccine product and minimum intervals before each dose.\n• Some vaccines have maximum age limits, so please do not delay a catch-up visit.\n• Individual plans are especially important for children with chronic illness or immune problems.',True,NAVY,7.6) textp('Clinic catch-up plan approved by: ____________________ Date: ____ / ____ / ______ Parent / guardian signature: ____________________',7.5,GREY,False,None,0) # footer for sec in doc.sections: fp=sec.footer.paragraphs[0];fp.alignment=WD_ALIGN_PARAGRAPH.CENTER fp.text='' r=fp.add_run('Clinic vaccination record | NIS/UIP + IAP-ACVIP | Catch-up plan is individualised by the clinic team | Version: 23 Sep 2026') r.font.name='Arial';r.font.size=Pt(6.5);r.font.color.rgb=RGBColor.from_string(GREY) doc.save(p) print(p, p.stat().st_size, len(doc.tables), len(doc.paragraphs)) PY
python3 - <<'PY' from docx import Document from docx.shared import Inches, Pt, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH, WD_BREAK from docx.enum.table import WD_TABLE_ALIGNMENT, WD_CELL_VERTICAL_ALIGNMENT from docx.oxml import OxmlElement from docx.oxml.ns import qn from pathlib import Path out=Path('/tmp/workspace/clinic-vaccination-card/output/Clinic_Vaccination_Card_India_NIS_IAP.docx') doc=Document(out) NAVY='0B3C5D'; TEAL='087E8B'; GOLD='F4B942'; PALE='EAF4F6'; LIGHT='F7FAFC'; PURPLE='6B4E9B'; GREY='5B6573'; WHITE='FFFFFF' def shade(c,x): tcPr=c._tc.get_or_add_tcPr();e=OxmlElement('w:shd');e.set(qn('w:fill'),x);tcPr.append(e) def marg(c): tcPr=c._tc.get_or_add_tcPr(); m=tcPr.first_child_found_in('w:tcMar') if m is None:m=OxmlElement('w:tcMar');tcPr.append(m) for a in ('top','start','bottom','end'): e=m.find(qn('w:'+a)) if e is None:e=OxmlElement('w:'+a);m.append(e) e.set(qn('w:w'),'80');e.set(qn('w:type'),'dxa') def border(t,color='B9CDD5'): tp=t._tbl.tblPr;b=tp.first_child_found_in('w:tblBorders') if b is None:b=OxmlElement('w:tblBorders');tp.append(b) for a in ('top','left','bottom','right','insideH','insideV'): e=OxmlElement('w:'+a);e.set(qn('w:val'),'single');e.set(qn('w:sz'),'6');e.set(qn('w:color'),color);b.append(e) def put(c,s,bold=False,col=None,size=8,align=None): c.text=''; par=c.paragraphs[0];par.paragraph_format.space_after=Pt(0);par.paragraph_format.space_before=Pt(0) if align is not None:par.alignment=align r=par.add_run(s);r.font.name='Arial';r.font.size=Pt(size);r.bold=bold if col:r.font.color.rgb=RGBColor.from_string(col) c.vertical_alignment=WD_CELL_VERTICAL_ALIGNMENT.CENTER;marg(c) def para(s,size=8,col=GREY,bold=False,align=None): x=doc.add_paragraph();x.paragraph_format.space_before=Pt(1);x.paragraph_format.space_after=Pt(2) if align:x.alignment=align r=x.add_run(s);r.font.name='Arial';r.font.size=Pt(size);r.bold=bold;r.font.color.rgb=RGBColor.from_string(col) def make_table(h,rows,w): t=doc.add_table(rows=1,cols=len(h));t.autofit=False;t.alignment=WD_TABLE_ALIGNMENT.CENTER;border(t) for i,z in enumerate(h):shade(t.cell(0,i),NAVY);put(t.cell(0,i),z,True,WHITE,7.4,WD_ALIGN_PARAGRAPH.CENTER);t.cell(0,i).width=Inches(w[i]) for ri,row in enumerate(rows): cs=t.add_row().cells for i,z in enumerate(row): if ri%2==0:shade(cs[i],LIGHT) put(cs[i],z,False,None,7.2);cs[i].width=Inches(w[i]) return t # page x=doc.add_paragraph();x.add_run().add_break(WD_BREAK.PAGE) t=doc.add_table(rows=1,cols=2);t.autofit=False shade(t.cell(0,0),TEAL);put(t.cell(0,0),'CLINIC\nLOGO',True,WHITE,12,WD_ALIGN_PARAGRAPH.CENTER) put(t.cell(0,1),'[CLINIC NAME]\nChild Health & Immunization Centre\n[Doctor Name, Qualification] | [Phone] | [Address / Email]',True,NAVY,12) x=doc.add_paragraph();x.alignment=WD_ALIGN_PARAGRAPH.CENTER;r=x.add_run('MY VACCINE CATCH-UP ADVENTURE');r.font.name='Arial';r.font.size=Pt(19);r.font.bold=True;r.font.color.rgb=RGBColor.from_string(PURPLE) para('Every visit is a brave step that helps keep me protected!',10,TEAL,True,WD_ALIGN_PARAGRAPH.CENTER) t=doc.add_table(rows=1,cols=3);t.autofit=False;border(t,'E2C46C') for i,(lab,val,clr) in enumerate([('My name','________________________',GOLD),('Today is','____ / ____ / ______',PALE),('My next visit','____ / ____ / ______','DDF0E4')]):shade(t.cell(0,i),clr);put(t.cell(0,i),lab+'\n'+val,True,NAVY,8.5,WD_ALIGN_PARAGRAPH.CENTER) para('OUR FAMILY PROMISE',10,PURPLE,True,WD_ALIGN_PARAGRAPH.CENTER) t=doc.add_table(rows=1,cols=3);t.autofit=False;border(t,'CBBCE7') for i,(a,b) in enumerate([('1. Bring my card','Bring this card to every clinic visit.'),('2. Ask questions','We will explain each vaccine in simple words.'),('3. Celebrate progress','After each visit, add a sticker or colour a star!')]):shade(t.cell(0,i),'F4F0FB');put(t.cell(0,i),a+'\n'+b,True,PURPLE,8,WD_ALIGN_PARAGRAPH.CENTER) para('MY CATCH-UP ROAD MAP',10,TEAL,True,WD_ALIGN_PARAGRAPH.CENTER) para('Your clinic team will fill in the vaccines that are right for your child. A delayed schedule can usually continue from where it stopped - it does not usually need to start all over again.',7.5,GREY,False,WD_ALIGN_PARAGRAPH.CENTER) rows=[] for a in ['Start today','Keep going','Almost there','Protection grows','Booster day']: rows.append((a,'Vaccines planned: ________________________________________________\nDate given: __________ Next step: ______________________________')) make_table(['MY VISIT','MY PLAN'],rows,[1.4,5.85]) para('MY BRAVE-STAR TRACKER',10,PURPLE,True,WD_ALIGN_PARAGRAPH.CENTER) t=doc.add_table(rows=2,cols=5);t.autofit=False;border(t,'D4B85C') for i in range(5):shade(t.cell(0,i),'FFF6D9');put(t.cell(0,i),'VISIT '+str(i+1),True,NAVY,8,WD_ALIGN_PARAGRAPH.CENTER);put(t.cell(1,i),'Colour / sticker\n\n____________',False,GREY,8,WD_ALIGN_PARAGRAPH.CENTER) para('A NOTE FOR PARENTS / GUARDIANS',10,TEAL,True,WD_ALIGN_PARAGRAPH.CENTER) t=doc.add_table(rows=1,cols=2);t.autofit=False;border(t,'9BCACF');shade(t.cell(0,0),PALE);shade(t.cell(0,1),'F9FBFC') put(t.cell(0,0),'What to bring\n• This vaccination card\n• Any previous vaccine records\n• Your questions and concerns\n\nCall us if your child is unwell, has had a serious reaction before, or has a condition or medicine affecting immunity.',True,NAVY,7.6) put(t.cell(0,1),'Important\n• The clinician checks age, previous doses, product and minimum intervals before every dose.\n• Some vaccines have maximum age limits, so please do not delay a catch-up visit.\n• Individual plans are needed for children with chronic illness or immune problems.',True,NAVY,7.6) para('Clinic catch-up plan approved by: ____________________ Date: ____ / ____ / ______ Parent / guardian signature: ____________________',7.5,GREY) for sec in doc.sections: foot=sec.footer.paragraphs[0];foot.text='';foot.alignment=WD_ALIGN_PARAGRAPH.CENTER;r=foot.add_run('Clinic vaccination record | NIS/UIP + IAP-ACVIP | Catch-up plan is individualised by the clinic team | Version: 23 Sep 2026');r.font.name='Arial';r.font.size=Pt(6.5);r.font.color.rgb=RGBColor.from_string(GREY) doc.save(out) print(out, out.stat().st_size, len(doc.tables), len(doc.paragraphs)) PY
python3 - <<'PY' from docx import Document from pathlib import Path p=Path('/tmp/workspace/clinic-vaccination-card/output/Clinic_Vaccination_Card_India_NIS_IAP.docx') d=Document(p) print('exists=',p.exists(),'bytes=',p.stat().st_size,'tables=',len(d.tables),'paragraphs=',len(d.paragraphs)) for i,par in enumerate(d.paragraphs[-9:]): print(i, par.text[:180]) print('last tables:') for i,t in enumerate(d.tables[-6:],start=len(d.tables)-6): print(i,len(t.rows),len(t.columns),t.cell(0,0).text[:70]) PY
Clinic Vaccination Card India NIS IAP
Word Document · DOCX