fix: Deltains claim selectors and dedicated fee schedule
Fixes the transaction-type radio button (was matching nothing; now targets the real data-testid), and adds a Deltains fee schedule (seeded from DDMA's prices) so Deltains claims stop falling back to MassHealth pricing.
This commit is contained in:
@@ -16,6 +16,8 @@ const SCHEDULE_FILES: Record<string, string> = {
|
|||||||
UNITEDSCO: "procedureCodesUnitedDH.json",
|
UNITEDSCO: "procedureCodesUnitedDH.json",
|
||||||
UNITED_UCARD: "procedureCodesUnitedUcard.json",
|
UNITED_UCARD: "procedureCodesUnitedUcard.json",
|
||||||
UNITEDUCARD: "procedureCodesUnitedUcard.json",
|
UNITEDUCARD: "procedureCodesUnitedUcard.json",
|
||||||
|
DELTAINS: "procedureCodesDeltains.json",
|
||||||
|
DELTA_INS: "procedureCodesDeltains.json",
|
||||||
};
|
};
|
||||||
|
|
||||||
function getSchedulePath(siteKey: string): string | null {
|
function getSchedulePath(siteKey: string): string | null {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@ import rawDDMACodeTable from "@/assets/data/procedureCodesDDMA.json";
|
|||||||
import rawUnitedDHCodeTable from "@/assets/data/procedureCodesUnitedDH.json";
|
import rawUnitedDHCodeTable from "@/assets/data/procedureCodesUnitedDH.json";
|
||||||
import rawUnitedUcardCodeTable from "@/assets/data/procedureCodesUnitedUcard.json";
|
import rawUnitedUcardCodeTable from "@/assets/data/procedureCodesUnitedUcard.json";
|
||||||
import rawTuftsSCOCodeTable from "@/assets/data/procedureCodesTuftsSCO.json";
|
import rawTuftsSCOCodeTable from "@/assets/data/procedureCodesTuftsSCO.json";
|
||||||
|
import rawDeltainsCodeTable from "@/assets/data/procedureCodesDeltains.json";
|
||||||
import { PROCEDURE_COMBOS } from "./procedureCombos";
|
import { PROCEDURE_COMBOS } from "./procedureCombos";
|
||||||
|
|
||||||
/* ----------------------------- Types ----------------------------- */
|
/* ----------------------------- Types ----------------------------- */
|
||||||
@@ -23,6 +24,7 @@ const DDMA_CODE_TABLE = rawDDMACodeTable as CodeRow[];
|
|||||||
const UNITEDDH_CODE_TABLE = rawUnitedDHCodeTable as CodeRow[];
|
const UNITEDDH_CODE_TABLE = rawUnitedDHCodeTable as CodeRow[];
|
||||||
const UNITEDUCARD_CODE_TABLE = rawUnitedUcardCodeTable as CodeRow[];
|
const UNITEDUCARD_CODE_TABLE = rawUnitedUcardCodeTable as CodeRow[];
|
||||||
const TUFTSSCO_CODE_TABLE = rawTuftsSCOCodeTable as CodeRow[];
|
const TUFTSSCO_CODE_TABLE = rawTuftsSCOCodeTable as CodeRow[];
|
||||||
|
const DELTAINS_CODE_TABLE = rawDeltainsCodeTable as CodeRow[];
|
||||||
|
|
||||||
export type ClaimFormLike = {
|
export type ClaimFormLike = {
|
||||||
serviceDate: string; // form-level service date
|
serviceDate: string; // form-level service date
|
||||||
@@ -101,11 +103,21 @@ const UNITEDUCARD_CODE_MAP: Map<string, CodeRow> = (() => {
|
|||||||
return m;
|
return m;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
const DELTAINS_CODE_MAP: Map<string, CodeRow> = (() => {
|
||||||
|
const m = new Map<string, CodeRow>();
|
||||||
|
for (const r of DELTAINS_CODE_TABLE) {
|
||||||
|
const k = normalizeCode(String(r["Procedure Code"] || ""));
|
||||||
|
if (k && !m.has(k)) m.set(k, r);
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
})();
|
||||||
|
|
||||||
/** Return the correct fee-schedule map for the given insurance type. */
|
/** Return the correct fee-schedule map for the given insurance type. */
|
||||||
function getCodeMap(insuranceSiteKey?: string): Map<string, CodeRow> {
|
function getCodeMap(insuranceSiteKey?: string): Map<string, CodeRow> {
|
||||||
const k = (insuranceSiteKey ?? "").replace(/_/g, "").toLowerCase();
|
const k = (insuranceSiteKey ?? "").replace(/_/g, "").toLowerCase();
|
||||||
if (k === "cca") return CCA_CODE_MAP;
|
if (k === "cca") return CCA_CODE_MAP;
|
||||||
if (k === "ddma") return DDMA_CODE_MAP;
|
if (k === "ddma") return DDMA_CODE_MAP;
|
||||||
|
if (k === "deltains") return DELTAINS_CODE_MAP;
|
||||||
if (k === "unitedsco" || k === "uniteddh" || k === "dentalhub") return UNITEDDH_CODE_MAP;
|
if (k === "unitedsco" || k === "uniteddh" || k === "dentalhub") return UNITEDDH_CODE_MAP;
|
||||||
if (k === "uniteducard" || k === "ucard") return UNITEDUCARD_CODE_MAP;
|
if (k === "uniteducard" || k === "ucard") return UNITEDUCARD_CODE_MAP;
|
||||||
if (k === "tuftssco" || k === "tufts") return TUFTSSCO_CODE_MAP;
|
if (k === "tuftssco" || k === "tufts") return TUFTSSCO_CODE_MAP;
|
||||||
|
|||||||
@@ -437,12 +437,11 @@ class AutomationDeltaInsClaimSubmit:
|
|||||||
print("[Deltains Claim step2] Clicking 'Statement of completed services' radio...")
|
print("[Deltains Claim step2] Clicking 'Statement of completed services' radio...")
|
||||||
try:
|
try:
|
||||||
radio = WebDriverWait(self.driver, 10).until(
|
radio = WebDriverWait(self.driver, 10).until(
|
||||||
EC.element_to_be_clickable((By.XPATH,
|
EC.presence_of_element_located((By.XPATH,
|
||||||
"//input[@type='radio'][following-sibling::*[contains(text(),'Statement of completed services')]] | "
|
"//input[@data-testid='transactionRB_Claim']"))
|
||||||
"//label[contains(.,'Statement of completed services')]//input[@type='radio'] | "
|
|
||||||
"//input[@type='radio'][ancestor::*[contains(.,'Statement of completed services')]][1]"))
|
|
||||||
)
|
)
|
||||||
radio.click()
|
self.driver.execute_script("arguments[0].scrollIntoView({block:'center'});", radio)
|
||||||
|
self.driver.execute_script("arguments[0].click();", radio)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
print("[Deltains Claim step2] Selected 'Statement of completed services'")
|
print("[Deltains Claim step2] Selected 'Statement of completed services'")
|
||||||
except TimeoutException:
|
except TimeoutException:
|
||||||
|
|||||||
Reference in New Issue
Block a user