343 lines
12 KiB
Vue
343 lines
12 KiB
Vue
<template>
|
|
<v-layout class="fill-height" column>
|
|
<v-dialog v-model="xdialogaction" persistent max-width="350">
|
|
<v-card>
|
|
<v-card-title color="warning" class="headline">Konfirmasi</v-card-title>
|
|
<v-card-text v-html="xmsgaction">
|
|
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="primary darken-1" flat @click="closeDialogAction()">OK</v-btn>
|
|
<v-btn color="error darken-1" flat @click="xdialogaction = false">Tutup</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-snackbar
|
|
v-model="snackbar.value"
|
|
:timeout="snackbar.timeout"
|
|
>
|
|
{{ snackbar.text }}
|
|
<v-btn
|
|
color="blue"
|
|
text
|
|
@click="snackbar.value = false"
|
|
>
|
|
Tutup
|
|
</v-btn>
|
|
</v-snackbar>
|
|
<v-card class="mb-2 pa-2 searchbox">
|
|
<v-layout row>
|
|
<v-flex xs4 mt-1 pr-2>
|
|
<v-text-field
|
|
label="No Reg"
|
|
outline
|
|
v-model="nolab"
|
|
hide-details
|
|
v-on:keyup.enter="searchPatient"
|
|
></v-text-field>
|
|
</v-flex>
|
|
<v-flex xs4 mt-1 pr-2>
|
|
<v-text-field
|
|
label="Nama"
|
|
outline
|
|
v-model="name"
|
|
v-on:keyup.enter="searchPatient"
|
|
hide-details
|
|
></v-text-field>
|
|
</v-flex>
|
|
<!--<v-select class="xs6 ma-1 mini-select" :items="statuses"
|
|
item-text="name"
|
|
return-object
|
|
v-model="status"
|
|
label="Status" outline hide-details></v-select>-->
|
|
|
|
<!--<v-btn class="xs3 ma-1" color="success" @click="searchPatient" >Search</v-btn>-->
|
|
<!--<span @click="searchPatient" class="icon-medium-fill-base white--text success iconsearch-search"></span>-->
|
|
</v-layout>
|
|
</v-card>
|
|
<v-card >
|
|
<v-layout align-center row>
|
|
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
|
<v-data-table
|
|
:headers="headers"
|
|
:items="patients"
|
|
:loading="isLoading"
|
|
hide-actions class="elevation-1">
|
|
<template slot="items" slot-scope="props">
|
|
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.ordernumber }}</td>
|
|
<td class="pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.patient_fullname}}</td>
|
|
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.test_name}}</td>
|
|
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">
|
|
|
|
<span class="mono subtitle-2"> <v-icon title="dikirim" color="warning" small>send</v-icon> <span :title="props.item.send_by.M_StaffName" style="text-weight:bold">{{fullname(props.item.send_by.M_StaffName)}}</span></span>
|
|
<span class="mono subtitle-2 pl-1 "><v-icon color="warning" small>alarm</v-icon> {{props.item.send_by.xdatetime}}</span>
|
|
<br/><span class="mono subtitle-2"> <v-icon title="diterima" color="success" small>move_to_inbox</v-icon> <span :title="props.item.received_by.M_StaffName" style="text-weight:bold">{{fullname(props.item.received_by.M_StaffName)}}</span></span>
|
|
<span class="mono subtitle-2 pl-1 "><v-icon color="success" small>alarm</v-icon> {{props.item.received_by.xdatetime}}</span>
|
|
</td>
|
|
</template>
|
|
</v-data-table>
|
|
<v-divider></v-divider>
|
|
<v-pagination
|
|
style="margin-top:10px;margin-bottom:10px"
|
|
v-model="curr_page"
|
|
:length="xtotal_page"
|
|
></v-pagination>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card>
|
|
<one-dialog-alert :status="openalertverification" :msg="msgalertverification" @forget-dialog-alert="forgetAlertVerification()" @close-dialog-alert="closeAlertVerification()"></one-dialog-alert>
|
|
<one-dialog-info :status="opendialogverification" :msg="msginfoverification" @close-dialog-info="closeInfoVerification()"></one-dialog-info>
|
|
</v-layout>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.searchbox .v-input.v-text-field .v-input__slot{
|
|
min-height:40px;
|
|
}
|
|
.searchbox .v-btn {
|
|
min-height:40px;
|
|
}
|
|
table.v-table tbody td,table.v-table tbody th {
|
|
height: 40px;
|
|
}
|
|
|
|
table.v-table thead tr {
|
|
height: 40px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
module.exports = {
|
|
components : {
|
|
'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
|
|
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
|
|
},
|
|
mounted() {
|
|
this.curr_page = 1
|
|
this.$store.dispatch("patient/search",{
|
|
name:this.name,
|
|
nolab: this.nolab,
|
|
current_page:this.curr_page,
|
|
lastid:-1
|
|
})
|
|
},
|
|
methods : {
|
|
fullname(value){
|
|
var xx = value.length
|
|
if(xx > 15)
|
|
return value.substring(0,12)+'...'
|
|
else
|
|
return value
|
|
},
|
|
isSelected(p) {
|
|
if(p.iscito === 'Y')
|
|
return false
|
|
else
|
|
return p.xid == this.$store.state.patient.selected_patient.xid
|
|
|
|
},
|
|
searchPatient() {
|
|
this.$store.dispatch("patient/search",{
|
|
name:this.name,
|
|
nolab: this.nolab,
|
|
current_page:1,
|
|
lastid:-1
|
|
})
|
|
},
|
|
selectMe(pat) {
|
|
this.$store.commit("patient/update_selected_patient",pat)
|
|
|
|
},
|
|
closeInfoVerification(){
|
|
this.$store.commit("patient/update_open_dialog_verification",false)
|
|
this.searchPatient()
|
|
},
|
|
closeAlertVerification(){
|
|
this.$store.commit("patient/update_open_alert_verification",false)
|
|
},
|
|
forgetAlertVerification(){
|
|
this.$store.commit("patient/update_no_save",0)
|
|
this.$store.commit("patient/update_open_alert_verification",false)
|
|
},
|
|
verify(value,act){
|
|
this.$store.commit("patient/update_selected_patient",value)
|
|
value.act = act
|
|
this.$store.commit("patient/update_now_prm",value)
|
|
if(act === 'Y'){
|
|
var prm = this.$store.state.patient.now_prm
|
|
prm.name = this.name
|
|
prm.nolab = this.nolab
|
|
this.$store.commit("done/update_current_page",1)
|
|
prm.done_search = {
|
|
startdate:this.$store.state.done.start_date,
|
|
enddate:this.$store.state.done.end_date,
|
|
search:this.$store.state.done.search,
|
|
current_page:1,
|
|
lastid:-1
|
|
|
|
}
|
|
this.$store.dispatch("patient/verify",prm)
|
|
}
|
|
else{
|
|
var xxver = value.verifications
|
|
|
|
xxver.forEach(function(entry,index) {
|
|
if(entry.xid === '0')
|
|
xxver[index].chex = true
|
|
})
|
|
|
|
this.$store.commit("patient/update_verifications",xxver)
|
|
this.$store.commit("patient/update_dialoglist",true)
|
|
this.$store.commit("patient/update_show_simpan_tolak",false)
|
|
}
|
|
},
|
|
closeDialogAction(){
|
|
var prm = this.$store.state.patient.now_prm
|
|
this.$store.dispatch("patient/verify",prm)
|
|
|
|
},
|
|
},
|
|
computed: {
|
|
snackbar: {
|
|
get() {
|
|
return this.$store.state.patient.snackbar
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_snackbar",val)
|
|
}
|
|
},
|
|
name: {
|
|
get() {
|
|
return this.$store.state.patient.name
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_name",val)
|
|
}
|
|
},
|
|
nolab: {
|
|
get() {
|
|
return this.$store.state.patient.nolab
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_nolab",val)
|
|
}
|
|
},
|
|
isLoading() {
|
|
return this.$store.state.patient.search_status == 1
|
|
},
|
|
patients() {
|
|
return this.$store.state.patient.patients
|
|
},
|
|
opendialogverification: {
|
|
get() {
|
|
return this.$store.state.patient.open_dialog_verification
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_open_dialog_verification",false)
|
|
}
|
|
},
|
|
msginfoverification(){
|
|
return this.$store.state.patient.msg_info_verification
|
|
},
|
|
openalertverification: {
|
|
get() {
|
|
return this.$store.state.patient.open_alert_verification
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/open_alert_verification",false)
|
|
}
|
|
},
|
|
msgalertverification(){
|
|
return this.$store.state.patient.msg_alert_verification
|
|
},
|
|
xdialogaction:{
|
|
get() {
|
|
return this.$store.state.patient.dialog_action
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_dialog_action",val)
|
|
}
|
|
},
|
|
xmsgaction:{
|
|
get() {
|
|
return this.$store.state.patient.msg_action
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_msg_action",val)
|
|
}
|
|
},
|
|
btnsaveseen:{
|
|
get() {
|
|
return this.$store.state.patient.btn_save_seen
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_btn_save_seen",val)
|
|
}
|
|
},
|
|
curr_page: {
|
|
get() {
|
|
return this.$store.state.patient.current_page
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_current_page",val)
|
|
this.$store.dispatch("patient/search",{
|
|
name:this.name,
|
|
nolab: this.nolab,
|
|
current_page:val,
|
|
lastid:-1
|
|
})
|
|
}
|
|
},
|
|
xtotal_page: {
|
|
get() {
|
|
return this.$store.state.patient.total_patient
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_total_patient",val)
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
items: [],
|
|
headers: [
|
|
{
|
|
text: "NO REG",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "mr",
|
|
width: "10%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "PASIEN",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "lab",
|
|
width: "25%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "PEMERIKSAAN",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "name",
|
|
width: "20%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "INFO",
|
|
align: "center",
|
|
sortable: false,
|
|
value: "status",
|
|
width: "35%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
}
|
|
],
|
|
};
|
|
}
|
|
}
|
|
</script>
|