@openinsure/loss-runs package handles the full lifecycle: requesting loss runs from prior carriers, extracting data from PDF and CSV formats, analyzing trends, and flagging risks.
Loss Run Lifecycle
Requesting Loss Runs
Loss run requests are sent via the submission workflow when a submission is received:Extraction
The@openinsure/loss-runs package includes both a structured CSV extractor and an AI-powered PDF extractor.
CSV extraction
PDF extraction (AI)
PDF loss runs are rendered to images and processed by the AI extraction bridge:Loss Analysis
Once extracted, theanalyzeLossRun() function produces a 5-year summary:
Risk Flags
The analyzer automatically generates flags based on the loss history:| Flag | Severity | Trigger |
|---|---|---|
HIGH_LOSS_RATIO | Critical | 5-year loss ratio > 70% |
DETERIORATING_TREND | Warning | Loss ratio increased ≥ 15 points in last 2 years |
OPEN_CLAIMS | Warning | ≥ 2 open claims at time of submission |
CATASTROPHIC_LOSS | Critical | Single claim > 50% of annual premium |
FREQUENCY | Warning | > 3 claims per year (small commercial) |
RAPID_RESERVE_DEVELOPMENT | Warning | Open reserves grew > 40% since last loss run |
CARRIER_NONRENEWAL | Info | Current carrier did not offer renewal |
Loss Run Generator
For policyholders requesting their own loss run (to submit with a new application elsewhere), thegenerateLossRun() function produces a formatted loss run from OpenInsure’s claim records:
UW Queue Integration
Loss run analysis results automatically populate the submission’s Risk Scorecard in the Underwriting Workbench:- Loss ratio by year (bar chart)
- Trend indicator (arrow + color)
- Flag summary with drill-down to individual claim data
- Comparison to program benchmark loss ratio