feat: select DDMA provider by NPI settings instead of always first
Pass the user's primary NPI provider name through the eligibility and claim routes so the Selenium workers click the matching option in the DDMA member-search provider dropdown (data-testid=member-search_provider_select-btn) rather than always falling back to the first entry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -67,10 +67,15 @@ router.post(
|
||||
});
|
||||
}
|
||||
|
||||
// Fetch NPI providers to pick the target provider on the DDMA portal
|
||||
const npiProviders = await storage.getNpiProvidersByUser(req.user.id);
|
||||
const primaryProvider = npiProviders[0]; // sorted by sortOrder asc, then id asc
|
||||
|
||||
const enrichedData = {
|
||||
...rawData,
|
||||
massddmaUsername: credentials.username,
|
||||
massddmaPassword: credentials.password,
|
||||
providerName: primaryProvider?.providerName ?? "",
|
||||
};
|
||||
|
||||
const socketId: string | undefined = req.body.socketId;
|
||||
|
||||
@@ -40,11 +40,16 @@ router.post("/ddma-claim", async (req: Request, res: Response): Promise<any> =>
|
||||
});
|
||||
}
|
||||
|
||||
// Fetch NPI providers to pick the target provider on the DDMA portal
|
||||
const npiProviders = await storage.getNpiProvidersByUser(req.user.id);
|
||||
const primaryProvider = npiProviders[0]; // sorted by sortOrder asc, then id asc
|
||||
|
||||
const enrichedPayload = {
|
||||
claim: {
|
||||
...claimData,
|
||||
massddmaUsername: credentials.username,
|
||||
massddmaPassword: credentials.password,
|
||||
providerName: primaryProvider?.providerName ?? "",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user