slicing result validation

This commit is contained in:
Hanan Askarim
2024-08-20 11:20:13 +07:00
parent 08e181f3ce
commit 4d8012a10a
7 changed files with 1508 additions and 0 deletions

View File

@@ -0,0 +1,237 @@
<template>
<div>
<v-container class="bg-white rounded-lg" fluid>
<v-row>
<v-col cols="2">
<v-text-field
:label="$t('message.tableDetailPatient.navbar.date')"
variant="outlined"
v-model="order_date"
hide-details
></v-text-field>
</v-col>
<v-col cols="5">
<v-text-field
:label="$t('message.tableDetailPatient.navbar.noreg')"
variant="outlined"
hide-details
></v-text-field>
</v-col>
<v-col cols="2.5">
<v-text-field
:label="$t('message.tableDetailPatient.navbar.dob')"
variant="outlined"
hide-details
></v-text-field>
</v-col>
<v-col cols="2.5">
<v-text-field
:label="$t('message.tableDetailPatient.navbar.sender')"
variant="outlined"
hide-details
></v-text-field>
</v-col>
</v-row>
<v-data-table
:headers="headers"
:items="xdetails"
hide-default-footer
class="pt-5"
>
<template v-slot:headers="{ columns }">
<tr>
<template v-for="column in columns" :key="column.key">
<td :class="column.class" :style="{ width: column.width, textAlign: column.align }">
<span>{{ column.title }}</span>
</td>
</template>
</tr>
</template>
<template v-slot:item="{ item }">
<tr>
<td class="text-left" v-if="item.is_result == 'N'" colspan="8">
<p class="font-weight-medium">{{ item.t_testname }}</p>
</td>
<td class="text-left" v-if="item.is_result == 'Y'">
<p class="font-weight-medium">{{ item.t_testname }}</p>
</td>
<td class="text-left" v-if="item.is_result == 'Y'">
</td>
<td class="text-left" v-if="item.is_result == 'Y'">
<p>{{ item.result_flag }}</p>
</td>
<td class="text-left" v-if="item.is_result == 'Y'">
{{ item.normal_note }}
</td>
<td class="text-left" v-if="item.is_result == 'Y'">
{{ item.unit_name }}
</td>
<td class="text-left" v-if="item.is_result == 'Y'">
{{ item.methode_name }}
</td>
<td class="text-left" v-if="item.is_result == 'Y'">
{{ item.note }}
</td>
<td class="text-left" v-if="item.is_result == 'Y'">
<div class="d-flex justify-center">
<div
:dark="item.validation_old != 'Y'"
:disabled="item.validation_old == 'Y'"
v-show="item.verification == 'Y'"
class="pointer bg-error-lighten rounded-lg"
style="height: 40px; width: 40px; display: flex; align-items: center; justify-content: center;"
>
<iconify-icon
class="text-error"
style="font-size: 1.5rem;"
icon="fluent:dismiss-24-regular"
></iconify-icon>
</div>
<div
v-show="item.verification == 'Y'"
:class="item.validation=='Y'?'pointer bg-success-lighten rounded-lg ml-2':'pointer bg-success rounded-lg ml-2'"
style="height: 40px; width: 40px; display: flex; align-items: center; justify-content: center;"
>
<iconify-icon
:class="item.validation=='Y'? 'text-success':'text-white'"
style="font-size: 1.5rem;"
icon="fluent:checkmark-24-regular"
></iconify-icon>
</div>
</div>
</td>
</tr>
</template>
</v-data-table>
</v-container>
</div>
</template>
<style scoped>
.pointer {
cursor: pointer;
}
.v-table .v-table__wrapper > table > tbody > tr:not(:last-child) > td,
.v-table .v-table__wrapper > table > tbody > tr:not(:last-child) > th,
.v-table .v-table__wrapper > table > thead > tr > th {
border-bottom: dashed 1px #EEEEEE;
}
</style>
<script type="module">
export default {
name: "DetailPatient",
data() {
return {
menu: false,
headers: [
{
align: 'start',
key: 'name',
sortable: false,
width: "15%",
title: this.$t('message.tableDetailPatient.header.name'),
class: "bg-secondary-lighten font-weight-bold",
},
{
align: 'start',
key: 'result',
sortable: false,
width: "10%",
title: this.$t('message.tableDetailPatient.header.result'),
class: "bg-secondary-lighten font-weight-bold",
},
{
align: 'start',
key: 'flag',
sortable: false,
width: "10%",
title: this.$t('message.tableDetailPatient.header.flag'),
class: "bg-secondary-lighten font-weight-bold",
},
{
align: 'start',
key: 'nilai',
sortable: false,
width: "10%",
title: this.$t('message.tableDetailPatient.header.normalvalue'),
class: "bg-secondary-lighten font-weight-bold",
},
{
align: 'start',
key: 'unit',
sortable: false,
width: "10%",
title: this.$t('message.tableDetailPatient.header.unit'),
class: "bg-secondary-lighten font-weight-bold",
},
{
align: 'start',
key: 'metode',
sortable: false,
width: "15%",
title: this.$t('message.tableDetailPatient.header.method'),
class: "bg-secondary-lighten font-weight-bold",
},
{
align: 'start',
key: 'note',
sortable: false,
width: "15%",
title: this.$t('message.tableDetailPatient.header.note'),
class: "bg-secondary-lighten font-weight-bold",
},
{
align: 'start',
key: 'validasi',
sortable: false,
width: "5%",
title: this.$t('message.tableDetailPatient.header.validation'),
class: "bg-secondary-lighten font-weight-bold",
},
],
};
},
computed: {
xdetails() {
return this.$store.state.validation.details
},
selected_detail () {
let x = this.$store.state.validation.selected_detail
console.log(x)
if (x)
return x
return {}
},
order_date() {
let d = this.selected_detail.T_OrderHeaderDate
let e = ''
try {
e = d.substr(0,10).split('-').reverse().join('-')
} catch(e) { /*console.log(e.message)*/ }
return e
},
},
methods: {
formatDate() {
if (!this.date) return null;
return moment(this.date).format("DD-MM-YYYY");
},
deFormatedDate(date) {
if (!date) return null;
const [day, month, year] = date.split("-");
return `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
},
},
wacth: {
}
}
</script>

View File

@@ -0,0 +1,97 @@
<template>
<div>
<v-container class="bg-white rounded-lg" fluid>
<v-data-table
:headers="headers"
:items="xpatients"
return-object
hide-default-footer
class="row-pointer"
>
<template v-slot:top>
<v-toolbar flat class="bg-secondary-lighten rounded-lg">
<v-toolbar-title class="text-black font-weight-bold">{{ $t('message.toolbalTitle') }}</v-toolbar-title>
</v-toolbar>
</template>
<template v-slot:item="{ item }">
<tr v-bind:class="{'bg-primary-lighten':isSelected(item)}" @click="selectMe(item)">
<td>
<div>
<p class="mt-2 mb-2">{{ item.noreg }}</p>
<p class="mb-2" >
<v-chip label size="small">
{{ item.orderdate }}
</v-chip>
</p>
</div>
</td>
<td>
<p>{{ item.name }}</p>
</td>
</tr>
</template>
</v-data-table>
</v-container>
</div>
</template>
<style scoped>
.row-pointer >>> tbody tr :hover {
cursor: pointer;
}
</style>
<script type="module">
export default {
name: "ListPatient",
data() {
return {
headers: [
{
align: 'start',
key: 'name',
sortable: false,
width: "50%",
title: this.$t('message.tableListPatient.noreg'),
class: "font-weight-bold",
},
{
align: 'start',
key: 'name',
sortable: false,
width: "50%",
title: this.$t('message.tableListPatient.name'),
class: "font-weight-bold",
},
],
};
},
computed: {
xpatients() {
return this.$store.state.validation.patients
},
selected_patient: {
get() {
return this.$store.state.validation.selected_patient
},
set(val) {
this.$store.commit("validation/setSelectedPatient", val)
}
}
},
methods: {
isSelected(p) {
return p.id == this.$store.state.validation.selected_patient.id
},
selectMe(data) {
this.$store.commit("validation/setSelectedPatient", data)
this.$store.commit("validation/setSelectedDetail", data)
}
},
wacth: {
}
}
</script>

View File

@@ -0,0 +1,53 @@
<template>
<v-app id="inspire">
<one-navbar></one-navbar>
<v-main>
<div class="pa-5 bg-primary-lighten ml-2 rounded-xl h-100">
<search-component></search-component>
<v-row>
<v-col cols="12" md="3" sm="12" xs="12" class="mt-5">
<list-patient-component></list-patient-component>
</v-col>
<v-col cols="12" md="9" sm="12" xs="12" class="mt-5">
<detail-patient-component></detail-patient-component>
</v-col>
</v-row>
</div>
</v-main>
</v-app>
</template>
<style scoped>
</style>
<script type="module">
import NavbarComponent from "../../globalcomponent/one-navbar.vue";
import listPatientComponent from "./listPatient.vue";
import searchComponent from "./searchPatient.vue";
import detailComponent from "./detailPatient.vue";
export default {
name: "MainValidation",
components: {
"one-navbar": NavbarComponent,
"list-patient-component": listPatientComponent,
"search-component": searchComponent,
"detail-patient-component": detailComponent
},
data() {
return {
};
},
computed: {
},
methods: {
},
wacth: {
}
}
</script>

View File

@@ -0,0 +1,211 @@
<template>
<div>
<v-container class="bg-white rounded-lg" fluid>
<v-row>
<v-col cols="3">
<div class="d-flex align-center ga-2">
<v-menu
v-model="menuStartDate"
:close-on-content-click="false"
transition="scale-transition"
offset-y
min-width="auto"
max-width="290px"
>
<template v-slot:activator="{ props }">
<v-text-field
:model-value="formatDate()"
:label="$t('message.search.startdate')"
prepend-inner-icon="mdi-calendar"
hide-details
readonly
variant="outlined"
v-bind="props"
></v-text-field>
</template>
<v-date-picker
hide-header
show-adjacent-months
rounded="lg"
color="primary"
v-model="date"
@update:modelValue="menuStartDate=false"
></v-date-picker>
</v-menu>
<v-menu
v-model="menuEndDate"
:close-on-content-click="false"
transition="scale-transition"
offset-y
min-width="auto"
max-width="290px"
>
<template v-slot:activator="{ props }">
<v-text-field
:model-value="formatDate()"
:label="$t('message.search.enddate')"
prepend-inner-icon="mdi-calendar"
hide-details
readonly
variant="outlined"
v-bind="props"
></v-text-field>
</template>
<v-date-picker
hide-header
show-adjacent-months
rounded="lg"
color="primary"
v-model="date"
@update:modelValue="menuEndDate=false"
></v-date-picker>
</v-menu>
</div>
</v-col>
<v-col cols="1.5">
<v-text-field
:label="$t('message.search.noreg')"
variant="outlined"
hide-details
append-inner-icon="mdi-magnify"
></v-text-field>
</v-col>
<v-col cols="1.5">
<v-autocomplete
:label="$t('message.search.group')"
variant="outlined"
hide-details
menu-icon="mdi-chevron-down"
:items="['California', 'Colorado', 'Florida', 'Georgia', 'Texas', 'Wyoming']"
></v-autocomplete>
</v-col>
<v-col cols="1">
<v-btn
variant="flat"
small
style="height: 55px; width: 40px;"
class="bg-primary rounded-lg">
<iconify-icon
style="font-size: 2rem;"
icon="fluent:search-20-regular"
></iconify-icon>
</v-btn>
</v-col>
<v-col cols="5">
<div style="height: 100%;">
<v-row class="d-flex pt-4 justify-end ga-2">
<v-btn fab
variant="tonal"
small
style="height: auto;"
color="secondary"
class="bg-secondary-lighten rounded-lg">
<iconify-icon
style="font-size: 2rem;"
icon="fluent:notepad-person-24-regular"
></iconify-icon>
</v-btn>
<v-btn fab
variant="tonal"
small
style="height: auto;"
color="success"
class="bg-success-lighten rounded-lg">
<iconify-icon
style="font-size: 2rem;"
icon="fluent:note-add-24-regular"
></iconify-icon>
</v-btn>
<v-btn fab
variant="tonal"
small
style="height: auto;"
color="info"
class="bg-info-lighten rounded-lg">
<iconify-icon
style="font-size: 2rem;"
icon="fluent:eye-24-regular"
></iconify-icon>
</v-btn>
<div>
<v-btn
class="bg-primary-lighten"
variant="tonal"
color="primary"
size="x-large"
>
{{ $t('message.search.history') }}
</v-btn>
</div>
<div>
<v-btn
variant="flat"
small
class="bg-primary text-white"
size="x-large"
>
{{ $t('message.search.save') }}
</v-btn>
</div>
<div>
<v-btn
variant="flat"
small
class="bg-success text-white mr-2"
size="x-large"
>
{{ $t('message.search.send') }}
</v-btn>
</div>
</v-row>
</div>
</v-col>
</v-row>
</v-container>
</div>
</template>
<style scoped>
</style>
<script type="module">
export default {
name: "SearchPatient",
data() {
return {
menuStartDate: false,
menuEndDate: false,
visible: false,
};
},
computed: {
date: {
get() {
return this.$store.state.validation.date;
},
set(val) {
console.log(val)
this.$store.commit("validation/setDate", val);
},
},
},
methods: {
formatDate() {
if (!this.date) return null;
return moment(this.date).format("DD-MM-YYYY");
},
deFormatedDate(date) {
if (!date) return null;
const [day, month, year] = date.split("-");
return `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
},
},
wacth: {
}
}
</script>