aibilly_backend_code/docs/context/business_logic_flows.md

36 lines
1.7 KiB
Markdown

# IamBilly Backend: Business Logic Flows
Based on the documentation at `http://34.111.248.204/`, the system consists of 9 core flows.
## Flow 1: Surgeon Records Dictation
- **Patient Search:** Surgeon searches via MRN or Name.
- **Failures:** If EMR connectivity fails, system retries (1s, 4s, 16s backoff). If still failing, cached data (<24h) is used or manual entry is required.
- **Audio Capture:** Recorded locally on mobile, encrypted with AES-256.
- **Connectivity:** Auto-uploads via TLS 1.3 when internet is available.
## Flow 2: AI Processing Pipeline (System)
- **Transcription (Whisper):** Converts audio to text using medical vocabulary.
- **Entity Extraction:** NLP extracts Diagnoses, Procedures, and Anatomy.
- **Code Mapping:** AI maps to ICD-10 and CPT codes with modifiers.
## Flow 3: Surgeon Status Check
- Surgeon monitors claim progress through a "Today's Cases" dashboard.
## Flow 4: Biller Review & Approval
- **Interface:** Side-by-side view (Transcript vs. Coded Claim).
- **Mandatory HR:** Human review is required before approval. AI-suggested fields are highlighted.
## Flow 5: Export & Revocation
- **5a (Export):** Claims are pushed to Athena or EMR via API or generated as CMS-1500 PDF.
- **5b (Revoke):** Supervisors can revoke approved status only if not yet exported.
## Flow 6: Rejection Handling
- Claims rejected by billers come back to the Biller queue with specific reasons for manual correction.
## Flow 7 & 8: Management & Administration
- **Supervisor:** Operational oversight (efficiency, accuracy).
- **Admin:** System health monitoring, audit log reviews, and MFA management.
## Flow 9: Security Safeguards
- Session timeouts (15 mins), MFA requirements, and persistent audit logs.