Definitions
The claims terms the operator, its detectors and Ask all run on. Each has an owner, a version, SQL and tests. Edits make a new version.Clean claim
clean_claim unit: claims no canonical variant: Ask returns all 2An open claim simple enough to pay quickly. Claims Operations and Special Investigations agree on the value limit and disagree on how much history must be clean as well.
claimsHead of Claims Operations · claims
v1
Open as of now, initial estimate at or under value_limit, no injury, not a theft, burglary, vandalism or hit-and-run, policy in force for policy_days or more at the loss, not referred to Special Investigations. This is the meaning the fast-track action uses.
latest change: First version.
- pass count_betweenobserved 2271, expected between 500.0 and 6000.0
SQL, rendered for now
SELECT c.id AS claim_id, c.claim_no, c.peril, c.initial_estimate, c.reported_at
FROM claims c JOIN policies p ON p.id = c.policy_id
WHERE c.reported_at <= TIMESTAMP 'Mon 17:00:00' AND (c.closed_at IS NULL OR c.closed_at > TIMESTAMP 'Mon 17:00:00')
AND c.initial_estimate <= 1500 AND NOT c.injury
AND c.peril NOT IN ('theft', 'burglary', 'vandalism', 'hit_and_run')
AND date_diff('day', p.first_start, CAST(c.loss_at AS DATE)) >= 30
AND (c.siu_referred_at IS NULL OR c.siu_referred_at > TIMESTAMP 'Mon 17:00:00')
ORDER BY c.id
fraudHead of Special Investigations · fraud
v1
The claims meaning, and also: no other claim on the policy in the 365 days before, the claimant's phone and bank account are the policyholder's own, and no photo on the file taken before the loss.
latest change: First version.
- pass count_betweenobserved 2089, expected between 400.0 and 6000.0
SQL, rendered for now
SELECT c.id AS claim_id, c.claim_no, c.peril, c.initial_estimate, c.reported_at
FROM claims c JOIN policies p ON p.id = c.policy_id JOIN policyholders h ON h.id = c.holder_id
WHERE c.reported_at <= TIMESTAMP 'Mon 17:00:00' AND (c.closed_at IS NULL OR c.closed_at > TIMESTAMP 'Mon 17:00:00')
AND c.initial_estimate <= 1500 AND NOT c.injury
AND c.peril NOT IN ('theft', 'burglary', 'vandalism', 'hit_and_run')
AND date_diff('day', p.first_start, CAST(c.loss_at AS DATE)) >= 30
AND (c.siu_referred_at IS NULL OR c.siu_referred_at > TIMESTAMP 'Mon 17:00:00')
AND c.claimant_phone = h.phone AND c.claimant_bank = h.bank_account
AND NOT EXISTS (SELECT 1 FROM claims o WHERE o.policy_id = c.policy_id AND o.id <> c.id
AND o.reported_at < c.reported_at AND o.reported_at >= c.reported_at - INTERVAL 365 DAY)
AND NOT EXISTS (SELECT 1 FROM documents d WHERE d.claim_id = c.id AND d.kind = 'photo'
AND d.received_at <= TIMESTAMP 'Mon 17:00:00' AND d.taken_at < c.loss_at - INTERVAL 1 DAY)
ORDER BY c.id
Parameters
change one, see what changes today, then save it as a new version with a noteHistory
append-only; nothing is edited in place- definitionHead of Claims Operations claims v1 First version.
- definitionHead of Special Investigations fraud v1 First version.