Skip to content

Commit

Permalink
merge conflict + PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaitasaini committed Dec 4, 2024
2 parents 7494ac0 + b98aad3 commit 50d2fed
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 12 deletions.
68 changes: 65 additions & 3 deletions services/app-api/forms/qm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,42 @@ export const qmReportTemplate: ReportTemplate = {
},
],
measureLookup: {
// TODO: wtf is default and are there any other kinds of measures?
defaultMeasures: [
{
cmit: 123,
cmit: 960,
required: true,
stratified: false,
measureTemplate: MeasureTemplateName.StandardMeasure,
measureTemplate: MeasureTemplateName["LTSS-1"],
},
{
cmit: 961,
required: true,
stratified: false,
measureTemplate: MeasureTemplateName["LTSS-2"],
},
{
cmit: 20,
required: true,
stratified: false,
measureTemplate: MeasureTemplateName["LTSS-6"],
},
{
cmit: 968,
required: true,
stratified: false,
measureTemplate: MeasureTemplateName["LTSS-7"],
},
{
cmit: 414,
required: true,
stratified: false,
measureTemplate: MeasureTemplateName["LTSS-8"],
},
{
cmit: 234,
required: false,
stratified: true,
stratified: false,
measureTemplate: MeasureTemplateName.StandardMeasure,
},
],
Expand Down Expand Up @@ -211,5 +236,42 @@ export const qmReportTemplate: ReportTemplate = {
},
],
},
[MeasureTemplateName["LTSS-1"]]: {
id: "LTSS-1",
title: "LTSS-1: Comprehensive Assessment and Update",
type: PageType.Measure,
substitutable: true,
sidebar: false,
elements: [],
},
[MeasureTemplateName["LTSS-2"]]: {
id: "LTSS-2",
title: "LTSS-2: Comprehensive Person-Centered Plan and Update",
type: PageType.Measure,
sidebar: false,
substitutable: true,
elements: [],
},
[MeasureTemplateName["LTSS-6"]]: {
id: "LTSS-6",
title: "LTSS-6: Admission to a Facility from the Community",
type: PageType.Measure,
sidebar: false,
elements: [],
},
[MeasureTemplateName["LTSS-7"]]: {
id: "LTSS-7",
title: "LTSS-7: Minimizing Facility Length of Stay",
type: PageType.Measure,
sidebar: false,
elements: [],
},
[MeasureTemplateName["LTSS-8"]]: {
id: "LTSS-8",
title: "LTSS-8: Successful Transition after Long-Term Facility Stay",
type: PageType.Measure,
sidebar: false,
elements: [],
},
},
};
6 changes: 6 additions & 0 deletions services/app-api/types/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export interface MeasureOptions {

export enum MeasureTemplateName {
StandardMeasure,
"LTSS-1",
"LTSS-2",
"LTSS-6",
"LTSS-7",
"LTSS-8",
}

export enum ReportStatus {
Expand All @@ -56,6 +61,7 @@ export interface MeasurePageTemplate extends FormPageTemplate {
required?: boolean;
stratified?: boolean;
optional?: boolean;
substitutable?: boolean;
}

export interface SectionTemplate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ export const DashboardPage = () => {
return;
}

(async () => {
setIsLoading(true);
const result = await getReportsForState(reportType, state);
setReports(result);
setIsLoading(false);
})();
reloadReports(reportType, state);
}, [reportType, state]);

const reloadReports = (reportType: string, state: string) => {
Expand Down
9 changes: 6 additions & 3 deletions services/ui-src/src/components/report/MeasureTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ export const MeasureTableElement = (props: PageElementProps) => {
<Text>CMIT# {measure.cmit}</Text>
</Td>
<Td>
<Link onClick={() => buildModal(measure.cmit)}>
Substitute measure
</Link>
{measure.substitutable ? (
<Link onClick={() => buildModal(measure.cmit)}>
Substitute measure
</Link>
) : null}
</Td>

<Td>
<Button
variant="outline"
Expand Down
1 change: 1 addition & 0 deletions services/ui-src/src/types/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export interface MeasurePageTemplate extends FormPageTemplate {
required?: boolean;
stratified?: boolean;
optional?: boolean;
substitutable?: boolean;
}

export interface StatusPageTemplate extends FormPageTemplate {
Expand Down

0 comments on commit 50d2fed

Please sign in to comment.