Liver thorax gall bladder bile ducts homeopathic medicine for surgery creative pdf with images of disease
gallbladder gallstones cholelithiasis ultrasound

This abdominal ultrasound image displays a diagnostic view of the gallbladder containing cholelithiasis (gallstones). The gallbladder appears as a prominent, elongated, anechoic (black) sac-like structure. Inside the lumen, multiple hyperechoic (bright) foci are visible along the dependent wall, representing gallstones. Crucially, the image demonstrates the classic diagnostic sign of posterior acoustic shadowing, where dark, vertical hypoechoic bands extend inferiorly from the stones, indicated by black arrowheads. This phenomenon occurs as the dense stones attenuate the ultrasound beam, preventing sound waves from reaching deeper tissues. The surrounding liver parenchyma shows a normal, homogeneous intermediate echogenicity. This visual is typical for diagnosing symptomatic or asymptomatic gallstone disease in a clinical or preoperative setting.

This abdominal ultrasound image depicts the gallbladder in a transverse or longitudinal section. The primary clinical finding is cholelithiasis, characterized by at least two highly echogenic structures within the gallbladder lumen. These structures exhibit posterior acoustic shadowing, a hallmark diagnostic feature of gallstones. A measurement caliper labeled 'Dist A' indicates one stone measures approximately 19.7 mm. The gallbladder wall appears thin and regular, with no evidence of wall thickening, pericholecystic fluid, or sonographic Murphy's sign, findings which help rule out acute cholecystitis at the time of imaging. The surrounding hepatic parenchyma shows normal, homogeneous echogenicity. The image is annotated with 'GB' to identify the gallbladder and includes technical parameters such as depth (14 cm) and mechanical index (1.3). This imaging is consistent with symptomatic biliary colic in a patient with known cholelithiasis.

This four-panel image provides a comparison of cholelithiasis (gallstones) across different imaging modalities. Panel A: Abdominal ultrasound displays a gallbladder containing a large, hyperechoic structure (arrow) with a prominent posterior acoustic shadow, diagnostic of a gallstone. Panel B: A standard Portal-Venous Phase (PC) CT scan shows the gallbladder lumen with fluid density, but the stone is iso-attenuating and thus invisible. Panel C: A Virtual Non-Contrast (VNC) reconstruction from Dual-Energy CT (DECT) successfully delineates the stone (arrow), which appears hyperdense relative to the surrounding bile. Panel D: A 50-keV Virtual Monoenergetic Image (VMC) reconstruction further highlights the gallstone (arrow) by enhancing the contrast between the cholesterol-rich stone and the gallbladder fluid. The composite illustrates how specialized DECT reconstructions (VNC and low-keV VMC) can overcome the limitations of conventional CT in detecting radiolucent or iso-attenuating gallstones, approaching the sensitivity of ultrasound for biliary pathology.

Diagnostic ultrasound images of the gallbladder in two planes: (a) sagittal view and (b) decubitus view. Both images reveal cholelithiasis, characterized by the presence of hyperechoic (bright) foci within the anechoic (fluid-filled) lumen of the gallbladder. White arrows in both frames highlight specific gallstones. The gallbladder wall appears thin and without significant distension, indicating cholelithiasis without acute cholecystitis. The liver parenchyma is visible adjacent to the gallbladder as a medium-echogenicity structure. These views are utilized in clinical practice to confirm the presence and mobility of stones, as the decubitus position helps redistribute luminal contents to differentiate mobile stones from stationary polyps. The image serves as an educational example of biliary imaging in the context of suspected gallstone pancreatitis or symptomatic cholelithiasis.
liver anatomy diagram hepatic

This diagnostic image consists of an intraoperative ultrasound of the liver (left) paired with an anatomical line diagram (right) illustrating the hepatic hilum in a transverse plane. The ultrasound displays normal liver parenchyma with medium echogenicity and a homogeneous texture. The central focus is the bifurcation of the portal vein and the overlying hepatic artery. Key anatomical structures labeled in the diagram and visible on ultrasound include the right portal vein (RPV) and left portal vein (LPV), which appear as larger, hypoechoic vascular structures. Positioned superficial to the portal bifurcation are the smaller, circular cross-sections of the right hepatic artery (RHA) and left hepatic artery (LHA). Additionally, the right hepatic duct (RHD) is identified as a small anechoic structure adjacent to the RHA. This visual material is used in surgical education to demonstrate the 'Mickey Mouse' sign and the spatial relationships within the hepatoduodenal ligament, essential for identifying segmental anatomy during hepatobiliary procedures.

This medical visual consists of a clinical diagnostic ultrasound image alongside a labeled anatomical diagram illustrating hepatic venous anatomy. The B-mode ultrasound shows a transverse view of the superior liver. It demonstrates the confluence of the middle hepatic vein (MHV) and the left hepatic vein (LHV) as they merge to form a common trunk (CT). This trunk subsequently drains into the inferior vena cava (IVC), which appears as a circular or oval anechoic structure. The liver parenchyma exhibits a normal, medium-level echogenicity with a homogeneous texture and smooth surface. The accompanying line diagram provides anatomical context, clearly labeling the MHV, LHV, CT, and IVC to show their relative positions and the 'rabbit ears' appearance characteristic of this vascular junction. This content is intended for intermediate medical education, specifically for identifying segmental liver anatomy and vascular landmarks during intraoperative or diagnostic ultrasound examinations.

This educational graphic consists of an anatomical diagram and a corresponding transverse ultrasound image demonstrating hepatic venous anatomy and Couinaud liver segments. The diagram (left) illustrates the superior drainage of the liver into the inferior vena cava (IVC) via three primary hepatic veins: the right hepatic vein (RHV), middle hepatic vein (MHV), and left hepatic vein (LHV). These vessels serve as landmarks for segmental anatomy, with segments 2 through 8 labeled according to their spatial relationship to these veins. The ultrasound image (right) displays a transverse view at the superior level of the liver. The IVC appears as a central, relatively anechoic structure. The hepatic veins are visible as anechoic tubular structures draining into the IVC, creating the characteristic 'rabbit ears' appearance. Labels on the sonogram identify the RHV, MHV, and LHV, as well as segments 7, 8, and 4a. The surrounding hepatic parenchyma exhibits a homogeneous, medium-level echogenicity. This comparison facilitates the understanding of intraoperative ultrasound landmarks for surgical resection and anatomical localization.

This composite educational graphic illustrates the mechanism and radiological presentation of a hepatic acceleration injury. On the left, a schematic anatomical diagram in the axial plane depicts a blunt force impact (black arrowhead) to the anterior chest wall. It demonstrates the pathophysiology where the liver is propelled posteriorly while the falciform ligament (empty arrow) acts as a fixed counterforce, resulting in shearing stress and a parenchymal laceration in the left lobe of the liver. On the right, a corresponding axial contrast-enhanced CT scan of the upper abdomen provides clinical correlation. The CT shows a clear hepatic laceration in the anterior portion of the left lobe, appearing as an irregular, hypodense area of mixed texture that disrupts the homogenous liver parenchyma. Visible surrounding anatomy includes the right lobe of the liver, spleen, stomach, vertebral body, and ribs. This material is designed to teach medical students and radiology residents about traumatic liver injuries, specifically the role of ligamentous attachments in creating shearing forces during high-velocity traffic accidents.
bile duct obstruction cholangitis

This clinical photograph shows an intraoperative view of the hepatobiliary region during a surgical procedure for acute cholangitis. The primary focus is a severely dilated common bile duct, which appears as a prominent, distended, tubular structure with a pinkish-white serosal surface and visible superficial vascularization. The duct is isolated and retracted using a white vessel loop (surgical tape). Adjacent to the dilated duct, the duodenum is visible as a bulbous, pink organ in the lower portion of the surgical field. The liver is seen in the upper right quadrant, exhibiting a dark reddish-purple color and glistening surface. The surrounding surgical field contains evidence of inflammation and adhesions, with varied textures including granular, fatty, and serosal tissues. The photograph demonstrates the anatomical distortion caused by chronic biliary obstruction and distal choledocholithiasis, illustrating the typical presentation of a dilated bile duct requiring surgical intervention such as choledocotomy or anastomosis.

