My topic is hemorrhoid give me a microteaching in a formate waise Introduction Definition Purpose Classification Etiology Pathophysiology Clinical manifestation Diagnostic evaluation Management (medical and nursing management) NCP(assessment,diagnostic, goal,planning, evaluation) 3 ncp Complication Summary

Reading File
Finding Sources
Searching Images

hemorrhoids classification internal external anatomy diagram

Finding Sources
Searching Images

hemorrhoids rectal bleeding prolapse clinical photo

Reading File
Reading File
Reading File
Reading File
Reading File
Loading Image
I now have all the content needed. Let me compile the full microteaching document.

📚 MICROTEACHING: HEMORRHOIDS

Subject: Medical-Surgical Nursing Topic: Hemorrhoids Duration: 45 Minutes Prepared By: [Your Name] Date: [Date]

🔵 INTRODUCTION

Good morning/afternoon, everyone. Today we are going to discuss one of the most common anorectal conditions encountered in clinical practice - hemorrhoids. This condition affects approximately 10 million people in the United States alone, roughly 4.4% of the population, with the majority being over the age of 50. As nurses, understanding hemorrhoids - from anatomy through management - enables us to provide better patient education, recognize complications early, and deliver evidence-based care.
At the end of this session, learners will be able to:
  1. Define hemorrhoids and describe their normal anatomical role
  2. Classify hemorrhoids by type and grade
  3. Explain the etiology and pathophysiology
  4. Identify clinical manifestations and diagnostic methods
  5. Outline medical and nursing management
  6. Formulate nursing care plans (NCPs) for a patient with hemorrhoids
  7. List possible complications

🔵 DEFINITION

