feat: chatbot CDT lookup — SRP quad, 4-digit auto-prefix, quad field to Selenium
- parseSrpCode: recognize "D4341 UL" / "4341 LR" etc., store quadrant in quad field - matchOne: auto-prefix D for 4-digit inputs like "0120" → D0120 - LLM prompt: keep SRP code and quadrant together as one procedureName entry - CdtMatch / CdtResult: add quad field, thread through matchedCodes action data - claim-form.tsx: include quad in chatbot_claim_prefill type and spread to service line - selenium_claimSubmitWorker.py: pass quad to fill_service_line, select quadrant dropdown by index (UR=1, UL=2, LL=3, LR=4) matching MassHealth form structure Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -825,6 +825,7 @@ router.post(
|
||||
insuranceSiteKey: "DDMA",
|
||||
massddmaUsername: credentials.username,
|
||||
massddmaPassword: credentials.password,
|
||||
providerName: resolvedNpiProvider?.providerName ?? "",
|
||||
},
|
||||
};
|
||||
jobId = enqueueSeleniumJob({
|
||||
|
||||
@@ -40,16 +40,20 @@ router.post("/ddma-claim", async (req: Request, res: Response): Promise<any> =>
|
||||
});
|
||||
}
|
||||
|
||||
// Fetch NPI providers to pick the target provider on the DDMA portal
|
||||
// Use provider from the claim form if set; fall back to Provider #1 (default)
|
||||
const npiProviders = await storage.getNpiProvidersByUser(req.user.id);
|
||||
const primaryProvider = npiProviders[0]; // sorted by sortOrder asc, then id asc
|
||||
const primaryProvider = npiProviders[0];
|
||||
const providerName =
|
||||
(claimData.npiProvider?.providerName as string | undefined)?.trim() ||
|
||||
primaryProvider?.providerName ||
|
||||
"";
|
||||
|
||||
const enrichedPayload = {
|
||||
claim: {
|
||||
...claimData,
|
||||
massddmaUsername: credentials.username,
|
||||
massddmaPassword: credentials.password,
|
||||
providerName: primaryProvider?.providerName ?? "",
|
||||
providerName,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user