-
Notifications
You must be signed in to change notification settings - Fork 1
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 #9 from AutomatedProcessImprovement/manager-test
Tactical manager scope
- Loading branch information
Showing
23 changed files
with
1,659 additions
and
417 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 |
---|---|---|
|
@@ -69,6 +69,10 @@ | |
.case-performance { | ||
padding-right: 20px; | ||
} | ||
|
||
.kpi { | ||
margin-right: 1em; | ||
} | ||
} | ||
} | ||
|
||
|
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
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 |
---|---|---|
@@ -0,0 +1,121 @@ | ||
<template> | ||
<div class="cases-charts"> | ||
<div class="cases-chart shadow"> | ||
<h3>{{ recommendationTypesTitle }}</h3> | ||
<apexchart | ||
type="pie" | ||
:options="recommendationTypes.chartOptions" | ||
:series="recommendationTypes.series"> | ||
</apexchart> | ||
</div> | ||
<div class="cases-chart shadow"> | ||
<h3>{{ recommendationsAcceptanceTitle }}</h3> | ||
<apexchart type="pie" | ||
:options="recommendationsAcceptance.chartOptions" | ||
:series="recommendationsAcceptance.series"> | ||
</apexchart> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import VueApexCharts from 'vue3-apexcharts'; | ||
export default { | ||
name: "CustomChartsComponent", | ||
components: { | ||
apexchart: VueApexCharts, | ||
}, | ||
props: { | ||
cases: { | ||
type: Array, | ||
required: true, | ||
}, | ||
casesData: { | ||
type: Array, | ||
required: true, | ||
validator: function (value) { | ||
return value.length === 2 && value.every(v => typeof v === 'number'); | ||
} | ||
}, | ||
alarmThreshold: { | ||
type: Number, | ||
required: true, | ||
}, | ||
recommendationTypesTitle: { | ||
type: String, | ||
default: 'Recommendation Types', | ||
}, | ||
recommendationsAcceptanceTitle: { | ||
type: String, | ||
default: 'Recommendations Acceptance', | ||
}, | ||
}, | ||
data() { | ||
return { | ||
recommendationTypes: { | ||
series: this.casesData, | ||
chartOptions: this.initChartOptions(['#56CCF2', '#F2994A'], ['Cases with recommendations', 'Cases without recommendations']), | ||
}, | ||
recommendationsAcceptance: { | ||
series: [], | ||
chartOptions: this.initChartOptions(['#17ad37', '#7e7e7e'], ['Recommendations accepted', 'Recommendations declined']), | ||
}, | ||
}; | ||
}, | ||
watch: { | ||
cases: { | ||
immediate: true, | ||
handler() { | ||
this.processData(); | ||
}, | ||
}, | ||
casesData: { | ||
immediate: true, | ||
handler(newVal) { | ||
this.recommendationTypes.series = newVal; | ||
}, | ||
} | ||
}, | ||
methods: { | ||
initChartOptions(colors, labels) { | ||
return { | ||
colors: colors, | ||
chart: { | ||
animations: { | ||
enabled: false, | ||
}, | ||
type: 'pie', | ||
}, | ||
labels: labels, | ||
responsive: [{ | ||
breakpoint: 480, | ||
options: { | ||
chart: { | ||
width: 200 | ||
}, | ||
legend: { | ||
position: 'bottom', | ||
} | ||
} | ||
}] | ||
}; | ||
}, | ||
processData() { | ||
const typeCounts = { total: 0, accepted: 0 }; | ||
this.cases.forEach(caseItem => { | ||
caseItem.activities.forEach(activity => { | ||
activity.prescriptions.forEach(prescription => { | ||
if (prescription.status === 'accepted') { | ||
typeCounts.accepted++; | ||
} | ||
typeCounts.total++; | ||
}); | ||
}); | ||
}); | ||
this.recommendationsAcceptance.series = [typeCounts.accepted, typeCounts.total - typeCounts.accepted]; | ||
} | ||
}, | ||
}; | ||
</script> |
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,31 @@ | ||
<template> | ||
<div class="stats-card column"> | ||
<p>Target</p> | ||
<h3 class="blue target-value">{{ object.value }} {{ object.unit }}</h3> | ||
<small>Case {{ object.column }} {{ object.operator }}</small> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'PositiveOutcomeItemComponent', | ||
props: { | ||
object: undefined | ||
}, | ||
computed: { | ||
value() { | ||
return this.positiveOutcomeItems.value; | ||
}, | ||
unit() { | ||
return this.positiveOutcomeItems.unit; | ||
}, | ||
column() { | ||
return this.positiveOutcomeItems.column; | ||
}, | ||
operator() { | ||
return this.positiveOutcomeItems.operator; | ||
} | ||
} | ||
} | ||
</script> |
Oops, something went wrong.