cd /home/daytona/workspace/attachments/d2875f93-b8c4-4666-8ed6-3be762e57776/ && python3 -c "
import pdfplumber
import json
pdf_path = 'Apr2026_08Apr_Final1300L20264080004.pdf'
with pdfplumber.open(pdf_path) as pdf:
print(f'Total pages: {len(pdf.pages)}')
print('=== METADATA ===')
print(pdf.metadata)
print()
for i, page in enumerate(pdf.pages):
print(f'\\n========== PAGE {i+1} ==========')
text = page.extract_text()
if text:
print(text)
tables = page.extract_tables()
if tables:
print(f'\\n--- Tables on page {i+1} ---')
for j, table in enumerate(tables):
print(f'Table {j+1}:')
for row in table:
print(row)
"
I now have the complete data from all 14 pages. Here is the full detailed analysis:
๐ฅ Pathkind Labs - Detailed Medical Report Analysis
Patient: Mr. Chander Sharma | Age: 60 Years | Gender: Male
Collected: 08 April 2026, 08:34 AM | Reported: 08 April 2026, 01:29 PM
Referred by: Dr. Devansh Sharma | Lab: Pathkind Labs, Lucknow
Report: HEALTHKIND ADVANCE Panel (14 pages)
๐ด ABNORMAL RESULTS AT A GLANCE
#
Test
Result
Reference
Status
1
ESR
20.00
0-12
โฌ HIGH
2
HbA1c
6.80%
<5.7% (non-diabetic)
โฌ HIGH (Diabetic range)
3
Mean Plasma Glucose
148.46 mg/dL
0-116
โฌ HIGH
4
Fasting Plasma Glucose
118.00 mg/dL
74-99
โฌ HIGH (Impaired fasting)
5
Total Cholesterol
235.00 mg/dL
<200
โฌ HIGH (Moderate risk)
6
Triglycerides
200.00 mg/dL
<150
โฌ HIGH
7
LDL Cholesterol
164.00 mg/dL
<100 (optimal)
โฌ HIGH
8
VLDL Cholesterol
40.00 mg/dL
10-35
โฌ HIGH
9
Non-HDL Cholesterol
192.30 mg/dL
<130
โฌ HIGH
10
Total Cholesterol/HDL Ratio
5.50
3.3-4.4 (low risk)
โฌ ABOVE low risk range
11
LDL/HDL Ratio
3.84
0.5-3.0 (low risk)
โฌ Moderate risk
12
% Iron Saturation
17.99%
20-50%
โฌ LOW
13
Absolute Monocyte Count
175/ยตL
200-1000
โฌ LOW
14
Vitamin B12
116 pg/mL
191-663
โฌ LOW
15
Vitamin D (25-OH)
26.40 ng/mL
30-100 (sufficient)
โฌ INSUFFICIENT
๐ SECTION-BY-SECTION ANALYSIS
1. Complete Blood Count (CBC) - Mostly Normal
Parameter
Result
Reference
Assessment
Haemoglobin
13.80 g/dL
13-17
โ Normal
Total WBC (TLC)
8.75 thou/ยตL
4-10
โ Normal
Neutrophils
68%
40-80%
โ Normal
Lymphocytes
29%
20-40%
โ Normal
Eosinophils
1%
1-6%
โ Normal
Monocytes
2%
2-10%
โ Normal
Basophils
0%
0-2%
โ Normal
ANC
5950/ยตL
2000-7000
โ Normal
Absolute Lymphocyte Count
2537.50/ยตL
1000-3000
โ Normal
Absolute Eosinophil Count
87.50/ยตL
20-500
โ Normal
Absolute Monocyte Count
175/ยตL
200-1000
โฌ Slightly Low
RBC
4.72 million/ยตL
4.5-5.5
โ Normal
PCV/Hematocrit
40.40%
40-50%
โ Low-normal
MCV
85.50 fL
83-101
โ Normal
MCH
29.20 pg
27-32
โ Normal
MCHC
34.10 g/dL
31.5-34.5
โ Normal
RDW
14.50%
11.8-15.6%
โ Normal
Platelet Count
236 thou/ยตL
150-410
โ Normal
MPV
9.50 fL
6.8-10.9
โ Normal
Clinical Interpretation:
CBC is largely within normal limits, indicating no active infection or severe anemia.
Hb at 13.80 g/dL is adequate but on the lower side for a 60-year-old male.
PCV is at the lower boundary (40.4%, reference 40-50%), suggesting mild dilution or early volume-related changes.
The slightly low absolute monocyte count (175/ยตL) has limited clinical significance in isolation but should be noted in context with the mild iron deficiency pattern.
2. ESR - Elevated ๐ด
Parameter
Result
Reference
Assessment
ESR
20.00
0-12
โฌ HIGH (66% above upper limit)
Clinical Interpretation:
ESR is a non-specific inflammatory marker. At 20 mm/hr in a 60-year-old male (normal <12 mm/hr for males in this lab), this is mildly elevated.
Given the patient's diabetic profile, dyslipidaemia, and mild iron deficiency, chronic low-grade inflammation from metabolic dysregulation is the likely contributor.
A corrected ESR formula for anaemia-related conditions may further explain this reading.
Should be followed up if symptoms of infection, autoimmune disease, or malignancy are present.
3. HbA1c & Glucose - Diabetes Detected ๐ด
Parameter
Result
Reference
Assessment
HbA1c
6.80%
<5.7% (non-diabetic)
โฌ DIABETIC RANGE (โฅ6.5%)
Mean Plasma Glucose
148.46 mg/dL
0-116
โฌ HIGH
Fasting Plasma Glucose
118.00 mg/dL
74-99 (normal)
โฌ Impaired fasting glucose (100-125)
Clinical Interpretation:
HbA1c of 6.80% places Mr. Sharma in the Diabetic range (ADA cutpoint โฅ6.5%). This reflects average blood glucose over the past 8-12 weeks.
The mean plasma glucose of 148.46 mg/dL derived from HbA1c also confirms above-normal glycaemia.
Fasting plasma glucose of 118 mg/dL is in the "impaired fasting glucose" range (100-125 mg/dL). Not yet in the overtly diabetic range (>126), but in combination with an HbA1c โฅ6.5%, a clinical diabetes diagnosis is supported.
The ADA goal for therapy is HbA1c <7.0% - Mr. Sharma is currently within this therapeutic target, suggesting early or early-treated Type 2 diabetes.
Combined with the dyslipidaemia and mild microalbuminuria findings, cardiovascular and renal risk management becomes important.
Recommended action: Review by a diabetologist, dietary modification, regular glucose monitoring.
4. Lipid Profile - Significant Dyslipidaemia ๐ด
Parameter
Result
Reference
Assessment
Total Cholesterol
235 mg/dL
<200 (no risk)
โฌ Moderate risk (200-239)
Triglycerides
200 mg/dL
<150
โฌ High (at upper boundary of "High" range: 200-499)
LDL Cholesterol (Direct)
164 mg/dL
<100 (optimal)
โฌ High (161-189 = High)
HDL Cholesterol
42.70 mg/dL
40-60 (optimal)
โ Low-normal (borderline)
VLDL
40.00 mg/dL
10-35
โฌ HIGH
Non-HDL Cholesterol
192.30 mg/dL
<130
โฌ HIGH
TC/HDL Ratio
5.50
3.3-4.4 (low risk)
โฌ Above low-risk zone
LDL/HDL Ratio
3.84
0.5-3.0 (low risk)
โฌ Moderate risk (3.1-6.0)
Clinical Interpretation:
This is a classic mixed dyslipidaemia pattern (high TC, high TG, high LDL, elevated VLDL, and borderline low HDL) - commonly seen in metabolic syndrome and Type 2 diabetes.
LDL of 164 mg/dL is in the "High" range and well above the guideline target of <100 mg/dL for a diabetic patient (or even <70 mg/dL if additional cardiovascular risk factors are present).
Non-HDL cholesterol of 192.30 mg/dL (target <130 mg/dL for diabetics) is substantially elevated - this is a strong predictor of cardiovascular events.
HDL at 42.70 mg/dL is barely in the optimal range; a higher HDL (>60 mg/dL) is cardioprotective.
The TC/HDL ratio of 5.50 is in the "average risk" range (4.5-7.0), and the LDL/HDL ratio of 3.84 puts him in "moderate risk."
This lipid profile, in the context of diabetes and age 60, significantly raises 10-year cardiovascular risk.
Recommended action: Statin therapy discussion with physician (likely indicated given diabetes + high LDL), dietary fat reduction, triglyceride management (omega-3, fibrates if needed), aerobic exercise.
5. Liver Function Tests (LFT) - Normal โ
Parameter
Result
Reference
Assessment
Bilirubin Total
0.35 mg/dL
0-1.2
โ Normal
Bilirubin Direct
0.16 mg/dL
0-0.2
โ Normal
Bilirubin Indirect
0.18 mg/dL
0-0.9
โ Normal
SGOT/AST
18.80 U/L
0-40
โ Normal
SGPT/ALT
20.60 U/L
0-41
โ Normal
AST/ALT Ratio
0.91
-
โ Normal
ALP
99.70 U/L
40-129
โ Normal
Total Protein
6.77 g/dL
6.4-8.3
โ Normal
Albumin
4.41 g/dL
3.97-4.94
โ Normal
Globulin
2.36 g/dL
1.9-3.7
โ Normal
A/G Ratio
1.87
1.0-2.1
โ Normal
GGT
21.20 U/L
10-71
โ Normal
LDH
183.00 U/L
135-225
โ Normal
Clinical Interpretation:
Liver function is entirely normal. No evidence of hepatocellular damage, cholestasis, or chronic liver disease.
Normal AST and ALT are reassuring given the dyslipidaemia and pre-diabetic state (non-alcoholic fatty liver disease is a risk in metabolic syndrome - monitoring is prudent).
GGT and LDH are within range.
6. Iron Studies - Mild Iron Deficiency Pattern ๐ก
Parameter
Result
Reference
Assessment
Serum Iron
60.10 ยตg/dL
59-158
โ Low-normal (barely in range)
UIBC
274.00 ยตg/dL
110-370
โ Normal
TIBC
334.10 ยตg/dL
228-428
โ Normal
% Saturation
17.99%
20-50%
โฌ LOW
Ferritin
81.50 ng/mL
30-400
โ Normal
Clinical Interpretation:
Iron saturation (transferrin saturation) of 17.99% is just below the lower reference limit of 20%, indicating borderline iron deficiency in utilization, even though ferritin (a storage marker) is normal.
Serum iron at 60.10 ยตg/dL is at the absolute lowest boundary of normal (ref 59 ยตg/dL).
This mild pattern - low-normal serum iron, slightly low saturation, normal ferritin - may reflect functional iron deficiency or early-stage iron mobilization impairment, sometimes associated with chronic inflammation or diabetes.
No frank anaemia is present (Hb 13.8 g/dL is normal), so this is pre-clinical.
Recommended action: Dietary iron enrichment; recheck iron studies in 3-6 months; look for occult causes of iron loss if saturation drops further.
7. Thyroid Profile - Normal โ
Parameter
Result
Reference
Assessment
Total T3
1.23 ng/mL
0.8-2.0
โ Normal
Total T4
10.40 ยตg/dL
5.1-14.1
โ Normal
TSH (3rd Gen)
2.550 ยตIU/mL
0.27-4.2
โ Normal
Clinical Interpretation:
Thyroid function is entirely within normal limits. No evidence of hypothyroidism or hyperthyroidism.
This is important context: hypothyroidism can worsen dyslipidaemia, so its exclusion here means the lipid abnormalities are likely metabolic (diabetes/diet-related) rather than secondary to thyroid disease.
8. Vitamin B12 - Deficient ๐ด
Parameter
Result
Reference
Assessment
Vitamin B12 / Cobalamin
116 pg/mL
191-663
โฌ DEFICIENT (39% below lower limit)
Clinical Interpretation:
At 116 pg/mL, B12 is significantly deficient (normal floor is 191 pg/mL).
B12 deficiency at this level can cause: peripheral neuropathy, subacute combined degeneration of the spinal cord, megaloblastic anaemia, cognitive impairment, and fatigue.
In a 60-year-old male with diabetes, B12 deficiency is extremely common because Metformin (a first-line antidiabetic drug) is known to deplete B12. This should be specifically enquired about.
No macrocytic anaemia is visible yet (MCV 85.5 fL is normal; Hb 13.8 g/dL is normal), suggesting neurological symptoms may precede haematological changes.
Recommended action: B12 supplementation is urgently recommended - typically intramuscular or high-dose oral B12 (1000 mcg/day). Re-test in 3 months. If on Metformin, routine B12 monitoring is essential.
9. Vitamin D - Insufficient ๐ก
Parameter
Result
Reference
Assessment
Vitamin D (25-OH)
26.40 ng/mL
30-100 (sufficient)
โฌ INSUFFICIENT (20-30 = Insufficiency range)
Clinical Interpretation:
At 26.40 ng/mL, Vitamin D falls in the "insufficiency" zone (20-30), just one step above frank deficiency (<20).
Vitamin D insufficiency in a 60-year-old is associated with increased risk of osteoporosis, fractures, muscle weakness, immune dysfunction, and worsening of metabolic conditions including insulin resistance and glucose control.
For a diabetic patient, Vitamin D insufficiency is particularly relevant - low Vitamin D has been linked to impaired insulin secretion and increased cardiovascular risk.
Recommended action: Vitamin D supplementation (typically 1000-2000 IU/day orally; discuss with physician). Encourage daily sunlight exposure. Retest in 3 months. Calcium intake should be assessed alongside.
10. Kidney Function Test (KFT) - Normal โ
Parameter
Result
Reference
Assessment
Blood Urea Nitrogen
10.75 mg/dL
8.41-25.7
โ Normal
Blood Urea
23.00 mg/dL
18-55
โ Normal
Creatinine
0.70 mg/dL
0.7-1.3
โ Normal (lower boundary)
BUN/Creatinine Ratio
15.42
10-20
โ Normal
Uric Acid
4.40 mg/dL
3.4-7.0
โ Normal
Sodium
139.20 mmol/L
136-145
โ Normal
Potassium
4.12 mmol/L
3.5-5.1
โ Normal
Chloride
103.70 mmol/L
97-107
โ Normal
Calcium
9.12 mg/dL
8.8-10.2
โ Normal
Phosphorus
2.77 mg/dL
2.5-4.5
โ Normal
eGFR (Male)
105.62 mL/min/1.73mยฒ
>90 Normal
โ Normal GFR
Clinical Interpretation:
Kidney function is well preserved. eGFR of 105.62 mL/min/1.73mยฒ is in the normal range (>90), indicating no significant chronic kidney disease at this time.
Creatinine at 0.70 mg/dL is at the lower boundary, normal for body size and muscle mass in older males.
Electrolytes are perfectly balanced.
Given the diabetic status, regular monitoring every 6-12 months is necessary to catch early diabetic nephropathy.
11. Microalbuminuria - Normal โ
Parameter
Result
Reference
Assessment
Microalbumin (urine)
1.20 mg/L
0-20
โ Normal
Creatinine (urine)
51.90 mg/dL
39-259
โ Normal
Albumin/Creatinine Ratio (ACR)
2.31 mg/g
0-30
โ Normal
Clinical Interpretation:
Microalbuminuria is normal - no early diabetic nephropathy at this stage.
ACR <30 mg/g indicates intact glomerular filtration without significant proteinuria.
This is reassuring but must be monitored annually for a diabetic patient, as microalbuminuria typically appears before symptomatic kidney disease.
12. Urine Routine & Microscopy - Normal โ
Parameter
Result
Assessment
Colour
Pale Yellow
โ Normal
Appearance
Clear
โ Normal
Specific Gravity
1.015
โ Normal
pH
6.00
โ Normal
Glucose
Not Detected
โ Normal
Protein
Not Detected
โ Normal
Ketones
Not Detected
โ Normal
Blood
Not Detected
โ Normal
Leucocytes
Not Detected
โ Normal
Bilirubin
Not Detected
โ Normal
Urobilinogen
Normal
โ Normal
Nitrite
Not Detected
โ Normal
Pus Cells
1-2/hpf
โ Normal (0-5)
RBC
Not Detected
โ Normal
Epithelial Cells
3-5/hpf
โ Normal (0-5)
Casts
Not Detected
โ Normal
Crystals
Not Detected
โ Normal
Bacteria
Not Detected
โ Normal
Clinical Interpretation:
Urinalysis is entirely normal. Notably, no glycosuria despite fasting glucose of 118 mg/dL (glucose spills into urine typically above renal threshold ~180 mg/dL - consistent finding).
No evidence of urinary tract infection, casts, or nephropathy markers.
13. HBsAg (Hepatitis B) - Non-Reactive โ
Result: Non-Reactive - No active or chronic Hepatitis B infection detected.
๐ฉบ CLINICAL SUMMARY & PRIORITY ACTIONS
Priority 1 - Diabetes Management (Urgent)
HbA1c 6.80% confirms Type 2 Diabetes Mellitus (ADA criterion โฅ6.5%).
Currently within ADA therapeutic goal (<7.0%), but fasting glucose (118 mg/dL) still in impaired range.
Review current antidiabetic medication; assess dietary adherence.
If on Metformin - check B12 status urgently (confirmed deficient at 116 pg/mL).
Priority 2 - Dyslipidaemia (Urgent - High Cardiovascular Risk)
LDL of 164 mg/dL is far above the target of <100 mg/dL (or <70 mg/dL for high-risk diabetic patients per ACC/AHA guidelines).
Combined elevated TG (200), VLDL (40), Non-HDL (192.3) in a diabetic 60-year-old male = high 10-year ASCVD risk.
A statin (e.g., Atorvastatin or Rosuvastatin) is very likely to be indicated; discuss with cardiologist or internist.
If constitutional symptoms are present (fever, weight loss, joint pain), further evaluation warranted.
Priority 6 - Iron Studies (Watch & Monitor)
Iron saturation at 17.99% is just below lower limit. No anaemia currently.
Dietary counselling on iron-rich foods; recheck in 6 months.
โ WHAT IS NORMAL IN THIS REPORT
Full CBC (no anaemia, no infection, normal platelets)
Liver function (AST, ALT, ALP, GGT, LDH all normal)
Thyroid function (T3, T4, TSH all normal)
Kidney function (creatinine, urea, electrolytes, eGFR >90)
Urine routine and microscopy (completely clean)
Microalbuminuria (ACR 2.31 - no early nephropathy)
Ferritin (normal stores)
HBsAg (non-reactive)
Calcium & Phosphorus (normal)
Hepatic proteins (albumin, globulin, A/G ratio normal)
๐ RECOMMENDED FOLLOW-UP TESTS
Test
Reason
HbA1c repeat
In 3 months per ADA guidelines
Lipid profile repeat
After dietary/statin intervention (6-8 weeks)
B12 level repeat
After supplementation (3 months)
Vitamin D repeat
After supplementation (3 months)
Fasting + post-prandial glucose
Detailed glycaemic monitoring
OGTT (if not diagnosed yet)
Confirm diabetes status
CRP / hs-CRP
To quantify inflammatory/cardiovascular risk
ECG / Echo
Given high CV risk profile
HbA1c + Creatinine + ACR
Annual diabetic panel
Blood pressure monitoring
Standard care for diabetic patient
Disclaimer: This analysis is for informational and educational purposes only. All findings must be interpreted by the treating physician (Dr. Devansh Sharma) in the context of the patient's symptoms, medical history, and clinical examination. Do not start or stop any medication based on this report alone.
Create a summary document highlighting abnormal findings and management recommendations
Reading File
Running Command
ls /home/daytona/workspace/ && ls /home/daytona/skills/docx/
Running Command
mkdir -p /home/daytona/workspace/chander-sharma-report && cat > /home/daytona/workspace/chander-sharma-report/create_summary.js << 'EOF'
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
AlignmentType, HeadingLevel, BorderStyle, WidthType, ShadingType,
VerticalAlign, PageNumber, Header, Footer, TabStopType, TabStopPosition,
UnderlineType
} = require('docx');
const fs = require('fs');
// โโโ COLOR PALETTE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const RED = "C0392B";
const ORANGE = "E67E22";
const GREEN = "1E8449";
const BLUE = "1A5276";
const LIGHTBLUE = "D6EAF8";
const LIGHTRED = "FADBD8";
const LIGHTYELL = "FEF9E7";
const LIGHTGREEN= "D5F5E3";
const DARKGRAY = "2C3E50";
const MIDGRAY = "566573";
const WHITE = "FFFFFF";
const HEADBG = "1A5276";
const SECTIONBG = "D6EAF8";
// โโโ HELPERS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
function hRule() {
return new Paragraph({
border: { bottom: { color: "1A5276", size: 12, style: BorderStyle.SINGLE } },
spacing: { after: 100, before: 100 }
});
}
function spacer(pts = 120) {
return new Paragraph({ spacing: { after: pts } });
}
function sectionHeader(text, bgColor = HEADBG) {
return new Paragraph({
children: [new TextRun({ text, bold: true, color: WHITE, size: 26 })],
shading: { type: ShadingType.SOLID, color: bgColor },
spacing: { before: 200, after: 80 },
indent: { left: 100, right: 100 }
});
}
function subHeader(text) {
return new Paragraph({
children: [new TextRun({ text, bold: true, color: BLUE, size: 22 })],
spacing: { before: 160, after: 60 }
});
}
function bodyText(text, color = DARKGRAY, bold = false) {
return new Paragraph({
children: [new TextRun({ text, color, bold, size: 20 })],
spacing: { after: 60 }
});
}
function bulletPoint(text, color = DARKGRAY) {
return new Paragraph({
children: [new TextRun({ text: `\u2022 ${text}`, color, size: 20 })],
indent: { left: 360 },
spacing: { after: 50 }
});
}
function warningBox(text) {
return new Paragraph({
children: [new TextRun({ text: `\u26A0 ${text}`, bold: true, color: "7D6608", size: 19 })],
shading: { type: ShadingType.SOLID, color: "FEF9E7" },
border: {
left: { color: ORANGE, size: 20, style: BorderStyle.SINGLE }
},
indent: { left: 200 },
spacing: { after: 80 }
});
}
function redAlert(text) {
return new Paragraph({
children: [new TextRun({ text: `\u{1F534} ${text}`, bold: true, color: "922B21", size: 20 })],
shading: { type: ShadingType.SOLID, color: "FADBD8" },
border: { left: { color: RED, size: 20, style: BorderStyle.SINGLE } },
indent: { left: 200 },
spacing: { after: 80 }
});
}
// โโโ TABLE HELPERS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
function cell(text, { bold=false, color=DARKGRAY, bg=WHITE, align=AlignmentType.LEFT, size=19 } = {}) {
return new TableCell({
children: [new Paragraph({
children: [new TextRun({ text, bold, color, size })],
alignment: align
})],
shading: { type: ShadingType.SOLID, color: bg },
margins: { top: 80, bottom: 80, left: 100, right: 100 },
verticalAlign: VerticalAlign.CENTER
});
}
function tableHeaderRow(labels, bgColor = HEADBG) {
return new TableRow({
children: labels.map(l => cell(l, { bold: true, color: WHITE, bg: bgColor, size: 19 })),
tableHeader: true
});
}
// โโโ ABNORMAL RESULTS TABLE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
function abnormalTable() {
const rows = [
tableHeaderRow(["#", "Parameter", "Result", "Reference", "Status"]),
makeRow("1", "ESR", "20.00 mm/hr", "0 - 12", "HIGH", RED, LIGHTRED),
makeRow("2", "HbA1c", "6.80 %", "< 5.7% (ND)", "HIGH - DIABETIC", RED, LIGHTRED),
makeRow("3", "Mean Plasma Glucose", "148.46 mg/dL", "0 - 116", "HIGH", RED, LIGHTRED),
makeRow("4", "Fasting Plasma Glucose", "118.00 mg/dL", "74 - 99", "IMPAIRED", ORANGE, LIGHTYELL),
makeRow("5", "Total Cholesterol", "235.00 mg/dL", "< 200", "MODERATE RISK", ORANGE, LIGHTYELL),
makeRow("6", "Triglycerides", "200.00 mg/dL", "< 150", "HIGH", RED, LIGHTRED),
makeRow("7", "LDL Cholesterol", "164.00 mg/dL", "< 100 (opt)", "HIGH", RED, LIGHTRED),
makeRow("8", "VLDL Cholesterol", "40.00 mg/dL", "10 - 35", "HIGH", ORANGE, LIGHTYELL),
makeRow("9", "Non-HDL Cholesterol", "192.30 mg/dL", "< 130", "HIGH", RED, LIGHTRED),
makeRow("10","TC / HDL Ratio", "5.50", "3.3 - 4.4 LR", "ABOVE LOW RISK", ORANGE, LIGHTYELL),
makeRow("11","LDL / HDL Ratio", "3.84", "0.5 - 3.0 LR", "MOD RISK", ORANGE, LIGHTYELL),
makeRow("12","Iron % Saturation", "17.99 %", "20 - 50 %", "LOW", ORANGE, LIGHTYELL),
makeRow("13","Absolute Monocyte Count", "175 /ยตL", "200 - 1000", "LOW", ORANGE, LIGHTYELL),
makeRow("14","Vitamin B12 / Cobalamin", "116 pg/mL", "191 - 663", "DEFICIENT", RED, LIGHTRED),
makeRow("15","Vitamin D (25-OH)", "26.40 ng/mL", "30 - 100", "INSUFFICIENT", ORANGE, LIGHTYELL),
];
return new Table({
rows,
width: { size: 100, type: WidthType.PERCENTAGE }
});
}
function makeRow(num, param, result, ref, status, statusColor=RED, rowBg=WHITE) {
return new TableRow({
children: [
cell(num, { bg: rowBg, size: 18, align: AlignmentType.CENTER }),
cell(param, { bg: rowBg, bold: true, size: 18 }),
cell(result, { bg: rowBg, bold: true, color: statusColor, size: 18 }),
cell(ref, { bg: rowBg, color: MIDGRAY, size: 18 }),
cell(status, { bg: rowBg, bold: true, color: statusColor, size: 18 }),
]
});
}
// โโโ MANAGEMENT TABLE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
function mgmtTable(rows) {
return new Table({
rows: [
tableHeaderRow(["Category", "Recommendation"], "1A5276"),
...rows.map(([cat, rec]) => new TableRow({
children: [
cell(cat, { bold: true, bg: LIGHTBLUE, color: BLUE, size: 19 }),
cell(rec, { bg: WHITE, size: 19 })
]
}))
],
width: { size: 100, type: WidthType.PERCENTAGE }
});
}
// โโโ FOLLOW-UP TABLE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
function followupTable() {
return new Table({
rows: [
tableHeaderRow(["Test / Action", "Reason", "Timeline"], "1A5276"),
fuRow("HbA1c repeat", "Glycaemic monitoring (ADA)", "3 months"),
fuRow("Fasting glucose (PPBS)", "Diabetes management", "Monthly"),
fuRow("Lipid profile repeat", "Post-statin/lifestyle monitoring", "6-8 weeks"),
fuRow("Vitamin B12 recheck", "Post-supplementation confirmation", "3 months"),
fuRow("Vitamin D recheck", "Post-supplementation confirmation", "3 months"),
fuRow("Iron studies repeat", "Monitor borderline iron saturation", "6 months"),
fuRow("hs-CRP", "Quantify cardiovascular/inflammatory risk", "Now"),
fuRow("Urine ACR", "Annual diabetic nephropathy screening", "Annually"),
fuRow("ECG / Echo", "Cardiovascular risk assessment", "Now"),
fuRow("Blood pressure monitoring","Standard diabetic care", "Every visit"),
],
width: { size: 100, type: WidthType.PERCENTAGE }
});
}
function fuRow(test, reason, timeline) {
return new TableRow({ children: [
cell(test, { bold: true, bg: LIGHTGREEN, color: GREEN, size: 18 }),
cell(reason, { bg: WHITE, size: 18 }),
cell(timeline, { bg: WHITE, bold: true, color: BLUE, size: 18, align: AlignmentType.CENTER })
]});
}
// โโโ BUILD DOCUMENT โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const doc = new Document({
styles: {
default: {
document: {
run: { font: "Calibri", size: 20, color: DARKGRAY }
}
}
},
sections: [{
properties: {
page: {
margin: { top: 720, bottom: 720, left: 900, right: 900 }
}
},
headers: {
default: new Header({
children: [
new Paragraph({
children: [
new TextRun({ text: "PATHKIND LABS | CLINICAL SUMMARY REPORT", bold: true, color: WHITE, size: 20 }),
new TextRun({ text: " Confidential - For Physician Use Only", color: "D6EAF8", size: 18 })
],
shading: { type: ShadingType.SOLID, color: HEADBG },
spacing: { before: 60, after: 60 },
indent: { left: 100 }
})
]
})
},
footers: {
default: new Footer({
children: [
new Paragraph({
children: [
new TextRun({ text: "Disclaimer: This report is for informational purposes. All findings must be interpreted by the treating physician in the context of clinical history. | Page ", color: MIDGRAY, size: 16 }),
new TextRun({ children: [PageNumber.CURRENT], color: MIDGRAY, size: 16 })
],
alignment: AlignmentType.CENTER
})
]
})
},
children: [
// โโ TITLE BLOCK โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
spacer(80),
new Paragraph({
children: [new TextRun({ text: "CLINICAL SUMMARY", bold: true, color: WHITE, size: 40 })],
shading: { type: ShadingType.SOLID, color: HEADBG },
alignment: AlignmentType.CENTER,
spacing: { before: 60, after: 0 },
indent: { left: 100, right: 100 }
}),
new Paragraph({
children: [new TextRun({ text: "Abnormal Findings & Management Recommendations", bold: false, color: "AED6F1", size: 24 })],
shading: { type: ShadingType.SOLID, color: "1A5276" },
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 0 },
indent: { left: 100, right: 100 }
}),
spacer(120),
// โโ PATIENT INFO TABLE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
new TableRow({ children: [
cell("Patient Name", { bold: true, bg: LIGHTBLUE, color: BLUE }),
cell("Mr. Chander Sharma", { bold: true, color: DARKGRAY }),
cell("Report Date", { bold: true, bg: LIGHTBLUE, color: BLUE }),
cell("08 April 2026", { color: DARKGRAY })
]}),
new TableRow({ children: [
cell("Age / Gender", { bold: true, bg: LIGHTBLUE, color: BLUE }),
cell("60 Years / Male", { color: DARKGRAY }),
cell("Collected", { bold: true, bg: LIGHTBLUE, color: BLUE }),
cell("08/04/2026 08:34 AM", { color: DARKGRAY })
]}),
new TableRow({ children: [
cell("Referring Doctor", { bold: true, bg: LIGHTBLUE, color: BLUE }),
cell("Dr. Devansh Sharma", { color: DARKGRAY }),
cell("Reported", { bold: true, bg: LIGHTBLUE, color: BLUE }),
cell("08/04/2026 01:29 PM", { color: DARKGRAY })
]}),
new TableRow({ children: [
cell("Lab", { bold: true, bg: LIGHTBLUE, color: BLUE }),
cell("Pathkind Labs, Lucknow", { color: DARKGRAY }),
cell("Panel", { bold: true, bg: LIGHTBLUE, color: BLUE }),
cell("HEALTHKIND ADVANCE", { color: DARKGRAY })
]}),
]
}),
spacer(160),
// โโ SECTION 1: EXECUTIVE SUMMARY โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeader(" 1. EXECUTIVE SUMMARY"),
spacer(60),
bodyText(
"Mr. Chander Sharma, a 60-year-old male, underwent the Healthkind Advance panel on 08 April 2026. " +
"The report identifies 15 abnormal parameters across five clinical domains: glycaemic control, " +
"lipid metabolism, nutritional deficiencies, inflammatory markers, and iron status. " +
"Collectively, these findings suggest a diagnosis of Type 2 Diabetes Mellitus with co-existing mixed " +
"dyslipidaemia and nutritional deficiencies (Vitamin B12 and Vitamin D) that require prompt clinical attention."
),
spacer(60),
redAlert("HbA1c 6.80% โ Confirms Type 2 Diabetes Mellitus (ADA criterion โฅ 6.5%)"),
redAlert("LDL Cholesterol 164 mg/dL โ High (target < 100 mg/dL for diabetic patients)"),
redAlert("Vitamin B12 116 pg/mL โ Significantly deficient (39% below lower normal limit)"),
warningBox("Vitamin D 26.40 ng/mL โ Insufficient (range 20-30); supplement recommended"),
warningBox("ESR 20 mm/hr โ Mildly elevated; likely reflects chronic metabolic inflammation"),
spacer(100),
// โโ SECTION 2: ABNORMAL RESULTS TABLE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeader(" 2. COMPLETE ABNORMAL RESULTS TABLE"),
spacer(80),
abnormalTable(),
spacer(140),
// โโ SECTION 3: DOMAIN ANALYSIS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeader(" 3. DOMAIN-BY-DOMAIN ANALYSIS"),
// 3A Diabetes
subHeader("3A. Glycaemic Status โ TYPE 2 DIABETES MELLITUS"),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
tableHeaderRow(["Parameter", "Result", "Cutoff", "Interpretation"], "C0392B"),
new TableRow({ children: [
cell("HbA1c", { bold:true, bg: LIGHTRED }),
cell("6.80%", { bold:true, color:RED, bg:LIGHTRED }),
cell("โฅ 6.5% = Diabetic", { bg:LIGHTRED }),
cell("Diabetic range confirmed", { bold:true, color:RED, bg:LIGHTRED })
]}),
new TableRow({ children: [
cell("Fasting Plasma Glucose", { bold:true, bg:LIGHTYELL }),
cell("118 mg/dL", { bold:true, color:ORANGE, bg:LIGHTYELL }),
cell("100-125 = Impaired", { bg:LIGHTYELL }),
cell("Impaired fasting glucose", { bold:true, color:ORANGE, bg:LIGHTYELL })
]}),
new TableRow({ children: [
cell("Mean Plasma Glucose", { bold:true, bg:LIGHTRED }),
cell("148.46 mg/dL", { bold:true, color:RED, bg:LIGHTRED }),
cell("0 - 116", { bg:LIGHTRED }),
cell("Elevated - correlates with HbA1c", { color:RED, bg:LIGHTRED })
]}),
]
}),
spacer(80),
bulletPoint("HbA1c of 6.80% reflects average blood glucose over the past 8-12 weeks and meets ADA diagnostic criteria for Type 2 Diabetes (cutpoint โฅ 6.5%)."),
bulletPoint("The ADA therapeutic goal is HbA1c < 7.0% โ Mr. Sharma is currently just within this target, indicating early or recently treated diabetes."),
bulletPoint("Fasting glucose of 118 mg/dL sits in the 'impaired fasting glucose' range (100-125 mg/dL), reinforcing the diagnosis."),
bulletPoint("If the patient is on Metformin, Vitamin B12 deficiency (confirmed at 116 pg/mL) is a well-known side effect and requires urgent supplementation."),
spacer(80),
// 3B Lipids
subHeader("3B. Lipid Profile โ MIXED DYSLIPIDAEMIA (High Cardiovascular Risk)"),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
tableHeaderRow(["Parameter", "Result", "Target (Diabetic)", "Risk Category"], "C0392B"),
new TableRow({ children: [
cell("Total Cholesterol", { bold:true, bg:LIGHTYELL }),
cell("235 mg/dL", { bold:true, color:ORANGE, bg:LIGHTYELL }),
cell("< 200 mg/dL", { bg:LIGHTYELL }),
cell("Moderate Risk (200-239)", { color:ORANGE, bg:LIGHTYELL })
]}),
new TableRow({ children: [
cell("LDL Cholesterol", { bold:true, bg:LIGHTRED }),
cell("164 mg/dL", { bold:true, color:RED, bg:LIGHTRED }),
cell("< 100 mg/dL", { bg:LIGHTRED }),
cell("HIGH (161-189 range)", { bold:true, color:RED, bg:LIGHTRED })
]}),
new TableRow({ children: [
cell("Triglycerides", { bold:true, bg:LIGHTRED }),
cell("200 mg/dL", { bold:true, color:RED, bg:LIGHTRED }),
cell("< 150 mg/dL", { bg:LIGHTRED }),
cell("HIGH (200-499 range)", { bold:true, color:RED, bg:LIGHTRED })
]}),
new TableRow({ children: [
cell("Non-HDL Cholesterol",{ bold:true, bg:LIGHTRED }),
cell("192.30 mg/dL", { bold:true, color:RED, bg:LIGHTRED }),
cell("< 130 mg/dL", { bg:LIGHTRED }),
cell("Significantly High", { bold:true, color:RED, bg:LIGHTRED })
]}),
new TableRow({ children: [
cell("HDL Cholesterol", { bold:true, bg:LIGHTGREEN }),
cell("42.70 mg/dL", { bold:true, color:GREEN, bg:LIGHTGREEN }),
cell("> 40 mg/dL", { bg:LIGHTGREEN }),
cell("Borderline (barely adequate)", { color:MIDGRAY, bg:LIGHTGREEN })
]}),
new TableRow({ children: [
cell("VLDL", { bold:true, bg:LIGHTYELL }),
cell("40.00 mg/dL", { bold:true, color:ORANGE, bg:LIGHTYELL }),
cell("10 - 35 mg/dL", { bg:LIGHTYELL }),
cell("Elevated", { color:ORANGE, bg:LIGHTYELL })
]}),
]
}),
spacer(80),
bulletPoint("This is a classic mixed dyslipidaemia pattern โ elevated TC, LDL, TG, VLDL, and Non-HDL with borderline-low HDL. This pattern is characteristic of metabolic syndrome and Type 2 Diabetes."),
bulletPoint("In a 60-year-old diabetic male, LDL > 100 mg/dL is above target. At 164 mg/dL, it falls in the 'High' category; the ACC/AHA high-intensity statin guidelines are likely applicable."),
bulletPoint("Non-HDL cholesterol of 192.30 mg/dL is a stronger predictor of cardiovascular events than LDL alone; target is < 130 mg/dL."),
bulletPoint("Triglycerides at 200 mg/dL border the 'High' range. Elevated TG combined with low HDL worsens atherogenic risk significantly."),
bulletPoint("Thyroid function is normal โ confirming the dyslipidaemia is primary/metabolic rather than secondary to hypothyroidism."),
spacer(80),
// 3C Vitamins
subHeader("3C. Nutritional Deficiencies โ B12 & Vitamin D"),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
tableHeaderRow(["Nutrient", "Result", "Reference", "Status & Clinical Risk"], "8E44AD"),
new TableRow({ children: [
cell("Vitamin B12", { bold:true, bg:"F4ECF7" }),
cell("116 pg/mL", { bold:true, color:"8E44AD", bg:"F4ECF7" }),
cell("191 - 663 pg/mL", { bg:"F4ECF7" }),
cell("DEFICIENT โ Neuropathy risk, possible Metformin effect", { bold:true, color:"8E44AD", bg:"F4ECF7" })
]}),
new TableRow({ children: [
cell("Vitamin D (25-OH)", { bold:true, bg:LIGHTYELL }),
cell("26.40 ng/mL", { bold:true, color:ORANGE, bg:LIGHTYELL }),
cell("30 - 100 ng/mL", { bg:LIGHTYELL }),
cell("INSUFFICIENT โ Bone, immune, and metabolic risk", { bold:true, color:ORANGE, bg:LIGHTYELL })
]}),
]
}),
spacer(80),
bulletPoint("Vitamin B12 at 116 pg/mL is 39% below the lower reference limit. This level is associated with peripheral neuropathy, subacute combined degeneration of the spinal cord, macrocytic anaemia, and cognitive impairment."),
bulletPoint("In a 60-year-old diabetic, Metformin is a common cause of B12 malabsorption. Enquire about current medications urgently."),
bulletPoint("Notably, no macrocytic anaemia is yet evident (MCV 85.5 fL, Hb 13.8 g/dL) โ suggesting neurological manifestations may precede haematological changes at this stage."),
bulletPoint("Vitamin D insufficiency (26.40 ng/mL) has been linked to impaired insulin secretion, increased cardiovascular risk, bone loss, and immune dysfunction โ all relevant in this patient's context."),
spacer(80),
// 3D Iron
subHeader("3D. Iron Studies โ Borderline Iron Deficiency"),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
tableHeaderRow(["Parameter", "Result", "Reference", "Comment"], "E67E22"),
new TableRow({ children: [
cell("Serum Iron", { bold:true, bg:LIGHTYELL }),
cell("60.10 ยตg/dL", { bold:true, color:ORANGE, bg:LIGHTYELL }),
cell("59 - 158 ยตg/dL", { bg:LIGHTYELL }),
cell("At absolute lower boundary", { bg:LIGHTYELL })
]}),
new TableRow({ children: [
cell("% Iron Saturation", { bold:true, bg:LIGHTYELL }),
cell("17.99%", { bold:true, color:ORANGE, bg:LIGHTYELL }),
cell("20 - 50%", { bg:LIGHTYELL }),
cell("BELOW NORMAL โ functional iron deficiency pattern", { bold:true, color:ORANGE, bg:LIGHTYELL })
]}),
new TableRow({ children: [
cell("Ferritin", { bold:true, bg:LIGHTGREEN }),
cell("81.50 ng/mL", { bold:true, color:GREEN, bg:LIGHTGREEN }),
cell("30 - 400 ng/mL", { bg:LIGHTGREEN }),
cell("Normal iron stores", { bg:LIGHTGREEN })
]}),
new TableRow({ children: [
cell("TIBC", { bold:true, bg:LIGHTGREEN }),
cell("334.10 ยตg/dL", { bold:true, color:GREEN, bg:LIGHTGREEN }),
cell("228 - 428 ยตg/dL", { bg:LIGHTGREEN }),
cell("Normal", { bg:LIGHTGREEN })
]}),
]
}),
spacer(80),
bulletPoint("Iron saturation at 17.99% is below the normal lower limit of 20%, indicating borderline functional iron deficiency despite normal storage (ferritin 81.5 ng/mL)."),
bulletPoint("No frank anaemia is present at this time (Hb 13.8 g/dL). This is a pre-clinical finding that warrants dietary correction and monitoring."),
bulletPoint("Chronic low-grade inflammation in diabetes can cause functional iron deficiency by reducing iron mobilization from stores โ this may explain the pattern."),
spacer(80),
// 3E ESR
subHeader("3E. Inflammatory Marker โ ESR"),
bodyText("ESR is mildly elevated at 20 mm/hr (reference: 0-12 mm/hr for males). This is a non-specific finding most likely reflecting chronic low-grade inflammation associated with metabolic syndrome, diabetes, and dyslipidaemia. In the absence of symptoms of infection, autoimmune disease, or malignancy, no immediate escalation is required. However, if constitutional symptoms (unexplained fever, weight loss, joint pains) are present, further targeted workup should be pursued.", DARKGRAY),
spacer(80),
// โโ SECTION 4: NORMAL PARAMETERS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeader(" 4. REASSURING NORMAL FINDINGS"),
spacer(80),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
tableHeaderRow(["System / Panel", "Key Normal Results"], "1E8449"),
new TableRow({ children: [
cell("Complete Blood Count", { bold:true, bg:LIGHTGREEN, color:GREEN }),
cell("Hb 13.8 g/dL, WBC 8.75, Neutrophils 68%, Platelets 236K, MCV 85.5 fL โ No anaemia, infection, or haematological disorder", { bg:LIGHTGREEN })
]}),
new TableRow({ children: [
cell("Liver Function Tests", { bold:true, bg:LIGHTGREEN, color:GREEN }),
cell("AST 18.8, ALT 20.6, ALP 99.7, GGT 21.2, LDH 183, Albumin 4.41 โ All within normal limits", { bg:LIGHTGREEN })
]}),
new TableRow({ children: [
cell("Thyroid Profile", { bold:true, bg:LIGHTGREEN, color:GREEN }),
cell("T3 1.23, T4 10.40, TSH 2.55 โ Normal thyroid function; dyslipidaemia is primary, not secondary", { bg:LIGHTGREEN })
]}),
new TableRow({ children: [
cell("Kidney Function Test", { bold:true, bg:LIGHTGREEN, color:GREEN }),
cell("Creatinine 0.70, BUN 10.75, Uric Acid 4.40, Electrolytes normal, eGFR 105.62 mL/min/1.73mยฒ โ Normal renal function", { bg:LIGHTGREEN })
]}),
new TableRow({ children: [
cell("Microalbuminuria", { bold:true, bg:LIGHTGREEN, color:GREEN }),
cell("ACR 2.31 mg/g (normal < 30) โ No diabetic nephropathy detected at this time", { bg:LIGHTGREEN })
]}),
new TableRow({ children: [
cell("Urine Analysis", { bold:true, bg:LIGHTGREEN, color:GREEN }),
cell("Clear, no glucose, no protein, no casts, no bacteria, no RBCs โ Completely normal", { bg:LIGHTGREEN })
]}),
new TableRow({ children: [
cell("HBsAg", { bold:true, bg:LIGHTGREEN, color:GREEN }),
cell("Non-Reactive โ No active or chronic Hepatitis B infection", { bg:LIGHTGREEN })
]}),
new TableRow({ children: [
cell("Iron Stores & Ferritin", { bold:true, bg:LIGHTGREEN, color:GREEN }),
cell("Ferritin 81.5 ng/mL, TIBC normal โ Adequate iron stores; functional deficiency pattern only", { bg:LIGHTGREEN })
]}),
]
}),
spacer(140),
// โโ SECTION 5: MANAGEMENT RECOMMENDATIONS โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeader(" 5. MANAGEMENT RECOMMENDATIONS"),
spacer(80),
subHeader("Priority 1 โ Diabetes Management (URGENT)"),
mgmtTable([
["Diagnosis Confirmation", "HbA1c 6.80% meets ADA criterion for Type 2 Diabetes Mellitus. Correlate with fasting glucose (118 mg/dL in impaired range). Consider OGTT if clinical doubt exists."],
["Glycaemic Target", "Maintain HbA1c < 7.0% (current: 6.80% โ within target). Tighten fasting glucose to < 100 mg/dL through lifestyle and/or pharmacotherapy."],
["Medication Review", "If on Metformin: order Vitamin B12 โ ALREADY CONFIRMED DEFICIENT. Start B12 supplementation immediately. Assess need for dose adjustment or switch to extended-release Metformin."],
["Diet & Lifestyle", "Reduce refined carbohydrates and simple sugars. Follow a diabetic diet (low GI foods, portion control, high fibre). Structured physical activity 150 min/week."],
["HbA1c Monitoring", "Repeat HbA1c in 3 months (ADA guideline for managed diabetes). If HbA1c rises > 7.0%, escalate therapy."],
]),
spacer(100),
subHeader("Priority 2 โ Dyslipidaemia / Cardiovascular Risk (URGENT)"),
mgmtTable([
["Statin Therapy", "LDL 164 mg/dL in a 60-year-old diabetic male is a strong indication for high-intensity statin therapy (e.g., Atorvastatin 40-80 mg or Rosuvastatin 20-40 mg). Discuss with physician immediately."],
["LDL Target", "Target LDL < 100 mg/dL (standard for T2DM); or < 70 mg/dL if additional cardiovascular risk factors present."],
["Triglycerides", "TG 200 mg/dL: dietary fat restriction, reduce simple sugars, alcohol avoidance. If TG remains > 200 mg/dL after statin, consider Fenofibrate or Omega-3 fatty acids."],
["HDL Improvement", "HDL 42.7 mg/dL (borderline). Aerobic exercise and niacin-rich foods can raise HDL. Target HDL > 40 mg/dL maintained, ideally > 60 mg/dL."],
["Dietary Changes", "Reduce saturated and trans fats; increase omega-3 intake (oily fish, flaxseed); increase dietary fibre (oats, legumes, vegetables); avoid fried and processed foods."],
["CVD Risk Assessment", "Order hs-CRP, ECG, and echocardiogram to fully assess 10-year cardiovascular risk in this high-risk diabetic patient."],
["Lipid Recheck", "Repeat full lipid profile 6-8 weeks after starting statin and dietary changes."],
]),
spacer(100),
subHeader("Priority 3 โ Vitamin B12 Deficiency (URGENT)"),
mgmtTable([
["Supplementation", "Start Vitamin B12 supplementation immediately โ oral high-dose 1000 mcg/day or intramuscular injections (cyanocobalamin 1000 mcg IM weekly x 4 weeks, then monthly). Decision based on severity of symptoms."],
["Neurological Review", "Enquire about tingling, numbness, weakness in extremities, poor balance, memory issues, or mood changes. If neurological symptoms present, refer to neurologist."],
["Metformin Association", "Metformin is the most common cause of B12 depletion in diabetic patients. Discuss medication review with prescribing physician."],
["Monitoring", "Recheck B12 levels in 3 months. Target: restore to mid-normal range (350-500 pg/mL)."],
["Diet", "Include B12-rich foods: eggs, dairy, fish, meat. For vegetarians/vegans, fortified foods and supplements are essential."],
]),
spacer(100),
subHeader("Priority 4 โ Vitamin D Insufficiency"),
mgmtTable([
["Supplementation", "Oral Vitamin D3 (Cholecalciferol) 1000-2000 IU/day, or as directed by physician. Weekly high-dose preparation (60,000 IU/week x 8-12 weeks) is an alternative."],
["Calcium Intake", "Ensure adequate calcium intake (1000-1200 mg/day for age 60). Consider combined Calcium + Vitamin D3 supplement."],
["Sunlight Exposure", "15-20 minutes of midday sun exposure on arms/legs daily (without sunscreen) to stimulate endogenous Vitamin D synthesis."],
["Bone Health", "Vitamin D insufficiency at age 60 increases fracture risk. Consider DEXA scan for bone mineral density if osteoporosis is suspected."],
["Monitoring", "Recheck 25-OH Vitamin D after 3 months of supplementation. Target: achieve sufficiency level > 30 ng/mL, ideally 40-60 ng/mL."],
]),
spacer(100),
subHeader("Priority 5 โ Iron Status Monitoring"),
mgmtTable([
["Dietary Iron", "Increase dietary iron: red meat, beans, lentils, spinach, fortified cereals, tofu. Pair with Vitamin C to enhance non-haem iron absorption."],
["Avoid Iron Blockers", "Reduce tea/coffee consumption with meals (tannins inhibit iron absorption). Space calcium supplements away from iron-rich meals."],
["Monitoring", "Repeat iron studies (serum iron, TIBC, % saturation, ferritin) in 6 months. If saturation falls further (< 16%), evaluate for occult blood loss."],
["No Iron Supplements Yet","Current ferritin is normal; empirical iron supplementation is not yet indicated. Dietary approach first."],
]),
spacer(100),
subHeader("Priority 6 โ ESR / Inflammation (Monitor)"),
mgmtTable([
["Context", "Mildly elevated ESR (20 mm/hr) is non-specific. Most likely reflects chronic metabolic inflammation from diabetes and dyslipidaemia."],
["hs-CRP", "Order high-sensitivity CRP (hs-CRP) to quantify cardiovascular inflammatory risk more precisely (target < 1 mg/L for low CV risk)."],
["Escalate If", "Perform further workup (ANA, RF, CBC with morphology, imaging) if constitutional symptoms develop: unexplained fever, weight loss, fatigue, joint pain."],
]),
spacer(140),
// โโ SECTION 6: FOLLOW-UP PLAN โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeader(" 6. STRUCTURED FOLLOW-UP PLAN"),
spacer(80),
followupTable(),
spacer(140),
// โโ SECTION 7: DISCLAIMER โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
hRule(),
spacer(60),
new Paragraph({
children: [new TextRun({ text: "IMPORTANT DISCLAIMER", bold: true, color: RED, size: 20 })],
spacing: { after: 60 }
}),
bodyText(
"This clinical summary is generated for informational and educational purposes only. All laboratory findings must be " +
"interpreted by the treating physician (Dr. Devansh Sharma) in the full context of the patient's clinical symptoms, medical history, " +
"physical examination, and other investigations. No medication should be started, stopped, or changed based solely on this document. " +
"The management recommendations outlined here are evidence-based general guidelines and do not constitute a personalised treatment plan. " +
"For any concerns, please consult a qualified healthcare professional.", MIDGRAY, false
),
spacer(60),
new Paragraph({
children: [
new TextRun({ text: "Report authenticated by: ", bold: true, color: BLUE, size: 19 }),
new TextRun({ text: "Dr. Siddhant Verma, MBBS MD (Pathology), Lab Head โ Pathkind Labs", color: DARKGRAY, size: 19 })
],
spacing: { after: 60 }
}),
new Paragraph({
children: [
new TextRun({ text: "Summary prepared by: ", bold: true, color: BLUE, size: 19 }),
new TextRun({ text: "Orris Clinical AI Assistant | June 10, 2026", color: DARKGRAY, size: 19 })
]
}),
]
}]
});
Packer.toBuffer(doc).then(buf => {
fs.writeFileSync('/home/daytona/workspace/chander-sharma-report/Chander_Sharma_Clinical_Summary.docx', buf);
console.log('Document written successfully.');
});
EOF
echo "Script ready"
Running Command
cd /home/daytona/workspace/chander-sharma-report && node create_summary.js
python3 -c "
from docx import Document
doc = Document('/home/daytona/workspace/chander-sharma-report/Chander_Sharma_Clinical_Summary.docx')
print(f'Paragraphs: {len(doc.paragraphs)}')
print(f'Tables: {len(doc.tables)}')
print('First paragraph:', doc.paragraphs[0].text[:80])
print('File size:', __import__('os').path.getsize('/home/daytona/workspace/chander-sharma-report/Chander_Sharma_Clinical_Summary.docx'), 'bytes')
print('Document is valid and readable.')
"
Running Command
python3 -c "
import zipfile, os
path = '/home/daytona/workspace/chander-sharma-report/Chander_Sharma_Clinical_Summary.docx'
size = os.path.getsize(path)
print(f'File size: {size} bytes ({size/1024:.1f} KB)')
with zipfile.ZipFile(path, 'r') as z:
names = z.namelist()
print(f'ZIP entries: {len(names)}')
print('Contains word/document.xml:', 'word/document.xml' in names)
print('First 10 entries:', names[:10])
print('Document is a valid DOCX (ZIP) file.')
"
The document is valid and ready. Here's your summary:
โ Clinical Summary Document Created Successfully
Chander Sharma Clinical Summary
Word Document ยท DOCX
What's inside the document (7 structured sections):
Section
Content
1. Executive Summary
Narrative overview of the key findings with red/orange alert boxes for the most urgent issues
2. Abnormal Results Table
All 15 flagged parameters in a colour-coded table (red = critical, orange = watch) with results vs references vs status
3. Domain Analysis
Five clinical panels analysed in detail: Glycaemic Status, Lipid Profile, B12 & Vitamin D, Iron Studies, ESR
4. Normal Findings
Consolidated reassurance table showing all normal systems (CBC, LFT, KFT, thyroid, urine, HBsAg)
5. Management Recommendations
Six prioritised action tables covering diabetes, dyslipidaemia, B12, Vitamin D, iron, and inflammation
6. Follow-Up Plan
Structured table of 10 recommended tests/actions with timeline and clinical reason
7. Disclaimer
Medico-legal disclaimer with lab authentication details
The document includes a header/footer, professional colour-coding (blue, red, green, orange), and is formatted for printing or sharing with the treating physician Dr. Devansh Sharma.
This is a shared conversation. Sign in to Orris to start your own chat.