{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "gallstone-disease",
  "title": "Gallstone disease",
  "description": "Gallstone disease on the biliary tree: where the stone lodges decides the illness, from biliary colic in the cystic duct through cholecystitis to cholangitis in the common duct and pancreatitis at the ampulla, with the bloods and imaging for each. Model licensed CC BY-SA 2.1 JP.",
  "registryDependencies": [
    "@organui/disease-viewer",
    "@organui/gallbladder"
  ],
  "files": [
    {
      "path": "registry/base-nova/gallstone-disease/gallstone-disease.tsx",
      "content": "import { diseaseModel, type Disease } from \"@/components/disease-model\"\nimport {\n  DiseaseViewer,\n  type DiseaseViewerProps,\n} from \"@/components/disease-viewer\"\nimport { gallbladderModel } from \"@/components/gallbladder\"\n\n// Gallstone disease: where the stone lodges decides the illness, from biliary\n// colic in the cystic duct to cholangitis in the common duct and pancreatitis\n// at the ampulla.\nexport const gallstoneDisease: Disease = {\n  name: \"Gallstone disease\",\n  code: \"K80\",\n  summary:\n    \"Stones form in the gallbladder from bile overloaded with cholesterol. Most never cause trouble; the illness depends on where one gets stuck.\",\n  scales: [\n    {\n      id: \"gallbladder\",\n      label: \"Biliary tree\",\n      model: gallbladderModel,\n      // From below, the gallbladder and its ducts show under the liver.\n      defaultView: \"Inferior\",\n      findings: {\n        gallbladder: {\n          affected: true,\n          description:\n            \"Holds the stones. Risk factors are female sex, age, obesity, rapid weight loss and pregnancy.\",\n        },\n        \"cystic-duct\": {\n          affected: true,\n          description:\n            \"A stone is squeezed into the duct as the gallbladder contracts after a fatty meal. Steady right upper quadrant pain lasts under six hours, until it falls back.\",\n        },\n        liver: {\n          affected: false,\n          description:\n            \"Bile still drains from the liver through the common duct, so liver tests and bilirubin stay normal.\",\n        },\n        \"common-hepatic-duct\": {\n          affected: false,\n          description:\n            \"Clear. The duct below the cystic junction (the common bile duct) is the next place a stone can lodge.\",\n        },\n        pancreas: {\n          affected: false,\n          description:\n            \"Not involved while the stone stays in the gallbladder or cystic duct.\",\n        },\n      },\n    },\n  ],\n  stages: [\n    {\n      id: \"biliary-colic\",\n      label: \"Colic\",\n      summary:\n        \"Biliary colic: pain after fatty meals that settles on its own. Elective laparoscopic cholecystectomy prevents the complications.\",\n    },\n    {\n      id: \"cholecystitis\",\n      label: \"Cholecystitis\",\n      summary:\n        \"The stone stays stuck and the trapped gallbladder becomes inflamed: constant pain, fever and Murphy's sign.\",\n      findings: {\n        gallbladder: {\n          gallbladder: {\n            affected: true,\n            description:\n              \"Distended with a thick, inflamed wall. The patient stops breathing in when the examiner presses under the right ribs (Murphy's sign).\",\n          },\n          \"cystic-duct\": {\n            affected: true,\n            description:\n              \"Blocked for hours. Without drainage the gallbladder can become gangrenous or perforate.\",\n          },\n        },\n      },\n      investigations: [\n        { name: \"White cells\", result: \"Raised\", flag: \"high\" },\n        { name: \"CRP\", result: \"Raised\", flag: \"high\" },\n        { name: \"Ultrasound\", result: \"Thick wall, fluid\", flag: \"abnormal\" },\n        { name: \"Murphy's sign\", result: \"Positive\", flag: \"abnormal\" },\n      ],\n    },\n    {\n      id: \"cholangitis\",\n      label: \"Cholangitis\",\n      summary:\n        \"A stone passes into the common bile duct and blocks it. Infected bile backs up into the liver: fever, jaundice and pain (Charcot's triad).\",\n      findings: {\n        gallbladder: {\n          \"cystic-duct\": {\n            affected: false,\n            description: \"The stone has passed through it.\",\n          },\n          \"common-hepatic-duct\": {\n            affected: true,\n            description:\n              \"The stone blocks the common duct below this one, and the ducts above dilate. ERCP removes the stone and drains the infection.\",\n          },\n          \"intrahepatic-ducts\": {\n            affected: true,\n            description:\n              \"Dilated and full of infected bile under pressure, which seeds bacteria into the blood. Untreated, cholangitis can kill within hours.\",\n          },\n          liver: {\n            affected: true,\n            description:\n              \"Bile cannot leave, so bilirubin and ALP rise and the patient turns yellow.\",\n          },\n        },\n      },\n      investigations: [\n        { name: \"Bilirubin\", result: \"Raised\", flag: \"high\" },\n        { name: \"ALP\", result: \"Raised\", flag: \"high\" },\n        { name: \"Blood cultures\", result: \"E. coli\", flag: \"abnormal\" },\n        { name: \"MRCP\", result: \"Common duct stone\", flag: \"abnormal\" },\n      ],\n    },\n    {\n      id: \"pancreatitis\",\n      label: \"Pancreatitis\",\n      summary:\n        \"A small stone lodges where the bile and pancreatic ducts open into the duodenum. Pancreatic enzymes activate inside the gland and digest it.\",\n      findings: {\n        gallbladder: {\n          \"cystic-duct\": {\n            affected: false,\n            description: \"The stone has passed through it.\",\n          },\n          \"pancreatic-duct\": {\n            affected: true,\n            description:\n              \"Blocked at the ampulla, so pancreatic juice backs up and its enzymes switch on inside the gland.\",\n          },\n          pancreas: {\n            affected: true,\n            description:\n              \"Swollen and inflamed: severe epigastric pain through to the back. Most attacks are mild; severe ones cause organ failure.\",\n          },\n          duodenum: {\n            affected: true,\n            description:\n              \"The stone sits at the ampulla of Vater in its wall. Most pass on their own; cholecystectomy in the same admission prevents another attack.\",\n          },\n        },\n      },\n      investigations: [\n        { name: \"Lipase\", result: \"> 3× upper limit\", flag: \"high\" },\n        { name: \"CRP at 48 h\", result: \"Raised\", flag: \"high\" },\n        { name: \"ALT\", result: \"Raised\", flag: \"high\" },\n        { name: \"Glasgow score\", result: \"2, mild\" },\n      ],\n    },\n  ],\n  investigations: [\n    { name: \"Ultrasound\", result: \"Gallstones\", flag: \"abnormal\" },\n    { name: \"Liver tests\", result: \"Normal\" },\n    { name: \"White cells\", result: \"Normal\" },\n    { name: \"Lipase\", result: \"Normal\" },\n  ],\n}\n\n/** The biliary tree in biliary colic, the stage the viewer opens on. */\nexport const gallstoneDiseaseModel = diseaseModel(gallstoneDisease)\n\nexport type GallstoneDiseaseProps = Omit<DiseaseViewerProps, \"disease\">\n\nexport function GallstoneDisease(props: GallstoneDiseaseProps) {\n  return <DiseaseViewer disease={gallstoneDisease} {...props} />\n}\n",
      "type": "registry:component"
    }
  ],
  "docs": "Gallstone disease docs: https://organui.com/docs/components/gallstone-disease. It reuses the gallbladder model, licensed CC BY-SA 2.1 JP (https://creativecommons.org/licenses/by-sa/2.1/jp/deed.en); keep the viewer's credit visible. Educational, not for diagnosis.",
  "categories": [
    "disease",
    "digestive"
  ],
  "type": "registry:component"
}