routes fixed - user based fixed done
This commit is contained in:
@@ -44,6 +44,7 @@ import {
|
||||
applyComboToForm,
|
||||
getDescriptionForCode,
|
||||
} from "@/utils/procedureCombosMapping";
|
||||
import { COMBO_CATEGORIES, PROCEDURE_COMBOS } from "@/utils/procedureCombos";
|
||||
|
||||
interface ClaimFormData {
|
||||
patientId: number;
|
||||
@@ -707,32 +708,49 @@ export function ClaimForm({
|
||||
+ Add Service Line
|
||||
</Button>
|
||||
|
||||
<div className="flex gap-2 mt-10 mb-10">
|
||||
{COMBO_BUTTONS.map((b) => (
|
||||
<Button
|
||||
key={b.id}
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
setForm((prev) =>
|
||||
applyComboToForm(
|
||||
prev,
|
||||
b.id as any,
|
||||
patient?.dateOfBirth ?? "",
|
||||
{
|
||||
replaceAll: true,
|
||||
lineDate: prev.serviceDate,
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
>
|
||||
{b.label}
|
||||
</Button>
|
||||
<div className="space-y-8 mt-10 mb-10">
|
||||
{Object.entries(COMBO_CATEGORIES).map(([section, ids]) => (
|
||||
<div key={section}>
|
||||
<div className="mb-3 text-sm font-semibold opacity-70">
|
||||
{section}
|
||||
</div>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{ids.map((id) => {
|
||||
const b = PROCEDURE_COMBOS[id];
|
||||
if(!b){return}
|
||||
return (
|
||||
<Button
|
||||
key={b.id}
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
setForm((prev) =>
|
||||
applyComboToForm(
|
||||
prev,
|
||||
b.id as any,
|
||||
patient?.dateOfBirth ?? "",
|
||||
{
|
||||
replaceAll: true,
|
||||
lineDate: prev.serviceDate,
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
>
|
||||
{b.label}
|
||||
</Button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
<Button variant="success" onClick={onMapPrice}>
|
||||
Map Price
|
||||
</Button>
|
||||
|
||||
<div className="pt-4">
|
||||
<Button variant="success" onClick={onMapPrice}>
|
||||
Map Price
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/* File Upload Section */}
|
||||
|
||||
@@ -10,28 +10,186 @@ export const PROCEDURE_COMBOS: Record<
|
||||
"D1120",
|
||||
"D0272",
|
||||
"D1208",
|
||||
"D2331",
|
||||
"D0120",
|
||||
"D1120",
|
||||
"D0272",
|
||||
"D1208",
|
||||
"D2331",
|
||||
"D0120",
|
||||
"D1120",
|
||||
"D0272",
|
||||
"D1208",
|
||||
"D2331",
|
||||
],
|
||||
},
|
||||
adultProphy: {
|
||||
id: "adultProphy",
|
||||
label: "Adult Prophy",
|
||||
codes: ["D0150", "D1110", "D0274", "D1208"],
|
||||
adultRecall: {
|
||||
id: "adultRecall",
|
||||
label: "Adult Recall",
|
||||
codes: ["D0120", "D0220", "D0230", "D0274", "D1110"],
|
||||
},
|
||||
bitewingsOnly: {
|
||||
id: "bitewingsOnly",
|
||||
label: "Bitewings Only",
|
||||
codes: ["D0272"],
|
||||
newChildPatient: {
|
||||
id: "newChildPatient",
|
||||
label: "New Child Patient",
|
||||
codes: ["D0150", "D1120", "D1208"],
|
||||
},
|
||||
newAdultPatientPano: {
|
||||
id: "newAdultPatientPano",
|
||||
label: "New Adult Patient (Pano)",
|
||||
codes: ["D0150", "D0330", "D1110"],
|
||||
},
|
||||
newAdultPatientFMX: {
|
||||
id: "newAdultPatientFMX",
|
||||
label: "New Adult Patient (FMX)",
|
||||
codes: ["D0150", "D0210", "D1110"],
|
||||
},
|
||||
|
||||
//Compostie
|
||||
oneSurfCompFront: {
|
||||
id: "oneSurfCompFront",
|
||||
label: "One Surface Composite (Front)",
|
||||
codes: ["D2330"],
|
||||
},
|
||||
oneSurfCompBack: {
|
||||
id: "oneSurfCompBack",
|
||||
label: "One Surface Composite (Back)",
|
||||
codes: ["D2391"],
|
||||
},
|
||||
twoSurfCompFront: {
|
||||
id: "twoSurfCompFront",
|
||||
label: "Two Surface Composite (Front)",
|
||||
codes: ["D2331"],
|
||||
},
|
||||
twoSurfCompBack: {
|
||||
id: "twoSurfCompBack",
|
||||
label: "Two Surface Composite (Back)",
|
||||
codes: ["D2392"],
|
||||
},
|
||||
threeSurfCompFront: {
|
||||
id: "threeSurfCompFront",
|
||||
label: "Three Surface Composite (Front)",
|
||||
codes: ["D2332"],
|
||||
},
|
||||
threeSurfCompBack: {
|
||||
id: "threeSurfCompBack",
|
||||
label: "Three Surface Composite (Back)",
|
||||
codes: ["D2393"],
|
||||
},
|
||||
fourSurfCompFront: {
|
||||
id: "fourSurfCompFront",
|
||||
label: "Four Surface Composite (Front)",
|
||||
codes: ["D2335"],
|
||||
},
|
||||
fourSurfCompBack: {
|
||||
id: "fourSurfCompBack",
|
||||
label: "Four Surface Composite (Back)",
|
||||
codes: ["D2394"],
|
||||
},
|
||||
|
||||
// Dentures / Partials
|
||||
fu: {
|
||||
id: "fu",
|
||||
label: "FU",
|
||||
codes: ["D5110"],
|
||||
},
|
||||
fl: {
|
||||
id: "fl",
|
||||
label: "FL",
|
||||
codes: ["D5120"],
|
||||
},
|
||||
puResin: {
|
||||
id: "puResin",
|
||||
label: "PU (Resin)",
|
||||
codes: ["D5211"],
|
||||
},
|
||||
puCast: {
|
||||
id: "puCast",
|
||||
label: "PU (Cast)",
|
||||
codes: ["D5213"],
|
||||
},
|
||||
plResin: {
|
||||
id: "plResin",
|
||||
label: "PL (Resin)",
|
||||
codes: ["D5212"],
|
||||
},
|
||||
plCast: {
|
||||
id: "plCast",
|
||||
label: "PL (Cast)",
|
||||
codes: ["D5214"],
|
||||
},
|
||||
|
||||
// Endodontics
|
||||
rctAnterior: {
|
||||
id: "rctAnterior",
|
||||
label: "RCT Anterior",
|
||||
codes: ["D3310"],
|
||||
},
|
||||
rctPremolar: {
|
||||
id: "rctPremolar",
|
||||
label: "RCT PreM",
|
||||
codes: ["D3320"],
|
||||
},
|
||||
rctMolar: {
|
||||
id: "rctMolar",
|
||||
label: "RCT Molar",
|
||||
codes: ["D3330"],
|
||||
},
|
||||
postCore: {
|
||||
id: "postCore",
|
||||
label: "Post/Core",
|
||||
codes: ["D2954"],
|
||||
},
|
||||
|
||||
// Prostho / Perio / Oral Surgery
|
||||
crown: {
|
||||
id: "crown",
|
||||
label: "Crown",
|
||||
codes: ["D2740"],
|
||||
},
|
||||
deepCleaning: {
|
||||
id: "deepCleaning",
|
||||
label: "Deep Cleaning",
|
||||
codes: ["D4341"],
|
||||
},
|
||||
simpleExtraction: {
|
||||
id: "simpleExtraction",
|
||||
label: "Simple EXT",
|
||||
codes: ["D7140"],
|
||||
},
|
||||
surgicalExtraction: {
|
||||
id: "surgicalExtraction",
|
||||
label: "Surg EXT",
|
||||
codes: ["D7210"],
|
||||
},
|
||||
babyTeethExtraction: {
|
||||
id: "babyTeethExtraction",
|
||||
label: "Baby Teeth EXT",
|
||||
codes: ["D7111"],
|
||||
},
|
||||
// add more…
|
||||
};
|
||||
|
||||
|
||||
// Which combos appear under which heading
|
||||
export const COMBO_CATEGORIES: Record<string, (keyof typeof PROCEDURE_COMBOS)[]> = {
|
||||
"Recalls & New Patients": [
|
||||
"childRecall",
|
||||
"adultRecall",
|
||||
"newAdultPatientPano",
|
||||
"newAdultPatientFMX",
|
||||
"newChildPatient",
|
||||
],
|
||||
"Composite Fillings (Front)": [
|
||||
"oneSurfCompFront",
|
||||
"twoSurfCompFront",
|
||||
"threeSurfCompFront",
|
||||
"fourSurfCompFront",
|
||||
],
|
||||
"Composite Fillings (Back)": [
|
||||
"oneSurfCompBack",
|
||||
"twoSurfCompBack",
|
||||
"threeSurfCompBack",
|
||||
"fourSurfCompBack",
|
||||
],
|
||||
"Dentures / Partials (>21 price)": [
|
||||
"fu",
|
||||
"fl",
|
||||
"puResin",
|
||||
"puCast",
|
||||
"plResin",
|
||||
"plCast",
|
||||
],
|
||||
Endodontics: ["rctAnterior", "rctPremolar", "rctMolar", "postCore"],
|
||||
Prosthodontics: ["crown"],
|
||||
Periodontics: ["deepCleaning"],
|
||||
Extractions: ["simpleExtraction", "surgicalExtraction", "babyTeethExtraction"],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user