diff --git a/.gitignore b/.gitignore index 382ab03..ce73f42 100644 Binary files a/.gitignore and b/.gitignore differ diff --git a/_layouts/default.html b/_layouts/default.html index 2d8abf3..f178143 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -69,15 +69,6 @@ {% if page.custom_css %} {% endif %} -{% if page.url contains '/order-helper/' %} - - -{% endif %} @@ -297,113 +288,12 @@ } }); }); -{% if page.url contains '/order-helper/' %} - - - - - - - - -{% endif %} + + + + + + diff --git a/order-helper/app.js b/order-helper/app.js index 2ca2150..0eebf3b 100644 --- a/order-helper/app.js +++ b/order-helper/app.js @@ -1,716 +1,246 @@ - - diff --git a/order-helper/data/ct_rules.json b/order-helper/data/ct_rules.json deleted file mode 100644 index f88fd38..0000000 --- a/order-helper/data/ct_rules.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "schema_version": "1.0", - "generated_at": "2025-09-03T00:00:00Z", - "modalities": { - "CT": { - "regions": [ - "Head/Brain", - "Neck", - "Chest", - "Low-Dose Lung CT (Screening)", - "Abdomen", - "Pelvis", - "Abdomen/Pelvis", - "CT Urogram", - "Spine – Cervical", - "Spine – Thoracic", - "Spine – Lumbar" - ], - "contexts": [ - "Staging", - "Restaging", - "Treatment response", - "Surveillance", - "Initial evaluation", - "Acute symptoms", - "Follow-up", - "Pre-operative planning", - "Post-operative complication", - "Trauma", - "Screening", - "Infection / inflammation" - ], - "conditions": [ - "Pulmonary embolism", - "Lung nodule", - "Pneumonia complication", - "NSCLC", - "Appendicitis", - "Renal colic", - "Abdominal pain RLQ", - "Stroke/TIA", - "Head trauma" - ], - "indication_templates": [ - "CT {region}{contrast_text} – {context} for {condition}", - "CT {region} – rule out {condition}", - "CT {region}{contrast_text} – evaluate {condition}" - ], - "contrast_recommendations": [ - { "match": ["kidney stone","renal colic"], "suggest": "without_iv" }, - { "match": ["appendicitis","rlq"], "suggest": "with_iv" }, - { "match": ["pe","pulmonary embolism"], "suggest": "with_iv" }, - { "match": ["aortic","dissection","aneurysm"], "suggest": "with_iv" }, - { "match": ["liver lesion","pancreatitis"], "suggest": "with_iv" }, - { "match": ["bowel obstruction"], "suggest": "without_iv" }, - { "match": ["low-dose lung ct","screening","ldct"], "suggest": "without_iv" } - ] - } - }, - "records": [ - { - "modality": "CT", - "study_name": "CT Chest with IV contrast", - "header_coverage": "Chest", - "contexts": ["Initial evaluation","Follow-up","Staging","Restaging","Infection / inflammation"], - "keywords": ["nsclc","lung cancer","pulmonary nodule","pneumonia","mediastinum","adenocarcinoma","squamous"], - "cpt": ["71260"], - "reasons": ["CT chest with IV contrast to evaluate {condition}; assess lung parenchyma, mediastinum, and nodal disease."], - "prep": "Assess renal function if IV contrast planned; screen for contrast allergy and premedicate per protocol if needed.", - "supporting_docs": ["Referring note with clinical question","Prior chest imaging/report for comparison"], - "flags": ["Noncontrast CT may be preferred for some nodules or calcifications"] - }, - { - "modality": "CT", - "study_name": "CTA Chest (PE protocol)", - "header_coverage": "Angiography – Chest CTA (PE)", - "contexts": ["Acute symptoms","Initial evaluation"], - "keywords": ["pe","pulmonary embolism","shortness of breath","pleuritic pain","d-dimer positive"], - "cpt": ["71275"], - "reasons": ["CTA chest to evaluate for pulmonary embolism in the setting of {condition}."], - "prep": "Assess renal function; screen for contrast allergy; ensure adequate timing/bolus per PE protocol.", - "supporting_docs": ["D-dimer or risk score if available","ED/clinic note describing symptoms"], - "flags": ["PE protocol requires IV contrast; ensure appropriate heart rate control if needed"] - }, - { - "modality": "CT", - "study_name": "Low-Dose Lung CT (Screening)", - "header_coverage": "Low-Dose Lung CT (Screening)", - "contexts": ["Screening"], - "keywords": ["screen","screening","ldct","smoker","pack-year"], - "cpt": ["71271"], - "reasons": ["Low-dose CT for lung cancer screening in eligible patient; {condition}."], - "prep": "No IV contrast; follow CMS/USPSTF eligibility criteria documentation.", - "supporting_docs": ["Smoking history and pack-year calculation","Shared decision-making note"], - "flags": ["Noncontrast low-dose technique; not diagnostic CTA/contrast study"] - }, - { - "modality": "CT", - "study_name": "CT Abdomen/Pelvis with IV contrast", - "header_coverage": "Abdomen/Pelvis", - "contexts": ["Acute symptoms","Initial evaluation","Infection / inflammation"], - "keywords": ["appendicitis","rlq","diverticulitis","abscess","fever","abdominal pain"], - "cpt": ["74177"], - "reasons": ["CT abdomen/pelvis with IV contrast to evaluate {condition}; assess for appendicitis or other acute intra-abdominal pathology."], - "prep": "Assess renal function; consider oral contrast per site policy when evaluating bowel.", - "supporting_docs": ["ED/clinic note with exam findings","Prior ultrasound or labs if available"], - "flags": ["Consider oral contrast for bowel evaluation per local protocol"] - }, - { - "modality": "CT", - "study_name": "CT Abdomen/Pelvis without contrast (renal colic)", - "header_coverage": "Abdomen/Pelvis", - "contexts": ["Acute symptoms"], - "keywords": ["renal colic","kidney stone","flank pain","hematuria"], - "cpt": ["74176"], - "reasons": ["Noncontrast CT abdomen/pelvis to evaluate {condition}."], - "prep": "No IV contrast; usual hydration per comfort.", - "supporting_docs": ["Urinalysis if available","ED/clinic note describing pain pattern"], - "flags": ["Noncontrast preferred for stone detection"] - }, - { - "modality": "CT", - "study_name": "CT Head/Brain without contrast", - "header_coverage": "Head/Brain", - "contexts": ["Acute symptoms","Trauma"], - "keywords": ["stroke","tia","intracranial hemorrhage","head trauma","fall"], - "cpt": ["70450"], - "reasons": ["Noncontrast head CT to evaluate {condition} (acute neurologic symptoms/trauma)."], - "prep": "No IV contrast.", - "supporting_docs": ["Neuro/ED note describing onset/time-last-known-well or mechanism of injury"], - "flags": ["Noncontrast preferred for initial stroke/hemorrhage evaluation"] - } - ] -} -[ - { - "modality": "CT", - "region": "Chest", - "contexts": ["oncology", "pulmonary embolism", "infection"], - "keywords": ["nsclc", "lung cancer", "pulmonary nodule", "pe", "pneumonia"], - "header": "CT Chest with Contrast", - "reasons": [ - "CT chest with IV contrast to evaluate {condition}; assess lung parenchyma, mediastinum, and nodal disease." - ], - "prep_notes": [ - "Assess renal function if IV contrast is planned.", - "Screen for contrast allergy; premedicate per protocol if needed." - ], - "supporting_docs": [ - "Referring note describing symptoms and clinical question.", - "Prior chest imaging/report for comparison." - ], - "flags": [ - "Noncontrast CT may be preferred for some nodules or calcifications.", - "PE protocol differs—use dedicated CTA chest if PE suspected." - ], - "tags": ["ct-chest", "oncology-general"] - } -] diff --git a/order-helper/data/mri_rules.json b/order-helper/data/mri_rules.json deleted file mode 100644 index 898dc5f..0000000 --- a/order-helper/data/mri_rules.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "schema_version": "1.0", - "generated_at": "2025-09-03T00:00:00Z", - "modalities": { - "MRI": { - "regions": [ - "Brain", - "Head (MRA)", - "Neck (MRA)", - "Cervical spine", - "Thoracic spine", - "Lumbar spine", - "Knee", - "Shoulder" - ], - "contexts": [ - "Oncology", - "Neurology", - "Infection / inflammation", - "Acute symptoms", - "Trauma", - "Follow-up", - "Pre-operative planning", - "Post-operative complication" - ], - "conditions": [ - "Glioma", - "Metastasis", - "Seizure", - "Headache", - "Abscess", - "Encephalitis", - "Multiple sclerosis", - "TIA/Stroke", - "Cervical radiculopathy", - "Lumbar radiculopathy", - "Spinal stenosis", - "Disc herniation", - "Post-op spine", - "Osteomyelitis/discitis", - "Meniscal tear", - "ACL tear", - "Rotator cuff tear" - ], - "indication_templates": [ - "MRI {region} with and without contrast – {context} for {condition}", - "MRI {region} without contrast – {context} for {condition}", - "MRA {region} – evaluate {condition}" - ] - } - }, - "records": [ - { - "modality": "MRI", - "study_name": "MRI Brain with and without contrast", - "header_coverage": "Brain", - "contexts": ["Oncology", "Neurology", "Infection / inflammation", "Follow-up"], - "keywords": ["glioma","astrocytoma","gbm","met","mets","metastasis","brain metastases","abscess","encephalitis","tumor","cancer","headache","seizure","epilepsy"], - "cpt": ["70553"], - "reasons": ["MRI brain with and without IV contrast to evaluate {condition}; characterize parenchymal and meningeal involvement."], - "prep": "MRI safety screening (implants/devices/metal); check renal function per gadolinium policy.", - "supporting_docs": ["Neurology/oncology note with clinical question","Prior MRI/CT for comparison"], - "flags": ["Tailor protocol (tumor/epilepsy/demyelination) to clinical indication","Consider diffusion/perfusion/spectroscopy as indicated"], - "tags": ["mri-brain","oncology-general"] - }, - { - "modality": "MRI", - "study_name": "MRI Brain without contrast (stroke protocol)", - "header_coverage": "Brain", - "contexts": ["Acute symptoms","Neurology","Trauma"], - "keywords": ["stroke","tia","acute neuro deficit","weakness","aphasia","intracranial hemorrhage","head trauma"], - "cpt": ["70551"], - "reasons": ["MRI brain without contrast (including DWI) to evaluate {condition} in the acute setting."], - "prep": "MRI safety screening; no gadolinium planned.", - "supporting_docs": ["ED/neuro note with onset time or last-known-well","Prior CT/CTA reports if available"], - "flags": ["Use noncontrast MRI for acute stroke when appropriate","CT may be preferred initially per local stroke pathway"] - }, - { - "modality": "MRI", - "study_name": "MRA Head without contrast", - "header_coverage": "Head (MRA)", - "contexts": ["Neurology","Acute symptoms","Follow-up"], - "keywords": ["aneurysm","avm","vasculopathy","tia","stroke","headache"], - "cpt": ["70544"], - "reasons": ["MRA head without contrast to evaluate intracranial vasculature for {condition}."], - "prep": "MRI safety screening; no gadolinium planned.", - "supporting_docs": ["Neurology note with vascular indication","Prior neuroimaging if available"], - "flags": ["Time-of-flight MRA typically without contrast; CTA may be alternative depending on indication"] - }, - { - "modality": "MRI", - "study_name": "MRA Neck with and without contrast (carotid/vertebral)", - "header_coverage": "Neck (MRA)", - "contexts": ["Neurology","Acute symptoms","Follow-up"], - "keywords": ["carotid stenosis","vertebral stenosis","dissection","tia","stroke"], - "cpt": ["70549"], - "reasons": ["MRA neck with and without IV contrast to evaluate cervical vasculature for {condition}."], - "prep": "MRI safety screening; confirm gadolinium policy.", - "supporting_docs": ["Vascular/neuro note with indication","Duplex ultrasound/CTA reports if available"], - "flags": ["Consider CTA neck if MRA contraindicated or suboptimal"] - }, - { - "modality": "MRI", - "study_name": "MRI Cervical spine without contrast", - "header_coverage": "Cervical spine", - "contexts": ["Acute symptoms","Neurology","Follow-up"], - "keywords": ["neck pain","cervical radiculopathy","radicular pain","degenerative","disc herniation","spinal stenosis"], - "cpt": ["72141"], - "reasons": ["MRI cervical spine without contrast to evaluate {condition} (nerve root compression/stenosis/herniation)."], - "prep": "MRI safety screening.", - "supporting_docs": ["Clinic note with neuro exam and conservative therapy details","Prior radiographs if available"], - "flags": ["Without contrast is typical for initial radiculopathy evaluation"] - }, - { - "modality": "MRI", - "study_name": "MRI Cervical spine with and without contrast", - "header_coverage": "Cervical spine", - "contexts": ["Infection / inflammation","Oncology","Post-operative complication","Follow-up"], - "keywords": ["post-op","hardware","infection","osteomyelitis","discitis","tumor","mets"], - "cpt": ["72156"], - "reasons": ["MRI cervical spine with and without IV contrast to evaluate {condition} (post-operative change, tumor, or infection)."], - "prep": "MRI safety screening; check renal function per gadolinium policy.", - "supporting_docs": ["Surgical history/operative note if applicable","Prior imaging for comparison"], - "flags": ["With/without contrast is preferred for suspected infection or tumor"] - }, - { - "modality": "MRI", - "study_name": "MRI Lumbar spine without contrast", - "header_coverage": "Lumbar spine", - "contexts": ["Acute symptoms","Follow-up"], - "keywords": ["low back pain","lumbar radiculopathy","sciatica","disc herniation","spinal stenosis"], - "cpt": ["72148"], - "reasons": ["MRI lumbar spine without contrast to evaluate {condition} (disc herniation/stenosis/nerve root impingement)."], - "prep": "MRI safety screening.", - "supporting_docs": ["Clinic note with exam and trial of conservative therapy","Prior radiographs if available"], - "flags": ["Without contrast is typical for initial radiculopathy evaluation"] - }, - { - "modality": "MRI", - "study_name": "MRI Lumbar spine with and without contrast", - "header_coverage": "Lumbar spine", - "contexts": ["Infection / inflammation","Oncology","Post-operative complication","Follow-up"], - "keywords": ["post-op","hardware","infection","osteomyelitis","discitis","tumor","mets"], - "cpt": ["72158"], - "reasons": ["MRI lumbar spine with and without IV contrast to evaluate {condition} (post-operative change, tumor, or infection)."], - "prep": "MRI safety screening; check renal function per gadolinium policy.", - "supporting_docs": ["Surgical history/operative note if applicable","Prior imaging for comparison"], - "flags": ["With/without contrast is preferred for suspected infection or tumor"] - }, - { - "modality": "MRI", - "study_name": "MRI Knee without contrast", - "header_coverage": "Knee", - "contexts": ["Acute symptoms","Trauma","Follow-up"], - "keywords": ["meniscal tear","acl tear","mcl","lcl","internal derangement","pain","locking"], - "cpt": ["73721"], - "reasons": ["MRI knee without contrast to evaluate {condition} (internal derangement/ligamentous or meniscal injury)."], - "prep": "MRI safety screening.", - "supporting_docs": ["Orthopedic/clinic note with exam maneuvers","Prior radiographs if available"], - "flags": ["Arthrogram may be considered in specific scenarios (e.g., postoperative meniscus)"] - }, - { - "modality": "MRI", - "study_name": "MRI Shoulder without contrast", - "header_coverage": "Shoulder", - "contexts": ["Acute symptoms","Trauma","Follow-up"], - "keywords": ["rotator cuff tear","supraspinatus","infraspinatus","labral tear","instability","impingement"], - "cpt": ["73221"], - "reasons": ["MRI shoulder without contrast to evaluate {condition} (rotator cuff/labral pathology)."], - "prep": "MRI safety screening.", - "supporting_docs": ["Orthopedic/clinic note with exam maneuvers","Prior radiographs if available"], - "flags": ["MR arthrogram may be preferred for specific labral instability indications"] - } - ] -} -[ - { - "modality": "MRI", - "region": "Brain", - "contexts": ["oncology", "neuro", "infection", "inflammation", "seizure"], - "keywords": [ - "glioma", "astrocytoma", "gbm", "met", "mets", "metastasis", "brain metastases", - "seizure", "epilepsy", "headache", "abscess", "encephalitis", - "ms", "multiple sclerosis", "demyelination", "tumor", "cancer" - ], - "header": "MRI Brain with and without Contrast", - "reasons": [ - "MRI brain with and without IV contrast to evaluate {condition}; characterize parenchymal and meningeal involvement." - ], - "prep_notes": [ - "Screen for MRI safety (implants, devices, metal).", - "Check renal function if gadolinium is planned per protocol." - ], - "supporting_docs": [ - "Neurology/oncology note with clinical question.", - "Prior MRI/CT for comparison." - ], - "flags": [ - "Tailor protocol (tumor, epilepsy, demyelination) to clinical indication.", - "Consider diffusion, perfusion, and/or spectroscopy as indicated." - ], - "tags": ["mri-brain", "oncology-general"] - } -] - diff --git a/order-helper/data/rules.json b/order-helper/data/rules.json index f1c8284..527476f 100644 --- a/order-helper/data/rules.json +++ b/order-helper/data/rules.json @@ -1,604 +1,7 @@ { - "schema_version": "2.0", - "generated_at": "2025-09-15", - "modalities": { - "X-Ray": { - "regions": [ - "Chest", - "Abdomen (KUB)", - "Pelvis", - "Skull", - "Cervical spine", - "Thoracic spine", - "Lumbar spine", - "Scoliosis series", - "Upper extremity", - "Lower extremity", - "Shoulder", - "Elbow", - "Wrist/Hand", - "Hip", - "Knee", - "Ankle/Foot", - "Skeletal survey" - ], - "body_parts": [ - "Chest PA/LAT", - "Chest AP", - "Abdomen KUB", - "Pelvis", - "Skull", - "Cervical spine", - "Thoracic spine", - "Lumbar spine", - "Hand", - "Wrist", - "Forearm", - "Elbow", - "Humerus", - "Shoulder", - "Foot", - "Ankle", - "Tibia/Fibula", - "Knee", - "Femur", - "Hip" - ], - "contrast_options": ["None"], - "laterality": ["N/A", "Left", "Right", "Bilateral"], - "contexts": ["Acute", "Trauma", "Follow-up", "Infection", "Metastatic survey", "Pre-op", "Post-op"], - "conditions": [ - "Fracture", - "Dislocation", - "Osteoarthritis", - "Evaluation for pneumonia", - "Pleural effusion", - "Foreign body", - "Osteomyelitis", - "Metastasis", - "Scoliosis" - ], - "icd10": ["S52.509A", "M19.90", "J18.9", "J90", "T18.9XXA", "M86.9", "C79.51", "M41.20"], - "common_cpt": ["71046", "74018", "72110", "73562", "73130", "73501", "73610"], - "cpt_map": { - "Chest | Chest PA/LAT | None": ["71046"], - "Abdomen (KUB) | Abdomen KUB | None": ["74018"], - "Lumbar spine | Lumbar spine | None": ["72110"], - "Knee | Knee | None": ["73562"], - "Wrist/Hand | Hand | None": ["73130"], - "Ankle/Foot | Ankle | None": ["73610"], - "Hip | Hip | None": ["73501"] - } - }, - - "CT": { - "regions": [ - "Head/Brain", - "Sinuses", - "Maxillofacial/Facial bones", - "Temporal bones/IAC", - "Neck", - "Chest", - "Low-dose Lung (Screening)", - "Abdomen", - "Pelvis", - "Abdomen/Pelvis", - "CT Urogram", - "CT Enterography", - "Spine - Cervical", - "Spine - Thoracic", - "Spine - Lumbar", - "Upper extremity", - "Lower extremity", - "Cardiac Coronary CTA", - "Angio - Head/Neck CTA", - "Angio - Chest CTA (PE)", - "Angio - Aorta CTA", - "Angio - Runoff CTA (LE)" - ], - "body_parts": [ - "Brain", - "Sinuses", - "Facial bones", - "Temporal bones/IAC", - "Neck soft tissues", - "Thorax", - "Lungs (screening)", - "Abdomen", - "Pelvis", - "Abdomen and pelvis", - "Kidneys/ureters/bladder", - "Small bowel", - "Cervical spine", - "Thoracic spine", - "Lumbar spine", - "Upper extremity", - "Lower extremity", - "Coronary arteries", - "Head/Neck arteries", - "Pulmonary arteries", - "Aorta", - "Lower extremity arteries" - ], - "contrast_options": ["None", "With contrast", "Without contrast", "With and without"], - "laterality": ["N/A", "Left", "Right", "Bilateral"], - "contexts": [ - "Initial evaluation", - "Acute", - "Follow-up", - "Pre-op planning", - "Post-op complication", - "Oncology staging", - "Oncology restaging", - "Surveillance", - "Trauma", - "Infection/inflammation", - "Screening" - ], - "conditions": [ - "Thunderclap headache", - "Head trauma", - "Stroke/TIA", - "Sinusitis", - "Neck mass", - "Pulmonary embolism", - "Aortic dissection", - "Lung nodule", - "Pneumonia complication", - "RLQ pain/appendicitis", - "Renal colic", - "Pancreatitis", - "Liver lesion", - "Diverticulitis", - "IBD flare", - "Bowel obstruction", - "Post-op abdomen", - "Hematuria", - "Cancer staging (specify)", - "Metastatic disease restaging", - "Spine trauma", - "Radiculopathy", - "Spinal stenosis", - "Extremity fracture", - "Suspected osteomyelitis", - "Peripheral arterial disease" - ], - "icd10": [ - "I63.9", - "S06.9X9A", - "J01.90", - "R22.1", - "I26.99", - "I71.00", - "R91.1", - "J18.9", - "R10.31", - "N20.0", - "K85.90", - "K76.9", - "K57.30", - "K50.90", - "K56.60", - "Z98.890", - "R31.9", - "C80.1", - "M54.16", - "M48.061", - "T14.90XA", - "M86.9", - "I70.209" - ], - "common_cpt": [ - "70450", - "70486", - "70487", - "70480", - "70481", - "70482", - "70491", - "71250", - "71260", - "71275", - "71271", - "74176", - "74177", - "74178", - "72125", - "72128", - "72131", - "73700", - "73200", - "75574", - "70496", - "70498", - "75635", - "73706", - "74160", - "72193" - ], - "cpt_map": { - "Head/Brain | Brain | Without contrast": ["70450"], - "Sinuses | Sinuses | With contrast": ["70487"], - "Sinuses | Sinuses | Without contrast": ["70486"], - "Maxillofacial/Facial bones | Facial bones | Without contrast": ["70486"], - "Temporal bones/IAC | Temporal bones/IAC | Without contrast": ["70480"], - "Neck | Neck soft tissues | With contrast": ["70491"], - "Chest | Thorax | With contrast": ["71260"], - "Chest | Thorax | Without contrast": ["71250"], - "Low-dose Lung (Screening) | Lungs (screening) | Without contrast": ["71271"], - "Angio - Chest CTA (PE) | Pulmonary arteries | With contrast": ["71275"], - "Abdomen | Abdomen | With contrast": ["74160"], - "Pelvis | Pelvis | With contrast": ["72193"], - "Abdomen/Pelvis | Abdomen and pelvis | With contrast": ["74177"], - "Abdomen/Pelvis | Abdomen and pelvis | Without contrast": ["74176"], - "CT Urogram | Kidneys/ureters/bladder | With and without": ["74178"], - "Spine - Cervical | Cervical spine | Without contrast": ["72125"], - "Spine - Thoracic | Thoracic spine | Without contrast": ["72128"], - "Spine - Lumbar | Lumbar spine | Without contrast": ["72131"], - "Angio - Head/Neck CTA | Head/Neck arteries | With contrast": ["70496", "70498"], - "Angio - Aorta CTA | Aorta | With contrast": ["75635"], - "Angio - Runoff CTA (LE) | Lower extremity arteries | With contrast": ["73706"] - } - }, - - "MRI": { - "regions": [ - "Brain", - "IAC/Temporal bone", - "Pituitary", - "Orbits", - "Cervical spine", - "Thoracic spine", - "Lumbar spine", - "Brachial plexus", - "Shoulder", - "Elbow", - "Wrist/Hand", - "Hip", - "Knee", - "Ankle/Foot", - "Liver", - "Pancreas", - "MRCP", - "Kidney", - "Pelvis", - "Prostate (PI-RADS)", - "Rectum", - "Female pelvis (uterus/ovaries)", - "Cardiac" - ], - "body_parts": [ - "Brain", - "IACs", - "Pituitary", - "Orbits", - "Cervical spine", - "Thoracic spine", - "Lumbar spine", - "Brachial plexus", - "Shoulder", - "Elbow", - "Wrist", - "Hand", - "Hip", - "Knee", - "Ankle", - "Foot", - "Liver", - "Pancreas", - "Biliary tree", - "Kidneys", - "Pelvis", - "Prostate", - "Rectum", - "Uterus/ovaries", - "Heart" - ], - "contrast_options": ["None", "With contrast", "Without contrast", "With and without"], - "laterality": ["N/A", "Left", "Right", "Bilateral"], - "contexts": ["Acute", "Problem solving", "Follow-up", "Staging", "Restaging", "Surveillance"], - "conditions": [ - "MS", - "Seizure", - "Tumor", - "Subacute stroke", - "Dementia workup", - "Acoustic neuroma", - "Optic neuritis", - "Radiculopathy", - "Spinal stenosis", - "Disc herniation", - "Meniscal tear", - "Rotator cuff tear", - "Labral tear", - "AVN hip", - "Prostate cancer", - "Rectal cancer staging", - "Adenomyosis/fibroids", - "Endometriosis", - "Focal liver lesion", - "Pancreatic mass", - "Cholestasis/MRCP", - "Renal mass", - "Cardiomyopathy" - ], - "icd10": [ - "G35", - "R56.9", - "C71.9", - "G45.9", - "F03.90", - "D33.3", - "H46.9", - "M54.16", - "M48.061", - "M51.26", - "S83.209A", - "M75.100", - "S73.199A", - "M87.052", - "C61", - "C20", - "N80.9", - "D25.9", - "K76.9", - "K86.89", - "K83.1", - "N28.89", - "I42.9" - ], - "common_cpt": [ - "70551", - "70552", - "70553", - "70543", - "70540", - "72141", - "72146", - "72148", - "73221", - "73223", - "73721", - "73723", - "72195", - "72197", - "74181", - "74183", - "72196", - "75561" - ], - "cpt_map": { - "Brain | Brain | Without contrast": ["70551"], - "Brain | Brain | With and without": ["70553"], - "IAC/Temporal bone | IACs | With and without": ["70553"], - "Pituitary | Pituitary | With and without": ["70553"], - "Orbits | Orbits | With and without": ["70543"], - "Cervical spine | Cervical spine | Without contrast": ["72141"], - "Thoracic spine | Thoracic spine | Without contrast": ["72146"], - "Lumbar spine | Lumbar spine | Without contrast": ["72148"], - "Brachial plexus | Brachial plexus | With and without": ["73223"], - "Shoulder | Shoulder | Without contrast": ["73221"], - "Knee | Knee | Without contrast": ["73721"], - "Liver | Liver | With and without": ["74183"], - "Pancreas | Pancreas | With and without": ["74183"], - "MRCP | Biliary tree | Without contrast": ["74181"], - "Kidney | Kidneys | With and without": ["74183"], - "Pelvis | Pelvis | With and without": ["72197"], - "Prostate (PI-RADS) | Prostate | With and without": ["72197"], - "Cardiac | Heart | With and without": ["75561"] - } - }, - - "PET/CT": { - "regions": ["Skull base to mid-thigh", "Whole body"], - "body_parts": ["Oncologic PET/CT", "Infection/inflammation PET/CT"], - "contrast_options": ["None"], - "laterality": ["N/A"], - "contexts": [ - "Staging", - "Restaging", - "Treatment response", - "Surveillance", - "Suspected recurrence", - "Infection" - ], - "conditions": [ - "NSCLC", - "Lymphoma", - "Colorectal cancer", - "Melanoma", - "Head & neck cancer", - "Sarcoma", - "Myeloma", - "FUO/endocarditis", - "Prosthetic joint infection" - ], - "icd10": ["C34.90", "C83.30", "C18.9", "C43.9", "C32.9", "C49.9", "C90.00", "R50.9", "I33.0", "T84.59XA"], - "common_cpt": ["78815", "78816"], - "cpt_map": { - "Skull base to mid-thigh | Oncologic PET/CT | None": ["78815"], - "Whole body | Oncologic PET/CT | None": ["78816"] - } - }, - - "PET": { - "regions": ["Brain", "Cardiac"], - "body_parts": ["Brain FDG", "Cardiac FDG viability"], - "contrast_options": ["None"], - "laterality": ["N/A"], - "contexts": ["Dementia", "Epilepsy", "Viability"], - "conditions": ["Alzheimer disease", "Frontotemporal dementia", "Seizure localization", "Ischemic cardiomyopathy"], - "icd10": ["G30.9", "G31.09", "G40.909", "I25.10"], - "common_cpt": ["78608", "78459", "78491", "78492"], - "cpt_map": { - "Brain | Brain FDG | None": ["78608"], - "Cardiac | Cardiac FDG viability | None": ["78459", "78491", "78492"] - } - }, - - "Ultrasound": { - "regions": [ - "Abdomen", - "Pelvis", - "OB", - "Small parts", - "Vascular - carotid", - "Vascular - venous LE", - "Renal", - "Aorta (AAA)" - ], - "body_parts": [ - "Abdomen complete", - "RUQ", - "Liver", - "Renal", - "Pelvis (TA+TV)", - "OB 1st trimester", - "OB 2nd/3rd trimester", - "Thyroid", - "Scrotum", - "Carotid (bilateral)", - "LE venous (bilateral)", - "Aorta (AAA)" - ], - "contrast_options": ["None"], - "laterality": ["N/A", "Left", "Right", "Bilateral"], - "contexts": ["Acute", "Screening", "Surveillance", "Follow-up"], - "conditions": [ - "RUQ pain/gallstones", - "Liver disease/abnormal LFTs", - "Hydronephrosis", - "Hematuria", - "AUB", - "Pelvic pain", - "Early pregnancy viability", - "Thyroid nodule", - "Scrotal pain", - "DVT", - "TIA/bruit", - "AAA screening" - ], - "icd10": [ - "R10.11", - "K80.20", - "K76.0", - "K74.60", - "N13.30", - "R31.9", - "N93.9", - "R10.2", - "Z32.01", - "E04.1", - "N50.89", - "I82.4Z3", - "I65.23", - "Z13.6" - ], - "common_cpt": ["76700", "76705", "76770", "76856", "76830", "76801", "76805", "76536", "76870", "93880", "93970", "76706"], - "cpt_map": { - "Abdomen | Abdomen complete | None": ["76700"], - "Abdomen | RUQ | None": ["76705"], - "Renal | Renal | None": ["76770"], - "Pelvis | Pelvis (TA+TV) | None": ["76856", "76830"], - "OB | OB 1st trimester | None": ["76801"], - "OB | OB 2nd/3rd trimester | None": ["76805"], - "Small parts | Thyroid | None": ["76536"], - "Small parts | Scrotum | None": ["76870"], - "Vascular - carotid | Carotid (bilateral) | None": ["93880"], - "Vascular - venous LE | LE venous (bilateral) | None": ["93970"], - "Aorta (AAA) | Aorta (AAA) | None": ["76706"] - } - }, - - "Mammography": { - "regions": ["Breast"], - "body_parts": ["Screening mammogram", "Diagnostic mammogram"], - "contrast_options": ["None"], - "laterality": ["N/A", "Left", "Right", "Bilateral"], - "contexts": ["Screening", "Diagnostic"], - "conditions": ["Dense breasts", "Abnormal screening", "Palpable mass", "Breast pain", "Nipple discharge"], - "icd10": ["R92.30", "R92.8", "N63.0", "N64.4", "N64.52", "Z12.31"], - "common_cpt": ["77067", "77066"], - "cpt_map": { - "Breast | Screening mammogram | None": ["77067"], - "Breast | Diagnostic mammogram | None": ["77066"] - } - }, - - "DEXA": { - "regions": ["Axial"], - "body_parts": ["Axial skeleton"], - "contrast_options": ["None"], - "laterality": ["N/A"], - "contexts": ["Screening", "Follow-up"], - "conditions": ["Osteopenia", "Osteoporosis"], - "icd10": ["M85.80", "M81.0", "Z13.820"], - "common_cpt": ["77080"], - "cpt_map": { - "Axial | Axial skeleton | None": ["77080"] - } - }, - - "Nuclear Medicine": { - "regions": ["Whole body", "Hepatobiliary", "Renal", "Thyroid", "Bone", "GI bleed"], - "body_parts": ["Bone scan (WB)", "HIDA (+/- EF)", "Renogram", "Thyroid scan", "GI bleed scan"], - "contrast_options": ["None"], - "laterality": ["N/A"], - "contexts": ["Staging", "Evaluation", "Follow-up"], - "conditions": ["Metastatic disease", "Cholecystitis", "Biliary dyskinesia", "Obstruction", "Hyperthyroidism", "Occult GI bleed"], - "icd10": ["C79.9", "K81.0", "K82.8", "N13.9", "E05.90", "K92.2"], - "common_cpt": ["78306", "78320", "78226", "78227", "78707", "78014", "78278"], - "cpt_map": { - "Whole body | Bone scan (WB) | None": ["78306", "78320"], - "Hepatobiliary | HIDA (+/- EF) | None": ["78226", "78227"], - "Renal | Renogram | None": ["78707"], - "Thyroid | Thyroid scan | None": ["78014"], - "GI bleed | GI bleed scan | None": ["78278"] - } - } - }, - - "icd10_catalog": [ - "Z01.818", - "Z12.31", - "R10.9", - "R07.9", - "R06.02", - "R05.9", - "R91.1", - "R31.9", - "C80.1", - "C34.90", - "C18.9", - "C43.9", - "C61", - "C83.30", - "C79.51", - "I26.99", - "I71.00", - "I65.23", - "I25.10", - "G35", - "G40.909", - "G30.9", - "G31.09", - "M54.16", - "M48.061", - "M86.9", - "M19.90", - "K56.60", - "K57.30", - "K85.90", - "K80.20", - "K74.60", - "K76.0", - "N13.30", - "N28.89", - "N93.9", - "N80.9", - "D25.9", - "Z13.6" - ] -} - + "schema_version": "1.1", + "generated_at": "2025-09-19", + "modalities": { + } +} \ No newline at end of file diff --git a/order-helper/index.html b/order-helper/index.html index b0edc98..16d3c83 100644 --- a/order-helper/index.html +++ b/order-helper/index.html @@ -2,23 +2,26 @@ layout: default title: OraDigit Order Helper permalink: /order-helper/ -description: Evidence-based PET/CT, CT, MRI, US, X-Ray — structured order helper with validation and PDF export. No PHI. Educational use only. +description: Evidence-based PET/CT, CT, and MRI order helper with validation and export. No PHI. Educational use only. --- - - - + + + @@ -29,200 +32,258 @@ if (!s) return; try { const url = document.querySelector('meta[name="oh-rules-path"]')?.content; - if (!url) { s.textContent = 'Missing oh-rules-path meta.'; s.className = 'oh-status error'; return; } + if (!url) { s.textContent = 'Missing oh-rules-path meta.'; s.className = 'status error'; return; } s.textContent = 'Boot check… fetching rules…'; const r = await fetch(url, { cache: 'no-store' }); - if (r.ok) { s.textContent = 'Boot check OK. Loading app…'; s.className = 'oh-status success'; } - else { s.textContent = `Rules fetch failed (${r.status}). Check path/case: ` + url; s.className = 'oh-status error'; } + if (r.ok) { s.textContent = 'Boot check OK. Loading app…'; s.className = 'status success'; } + else { s.textContent = `Rules fetch failed (${r.status}). Check path/case: ` + url; s.className = 'status error'; } } catch (e) { s.textContent = 'Rules fetch error: ' + e.message; - s.className = 'oh-status error'; + s.className = 'status error'; } }); -
-
+
+

