feat(frontend): add ClaimState enum + Match/Unmatched types
This commit is contained in:
@@ -312,3 +312,70 @@ export interface ParsedBatch {
|
|||||||
claimIds: string[];
|
claimIds: string[];
|
||||||
summary: BatchSummary;
|
summary: BatchSummary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Reconciliation (7-state claim model + match audit trail)
|
||||||
|
// Mirrors cyclone.db.ClaimState (Python enum) 1:1. The reconciliation page
|
||||||
|
// uses these to drive the unmatched bucket and the manual-match UI.
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
export type ClaimState =
|
||||||
|
| "submitted"
|
||||||
|
| "received"
|
||||||
|
| "paid"
|
||||||
|
| "partial"
|
||||||
|
| "denied"
|
||||||
|
| "reconciled"
|
||||||
|
| "reversed";
|
||||||
|
|
||||||
|
export const CLAIM_STATES: ClaimState[] = [
|
||||||
|
"submitted",
|
||||||
|
"received",
|
||||||
|
"paid",
|
||||||
|
"partial",
|
||||||
|
"denied",
|
||||||
|
"reconciled",
|
||||||
|
"reversed",
|
||||||
|
];
|
||||||
|
|
||||||
|
export interface Match {
|
||||||
|
id: number;
|
||||||
|
claim_id: string;
|
||||||
|
remittance_id: string;
|
||||||
|
strategy: "auto" | "manual";
|
||||||
|
matched_at: string;
|
||||||
|
prior_claim_state?: ClaimState | null;
|
||||||
|
is_reversal: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UnmatchedClaim {
|
||||||
|
id: string;
|
||||||
|
patientControlNumber: string;
|
||||||
|
serviceDate: string | null;
|
||||||
|
chargeAmount: number;
|
||||||
|
providerNpi: string | null;
|
||||||
|
payerId: string | null;
|
||||||
|
state: ClaimState;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UnmatchedRemittance {
|
||||||
|
id: string;
|
||||||
|
payerClaimControlNumber: string;
|
||||||
|
statusCode: string;
|
||||||
|
totalCharge: number;
|
||||||
|
totalPaid: number;
|
||||||
|
adjustmentAmount: number;
|
||||||
|
serviceDate: string | null;
|
||||||
|
isReversal: boolean;
|
||||||
|
batchId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UnmatchedResponse {
|
||||||
|
claims: UnmatchedClaim[];
|
||||||
|
remittances: UnmatchedRemittance[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MatchResponse {
|
||||||
|
claim: UnmatchedClaim;
|
||||||
|
match: { id: number; strategy: "auto" | "manual" };
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user