This endoscopic image provides a direct peroral cholangioscopy (DPOCS) view within a bile duct lumen, demonstrating a significant impaction of biliary sludge and food residue. In the foreground, an inflated, translucent balloon catheter is positioned to perform a 'balloon sweep' for ductal clearance. Extending from the catheter's tip is a thin metallic guidewire. The luminal space is occupied by heterogeneous materials: soft, yellowish, pasty debris characteristic of food impaction and sludge, alongside darker, brownish-green solid fragments. The surrounding bile duct wall appears erythematous and edematous, consistent with acute cholangitis. This visual captures a critical step in managing recurrent biliary obstruction (RBO) following self-expandable metallic stent (SEMS) placement, where clearance of the ductal lumen is required before secondary procedures, such as the placement of a dual anti-reflux metal stent (D-ARMS), to prevent early stent dysfunction caused by refluxed duodenal contents.

This clinical photograph displays an endoscopic view during an Endoscopic Retrograde Cholangiopancreatography (ERCP). The image captures the interior of the common bile duct (CBD), which appears dilated and lined with hyperemic, reddish-brown mucosa suggestive of inflammatory changes. Within the lumen, there is an accumulation of thick, dark, viscous mucus causing obstruction. A bright, white, opaque inflated extraction balloon is visualized being used to retract and sweep the mucinous material from the duct. A blue arrow indicates the wall of the common bile duct. This visual demonstrates the management of biliary obstruction caused by mucin-producing pathologies, such as intraductal papillary mucinous neoplasms of the bile duct (IPMN-B). The procedural context illustrates the use of balloon sweeps to clear the biliary tree and alleviate jaundice or cholangitis secondary to mechanical occlusion by mucin.
liver cirrhosis hepatitis pathology

This composite of two clinical photographs illustrates the gross pathology of end-stage liver disease and its complications. Figure (a) displays a gross specimen of a human liver exhibiting cirrhosis, likely secondary to chronic hepatitis C. The organ shows a distorted architecture with a diffuse, reddish-brown coloration and a characteristic micronodular surface texture. This 'cobblestone' appearance is indicative of regenerative nodules separated by fibrous septa. Figure (b) shows a longitudinal section of an esophagus with prominent esophageal varices. The varices appear as dark red, dilated, and tortuous venous structures protruding from the esophageal wall. Focal dark areas along the vessels suggest recent hemorrhage or thrombus formation. Together, these images demonstrate the pathophysiology of portal hypertension, where hepatic cirrhosis leads to the development of portosystemic shunts, such as esophageal varices, which are a critical risk factor for life-threatening upper gastrointestinal bleeding.

