Files
FE_CPONE/test/vuex/cpone-fo-supervisor/components/oneFoSupervisorAction.vue
2026-04-27 10:13:31 +07:00

460 lines
20 KiB
Vue

<template>
<v-layout column pb-2>
<v-card v-if="messagetype === 'FO.VERIFICATION.REJECT'" class="mb-2">
<v-layout v-if="selstatus.value !== 'adhoc'" row pa-2 align-center wrap>
<table>
<tr>
<th width="20%" class="text-md-left pt-2 pb-2">AKSI</th>
<th width="80%" class="text-md-left pt-2 pb-2">CATATAN KOREKSI</th>
</tr>
<tr class="mini-input" v-if="notes && notes.length > 0" v-for="(note, index) in notes">
<td width="20%"><span
v-bind:class="{ 'teal--text': colorBtn('VERIFY', note.button), 'primary--text': colorBtn('PASIEN', note.button), 'error--text': colorBtn('ORDER', note.button), 'purple--text': colorBtn('PEMERIKSAAN', note.button), 'success--text': colorBtn('PENGIRIMAN HASIL', note.button) }"
style="font-size:smaller;"> {{ note.button }} </span></td>
<td width="80%">
<div class="flex">
<strong>{{ note.label }}</strong>
<div class="caption text-muted">{{ note.reason }}</div>
</div>
</td>
</tr>
<tr class="mini-input" v-if="notes && notes.length === 0">
<td colspan="5" class="text-md-center pr-2">
Tidak ada data
</td>
</tr>
</table>
</v-layout>
</v-card>
<v-card v-if="xselstatus !== 'Selesai'">
<v-layout v-if="status_data_patient === 1" mt-1 row>
<v-flex class="pa-2" xs12>
<v-progress-circular :size="50" color="primary" indeterminate></v-progress-circular>
</v-flex>
</v-layout>
<v-layout v-if="status_data_patient !== 1" row pt-1 align-center wrap>
<!-- <v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn dark @click="printControlCard()" block color="#795548">Kartu Kontrol</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn block @click="openorder" color="error">Order</v-btn>
</div>
</v-flex> -->
<v-flex xs4>
<div>
<v-btn block @click="opentestreplace" dark color="orange ">Ganti Pemeriksaan</v-btn>
</div>
</v-flex>
<v-flex xs4>
<div>
<v-btn block @click="opentest" dark color="purple ">Tambah Pemeriksaan</v-btn>
</div>
</v-flex>
<v-flex xs4>
<div>
<v-btn block @click="openpacket" dark color="green ">Ganti Paket</v-btn>
</div>
</v-flex>
</v-layout>
<!-- <v-layout v-if="status_data_patient !== 1" style="padding-top:2px!important" row pb-1 align-center wrap>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn v-if="selpat.patient_mcu === 'N'" block @click="openflagmcu" color="info">Pasien
MCU</v-btn>
<v-btn v-if="selpat.patient_mcu === 'Y'" block @click="releaseflagmcu" outline
color="info">Release Pasien MCU</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn block @click="opendelivery" color="success">Pengiriman Hasil</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2 pr-2">
<div>
<v-btn block @click="openpromise" dark color="cyan">Janji Hasil</v-btn>
</div>
</v-flex>
</v-layout>
<v-layout v-if="status_data_patient !== 1" style="border-top:1px dashed rgb(221,221,221)" row mt-1
mb-1></v-layout>
<v-layout v-if="status_data_patient !== 1" row align-center wrap>
<v-flex xs4 v-if="statusact === 'Baru'" class="text-md-center pl-2">
<div>
<v-btn @click="read" block dark color="pink">Baca</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn @click="xvoid" block dark color="black">VOID</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2 pr-2">
<div>
<v-btn @click="verify" block dark color="teal">Verify</v-btn>
</div>
</v-flex>
</v-layout>
<v-layout v-if="status_data_patient !== 1" row align-center wrap>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn @click="alias" :outline="selpat.alias === ''" block dark color="warning">Alias
Dokter</v-btn>
</div>
</v-flex>
</v-layout>
-->
</v-card>
<one-fo-supervisor-dialog-alias></one-fo-supervisor-dialog-alias>
<one-fo-supervisor-dialog-read></one-fo-supervisor-dialog-read>
<one-fo-supervisor-dialog-void></one-fo-supervisor-dialog-void>
<one-fo-supervisor-dialog-supplies></one-fo-supervisor-dialog-supplies>
<one-fo-supervisor-dialog-barcode></one-fo-supervisor-dialog-barcode>
<one-fo-supervisor-dialog-delivery></one-fo-supervisor-dialog-delivery>
<one-fo-supervisor-dialog-verify></one-fo-supervisor-dialog-verify>
<one-fo-supervisor-dialog-order></one-fo-supervisor-dialog-order>
<one-fo-supervisor-dialog-test></one-fo-supervisor-dialog-test>
<one-fo-supervisor-dialog-test-replace></one-fo-supervisor-dialog-test-replace>
<one-fo-supervisor-dialog-packet></one-fo-supervisor-dialog-packet>
<one-fo-supervisor-dialog-promise></one-fo-supervisor-dialog-promise>
<one-dialog-print :title="printtitle" :width="printwidth" :height="500" :status="openprintcontrol"
:urlprint="urlprintnote" @close-dialog-print="openprintcontrol = false"></one-dialog-print>
</v-layout>
</template>
<style scoped>
.label-tagihan {
text-align: left;
font-size: 25px;
font-family: open sans, tahoma, sans-serif;
font-weight: 700;
}
.sub-header {
text-align: left;
font-size: 18px;
font-family: open sans, tahoma, sans-serif;
font-weight: 700;
}
.sub-title {
text-align: left;
font-size: 14px;
font-family: open sans, tahoma, sans-serif;
font-weight: 700;
}
.text-tagihan {
text-align: left;
font-size: 42px;
font-family: open sans, tahoma, sans-serif;
}
.disabled-background {
background: #b7b7b7;
}
.input-cash {
width: 100%;
padding: 8px 14px;
box-sizing: border-box;
border: 2px solid grey;
border-radius: 4px;
font-size: 22px;
font-weight: 700;
text-align: right;
}
.input-plain {
width: 100%;
padding: 4px 8px;
box-sizing: border-box;
border: 2px solid grey;
border-radius: 4px;
font-size: 14px;
}
.v-input,
.v-input__slot,
.v-messages {
margin: 0px;
padding: 0px;
min-height: 0px;
}
.v-input--selection-controls:not(.v-input--hide-details) .v-input__slot {
margin-bottom: 0px;
}
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
background: white;
border: 1px solid #ddd;
}
th,
td {
border-top: 1px solid #ddd;
border-collapse: collapse;
padding: .75rem 1.25rem;
}
table>tr>td {
padding: .75rem 1.25rem;
}
table>tr>td:first {
padding-left: 15px !important;
}
.mini-input .v-input {
margin-top: 0px;
}
.mini-input .v-input,
.mini-input .v-input--selection-controls,
.mini-input .v-input__slot {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 3px;
}
.mini-input .v-messages {
min-height: 0px;
}
.border-bottom-dashed {
border-bottom: 1px dashed rgba(0, 0, 0, .12);
}
</style>
<script>
module.exports = {
components: {
'one-field-verification': httpVueLoader('../../common/oneFieldVerificationSupply.vue'),
'one-dialog-print': httpVueLoader('../../common/oneDialogPrintX.vue'),
'one-fo-supervisor-dialog-read': httpVueLoader('./oneFoSupervisorDialogRead.vue'),
'one-fo-supervisor-dialog-alias': httpVueLoader('./oneFoSupervisorDialogAlias.vue'),
'one-fo-supervisor-dialog-void': httpVueLoader('./oneFoSupervisorDialogVoid.vue'),
'one-fo-supervisor-dialog-supplies': httpVueLoader('./oneFoSupervisorDialogSupplies.vue'),
'one-fo-supervisor-dialog-barcode': httpVueLoader('./oneFoSupervisorDialogBarcode.vue'),
'one-fo-supervisor-dialog-delivery': httpVueLoader('./oneFoSupervisorDialogDelivery.vue'),
'one-fo-supervisor-dialog-verify': httpVueLoader('./oneFoSupervisorDialogVerify.vue'),
'one-fo-supervisor-dialog-order': httpVueLoader('./oneFoSupervisorDialogOrder.vue'),
'one-fo-supervisor-dialog-test': httpVueLoader('./oneFoSupervisorDialogTest.vue'),
'one-fo-supervisor-dialog-test-replace': httpVueLoader('./oneFoSupervisorDialogTestReplace.vue'),
'one-fo-supervisor-dialog-packet': httpVueLoader('./oneFoSupervisorDialogPacket.vue'),
'one-fo-supervisor-dialog-promise': httpVueLoader('./oneFoSupervisorDialogPromise.vue'),
'one-dialog-print': httpVueLoader('../../common/oneDialogPrintX.vue')
},
data() {
return {
checkbox: true,
radioGroup: 1,
switchCash: true,
switchDebit: false,
switchKredit: false,
dialog: false,
urlprintnote: '',
printtitle: '',
printwidth: 600,
openprintcontrol: false
}
},
computed: {
status_data_patient() {
return this.$store.state.supervisor.status_data_patient
},
notes() {
return this.$store.state.patient.notes
},
messagetype() {
return this.$store.state.patient.message_type
},
statusact() {
return this.$store.state.patient.status_act
},
selstatus() {
return this.$store.state.patient.selected_status
},
xselstatus() {
return this.$store.state.patient.selected_patient.status
},
selpat() {
return this.$store.state.patient.selected_patient
},
snackbar: {
get() {
return this.$store.state.patient.snackbar
},
set(val) {
this.$store.commit("patient/update_snackbar", val)
}
},
},
methods: {
colorBtn(asli, dinamis) {
if (asli === dinamis)
return true
else
return false
},
changeAct(note, idx) {
let valnow = note.chex === 'N' ? 'Y' : 'N'
note.chex = valnow
var notes = this.$store.state.patient.notes
notes[idx] = note
},
alias() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("order/update_alias_doctor", this.selpat.alias)
this.$store.commit("supervisor/update_save_status", 0)
this.$store.commit("supervisor/update_dialog_alias", true)
}
},
read() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("supervisor/update_read_message", "")
this.$store.commit("supervisor/update_save_status", 0)
this.$store.commit("supervisor/update_read_dialog_message", "Akankah akan dibaca ?")
this.$store.commit("supervisor/update_read_dialog", true)
}
},
xvoid() {
console.log(this.selpat)
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("supervisor/update_void_message", "")
this.$store.commit("supervisor/update_save_status", 0)
this.$store.commit("supervisor/update_void_dialog_message", "Yakin akan membatalkan order " + this.$store.state.patient.selected_patient.labnumber + " ?")
this.$store.commit("supervisor/update_void_dialog", true)
}
},
verify() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("supervisor/update_verify_message", "")
this.$store.commit("supervisor/update_save_status", 0)
this.$store.commit("supervisor/update_verify_dialog_message", "Yakin, akan verify ?")
this.$store.commit("supervisor/update_verify_dialog", true)
}
},
opensupplies() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.dispatch("supplies/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.commit("supplies/update_supplies_message", "")
this.$store.commit("supplies/update_save_status", 0)
this.$store.commit("supplies/update_supplies_dialog", true)
}
},
openflagmcu() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.dispatch("supervisor/flagmcu", { orderid: this.$store.state.patient.selected_patient.orderid, value: 'Y' })
}
},
releaseflagmcu() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.dispatch("supervisor/flagmcu", { orderid: this.$store.state.patient.selected_patient.orderid, value: 'N' })
}
},
openbarcode() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.dispatch("barcode/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.commit("barcode/update_barcode_message", "")
this.$store.commit("barcode/update_save_status", 0)
this.$store.commit("barcode/update_barcode_dialog", true)
}
},
opendelivery() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.dispatch("delivery/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.commit("delivery/update_delivery_message", "")
this.$store.commit("delivery/update_save_status", 0)
this.$store.commit("delivery/update_status_done", this.$store.state.patient.selected_patient.donedelivery)
this.$store.commit("delivery/update_delivery_dialog", true)
}
},
openorder() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("order/update_order_message", "")
this.$store.commit("order/update_save_status", 0)
this.$store.commit("order/update_order_dialog", true)
this.$store.dispatch("order/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
}
},
opentest() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("test/update_test_dialog", 1)
this.$store.commit("testreplace/update_test_dialog", 0)
this.$store.commit("packet/update_test_dialog", 0)
this.$store.commit("test/update_test_all", [])
this.$store.dispatch("test/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.dispatch("test/lookup_promises", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.commit("test/update_test_message", "")
this.$store.commit("test/update_save_status", 0)
this.$store.commit("test/update_save_status_verification", 0)
this.$store.commit("test/update_show_cito_dropdown", "N")
this.$store.commit("test/update_selected_cito", {})
}
},
opentestreplace() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("testreplace/update_test_all", [])
this.$store.dispatch("testreplace/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.dispatch("testreplace/lookup_promises", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.commit("testreplace/update_test_message", "")
this.$store.commit("testreplace/update_save_status", 0)
this.$store.commit("testreplace/update_save_status_verification", 0)
this.$store.commit("testreplace/update_show_cito_dropdown", "N")
this.$store.commit("testreplace/update_selected_cito", {})
this.$store.commit("testreplace/update_test_dialog", 1)
this.$store.commit("test/update_test_dialog", 0)
this.$store.commit("packet/update_test_dialog", 0)
}
},
openpacket() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("packet/update_test_all", [])
this.$store.dispatch("packet/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.dispatch("packet/lookup_promises", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.commit("packet/update_test_message", "")
this.$store.commit("packet/update_save_status", 0)
this.$store.commit("packet/update_save_status_verification", 0)
this.$store.commit("packet/update_show_cito_dropdown", "N")
this.$store.commit("packet/update_selected_cito", {})
this.$store.commit("packet/update_test_dialog", 1)
this.$store.commit("testreplace/update_test_dialog", 0)
this.$store.commit("test/update_test_dialog", 0)
}
},
openpromise() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.dispatch("promise/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.commit("promise/update_promise_message", "")
this.$store.commit("promise/update_save_status", 0)
this.$store.commit("promise/update_promise_dialog", true)
}
},
printControlCard() {
if (!_.isEmpty(this.selpat, true)) {
var orderid = this.$store.state.patient.selected_patient.orderid
this.printwidth = 950
this.printtitle = ""
let user = one_user()
var rpt = 'rpt_fo_001'
var xdatetime = Date.now()
this.urlprintnote = "/birt/run?__report=report/one/lab/" + rpt + ".rptdesign&__format=pdf&username=" + user.M_UserUsername + "&PID=" + orderid + "&tm=" + xdatetime
this.openprintcontrol = true
}
}
}
}
</script>