Skip to content

Commit

Permalink
[HCBS] QMS - Set CMIT Number & Add QM to LTSS-5 (#80)
Browse files Browse the repository at this point in the history
Co-authored-by: Rocio De Santiago <[email protected]>
  • Loading branch information
rocio-desantiago and Rocio De Santiago authored Dec 17, 2024
1 parent a57d63b commit 180dc61
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
8 changes: 8 additions & 0 deletions services/app-api/forms/qm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,14 @@ export const qmReportTemplate: ReportTemplate = {
},
],
},
{
type: ElementType.SubHeader,
text: "Quality Measures",
},
{
type: ElementType.QualityMeasureTable,
measureDisplay: "quality",
},
],
},
} as Record<MeasureTemplateName, MeasurePageTemplate>,
Expand Down
17 changes: 7 additions & 10 deletions services/ui-src/src/components/report/MeasureTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ import { PageElementProps } from "./Elements";

export const MeasureTableElement = (props: PageElementProps) => {
const table = props.element as MeasureTableTemplate;
const {
report,
// setMeasure,
setModalComponent,
setModalOpen,
} = useStore();
const { report, setMeasure, setModalComponent, setModalOpen } = useStore();
const measures = report?.pages.filter((page) =>
isMeasureTemplate(page)
) as MeasurePageTemplate[];
Expand All @@ -50,11 +45,10 @@ export const MeasureTableElement = (props: PageElementProps) => {
const { reportType, state, reportId } = useParams();
const navigate = useNavigate();

// TO-DO: Where does cmit need to be set? Does it happen onEdit click?
const handleEditClick = (measureId: string) => {
const handleEditClick = (measureId: string, cmit: number | undefined) => {
setMeasure(cmit!);
const path = `/report/${reportType}/${state}/${reportId}/${measureId}`;
navigate(path);
// setMeasure(measure.cmit!);
};

// Build Rows
Expand All @@ -78,7 +72,10 @@ export const MeasureTableElement = (props: PageElementProps) => {

<Td>
{/* TO-DO: Fix format of measure id */}
<Button variant="outline" onClick={() => handleEditClick(measure.id)}>
<Button
variant="outline"
onClick={() => handleEditClick(measure.id, measure.cmit)}
>
Edit
</Button>
</Td>
Expand Down

0 comments on commit 180dc61

Please sign in to comment.