This is a hyperpigmented patch noticed last 6 month of 50 yr old male , worker at MIDC
occupational hyperpigmentation lower limb melanosis industrial workers
pigmented contact dermatitis melanosis occupational
chemical melanosis tar pitch occupational skin pigmentation
MIDC worker occupational skin hyperpigmentation lower limb ankle chemical melanosis India diagnosis
| Diagnosis | Arguments For | Arguments Against |
|---|---|---|
| Occupational chemical melanosis (pigmented contact dermatitis) | Industrial worker, lower limb location, deep dermal pigmentation, gradual onset | Need patch test confirmation |
| Arsenical melanosis | Industrial exposure possible, raindrop-like macules can appear | Typically truncal + raindrop depigmentation + palmoplantar keratosis; no mention of systemic features |
| Phytophotodermatitis | Can cause bizarre hyperpigmented patches | Usually has prior vesiculation; streaky pattern; sun-exposed areas |
| Stasis dermatitis / venous hemosiderosis | Lower limb location, middle-aged male | No visible edema, varicosities, or ulcers; color is brown-black rather than rusty-brown |
| Post-inflammatory hyperpigmentation (PIH) from repeated minor trauma/friction | Standing workers, leg contact with equipment | Possible contributory factor |
| Drug-induced pigmentation (antimalarials, amiodarone) | Can give lower limb patches | No drug history given; amiodarone/chloroquine cause slate-gray; pretibial pattern |
| Minocycline pigmentation | Deep gray-blue patches on legs | Unlikely without drug use |
Disclaimer: This analysis is for clinical decision support only. A formal in-person dermatological assessment, patch testing, and histopathology are required for definitive diagnosis.
Generate a patient handout on diagnostic workup and prevention of chemical melanosis
ls /home/daytona/workspace/ && ls /home/daytona/skills/docx/
mkdir -p /home/daytona/workspace/chemical-melanosis-handout
~/chemical-melanosis-handout/create_handout.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
VerticalAlign, PageNumber, Header, Footer, ImageRun, UnderlineType,
convertInchesToTwip
} = require('docx');
const fs = require('fs');
// ── Colour palette ──────────────────────────────────────────────────────────
const TEAL = "1A6B72"; // headings
const TEAL_LITE = "E6F4F5"; // box shading
const ORANGE = "C05C1B"; // accent / warnings
const ORANGE_LITE = "FDF0E8"; // warning box bg
const GREY_LITE = "F4F6F7"; // zebra rows
const WHITE = "FFFFFF";
// ── Helper: horizontal rule ──────────────────────────────────────────────────
const hr = () => new Paragraph({
border: { bottom: { color: TEAL, size: 8, space: 1, style: BorderStyle.SINGLE } },
spacing: { after: 100 },
children: []
});
// ── Helper: section heading ──────────────────────────────────────────────────
const sectionHeading = (text) => new Paragraph({
spacing: { before: 320, after: 80 },
children: [
new TextRun({
text: " " + text + " ",
bold: true,
size: 26,
color: WHITE,
font: "Calibri",
highlight: undefined,
})
],
shading: { type: ShadingType.SOLID, fill: TEAL, color: TEAL },
});
// ── Helper: sub-heading ──────────────────────────────────────────────────────
const subHeading = (text) => new Paragraph({
spacing: { before: 200, after: 60 },
children: [
new TextRun({
text,
bold: true,
size: 22,
color: ORANGE,
font: "Calibri",
})
]
});
// ── Helper: body paragraph ───────────────────────────────────────────────────
const body = (text, indent = false) => new Paragraph({
indent: indent ? { left: convertInchesToTwip(0.3) } : undefined,
spacing: { after: 80 },
children: [
new TextRun({ text, size: 20, font: "Calibri", color: "2C2C2C" })
]
});
// ── Helper: bullet point ─────────────────────────────────────────────────────
const bullet = (text, bold_prefix = null) => new Paragraph({
bullet: { level: 0 },
spacing: { after: 60 },
children: bold_prefix
? [
new TextRun({ text: bold_prefix + " ", bold: true, size: 20, font: "Calibri", color: TEAL }),
new TextRun({ text, size: 20, font: "Calibri", color: "2C2C2C" })
]
: [new TextRun({ text, size: 20, font: "Calibri", color: "2C2C2C" })]
});
// ── Helper: numbered step ────────────────────────────────────────────────────
const numbered = (text, bold_prefix = null) => new Paragraph({
numbering: { reference: "numbering", level: 0 },
spacing: { after: 80 },
children: bold_prefix
? [
new TextRun({ text: bold_prefix + " – ", bold: true, size: 20, font: "Calibri", color: TEAL }),
new TextRun({ text, size: 20, font: "Calibri", color: "2C2C2C" })
]
: [new TextRun({ text, size: 20, font: "Calibri", color: "2C2C2C" })]
});
// ── Helper: shaded info box ───────────────────────────────────────────────────
const infoBox = (lines, bgColor = TEAL_LITE, borderColor = TEAL) => {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 8, color: borderColor },
bottom: { style: BorderStyle.SINGLE, size: 8, color: borderColor },
left: { style: BorderStyle.SINGLE, size: 8, color: borderColor },
right: { style: BorderStyle.SINGLE, size: 8, color: borderColor },
},
rows: [
new TableRow({
children: [
new TableCell({
shading: { type: ShadingType.SOLID, fill: bgColor },
margins: { top: 80, bottom: 80, left: 120, right: 120 },
children: lines.map(l =>
new Paragraph({
spacing: { after: 60 },
children: l.map(r => new TextRun({ ...r, font: "Calibri", size: r.size || 20 }))
})
)
})
]
})
]
});
};
// ── Helper: warning box ───────────────────────────────────────────────────────
const warningBox = (lines) => infoBox(lines, ORANGE_LITE, ORANGE);
// ── Diagnostic table ──────────────────────────────────────────────────────────
const diagTable = () => {
const headers = ["Test", "What It Checks", "Why It Matters"];
const rows = [
["Patch Test", "Identifies the specific chemical causing skin reaction", "Confirms the trigger so you can avoid it at work"],
["Skin Biopsy", "Tiny skin sample examined under microscope", "Confirms dark pigment is in deep skin layers (dermis); rules out other conditions"],
["Wood's Lamp Exam", "UV light examination of skin", "Determines if pigment is in upper or deeper skin layers"],
["Blood / Urine Test", "Arsenic, heavy metals, liver function", "Rules out systemic chemical poisoning (e.g., arsenic)"],
["Dermoscopy", "Magnified skin surface exam", "Helps map pigment pattern and guide biopsy"],
];
const headerRow = new TableRow({
tableHeader: true,
children: headers.map(h => new TableCell({
shading: { type: ShadingType.SOLID, fill: TEAL },
margins: { top: 80, bottom: 80, left: 100, right: 100 },
children: [new Paragraph({
children: [new TextRun({ text: h, bold: true, size: 20, color: WHITE, font: "Calibri" })]
})]
}))
});
const dataRows = rows.map((row, i) => new TableRow({
children: row.map(cell => new TableCell({
shading: { type: ShadingType.SOLID, fill: i % 2 === 0 ? WHITE : GREY_LITE },
margins: { top: 60, bottom: 60, left: 100, right: 100 },
children: [new Paragraph({
children: [new TextRun({ text: cell, size: 19, font: "Calibri", color: "2C2C2C" })]
})]
}))
}));
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 4, color: TEAL },
bottom: { style: BorderStyle.SINGLE, size: 4, color: TEAL },
left: { style: BorderStyle.SINGLE, size: 4, color: TEAL },
right: { style: BorderStyle.SINGLE, size: 4, color: TEAL },
insideH: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
insideV: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
},
rows: [headerRow, ...dataRows]
});
};
// ── PPE table ─────────────────────────────────────────────────────────────────
const ppeTable = () => {
const headers = ["Body Part", "Protection Needed", "Examples"];
const rows = [
["Hands", "Chemical-resistant gloves", "Nitrile / neoprene gloves"],
["Feet & Legs", "Protective footwear + leg gaiters", "Safety boots, rubber gaiters"],
["Skin (general)", "Barrier cream before work", "Silicone-based or zinc-based cream"],
["Face", "Safety goggles / face shield", "If spraying or splashing risk"],
["Clothing", "Full-length work trousers", "Avoid shorts; wash separately"],
];
const headerRow = new TableRow({
tableHeader: true,
children: headers.map(h => new TableCell({
shading: { type: ShadingType.SOLID, fill: ORANGE },
margins: { top: 80, bottom: 80, left: 100, right: 100 },
children: [new Paragraph({
children: [new TextRun({ text: h, bold: true, size: 20, color: WHITE, font: "Calibri" })]
})]
}))
});
const dataRows = rows.map((row, i) => new TableRow({
children: row.map(cell => new TableCell({
shading: { type: ShadingType.SOLID, fill: i % 2 === 0 ? WHITE : ORANGE_LITE },
margins: { top: 60, bottom: 60, left: 100, right: 100 },
children: [new Paragraph({
children: [new TextRun({ text: cell, size: 19, font: "Calibri", color: "2C2C2C" })]
})]
}))
}));
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 4, color: ORANGE },
bottom: { style: BorderStyle.SINGLE, size: 4, color: ORANGE },
left: { style: BorderStyle.SINGLE, size: 4, color: ORANGE },
right: { style: BorderStyle.SINGLE, size: 4, color: ORANGE },
insideH: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
insideV: { style: BorderStyle.SINGLE, size: 2, color: "CCCCCC" },
},
rows: [headerRow, ...dataRows]
});
};
// ── DOCUMENT ──────────────────────────────────────────────────────────────────
const doc = new Document({
numbering: {
config: [{
reference: "numbering",
levels: [{
level: 0,
format: "decimal",
text: "%1.",
alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: convertInchesToTwip(0.4), hanging: convertInchesToTwip(0.25) } } }
}]
}]
},
sections: [{
properties: {
page: {
margin: {
top: convertInchesToTwip(0.8),
bottom: convertInchesToTwip(0.8),
left: convertInchesToTwip(0.9),
right: convertInchesToTwip(0.9),
}
}
},
headers: {
default: new Header({
children: [
new Paragraph({
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: TEAL, space: 4 } },
spacing: { after: 80 },
children: [
new TextRun({ text: "PATIENT INFORMATION HANDOUT", bold: true, size: 22, color: TEAL, font: "Calibri" }),
new TextRun({ text: " | Dermatology Department", size: 18, color: "888888", font: "Calibri" }),
]
})
]
})
},
footers: {
default: new Footer({
children: [
new Paragraph({
border: { top: { style: BorderStyle.SINGLE, size: 6, color: TEAL, space: 4 } },
alignment: AlignmentType.CENTER,
children: [
new TextRun({ text: "This handout is for educational purposes. Please consult your doctor for personal medical advice. | Page ", size: 16, color: "888888", font: "Calibri" }),
new TextRun({ children: [new PageNumber()], size: 16, color: "888888", font: "Calibri" }),
]
})
]
})
},
children: [
// ── TITLE BLOCK ──────────────────────────────────────────────────────
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 200, after: 40 },
children: [
new TextRun({
text: "Understanding Chemical Melanosis",
bold: true, size: 52, color: TEAL, font: "Calibri",
})
]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { after: 60 },
children: [
new TextRun({
text: "Occupational Skin Darkening – Diagnostic Tests & Prevention",
size: 24, color: ORANGE, font: "Calibri", italics: true,
})
]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { after: 200 },
children: [
new TextRun({ text: "For Industrial Workers (MIDC & Manufacturing Sector)", size: 20, color: "666666", font: "Calibri" })
]
}),
hr(),
// ── WHAT IS CHEMICAL MELANOSIS ───────────────────────────────────────
sectionHeading("1. What is Chemical Melanosis?"),
body("Chemical melanosis (also called Pigmented Contact Dermatitis) is a condition where dark brown or black patches develop on the skin due to prolonged or repeated contact with chemicals at the workplace."),
body("Unlike a sunburn or regular rash, the dark colour comes from pigment that has sunk into the DEEP layers of the skin (dermis), which is why it looks blue-brown rather than red, and is harder to fade."),
new Paragraph({ spacing: { after: 120 } }),
infoBox([
[{ text: "Key Facts", bold: true, size: 21, color: TEAL }],
[{ text: "• Commonly seen in factory, MIDC, and chemical-plant workers", color: "2C2C2C" }],
[{ text: "• Develops slowly over months – often painless and itch-free", color: "2C2C2C" }],
[{ text: "• Patches usually appear on legs, feet, hands, or areas touching chemicals", color: "2C2C2C" }],
[{ text: "• NOT infectious – you cannot spread it to others", color: "2C2C2C" }],
[{ text: "• CAN improve if you stop the chemical exposure early", color: "2C2C2C" }],
]),
new Paragraph({ spacing: { after: 140 } }),
// ── COMMON CAUSES ────────────────────────────────────────────────────
sectionHeading("2. Common Workplace Chemicals That Cause It"),
body("The following chemicals used in MIDC and industrial settings are known triggers:"),
bullet("Mineral oils and cutting fluids (machine shops, lathes)"),
bullet("Rubber chemicals – thiurams, carbamates (rubber moulding, tyre industry)"),
bullet("Coal tar, bitumen, pitch (road work, roofing, waterproofing)"),
bullet("Aromatic amines and dyes (textile, printing, pharmaceutical factories)"),
bullet("Polycyclic aromatic hydrocarbons / PAHs (engine exhaust, furnace work)"),
bullet("Heavy metals: arsenic, chromium, nickel (electroplating, battery industry)"),
bullet("Pesticides and herbicides (agricultural chemical plants)"),
new Paragraph({ spacing: { after: 140 } }),
// ── DIAGNOSTIC WORKUP ────────────────────────────────────────────────
sectionHeading("3. Tests Your Doctor May Recommend"),
body("Your doctor will perform several tests to confirm the diagnosis and find the exact chemical causing the problem. Do not skip these tests – they are the KEY to knowing what to avoid at work."),
new Paragraph({ spacing: { after: 100 } }),
diagTable(),
new Paragraph({ spacing: { after: 140 } }),
subHeading("What to expect during a Patch Test:"),
bullet("Small amounts of common industrial chemicals are applied to your upper back on small adhesive discs"),
bullet("You wear these for 48 hours – avoid getting your back wet during this time"),
bullet("The doctor reads the results at 48 hours and again at 72–96 hours"),
bullet("A positive reaction (redness, swelling at a disc site) identifies your trigger chemical"),
bullet("Bring a list of all chemicals you handle at work to the patch test appointment"),
new Paragraph({ spacing: { after: 140 } }),
subHeading("What to expect during a Skin Biopsy:"),
bullet("A tiny piece of skin (about 3–4 mm, size of a pencil eraser) is taken under local anaesthesia"),
bullet("The area is numbed first – you will feel pressure but not pain"),
bullet("One or two stitches are placed and removed in 1 week"),
bullet("The biopsy tells us whether pigment is in the upper or deep skin layer – this affects treatment"),
new Paragraph({ spacing: { after: 140 } }),
// ── PREVENTION ───────────────────────────────────────────────────────
sectionHeading("4. Prevention – How to Protect Your Skin"),
subHeading("A. Remove or Reduce Chemical Contact"),
numbered("Ask your factory safety officer for the SDS (Safety Data Sheet) of every chemical you handle", "Know your chemicals"),
numbered("Request a job rotation or task change if your current role involves heavy chemical exposure", "Request safer work"),
numbered("Report any skin changes to your occupational health officer or doctor early – do not wait months", "Report early"),
new Paragraph({ spacing: { after: 100 } }),
subHeading("B. Personal Protective Equipment (PPE) – Use It Every Day"),
new Paragraph({ spacing: { after: 80 } }),
ppeTable(),
new Paragraph({ spacing: { after: 100 } }),
warningBox([
[{ text: "⚠ IMPORTANT: ", bold: true, size: 21, color: ORANGE }, { text: "PPE only works when worn correctly. Gloves with holes, boots worn without socks, or short-sleeved shirts in a chemical area DO NOT protect you. Check your gloves for cracks before every shift.", color: "2C2C2C" }]
]),
new Paragraph({ spacing: { after: 140 } }),
subHeading("C. Skin Care Routine for Industrial Workers"),
bullet("Wash exposed skin thoroughly with mild soap and water within 15 minutes of chemical contact"),
bullet("Apply a barrier cream (provided by your employer) to hands and legs BEFORE starting work"),
bullet("After washing, apply a moisturising lotion – chemical exposure dries and damages the skin barrier"),
bullet("Use a broad-spectrum sunscreen (SPF 50+) on exposed skin every morning before work – UV light makes chemical pigmentation worse"),
bullet("Do NOT scrub or use harsh soaps on already darkened skin – this worsens pigmentation"),
bullet("Change into clean clothes after every shift; wash work clothes separately"),
new Paragraph({ spacing: { after: 140 } }),
subHeading("D. At the Workplace – Engineering Controls"),
bullet("Ask management to install local exhaust ventilation (LEV) near chemical handling areas"),
bullet("Use closed-loop transfer systems to reduce open chemical handling"),
bullet("Ensure adequate hand-washing stations with mild soap near workstations"),
bullet("Request regular health surveillance check-ups for all workers exposed to known skin sensitisers"),
new Paragraph({ spacing: { after: 140 } }),
// ── TREATMENT ────────────────────────────────────────────────────────
sectionHeading("5. Treatment Overview"),
body("Treatment of chemical melanosis is a slow process. The MOST important step is stopping the chemical exposure – without this, no treatment will work long-term."),
new Paragraph({ spacing: { after: 80 } }),
infoBox([
[{ text: "Step-by-Step Treatment Plan", bold: true, size: 21, color: TEAL }],
[{ text: "Step 1 – Identify and STOP the causative chemical (patch test helps here)", color: "2C2C2C" }],
[{ text: "Step 2 – Daily sun protection (SPF 50+ sunscreen, protective clothing)", color: "2C2C2C" }],
[{ text: "Step 3 – Topical skin-lightening creams prescribed by your doctor (e.g., hydroquinone, azelaic acid, tretinoin)", color: "2C2C2C" }],
[{ text: "Step 4 – Oral tablet (tranexamic acid) in some cases – ask your doctor", color: "2C2C2C" }],
[{ text: "Step 5 – Laser treatment (Q-switched Nd:YAG) for stubborn pigmentation", color: "2C2C2C" }],
[{ text: "⏱ Be patient – skin lightening after chemical melanosis takes 6–18 months even with treatment", bold: false, color: ORANGE, size: 20 }],
]),
new Paragraph({ spacing: { after: 140 } }),
// ── WHEN TO SEE A DOCTOR URGENTLY ────────────────────────────────────
sectionHeading("6. See Your Doctor Immediately If:"),
warningBox([
[{ text: "⚠ Seek urgent medical review if you notice:", bold: true, size: 20, color: ORANGE }],
[{ text: " • A patch that grows rapidly or changes shape over weeks", color: "2C2C2C" }],
[{ text: " • A lesion that bleeds, ulcerates, or becomes hard and raised", color: "2C2C2C" }],
[{ text: " • Hair loss, weight loss, fatigue, or numbness in the hands (may suggest arsenic poisoning)", color: "2C2C2C" }],
[{ text: " • Widespread raindrop-like white and dark spots all over the body", color: "2C2C2C" }],
[{ text: " • Cracks or thickening on the palms and soles", color: "2C2C2C" }],
[{ text: " These features require urgent additional tests.", bold: true, color: ORANGE }],
]),
new Paragraph({ spacing: { after: 140 } }),
// ── YOUR RIGHTS ──────────────────────────────────────────────────────
sectionHeading("7. Your Rights as an Industrial Worker"),
bullet("You have the right to be informed about every chemical you work with (request the SDS)"),
bullet("You have the right to adequate PPE provided free of cost by your employer"),
bullet("Chemical melanosis from occupational exposure may be eligible for compensation under the Employees' Compensation Act, 1923 (India)"),
bullet("Contact the Regional Labour Commissioner or ESIC (Employees' State Insurance Corporation) for guidance on occupational disease claims"),
bullet("Ask your doctor to issue a medical certificate linking your skin condition to occupational chemical exposure for record-keeping"),
new Paragraph({ spacing: { after: 140 } }),
// ── SUMMARY CHECKLIST ─────────────────────────────────────────────────
sectionHeading("8. Quick Checklist – Take This to Your Next Appointment"),
infoBox([
[{ text: "Bring with you:", bold: true, size: 21, color: TEAL }],
[{ text: "☐ List of ALL chemicals you handle at work (product names, trade names)", color: "2C2C2C" }],
[{ text: "☐ Duration of exposure to each chemical", color: "2C2C2C" }],
[{ text: "☐ Photos of your skin over time (helps track progression)", color: "2C2C2C" }],
[{ text: "☐ List of any creams, oils, or ointments you applied on the patches yourself", color: "2C2C2C" }],
[{ text: "☐ Medications you currently take", color: "2C2C2C" }],
[{ text: "☐ Ask your doctor: 'Which chemical is causing this? Can I have a patch test?'", color: "2C2C2C" }],
[{ text: "☐ Ask your doctor: 'Do I need a blood test for heavy metals?'", color: "2C2C2C" }],
]),
new Paragraph({ spacing: { after: 200 } }),
hr(),
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 100, after: 40 },
children: [
new TextRun({
text: "Prepared by: Dermatology Department",
size: 18, color: "888888", font: "Calibri", italics: true
})
]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
children: [
new TextRun({
text: "This document is for patient education only and does not replace medical consultation.",
size: 16, color: "AAAAAA", font: "Calibri", italics: true
})
]
}),
]
}]
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync("/home/daytona/workspace/chemical-melanosis-handout/Chemical_Melanosis_Patient_Handout.docx", buffer);
console.log("Done");
}).catch(err => {
console.error("Error:", err);
process.exit(1);
});
cd /home/daytona/workspace/chemical-melanosis-handout && node create_handout.js
~/chemical-melanosis-handout/create_handout.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/chemical-melanosis-handout/create_handout.js'
~/chemical-melanosis-handout/create_handout.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/chemical-melanosis-handout/create_handout.js'
cd /home/daytona/workspace/chemical-melanosis-handout && node create_handout.js
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/worksp…
ls -lh /home/daytona/workspace/chemical-melanosis-handout/ && python3 -c "import…
Chemical Melanosis Patient Handout
Word Document · DOCX