feat(claim-form) - combo added, hover feature,
This commit is contained in:
@@ -567,7 +567,7 @@ export function ClaimForm({
|
|||||||
form,
|
form,
|
||||||
comboId,
|
comboId,
|
||||||
patient?.dateOfBirth ?? "",
|
patient?.dateOfBirth ?? "",
|
||||||
{ replaceAll: true, lineDate: form.serviceDate }
|
{ replaceAll: false, lineDate: form.serviceDate }
|
||||||
);
|
);
|
||||||
|
|
||||||
setForm(nextForm);
|
setForm(nextForm);
|
||||||
@@ -763,47 +763,110 @@ export function ClaimForm({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-4">
|
<div className="space-y-6">
|
||||||
<div className="mb-3 text-sm font-semibold opacity-70">
|
{/* Section Title */}
|
||||||
Direct Claim Submittion Buttons
|
<div className="text-sm font-semibold text-muted-foreground">
|
||||||
|
Direct Claim Submission Buttons
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-wrap gap-1">
|
|
||||||
|
<div className="grid gap-6 md:grid-cols-2">
|
||||||
|
{/* CHILD RECALL GROUP */}
|
||||||
|
<div className="space-y-2">
|
||||||
|
<div className="text-sm font-medium opacity-80">
|
||||||
|
Child Recall
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-wrap gap-2">
|
||||||
|
{[
|
||||||
|
"childRecallDirect",
|
||||||
|
"childRecallDirect2BW",
|
||||||
|
"childRecallDirect4BW",
|
||||||
|
"childRecallDirect2PA2BW",
|
||||||
|
"childRecallDirect2PA4BW",
|
||||||
|
"childRecallDirectPANO2PA2BW",
|
||||||
|
].map((comboId) => {
|
||||||
|
const b = PROCEDURE_COMBOS[comboId];
|
||||||
|
if (!b) return null;
|
||||||
|
const codesWithTooth = b.codes.map((code, idx) => {
|
||||||
|
const tooth = b.toothNumbers?.[idx];
|
||||||
|
return tooth ? `${code} (tooth ${tooth})` : code;
|
||||||
|
});
|
||||||
|
const tooltipText = codesWithTooth.join(", ");
|
||||||
|
const labelMap: Record<string, string> = {
|
||||||
|
childRecallDirect: "Direct",
|
||||||
|
childRecallDirect2BW: "Direct 2BW",
|
||||||
|
childRecallDirect4BW: "Direct 4BW",
|
||||||
|
childRecallDirect2PA2BW: "Direct 2PA 2BW",
|
||||||
|
childRecallDirect2PA4BW: "Direct 2PA 4BW",
|
||||||
|
childRecallDirectPANO2PA2BW: "Direct PANO 2PA 2BW",
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<Tooltip key={b.id}>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
onClick={() => applyComboAndThenMH("childRecallDirect")}
|
onClick={() => applyComboAndThenMH(b.id)}
|
||||||
|
aria-label={`${b.label} — codes: ${tooltipText}`}
|
||||||
>
|
>
|
||||||
Child Recall Direct
|
{labelMap[comboId] ?? b.label}
|
||||||
</Button>
|
</Button>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="top" align="center">
|
||||||
|
<div className="text-sm max-w-xs break-words">
|
||||||
|
{tooltipText}
|
||||||
|
</div>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* ADULT RECALL GROUP */}
|
||||||
|
<div className="space-y-2">
|
||||||
|
<div className="text-sm font-medium opacity-80">
|
||||||
|
Adult Recall
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-wrap gap-2">
|
||||||
|
{[
|
||||||
|
"adultRecallDirect",
|
||||||
|
"adultRecallDirect4bw",
|
||||||
|
"adultRecallDirect4bw2pa",
|
||||||
|
"adultRecallDirectPano",
|
||||||
|
].map((comboId) => {
|
||||||
|
const b = PROCEDURE_COMBOS[comboId];
|
||||||
|
if (!b) return null;
|
||||||
|
const codesWithTooth = b.codes.map((code, idx) => {
|
||||||
|
const tooth = b.toothNumbers?.[idx];
|
||||||
|
return tooth ? `${code} (tooth ${tooth})` : code;
|
||||||
|
});
|
||||||
|
const tooltipText = codesWithTooth.join(", ");
|
||||||
|
const labelMap: Record<string, string> = {
|
||||||
|
adultRecallDirect: "Direct",
|
||||||
|
adultRecallDirect4bw: "Direct 4BW",
|
||||||
|
adultRecallDirect4bw2pa: "Direct 4BW2PA",
|
||||||
|
adultRecallDirectPano: "Direct Pano",
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<Tooltip key={b.id}>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
onClick={() => applyComboAndThenMH("adultRecallDirect")}
|
onClick={() => applyComboAndThenMH(b.id)}
|
||||||
|
aria-label={`${b.label} — codes: ${tooltipText}`}
|
||||||
>
|
>
|
||||||
Adult Recall Direct
|
{labelMap[comboId] ?? b.label}
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
variant="secondary"
|
|
||||||
onClick={() =>
|
|
||||||
applyComboAndThenMH("adultRecallDirect4bw")
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Adult Recall Direct 4BW
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
variant="secondary"
|
|
||||||
onClick={() =>
|
|
||||||
applyComboAndThenMH("adultRecallDirect4bw2pa")
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Adult Recall Direct 4BW2PA
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
variant="secondary"
|
|
||||||
onClick={() =>
|
|
||||||
applyComboAndThenMH("adultRecallDirectPano")
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Adult Recall Direct Pano
|
|
||||||
</Button>
|
</Button>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="top" align="center">
|
||||||
|
<div className="text-sm max-w-xs break-words">
|
||||||
|
{tooltipText}
|
||||||
|
</div>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -995,7 +1058,16 @@ export function ClaimForm({
|
|||||||
if (!b) {
|
if (!b) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Build a human readable string for the tooltip
|
||||||
|
const codesWithTooth = b.codes.map((code, idx) => {
|
||||||
|
const tooth = b.toothNumbers?.[idx];
|
||||||
|
return tooth ? `${code} (tooth ${tooth})` : code;
|
||||||
|
});
|
||||||
|
const tooltipText = codesWithTooth.join(", ");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<Tooltip key={b.id}>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
key={b.id}
|
key={b.id}
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
@@ -1006,7 +1078,7 @@ export function ClaimForm({
|
|||||||
b.id as any,
|
b.id as any,
|
||||||
patient?.dateOfBirth ?? "",
|
patient?.dateOfBirth ?? "",
|
||||||
{
|
{
|
||||||
replaceAll: true,
|
replaceAll: false,
|
||||||
lineDate: prev.serviceDate,
|
lineDate: prev.serviceDate,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -1016,9 +1088,18 @@ export function ClaimForm({
|
|||||||
return next;
|
return next;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
aria-label={`${b.label} — codes: ${tooltipText}`}
|
||||||
>
|
>
|
||||||
{b.label}
|
{b.label}
|
||||||
</Button>
|
</Button>
|
||||||
|
</TooltipTrigger>
|
||||||
|
|
||||||
|
<TooltipContent side="top" align="center">
|
||||||
|
<div className="text-sm max-w-xs break-words">
|
||||||
|
{tooltipText}
|
||||||
|
</div>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,6 +17,33 @@ export const PROCEDURE_COMBOS: Record<
|
|||||||
label: "Child Recall Direct(no x-ray)",
|
label: "Child Recall Direct(no x-ray)",
|
||||||
codes: ["D0120", "D1120", "D1208"],
|
codes: ["D0120", "D1120", "D1208"],
|
||||||
},
|
},
|
||||||
|
childRecallDirect2BW: {
|
||||||
|
id: "childRecallDirect2BW",
|
||||||
|
label: "Child Recall Direct 2BW",
|
||||||
|
codes: ["D0120", "D1120", "D1208", "D0272"],
|
||||||
|
},
|
||||||
|
childRecallDirect4BW: {
|
||||||
|
id: "childRecallDirect4BW",
|
||||||
|
label: "Child Recall Direct 4BW",
|
||||||
|
codes: ["D0120", "D1120", "D1208", "D0274"],
|
||||||
|
},
|
||||||
|
childRecallDirect2PA2BW: {
|
||||||
|
id: "childRecallDirect2PA2BW",
|
||||||
|
label: "Child Recall Direct 2PA 2BW",
|
||||||
|
codes: ["D0120", "D1120", "D1208", "D0220", "D0230", "D0272"],
|
||||||
|
toothNumbers: [null, null, null, "9", "24", null], // only these two need values
|
||||||
|
},
|
||||||
|
childRecallDirect2PA4BW: {
|
||||||
|
id: "childRecallDirect2PA4BW",
|
||||||
|
label: "Child Recall Direct 2PA 4BW",
|
||||||
|
codes: ["D0120", "D1120", "D1208", "D0220", "D0230", "D0274"],
|
||||||
|
toothNumbers: [null, null, null, "9", "24", null], // only these two need values
|
||||||
|
},
|
||||||
|
childRecallDirectPANO2PA2BW: {
|
||||||
|
id: "childRecallDirectPANO2PA2BW",
|
||||||
|
label: "Child Recall Direct PANO 2PA 2BW",
|
||||||
|
codes: ["D0120", "D1120", "D1208", "D0330"],
|
||||||
|
},
|
||||||
adultRecall: {
|
adultRecall: {
|
||||||
id: "adultRecall",
|
id: "adultRecall",
|
||||||
label: "Adult Recall",
|
label: "Adult Recall",
|
||||||
|
|||||||
Reference in New Issue
Block a user