Hemorrhoids (also called "piles") are dilated, engorged vascular cushions located in the anal canal or at the anal verge. They are composed of blood vessels (arterioles, venules, arteriovenous communications), connective tissue, and smooth muscle fibers.
Key Concept: Hemorrhoids are actually a normal part of human anatomy, responsible for 15-20% of anal resting pressure and contributing to anal continence. They only become pathological when they enlarge, prolapse, bleed, or cause symptoms.
  • They are typically located in three positions: right posterior, right anterior, and left lateral (3, 7, and 11 o'clock positions)
  • The critical landmark is the dentate line (pectinate line) - this divides internal from external hemorrhoids
(Source: Current Surgical Therapy 14e; Maingot's Abdominal Operations)

🔵 PURPOSE (Aim of This Teaching)

The purpose of this microteaching is to:
  • Equip nursing students with complete knowledge of hemorrhoids
  • Prepare students for clinical scenarios involving anorectal disease
  • Enable development of holistic nursing care plans
  • Promote patient education skills regarding lifestyle modification and prevention

🔵 CLASSIFICATION

A. By Location (Anatomical Type)

Types of hemorrhoids - external (below dentate line), internal (above dentate line), and mixed
Figure: Location and types of hemorrhoids - Maingot's Abdominal Operations
TypeLocationCoveringSensation
InternalAbove dentate lineColumnar mucosaPainless (no somatic nerves)
ExternalBelow dentate lineSquamous epithelium / anodermPainful (somatic innervation)
MixedBoth above and below dentate lineBoth mucosa and anodermVariable

B. Grading of Internal Hemorrhoids (Goligher Classification)

GradeDescription
Grade IBleed but do NOT prolapse; bulge into lumen only
Grade IIProlapse during defecation but reduce spontaneously
Grade IIIProlapse during defecation, require manual reduction
Grade IVPermanently prolapsed; cannot be reduced manually
(Source: Maingot's Abdominal Operations; Current Surgical Therapy 14e)

🔵 ETIOLOGY

Hemorrhoids are a normal anatomical structure that becomes pathological due to various precipitating and predisposing factors:

Predisposing Factors:

  • Age - more common after 50 years (weakening of connective tissue supports)
  • Genetics/Family history
  • Low-fiber diet - leads to constipation and straining
  • Sedentary lifestyle
  • Occupation - prolonged standing or sitting (e.g., office workers, truck drivers)

Precipitating/Contributing Factors:

  • Chronic constipation with prolonged straining at defecation
  • Chronic diarrhea - repeated irritation of anal mucosa
  • Pregnancy - increased intra-abdominal pressure + venous compression by gravid uterus
  • Portal hypertension - increased venous back-pressure
  • COPD - raised intra-thoracic pressure causing venous congestion
  • Obesity - increased intra-abdominal pressure
  • Pelvic tumors or masses
  • Prolonged time on toilet (reading, phone use while defecating)
(Source: Current Surgical Therapy 14e)

🔵 PATHOPHYSIOLOGY

LOW FIBER DIET / CONSTIPATION / STRAINING / PREGNANCY / PORTAL HT
                            ↓
          Increased Intra-abdominal Pressure
                            ↓
       Engorgement & Congestion of Hemorrhoidal Plexus
                            ↓
    Weakening of Mucosal Suspensory Ligaments (Parks' ligament)
                            ↓
         Disruption of normal vascular cushion anatomy
                            ↓
        Prolapse of vascular tissue (Internal hemorrhoids)
        OR Distension of external plexus veins (External hemorrhoids)
                            ↓
  Repeated trauma → Bleeding, Inflammation, Thrombosis, Ulceration
Pathophysiological Mechanism in Detail:
  1. Normal hemorrhoidal cushions maintain continence by providing a soft, compressible vascular seal
  2. Increased straining raises venous pressure in the superior, middle, and inferior rectal veins
  3. Over time, the anchoring connective tissue (Parks' ligament) supporting cushions weakens
  4. Cushions slide downward, engorge, and become symptomatic
  5. Disruption of surface vessels causes bright red rectal bleeding (typically painless for internal)
  6. External hemorrhoid thrombosis occurs when venous blood clots within the plexus, causing sudden, severe pain
(Source: Maingot's Abdominal Operations; Current Surgical Therapy 14e)

🔵 CLINICAL MANIFESTATIONS

Internal Hemorrhoids:

  • Painless, bright red rectal bleeding - blood on toilet paper or dripping into bowl (hallmark symptom)
  • Feeling of incomplete evacuation
  • Mucus discharge / pruritus ani (itching)
  • Prolapse (Grade II-IV) - tissue mass protruding through anus
  • Anemia (if chronic, heavy bleeding)
  • No pain unless strangulated or thrombosed

External Hemorrhoids:

  • Painful perianal swelling (especially with thrombosis - sudden onset severe pain)
  • Visible/palpable lump at the anal verge
  • Difficulty sitting
  • Pruritus and irritation
  • Thrombosed external hemorrhoid - bluish, firm, extremely tender lump

General Signs:

  • Rectal bleeding (most common complaint)
  • Constipation or straining history
  • Mucoid discharge
  • In severe prolapse: discomfort walking/sitting
  • Signs of anemia in chronic cases (pallor, fatigue, tachycardia)
(Source: Pfenninger and Fowler's Procedures for Primary Care; Current Surgical Therapy 14e)

🔵 DIAGNOSTIC EVALUATION

1. History Taking

  • Onset, duration, frequency of bleeding
  • Nature of stool and bowel habits
  • History of straining, constipation, diarrhea
  • Dietary history
  • Obstetric history (pregnancy)
  • Family history (colorectal cancer, IBD)

2. Physical Examination

  • Inspection of perianal area - look for external hemorrhoids, skin tags, fissures, fistulas
  • Digital Rectal Examination (DRE) - Note: internal hemorrhoids are NOT palpable by DRE alone

3. Anoscopy (Most Important)

  • Direct visualization of internal hemorrhoids
  • Identifies bleeding source, grade, location
  • Gold standard for diagnosis

4. Proctosigmoidoscopy / Colonoscopy

  • Mandatory to rule out other causes of rectal bleeding (colorectal carcinoma, IBD, polyps)
  • Required for patients: >40 years, family history of colorectal neoplasia, change in bowel habits

5. Laboratory Tests

  • CBC - to check for anemia (low Hgb, low Hct)
  • Stool occult blood test
  • Coagulation profile if bleeding disorder suspected
(Source: Maingot's Abdominal Operations)

🔵 MANAGEMENT

A. MEDICAL MANAGEMENT

1. Conservative / Non-operative (First-Line)

MeasureDetails
High-fiber diet25-35 g/day - raw vegetables, fruits, whole grains; reduces straining
Increased fluid intake8+ glasses of water/day; softens stool
Fiber supplementsPsyllium, methylcellulose (bulk-forming agents)
Stool softenersDocusate sodium
Sitz bathsWarm water, 2-3 times/day, 10-15 minutes; reduces swelling and discomfort
Witch hazel applicationCotton soaked with witch hazel reduces edema/itching
Topical preparationsOTC creams (hydrocortisone, zinc oxide, lidocaine); relieve itching and discomfort
Avoid prolonged sitting on toiletReduce toilet time to < 3 minutes; no reading/phone use
NSAIDs / AnalgesicsFor pain relief (especially thrombosed hemorrhoids)
Conservative measures are sufficient for most Grade I and II hemorrhoids.

2. Office-Based Procedures (Grade I-III)

ProcedureMechanismNote
Rubber Band Ligation (RBL)Band placed 2 cm above dentate line; tissue necroses and falls offMost common office procedure; effective for Grade I-III
SclerotherapyInjection of sclerosing agent (phenol in oil) into submucosaCauses fibrosis and obliteration
Infrared Coagulation (IRC)Infrared light coagulates tissue at hemorrhoid apexQuick, well tolerated

3. Surgical Management (Grade III-IV or failed conservative)

SurgeryDescription
Ferguson Hemorrhoidectomy (Closed)Most common in USA; excision of hemorrhoidal tissue with closure of wound
Milligan-Morgan (Open)Excision with wound left open to heal by secondary intention
Stapled Hemorrhoidopexy (PPH)Circular stapler removes band of mucosa and repositions cushions
Hemorrhoid Artery Ligation (HAL/DGHAL)Doppler-guided ligation of feeding arteries
Only 5-10% of patients with symptomatic hemorrhoids require surgery (Current Surgical Therapy 14e)

B. NURSING MANAGEMENT

  1. Assessment - Monitor for rectal bleeding (amount, color, frequency), pain level (0-10 scale), bowel habits, signs of anemia
  2. Pain Management - Administer analgesics as ordered; encourage sitz baths; position of comfort (side-lying)
  3. Dietary Counseling - Educate patient on high-fiber diet; adequate hydration
  4. Bowel Regulation - Administer stool softeners; discourage straining; establish regular bowel routine
  5. Wound Care (post-operative) - Keep perianal area clean and dry; sitz baths after each bowel movement; observe for complications
  6. Patient Education:
    • Proper toilet hygiene (no prolonged sitting)
    • Dietary modifications
    • Signs and symptoms to report (increased bleeding, fever, inability to void)
    • Activity restrictions post-operatively
  7. Monitoring - Vital signs, urinary output (urinary retention is a post-op complication), CBC values
  8. Psychological Support - Reduce embarrassment; explain procedures clearly; maintain privacy

🔵 NURSING CARE PLANS (NCP)


NCP 1 - Acute Pain

Assessment (Subjective & Objective Data):
  • Subjective: Patient reports perianal pain rated 7/10; states "burning and throbbing pain that worsens during and after bowel movements"; difficulty sitting
  • Objective: Visible swollen perianal tissue; facial grimacing; guarding behavior; thrombosed external hemorrhoid on examination; HR 92 bpm
Nursing Diagnosis:
Acute Pain related to engorged/thrombosed hemorrhoidal tissue and trauma from defecation, as evidenced by patient verbal report of pain 7/10 and observed grimacing.
Goal:
  • Short-term (24-48 hrs): Patient will report pain reduced to 3/10 or less
  • Long-term: Patient will verbalize effective pain control strategies and demonstrate comfort during activities of daily living before discharge
Planning & Nursing Interventions:
InterventionRationale
Assess pain using numeric rating scale every 4 hoursProvides baseline and evaluates effectiveness of interventions
Administer analgesics (NSAIDs, topical anesthetics) as prescribedReduces inflammation and provides systemic and local pain relief
Encourage sitz baths in warm water for 10-15 min, 2-3 times/day and after each bowel movementWarm water relaxes sphincter, reduces edema, and promotes healing
Apply witch hazel-soaked pads / prescribed topical ointment (e.g., hydrocortisone)Reduces local inflammation, pruritus, and swelling
Assist patient to assume position of comfort (lateral Sims' position)Reduces pressure on the perianal area
Administer stool softeners as ordered and encourage fiber/fluidsPrevents hard stool and reduces straining during defecation, which worsens pain
Educate patient to avoid prolonged sitting or standingReduces vascular congestion in anal area
Evaluation:
  • Patient reports pain score reduced to 3/10 within 48 hours
  • Patient demonstrates correct technique for sitz bath
  • Patient verbalizes understanding of dietary measures to prevent straining

NCP 2 - Constipation

Assessment (Subjective & Objective Data):
  • Subjective: Patient reports passing hard, dry stools every 3-4 days; strains excessively; states "I feel incomplete after going to the toilet"
  • Objective: Abdomen soft but mildly distended; decreased bowel sounds; last bowel movement 4 days ago; low dietary fiber and fluid intake noted
Nursing Diagnosis:
Constipation related to low dietary fiber intake, inadequate fluid intake, and avoidance of defecation due to pain, as evidenced by infrequent hard stools, straining, and sensation of incomplete evacuation.
Goal:
  • Short-term: Patient will have a soft, formed bowel movement within 24-48 hours without straining
  • Long-term: Patient will maintain regular bowel habits (soft stool every 1-2 days) by time of discharge and verbalize dietary changes to prevent recurrence
Planning & Nursing Interventions:
InterventionRationale
Assess current bowel pattern, stool consistency, and contributing factorsEstablishes baseline; identifies causative factors
Encourage oral fluid intake of at least 2000-2500 mL/daySoftens stool and promotes intestinal motility
Educate patient on high-fiber diet (25-35 g/day): fruits, vegetables, whole grains, legumesIncreases stool bulk and frequency, reducing straining
Administer prescribed stool softeners (docusate sodium) and bulk-forming laxatives (psyllium)Softens stool and normalizes bowel function without causing dependency
Encourage ambulation and physical activity as toleratedPhysical activity stimulates intestinal peristalsis
Advise patient not to suppress urge to defecateSuppression leads to increased water absorption and harder stools
Educate patient to reduce time on toilet to < 3 minutes; avoid phone/readingReduces straining and venous congestion
Monitor and document bowel movements (frequency, consistency using Bristol Stool Scale)Evaluates effectiveness of interventions
Evaluation:
  • Patient has a soft, formed stool within 48 hours without excessive straining
  • Patient correctly lists high-fiber foods and fluid targets
  • Patient demonstrates improved bowel pattern before discharge

NCP 3 - Risk for Deficient Fluid Volume (Bleeding / Anemia)

Assessment (Subjective & Objective Data):
  • Subjective: Patient reports "bright red blood on toilet paper and in toilet bowl after every bowel movement for the past 2 weeks"; feels fatigued and dizzy on standing
  • Objective: BP 100/70 mmHg; HR 98 bpm; Hgb 9.5 g/dL; Hct 29%; pallor of conjunctiva and nail beds; Grade III internal hemorrhoids on anoscopy
Nursing Diagnosis:
Risk for Deficient Fluid Volume / Ineffective Tissue Perfusion related to chronic rectal bleeding secondary to hemorrhoids, as evidenced by low hemoglobin (9.5 g/dL), tachycardia, hypotension, pallor, and fatigue.
Goal:
  • Short-term: Patient will maintain stable vital signs (BP > 110/70, HR < 90) and no active bleeding episode during hospitalization
  • Long-term: Hemoglobin will improve toward 12 g/dL; patient will recognize warning signs and seek timely care
Planning & Nursing Interventions:
InterventionRationale
Monitor vital signs every 4 hours (or more frequently if unstable)Hypotension and tachycardia indicate volume depletion; early detection prevents shock
Observe and document character of rectal bleeding (amount, color, frequency)Determines severity; bright red blood indicates active arterial/venous hemorrhoid bleeding
Monitor CBC, Hgb, Hct as orderedTracks degree of blood loss and response to treatment
Administer IV fluids as prescribed if patient shows signs of hemodynamic instabilityRestores intravascular volume
Administer iron supplements or blood transfusion as orderedCorrects iron-deficiency anemia resulting from chronic blood loss
Educate patient to avoid straining, use stool softeners, increase fiber and fluidsReduces mechanical trauma to hemorrhoidal tissue, preventing further bleeding
Instruct patient on danger signs: heavy bleeding, dizziness, fainting, passing clots - report immediatelyEmpowers patient for early recognition of hemorrhagic complications
Provide rest and energy conservation measures for anemic patientReduces oxygen demand during period of reduced hemoglobin
Evaluation:
  • No active bleeding episodes during hospitalization
  • Vital signs remain stable within normal limits
  • Hemoglobin improves; patient verbalizes warning signs requiring immediate medical attention

🔵 COMPLICATIONS

ComplicationDescription
AnemiaChronic blood loss leading to iron-deficiency anemia
ThrombosisClotting within hemorrhoidal veins - causes sudden severe perianal pain (thrombosed external hemorrhoid)
StrangulationProlapsed internal hemorrhoid trapped by anal sphincter; blood supply cut off - can lead to gangrene
Gangrene / NecrosisSevere strangulation leading to tissue death; medical emergency
Infection / Perianal AbscessSecondary bacterial infection, especially post-procedural
UlcerationRepeated trauma to exposed hemorrhoidal mucosa
IncontinenceIf sphincter damaged during surgery (rare)
Urinary RetentionCommon post-hemorrhoidectomy (especially after spinal anesthesia); requires monitoring
Anal StenosisPost-surgical narrowing of anal canal (rare, usually from over-excision)
RecurrenceHemorrhoids can recur if lifestyle factors not corrected
(Source: Maingot's Abdominal Operations; Current Surgical Therapy 14e)

🔵 SUMMARY

TopicKey Points
DefinitionDilated vascular cushions in anal canal; normal anatomy until symptomatic
TypesInternal (above dentate line, painless), External (below, painful), Mixed
GradesI = bleeding only; II = self-reducing prolapse; III = manual reduction; IV = irreducible
EtiologyConstipation, straining, pregnancy, low-fiber diet, portal HTN, COPD, obesity
PathophysiologyRaised intra-abdominal pressure → venous engorgement → weakening of ligaments → prolapse/thrombosis
SymptomsPainless rectal bleeding (internal), painful perianal swelling (external), pruritus, mucous discharge
DiagnosisHistory, anoscopy (gold standard), colonoscopy to rule out malignancy
Medical RxHigh-fiber diet, sitz baths, stool softeners, topical agents; RBL for Grade I-III
SurgeryFerguson/Milligan-Morgan hemorrhoidectomy for Grade III-IV or failed conservative therapy
3 NCPs1) Acute Pain 2) Constipation 3) Risk for Deficient Fluid Volume
ComplicationsAnemia, thrombosis, strangulation, gangrene, urinary retention, anal stenosis

Teaching Point to Close: Hemorrhoids are highly treatable. The majority of patients (90-95%) respond to conservative and office-based treatment. The nurse's role in patient education - particularly about diet, bowel habits, and early symptom recognition - is central to preventing recurrence and avoiding surgery.

References:
  • Current Surgical Therapy, 14th Edition - hemorrhoid etiology, treatment, classification
  • Maingot's Abdominal Operations - types, evaluation, ligation technique
  • Pfenninger and Fowler's Procedures for Primary Care, 3rd Edition - thrombosed external hemorrhoids, procedures
  • Fischer's Mastery of Surgery, 8th Edition - surgical management
  • Textbook of Family Medicine, 9th Edition - internal and external hemorrhoid management

My topic is hemorrhoid give me a microteaching in 15 minutes a formate waise Introduction Definition Purpose Classification Etiology Pathophysiology Clinical manifestation Diagnostic evaluation Management (medical and nursing management) NCP(assessment,diagnostic, goal,planning, evaluation) 3 ncp Complication Summary

Here is your 15-minute microteaching on Hemorrhoids - tightly timed, covering every section you listed:

🩺 MICROTEACHING: HEMORRHOIDS

Duration: 15 Minutes | Subject: Medical-Surgical Nursing Format: Structured Teaching Plan

⏱️ TIME PLAN

SectionTime Allotted
Introduction1 min
Definition30 sec
Purpose30 sec
Classification1.5 min
Etiology1 min
Pathophysiology1.5 min
Clinical Manifestations1 min
Diagnostic Evaluation1 min
Management2 min
NCP (3 plans)3 min
Complications30 sec
Summary1 min
Total~15 min

1. 🟦 INTRODUCTION (1 minute)

"Good morning everyone. Today I am going to present a microteaching on Hemorrhoids - one of the most common anorectal conditions seen in clinical practice."
  • Hemorrhoids affect approximately 4.4% of the general population
  • Most commonly seen in adults over 50 years of age
  • A condition encountered frequently in surgical, medical, and community nursing settings
  • Understanding hemorrhoids helps nurses provide patient education, early detection, and holistic care

2. 🟦 DEFINITION (30 seconds)

Hemorrhoids (Piles) are dilated, engorged vascular cushions located in the anal canal or at the anal verge, composed of blood vessels, connective tissue, and smooth muscle.
  • They are a normal part of human anatomy, responsible for 15-20% of anal resting pressure
  • They become pathological when they enlarge, prolapse, bleed, or cause symptoms

3. 🟦 PURPOSE (30 seconds)

Purpose of this teaching:
  • To understand the anatomy, pathology, and clinical features of hemorrhoids
  • To identify appropriate diagnostic and management strategies
  • To develop nursing care plans for patients with hemorrhoids
  • To promote patient education on prevention and lifestyle modification

4. 🟦 CLASSIFICATION (1.5 minutes)

Types of hemorrhoids - external below dentate line, internal above dentate line, and mixed
Figure: Types of hemorrhoids by location relative to dentate line

A. By Location

TypeLocationCoveringPain
InternalAbove dentate lineColumnar mucosaPainless
ExternalBelow dentate lineSquamous epitheliumPainful
MixedBoth above & belowBothVariable

B. Grading of Internal Hemorrhoids (Goligher's Classification)

GradeDescription
IBleeds, does NOT prolapse
IIProlapses on straining, reduces spontaneously
IIIProlapses, requires manual reduction
IVPermanently prolapsed, cannot be reduced

5. 🟦 ETIOLOGY (1 minute)

Predisposing Factors:

  • Age > 50 (weakening of supporting tissue)
  • Genetic predisposition
  • Low-fiber diet
  • Sedentary lifestyle

Precipitating Factors:

  • Chronic constipation with straining (most common)
  • Pregnancy - raised intra-abdominal pressure
  • Chronic diarrhea - repeated irritation
  • Portal hypertension - venous back-pressure
  • Obesity - raised abdominal pressure
  • COPD - raised intrathoracic pressure
  • Prolonged sitting on toilet (reading/phone use)

6. 🟦 PATHOPHYSIOLOGY (1.5 minutes)

↑ Intra-abdominal Pressure (straining, pregnancy, obesity)
                ↓
  Engorgement of Hemorrhoidal Vascular Plexus
                ↓
  Weakening of Parks' Ligament (suspensory support)
                ↓
   Downward Displacement of Vascular Cushions
                ↓
    Prolapse (Internal) / Distension (External)
                ↓
  Trauma → Bleeding, Inflammation, Thrombosis
Key Points:
  • Internal hemorrhoids arise from the superior rectal (hemorrhoidal) plexus
  • External hemorrhoids arise from the inferior rectal plexus
  • The dentate line is the critical landmark separating the two
  • Thrombosis of external hemorrhoids causes sudden, severe pain

7. 🟦 CLINICAL MANIFESTATIONS (1 minute)

Internal Hemorrhoids:

  • Painless bright red rectal bleeding (on toilet paper/in bowl) - hallmark
  • Mucous discharge, pruritus ani
  • Prolapse of tissue (Grade II-IV)
  • Sensation of incomplete evacuation
  • Anemia (chronic blood loss)

External Hemorrhoids:

  • Painful perianal swelling
  • Visible/palpable lump at anal verge
  • Thrombosed = sudden severe pain, bluish-purple tender lump
  • Pruritus and irritation

8. 🟦 DIAGNOSTIC EVALUATION (1 minute)

InvestigationPurpose
HistoryBleeding, bowel habits, diet, pregnancy
InspectionExternal hemorrhoids, skin tags, fissures
DRE (Digital Rectal Exam)Excludes masses (internal hemorrhoids NOT palpable)
AnoscopyGold standard - direct visualization of internal hemorrhoids
ColonoscopyRule out colorectal cancer, IBD (mandatory if >40 yrs)
CBCDetect anemia (low Hgb, low Hct)
Stool Occult Blood TestConfirms GI bleeding

9. 🟦 MANAGEMENT (2 minutes)

A. Medical Management

Conservative (First-Line - Grade I & II):

  • High-fiber diet (25-35 g/day) + 8+ glasses water/day
  • Bulk-forming agents (psyllium) + stool softeners (docusate)
  • Warm sitz baths 2-3x/day for 10-15 minutes
  • Topical creams (hydrocortisone, lidocaine, zinc oxide)
  • Witch hazel pads - reduces edema
  • Analgesics/NSAIDs for pain

Office Procedures (Grade I-III):

ProcedureMechanism
Rubber Band LigationBand at 2 cm above dentate line → necrosis → sloughing
SclerotherapyInjection of sclerosant → fibrosis
Infrared CoagulationHeat coagulates hemorrhoid apex

Surgical (Grade III-IV / failed conservative - only 5-10% of patients):

  • Ferguson Hemorrhoidectomy (closed) - most common
  • Milligan-Morgan (open)
  • Stapled Hemorrhoidopexy (PPH)

B. Nursing Management

  1. Pain Relief - Sitz baths, analgesics, topical agents, positioning (Sims' lateral)
  2. Bowel Regulation - Stool softeners, fiber diet, hydration, avoid straining
  3. Wound Care - Post-op perianal hygiene; keep area clean and dry
  4. Monitoring - Vital signs, bleeding, urine output (urinary retention post-op)
  5. Patient Education - Diet, bowel habits, toilet hygiene, activity restrictions
  6. Psychosocial Support - Maintain privacy and dignity; reduce embarrassment

10. 🟦 NURSING CARE PLANS (NCP) (3 minutes - 1 min each)


📋 NCP 1 - Acute Pain

ComponentContent
AssessmentS: "Burning pain 7/10, worse during bowel movements" O: Grimacing, guarding, visible perianal swelling, thrombosed hemorrhoid
Nursing DiagnosisAcute Pain related to engorged/thrombosed hemorrhoidal tissue AEB patient-reported pain 7/10 and observed facial grimacing
GoalPatient will report pain ≤ 3/10 within 48 hours and demonstrate comfort strategies
Interventions1. Assess pain scale q4h 2. Administer analgesics/topical anesthetics as ordered 3. Encourage warm sitz baths 10-15 min, 2-3x/day 4. Apply witch hazel pads / topical ointment 5. Position in lateral Sims' position 6. Administer stool softeners to prevent straining
EvaluationPain reduced to ≤ 3/10; patient demonstrates sitz bath technique; verbalizes dietary strategies

📋 NCP 2 - Constipation

ComponentContent
AssessmentS: "Hard stool every 3-4 days, straining, incomplete evacuation feeling" O: Decreased bowel sounds, last BM 4 days ago, low fiber/fluid intake, abdomen mildly distended
Nursing DiagnosisConstipation related to low fiber/fluid intake and pain-avoidance of defecation AEB hard infrequent stools and straining
GoalPatient will pass soft, formed stool within 24-48 hours and maintain regular bowel habits before discharge
Interventions1. Assess bowel pattern and stool consistency daily 2. Encourage 2000-2500 mL fluid/day 3. Teach high-fiber diet (25-35 g/day) 4. Administer stool softeners (docusate) and bulk laxatives (psyllium) 5. Encourage ambulation 6. Advise not to suppress urge to defecate 7. Limit toilet time to < 3 minutes
EvaluationSoft stool passed within 48 hours; patient lists high-fiber foods; improved bowel pattern on discharge

📋 NCP 3 - Risk for Deficient Fluid Volume (Bleeding)

ComponentContent
AssessmentS: "Bright red blood in toilet after every BM for 2 weeks, feel dizzy and tired" O: BP 100/70, HR 98, Hgb 9.5 g/dL, Hct 29%, conjunctival pallor, Grade III internal hemorrhoids
Nursing DiagnosisRisk for Deficient Fluid Volume related to chronic rectal bleeding AEB Hgb 9.5 g/dL, tachycardia, hypotension, and pallor
GoalPatient will maintain stable VS (BP >110/70, HR <90) and hemoglobin will trend toward normal range
Interventions1. Monitor VS q4h 2. Observe and document bleeding (amount, color, frequency) 3. Monitor CBC/Hgb/Hct as ordered 4. Administer IV fluids if hemodynamically unstable 5. Administer iron supplements/blood transfusion as ordered 6. Teach to avoid straining; use stool softeners 7. Educate on warning signs: heavy bleeding, dizziness, fainting - report immediately
EvaluationNo active bleeding episodes; VS stable; Hgb improving; patient verbalizes warning signs

11. 🟦 COMPLICATIONS (30 seconds)

ComplicationKey Point
AnemiaChronic blood loss → iron deficiency
ThrombosisClotting in external plexus → sudden severe pain
StrangulationProlapsed hemorrhoid trapped by sphincter
Gangrene/NecrosisSevere strangulation → tissue death (emergency)
Perianal AbscessInfection, especially post-procedural
Urinary RetentionCommon after hemorrhoidectomy
Anal StenosisPost-surgical narrowing (rare)
RecurrenceIf lifestyle factors not corrected

12. 🟦 SUMMARY (1 minute)

"Let me now summarize what we have covered in today's session."
TopicKey Take-Away
DefinitionDilated vascular cushions - normal till symptomatic
ClassificationInternal/External/Mixed; Grade I-IV
EtiologyConstipation, straining, pregnancy, low-fiber diet
Pathophysiology↑ Pressure → venous engorgement → prolapse/thrombosis
SignsPainless rectal bleeding (internal); painful lump (external)
DiagnosisAnoscopy (gold standard); colonoscopy to rule out CA
TreatmentDiet/sitz bath → RBL → surgery (only 5-10% need it)
NCPsPain, Constipation, Risk for Fluid Volume Deficit
ComplicationsAnemia, thrombosis, strangulation, gangrene

Closing Statement: "Hemorrhoids are highly treatable. The nurse's role in patient education - especially on diet, bowel habits, and hygiene - is key to preventing recurrence and avoiding surgery. Thank you for your attention. Do you have any questions?"

References:
  • Current Surgical Therapy, 14th Edition
  • Maingot's Abdominal Operations
  • Pfenninger and Fowler's Procedures for Primary Care, 3rd Edition
  • Fischer's Mastery of Surgery, 8th Edition

Generate a PPTX presentation from this microteaching

Reading File
Reading File
Reading File
Running Command

ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && echo "created"

Running Command

mkdir -p /tmp/workspace/hemorrhoid-pptx

Writing File

~/hemorrhoid-pptx/create_pptx.py

import json, subprocess, base64
from io import BytesIO
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE

# ── Colour palette ─────────────────────────────────────────────────────────────
NAVY    = RGBColor(0x0D, 0x3B, 0x6E)   # deep navy – header bars
TEAL    = RGBColor(0x00, 0x7A, 0x8A)   # teal accent
LIGHT   = RGBColor(0xE8, 0xF4, 0xF8)   # very pale blue – body bg
WHITE   = RGBColor(0xFF, 0xFF, 0xFF)
ORANGE  = RGBColor(0xE8, 0x6B, 0x1F)   # warm accent for grade boxes
DARK    = RGBColor(0x1C, 0x1C, 0x1C)
MUTED   = RGBColor(0x55, 0x55, 0x55)
GREEN   = RGBColor(0x1A, 0x7A, 0x4A)
RED     = RGBColor(0xC0, 0x39, 0x2B)

W = Inches(13.333)
H = Inches(7.5)

# ── Helpers ────────────────────────────────────────────────────────────────────
def new_prs():
    prs = Presentation()
    prs.slide_width  = W
    prs.slide_height = H
    return prs

def blank(prs):
    return prs.slides.add_slide(prs.slide_layouts[6])

def bg(slide, color=LIGHT):
    """Fill slide background."""
    fill = slide.background.fill
    fill.solid()
    fill.fore_color.rgb = color

def rect(slide, x, y, w, h, fill_color=NAVY, line_color=None, line_w=None):
    shp = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, x, y, w, h)
    shp.fill.solid()
    shp.fill.fore_color.rgb = fill_color
    if line_color:
        shp.line.color.rgb = line_color
        shp.line.width = Pt(line_w or 1)
    else:
        shp.line.fill.background()
    shp.shadow.inherit = False
    return shp

def tb(slide, text, x, y, w, h,
       size=18, bold=False, color=DARK, align=PP_ALIGN.LEFT,
       wrap=True, italic=False, font="Calibri"):
    box = slide.shapes.add_textbox(x, y, w, h)
    tf  = box.text_frame
    tf.word_wrap = wrap
    tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = 0
    p   = tf.paragraphs[0]
    p.alignment = align
    run = p.add_run()
    run.text = text
    run.font.name  = font
    run.font.size  = Pt(size)
    run.font.bold  = bold
    run.font.italic = italic
    run.font.color.rgb = color
    return box

def header_bar(slide, title, subtitle=None):
    """Full-width navy header + optional subtitle."""
    rect(slide, 0, 0, W, Inches(1.1), fill_color=NAVY)
    # accent line
    rect(slide, 0, Inches(1.1), W, Inches(0.06), fill_color=TEAL)
    tb(slide, title,
       Inches(0.4), Inches(0.08), Inches(12), Inches(0.7),
       size=28, bold=True, color=WHITE, font="Calibri")
    if subtitle:
        tb(slide, subtitle,
           Inches(0.4), Inches(0.72), Inches(12), Inches(0.36),
           size=14, color=RGBColor(0xC5, 0xDF, 0xF0), font="Calibri")

def bullet_box(slide, items, x, y, w, h,
               title=None, title_color=NAVY, body_size=15,
               box_fill=WHITE, border=True):
    """Rounded-rect card with optional title + bullet list."""
    card = slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, x, y, w, h)
    card.fill.solid(); card.fill.fore_color.rgb = box_fill
    if border:
        card.line.color.rgb = TEAL; card.line.width = Pt(1)
    else:
        card.line.fill.background()
    card.shadow.inherit = False

    ty = y + Inches(0.12)
    if title:
        tb(slide, title, x + Inches(0.15), ty,
           w - Inches(0.3), Inches(0.38),
           size=14, bold=True, color=title_color)
        ty += Inches(0.38)

    bx = slide.shapes.add_textbox(x + Inches(0.18), ty,
                                  w - Inches(0.35), h - (ty - y) - Inches(0.1))
    tf = bx.text_frame; tf.word_wrap = True
    tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = 0
    first = True
    for item in items:
        if first:
            p = tf.paragraphs[0]; first = False
        else:
            p = tf.add_paragraph()
        p.space_before = Pt(2)
        run = p.add_run()
        run.text = item
        run.font.size  = Pt(body_size)
        run.font.name  = "Calibri"
        run.font.color.rgb = DARK

def two_col_table(slide, headers, rows, x, y, w, h,
                  col_widths=None, hdr_fill=NAVY, row_alt=RGBColor(0xF0, 0xF8, 0xFF)):
    """Draw a simple table as coloured rectangles + text."""
    n_cols = len(headers)
    if col_widths is None:
        col_widths = [w / n_cols] * n_cols
    row_h = h / (len(rows) + 1)

    # header row
    cx = x
    for i, hdr in enumerate(headers):
        rect(slide, cx, y, col_widths[i], row_h, fill_color=hdr_fill)
        tb(slide, hdr, cx + Inches(0.05), y + Inches(0.04),
           col_widths[i] - Inches(0.1), row_h - Inches(0.08),
           size=13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
        cx += col_widths[i]

    # data rows
    for r_idx, row in enumerate(rows):
        cy = y + row_h * (r_idx + 1)
        fill = row_alt if r_idx % 2 == 0 else WHITE
        cx = x
        for c_idx, cell in enumerate(row):
            rect(slide, cx, cy, col_widths[c_idx], row_h,
                 fill_color=fill, line_color=RGBColor(0xCC, 0xCC, 0xCC), line_w=0.5)
            tb(slide, cell, cx + Inches(0.05), cy + Inches(0.03),
               col_widths[c_idx] - Inches(0.1), row_h - Inches(0.06),
               size=12, color=DARK, wrap=True)
            cx += col_widths[c_idx]

# ── SLIDE BUILDERS ─────────────────────────────────────────────────────────────

def slide_title(prs):
    s = blank(prs)
    bg(s, NAVY)
    # big accent circle
    circ = s.shapes.add_shape(MSO_SHAPE.OVAL,
                               Inches(9.5), Inches(-1.5), Inches(5.5), Inches(5.5))
    circ.fill.solid(); circ.fill.fore_color.rgb = TEAL
    circ.line.fill.background(); circ.shadow.inherit = False

    rect(s, 0, Inches(2.5), Inches(13.333), Inches(0.08), fill_color=ORANGE)

    tb(s, "MICROTEACHING",
       Inches(0.6), Inches(0.6), Inches(9), Inches(0.7),
       size=20, color=RGBColor(0xC5, 0xDF, 0xF0), bold=False)
    tb(s, "HEMORRHOIDS",
       Inches(0.6), Inches(1.2), Inches(11), Inches(1.3),
       size=52, bold=True, color=WHITE)
    tb(s, "(PILES)",
       Inches(0.6), Inches(2.5), Inches(5), Inches(0.55),
       size=24, color=ORANGE, bold=True)

    details = [
        "Subject: Medical-Surgical Nursing",
        "Duration: 15 Minutes",
        "Format: Structured Teaching Plan",
    ]
    for i, d in enumerate(details):
        tb(s, d, Inches(0.6), Inches(3.3) + Inches(0.55 * i),
           Inches(8), Inches(0.5), size=16, color=WHITE)

    # bottom tag
    rect(s, 0, Inches(6.9), W, Inches(0.6), fill_color=TEAL)
    tb(s, "Introduction  |  Definition  |  Classification  |  Etiology  |  Pathophysiology  |  Clinical Features  |  Diagnosis  |  Management  |  NCP  |  Complications  |  Summary",
       Inches(0.3), Inches(6.92), Inches(12.7), Inches(0.55),
       size=10, color=WHITE, align=PP_ALIGN.CENTER)


def slide_time_plan(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "TIME PLAN", "15-Minute Session Overview")

    rows = [
        ["1", "Introduction", "1 min"],
        ["2", "Definition & Purpose", "1 min"],
        ["3", "Classification", "1.5 min"],
        ["4", "Etiology", "1 min"],
        ["5", "Pathophysiology", "1.5 min"],
        ["6", "Clinical Manifestations", "1 min"],
        ["7", "Diagnostic Evaluation", "1 min"],
        ["8", "Management", "2 min"],
        ["9", "NCP (3 plans)", "3 min"],
        ["10","Complications", "0.5 min"],
        ["11","Summary", "1 min"],
    ]
    two_col_table(s, ["#","Section","Time"],
                  rows, Inches(1.0), Inches(1.3),
                  Inches(11.3), Inches(5.8),
                  col_widths=[Inches(0.6), Inches(8.5), Inches(2.2)])


def slide_intro(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "INTRODUCTION")

    items_left = [
        "Hemorrhoids affect ~4.4% of the general population",
        "Most common in adults over 50 years of age",
        "One of the most frequently encountered anorectal conditions",
        "Commonly seen in surgical, medical & community nursing settings",
    ]
    items_right = [
        "Nurses must understand hemorrhoids for:",
        "  - Patient education & counselling",
        "  - Early recognition of complications",
        "  - Evidence-based holistic care",
        "  - Post-operative nursing management",
    ]
    bullet_box(s, items_left,  Inches(0.3), Inches(1.3), Inches(6.2), Inches(5.8),
               title="Why This Topic Matters")
    bullet_box(s, items_right, Inches(6.7), Inches(1.3), Inches(6.2), Inches(5.8),
               title="Nursing Relevance")


def slide_definition_purpose(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "DEFINITION & PURPOSE")

    # Definition card
    rect(s, Inches(0.3), Inches(1.3), Inches(13.0), Inches(2.5), fill_color=NAVY)
    tb(s, "DEFINITION",
       Inches(0.5), Inches(1.35), Inches(12), Inches(0.45),
       size=16, bold=True, color=ORANGE)
    tb(s, "Hemorrhoids (Piles) are dilated, engorged vascular cushions located in the anal canal "
          "or at the anal verge, composed of blood vessels, connective tissue, and smooth muscle fibers.",
       Inches(0.5), Inches(1.8), Inches(12.4), Inches(0.9),
       size=17, color=WHITE, wrap=True)
    tb(s, "They are NORMAL anatomy — responsible for 15-20% of anal resting pressure. "
          "They become PATHOLOGICAL when they enlarge, prolapse, bleed, or cause symptoms.",
       Inches(0.5), Inches(2.6), Inches(12.4), Inches(0.8),
       size=14, color=RGBColor(0xC5, 0xDF, 0xF0), italic=True, wrap=True)

    # Purpose cards
    purpose_items = [
        "Understand anatomy, pathology, and clinical features",
        "Identify appropriate diagnostic strategies",
        "Develop evidence-based nursing care plans",
        "Promote patient education on prevention & lifestyle",
    ]
    bullet_box(s, purpose_items, Inches(0.3), Inches(4.0), Inches(12.8), Inches(3.2),
               title="PURPOSE OF THIS TEACHING", title_color=TEAL)


def slide_classification(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "CLASSIFICATION")

    # Type A table
    tb(s, "A. By Location", Inches(0.3), Inches(1.25), Inches(6), Inches(0.4),
       size=15, bold=True, color=NAVY)
    two_col_table(s,
        ["Type","Location","Covering","Pain"],
        [
            ["Internal","Above dentate line","Columnar mucosa","Painless"],
            ["External","Below dentate line","Squamous epithelium","Painful"],
            ["Mixed","Both above & below","Both","Variable"],
        ],
        Inches(0.3), Inches(1.65), Inches(6.2), Inches(2.2),
        col_widths=[Inches(1.3), Inches(1.9), Inches(1.9), Inches(1.1)])

    # Grade boxes
    tb(s, "B. Grading of Internal Hemorrhoids (Goligher's Classification)",
       Inches(0.3), Inches(4.0), Inches(12.7), Inches(0.4),
       size=15, bold=True, color=NAVY)

    grades = [
        ("I",   "Bleeds\nNo prolapse",     TEAL),
        ("II",  "Prolapses\nSpontaneous reduction", GREEN),
        ("III", "Prolapses\nManual reduction needed", ORANGE),
        ("IV",  "Permanently prolapsed\nCannot be reduced", RED),
    ]
    gx = Inches(0.3)
    for g, desc, col in grades:
        rect(s, gx, Inches(4.5), Inches(3.0), Inches(2.7), fill_color=col)
        tb(s, f"Grade {g}", gx + Inches(0.1), Inches(4.6), Inches(2.8), Inches(0.5),
           size=18, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
        tb(s, desc, gx + Inches(0.1), Inches(5.15), Inches(2.8), Inches(1.7),
           size=14, color=WHITE, align=PP_ALIGN.CENTER, wrap=True)
        gx += Inches(3.18)

    # anatomy image
    img_url = "https://cdn.orris.care/cdss_images/fc79966337122d135cfd2a8e25ae30a92b80224e34e7845aeaf574abb0543099.png"
    try:
        result = json.loads(subprocess.check_output(
            ["python", "/tmp/skills/shared/scripts/fetch_images.py", img_url],
            timeout=30
        ))
        if result and result[0].get("base64"):
            raw = base64.b64decode(result[0]["base64"].split(",", 1)[1])
            s.shapes.add_picture(BytesIO(raw),
                                  Inches(6.6), Inches(1.55), width=Inches(6.5))
    except Exception as e:
        print(f"Image fetch failed: {e}")


def slide_etiology(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "ETIOLOGY")

    predisposing = [
        "Age > 50 years (weakening of connective tissue)",
        "Genetic predisposition / family history",
        "Low-fiber diet",
        "Sedentary lifestyle",
        "Occupations requiring prolonged standing/sitting",
    ]
    precipitating = [
        "Chronic constipation with straining (most common)",
        "Pregnancy — raised intra-abdominal pressure",
        "Chronic diarrhea — repeated mucosal irritation",
        "Portal hypertension — venous back-pressure",
        "Obesity — increased abdominal pressure",
        "COPD — raised intrathoracic pressure",
        "Prolonged sitting on toilet (reading, phone use)",
    ]
    bullet_box(s, predisposing,  Inches(0.3), Inches(1.3), Inches(6.2), Inches(5.8),
               title="Predisposing Factors", title_color=NAVY)
    bullet_box(s, precipitating, Inches(6.8), Inches(1.3), Inches(6.2), Inches(5.8),
               title="Precipitating / Contributing Factors", title_color=RED)


def slide_pathophysiology(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "PATHOPHYSIOLOGY")

    steps = [
        ("1", "Raised Intra-abdominal Pressure",
         "Constipation, straining, pregnancy, obesity, portal HTN"),
        ("2", "Venous Engorgement",
         "Congestion of superior/inferior hemorrhoidal plexuses"),
        ("3", "Ligament Weakening",
         "Parks' ligament (mucosal suspensory support) weakens over time"),
        ("4", "Cushion Displacement",
         "Vascular cushions slide downward; prolapse develops"),
        ("5", "Trauma & Complications",
         "Repeated trauma → Bleeding, Inflammation, Thrombosis, Ulceration"),
    ]

    bx = Inches(0.3)
    by = Inches(1.35)
    arrow_w = Inches(0.4)
    box_w = Inches(2.3)
    box_h = Inches(1.8)
    gap   = Inches(0.25)

    for i, (num, title, desc) in enumerate(steps):
        x = bx + i * (box_w + arrow_w + gap)
        # numbered circle
        circ = s.shapes.add_shape(MSO_SHAPE.OVAL, x, by, Inches(0.5), Inches(0.5))
        circ.fill.solid(); circ.fill.fore_color.rgb = TEAL
        circ.line.fill.background(); circ.shadow.inherit = False
        tf_c = circ.text_frame
        tf_c.margin_left = tf_c.margin_right = tf_c.margin_top = tf_c.margin_bottom = 0
        p = tf_c.paragraphs[0]; p.alignment = PP_ALIGN.CENTER
        run = p.add_run(); run.text = num
        run.font.size = Pt(14); run.font.bold = True; run.font.color.rgb = WHITE

        # box
        card = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,
                                   x, by + Inches(0.55), box_w, box_h - Inches(0.55))
        card.fill.solid(); card.fill.fore_color.rgb = NAVY
        card.line.fill.background(); card.shadow.inherit = False
        tb(s, title, x + Inches(0.07), by + Inches(0.6),
           box_w - Inches(0.14), Inches(0.45),
           size=13, bold=True, color=WHITE, wrap=True)
        tb(s, desc, x + Inches(0.07), by + Inches(1.05),
           box_w - Inches(0.14), Inches(1.2),
           size=11, color=RGBColor(0xC5, 0xDF, 0xF0), wrap=True)

        # arrow
        if i < len(steps) - 1:
            ax = x + box_w + Inches(0.05)
            ln = s.shapes.add_connector(
                __import__('pptx.enum.shapes', fromlist=['MSO_CONNECTOR']).MSO_CONNECTOR.STRAIGHT,
                ax, by + Inches(0.9), ax + arrow_w, by + Inches(0.9))
            ln.line.color.rgb = TEAL; ln.line.width = Pt(2.5)

    # key note
    rect(s, Inches(0.3), Inches(5.4), Inches(12.7), Inches(1.85), fill_color=LIGHT,
         line_color=TEAL, line_w=1)
    tb(s, "Key Points:",
       Inches(0.5), Inches(5.5), Inches(12), Inches(0.35),
       size=13, bold=True, color=TEAL)
    tb(s, "Internal hemorrhoids arise from the superior rectal plexus (above dentate line — painless).  "
          "External hemorrhoids arise from the inferior rectal plexus (below dentate line — painful).  "
          "Thrombosis of external hemorrhoids causes sudden, severe perianal pain.",
       Inches(0.5), Inches(5.85), Inches(12.3), Inches(1.2),
       size=12, color=DARK, wrap=True)


def slide_clinical(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "CLINICAL MANIFESTATIONS")

    internal = [
        "HALLMARK: Painless bright red rectal bleeding",
        "  (on toilet paper / dripping in bowl)",
        "Mucous discharge & pruritus ani (itching)",
        "Prolapse of tissue (Grade II-IV)",
        "Sensation of incomplete evacuation",
        "Anemia with chronic heavy bleeding",
        "No pain (unless strangulated / thrombosed)",
    ]
    external = [
        "HALLMARK: Painful perianal swelling",
        "Visible/palpable lump at anal verge",
        "Thrombosed = sudden severe pain,",
        "  bluish-purple tender firm lump",
        "Pruritus and perianal irritation",
        "Difficulty sitting",
    ]
    general = [
        "Rectal bleeding (most common complaint)",
        "History of constipation / straining",
        "Perianal discomfort",
        "Mucoid / bloody discharge",
        "Signs of anemia: pallor, fatigue, tachycardia",
    ]
    bullet_box(s, internal, Inches(0.3),  Inches(1.3), Inches(4.2), Inches(5.9),
               title="Internal Hemorrhoids", title_color=TEAL)
    bullet_box(s, external, Inches(4.65), Inches(1.3), Inches(4.2), Inches(5.9),
               title="External Hemorrhoids", title_color=RED)
    bullet_box(s, general,  Inches(9.0),  Inches(1.3), Inches(4.2), Inches(5.9),
               title="General Signs", title_color=NAVY)


def slide_diagnosis(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "DIAGNOSTIC EVALUATION")

    rows = [
        ["History Taking","Bleeding pattern, bowel habits, diet, pregnancy, family Hx of colorectal CA"],
        ["Inspection","External hemorrhoids, skin tags, fissures, fistulas at anal verge"],
        ["Digital Rectal Exam (DRE)","Excludes masses — NOTE: internal hemorrhoids are NOT palpable on DRE"],
        ["Anoscopy  ★ Gold Standard","Direct visualization of internal hemorrhoids; identifies source, grade, location"],
        ["Proctosigmoidoscopy / Colonoscopy","Mandatory if age >40, family Hx CA, or change in bowel habits — rule out malignancy"],
        ["CBC (Blood Count)","Detect iron-deficiency anemia (low Hgb, low Hct)"],
        ["Stool Occult Blood Test","Confirms GI bleeding source"],
        ["Coagulation Profile","If bleeding disorder suspected"],
    ]
    two_col_table(s, ["Investigation","Purpose / Notes"],
                  rows, Inches(0.3), Inches(1.3), Inches(12.7), Inches(5.9),
                  col_widths=[Inches(3.5), Inches(9.2)])


def slide_management_medical(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "MEDICAL MANAGEMENT")

    conservative = [
        "High-fiber diet: 25-35 g/day (vegetables, fruits, whole grains)",
        "Increase fluid intake: 8+ glasses of water/day",
        "Fiber supplements: psyllium, methylcellulose",
        "Stool softeners: docusate sodium",
        "Warm sitz baths: 10-15 min, 2-3x/day",
        "Topical agents: hydrocortisone, lidocaine, zinc oxide",
        "Witch hazel pads to reduce edema",
        "Reduce toilet time to < 3 minutes; avoid phone/reading",
    ]
    procedures = [
        "Rubber Band Ligation (RBL) — most common",
        "  Band at 2 cm above dentate line → necrosis",
        "Sclerotherapy — inject sclerosant → fibrosis",
        "Infrared Coagulation (IRC) — heat at apex",
    ]
    surgical = [
        "Ferguson Hemorrhoidectomy (Closed) — most common",
        "Milligan-Morgan (Open Hemorrhoidectomy)",
        "Stapled Hemorrhoidopexy (PPH)",
        "Doppler Hemorrhoid Artery Ligation (DGHAL)",
        "Only 5-10% of patients require surgery",
    ]
    bullet_box(s, conservative, Inches(0.3),  Inches(1.3), Inches(4.0), Inches(5.9),
               title="Conservative (Grade I-II — First Line)", title_color=GREEN)
    bullet_box(s, procedures,   Inches(4.45), Inches(1.3), Inches(4.0), Inches(5.9),
               title="Office Procedures (Grade I-III)", title_color=TEAL)
    bullet_box(s, surgical,     Inches(8.9),  Inches(1.3), Inches(4.2), Inches(5.9),
               title="Surgical (Grade III-IV / Failed Rx)", title_color=RED)


def slide_management_nursing(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "NURSING MANAGEMENT")

    items = [
        ("1. Assessment & Monitoring",
         "Monitor rectal bleeding (amount, colour, frequency); pain scale q4h; vital signs; CBC; urine output (post-op urinary retention)"),
        ("2. Pain Relief",
         "Administer analgesics as ordered; warm sitz baths 2-3x/day; topical ointments; Sims' lateral position to reduce pressure"),
        ("3. Bowel Regulation",
         "Administer stool softeners; high-fibre diet teaching; adequate hydration; discourage straining; establish regular bowel routine"),
        ("4. Wound Care (Post-op)",
         "Keep perianal area clean and dry; sitz baths after each bowel movement; observe for bleeding, infection, dehiscence"),
        ("5. Patient Education",
         "Dietary changes; proper toilet hygiene; reduce time on toilet; signs to report (heavy bleeding, fever, urinary difficulty)"),
        ("6. Psychosocial Support",
         "Maintain patient privacy and dignity; reduce embarrassment; explain all procedures clearly; provide emotional reassurance"),
    ]
    cols = [items[:3], items[3:]]
    for col_i, col in enumerate(cols):
        for row_i, (title, desc) in enumerate(col):
            x = Inches(0.3) + col_i * Inches(6.55)
            y = Inches(1.35) + row_i * Inches(2.0)
            rect(s, x, y, Inches(6.3), Inches(0.42), fill_color=NAVY)
            tb(s, title, x + Inches(0.1), y + Inches(0.05),
               Inches(6.1), Inches(0.35), size=13, bold=True, color=WHITE)
            box = s.shapes.add_textbox(x + Inches(0.1), y + Inches(0.44),
                                        Inches(6.1), Inches(1.4))
            tf = box.text_frame; tf.word_wrap = True
            tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = 0
            p = tf.paragraphs[0]
            run = p.add_run(); run.text = desc
            run.font.size = Pt(12); run.font.name = "Calibri"; run.font.color.rgb = DARK


def _ncp_slide(prs, ncp_num, diagnosis_title,
               assessment_s, assessment_o, nd_text,
               goal_s, goal_l,
               interventions, evaluation):
    s = blank(prs)
    bg(s)
    header_bar(s, f"NCP {ncp_num}: {diagnosis_title}")

    # Left column
    bullet_box(s, [f"S: {assessment_s}", f"O: {assessment_o}"],
               Inches(0.3), Inches(1.3), Inches(4.2), Inches(1.9),
               title="Assessment", title_color=NAVY)
    rect(s, Inches(0.3), Inches(3.3), Inches(4.2), Inches(0.42), fill_color=TEAL)
    tb(s, "Nursing Diagnosis", Inches(0.4), Inches(3.34), Inches(4.0), Inches(0.35),
       size=13, bold=True, color=WHITE)
    box = s.shapes.add_textbox(Inches(0.4), Inches(3.75), Inches(4.0), Inches(1.5))
    tf = box.text_frame; tf.word_wrap = True
    tf.margin_left = tf.margin_right = tf.margin_top = tf.margin_bottom = 0
    run = tf.paragraphs[0].add_run(); run.text = nd_text
    run.font.size = Pt(12); run.font.name = "Calibri"; run.font.color.rgb = NAVY; run.font.bold = True

    bullet_box(s, [f"Short-term: {goal_s}", f"Long-term: {goal_l}"],
               Inches(0.3), Inches(5.35), Inches(4.2), Inches(1.85),
               title="Goal", title_color=GREEN)

    # Right column: interventions
    bullet_box(s, interventions,
               Inches(4.65), Inches(1.3), Inches(5.1), Inches(5.9),
               title="Planning / Interventions", title_color=NAVY, body_size=12)

    bullet_box(s, evaluation,
               Inches(9.9), Inches(1.3), Inches(3.2), Inches(5.9),
               title="Evaluation", title_color=GREEN, body_size=12)


def slide_ncp1(prs):
    _ncp_slide(
        prs, "1", "Acute Pain",
        "Burning pain 7/10, worse during bowel movements",
        "Grimacing, guarding, visible perianal swelling, thrombosed hemorrhoid",
        "Acute Pain r/t engorged/thrombosed hemorrhoidal tissue AEB pain 7/10 and observed grimacing",
        "Patient reports pain ≤ 3/10 within 48 hours",
        "Patient demonstrates comfort strategies and verbalizes dietary measures",
        [
            "Assess pain using 0-10 scale every 4 hours",
            "Administer analgesics / topical anesthetics as ordered",
            "Encourage sitz baths 10-15 min, 2-3x/day",
            "Apply witch hazel pads / topical ointment (hydrocortisone)",
            "Position patient in lateral Sims' position",
            "Administer stool softeners to prevent painful straining",
            "Educate patient to avoid prolonged sitting/standing",
        ],
        [
            "Pain reduced to ≤ 3/10 within 48 hours",
            "Demonstrates correct sitz bath technique",
            "Verbalizes dietary strategies for stool softening",
        ]
    )


def slide_ncp2(prs):
    _ncp_slide(
        prs, "2", "Constipation",
        "Hard stool every 3-4 days, straining, incomplete evacuation",
        "Last BM 4 days ago, decreased bowel sounds, low fiber/fluid intake",
        "Constipation r/t low fiber/fluid intake and pain-avoidance of defecation AEB hard infrequent stools and straining",
        "Soft, formed bowel movement within 24-48 hours without straining",
        "Regular bowel habits (soft stool q1-2 days) maintained before discharge",
        [
            "Assess bowel pattern and stool consistency daily",
            "Encourage 2000-2500 mL oral fluid intake per day",
            "Teach high-fiber diet: 25-35 g/day (fruits, veg, whole grains)",
            "Administer stool softeners (docusate) and bulk-forming agents (psyllium)",
            "Encourage ambulation and physical activity",
            "Advise patient not to suppress urge to defecate",
            "Limit toilet time to < 3 minutes; no phone/reading",
            "Document bowel movements using Bristol Stool Scale",
        ],
        [
            "Soft stool passed within 48 hours",
            "Patient lists high-fiber foods correctly",
            "Regular bowel pattern achieved by discharge",
        ]
    )


def slide_ncp3(prs):
    _ncp_slide(
        prs, "3", "Risk for Deficient Fluid Volume",
        "Bright red blood in toilet after every BM x 2 weeks, dizzy and tired",
        "BP 100/70, HR 98, Hgb 9.5 g/dL, Hct 29%, conjunctival pallor",
        "Risk for Deficient Fluid Volume r/t chronic rectal bleeding AEB Hgb 9.5 g/dL, tachycardia, hypotension, pallor",
        "Stable VS (BP >110/70, HR <90) and no active bleeding during admission",
        "Hemoglobin trends toward normal; patient verbalizes warning signs",
        [
            "Monitor vital signs every 4 hours (or more if unstable)",
            "Observe and document bleeding (amount, color, frequency)",
            "Monitor CBC / Hgb / Hct as ordered",
            "Administer IV fluids if hemodynamically unstable",
            "Administer iron supplements or blood transfusion as ordered",
            "Teach patient to avoid straining; use stool softeners",
            "Educate: warn signs — heavy bleeding, dizziness, fainting, clots",
            "Provide rest and energy conservation for anemic patient",
        ],
        [
            "No active bleeding during hospitalization",
            "VS remain stable within normal limits",
            "Hgb improving toward 12 g/dL",
            "Patient verbalizes warning signs",
        ]
    )


def slide_complications(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "COMPLICATIONS")

    rows = [
        ["Anemia",              "Chronic blood loss → iron-deficiency anemia"],
        ["Thrombosis",          "Clotting in external plexus → sudden severe perianal pain"],
        ["Strangulation",       "Prolapsed hemorrhoid trapped by anal sphincter — cuts blood supply"],
        ["Gangrene / Necrosis", "Severe strangulation → tissue death — surgical emergency"],
        ["Perianal Abscess",    "Secondary bacterial infection, especially post-procedural"],
        ["Ulceration",          "Repeated trauma to exposed hemorrhoidal mucosa"],
        ["Urinary Retention",   "Common post-hemorrhoidectomy — requires monitoring"],
        ["Anal Stenosis",       "Post-surgical narrowing of anal canal (rare, from over-excision)"],
        ["Recurrence",          "Hemorrhoids recur if underlying lifestyle factors are not corrected"],
    ]
    two_col_table(s, ["Complication","Description"],
                  rows, Inches(0.3), Inches(1.3), Inches(12.7), Inches(5.9),
                  col_widths=[Inches(2.8), Inches(9.9)])


def slide_summary(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "SUMMARY", "Key Take-Away Points")

    rows = [
        ["Definition",         "Dilated vascular cushions — normal until symptomatic"],
        ["Types",              "Internal (painless) / External (painful) / Mixed"],
        ["Grades",             "I=bleeding only  II=self-reducing  III=manual  IV=irreducible"],
        ["Etiology",           "Constipation, straining, pregnancy, low-fiber diet, portal HTN"],
        ["Pathophysiology",    "Raised pressure → venous engorgement → prolapse / thrombosis"],
        ["Signs",              "Painless rectal bleeding (internal);  Painful lump (external)"],
        ["Diagnosis",          "Anoscopy (gold standard); colonoscopy to rule out CA"],
        ["Treatment",          "Diet/sitz baths → RBL → surgery (only 5-10% need it)"],
        ["NCPs",               "1) Acute Pain  2) Constipation  3) Risk for Fluid Volume Deficit"],
        ["Complications",      "Anemia, thrombosis, strangulation, gangrene, urinary retention"],
    ]
    two_col_table(s, ["Topic","Key Take-Away"],
                  rows, Inches(0.3), Inches(1.3), Inches(12.7), Inches(5.5),
                  col_widths=[Inches(2.4), Inches(10.3)])

    rect(s, 0, Inches(6.95), W, Inches(0.55), fill_color=TEAL)
    tb(s, "\"Hemorrhoids are highly treatable. The nurse's role in patient education — diet, bowel habits, hygiene — is key to preventing recurrence.\"",
       Inches(0.5), Inches(6.96), Inches(12.3), Inches(0.5),
       size=12, italic=True, color=WHITE, align=PP_ALIGN.CENTER)


def slide_references(prs):
    s = blank(prs)
    bg(s)
    header_bar(s, "REFERENCES")
    refs = [
        "Current Surgical Therapy, 14th Edition — Hemorrhoid etiology, treatment, classification",
        "Maingot's Abdominal Operations — Types, evaluation, ligation technique",
        "Pfenninger and Fowler's Procedures for Primary Care, 3rd Edition — Thrombosed external hemorrhoids",
        "Fischer's Mastery of Surgery, 8th Edition — Surgical management",
        "Textbook of Family Medicine, 9th Edition — Internal and external hemorrhoid management",
    ]
    for i, ref in enumerate(refs):
        rect(s, Inches(0.3), Inches(1.4) + Inches(0.9 * i),
             Inches(12.7), Inches(0.75), fill_color=LIGHT,
             line_color=TEAL, line_w=1)
        tb(s, ref, Inches(0.5), Inches(1.45) + Inches(0.9 * i),
           Inches(12.3), Inches(0.65), size=14, color=DARK, wrap=True)


# ── BUILD ──────────────────────────────────────────────────────────────────────
prs = new_prs()

slide_title(prs)
slide_time_plan(prs)
slide_intro(prs)
slide_definition_purpose(prs)
slide_classification(prs)
slide_etiology(prs)
slide_pathophysiology(prs)
slide_clinical(prs)
slide_diagnosis(prs)
slide_management_medical(prs)
slide_management_nursing(prs)
slide_ncp1(prs)
slide_ncp2(prs)
slide_ncp3(prs)
slide_complications(prs)
slide_summary(prs)
slide_references(prs)

out = "/tmp/workspace/hemorrhoid-pptx/Hemorrhoids_Microteaching.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
    f.write(buf.getvalue())

print(f"Saved: {out}")
print(f"Slides: {len(prs.slides)}")
Running Command

cd /tmp/workspace/hemorrhoid-pptx && python create_pptx.py 2>&1

Running Command

cd /tmp/workspace/hemorrhoid-pptx && python -c " import urllib.request, base64, json url = 'https://cdn.orris.care/cdss_images/fc79966337122d135cfd2a8e25ae30a92b80224e34e7845aeaf574abb0543099.png' try: with urllib.request.urlopen(url, timeout=15) as r: data = r.read() with open('anatomy.png','wb') as f: f.write(data) print('Downloaded:', len(data), 'bytes') except Exception as e: print('Failed:', e) "

Running Command

cd /tmp/workspace/hemorrhoid-pptx && python -c " from pptx import Presentation from pptx.util import Inches from io import BytesIO prs = Presentation('Hemorrhoids_Microteaching.pptx') # Slide 5 (index 4) is classification slide = prs.slides[4] # Add anatomy image (local file) slide.shapes.add_picture('anatomy.png', Inches(6.6), Inches(1.55), width=Inches(6.5)) buf = BytesIO() prs.save(buf) with open('Hemorrhoids_Microteaching.pptx', 'wb') as f: f.write(buf.getvalue()) print('Image embedded in slide 5 (Classification). Done.') "

Your presentation is ready! Here is the download link:

Hemorrhoids Microteaching

Presentation · PPTX


What's inside - 17 slides:
SlideContent
1Title Slide - Navy/Teal theme
215-Minute Time Plan table
3Introduction
4Definition & Purpose
5Classification (with anatomy diagram image embedded)
6Etiology
7Pathophysiology (step-by-step flow boxes)
8Clinical Manifestations (3-column layout)
9Diagnostic Evaluation (table)
10Medical Management (3-column: Conservative / Office / Surgical)
11Nursing Management
12NCP 1 - Acute Pain
13NCP 2 - Constipation
14NCP 3 - Risk for Deficient Fluid Volume
15Complications (table)
16Summary (table with closing quote)
17References
Design features:
  • Navy and teal colour scheme - professional medical look
  • Every NCP has Assessment, Diagnosis, Goal, Interventions, and Evaluation clearly laid out
  • Anatomy diagram (external/internal/mixed hemorrhoids) embedded in Classification slide
  • Tables, coloured grade boxes, and two-column layouts for easy reading during presentation

Create a Word document summary of this microteaching for handout distribution

Reading File
Writing File

~/hemorrhoid-pptx/create_handout.py

from docx import Document
from docx.shared import Pt, Inches, RGBColor, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.table import WD_TABLE_ALIGNMENT, WD_ALIGN_VERTICAL
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import copy

doc = Document()

# ── Page setup ────────────────────────────────────────────────────────────────
section = doc.sections[0]
section.page_width  = Inches(8.27)   # A4
section.page_height = Inches(11.69)
section.left_margin   = Inches(1.0)
section.right_margin  = Inches(1.0)
section.top_margin    = Inches(0.8)
section.bottom_margin = Inches(0.8)

# ── Base styles ───────────────────────────────────────────────────────────────
NAVY   = RGBColor(0x0D, 0x3B, 0x6E)
TEAL   = RGBColor(0x00, 0x7A, 0x8A)
ORANGE = RGBColor(0xE8, 0x6B, 0x1F)
WHITE  = RGBColor(0xFF, 0xFF, 0xFF)
DARK   = RGBColor(0x1C, 0x1C, 0x1C)
GREEN  = RGBColor(0x1A, 0x7A, 0x4A)
RED    = RGBColor(0xC0, 0x39, 0x2B)
LIGHT_BLUE = RGBColor(0xE8, 0xF4, 0xF8)

normal_style = doc.styles["Normal"]
normal_style.font.name = "Calibri"
normal_style.font.size = Pt(10.5)

# ── Helpers ───────────────────────────────────────────────────────────────────

def set_cell_bg(cell, hex_color: str):
    """Set table cell background colour."""
    tc   = cell._tc
    tcPr = tc.get_or_add_tcPr()
    shd  = OxmlElement("w:shd")
    shd.set(qn("w:val"),   "clear")
    shd.set(qn("w:color"), "auto")
    shd.set(qn("w:fill"),  hex_color)
    tcPr.append(shd)

def set_cell_borders(cell, color="AAAAAA"):
    tc   = cell._tc
    tcPr = tc.get_or_add_tcPr()
    tcBorders = OxmlElement("w:tcBorders")
    for side in ("top", "left", "bottom", "right"):
        border = OxmlElement(f"w:{side}")
        border.set(qn("w:val"),   "single")
        border.set(qn("w:sz"),    "4")
        border.set(qn("w:space"), "0")
        border.set(qn("w:color"), color)
        tcBorders.append(border)
    tcPr.append(tcBorders)

def add_section_heading(doc, text, level=1):
    """Styled section heading with navy background band."""
    if level == 1:
        p = doc.add_paragraph()
        p.paragraph_format.space_before = Pt(10)
        p.paragraph_format.space_after  = Pt(2)
        run = p.add_run(f"  {text}  ")
        run.font.name   = "Calibri"
        run.font.size   = Pt(13)
        run.font.bold   = True
        run.font.color.rgb = WHITE
        # shading via paragraph XML
        pPr = p._p.get_or_add_pPr()
        shd = OxmlElement("w:shd")
        shd.set(qn("w:val"),   "clear")
        shd.set(qn("w:color"), "auto")
        shd.set(qn("w:fill"),  "0D3B6E")
        pPr.append(shd)
        p.paragraph_format.alignment = WD_ALIGN_PARAGRAPH.LEFT
    else:
        p = doc.add_paragraph()
        p.paragraph_format.space_before = Pt(6)
        p.paragraph_format.space_after  = Pt(1)
        run = p.add_run(text)
        run.font.name  = "Calibri"
        run.font.size  = Pt(11)
        run.font.bold  = True
        run.font.color.rgb = TEAL

def add_bullet(doc, text, level=0, bold_prefix=None):
    p = doc.add_paragraph(style="List Bullet")
    p.paragraph_format.left_indent  = Inches(0.3 + 0.2 * level)
    p.paragraph_format.space_after  = Pt(1)
    p.paragraph_format.space_before = Pt(1)
    if bold_prefix:
        run_b = p.add_run(bold_prefix)
        run_b.font.bold = True
        run_b.font.size = Pt(10.5)
        run_b.font.name = "Calibri"
        run = p.add_run(text)
        run.font.size = Pt(10.5)
        run.font.name = "Calibri"
    else:
        run = p.add_run(text)
        run.font.size = Pt(10.5)
        run.font.name = "Calibri"

def add_body(doc, text, italic=False, color=None, size=10.5, space_after=4):
    p = doc.add_paragraph()
    p.paragraph_format.space_after  = Pt(space_after)
    p.paragraph_format.space_before = Pt(1)
    run = p.add_run(text)
    run.font.name   = "Calibri"
    run.font.size   = Pt(size)
    run.font.italic = italic
    if color:
        run.font.color.rgb = color

def add_note(doc, text):
    """Teal-highlighted note box."""
    p = doc.add_paragraph()
    p.paragraph_format.space_before = Pt(4)
    p.paragraph_format.space_after  = Pt(4)
    p.paragraph_format.left_indent  = Inches(0.2)
    pPr = p._p.get_or_add_pPr()
    shd = OxmlElement("w:shd")
    shd.set(qn("w:val"),   "clear")
    shd.set(qn("w:color"), "auto")
    shd.set(qn("w:fill"),  "E8F4F8")
    pPr.append(shd)
    run = p.add_run(text)
    run.font.name  = "Calibri"
    run.font.size  = Pt(10)
    run.font.italic = True
    run.font.color.rgb = TEAL

def make_table(doc, headers, rows, col_widths=None):
    n_cols = len(headers)
    tbl = doc.add_table(rows=1 + len(rows), cols=n_cols)
    tbl.style = "Table Grid"
    tbl.alignment = WD_TABLE_ALIGNMENT.CENTER

    # Header row
    hdr_row = tbl.rows[0]
    for i, h in enumerate(headers):
        cell = hdr_row.cells[i]
        set_cell_bg(cell, "0D3B6E")
        cell.vertical_alignment = WD_ALIGN_VERTICAL.CENTER
        p = cell.paragraphs[0]
        p.alignment = WD_ALIGN_PARAGRAPH.CENTER
        run = p.add_run(h)
        run.font.bold  = True
        run.font.size  = Pt(10)
        run.font.color.rgb = WHITE
        run.font.name  = "Calibri"

    # Data rows
    for r_i, row in enumerate(rows):
        bg_hex = "EBF5FB" if r_i % 2 == 0 else "FFFFFF"
        for c_i, cell_text in enumerate(row):
            cell = tbl.rows[r_i + 1].cells[c_i]
            set_cell_bg(cell, bg_hex)
            set_cell_borders(cell)
            cell.vertical_alignment = WD_ALIGN_VERTICAL.CENTER
            p = cell.paragraphs[0]
            run = p.add_run(cell_text)
            run.font.size = Pt(9.5)
            run.font.name = "Calibri"

    # Column widths
    if col_widths:
        for row in tbl.rows:
            for i, cell in enumerate(row.cells):
                cell.width = Inches(col_widths[i])

    doc.add_paragraph()  # spacer
    return tbl

def hr(doc):
    """Thin horizontal rule."""
    p = doc.add_paragraph()
    p.paragraph_format.space_before = Pt(2)
    p.paragraph_format.space_after  = Pt(2)
    pPr = p._p.get_or_add_pPr()
    pBdr = OxmlElement("w:pBdr")
    bottom = OxmlElement("w:bottom")
    bottom.set(qn("w:val"),   "single")
    bottom.set(qn("w:sz"),    "6")
    bottom.set(qn("w:space"), "1")
    bottom.set(qn("w:color"), "007A8A")
    pBdr.append(bottom)
    pPr.append(pBdr)


# ══════════════════════════════════════════════════════════════════════════════
#  DOCUMENT CONTENT
# ══════════════════════════════════════════════════════════════════════════════

# ── Header banner (manual paragraph with shading) ────────────────────────────
p = doc.add_paragraph()
pPr = p._p.get_or_add_pPr()
shd = OxmlElement("w:shd")
shd.set(qn("w:val"),   "clear"); shd.set(qn("w:color"), "auto"); shd.set(qn("w:fill"), "0D3B6E")
pPr.append(shd)
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
p.paragraph_format.space_before = Pt(0)
p.paragraph_format.space_after  = Pt(0)
r1 = p.add_run("MICROTEACHING HANDOUT")
r1.font.name = "Calibri"; r1.font.size = Pt(9); r1.font.color.rgb = LIGHT_BLUE; r1.font.bold = False

p2 = doc.add_paragraph()
pPr2 = p2._p.get_or_add_pPr()
shd2 = OxmlElement("w:shd")
shd2.set(qn("w:val"), "clear"); shd2.set(qn("w:color"), "auto"); shd2.set(qn("w:fill"), "0D3B6E")
pPr2.append(shd2)
p2.alignment = WD_ALIGN_PARAGRAPH.CENTER
p2.paragraph_format.space_before = Pt(2)
p2.paragraph_format.space_after  = Pt(2)
r2 = p2.add_run("HEMORRHOIDS  (PILES)")
r2.font.name = "Calibri"; r2.font.size = Pt(20); r2.font.bold = True; r2.font.color.rgb = WHITE

p3 = doc.add_paragraph()
pPr3 = p3._p.get_or_add_pPr()
shd3 = OxmlElement("w:shd")
shd3.set(qn("w:val"), "clear"); shd3.set(qn("w:color"), "auto"); shd3.set(qn("w:fill"), "007A8A")
pPr3.append(shd3)
p3.alignment = WD_ALIGN_PARAGRAPH.CENTER
p3.paragraph_format.space_before = Pt(1)
p3.paragraph_format.space_after  = Pt(6)
r3 = p3.add_run("Subject: Medical-Surgical Nursing  |  Duration: 15 Minutes  |  Date: _______________  |  Student Name: _______________")
r3.font.name = "Calibri"; r3.font.size = Pt(9); r3.font.color.rgb = WHITE

# ── 1. Introduction ───────────────────────────────────────────────────────────
add_section_heading(doc, "1.  INTRODUCTION")
add_bullet(doc, "Hemorrhoids affect approximately 4.4% of the general population")
add_bullet(doc, "Most common in adults over 50 years of age")
add_bullet(doc, "Frequently encountered in surgical, medical, and community nursing settings")
add_bullet(doc, "Understanding hemorrhoids enables nurses to provide patient education, early detection, and holistic care")
hr(doc)

# ── 2. Definition ─────────────────────────────────────────────────────────────
add_section_heading(doc, "2.  DEFINITION")
add_note(doc, "Hemorrhoids (Piles) are dilated, engorged vascular cushions located in the anal canal or at the anal "
              "verge, composed of blood vessels, connective tissue, and smooth muscle fibers.")
add_bullet(doc, "They are a NORMAL part of human anatomy — responsible for 15-20% of anal resting pressure")
add_bullet(doc, "Become PATHOLOGICAL when they enlarge, prolapse, bleed, or cause symptoms")
hr(doc)

# ── 3. Purpose ────────────────────────────────────────────────────────────────
add_section_heading(doc, "3.  PURPOSE OF THIS TEACHING")
for pt in [
    "Understand anatomy, pathology, and clinical features of hemorrhoids",
    "Identify appropriate diagnostic and management strategies",
    "Develop nursing care plans for patients with hemorrhoids",
    "Promote patient education on prevention and lifestyle modification",
]:
    add_bullet(doc, pt)
hr(doc)

# ── 4. Classification ─────────────────────────────────────────────────────────
add_section_heading(doc, "4.  CLASSIFICATION")
add_section_heading(doc, "A.  By Location", level=2)
make_table(doc,
    ["Type", "Location", "Covering", "Pain/Sensation"],
    [
        ["Internal", "Above dentate line", "Columnar mucosa", "Painless"],
        ["External", "Below dentate line", "Squamous epithelium", "Painful"],
        ["Mixed",    "Both above & below", "Both",            "Variable"],
    ],
    col_widths=[1.0, 1.6, 1.8, 1.6])

add_section_heading(doc, "B.  Grading of Internal Hemorrhoids (Goligher's Classification)", level=2)
make_table(doc,
    ["Grade", "Description"],
    [
        ["Grade I",   "Bleeds only — does NOT prolapse"],
        ["Grade II",  "Prolapses during defecation — reduces SPONTANEOUSLY"],
        ["Grade III", "Prolapses — requires MANUAL REDUCTION"],
        ["Grade IV",  "Permanently prolapsed — CANNOT be reduced"],
    ],
    col_widths=[1.2, 4.8])
hr(doc)

# ── 5. Etiology ───────────────────────────────────────────────────────────────
add_section_heading(doc, "5.  ETIOLOGY")
add_section_heading(doc, "Predisposing Factors", level=2)
for f in ["Age > 50 years (weakening of connective tissue supports)",
          "Genetic predisposition / family history",
          "Low-fiber diet",
          "Sedentary lifestyle",
          "Occupations requiring prolonged standing or sitting"]:
    add_bullet(doc, f)

add_section_heading(doc, "Precipitating / Contributing Factors", level=2)
for f in ["Chronic constipation with prolonged straining (most common)",
          "Pregnancy — increased intra-abdominal pressure",
          "Chronic diarrhea — repeated mucosal irritation",
          "Portal hypertension — increased venous back-pressure",
          "Obesity — raised abdominal pressure",
          "COPD — raised intrathoracic pressure causing venous congestion",
          "Prolonged time on toilet (reading, phone use)"]:
    add_bullet(doc, f)
hr(doc)

# ── 6. Pathophysiology ────────────────────────────────────────────────────────
add_section_heading(doc, "6.  PATHOPHYSIOLOGY")
steps = [
    ("Step 1", "Raised intra-abdominal pressure (constipation, straining, pregnancy, obesity, portal HTN)"),
    ("Step 2", "Engorgement and congestion of superior/inferior hemorrhoidal vascular plexuses"),
    ("Step 3", "Weakening of Parks' ligament (mucosal suspensory support)"),
    ("Step 4", "Downward displacement of vascular cushions — prolapse develops"),
    ("Step 5", "Repeated trauma leads to bleeding, inflammation, thrombosis, and ulceration"),
]
for s, d in steps:
    add_bullet(doc, d, bold_prefix=f"{s}: ")

add_note(doc, "Key: Internal hemorrhoids arise from the superior rectal plexus (above dentate line — painless). "
              "External hemorrhoids arise from the inferior rectal plexus (below dentate line — painful). "
              "Thrombosis of external hemorrhoids causes sudden, severe perianal pain.")
hr(doc)

# ── 7. Clinical Manifestations ────────────────────────────────────────────────
add_section_heading(doc, "7.  CLINICAL MANIFESTATIONS")
add_section_heading(doc, "Internal Hemorrhoids", level=2)
for m in ["HALLMARK: Painless bright red rectal bleeding (on toilet paper / dripping in bowl)",
          "Mucous discharge and pruritus ani (perianal itching)",
          "Prolapse of tissue through anus (Grade II-IV)",
          "Sensation of incomplete evacuation",
          "Anemia with chronic heavy blood loss",
          "No pain unless strangulated or thrombosed"]:
    add_bullet(doc, m)

add_section_heading(doc, "External Hemorrhoids", level=2)
for m in ["HALLMARK: Painful perianal swelling",
          "Visible / palpable lump at anal verge",
          "Thrombosed external hemorrhoid = sudden severe pain, bluish-purple firm tender lump",
          "Pruritus and perianal irritation",
          "Difficulty sitting"]:
    add_bullet(doc, m)

add_section_heading(doc, "General Signs", level=2)
for m in ["Rectal bleeding (most common complaint)",
          "History of constipation / straining",
          "Mucoid or bloody discharge",
          "Signs of anemia: pallor, fatigue, tachycardia (chronic cases)"]:
    add_bullet(doc, m)
hr(doc)

# ── 8. Diagnostic Evaluation ─────────────────────────────────────────────────
add_section_heading(doc, "8.  DIAGNOSTIC EVALUATION")
make_table(doc,
    ["Investigation", "Purpose / Notes"],
    [
        ["History Taking",                   "Bleeding pattern, bowel habits, diet, pregnancy, family history of colorectal CA"],
        ["Inspection",                       "External hemorrhoids, skin tags, fissures, fistulas at anal verge"],
        ["Digital Rectal Exam (DRE)",        "Excludes masses — NOTE: internal hemorrhoids are NOT palpable on DRE"],
        ["Anoscopy  [GOLD STANDARD]",        "Direct visualization of internal hemorrhoids; identifies source, grade, location"],
        ["Colonoscopy / Sigmoidoscopy",      "Mandatory if age >40 or family history of CA — rule out colorectal malignancy"],
        ["CBC (Full Blood Count)",           "Detect iron-deficiency anemia (low Hgb, low Hct)"],
        ["Stool Occult Blood Test",          "Confirms gastrointestinal bleeding source"],
        ["Coagulation Profile",              "If a bleeding disorder is suspected"],
    ],
    col_widths=[2.2, 3.8])
hr(doc)

# ── 9. Management ─────────────────────────────────────────────────────────────
add_section_heading(doc, "9.  MANAGEMENT")
add_section_heading(doc, "A.  Medical Management", level=2)

add_section_heading(doc, "Conservative Treatment (First-Line — Grade I & II)", level=2)
for m in ["High-fiber diet: 25-35 g/day (raw vegetables, fruits, whole grains)",
          "Increase fluid intake: 8+ glasses of water per day",
          "Fiber supplements: psyllium, methylcellulose",
          "Stool softeners: docusate sodium",
          "Warm sitz baths: 10-15 minutes, 2-3 times per day",
          "Topical agents: hydrocortisone cream, lidocaine, zinc oxide",
          "Witch hazel-soaked pads to reduce edema",
          "Reduce toilet time to <3 minutes; avoid phone/reading on toilet"]:
    add_bullet(doc, m)

add_section_heading(doc, "Office-Based Procedures (Grade I-III)", level=2)
make_table(doc,
    ["Procedure", "Mechanism"],
    [
        ["Rubber Band Ligation (RBL)", "Band placed 2 cm above dentate line → tissue necroses and sloughs off (most common)"],
        ["Sclerotherapy",             "Injection of sclerosing agent → fibrosis and obliteration"],
        ["Infrared Coagulation (IRC)", "Infrared light coagulates tissue at hemorrhoid apex"],
    ],
    col_widths=[2.2, 3.8])

add_section_heading(doc, "Surgical Management (Grade III-IV / Failed Conservative — Only 5-10% of patients)", level=2)
for s in ["Ferguson Hemorrhoidectomy (Closed) — most common in USA",
          "Milligan-Morgan Hemorrhoidectomy (Open)",
          "Stapled Hemorrhoidopexy (PPH)",
          "Doppler-Guided Hemorrhoid Artery Ligation (DGHAL)"]:
    add_bullet(doc, s)

add_section_heading(doc, "B.  Nursing Management", level=2)
nursing_items = [
    ("Assessment & Monitoring:", "Monitor rectal bleeding (amount, colour, frequency); pain scale q4h; vital signs; CBC; urine output"),
    ("Pain Relief:", "Analgesics as ordered; warm sitz baths 2-3x/day; topical ointments; Sims' lateral position"),
    ("Bowel Regulation:", "Stool softeners; high-fibre diet; adequate hydration; discourage straining"),
    ("Wound Care (Post-op):", "Keep perianal area clean and dry; sitz baths after each BM; observe for complications"),
    ("Patient Education:", "Dietary changes; proper toilet hygiene; reduce toilet time; warning signs to report"),
    ("Psychosocial Support:", "Maintain privacy and dignity; reduce embarrassment; explain all procedures clearly"),
]
for prefix, detail in nursing_items:
    add_bullet(doc, detail, bold_prefix=prefix + " ")
hr(doc)

# ── 10. NCP ───────────────────────────────────────────────────────────────────
add_section_heading(doc, "10.  NURSING CARE PLANS (NCP)")

def add_ncp(doc, num, title, assess_s, assess_o, nd, goal_s, goal_l, interventions, evaluation):
    p = doc.add_paragraph()
    p.paragraph_format.space_before = Pt(6)
    p.paragraph_format.space_after  = Pt(2)
    pPr = p._p.get_or_add_pPr()
    shd = OxmlElement("w:shd")
    shd.set(qn("w:val"), "clear"); shd.set(qn("w:color"), "auto"); shd.set(qn("w:fill"), "007A8A")
    pPr.append(shd)
    run = p.add_run(f"  NCP {num}: {title}")
    run.font.name = "Calibri"; run.font.size = Pt(11); run.font.bold = True; run.font.color.rgb = WHITE

    make_table(doc,
        ["Component", "Details"],
        [
            ["Assessment (S)",      assess_s],
            ["Assessment (O)",      assess_o],
            ["Nursing Diagnosis",   nd],
            ["Goal (Short-term)",   goal_s],
            ["Goal (Long-term)",    goal_l],
            ["Interventions",       "\n".join(f"  {chr(8226)} {i}" for i in interventions)],
            ["Evaluation",          "\n".join(f"  {chr(8226)} {e}" for e in evaluation)],
        ],
        col_widths=[1.6, 4.4])

add_ncp(doc, 1, "Acute Pain",
    assess_s="Burning pain 7/10, worse during bowel movements, difficulty sitting",
    assess_o="Grimacing, guarding, visible perianal swelling, thrombosed hemorrhoid on examination",
    nd="Acute Pain r/t engorged/thrombosed hemorrhoidal tissue AEB patient-reported pain 7/10 and observed grimacing",
    goal_s="Patient will report pain reduced to 3/10 or less within 48 hours",
    goal_l="Patient verbalizes effective pain control strategies and demonstrates comfort during ADLs before discharge",
    interventions=[
        "Assess pain using numeric rating scale (0-10) every 4 hours",
        "Administer analgesics / topical anesthetics as prescribed",
        "Encourage warm sitz baths for 10-15 min, 2-3x/day and after each BM",
        "Apply witch hazel pads / topical ointment (hydrocortisone) as ordered",
        "Position patient in lateral Sims' position to reduce perianal pressure",
        "Administer stool softeners to prevent painful straining during defecation",
        "Educate to avoid prolonged sitting or standing",
    ],
    evaluation=[
        "Patient reports pain score reduced to 3/10 within 48 hours",
        "Correctly demonstrates sitz bath technique",
        "Verbalises dietary measures to prevent constipation and straining",
    ])

add_ncp(doc, 2, "Constipation",
    assess_s="Hard stool every 3-4 days, straining excessively, feeling of incomplete evacuation",
    assess_o="Last BM 4 days ago, decreased bowel sounds, low dietary fibre and fluid intake noted",
    nd="Constipation r/t low fibre/fluid intake and avoidance of defecation due to pain AEB hard infrequent stools, straining, and incomplete evacuation",
    goal_s="Patient will have a soft, formed bowel movement within 24-48 hours without straining",
    goal_l="Patient maintains regular bowel habits (soft stool every 1-2 days) by discharge and verbalises dietary changes",
    interventions=[
        "Assess bowel pattern and stool consistency (Bristol Stool Scale) daily",
        "Encourage oral fluid intake of at least 2000-2500 mL per day",
        "Educate patient on high-fibre diet: 25-35 g/day (fruits, vegetables, whole grains)",
        "Administer stool softeners (docusate sodium) and bulk-forming laxatives (psyllium) as ordered",
        "Encourage ambulation and physical activity as tolerated",
        "Advise patient not to suppress the urge to defecate",
        "Limit toilet time to <3 minutes; no reading or phone use",
    ],
    evaluation=[
        "Soft, formed stool passed within 48 hours without excessive straining",
        "Patient correctly lists high-fibre foods and daily fluid target",
        "Improved bowel pattern documented before discharge",
    ])

add_ncp(doc, 3, "Risk for Deficient Fluid Volume",
    assess_s="Bright red blood in toilet after every BM for 2 weeks, feels dizzy and very tired",
    assess_o="BP 100/70 mmHg, HR 98 bpm, Hgb 9.5 g/dL, Hct 29%, conjunctival pallor, Grade III internal hemorrhoids on anoscopy",
    nd="Risk for Deficient Fluid Volume r/t chronic rectal bleeding secondary to hemorrhoids AEB Hgb 9.5 g/dL, tachycardia, hypotension, and pallor",
    goal_s="Patient will maintain stable vital signs (BP >110/70, HR <90) and have no active bleeding episode during admission",
    goal_l="Hemoglobin will trend toward 12 g/dL; patient will recognise and report warning signs immediately",
    interventions=[
        "Monitor vital signs every 4 hours (more frequently if unstable)",
        "Observe and document rectal bleeding — amount, colour, frequency",
        "Monitor CBC, Hgb, and Hct as ordered",
        "Administer IV fluids if patient shows signs of haemodynamic instability",
        "Administer iron supplements or blood transfusion as ordered",
        "Teach patient to avoid straining; use stool softeners",
        "Educate on warning signs: heavy bleeding, dizziness, fainting, clots — report immediately",
        "Provide rest and energy conservation measures for anaemic patient",
    ],
    evaluation=[
        "No active bleeding episodes during hospitalisation",
        "Vital signs remain stable within normal limits",
        "Haemoglobin improving; patient verbalises warning signs",
    ])

hr(doc)

# ── 11. Complications ─────────────────────────────────────────────────────────
add_section_heading(doc, "11.  COMPLICATIONS")
make_table(doc,
    ["Complication", "Description"],
    [
        ["Anemia",               "Chronic blood loss leads to iron-deficiency anemia"],
        ["Thrombosis",           "Clotting in external plexus → sudden severe perianal pain"],
        ["Strangulation",        "Prolapsed hemorrhoid trapped by anal sphincter — cuts blood supply"],
        ["Gangrene / Necrosis",  "Severe strangulation → tissue death — surgical emergency"],
        ["Perianal Abscess",     "Secondary bacterial infection, especially post-procedural"],
        ["Urinary Retention",    "Common after hemorrhoidectomy — monitor urine output"],
        ["Anal Stenosis",        "Post-surgical narrowing of anal canal (rare — from over-excision)"],
        ["Recurrence",           "Hemorrhoids recur if underlying lifestyle factors are not corrected"],
    ],
    col_widths=[1.8, 4.2])
hr(doc)

# ── 12. Summary ───────────────────────────────────────────────────────────────
add_section_heading(doc, "12.  SUMMARY")
make_table(doc,
    ["Topic", "Key Take-Away"],
    [
        ["Definition",      "Dilated vascular cushions — normal until symptomatic"],
        ["Types",           "Internal (painless) / External (painful) / Mixed"],
        ["Grades",          "I = bleeding only  |  II = self-reducing  |  III = manual  |  IV = irreducible"],
        ["Etiology",        "Constipation, straining, pregnancy, low-fiber diet, portal HTN"],
        ["Pathophysiology", "Raised pressure → venous engorgement → prolapse / thrombosis"],
        ["Signs",           "Painless rectal bleeding (internal); Painful lump (external)"],
        ["Diagnosis",       "Anoscopy (gold standard); colonoscopy to rule out malignancy"],
        ["Treatment",       "Diet/sitz baths → RBL → surgery (only 5-10% need surgery)"],
        ["NCPs",            "1) Acute Pain  2) Constipation  3) Risk for Deficient Fluid Volume"],
        ["Complications",   "Anemia, thrombosis, strangulation, gangrene, urinary retention"],
    ],
    col_widths=[1.6, 4.4])

add_note(doc, "\"Hemorrhoids are highly treatable. The nurse's role in patient education — diet, bowel habits, "
              "and hygiene — is the cornerstone of preventing recurrence and avoiding surgery.\"")
hr(doc)

# ── 13. References ────────────────────────────────────────────────────────────
add_section_heading(doc, "13.  REFERENCES")
refs = [
    "Current Surgical Therapy, 14th Edition — Hemorrhoid etiology, treatment, and classification",
    "Maingot's Abdominal Operations — Types, evaluation, and ligation technique",
    "Pfenninger and Fowler's Procedures for Primary Care, 3rd Edition — Thrombosed external hemorrhoids",
    "Fischer's Mastery of Surgery, 8th Edition — Surgical management",
    "Textbook of Family Medicine, 9th Edition — Internal and external hemorrhoid management",
]
for r in refs:
    add_bullet(doc, r)

# ── Footer note ───────────────────────────────────────────────────────────────
doc.add_paragraph()
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
p.paragraph_format.space_before = Pt(6)
run = p.add_run("Prepared for Microteaching Distribution  |  Medical-Surgical Nursing  |  Subject: Hemorrhoids")
run.font.name = "Calibri"; run.font.size = Pt(8)
run.font.color.rgb = RGBColor(0x88, 0x88, 0x88); run.font.italic = True

# ── Save ──────────────────────────────────────────────────────────────────────
out = "/tmp/workspace/hemorrhoid-pptx/Hemorrhoids_Handout.docx"
doc.save(out)
print(f"Saved: {out}")
Running Command

cd /tmp/workspace/hemorrhoid-pptx && python create_handout.py 2>&1

Running Command

cd /tmp/workspace/hemorrhoid-pptx && python -c " from docx import Document doc = Document('Hemorrhoids_Handout.docx') count = 0 for p in doc.paragraphs: if p.text.strip(): count += 1 tables = len(doc.tables) print(f'Non-empty paragraphs: {count}') print(f'Tables: {tables}') import os size = os.path.getsize('Hemorrhoids_Handout.docx') print(f'File size: {size:,} bytes') "

Your handout Word document is ready for download:

Hemorrhoids Handout

Word Document · DOCX


What's inside the handout (A4, print-ready):
FeatureDetails
FormatA4 page, 1-inch margins, Calibri font
HeaderNavy banner with title + student name / date fields to fill in
SectionsAll 13 sections from the microteaching
Tables9 formatted tables (Classification, Grading, Diagnostic Eval, Procedures, NCP x3, Complications, Summary)
NCPsAll 3 NCPs in structured table rows: Assessment S/O, Diagnosis, Goals, Interventions, Evaluation
Colour codingNavy headers, teal subheadings, alternating row shading, highlighted key notes
FooterSubject / topic attribution line
Both files are now ready:
  • Hemorrhoids Microteaching

    Presentation · PPTX

    - 17-slide presentation
  • Hemorrhoids Handout

    Word Document · DOCX

    - printable student handout
This is a shared conversation. Sign in to Orris to start your own chat.