OraDigit Order Helper

-

- Structure payer-ready imaging orders. Select modality and context; we’ll generate a professional - clinical indication, show prep/flags, and export a PDF. All client-side. No PHI. +

+ Structure clear, payer-ready imaging orders. Select modality and context; we’ll generate + a professional clinical indication and surface prep/flags. All client-side. No PHI.

-
Initializing…
- -
-
+
+ + -
-
+ -
+
- Regions, body parts, contrast, and contexts adapt to your selection. -
- - -
-
- - -
-
- - -
+ Regions, contexts, and conditions adapt to your selection.
- -
-
- - -
-
- - -
+ +
+ +
- -
-
- - - e.g., Staging, Restaging, Treatment response, Surveillance, Acute -
-
- - -
-
+ +
+ - -
-
- - - -
-
- - - -
-
+ +
- -
- - -
+ + - -
- - + Click one or more (e.g., staging, restaging, surveillance, acute, follow-up).
- -
-
- - -
-
- - -
+ +
+ + + + Start typing to see common conditions for the chosen modality.
-
- - -
+ + -
- - + +
+ +
- -
- - - - - +
+ + + +
- -
- + + + - - +<<<<<<< HEAD + + + + + - - - +======= + + diff --git a/order-helper/style.css b/order-helper/style.css index e7aafcb..5e9c0f4 100644 --- a/order-helper/style.css +++ b/order-helper/style.css @@ -1,5 +1,5 @@ /* ========================================================= - OraDigit Order Helper — Professional UI + OraDigit Order Helper G Professional UI - Namespaced styles (.oh-*) - Light/Dark themes (prefers-color-scheme) - Accessible focus, high-contrast text, large targets @@ -361,7 +361,7 @@ textarea { font: inherit; } -/* Placeholder / first disabled option (the “Select …” row) */ +/* Placeholder / first disabled option (the GǣSelect GǪGǥ row) */ select option[disabled], select option[value=""], input::placeholder, @@ -392,3 +392,182 @@ textarea:disabled { /* Status bar should never hide behind anything */ .oh-status, #status { z-index: 2; } + +/* --- appended from feat/order-helper-step5 --- */ + +/* OraDigit Order Helper G scoped styles (v2) */ +:root { + --oh-bg: #fff; + --oh-fg: #111827; + --oh-muted: #6b7280; + --oh-border: #e5e7eb; + --oh-accent: #2563eb; + --oh-accent-600: #1d4ed8; + --oh-chip-bg: #f3f4f6; + --oh-chip-active: #e0ecff; + --oh-card-bg: #ffffff; + --oh-card-shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.1); + --oh-success: #16a34a; + --oh-warn: #b45309; + --oh-error: #b91c1c; +} + +/* Page wrapper */ +.order-helper.container { + max-width: 1280px; /* wider page */ + padding-top: 1.25rem; + padding-bottom: 2.5rem; + color: var(--oh-fg); +} + +.oh-header h1 { + font-size: 1.85rem; + line-height: 1.2; + margin-bottom: .25rem; +} +.oh-header .lead { + color: var(--oh-muted); + margin-bottom: .75rem; + max-width: 70ch; +} +.status { + font-size: .95rem; + padding: .55rem .8rem; + border: 1px solid var(--oh-border); + border-radius: .5rem; + background: #f9fafb; + color: var(--oh-muted); +} +.status.success { border-color: #dcfce7; color: var(--oh-success); background:#f0fdf4; } +.status.warn { border-color: #fee2e2; color: var(--oh-warn); background:#fffbeb; } +.status.error { border-color: #fecaca; color: var(--oh-error); background:#fef2f2; } + +/* Grid layout */ +.oh-grid { + display: grid; + grid-template-columns: minmax(0, 1.25fr) minmax(320px, .9fr); /* more space */ + gap: 2rem; /* more breathing room */ + align-items: start; + margin-top: 1.25rem; +} +@media (max-width: 980px) { + .oh-grid { grid-template-columns: 1fr; } +} + +/* Cards */ +.card { + background: var(--oh-card-bg); + border: 1px solid var(--oh-border); + border-radius: .75rem; + box-shadow: var(--oh-card-shadow); + padding: 1rem; +} +.card h2 { + font-size: 1.15rem; + margin-bottom: .6rem; +} + +/* Form area */ +.oh-form .field { margin-bottom: 1.05rem; } +.oh-form label, .oh-form legend { + display: block; font-weight: 600; margin-bottom: .4rem; +} +.oh-form .hint { color: var(--oh-muted); font-size: .87rem; margin-top: .3rem; } + +.oh-form input[type="text"], +.oh-form textarea, +.oh-form select { + width: 100%; + border: 1px solid var(--oh-border); + border-radius: .6rem; + padding: .72rem .8rem; /* larger hit target */ + font-size: 1rem; /* bigger text */ + background: #fff; +} +.oh-form textarea { min-height: 132px; resize: vertical; } + +/* CT contrast */ +.oh-contrast { + border: 1px dashed var(--oh-border); + border-radius: .6rem; + padding: .7rem .8rem .35rem; + background: #fcfcfd; +} +.oh-contrast legend { font-size: .98rem; padding: 0 .25rem; } +.oh-contrast .inline { + display: inline-flex; align-items: center; gap: .45rem; + margin-right: 1rem; margin-bottom: .4rem; font-weight: 500; +} + +/* Chips */ +.oh-chips { display: flex; flex-wrap: wrap; gap: .55rem; } +.oh-chip { + appearance: none; border: 1px solid var(--oh-border); + background: var(--oh-chip-bg); padding: .5rem .7rem; + border-radius: 999px; font-size: .95rem; cursor: pointer; + transition: background .15s, border-color .15s, box-shadow .15s; +} +.oh-chip[aria-pressed="true"] { + background: var(--oh-chip-active); + border-color: var(--oh-accent); + box-shadow: 0 0 0 2px rgba(37,99,235,.15) inset; +} + +/* Actions */ +.actions { + display: flex; flex-wrap: wrap; align-items: center; + gap: .6rem .7rem; margin-top: .4rem; +} +.btn-primary, .btn-ghost, .btn, .btn-secondary, .btn-tertiary, .btn-light { + display: inline-flex; align-items: center; justify-content: center; + border-radius: .55rem; border: 1px solid transparent; + padding: .7rem .95rem; font-weight: 600; cursor: pointer; + font-size: .98rem; text-decoration: none; +} +.btn-primary { background: var(--oh-accent); color: #fff; } +.btn-primary:hover { background: var(--oh-accent-600); } +.btn-ghost { background: #fff; color: var(--oh-accent); border-color: var(--oh-accent); } +.btn-ghost:hover { background: #f0f7ff; } +.btn-secondary { background:#111827; color:#fff; } +.btn-tertiary { background:#f3f4f6; color:#111827; } +.btn-light { background:#f9fafb; color:#111827; } + +/* Right column content */ +.preview { display: grid; gap: .45rem; font-size: 1rem; } +.preview hr { border: none; border-top: 1px solid var(--oh-border); margin: .55rem 0; } +.indication-box { + background: #0b10251a; border: 1px solid var(--oh-border); + border-radius: .6rem; padding: .7rem .8rem; + white-space: pre-wrap; + font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; + font-size: .93rem; +} + +/* Suggestions list */ +.suggest-list { + list-style: none; padding-left: 0; margin: 0; display: grid; gap: .6rem; +} +.suggest-list li { + padding: .7rem .8rem; border: 1px solid var(--oh-border); + border-radius: .6rem; background: #fff; +} +.suggest-list li .muted, .muted { color: var(--oh-muted); } + +/* Results */ +#results { + border: 1px solid var(--oh-border); border-radius: .8rem; + padding: 1.05rem; background: #fff; +} +#results h2 { font-size: 1.15rem; margin-bottom: .55rem; } +.oh-label { font-weight: 600; margin: .4rem 0; display:block; } +.oh-input { width: 100%; } + +/* Utilities */ +.hidden { display: none !important; } + +/* Print */ +@media print { + .main-header, nav, .actions, .oh-chips, .status, .cookie-banner { display:none !important; } + body { color: #000; } + #results { border: none; box-shadow: none; } +}