-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #445 from OHDSI/data_quality_issues_delta
Add data quality delta column to data network overview page
- Loading branch information
Showing
11 changed files
with
273 additions
and
5 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
'subcategory', | ||
'cdmTableName', | ||
'failed', | ||
'delta', | ||
]" | ||
:aggregator-names-list="['Count']" | ||
> | ||
|
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
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
65 changes: 65 additions & 0 deletions
65
src/pages/reports/source/DataQualityHistory/charts/DataQualityDelta/DataQualityDelta.vue
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,65 @@ | ||
<template> | ||
<Panel header="Data Quality Delta" elevation="2" class="ma-4"> | ||
<template #icons> | ||
<ChartHeader | ||
title="Historical Data Quality by Category" | ||
table-toggle | ||
@table-toggled="toggleTable" | ||
/> | ||
</template> | ||
<Chart :id="reportId" :data="data" :chartSpec="specDataQualityDelta" /> | ||
<div v-if="showTable" class="p-4"> | ||
<DataTable | ||
size="small" | ||
:value="data" | ||
paginator | ||
currentPageReportTemplate="{first} to {last} of {totalRecords}" | ||
paginator-template="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown CurrentPageReport" | ||
:rows="5" | ||
:rowsPerPageOptions="[5, 10, 20, 50]" | ||
> | ||
<Column field="release" header="Release"> </Column> | ||
<Column field="NEW" header="New"> </Column> | ||
<Column field="EXISTING" header="Existing"> </Column> | ||
<Column field="RESOLVED" header="Resolved"> </Column> | ||
<Column field="STABLE" header="Stable"> </Column> | ||
</DataTable> | ||
</div> | ||
<NotesPanel v-if="notesMode" :notes="notes" /> | ||
</Panel> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { QUALITY_DELTA } from "@/shared/config/files"; | ||
import { Chart } from "@/widgets/chart"; | ||
import { specDataQualityDelta } from "./specDataQualityDelta"; | ||
import { useStore } from "vuex"; | ||
import { computed, ref } from "vue"; | ||
import NotesPanel from "@/widgets/notesPanel/ui/NotesPanel.vue"; | ||
import ChartHeader from "@/widgets/chart/ui/ChartHeader.vue"; | ||
import Panel from "primevue/panel"; | ||
import Column from "primevue/column"; | ||
import DataTable from "primevue/datatable"; | ||
import useAnnotations from "@/shared/lib/composables/useAnnotations"; | ||
import useAnnotationControls from "@/shared/lib/composables/useAnnotationControls"; | ||
const store = useStore(); | ||
const reportId = "viz-sourcedataqualitydelta"; | ||
const { notesMode } = useAnnotationControls(); | ||
const { notes } = useAnnotations(reportId); | ||
const showTable = ref(false); | ||
function toggleTable(mode) { | ||
showTable.value = mode; | ||
} | ||
const data = computed(() => { | ||
return store.getters.getData[QUALITY_DELTA] || []; | ||
}); | ||
</script> | ||
|
||
<style scoped></style> |
88 changes: 88 additions & 0 deletions
88
src/pages/reports/source/DataQualityHistory/charts/DataQualityDelta/specDataQualityDelta.ts
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,88 @@ | ||
import { VEGA_SCHEMA } from "@/shared/config/links"; | ||
import { TopLevelSpec } from "vega-lite"; | ||
|
||
export function specDataQualityDelta(zeroBaseline = false) { | ||
return { | ||
$schema: VEGA_SCHEMA, | ||
width: "container", | ||
height: 150, | ||
data: { name: "conceptData" }, | ||
encoding: { | ||
x: { field: "Release", type: "nominal", title: "Release Name" }, | ||
y: { field: "value", type: "quantitative", title: "Count" }, | ||
color: { | ||
field: "variable", | ||
type: "nominal", | ||
title: "Issue status", | ||
}, | ||
}, | ||
transform: [ | ||
{ | ||
fold: ["NEW", "EXISTING", "RESOLVED", "STABLE"], | ||
as: ["variable", "value"], | ||
}, | ||
{ | ||
calculate: "datum.variable", | ||
as: "copiedVariable", | ||
}, | ||
], | ||
layer: [ | ||
{ | ||
mark: { type: "line", interpolate: "linear", point: true }, | ||
params: [ | ||
{ | ||
name: "source", | ||
select: { type: "point", fields: ["variable"] }, | ||
bind: "legend", | ||
}, | ||
], | ||
transform: [ | ||
{ | ||
filter: { param: "source" }, | ||
}, | ||
], | ||
}, | ||
{ | ||
selection: { | ||
release: { | ||
type: "multi", | ||
fields: ["variable"], | ||
bind: "legend", | ||
}, | ||
x: { | ||
type: "single", | ||
on: "mousemove", | ||
fields: ["Release"], | ||
nearest: true, | ||
}, | ||
}, | ||
transform: [ | ||
{ | ||
filter: { selection: "release" }, | ||
}, | ||
], | ||
mark: { type: "point", tooltip: true }, | ||
}, | ||
{ | ||
transform: [ | ||
{ | ||
filter: { | ||
and: ["x.Release", { selection: "x" }], | ||
}, | ||
}, | ||
{ filter: { selection: "release" } }, | ||
], | ||
layer: [ | ||
{ | ||
mark: "rule", | ||
encoding: { | ||
y: { | ||
height: 1, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}; | ||
} |
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
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
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
Oops, something went wrong.