How goshiva/rcm-x works
This is an HCC medical-coding and insurance risk-adjustment platform, with both a document-analysis API/CLI and an authenticated, role-based chart-coding workflow. Its principal workflow extracts medical evidence from PDFs, proposes and maps diagnosis codes to HCCs, calculates RAF and premiums, and produces reports and audit records. The chart workflow adds L1 coding, L2 audit, and audited-record reporting. README capabilities are included where implementation excerpts were unavailable; those links are omitted rather than inferred.
Main entry points: app.py Analysis API · main.py Batch CLI · nlp_service.py Medical NLP · nlp_worker.py Chart NLP worker
Components 24
User entry points
- Web client
static/app.js - Batch CLI
main.py - Analysis API
app.py
Clinical analysis
- Medical NLP
backend/app/services/nlp_service.py - PDF extraction
src/ocr_module.py - Entity identification
src/nlp_identifier_v3.py - HCC prediction
src/ml_model.py - ICD mapping
src/icd_mapper.py - HCC hierarchy
src/hcc_engine.py - RAF calculation
src/risk_adjustment.py - Risk reports
src/report_generator.py
Chart operations
- Chart API
backend/app/api/charts/chart_routes.py - Workflow dashboard
backend/app/api/dashboard/dashboard_routes.py - Chart assignment
backend/app/services/chart_assignment_service.py - Chart NLP worker
backend/app/workers/nlp_worker.py - CMS model import
backend/app/api/cms/cms_routes.py
Identity and records
- Authentication API
backend/app/api/auth/auth_routes.py - Authentication service
backend/app/services/auth_service.py - Risk submissions
backend/app/services/risk_adjustment_service.py - Audit logging
backend/app/services/audit_service.py - Chart records
backend/app/repositories/chart_repository.py - Risk input store
backend/app/repositories/risk_adjustment_repository_sqlalchemy.py - User records
backend/app/repositories/user_repository.py
Other components
- Coding professionals
Connections 35
- Coding professionals → Web client: uses
- Coding professionals → Batch CLI: runs
- Web client → Analysis API: requests
- Batch CLI → PDF extraction: extracts
- Batch CLI → Entity identification: analyzes
- Batch CLI → HCC prediction: predicts
- Batch CLI → RAF calculation: calculates
- Batch CLI → Risk reports: generates
- Analysis API → PDF extraction: extracts
- Analysis API → Entity identification: analyzes
- Analysis API → HCC prediction: predicts
- Analysis API → ICD mapping: validates
- Analysis API → RAF calculation: calculates
- Analysis API → Risk reports: generates
- Chart API → Chart assignment: assigns
- Chart API → Chart records: reads/writes
- Chart API → Chart NLP worker: enqueues
- Chart NLP worker → Chart records: updates
- Chart NLP worker → Medical NLP: extracts
- Chart NLP worker → Risk submissions: saves submission
- Chart NLP worker → Audit logging: records event
- Workflow dashboard → Chart assignment: submits coding
- Workflow dashboard → Risk submissions: saves submission
- Workflow dashboard → Audit logging: records event
- Authentication API → Authentication service: authenticates
- Authentication service → User records: reads/writes
- Risk submissions → Risk input store: persists
- CMS model import → Risk submissions: provides model data
- Medical NLP → PDF extraction: extracts
- Medical NLP → Entity identification: identifies entities
- Medical NLP → ICD mapping: maps codes
- Medical NLP → HCC hierarchy: suggests HCCs
- Medical NLP → HCC prediction: predicts codes
- Analysis API → HCC hierarchy: serves reference
- Analysis API → ICD mapping: searches reference