Two axial slices from a preoperative abdominal Computed Tomography (CT) scan demonstrating advanced liver pathology. The liver is significantly enlarged (hepatomegaly) with a highly irregular, nodular contour consistent with decompensated cirrhosis. The hepatic parenchyma exhibits diffuse, heterogeneous attenuation with multiple ill-defined, hypo- and hyper-dense regions suggestive of multifocal hepatocellular carcinoma (HCC). Large, bulky lesions distort the normal hepatic architecture, particularly in the right lobe and dome. Evidence of portal hypertension is present, including prominent perihepatic ascites (fluid accumulation) visible as a low-density rim between the liver surface and the abdominal wall. The stomach is visible on the right side of the images (patient's left), appearing partially distended. Posteriorly, the abdominal aorta and spinal column are well-visualized. This diagnostic imaging highlights the typical radiographic presentation of extensive HCC arising in the context of viral hepatitis-induced cirrhosis before surgical intervention.

This composite diagnostic image demonstrates the comparative utility of ultrasound and magnetic resonance imaging (MRI) in evaluating liver pathology within a cirrhotic liver. Panel (a) is a B-mode ultrasound image showing heterogeneous, echogenic parenchyma typical of cirrhosis, with a poorly defined hypoechoic lesion (arrowhead) measuring approximately 2–3 cm. The visual detail is limited by acoustic shadowing and coarse texture. Panels (b) and (c) represent axial and coronal gadoxetic acid-enhanced MRI scans, respectively. These cross-sectional images provide superior contrast and spatial resolution, revealing multiple well-demarcated, hyperintense focal nodular hyperplasia (FNH)-like nodules (arrowheads) distributed throughout the liver segments. These benign lesions exhibit characteristic enhancement patterns on the hepatobiliary phase that distinguish them from malignant entities like hepatocellular carcinoma. The comparison highlights the limitations of ultrasound screening in high-risk patients with chronic hepatitis B and cirrhosis, where complex parenchymal changes can obscure numerous benign nodules, necessitating advanced contrast-enhanced imaging for definitive characterization.
homeopathic medicines for liver gallbladder bile duct surgery Chelidonium Berberis Cholesterinum
cholecystectomy laparoscopic surgery gallbladder removal

This clinical photograph captures a critical step in the extraction phase of a laparoscopic cholecystectomy. The image shows the gallbladder being retrieved through a 10 mm umbilical port incision. The gallbladder appears dark, reddish-purple, and distended, with visible surface striations suggesting inflammation or congestion. A long, metallic artery forceps is securely clamped onto the cystic duct end of the gallbladder at the level of the skin incision to facilitate its manual extraction. Adjacent to the forceps, a laparoscopic grasper is visible, having just been released from the gallbladder tissue and closed under direct vision. The surrounding skin at the umbilical site shows minor surgical trauma and blood consistent with the port-site retrieval process. This visual demonstrates the surgical technique of transitioning from laparoscopic manipulation to externalized mechanical traction for specimen removal, emphasizing port-site management and tissue handling in minimally invasive abdominal surgery.

This clinical photograph shows an intraoperative laparoscopic view during a cholecystectomy. The primary focus is the gallbladder, which appears as a pear-shaped, pale yellow-to-cream sac. The serosal surface of the gallbladder exhibits a visible network of fine vascularization. An atraumatic laparoscopic grasper is securely attached to the neck or cystic duct region, elevating the gallbladder to facilitate extraction from the abdominal cavity. Surrounding anatomical structures include the liver, visible as a dark reddish-brown organ on the right with a small surgical site or defect, and the abdominal wall or adjacent viscera on the left, displaying prominent subserosal blood vessels. The image demonstrates a critical step in surgical technique: the manipulation and securing of the specimen prior to removal through a port site. This visual serves as an educational resource for general surgery, illustrating laparoscopic biliary anatomy and instrument placement.

A grayscale clinical photograph documenting a Single-Port Laparoscopic Cholecystectomy (SPLC). The image captures the intraoperative moment of specimen extraction through the umbilicus. A TriPort (Olympus) surgical access device is positioned within a transumbilical incision, featuring a circular rigid base on the skin surface and a clear, flexible silicone or plastic sheath extending upward. A biological specimen, identified as the gallbladder, is being manually extracted through the lumen of the port. The tissue appears elongated and nodular with varied surface texture and density as it is pulled upward. A metallic surgical grasper or forceps is seen at the top of the frame, securely holding the superior portion of the gallbladder during removal. This visual illustrates a key step in minimally invasive surgery where the specimen is retrieved without the use of an endobag, highlighting the functionality of single-incision laparoscopic ports for tissue management.
Chelidonium majus plant homeopathic remedy

This Scanning Electron Microscopy (SEM) image displays the morphological structure of a GC-AuNPs carrier system, a pharmaceutical delivery platform composed of gold nanoparticles (AuNPs) integrated with Greater Celandine (Chelidonium majus) phytochemicals. At a magnification including a 20 µm scale bar, the image reveals a complex, heterogeneous topography. The carrier system is characterized by a fibrous organic network originating from the plant material, which exhibits irregular shapes and a porous, rough surface texture. Within these large pores and across the fibrous strands, spherical gold nanoparticles and their small clusters (average size ~17 nm) are distributed. The educational focus of this diagnostic image is to demonstrate the successful loading of metallic nanoparticles into a botanical carrier system, highlighting the bonding between phytochemical bioactive compounds and the gold surfaces. This morphology is critical for clinical pharmacology, as the high surface area and porous structure influence the dissolution rates and the release profile of therapeutic alkaloids used for antimicrobial and anti-inflammatory applications.

This clinical photograph shows the external genitalia of a 15-month-old patient presenting with atypical genital appearance. The visual focus is on significant asymmetry of the vulvar region. The left labium majus is markedly enlarged, elongated, and appears prolapsed, protruding downward and outward from the inguinal area. This swelling obscures the underlying anatomy and is clinically associated with the presence of a palpable gonad within the labial structure. The right labium majus appears relatively normal in size and anatomical position. There is no evidence of cliteromegaly or significant virilization visible in this frame. The skin across the region is intact with uniform pigmentation, except for a small, dark nevus on the upper left inguinal region. This image is used to demonstrate the clinical manifestation of 5-alpha-reductase type 2 deficiency (5αRD2), where genetically male individuals (46,XY or 47,XXY) may present with female-typical external genitalia and inguinal gonads.
mkdir -p /tmp/workspace/homeopathy-hepatobiliary && ls /tmp/workspace/
cd /tmp/workspace/homeopathy-hepatobiliary && python3 -c " import requests, os images = [ ('gallstones_us.jpg', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_9f6e535b399f6c51c5f5f20f12296c08a3a8baa73b3f9cf8b5345631bee12412.jpg'), ('liver_anatomy.jpg', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_63033f1257ee33bde5c6e23b2f4c374b67fafb2348ec7ebfa2de3492808f67a5.jpg'), ('bile_duct.jpg', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_e0e74b03fed3433787602e48b8b3cb009ef0b5cc5d998760bae8f729aadab938.jpg'), ('cirrhosis.jpg', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_5e9b6ad9a21f6c1de03e6ba9b7d167473bb9b4bc9ce5e19bc990dd6e1276f747.jpg'), ('cholecystectomy.jpg', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_cfe173a9f34cf803636053f6133d234e483b3d0a9e7eb1e8f96ab9a8692ab21c.jpg'), ('gallstones_ct.jpg', 'https://cdn.orris.care/cdss_images/pmc_clinical_VQA_7d13d35836304d84138016fa4f1af67bd4a52735199aa644905d5e21c6ea7897.jpg'), ] headers = {'User-Agent': 'Mozilla/5.0'} for fname, url in images: try: r = requests.get(url, headers=headers, timeout=15) if r.status_code == 200: with open(fname, 'wb') as f: f.write(r.content) print(f'OK: {fname} ({len(r.content)} bytes)') else: print(f'FAIL {r.status_code}: {fname}') except Exception as e: print(f'ERR: {fname}: {e}') "
~/homeopathy-hepatobiliary/create_pdf.py
#!/usr/bin/env python3
"""
Creative PDF: Homeopathic Medicine for Liver, Thorax, Gallbladder & Bile Ducts
Surgical Support & Management Guide
"""
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Image, Table, TableStyle,
HRFlowable, PageBreak, KeepTogether
)
from reportlab.graphics.shapes import Drawing, Rect, Circle, String, Line
from reportlab.graphics import renderPDF
from reportlab.pdfgen import canvas
from reportlab.platypus.flowables import Flowable
import os
# ─── COLOUR PALETTE ───────────────────────────────────────────────────────────
DEEP_GREEN = colors.HexColor("#1B5E20")
MED_GREEN = colors.HexColor("#2E7D32")
LIGHT_GREEN = colors.HexColor("#A5D6A7")
ACCENT_GOLD = colors.HexColor("#F9A825")
ACCENT_AMBER = colors.HexColor("#FFB300")
LIGHT_BG = colors.HexColor("#F1F8E9")
SECTION_BG = colors.HexColor("#E8F5E9")
WARN_RED = colors.HexColor("#C62828")
WARN_LIGHT = colors.HexColor("#FFCDD2")
TEXT_DARK = colors.HexColor("#212121")
TEXT_GREY = colors.HexColor("#424242")
WHITE = colors.white
TEAL = colors.HexColor("#00695C")
LIGHT_TEAL = colors.HexColor("#B2DFDB")
W, H = A4
OUTPUT = "/tmp/workspace/homeopathy-hepatobiliary/Homeopathic_Hepatobiliary_Surgery_Guide.pdf"
IMG_DIR = "/tmp/workspace/homeopathy-hepatobiliary"
# ─── CUSTOM FLOWABLES ─────────────────────────────────────────────────────────
class ColorBand(Flowable):
def __init__(self, width, height, color, radius=6):
Flowable.__init__(self)
self.width = width
self.height = height
self.color = color
self.radius = radius
def draw(self):
self.canv.setFillColor(self.color)
self.canv.roundRect(0, 0, self.width, self.height, self.radius, fill=1, stroke=0)
class SectionHeader(Flowable):
def __init__(self, text, width, bg_color, text_color=WHITE, font_size=14):
Flowable.__init__(self)
self.text = text
self.width = width
self.height = 36
self.bg_color = bg_color
self.text_color = text_color
self.font_size = font_size
def draw(self):
c = self.canv
c.setFillColor(self.bg_color)
c.roundRect(0, 0, self.width, self.height, 8, fill=1, stroke=0)
c.setFillColor(self.text_color)
c.setFont("Helvetica-Bold", self.font_size)
c.drawString(12, 10, self.text)
class RemedyCard(Flowable):
def __init__(self, name, latin, key_symptoms, potency, organs, width=240):
Flowable.__init__(self)
self.name = name
self.latin = latin
self.key_symptoms = key_symptoms
self.potency = potency
self.organs = organs
self.width = width
self.height = 140
def draw(self):
c = self.canv
# Card background
c.setFillColor(SECTION_BG)
c.roundRect(0, 0, self.width, self.height, 10, fill=1, stroke=0)
# Top accent strip
c.setFillColor(MED_GREEN)
c.roundRect(0, self.height - 30, self.width, 30, 10, fill=1, stroke=0)
c.setFillColor(MED_GREEN)
c.rect(0, self.height - 30, self.width, 15, fill=1, stroke=0)
# Name
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 11)
c.drawString(10, self.height - 20, self.name)
# Latin name
c.setFont("Helvetica-Oblique", 8)
c.setFillColor(LIGHT_GREEN)
c.drawString(10, self.height - 33, self.latin)
# Organs
c.setFont("Helvetica-Bold", 8)
c.setFillColor(ACCENT_GOLD)
c.drawString(10, self.height - 50, f"Organs: {self.organs}")
# Potency
c.setFont("Helvetica-Bold", 8)
c.setFillColor(TEAL)
c.drawString(10, self.height - 65, f"Potency: {self.potency}")
# Symptoms
c.setFont("Helvetica", 7.5)
c.setFillColor(TEXT_DARK)
y = self.height - 82
for sym in self.key_symptoms[:4]:
c.drawString(14, y, f"• {sym}")
y -= 13
# ─── STYLES ───────────────────────────────────────────────────────────────────
def make_styles():
s = {}
base = getSampleStyleSheet()
s['title'] = ParagraphStyle(
'title', fontName='Helvetica-Bold', fontSize=28,
textColor=WHITE, alignment=TA_CENTER, spaceAfter=4, leading=34
)
s['subtitle'] = ParagraphStyle(
'subtitle', fontName='Helvetica-Oblique', fontSize=13,
textColor=LIGHT_GREEN, alignment=TA_CENTER, spaceAfter=2
)
s['h1'] = ParagraphStyle(
'h1', fontName='Helvetica-Bold', fontSize=16,
textColor=DEEP_GREEN, spaceBefore=14, spaceAfter=6
)
s['h2'] = ParagraphStyle(
'h2', fontName='Helvetica-Bold', fontSize=13,
textColor=MED_GREEN, spaceBefore=10, spaceAfter=4
)
s['h3'] = ParagraphStyle(
'h3', fontName='Helvetica-Bold', fontSize=11,
textColor=TEAL, spaceBefore=8, spaceAfter=3
)
s['body'] = ParagraphStyle(
'body', fontName='Helvetica', fontSize=9.5,
textColor=TEXT_GREY, leading=14, spaceAfter=6, alignment=TA_JUSTIFY
)
s['body_small'] = ParagraphStyle(
'body_small', fontName='Helvetica', fontSize=8.5,
textColor=TEXT_GREY, leading=12, spaceAfter=4, alignment=TA_JUSTIFY
)
s['caption'] = ParagraphStyle(
'caption', fontName='Helvetica-Oblique', fontSize=8,
textColor=TEXT_GREY, alignment=TA_CENTER, spaceAfter=6
)
s['bullet'] = ParagraphStyle(
'bullet', fontName='Helvetica', fontSize=9,
textColor=TEXT_DARK, leading=13, leftIndent=12, spaceAfter=3,
bulletIndent=0
)
s['warn'] = ParagraphStyle(
'warn', fontName='Helvetica-Bold', fontSize=9,
textColor=WARN_RED, leading=13, spaceAfter=4, alignment=TA_CENTER
)
s['gold_note'] = ParagraphStyle(
'gold_note', fontName='Helvetica-BoldOblique', fontSize=9,
textColor=DEEP_GREEN, leading=13, spaceAfter=4
)
s['toc'] = ParagraphStyle(
'toc', fontName='Helvetica', fontSize=10,
textColor=TEXT_DARK, leading=16, spaceAfter=2
)
s['img_title'] = ParagraphStyle(
'img_title', fontName='Helvetica-Bold', fontSize=10,
textColor=DEEP_GREEN, alignment=TA_CENTER, spaceAfter=2
)
return s
# ─── CANVAS CALLBACKS ─────────────────────────────────────────────────────────
def cover_canvas(c, doc):
"""Draw the cover page background."""
c.saveState()
# Deep green gradient-like background
c.setFillColor(DEEP_GREEN)
c.rect(0, 0, W, H, fill=1, stroke=0)
# Decorative circles
c.setFillColor(colors.HexColor("#2E7D32"))
c.circle(W - 80, H - 80, 120, fill=1, stroke=0)
c.setFillColor(colors.HexColor("#1B5E20"))
c.circle(80, 80, 90, fill=1, stroke=0)
c.setFillColor(colors.HexColor("#33691E"))
c.circle(W // 2, H // 2, 200, fill=1, stroke=0)
# Top accent bar
c.setFillColor(ACCENT_GOLD)
c.rect(0, H - 8, W, 8, fill=1, stroke=0)
c.setFillColor(ACCENT_GOLD)
c.rect(0, 0, W, 8, fill=1, stroke=0)
c.restoreState()
def page_header_footer(c, doc):
"""Draw header and footer on content pages."""
c.saveState()
# Header bar
c.setFillColor(DEEP_GREEN)
c.rect(0, H - 28, W, 28, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 9)
c.drawString(20, H - 18, "HOMEOPATHIC HEPATOBILIARY GUIDE")
c.setFont("Helvetica", 8)
c.drawRightString(W - 20, H - 18, "Liver | Thorax | Gallbladder | Bile Ducts")
# Footer bar
c.setFillColor(LIGHT_GREEN)
c.rect(0, 0, W, 20, fill=1, stroke=0)
c.setFillColor(DEEP_GREEN)
c.setFont("Helvetica", 7.5)
c.drawString(20, 6, "For educational purposes only. Always consult a qualified practitioner.")
c.drawRightString(W - 20, 6, f"Page {doc.page}")
c.restoreState()
# ─── HELPER ───────────────────────────────────────────────────────────────────
def img(path, w=None, h=None, caption=None, styles=None):
"""Return [Image, Caption Paragraph] or just [Image]."""
items = []
if os.path.exists(path):
if w and h:
im = Image(path, width=w, height=h)
elif w:
im = Image(path, width=w)
elif h:
im = Image(path, height=h)
else:
im = Image(path)
im.hAlign = 'CENTER'
items.append(im)
if caption and styles:
items.append(Paragraph(caption, styles['caption']))
return items
def colored_box(content_para, bg=SECTION_BG, border=MED_GREEN, padding=8):
"""Wrap a paragraph in a colored table cell."""
t = Table([[content_para]], colWidths=[W - 80])
t.setStyle(TableStyle([
('BACKGROUND', (0, 0), (-1, -1), bg),
('ROUNDEDCORNERS', [6, 6, 6, 6]),
('BOX', (0, 0), (-1, -1), 1, border),
('LEFTPADDING', (0, 0), (-1, -1), padding),
('RIGHTPADDING', (0, 0), (-1, -1), padding),
('TOPPADDING', (0, 0), (-1, -1), padding),
('BOTTOMPADDING', (0, 0), (-1, -1), padding),
]))
return t
# ─── DOCUMENT BUILD ───────────────────────────────────────────────────────────
def build_pdf():
st = make_styles()
story = []
# ── COVER PAGE ──────────────────────────────────────────────────────────
story.append(Spacer(1, 3.2*cm))
story.append(Paragraph(
"HOMEOPATHIC MEDICINE", st['title']
))
story.append(Paragraph(
"for Liver, Thorax, Gallbladder & Bile Ducts", st['title']
))
story.append(Spacer(1, 0.4*cm))
story.append(Paragraph(
"Surgical Support & Complementary Management Guide", st['subtitle']
))
story.append(Spacer(1, 0.6*cm))
story.append(HRFlowable(width=320, thickness=2, color=ACCENT_GOLD, hAlign='CENTER'))
story.append(Spacer(1, 0.5*cm))
story.append(Paragraph(
"A comprehensive evidence-informed reference for practitioners combining<br/>"
"homeopathic remedies with conventional hepatobiliary surgery",
ParagraphStyle('cv', fontName='Helvetica', fontSize=11, textColor=LIGHT_GREEN,
alignment=TA_CENTER, leading=17)
))
story.append(Spacer(1, 1.2*cm))
# Cover image table (gallstones + liver)
row = []
for fname, cap in [('gallstones_us.jpg','Gallstones on Ultrasound'),
('liver_anatomy.jpg', 'Hepatic Venous Anatomy')]:
path = os.path.join(IMG_DIR, fname)
if os.path.exists(path):
im = Image(path, width=7*cm, height=5.5*cm)
im.hAlign='CENTER'
row.append([im, Paragraph(cap, ParagraphStyle('cc', fontName='Helvetica-Oblique',
fontSize=8, textColor=LIGHT_GREEN, alignment=TA_CENTER))])
if row:
cover_img_table = Table(
[[row[0][0], row[1][0]], [row[0][1], row[1][1]]],
colWidths=[8*cm, 8*cm]
)
cover_img_table.setStyle(TableStyle([
('ALIGN', (0,0), (-1,-1), 'CENTER'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(cover_img_table)
story.append(Spacer(1, 1.5*cm))
story.append(Paragraph(
"Edition 2026 | Prepared by Orris Medical AI",
ParagraphStyle('ed', fontName='Helvetica', fontSize=9, textColor=ACCENT_GOLD,
alignment=TA_CENTER)
))
story.append(PageBreak())
# ── PAGE 2: TABLE OF CONTENTS ───────────────────────────────────────────
story.append(Spacer(1, 0.6*cm))
story.append(SectionHeader(" TABLE OF CONTENTS", W - 80, DEEP_GREEN))
story.append(Spacer(1, 0.4*cm))
toc_items = [
("1", "Anatomy of the Hepatobiliary System", "3"),
("2", "Common Diseases Requiring Surgery", "4"),
("3", "Conventional Surgical Approaches", "5"),
("4", "Homeopathic Materia Medica: Key Remedies", "6"),
("5", "Remedy-Disease Match Table", "8"),
("6", "Pre- & Post-Operative Homeopathic Support", "9"),
("7", "Thoracic Involvement: Hepatopulmonary Syndrome", "10"),
("8", "Important Safety Warnings", "10"),
]
toc_data = []
for num, title, page in toc_items:
toc_data.append([
Paragraph(f"<b>{num}.</b>", ParagraphStyle('tn', fontName='Helvetica-Bold',
fontSize=10, textColor=DEEP_GREEN)),
Paragraph(title, st['toc']),
Paragraph(f"<b>{page}</b>", ParagraphStyle('tp', fontName='Helvetica-Bold',
fontSize=10, textColor=ACCENT_GOLD, alignment=TA_CENTER))
])
toc_table = Table(toc_data, colWidths=[1.2*cm, 12.5*cm, 1.8*cm])
toc_table.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
('ROWBACKGROUNDS', (0,0), (-1,-1), [LIGHT_BG, WHITE]),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 8),
('BOX', (0,0), (-1,-1), 0.5, LIGHT_GREEN),
]))
story.append(toc_table)
story.append(PageBreak())
# ── PAGE 3: ANATOMY ──────────────────────────────────────────────────────
story.append(Spacer(1, 0.3*cm))
story.append(SectionHeader(" 1. ANATOMY OF THE HEPATOBILIARY SYSTEM", W - 80, MED_GREEN))
story.append(Spacer(1, 0.4*cm))
story.append(Paragraph("The Liver", st['h2']))
story.append(Paragraph(
"The liver is the largest solid organ (1.2–1.5 kg), occupying the right hypochondrium "
"and epigastrium. It is divided into <b>8 Couinaud segments</b> by the hepatic veins and "
"portal branches. Key functions include: bile synthesis (600–1000 mL/day), glycogen "
"storage, drug metabolism, coagulation factor production, and immune surveillance "
"via Kupffer cells.", st['body']
))
story.append(Paragraph("The Gallbladder", st['h2']))
story.append(Paragraph(
"A pear-shaped reservoir (7–10 cm long, 30–50 mL capacity) located in the gallbladder "
"fossa on the inferior liver surface. It concentrates bile 10-fold and releases it in "
"response to cholecystokinin (CCK). The <b>cystic duct</b> drains into the common bile duct "
"(CBD). The <b>Triangle of Calot</b> — bounded by the cystic duct, common hepatic duct, and "
"liver edge — is the critical surgical landmark for cholecystectomy.", st['body']
))
story.append(Paragraph("The Bile Ducts", st['h2']))
story.append(Paragraph(
"Bile flows: <b>Liver canaliculi → Right & Left hepatic ducts → Common hepatic duct "
"(CHD) → CBD → Ampulla of Vater → Duodenum</b>. The CBD is ~8 mm in diameter (normal "
"<8 mm on ultrasound; <10 mm post-cholecystectomy). Obstruction at any point causes "
"conjugated hyperbilirubinaemia and jaundice.", st['body']
))
# Anatomy images
path_liver = os.path.join(IMG_DIR, 'liver_anatomy.jpg')
path_gall = os.path.join(IMG_DIR, 'gallstones_us.jpg')
if os.path.exists(path_liver) and os.path.exists(path_gall):
im1 = Image(path_liver, width=8.5*cm, height=6*cm)
im2 = Image(path_gall, width=8.5*cm, height=6*cm)
c1 = Paragraph("Fig 1. Couinaud hepatic venous segments on ultrasound", st['caption'])
c2 = Paragraph("Fig 2. Gallstones (cholelithiasis) on abdominal ultrasound", st['caption'])
anat_table = Table(
[[im1, im2], [c1, c2]],
colWidths=[9*cm, 9*cm]
)
anat_table.setStyle(TableStyle([
('ALIGN', (0,0), (-1,-1), 'CENTER'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('TOPPADDING', (0,0), (-1,-1), 4),
]))
story.append(anat_table)
story.append(PageBreak())
# ── PAGE 4: DISEASES ─────────────────────────────────────────────────────
story.append(Spacer(1, 0.3*cm))
story.append(SectionHeader(" 2. COMMON DISEASES REQUIRING SURGERY", W - 80, TEAL))
story.append(Spacer(1, 0.4*cm))
diseases = [
("Cholelithiasis (Gallstones)", LIGHT_GREEN,
"Crystalline deposits of cholesterol, pigment, or mixed composition within the gallbladder. "
"Affects ~10–15% of adults. <b>Surgery</b> (laparoscopic cholecystectomy) is indicated for "
"symptomatic stones, acute cholecystitis, or complications."),
("Acute Cholecystitis", LIGHT_TEAL,
"Gallbladder wall inflammation, usually from cystic duct obstruction by a stone. Presents "
"with RUQ pain, fever, Murphy's sign. Treated with early laparoscopic cholecystectomy "
"within 72 hours of onset (Tokyo Guidelines 2018)."),
("Choledocholithiasis", LIGHT_GREEN,
"Stones in the common bile duct (CBD). Causes obstructive jaundice, cholangitis "
"(Charcot's triad: jaundice, fever, RUQ pain) or biliary pancreatitis. Managed by ERCP "
"with sphincterotomy, followed by cholecystectomy."),
("Bile Duct Strictures", LIGHT_TEAL,
"Narrowing of bile ducts from surgery injury (cholecystectomy), chronic pancreatitis, PSC, "
"or malignancy. Causes progressive jaundice and cholangitis. Requires surgical "
"bypass (hepaticojejunostomy) or ERCP stenting."),
("Liver Cirrhosis / Hepatocellular Carcinoma", LIGHT_GREEN,
"End-stage fibrosis from chronic hepatitis B/C, alcohol, NAFLD. Complications include "
"variceal bleeding, ascites, hepatic encephalopathy. HCC may require hepatectomy or "
"liver transplantation."),
("Gallbladder Carcinoma", LIGHT_TEAL,
"Rare but aggressive. Often incidentally found post-cholecystectomy. Surgery is the "
"only curative option — only 15–47% are resectable at diagnosis."),
]
for title, bg, text in diseases:
t = Table([
[Paragraph(f"<b>{title}</b>", ParagraphStyle('dt', fontName='Helvetica-Bold',
fontSize=10, textColor=DEEP_GREEN)),
Paragraph(text, st['body_small'])]
], colWidths=[5*cm, 11.5*cm])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), bg),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 8),
('RIGHTPADDING', (0,0), (-1,-1), 8),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('BOX', (0,0), (-1,-1), 0.5, MED_GREEN),
('LINEAFTER', (0,0), (0,-1), 1, MED_GREEN),
]))
story.append(t)
story.append(Spacer(1, 3))
# Disease images
story.append(Spacer(1, 0.3*cm))
path_cirrh = os.path.join(IMG_DIR, 'cirrhosis.jpg')
path_ct = os.path.join(IMG_DIR, 'gallstones_ct.jpg')
if os.path.exists(path_cirrh) and os.path.exists(path_ct):
im1 = Image(path_cirrh, width=8.5*cm, height=5.5*cm)
im2 = Image(path_ct, width=8.5*cm, height=5.5*cm)
c1 = Paragraph("Fig 3. Liver cirrhosis — nodular surface with esophageal varices", st['caption'])
c2 = Paragraph("Fig 4. Gallstones across imaging modalities: Ultrasound, CT, DECT", st['caption'])
dtable = Table([[im1, im2], [c1, c2]], colWidths=[9*cm, 9*cm])
dtable.setStyle(TableStyle([
('ALIGN', (0,0), (-1,-1), 'CENTER'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('TOPPADDING', (0,0), (-1,-1), 4),
]))
story.append(dtable)
story.append(PageBreak())
# ── PAGE 5: SURGERY ──────────────────────────────────────────────────────
story.append(Spacer(1, 0.3*cm))
story.append(SectionHeader(" 3. CONVENTIONAL SURGICAL APPROACHES", W - 80, MED_GREEN))
story.append(Spacer(1, 0.4*cm))
surg_data = [
["Procedure", "Indication", "Approach", "Key Points"],
["Laparoscopic\nCholecystectomy", "Symptomatic\ncholelithiasis,\nacute cholecystitis",
"4-port\nlaparoscopic", "Critical view of safety\n(CVS) in Calot's triangle;\ngold standard since 1990s"],
["Open\nCholecystectomy", "Failed lap;\ncancer suspected;\nportal hypertension",
"Right subcostal\n(Kocher) incision", "Open approach when\nlaparoscopy contraindicated;\nreduced bile duct injury risk"],
["ERCP +\nSphincter-otomy", "Choledocholithiasis;\nbile duct stricture",
"Endoscopic\n(transduodenal)", "Gold standard for CBD\nstone clearance; stenting\nfor strictures"],
["Hepaticojejun-\nostomy (Roux-en-Y)", "Bile duct\nstricture; CHD\ninjury",
"Open / laparoscopic", "Biliary-enteric bypass;\ndurable long-term\nbiliary drainage"],
["Hepatic\nResection", "HCC; liver mets;\nbile duct cancer",
"Open / robotic", "Anatomical segments;\npreserve adequate FLR\n(>20% normal liver)"],
]
surg_table = Table(surg_data, colWidths=[3.5*cm, 3.8*cm, 3.5*cm, 5.7*cm])
surg_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), DEEP_GREEN),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('FONTSIZE', (0,0), (-1,0), 9),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, SECTION_BG]),
('FONTNAME', (0,1), (-1,-1), 'Helvetica'),
('FONTSIZE', (0,1), (-1,-1), 8),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('ALIGN', (0,0), (-1,0), 'CENTER'),
('LEFTPADDING', (0,0), (-1,-1), 6),
('RIGHTPADDING', (0,0), (-1,-1), 6),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('BOX', (0,0), (-1,-1), 1, DEEP_GREEN),
('INNERGRID', (0,0), (-1,-1), 0.3, LIGHT_GREEN),
]))
story.append(surg_table)
story.append(Spacer(1, 0.4*cm))
# Surgery images
path_bd = os.path.join(IMG_DIR, 'bile_duct.jpg')
path_lc = os.path.join(IMG_DIR, 'cholecystectomy.jpg')
if os.path.exists(path_bd) and os.path.exists(path_lc):
im1 = Image(path_bd, width=8.5*cm, height=5.5*cm)
im2 = Image(path_lc, width=8.5*cm, height=5.5*cm)
c1 = Paragraph("Fig 5. Intraoperative view: dilated CBD in acute cholangitis", st['caption'])
c2 = Paragraph("Fig 6. Laparoscopic cholecystectomy — gallbladder extraction", st['caption'])
stable = Table([[im1, im2], [c1, c2]], colWidths=[9*cm, 9*cm])
stable.setStyle(TableStyle([
('ALIGN', (0,0), (-1,-1), 'CENTER'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(stable)
story.append(PageBreak())
# ── PAGES 6-7: HOMEOPATHIC REMEDIES ────────────────────────────────────
story.append(Spacer(1, 0.3*cm))
story.append(SectionHeader(" 4. HOMEOPATHIC MATERIA MEDICA: KEY REMEDIES", W - 80, DEEP_GREEN))
story.append(Spacer(1, 0.4*cm))
story.append(Paragraph(
"The following remedies are used in homeopathic practice to support liver, gallbladder, "
"bile duct, and thoracic conditions — both as standalone treatment for mild disease and "
"as <b>complementary support before and after surgery</b>. Remedy selection is always "
"individualised based on the totality of symptoms.", st['body']
))
story.append(Spacer(1, 0.3*cm))
remedies = [
{
"name": "Chelidonium Majus",
"latin": "(Greater Celandine)",
"color": MED_GREEN,
"organs": "Liver, Gallbladder, Right lung, Bile ducts",
"potency": "Q (MT), 6C, 30C, 200C",
"keynotes": [
"CHIEF remedy for liver and biliary complaints",
"Constant pain under RIGHT scapula (pathognomonic)",
"Yellow skin and eyes (jaundice), clay-coloured stools",
"Nausea worse on eating; desire for hot drinks",
"Hepatomegaly, biliary colic, cholangitis support",
"Gallstones: reduces biliary spasm and promotes bile flow",
"Thoracic: right-sided pneumonia; hepatopulmonary syndrome",
"Modalities: WORSE cold, motion; BETTER pressure, hot food",
],
"surgical_use": "Pre-op liver preparation; post-cholecystectomy syndrome; post-ERCP recovery"
},
{
"name": "Berberis Vulgaris",
"latin": "(Barberry)",
"color": TEAL,
"organs": "Liver, Gallbladder, Kidneys, Bile ducts",
"potency": "Q (MT), 3X, 6C, 30C",
"keynotes": [
"Radiating pain from gallbladder to shoulder / back",
"Biliary colic with shooting pains in all directions",
"Assists passage of small gallstones through CBD",
"Jaundice: skin, sclera yellowing with nausea",
"Chronic liver disease; fatty liver support",
"Promotes bile flow; anti-inflammatory on bile ducts",
"Often combined with Chelidonium as dual tincture",
"Modalities: WORSE motion, standing; BETTER rest",
],
"surgical_use": "Pre-ERCP stone softening; post-cholecystectomy biliary dyskinesia"
},
{
"name": "Cholesterinum",
"latin": "(Purified Cholesterol)",
"color": colors.HexColor("#4A148C"),
"organs": "Gallbladder, Bile ducts, Liver",
"potency": "3X, 6X, 30C",
"keynotes": [
"Specific for cholesterol gallstones (most common type)",
"Obstructive jaundice from stones",
"Intense RUQ tenderness with radiating pain",
"Fever with chills; Murphy's sign positive",
"Used in Psorinum therapy protocols for hepatobiliary cancer",
"Targets cholesterol supersaturation in bile",
"Often combined with Chelidonium for stone dissolution protocols",
"Modalities: WORSE fatty meals; BETTER fasting",
],
"surgical_use": "Post-cholecystectomy; cholestasis management; cancer palliation"
},
{
"name": "Carduus Marianus",
"latin": "(Milk Thistle / Silybum marianum)",
"color": colors.HexColor("#880E4F"),
"organs": "Liver (primary), Spleen, Portal circulation",
"potency": "Q (MT), 3X, 6C",
"keynotes": [
"BEST remedy for liver congestion and cirrhosis",
"Portal hypertension; oesophageal varices support",
"Jaundice: dark urine, pale stools, pruritus",
"Silymarin (active constituent) proven hepatoprotective",
"Fatty liver, NAFLD, alcoholic liver disease",
"Liver tenderness with enlarged spleen",
"Pre-/post-hepatic surgery liver function support",
"Modalities: WORSE lying on left side; pressure",
],
"surgical_use": "Liver resection preparation; cirrhosis management; hepatoprotection"
},
{
"name": "Lycopodium Clavatum",
"latin": "(Club Moss)",
"color": colors.HexColor("#E65100"),
"organs": "Liver, Gallbladder, Right side, Digestive tract",
"potency": "30C, 200C, 1M",
"keynotes": [
"RIGHT-sided complaints; 4–8 PM aggravation",
"Bloating, fullness after small meals; flatulence",
"Liver enlargement with tenderness on palpation",
"Anxiety and anticipatory fear (common pre-operatively)",
"Chronic gallbladder complaints with digestive dysfunction",
"Liver disease with kidney involvement",
"Constitutional remedy for lean, anxious, intellectual types",
"Modalities: WORSE 4–8 PM, cold; BETTER warm food",
],
"surgical_use": "Preoperative anxiety; post-op digestive recovery; hepatic support"
},
{
"name": "Nux Vomica",
"latin": "(Poison Nut)",
"color": colors.HexColor("#BF360C"),
"organs": "Liver, Stomach, Bile ducts, CNS",
"potency": "30C, 200C",
"keynotes": [
"Liver disorders from overindulgence in alcohol, rich food",
"Biliary colic: cramping, spasmodic pains",
"Nausea and retching in morning; better after vomiting",
"Hypersensitive, irritable patient type",
"Post-anaesthesia nausea and vomiting (PONV)",
"Constipation; incomplete evacuation feeling",
"Reduces drug/anaesthetic toxicity on liver",
"Modalities: WORSE morning, cold; BETTER rest, evening",
],
"surgical_use": "PONV management; post-op recovery; liver detox support"
},
{
"name": "Phosphorus",
"latin": "(Phosphorus)",
"color": colors.HexColor("#1565C0"),
"organs": "Liver, Lungs, Blood, Thorax",
"potency": "30C, 200C, 1M",
"keynotes": [
"Fatty degeneration of liver; acute liver failure",
"Haemorrhagic tendency; bleeding from surgical sites",
"Yellow atrophy; fulminant hepatitis",
"Pneumonia; pulmonary consolidation; haemoptysis",
"Hepatopulmonary syndrome: liver + lung connection",
"Craving for cold water, ice cream; vomiting after warming",
"Tall, thin, sensitive, sympathetic patient type",
"Modalities: WORSE lying on left; BETTER cold, open air",
],
"surgical_use": "Liver failure support; post-op haemorrhage risk; lung complications"
},
{
"name": "Arsenicum Album",
"latin": "(Arsenic Trioxide)",
"color": colors.HexColor("#006064"),
"organs": "Liver, GI tract, Lungs, Circulation",
"potency": "30C, 200C, 1M",
"keynotes": [
"Severe liver disease with profound prostration",
"Burning pains relieved by heat",
"Extreme anxiety; restlessness; fear of death",
"Ascites; generalised oedema in liver failure",
"Biliary cancer palliation; supportive care",
"Malabsorption; wasting; weight loss",
"Post-surgical sepsis support; Psorinum protocol",
"Modalities: WORSE midnight–2 AM; BETTER heat, company",
],
"surgical_use": "Palliative care; post-op sepsis; liver cancer supportive therapy"
},
]
# Print remedies as 2-column card layout
for i in range(0, len(remedies), 2):
row_items = remedies[i:i+2]
cells = []
for r in row_items:
# Build remedy content
header_bg = r['color']
content = []
content.append(Paragraph(f"<b>{r['name']}</b>", ParagraphStyle(
'rn', fontName='Helvetica-Bold', fontSize=11, textColor=WHITE)))
content.append(Paragraph(f"<i>{r['latin']}</i>", ParagraphStyle(
'rl', fontName='Helvetica-Oblique', fontSize=8.5, textColor=LIGHT_GREEN)))
content.append(Spacer(1, 3))
content.append(Paragraph(
f"<b>Organs:</b> {r['organs']}", ParagraphStyle(
'ro', fontName='Helvetica-Bold', fontSize=8, textColor=ACCENT_GOLD)))
content.append(Paragraph(
f"<b>Potency:</b> {r['potency']}", ParagraphStyle(
'rp', fontName='Helvetica-Bold', fontSize=8, textColor=LIGHT_TEAL)))
content.append(Spacer(1, 4))
content.append(Paragraph("<b>Key Indications:</b>", ParagraphStyle(
'rk', fontName='Helvetica-Bold', fontSize=8.5, textColor=WHITE)))
for kn in r['keynotes']:
content.append(Paragraph(f"• {kn}", ParagraphStyle(
'rb', fontName='Helvetica', fontSize=7.8, textColor=WHITE,
leading=11, leftIndent=6)))
content.append(Spacer(1, 4))
content.append(Paragraph(
f"<b>Surgical Use:</b> <i>{r['surgical_use']}</i>",
ParagraphStyle('rs', fontName='Helvetica-BoldOblique', fontSize=7.5,
textColor=ACCENT_AMBER, leading=11)
))
inner = Table([[c] for c in content], colWidths=[8.2*cm])
inner.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), header_bg),
('LEFTPADDING', (0,0), (-1,-1), 8),
('RIGHTPADDING', (0,0), (-1,-1), 8),
('TOPPADDING', (0,0), (-1,-1), 2),
('BOTTOMPADDING', (0,0), (-1,-1), 2),
]))
cells.append(inner)
if len(cells) == 2:
row_table = Table([[cells[0], cells[1]]], colWidths=[8.8*cm, 8.8*cm])
else:
row_table = Table([[cells[0]]], colWidths=[8.8*cm])
row_table.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 4),
('RIGHTPADDING', (0,0), (-1,-1), 4),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
]))
story.append(row_table)
story.append(Spacer(1, 6))
if i == 2:
story.append(PageBreak())
story.append(PageBreak())
# ── PAGE 8: REMEDY-DISEASE TABLE ─────────────────────────────────────────
story.append(Spacer(1, 0.3*cm))
story.append(SectionHeader(" 5. REMEDY–DISEASE MATCH TABLE", W - 80, TEAL))
story.append(Spacer(1, 0.4*cm))
match_data = [
["Disease / Condition", "1st Choice", "2nd Choice", "3rd Choice", "Potency"],
["Cholelithiasis\n(Gallstones)", "Chelidonium Q\n+ Berberis Q", "Cholesterinum 3X", "Lycopodium 30C", "MT twice daily\n×3 months"],
["Acute Cholecystitis", "Chelidonium 30C", "Belladonna 30C", "Apis mel 30C", "30C 4-hourly\nacutely"],
["Choledocholithiasis\n(CBD stones)", "Berberis Q", "Cholesterinum 6X", "Chelidonium 30C", "MT 3× daily"],
["Bile Duct Stricture", "Chelidonium 200C", "Lycopodium 200C", "Nux Vomica 30C", "200C weekly"],
["Liver Cirrhosis", "Carduus Mar Q", "Phosphorus 30C", "Arsenicum 30C", "MT daily"],
["Post-Cholecystectomy\nSyndrome", "Chelidonium 30C", "Berberis 30C", "Nux Vomica 30C", "30C 3× daily"],
["Obstructive Jaundice", "Chelidonium Q", "Cholesterinum 3X", "Phosphorus 30C", "MT + 3X daily"],
["Pre-operative Support", "Lycopodium 200C\n(anxiety)", "Carduus Mar Q\n(liver prep)", "Arnica 30C\n(trauma prep)", "As indicated"],
["Post-operative\nRecovery", "Arnica 30C\n(trauma)", "Nux Vomica 30C\n(PONV)", "Staphysagria 30C\n(surgical wounds)", "30C 4-hourly"],
["HCC / Bile Duct Ca\n(Palliation)", "Arsenicum 30C", "Carduus Mar Q", "Lycopodium 30C", "200C weekly\n+ MT daily"],
]
match_table = Table(match_data, colWidths=[4*cm, 3.5*cm, 3.5*cm, 3.5*cm, 3*cm])
match_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), DEEP_GREEN),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('FONTSIZE', (0,0), (-1,0), 8.5),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, SECTION_BG]),
('FONTNAME', (0,1), (-1,-1), 'Helvetica'),
('FONTSIZE', (0,1), (-1,-1), 8),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('ALIGN', (1,0), (-1,-1), 'CENTER'),
('ALIGN', (0,0), (0,-1), 'LEFT'),
('LEFTPADDING', (0,0), (-1,-1), 5),
('RIGHTPADDING', (0,0), (-1,-1), 5),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('BOX', (0,0), (-1,-1), 1, DEEP_GREEN),
('INNERGRID', (0,0), (-1,-1), 0.3, LIGHT_GREEN),
('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'),
('TEXTCOLOR', (0,1), (0,-1), TEAL),
]))
story.append(match_table)
story.append(PageBreak())
# ── PAGE 9: PRE/POST-OP ───────────────────────────────────────────────────
story.append(Spacer(1, 0.3*cm))
story.append(SectionHeader(" 6. PRE- & POST-OPERATIVE HOMEOPATHIC SUPPORT", W - 80, MED_GREEN))
story.append(Spacer(1, 0.5*cm))
story.append(Paragraph("Pre-Operative Protocol", st['h2']))
preop = [
("<b>1–4 weeks before surgery:</b>", "Carduus Marianus Q or Chelidonium Q daily to optimise liver function and bile flow."),
("<b>For patient anxiety:</b>", "Lycopodium 200C or Argentum Nitricum 30C for anticipatory fear and digestive symptoms."),
("<b>Liver preparation:</b>", "Carduus Mar Q + Phosphorus 30C if baseline LFTs are elevated."),
("<b>Night before surgery:</b>", "Arnica Montana 30C to prepare tissues for surgical trauma."),
]
for label, text in preop:
story.append(Paragraph(
f"{label} {text}",
ParagraphStyle('pp', fontName='Helvetica', fontSize=9, textColor=TEXT_DARK,
leading=13, leftIndent=10, spaceAfter=5)
))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("Post-Operative Protocol", st['h2']))
postop_data = [
["Phase", "Remedy", "Indication", "Frequency"],
["Immediate\n(0–24h)", "Arnica 30C", "Surgical trauma, bruising, swelling", "Every 2–4 hours"],
["Acute\n(1–7 days)", "Nux Vomica 30C", "PONV, anaesthesia recovery", "3–4× daily"],
["Acute\n(1–7 days)", "Staphysagria 30C", "Surgical wound healing, incision pain", "3× daily"],
["Recovery\n(1–4 weeks)", "Chelidonium 30C", "Post-cholecystectomy bile duct function", "Twice daily"],
["Recovery\n(1–4 weeks)", "Berberis 30C", "Biliary dyskinesia, residual biliary pain", "Twice daily"],
["Long-term\n(>1 month)", "Carduus Mar Q", "Liver regeneration post-resection", "Daily"],
["Long-term\n(>1 month)", "Lycopodium 30C", "Digestive recovery, flatulence, hepatic support", "Daily"],
]
postop_table = Table(postop_data, colWidths=[3.2*cm, 3.8*cm, 6.5*cm, 3.5*cm])
postop_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), TEAL),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('FONTSIZE', (0,0), (-1,0), 8.5),
('ROWBACKGROUNDS', (0,1), (-1,-1), [LIGHT_BG, WHITE]),
('FONTNAME', (0,1), (-1,-1), 'Helvetica'),
('FONTSIZE', (0,1), (-1,-1), 8),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 5),
('RIGHTPADDING', (0,0), (-1,-1), 5),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('BOX', (0,0), (-1,-1), 1, TEAL),
('INNERGRID', (0,0), (-1,-1), 0.3, LIGHT_TEAL),
]))
story.append(postop_table)
story.append(PageBreak())
# ── PAGE 10: THORAX + SAFETY ────────────────────────────────────────────
story.append(Spacer(1, 0.3*cm))
story.append(SectionHeader(" 7. THORACIC INVOLVEMENT: HEPATOPULMONARY SYNDROME", W - 80, TEAL))
story.append(Spacer(1, 0.4*cm))
story.append(Paragraph(
"Hepatopulmonary Syndrome (HPS) occurs in 5–30% of patients with cirrhosis. It is "
"defined by the triad: <b>(1) liver disease</b> (usually cirrhosis), <b>(2) intrapulmonary "
"vascular dilatation</b>, and <b>(3) impaired oxygenation</b> (PaO2 <80 mmHg or "
"AaPO2 ≥15 mmHg on room air). Symptoms include platypnoea (breathlessness worse upright, "
"better lying flat) and orthodeoxia.", st['body']
))
story.append(Paragraph("<b>Homeopathic remedies for hepato-thoracic conditions:</b>", st['h3']))
thorax_remedies = [
("Chelidonium Majus", "Right-sided pneumonia with liver involvement; hepatopulmonary syndrome; "
"right pleural effusion from hepatic cause. Pain from liver radiating to right scapula and "
"right lung base."),
("Phosphorus", "Fatty hepatitis with pulmonary consolidation; hepatopulmonary syndrome; "
"haemoptysis; tall, sensitive patient with craving for cold water."),
("Lycopodium", "Liver disease with right lower lobe pneumonia; flatulence with thoracic "
"discomfort; 4–8 PM aggravation."),
("Apis Mellifica", "Pleural effusion from hepatic/ascitic cause; oedematous swellings "
"that pit on pressure; scanty urine."),
("Bryonia Alba", "Pleurisy; pleural friction rub; patient lies on PAINFUL side; worse "
"every movement; thirst for large quantities of cold water."),
]
for rem, desc in thorax_remedies:
t = Table([[
Paragraph(f"<b>{rem}</b>", ParagraphStyle('tr', fontName='Helvetica-Bold',
fontSize=9.5, textColor=WHITE)),
Paragraph(desc, ParagraphStyle('td', fontName='Helvetica', fontSize=8.5,
textColor=TEXT_DARK, leading=12))
]], colWidths=[4.5*cm, 13*cm])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (0,0), TEAL),
('BACKGROUND', (1,0), (1,0), LIGHT_TEAL),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 7),
('RIGHTPADDING', (0,0), (-1,-1), 7),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('BOX', (0,0), (-1,-1), 0.5, TEAL),
]))
story.append(t)
story.append(Spacer(1, 3))
story.append(Spacer(1, 0.5*cm))
story.append(SectionHeader(" 8. IMPORTANT SAFETY WARNINGS", W - 80, WARN_RED))
story.append(Spacer(1, 0.4*cm))
warnings = [
("SURGICAL EMERGENCIES", "Homeopathy must NOT replace emergency surgery. Acute "
"cholecystitis, cholangitis with sepsis, bile duct obstruction, gallbladder perforation, "
"and biliary pancreatitis require IMMEDIATE conventional surgical/endoscopic management."),
("CANCER", "Gallbladder carcinoma, cholangiocarcinoma, and HCC require surgical "
"resection, chemotherapy, or targeted therapy as primary treatment. Homeopathy may "
"only be used as adjunct/palliative support after oncological consultation."),
("NO PROVEN STONE DISSOLUTION", "There is currently no high-quality randomised "
"controlled trial evidence proving homeopathic remedies dissolve gallstones. "
"A 3-month trial with ultrasound follow-up is recommended; if no measurable "
"reduction occurs, surgical referral should not be delayed."),
("DRUG INTERACTIONS", "Inform your surgeon and anaesthetist of ALL homeopathic "
"remedies being taken. Some (e.g. MT preparations with alcohol base) may interact "
"with anticoagulants or anaesthetic agents."),
("QUALIFIED PRACTITIONER", "All homeopathic prescriptions should be made by a "
"registered homeopathic physician familiar with the patient's full clinical picture, "
"investigations, and conventional management plan."),
]
for title, text in warnings:
t = Table([[
Paragraph(f"⚠ {title}", ParagraphStyle('wt', fontName='Helvetica-Bold',
fontSize=9, textColor=WARN_RED)),
Paragraph(text, ParagraphStyle('wb', fontName='Helvetica', fontSize=8.5,
textColor=TEXT_DARK, leading=12))
]], colWidths=[4.5*cm, 13*cm])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), WARN_LIGHT),
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 7),
('RIGHTPADDING', (0,0), (-1,-1), 7),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('BOX', (0,0), (-1,-1), 0.8, WARN_RED),
('LINEAFTER', (0,0), (0,-1), 1, WARN_RED),
]))
story.append(t)
story.append(Spacer(1, 4))
story.append(Spacer(1, 0.5*cm))
story.append(HRFlowable(width=W - 80, thickness=1, color=LIGHT_GREEN))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"References: Sleisenger & Fordtran's GI and Liver Disease (2020) | Fischer's Mastery of "
"Surgery 8e | Schwartz's Principles of Surgery 11e | Harrison's Internal Medicine 22e | "
"IJIRT 182465 (2024) | PMC3004411 (Psorinum Therapy) | Habilite Clinics Review (2026)",
ParagraphStyle('ref', fontName='Helvetica', fontSize=7, textColor=TEXT_GREY,
alignment=TA_CENTER, leading=11)
))
# ── BUILD ────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=2*cm,
rightMargin=2*cm,
topMargin=2.2*cm,
bottomMargin=1.8*cm,
title="Homeopathic Medicine for Liver, Thorax, Gallbladder & Bile Ducts",
author="Orris Medical AI",
subject="Hepatobiliary Homeopathy Guide 2026"
)
# Page templates: cover (no header/footer), rest with header/footer
def on_first_page(c, doc):
cover_canvas(c, doc)
def on_later_pages(c, doc):
page_header_footer(c, doc)
doc.build(story,
onFirstPage=on_first_page,
onLaterPages=on_later_pages)
print(f"PDF created: {OUTPUT}")
if __name__ == "__main__":
build_pdf()
cd /tmp/workspace/homeopathy-hepatobiliary && python3 create_pdf.py 2>&1
ls -lh /tmp/workspace/homeopathy-hepatobiliary/*.pdf
Homeopathic Hepatobiliary Surgery Guide
PDF Document · PDF
| Section | Content |
|---|---|
| Cover Page | Full-bleed dark green design with 2 medical images (gallstone ultrasound + hepatic anatomy) |
| Table of Contents | Colour-coded, 8 chapters |
| 1. Anatomy | Liver (Couinaud segments), Gallbladder, Bile ducts with 2 annotated medical images |
| 2. Diseases | 6 surgical conditions (cholelithiasis, cholecystitis, choledocholithiasis, strictures, cirrhosis, GB cancer) with pathology images |
| 3. Surgery | Full table of surgical procedures (laparoscopic cholecystectomy, ERCP, hepaticojejunostomy, hepatic resection) with intraoperative photos |
| 4. Homeopathic Remedies | 8 remedies in full-colour cards: Chelidonium, Berberis, Cholesterinum, Carduus Marianus, Lycopodium, Nux Vomica, Phosphorus, Arsenicum |
| 5. Remedy-Disease Table | 10 conditions matched to 1st/2nd/3rd remedy choice with potencies |
| 6. Pre/Post-Op Protocol | Specific remedy schedules for before and after surgery (Arnica, Nux Vomica, Staphysagria, etc.) |
| 7. Thorax / HPS | Hepatopulmonary syndrome + thoracic remedy guide (Chelidonium, Phosphorus, Bryonia, Apis) |
| 8. Safety Warnings | Red-highlighted boxes: when surgery CANNOT be replaced; cancer warnings; no proven stone dissolution disclaimer |
Important note: This guide is for educational and complementary use. Homeopathy should never delay or replace surgery for acute cholecystitis, CBD obstruction, cholangitis with sepsis, gallbladder perforation, or biliary pancreatitis. Always consult both a qualified surgeon and a registered homeopathic physician.