This repository has been archived by the owner on Dec 18, 2024. It is now read-only.
generated from MeasureAuthoringTool/madie-frontend-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d44cebf
commit 26e9ab0
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/components/testCaseLanding/qdm/TestCaseCoverage/CoverageTabs/CoverageTab.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React, { useEffect, useState } from "react"; | ||
interface Props { | ||
population: string; | ||
populationText: any; | ||
} | ||
import { Accordion } from "@madie/madie-design-system/dist/react"; | ||
|
||
const CoverageTab = ({ population, populationText }: Props) => { | ||
return ( | ||
<Accordion title={population} isOpen={true}> | ||
<pre>{populationText.text}</pre> | ||
</Accordion> | ||
); | ||
}; | ||
|
||
export default CoverageTab; |
35 changes: 35 additions & 0 deletions
35
src/components/testCaseLanding/qdm/TestCaseCoverage/CoverageTabs/CoverageTabList.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import _, { isEmpty } from "lodash"; | ||
import CoverageTab from "./CoverageTab"; | ||
|
||
import { MappedCql } from "../../../../../util/GroupCoverageHelpers"; | ||
import "twin.macro"; | ||
import "styled-components/macro"; | ||
interface Props { | ||
groupPopulations: any; | ||
mappedCql: MappedCql; | ||
} | ||
|
||
const CoverageTabList = ({ groupPopulations, mappedCql }: Props) => { | ||
return ( | ||
<> | ||
<div tw="border-b pb-2">{}</div> | ||
|
||
{mappedCql && | ||
groupPopulations.map((pop) => { | ||
return ( | ||
Check warning on line 20 in src/components/testCaseLanding/qdm/TestCaseCoverage/CoverageTabs/CoverageTabList.tsx Codecov / codecov/patchsrc/components/testCaseLanding/qdm/TestCaseCoverage/CoverageTabs/CoverageTabList.tsx#L20
|
||
<CoverageTab | ||
population={pop.name} | ||
populationText={mappedCql[pop.name]} | ||
/> | ||
); | ||
})} | ||
<div tw="flex mt-5" key={"1"}> | ||
<div tw="flex-none w-1/5"></div> | ||
<div></div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default CoverageTabList; |
29 changes: 29 additions & 0 deletions
29
src/components/testCaseLanding/qdm/TestCaseCoverage/TestCaseCoverage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
// import QdmGroupCoverage from "../../../groupCoverage/QdmGroupCoverage"; | ||
import { isEmpty } from "lodash"; | ||
import { MadieAlert } from "@madie/madie-design-system/dist/react"; | ||
import { mapCql, mapCoverageCql } from "../../../../util/GroupCoverageHelpers"; | ||
import "twin.macro"; | ||
import "styled-components/macro"; | ||
import CoverageTabList from "./CoverageTabs/CoverageTabList"; | ||
|
||
const TestCaseCoverage = ({ | ||
calculationResults, | ||
groupPopulations, | ||
measureCql, | ||
measureGroups, | ||
calculationErrors, | ||
}) => { | ||
return ( | ||
<div tw="p-5" style={{ paddingRight: ".25rem" }}> | ||
<CoverageTabList | ||
groupPopulations={groupPopulations.populations.filter( | ||
(pop) => pop.definition | ||
)} | ||
mappedCql={mapCoverageCql(measureCql, groupPopulations)} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TestCaseCoverage; |