Document Capturing Agent
Agent Description:
The Document Capturing Agent streamlines the adjudication pipeline by automatically validating mandatory fields (like Patient IDs) and applying clinical keyword logic to determine the complexity of a claim. By routing "Routine" outpatient cases separately from "Complex" surgical or acute interventions, the agent ensures that high-risk claims receive the appropriate procedural scrutiny while standard claims are processed without delay.
- Purpose: This agent is designed to automate the initial intake and
categorization of medical insurance claims. It enables underwriting and claims
processing teams to rapidly extract key clinical and administrative data from
raw JSON documents, converting unstructured text into standardized, legally
formatted reports.
The agent improves claims administration efficiency by:
-
Automating the extraction of critical patient, diagnostic, and treatment data from external APIs.
-
Performing on-the-fly integrity checks to flag missing mandatory fields.
-
Categorizing claims into "ROUTINE" or "COMPLEX" based on clinical keyword analysis.
-
Dynamically routing records to specialized processing templates.
-
Generating standardized, legal-grade summary reports tailored to the complexity of the intervention.
-
- Components:
-
Document Extractor: Retrieves raw JSON data, extracts key fields, performs integrity checks, and assigns a clinical complexity tag.
-
Routing Gate: An intent recognizer that inspects the assigned claim_type tag and directs the payload to the appropriate processing node.
-
Routine Care Processor: An outpatient specialist that normalizes medication and chronic illness data into a "Chronic Management Summary."
-
Surgical & Acute Processor: A clinical specialist that maps high-intensity procedures into a detailed "Acute Surgical Intervention & Procedure Report."
-
-
External JSON medical record retrieval via API
-
Full-field data extraction (Patient ID, Diagnosis, Treatment, etc.)
-
Mandatory field integrity validation (MISSING_MANDATORY_ID flagging)
-
Clinical Keyword Categorization ("Surgery/Acute" vs. "Medication/Chronic")
-
Conditional workflow branching based on claim_type (COMPLEX vs. ROUTINE)
-
Dynamic template mapping replacing bracketed placeholders with live JSON data
-
Automated legal-grade summary report generation
-
OPENAI GPT_4O_MINI for the parent coordinator and all specialized extraction, routing, and processing sub-agents.
Note: To learn more about the LLM and to modify its behavior, refer to the Configuring LLM settings section.
Sub-Agents
1. Document Extractor
-
Role: Data Fetcher
-
Scope: Retrieve raw insurance claim data, validate integrity, and assign a clinical claim type.
-
Description: Uses requests_get to pull JSON records. Validates Patient and Claim IDs. Analyzes Diagnosis/Treatment strings (for example, flagging "Surgery" as COMPLEX and "Metformin" as ROUTINE) and enriches the JSON payload with a claim_type tag.
-
LLM Used: Default (Inherits from parent agent).
2. Routing Gate
-
Role: Intent Recognizer
-
Scope:Analyze the claim type tag to determine the complexity workflow.
-
Description: Acts as an exclusive logical switch. Inspects the claim_type variable and routes ROUTINE records to the Outpatient Specialist and COMPLEX records to the Surgical Specialist without altering the data.
-
LLM Used: Default (Inherits from parent agent).
3. Routine Care Processor
-
Role: Outpatient Specialist
-
Scope:Normalize medication and chronic illness data into a standardized format.
-
Description: Receives ROUTINE claims. Maps JSON keys to specific template placeholders to generate a "CHRONIC MANAGEMENT SUMMARY" detailing the diagnosis, prescribed regimen, and verified facility.
-
LLM Used: Default (Inherits from parent agent).
4. Surgical & Acute Processor
-
Role: Clinical Specialist
-
Scope:Map high-intensity surgical and emergency data into a complex schema.
-
Description:Receives COMPLEX claims. Generates a highly structured "ACUTE SURGICAL INTERVENTION & PROCEDURE REPORT" detailing procedural analysis, facility stay details, and clinical oversight.
-
LLM Used: Default (Inherits from parent agent).
-
Request - Get Tool: Polls the external insurance_claim_doc_capture.json endpoint for incoming medical records.
-
Ingestion & Classification: The Document Extractor pulls a batch of medical records. It sees "Nebulization" in the treatment field for Patient A and tags it COMPLEX. It sees "Losartan" for Patient B and tags it ROUTINE.
-
Path Divergence: The Routing Gate inspects the tags and splits the batch, sending Patient A down the complex path and Patient B down the routine path.
-
Template Mapping: * Patient B's data is formatted by the Routine Care Processor into a brief Chronic Management Summary.
-
Patient A's data is expanded by the Surgical & Acute Processor into a multi-section Procedural Report.
-
-
Final Output: Structured, standardized text reports ready for claims adjudicators to review.
-
"Can you give me claim format for John Doe”
-
“Can you give me claim format for Rahul Tim”