diff --git a/src/components/editMeasure/populationCriteria/PopulationCriteriaHome.test.tsx b/src/components/editMeasure/populationCriteria/PopulationCriteriaHome.test.tsx index 62a90f70..60c6182d 100644 --- a/src/components/editMeasure/populationCriteria/PopulationCriteriaHome.test.tsx +++ b/src/components/editMeasure/populationCriteria/PopulationCriteriaHome.test.tsx @@ -329,14 +329,14 @@ describe("PopulationCriteriaHome", () => { }); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"', { exact: false })); + userEvent.click(screen.getByText("SDE Ethnicity", { exact: false })); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); expect( - screen.queryByText('"SDE Ethnicity" - Include in Report Type') + screen.queryByText("SDE Ethnicity - Include in Report Type") ).not.toBeInTheDocument(); }); @@ -355,14 +355,14 @@ describe("PopulationCriteriaHome", () => { userEvent.click(screen.getByRole("button", { name: "Open" })); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); expect( - await screen.findByText('"SDE Ethnicity" - Include in Report Type') + await screen.findByText("SDE Ethnicity - Include in Report Type") ).toBeInTheDocument(); const allComboBoxes2 = screen.getAllByRole("combobox"); @@ -396,10 +396,10 @@ describe("PopulationCriteriaHome", () => { userEvent.click(screen.getByRole("button", { name: "Open" })); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); expect( @@ -422,14 +422,14 @@ describe("PopulationCriteriaHome", () => { userEvent.click(screen.getByRole("button", { name: "Open" })); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); expect( - await screen.findByText('"SDE Ethnicity" - Include in Report Type') + await screen.findByText("SDE Ethnicity - Include in Report Type") ).toBeInTheDocument(); const allComboBoxes2 = screen.getAllByRole("combobox"); diff --git a/src/components/editMeasure/populationCriteria/riskAdjustment/qdm/RiskAdjustment.test.tsx b/src/components/editMeasure/populationCriteria/riskAdjustment/qdm/RiskAdjustment.test.tsx index d596ac10..318e56ef 100644 --- a/src/components/editMeasure/populationCriteria/riskAdjustment/qdm/RiskAdjustment.test.tsx +++ b/src/components/editMeasure/populationCriteria/riskAdjustment/qdm/RiskAdjustment.test.tsx @@ -24,8 +24,11 @@ const serviceConfig: ServiceConfig = { measureService: { baseUrl: "example-service-url", }, - elmTranslationService: { - baseUrl: "test-elm-service", + qdmElmTranslationService: { + baseUrl: "qdm-elm-service", + }, + fhirElmTranslationService: { + baseUrl: "fhir-elm-service", }, terminologyService: { baseUrl: "terminology-service.com", @@ -130,7 +133,7 @@ describe("QdmRiskAdjustment Component", () => { description: "", }, { - definition: '"SDE Ethnicity"', + definition: "SDE Ethnicity", description: "", }, ]; @@ -160,10 +163,10 @@ describe("QdmRiskAdjustment Component", () => { userEvent.click(riskAdjustmentButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if RA description already loads values from store and able to update @@ -228,7 +231,7 @@ describe("QdmRiskAdjustment Component", () => { description: "", }, { - definition: '"SDE Ethnicity"', + definition: "SDE Ethnicity", description: "", }, ]; @@ -258,10 +261,10 @@ describe("QdmRiskAdjustment Component", () => { userEvent.click(riskAdjustmentButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if RA description already loads values from store and able to update @@ -358,11 +361,11 @@ describe("QdmRiskAdjustment Component", () => { userEvent.click(riskAdjustmentButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); userEvent.click(riskAdjustmentButton); // To collapse the dropdown expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if RA description already loads values from store and able to update @@ -411,11 +414,11 @@ describe("QdmRiskAdjustment Component", () => { userEvent.click(riskAdjustmentButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); userEvent.click(riskAdjustmentButton); // To collapse the dropdown expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if RA description already loads values from store and able to update @@ -471,17 +474,17 @@ describe("QdmRiskAdjustment Component", () => { userEvent.click(riskAdjustmentButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); act(async () => { const deleteButton = await screen.findByTestId("CancelIcon"); userEvent.click(deleteButton); expect( - screen.queryByRole("button", { name: '"SDE Ethnicity"' }) + screen.queryByRole("button", { name: "SDE Ethnicity" }) ).not.toBeInTheDocument(); }); }); diff --git a/src/components/editMeasure/populationCriteria/riskAdjustment/qdm/RiskAdjustment.tsx b/src/components/editMeasure/populationCriteria/riskAdjustment/qdm/RiskAdjustment.tsx index ca56b650..a92ed58f 100644 --- a/src/components/editMeasure/populationCriteria/riskAdjustment/qdm/RiskAdjustment.tsx +++ b/src/components/editMeasure/populationCriteria/riskAdjustment/qdm/RiskAdjustment.tsx @@ -44,8 +44,7 @@ const RiskAdjustment = () => { const definitions = new CqlAntlr(measure?.cql).parse() .expressionDefinitions; const mappedDefinitions = definitions.map(({ name }) => { - //return JSON.parse(name); - return name; + return JSON.parse(name); }); setDefinitions(mappedDefinitions); } diff --git a/src/components/editMeasure/populationCriteria/riskAdjustment/qiCore/RiskAdjustment.test.tsx b/src/components/editMeasure/populationCriteria/riskAdjustment/qiCore/RiskAdjustment.test.tsx index 098c7d6d..2cef3a9b 100644 --- a/src/components/editMeasure/populationCriteria/riskAdjustment/qiCore/RiskAdjustment.test.tsx +++ b/src/components/editMeasure/populationCriteria/riskAdjustment/qiCore/RiskAdjustment.test.tsx @@ -136,7 +136,7 @@ describe("QiCore RiskAdjustment Component", () => { includeInReportType: ["Individual"], }, { - definition: '"SDE Ethnicity"', + definition: "SDE Ethnicity", description: "", includeInReportType: [ "Individual", @@ -204,10 +204,10 @@ describe("QiCore RiskAdjustment Component", () => { userEvent.click(riskAdjustmentButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if RA description already loads values from store and able to update @@ -255,7 +255,7 @@ describe("QiCore RiskAdjustment Component", () => { description: "", }, { - definition: '"SDE Ethnicity"', + definition: "SDE Ethnicity", description: "", includeInReportType: [ "Individual", @@ -291,10 +291,10 @@ describe("QiCore RiskAdjustment Component", () => { userEvent.click(riskAdjustmentButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if RA description already loads values from store and able to update @@ -391,11 +391,11 @@ describe("QiCore RiskAdjustment Component", () => { userEvent.click(riskAdjustmentButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); userEvent.click(riskAdjustmentButton); // To collapse the dropdown expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if RA description already loads values from store and able to update @@ -444,11 +444,11 @@ describe("QiCore RiskAdjustment Component", () => { userEvent.click(riskAdjustmentButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); userEvent.click(riskAdjustmentButton); // To collapse the dropdown expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if RA description already loads values from store and able to update @@ -504,17 +504,17 @@ describe("QiCore RiskAdjustment Component", () => { userEvent.click(riskAdjustmentButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); act(async () => { const deleteButton = await screen.findByTestId("CancelIcon"); userEvent.click(deleteButton); expect( - screen.queryByRole("button", { name: '"SDE Ethnicity"' }) + screen.queryByRole("button", { name: "SDE Ethnicity" }) ).not.toBeInTheDocument(); }); }); diff --git a/src/components/editMeasure/populationCriteria/riskAdjustment/qiCore/RiskAdjustment.tsx b/src/components/editMeasure/populationCriteria/riskAdjustment/qiCore/RiskAdjustment.tsx index 46f181e1..2ce4ba44 100644 --- a/src/components/editMeasure/populationCriteria/riskAdjustment/qiCore/RiskAdjustment.tsx +++ b/src/components/editMeasure/populationCriteria/riskAdjustment/qiCore/RiskAdjustment.tsx @@ -68,8 +68,7 @@ const RiskAdjustment = () => { const definitions = new CqlAntlr(measure?.cql).parse() .expressionDefinitions; const mappedDefinitions = definitions.map(({ name }) => { - //return JSON.parse(name); - return name; + return JSON.parse(name); }); setDefinitions(mappedDefinitions); } diff --git a/src/components/editMeasure/populationCriteria/supplementalData/qdm/SupplementalData.test.tsx b/src/components/editMeasure/populationCriteria/supplementalData/qdm/SupplementalData.test.tsx index 850d005c..fe55f1d2 100644 --- a/src/components/editMeasure/populationCriteria/supplementalData/qdm/SupplementalData.test.tsx +++ b/src/components/editMeasure/populationCriteria/supplementalData/qdm/SupplementalData.test.tsx @@ -136,7 +136,7 @@ describe("SupplementalData Component QDM", () => { description: "", }, { - definition: '"SDE Ethnicity"', + definition: "SDE Ethnicity", description: "", }, ]; @@ -169,10 +169,10 @@ describe("SupplementalData Component QDM", () => { userEvent.click(supplementalDataButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if SD description already loads values from store and able to update @@ -274,11 +274,11 @@ describe("SupplementalData Component QDM", () => { userEvent.click(supplementalDataButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); userEvent.click(supplementalDataButton); // To collapse the dropdown expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if SD description already loads values from store and able to update @@ -330,11 +330,11 @@ describe("SupplementalData Component QDM", () => { userEvent.click(supplementalDataButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); userEvent.click(supplementalDataButton); // To collapse the dropdown expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if SD description already loads values from store and able to update diff --git a/src/components/editMeasure/populationCriteria/supplementalData/qdm/SupplementalData.tsx b/src/components/editMeasure/populationCriteria/supplementalData/qdm/SupplementalData.tsx index 200a7602..d7ed4fb1 100644 --- a/src/components/editMeasure/populationCriteria/supplementalData/qdm/SupplementalData.tsx +++ b/src/components/editMeasure/populationCriteria/supplementalData/qdm/SupplementalData.tsx @@ -45,8 +45,7 @@ const SupplementalData = () => { const definitions = new CqlAntlr(measure?.cql).parse() .expressionDefinitions; const mappedDefinitions = definitions.map(({ name }) => { - //return JSON.parse(name); - return name; + return JSON.parse(name); }); setDefinitions(mappedDefinitions); } diff --git a/src/components/editMeasure/populationCriteria/supplementalData/qiCore/SupplementalData.test.tsx b/src/components/editMeasure/populationCriteria/supplementalData/qiCore/SupplementalData.test.tsx index 563f0fd3..4ba8a99d 100644 --- a/src/components/editMeasure/populationCriteria/supplementalData/qiCore/SupplementalData.test.tsx +++ b/src/components/editMeasure/populationCriteria/supplementalData/qiCore/SupplementalData.test.tsx @@ -139,7 +139,7 @@ describe("SupplementalData Component QI-Core", () => { includeInReportType: ["Individual"], }, { - definition: '"SDE Ethnicity"', + definition: "SDE Ethnicity", description: "", includeInReportType: [ "Individual", @@ -215,11 +215,11 @@ describe("SupplementalData Component QI-Core", () => { userEvent.click(el); }); expect( - screen.getByRole("button", { name: '"SDE Ethnicity"', exact: false }) + screen.getByRole("button", { name: "SDE Ethnicity", exact: false }) ).toBeInTheDocument(); const sdeEthnicityIncludeInReportTypeContainer = await screen.getByTestId( - '"SDE Ethnicity"-include-in-report-type-dropdown', + "SDE Ethnicity-include-in-report-type-dropdown", { exact: true } ); // check that it defaults to all values added for Include in Report Type @@ -346,11 +346,11 @@ describe("SupplementalData Component QI-Core", () => { userEvent.click(supplementalDataButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"', { exact: false })); + userEvent.click(screen.getByText("SDE Ethnicity", { exact: false })); }); userEvent.click(supplementalDataButton); // To collapse the dropdown expect( - screen.getByRole("button", { name: '"SDE Ethnicity"', exact: false }) + screen.getByRole("button", { name: "SDE Ethnicity", exact: false }) ).toBeInTheDocument(); // Verifies if SD description already loads values from store and able to update @@ -384,7 +384,7 @@ describe("SupplementalData Component QI-Core", () => { expect(description).toHaveTextContent("Updated test description"); expect(screen.getByText("+1")).toBeInTheDocument(); // We are limiting the selected options displayed const includeInReportTypeContainer = screen.getByTestId( - '"SDE Ethnicity"-include-in-report-type-dropdown', + "SDE Ethnicity-include-in-report-type-dropdown", { exact: false } ); expect( @@ -415,11 +415,11 @@ describe("SupplementalData Component QI-Core", () => { userEvent.click(supplementalDataButton); await waitFor(() => { - userEvent.click(screen.getByText('"SDE Ethnicity"')); + userEvent.click(screen.getByText("SDE Ethnicity")); }); userEvent.click(supplementalDataButton); // To collapse the dropdown expect( - screen.getByRole("button", { name: '"SDE Ethnicity"' }) + screen.getByRole("button", { name: "SDE Ethnicity" }) ).toBeInTheDocument(); // Verifies if SD description already loads values from store and able to update diff --git a/src/components/editMeasure/populationCriteria/supplementalData/qiCore/SupplementalData.tsx b/src/components/editMeasure/populationCriteria/supplementalData/qiCore/SupplementalData.tsx index 35ae92a9..0c0bf7bd 100644 --- a/src/components/editMeasure/populationCriteria/supplementalData/qiCore/SupplementalData.tsx +++ b/src/components/editMeasure/populationCriteria/supplementalData/qiCore/SupplementalData.tsx @@ -69,8 +69,7 @@ const SupplementalData = () => { const definitions = new CqlAntlr(measure?.cql).parse() .expressionDefinitions; const mappedDefinitions = definitions.map(({ name }) => { - return name; - //return JSON.parse(name); + return JSON.parse(name); }); setDefinitions(mappedDefinitions); }