Commit Graph
10 Commits
Author SHA1 Message Date
Abhinav_Gupta 16f5559035 feat: update author to Abhinav Gupta, add concept matcher, track Database folder, and configure gitea 2026-10-16 12:31:02 +05:30
Abhinav Gupta 536334f9ef fix(clinical-coding): achieve 100% precision across oncology, urology, hepatology, and medicine discharge summaries
- Concept Reasoning & Match Spec:
  - Add 'ampullary_malignancy' family mapping to C24.1 and prevent morphology family prefix from colliding with Chapter 13 bone disorders
  - Add 'acute_kidney_injury' family mapping to N17.9/N17
  - Add 'cbd' -> 'common bile duct' expansion in clinical abbreviation lexicon

- Clinical Gate & Extraction:
  - Strengthen Check 00c, 00e, 00f to filter radiological measurement text, non-diagnostic fat stranding/thickening, and lab prefixes
  - Expand is_symptom_integral_to_primary under CMS Guideline I.B.4 to encompass respiratory viral illness symptoms (cough, coryza, weakness) and GI/biliary symptoms (jaundice, biliary obstruction/stricture)
  - Broaden intra-abdominal lymph node regex to support varying word orders and nodal sites across all oncology protocols
  - Add subsumption rule for biliary obstruction / CBD stricture under primary ampullary/pancreatic malignancies

- Attributes & Validation:
  - Expand ReverseAttributeChecker obstruction stems to include full inflections ('obstruction', 'obstructive', 'obstructed') preventing invalid downgrades of N13.2 to N13.30
  - Preserve document-level abstentions in CodingResult model validator and deduplication loop when raw_term is None
  - Include cpt_5digit provenance in verified procedure formatting
2026-10-15 22:27:20 +05:30
Abhinav Gupta 0a9fd5cf3f fix(oncology): resolve metastatic concept normalization, reverse attributes, and profile latency 2026-10-15 15:31:03 +05:30
Abhinav Gupta f8b8b8291d feat(matching): implement nearest relatable match fallback, organism parsing, and UI badge 2026-10-12 15:46:23 +05:30
Abhinav Gupta ecaae40bbe fix(pipeline): word-boundary site matching, historical exclusion, trauma code gate, and retrieval fallback hardening
- ranker.py: Use \b word boundaries in has_matching_site to prevent 'fibula'
  matching inside 'calcaneofibular' (fixes S93.412A beating S93.422A).
  Add traumatic S/T code gate (-0.40) for non-trauma documentation.
- classifier.py: Expanded acuity detection (sepsis, infarction, STEMI/NSTEMI).
  Added pure-symptom suppression when definitive diagnoses are available.
  Improved primary/secondary classification reasons with evidence quotes.
  Fixed organism detection to exclude sepsis from supplementary code penalty.
- clinical_extractor.py: Detect historical/resolved diagnoses and mark with
  HISTORICAL role, zero relevance, and -50 admitting score. Added section
  types (PERTINENT_NEGATIVES, ASSESSMENT, PLAN). Fix sentence splitting to
  preserve decimal numbers (e.g. 101.4F). Skip metadata section headers.
- nodes.py: Refactored retrieval to use lexical_retriever for expansion
  queries and BM25 fallback (eliminates 80k-row full scan).
- tokenizer.py: Extended CLINICAL_MORPHOLOGY with renal/kidney/nephropathy,
  injury/failure, infarction/infarct/STEMI/NSTEMI mappings.
- clinical_gate.py: Added pertinent negatives, documentation audit, and
  final coding summary to metadata patterns. Extended prescription syntax.
- reverse_attributes.py: Added coronary/artery/vessel/wall/vein to
  non-specificity words for better attribute extraction.
- pipeline.py: Extract failed node name from traceback for error reporting.
- schemas/icd.py: Added 'fallback_token_scan' and 'vector_numpy' retrieval methods.
2026-10-07 12:32:27 +05:30
Abhinav Gupta a75ec4700a feat(pipeline): complete multi-diagnosis classification, UHDDS role assignment, and robust ICD code retrieval 2026-10-07 11:02:19 +05:30
Abhinav Gupta 72d0da1c22 feat(pipeline): complete healing and hardening of clinical reasoning and matching pipeline
- Implement soft dimensional compatibility and 3-way attribute logic (SUPPORTED, CONTRADICTED, UNKNOWN)
- Replace binary hardwall rejection with nuanced compatibility scoring
- Isolate context per diagnosis to prevent cross-condition contamination (MD Sec 41)
- Generalize disease families (liver sarcoma, net, asthma, acl) and category priors
- Add regex word boundary acuity checking and laterality alignment scoring in ranker
- Fix candidate sort by sorting on unconstrained multi-factor raw score before output clamping
- Preserve zero-modification immutability of local Database_2.xlsx
- Pass 100% of full regression test suite (158/158 tests) and ruff linting
2026-10-06 14:43:16 +05:30
Abhinav Gupta 1b09529534 fix(pipeline): heal diagnosis extraction, role classification, and ICD mapping invariants
- Architecture Audit & Root Cause Analysis: Documented full 10-node runtime architecture, 8 failure root causes, and target architecture in ARCHITECTURE_AUDIT.md, ROOT_CAUSE_ANALYSIS.md, and TARGET_ARCHITECTURE.md.
- Strict Separation of Clinical Extraction and Retrieval: Clinical extraction establishes candidate entities prior to retrieval; retrieval never invents diagnoses.
- Generalized Clinical Entity Extraction: Added unstructured narrative fallback parser in ClinicalExtractor for single-sentence and unstructured discharge text; stripped structural role prefixes ('Primary:', 'Secondary:'); constrained procedural corroboration to entity-relevant keywords.
- UHDDS Role Classification & Admitting Significance: Restored section-aware scoring hierarchy prioritizing discharge diagnoses (+5.0) and admission reasons (+3.5); resolved whole-word regex monitoring checks preventing PMH leaks; added clinical admission synonyms for tie-breaking; prioritized acute conditions and definitive etiologies over non-specific symptoms.
- Subtype Specificity & Etiology Alignment: Guarded against hallucinated and unsupported etiologies (transplant, rheumatic, hypertensive) and subtypes in CandidateRanker and DeterministicValidator; expanded retrieval candidate window (top_k=25) ensuring general leaf codes (e.g. I50.9) remain in candidate pool for realignment.
- Test Suite: 100% pass rate achieved across all 125 repository unit, integration, guardrail, and end-to-end tests.
2026-10-05 10:56:32 +05:30
Abhinav Gupta d3b000cb7c feat: integrate local multi-system Database (ICD-10-CM, ICD-O, CPT), add cross-platform installers & dedicated runners 2026-10-03 10:15:18 +05:30
Abhinav Gupta 9ed0318b19 feat: initial commit of Agentic ICD-10-CM Autonomous Code Matcher with 10-node LangGraph pipeline, deterministic guardrails, and professional documentation 2026-10-02 23:40:12 +05:30