Initial import

This commit is contained in:
sas.fajri
2026-05-25 20:01:37 +07:00
commit 710d7c1b97
10371 changed files with 2381698 additions and 0 deletions

View File

@@ -0,0 +1,445 @@
<template>
<v-layout class="fill-height" column>
<v-toolbar color="blue lighten-3" dark height="50px">
<v-toolbar-title>KATEGORI JADWAL & KUOTA</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn @click="openFormSubCategory(0)" icon>
<v-icon>library_add</v-icon>
</v-btn>
</v-toolbar>
<v-snackbar v-model="snackbar">
{{ msg_snackbar }}
<v-btn color="pink" text @click="snackbar = false">
tutup
</v-btn>
</v-snackbar>
<v-card>
<v-layout 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)}" @click="selectMe(props.item)">
{{props.item.T_SubCategoryName}}
</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
{{props.item.ispcr}}
</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
{{props.item.isschedule}}
</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
{{props.item.iskuota}}
</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
<v-icon small class="ml-3" color="primary" @click="editFormSubgroup(props.item)">edit</v-icon>
<!-- <v-icon small class="ml-3" color="error" @click="deleteFormSubgroup(props.item)">clear</v-icon> -->
</td>
</template>
</v-data-table>
</v-flex>
</v-layout>
</v-card>
<template>
<v-layout row justify-center>
<v-dialog v-model="dialogsubgroup" persistent max-width="750px">
<v-card>
<v-card-title>
<span class="headline">FORM KATEGORI</span>
</v-card-title>
<v-card-text class="pt-0 pb-0">
<v-form ref="formsubgroupsubgroup" v-model="validsubgroup" lazy-validation>
<v-layout wrap>
<v-flex xs12>
<v-text-field v-model="xname" label="Nama*" :rules="xnameRules" required></v-text-field>
</v-flex>
<v-flex xs12>
<v-checkbox v-model="ispcr" label="Sebagai PCR ?"></v-checkbox>
</v-flex>
<v-flex xs12>
<v-checkbox v-model="isschedule" label="Ada Jadwal ?"></v-checkbox>
</v-flex>
<v-flex xs12>
<v-checkbox v-model="iskuota" label="Ada Kuota ?"></v-checkbox>
</v-flex>
<v-flex>
<p v-for="(xerror,idx) in xerrors" class="error pl-2 pr-2" style="color:#fff">{{xerror.msg}}</p>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" flat @click="updateDialogFormSubgroup()">Tutup</v-btn>
<v-btn color="blue darken-1" flat @click="saveFormSubgroup()">Simpan</v-btn>
</v-card-actions>
</v-form>
</v-card>
</v-dialog>
</v-layout>
</template>
<template>
<v-dialog v-model="dialogdeletealertsubgroup" max-width="30%">
<v-card>
<v-card-title class="headline grey lighten-2 pt-2 pb-2" primary-title>
Peringatan !
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex xs12 d-flex>
<v-layout row>
<v-flex pb-1 xs12>
<v-layout row>
<v-flex pt-2 pr-2 xs12>
{{msgalertsubgroup}}
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="primary" flat @click="dialogdeletealertsubgroup = false">
Tutup
</v-btn>
<v-btn color="primary" flat @click="closeDeleteAlertSubgroup()">
Yakin lah
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
</v-layout>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot {
min-height: 60px;
}
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'),
'one-x-check': httpVueLoader('../../../common/onexcheck.vue')
},
mounted() {
this.$store.dispatch("samplesend/search", {
lastid: -1
})
this.$store.dispatch("samplesend/selectcategory")
},
methods: {
isSelected(p) {
return p.T_SubCategoryID == this.$store.state.samplesend.selected_patient.T_SubCategoryID
},
searchPatient() {
this.$store.dispatch("samplesend/search", {
lastid: -1
})
},
selectMe(pat) {
var patients = this.$store.state.samplesend.patients
this.$store.commit("samplesend/update_selected_patient", pat)
var idx = _.findIndex(patients, function (o) {
return o.Nat_JpaID == pat.Nat_JpaID && o.T_SubCategoryID == pat.T_SubCategoryID
})
this.$store.commit("samplesend/update_last_id", idx)
this.$store.dispatch("samplestorage/search", {
code: this.$store.state.samplestorage.code,
name: this.$store.state.samplestorage.name,
status: this.$store.state.samplestorage.selected_status.id,
jpagroup: pat.T_SubCategoryID,
current_page: 1,
lastid: -1
})
},
openFormSubCategory(val) {
this.xid = val
this.xname = ''
this.ispcr = false
this.isschedule = false
this.iskuota = false
this.$store.commit("samplesend/update_dialog_form_subgroup", true)
},
editFormSubgroup(val) {
this.xid = val.id
this.xname = val.T_SubCategoryName
this.ispcr = val.T_SubCategoryIsPCR === 'N' ? false : true
this.isschedule = val.T_SubCategoryIsSchedule === 'N' ? false : true
this.iskuota = val.T_SubCategoryIsKuota === 'N' ? false : true
this.$store.commit("samplesend/update_dialog_form_subgroup", true)
},
updateDialogFormSubgroup() {
this.$store.commit("samplesend/update_dialog_form_subgroup", false)
},
saveFormSubgroup() {
if (this.$refs.formsubgroupsubgroup.validate()) {
if (this.in_saving) return;
this.in_saving = true;
this.$store.dispatch("samplesend/save", {
xid: this.xid,
name: this.xname,
ispcr: this.ispcr === true ? "Y" : "N",
isschedule: this.isschedule === true ? "Y" : "N",
iskuota: this.iskuota === true ? "Y" : "N"
})
}
},
deleteFormSubgroup(data) {
this.xid = data.id
this.msgalertsubgroup = "Yakin, mau hapus kategori ini?"
this.dialogdeletealertsubgroup = true
},
closeDeleteAlertSubgroup() {
this.$store.dispatch("samplesend/delete", {
xid: this.xid,
current_page: this.curr_page,
ssubgroup: this.xsearch
})
this.dialogdeletealertsubgroup = false
},
xedit(value) {
var patients = this.$store.state.samplesend.patients
var idx = _.findIndex(patients, function (o) {
return o.Nat_JpaID == pat.Nat_JpaID && o.T_SubCategoryID == pat.T_SubCategoryID
})
patients[idx].open_edit = 'Y'
this.$store.commit("samplesend/update_patients", patients)
},
saveEdit(value) {
var prm = value
this.$store.dispatch("samplesend/save", prm)
},
xdelete(value) {
var prm = {
id: value.Nat_JPADetailID,
status: 'N'
}
this.$store.dispatch("samplesend/save", prm)
},
insertNewJPA() {
var prm = {
id: 0,
value: this.new_jpa
}
this.$store.dispatch("samplesend/savejpagroup", prm)
},
saveJPAGroupNew() {
var prm = {
id: 0,
value: this.value_new_jpa_group
}
this.$store.dispatch("samplesend/savelistingjpagroup", prm)
},
openlisting() {
this.$store.commit("samplesend/update_dialog_jpa_group", true)
this.$store.dispatch("samplesend/search_listing", {})
},
saveEditJpaGroup(value, status) {
var prm = {
id: value.T_SubCategoryID,
name: value.T_SubCategoryName,
status: status
}
this.$store.dispatch("samplesend/saveEditJpaGroup", prm)
},
changeDetail(value) {
var details = this.$store.state.samplesend.patients
var idx = _.findIndex(details, function (o) {
return o.Nat_JpaID == value.Nat_JpaID && o.T_SubCategoryID == value.T_SubCategoryID
})
details[idx].Nat_JPADetailDiscount = value.Nat_JPADetailDiscount
this.$store.commit("samplesend/update_patients", details)
},
savedetail() {
var prm = {
details: this.$store.state.samplesend.patients
}
this.$store.dispatch("samplesend/savealljpadetail", prm)
},
changejpagroupinlist(value) {
var details = this.$store.state.samplesend.jpa_groups
var idx = _.findIndex(details, function (o) {
return o.T_SubCategoryID == value.T_SubCategoryID
})
details[idx].T_SubCategoryName = value.T_SubCategoryName
this.$store.commit("samplesend/update_jpa_groups", details)
}
},
computed: {
snackbar: {
get() {
return this.$store.state.samplecall.alert_success
},
set(val) {
this.$store.commit("samplecall/update_alert_success", val)
}
},
jpagroups() {
return this.$store.state.samplesend.jpa_groups
},
value_new_jpa_group: {
get() {
return this.$store.state.samplesend.value_new_jpa_group
},
set(val) {
this.$store.commit("samplesend/update_value_new_jpa_group", val)
}
},
dialogjpagrup: {
get() {
return this.$store.state.samplesend.dialog_jpa_group
},
set(val) {
this.$store.commit("samplesend/update_dialog_jpa_group", val)
}
},
in_saving: {
get() {
return this.$store.state.samplesend.in_saving
},
set(val) {
this.$store.commit("samplesend/update_in_saving", val)
}
},
snackbar: {
get() {
return this.$store.state.samplesend.alert_success
},
set(val) {
this.$store.commit("samplesend/update_alert_success", val)
}
},
msg_snackbar: {
get() {
return this.$store.state.samplesend.msg_snackbar
},
set(val) {
this.$store.commit("samplesend/update_msg_snackbar", val)
}
},
isLoading() {
return this.$store.state.samplesend.search_status == 1
},
patients() {
return this.$store.state.samplesend.patients
},
xselectedpatient: {
get() {
return this.$store.state.samplesend.selected_patient
},
set(val) {
this.$store.commit("samplesend/update_selected_patient", val)
}
},
new_jpa: {
get() {
return this.$store.state.samplesend.new_jpa
},
set(val) {
this.$store.commit("samplesend/update_new_jpa", val)
}
},
xerrors() {
return this.$store.state.samplesend.errors
},
dialogsubgroup() {
return this.$store.state.samplesend.dialog_form_subgroup
},
xcategorys() {
return this.$store.state.samplesend.categorys
},
xcategory: {
get() {
return this.$store.state.samplesend.category
},
set(val) {
this.$store.commit("samplesend/update_category", val)
}
},
},
data() {
return {
open_edit: false,
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
items: [],
page: 1,
ispcr: false,
iskuota: false,
isschedule: false,
xname: '',
xid: 0,
validsubgroup: false,
dialogdeletealertsubgroup: false,
msgalertsubgroup: "",
xnameRules: [
v => !!v || 'Nama harus diisi'
],
headers: [{
text: "NAMA",
align: "left",
sortable: false,
value: "mr",
width: "50%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "PCR",
align: "left",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "JADWAL",
align: "left",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "KUOTA",
align: "left",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "AKSI",
align: "left",
sortable: false,
value: "mr",
width: "100%",
class: "pa-2 blue lighten-3 white--text"
}
]
}
}
}
</script>

View File

@@ -0,0 +1,329 @@
<template>
<div>
<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-layout wrap>
<v-flex xs12>
<v-card color="light-blue">
<v-layout align-center justify-center row shrink fill-height>
<v-flex xs2>
<v-img
:src="xselected_patient.M_PatientPhotoThumb"
:lazy-src="xselected_patient.M_PatientPhotoThumb"
aspect-ratio="1"
width="100%"
class="light-blue"
contain
>
</v-flex>
<v-flex xs10>
<v-card tile flat elevation="1">
<v-layout pt-1 pl-2 pb-1 pr-2 row>
<v-flex>
<v-subheader style="color:black;height:auto;padding:0px">
<h3 style="font-size:x-large" class="font-weight-bold">{{ xselected_patient.T_OrderHeaderLabNumber }}</h3>
<v-flex text-md-right>
<span @click="callPatient()" v-if="xselected_patient.statusid === '0' || xselected_patient.statusid === '2'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text info"><v-icon dark>volume_up</v-icon></span>
<span @click="skip()" v-if="xselected_patient.statusid === '1' || xselected_patient.statusid === '3'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text black"><v-icon dark>fast_rewind</v-icon></span>
<span @click="processNow(xselected_patient.statusid)" v-if="xselected_patient.statusid === '1'" v-bind:class="{ 'warning':xselected_patient.statusid === '1','grey':xselected_patient.statusid !== '1' }" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text"><v-icon dark>loop</v-icon></span>
</v-flex>
</v-subheader>
</v-flex>
</v-layout>
<v-layout pl-2 pr-2 row>
<v-flex xs4>
<v-layout column>
<v-flex pt-1>
<v-text-field
v-model=" xselected_patient.M_PatientNoReg"
label="PID"
readonly
hide-details
>
</v-text-field>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs8 pl-2>
<v-layout column>
<v-flex pt-1 >
<v-layout row>
<v-flex xs4>
<v-text-field
v-model="xselected_patient.patient_dob"
label="Tanggal lahir"
readonly
hide-details
>
</v-text-field>
</v-flex>
<v-flex xs8 pl-1>
<v-text-field
v-model=" xselected_patient.T_OrderHeaderM_PatientAge"
label="Umur"
readonly
hide-details
>
</v-text-field>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout pb-2 pt-1 pl-2 pr-2 row>
<v-flex xs8>
<v-text-field
v-model=" xselected_patient.patient_fullname"
label="Nama"
readonly
hide-details
>
</v-text-field>
</v-flex>
<v-flex xs4 pl-1>
<v-text-field
v-model="xselected_patient.M_PatientHP"
label="HP"
readonly
hide-details
>
</v-text-field>
</v-flex>
</v-layout>
</v-card>
</v-flex>
</v-layout>
</v-card>
</v-flex>
</v-layout>
<!--<v-card v-if="xselected_patient">
<v-layout row>
<v-flex xs12 pa-2>
<v-layout align-center row>
<v-flex xs2>
<v-card>
<v-img
:src="xselected_patient.M_PatientPhotoThumb"
aspect-ratio="1"
class="grey lighten-2 elevation-2"
>
</v-img>
</v-card>
</v-flex>
<v-flex xs10 pl-2 pt-1>
<v-card>
<v-layout pa-2 row>
<v-flex>
<v-subheader style="color:black;height:auto;padding:0px">
<h3 style="font-size:x-large" class="font-weight-bold">{{ xselected_patient.T_OrderHeaderLabNumber }}</h3>
<v-flex text-md-right>
<span @click="callPatient()" v-if="xselected_patient.statusid === '0' || xselected_patient.statusid === '2'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text info"><v-icon dark>volume_up</v-icon></span>
<span @click="skip()" v-if="xselected_patient.statusid === '1' || xselected_patient.statusid === '3'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text black"><v-icon dark>fast_rewind</v-icon></span>
<span @click="processNow(xselected_patient.statusid)" v-if="xselected_patient.statusid === '1'" v-bind:class="{ 'warning':xselected_patient.statusid === '1','grey':xselected_patient.statusid !== '1' }" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text"><v-icon dark>loop</v-icon></span>
</v-flex>
</v-subheader>
</v-flex>
</v-layout>
<v-layout pa-2 row wrap>
<v-flex xs4>
<v-layout column>
<v-flex pt-1>
<v-text-field
v-model=" xselected_patient.M_PatientNoReg"
label="PID"
readonly
hide-details
>
</v-text-field>
</v-flex>
<v-flex pt-1 >
<v-text-field
v-model=" xselected_patient.patient_fullname"
label="Nama"
readonly
hide-details
>
</v-text-field>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs8 pl-2>
<v-layout column>
<v-flex pt-1 >
<v-layout row>
<v-flex xs4>
<v-text-field
v-model="xselected_patient.patient_dob"
label="Tanggal lahir"
readonly
hide-details
>
</v-text-field>
</v-flex>
<v-flex xs8 pl-1>
<v-text-field
v-model=" xselected_patient.T_OrderHeaderM_PatientAge"
label="Umur"
readonly
hide-details
>
</v-text-field>
</v-flex>
</v-layout>
</v-flex>
<v-flex pt-1>
<v-text-field
v-model="xselected_patient.M_PatientHP"
label="HP"
readonly
hide-details
>
</v-text-field>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-card>
</v-flex>
</v-layout>
</v-flex>
</v-layout> -->
</div>
</template>
<style scoped>
</style>
<script>
module.exports = {
data: () => ({
}),
computed: {
xselected_patient:{
get() {
return this.$store.state.samplecall.selected_patient
},
set(val) {
this.$store.commit("samplecall/update_selected_patient",val)
}
},
xdialogaction:{
get() {
return this.$store.state.samplecall.dialog_action
},
set(val) {
this.$store.commit("samplecall/update_dialog_action",val)
}
},
xmsgaction:{
get() {
return this.$store.state.samplecall.msg_action
},
set(val) {
this.$store.commit("samplecall/update_msg_action",val)
}
}
},
methods : {
closeDialogAction(){
var act = this.$store.state.samplecall.act
var sample = this.$store.state.samplecall.selected_sampletype
var status = 1
if(act === 'process'){
status = 3
}
if(act === 'skip'){
status = 2
}
if(act === 'samplingprocess'){
status = 3
}
if(act === 'samplingdone'){
status = 4
}
var patient = this.$store.state.samplecall.selected_patient
var lastid = this.$store.state.samplecall.last_id
this.$store.dispatch("samplecall/doaction",{
act:act,
id:patient.T_OrderHeaderID,
name:this.name,
nolab:this.nolab,
stationid: patient.T_SampleStationID,
statusid:this.$store.state.samplecall.selected_status.id,
statusnextid : status,
sample:sample,
lastid:lastid,
staff:this.$store.state.samplecall.staff
})
},
callPatient(){
//var patient = this.$store.state.samplecall.selected_patient
//var msg = "Anda yakin akan melakukan panggilan kepada pasien "+patient.patient_fullname+" ? "
//this.$store.commit("samplecall/update_msg_action",msg)
this.$store.commit("samplecall/update_act",'call')
this.closeDialogAction()
//this.$store.commit("samplecall/update_dialog_action",true)
},
processNow(value){
if(value === '1'){
//var patient = this.$store.state.samplecall.selected_patient
//var msg = "Anda yakin akan merubah status <span style='color:ff5252;font-weight:bold'>PROCESS</span> untuk pasien "+patient.patient_fullname+" ? "
//this.$store.commit("samplecall/update_msg_action",msg)
this.$store.commit("samplecall/update_act",'process')
this.closeDialogAction()
//this.$store.commit("samplecall/update_dialog_action",true)
}
},
skip(){
//var patient = this.$store.state.samplecall.selected_patient
//var msg = "Anda yakin akan merubah status <span style='color:ff5252;font-weight:bold'>SKIP</span> untuk pasien "+patient.patient_fullname+" ? "
//this.$store.commit("samplecall/update_msg_action",msg)
this.$store.commit("samplecall/update_act",'skip')
this.closeDialogAction()
//this.$store.commit("samplecall/update_dialog_action",true)
},
patient_photo(){
var photo = "https://www.sgm-inc.com/wp-content/uploads/2014/06/no-profile-male-img.gif"
if(this.xselected_patient.M_PatientPhoto){
photo = this.xselected_patient.M_PatientPhoto
}
console.log(photo)
return photo
}
}
}
</script>

View File

@@ -0,0 +1,193 @@
<template>
<v-layout class="fill-height" column>
<v-card class="mb-2 pa-2 searchbox">
<v-layout align-center row>
<v-flex xs4>
<v-text-field class="ma-1" style="font-size:14px" label="JPA BARU" outline v-model="new_jpa" hide-details></v-text-field>
</v-flex>
<v-flex xs2>
<span title="tambahkan jpa baru" v-if="new_jpa !== ''" @click="insertNewJPA()" class="icon-medium-fill-base primary"><v-icon dark>add</v-icon></span>
</v-flex>
</v-layout>
</v-card>
<v-card>
<v-layout 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)}" @click="selectMe(props.item)">
<span v-if="props.item.open_edit === 'N'">{{ props.item.Nat_JpaName }}</span>
<v-text-field v-if="props.item.open_edit === 'Y'" class="ma-1" style="font-size:14px" single-line @change="changejpa(props.item)"
v-model="props.item.Nat_JpaName" hide-details></v-text-field>
</td>
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
<div>
<span title="simpan" v-if="props.item.open_edit === 'Y'" @click="saveEdit(props.item)" class="icon-medium-fill-base-small info"><v-icon dark>save</v-icon></span>
<span v-if="props.item.open_edit === 'N'" title="edit" @click="xedit(props.item)" class="icon-medium-fill-base-small info"><v-icon dark>edit</v-icon></span>
<span v-if="props.item.open_edit === 'N'" title="hapus" @click="xdelete(props.item)" class="icon-medium-fill-base-small red"><v-icon dark>delete</v-icon></span>
</div>
</td>
</template>
</v-data-table>
</v-flex>
</v-layout>
</v-card>
<!--<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>-->
</v-layout>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot {
min-height: 60px;
}
.searchbox .v-btn {
min-height: 60px;
}
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'),
'one-x-check': httpVueLoader('../../../common/onexcheck.vue')
},
mounted() {
this.$store.dispatch("samplecall/search", {
lastid: -1
})
},
methods: {
isSelected(p) {
return p.Nat_JpaID == this.$store.state.samplecall.selected_patient.Nat_JpaID
},
searchPatient() {
this.$store.dispatch("samplecall/search", {
lastid: -1
})
},
selectMe(pat) {
var patients = this.$store.state.samplecall.patients
this.$store.commit("samplecall/update_selected_patient", pat)
var idx = _.findIndex(patients, function (o) {
return o.Nat_JpaID == pat.Nat_JpaID
})
this.$store.commit("samplecall/update_last_id", idx)
this.$store.dispatch("samplesend/search", pat)
},
xedit(value) {
var patients = this.$store.state.samplecall.patients
var idx = _.findIndex(patients, function (o) {
return o.Nat_JpaID == value.Nat_JpaID
})
patients[idx].open_edit = 'Y'
this.$store.commit("samplecall/update_patients", patients)
},
saveEdit(value) {
var patients = this.$store.state.samplecall.patients
var idx = _.findIndex(patients, function (o) {
return o.Nat_JpaID == value.Nat_JpaID
})
patients[idx].open_edit = 'N'
patients[idx].Nat_JpaName = value.Nat_JpaName
var prm = patients[idx]
prm.status = 'Y'
prm.id = patients[idx].Nat_JpaID
this.$store.dispatch("samplecall/save", prm)
},
xdelete(value) {
var prm = {
id: value.Nat_JpaID,
value: value.Nat_JpaName,
status: 'N'
}
this.$store.dispatch("samplecall/save", prm)
},
insertNewJPA() {
var prm = {
id: 0,
value: this.new_jpa
}
this.$store.dispatch("samplecall/save", prm)
},
changejpa(value) {
var patients = this.$store.state.samplecall.patients
var idx = _.findIndex(patients, function (o) {
return o.Nat_JpaID == value.Nat_JpaID
})
patients[idx].open_edit = 'Y'
patients[idx].Nat_JpaName = value.Nat_JpaName
this.$store.commit("samplecall/update_patients", patients)
}
},
computed: {
snackbar: {
get() {
return this.$store.state.samplecall.alert_success
},
set(val) {
this.$store.commit("samplecall/update_alert_success", val)
}
},
isLoading() {
return this.$store.state.samplecall.search_status == 1
},
patients() {
return this.$store.state.samplecall.patients
},
xselectedpatient: {
get() {
return this.$store.state.samplecall.selected_patient
},
set(val) {
this.$store.commit("samplecall/update_selected_patient", val)
}
},
new_jpa: {
get() {
return this.$store.state.samplecall.new_jpa
},
set(val) {
this.$store.commit("samplecall/update_new_jpa", val)
}
},
},
data() {
return {
open_edit: false,
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
items: [],
page: 1,
headers: [{
text: "JPA",
align: "left",
sortable: false,
value: "mr",
width: "80%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "AKSI",
align: "center",
sortable: false,
value: "status",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
}
]
};
}
}
</script>

View File

@@ -0,0 +1,649 @@
<template>
<v-layout class="fill-height" column>
<v-dialog v-model="dialogsuccess" persistent max-width="290">
<v-card>
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
<v-card-text>
{{msgsuccess}}
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-card class="mb-2 pa-2 searchbox">
<v-layout>
<v-text-field class="xs3 pr-1" v-model="code" label="Kode" outline hide-details></v-text-field>
<v-text-field class="xs3 pr-1" v-model="name" label="Nama" outline hide-details></v-text-field>
<v-select class="mini-select xs3 pr-1" :items="xstatuses" item-text="name" return-object v-model="xselectedstatus" label="Status"
outline hide-details></v-select>
<span @click="searchTransaction" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>
<!--<span @click="openprintformat" class="icon-medium-fill-base xs1 white--text grey darken-1 ml-1 icon-print"></span>-->
<!--<span @click="openform" class="icon-medium-fill-base xs1 white--text primary ml-1 icon-add"></span>-->
</v-layout>
</v-card>
<v-card>
<v-layout row>
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
<v-data-table :headers="headers" :items="xtransactions" :loading="isLoading" hide-actions class="elevation-1">
<template slot="items" slot-scope="props">
<td class="text-xs-left pa-1" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_TestSasCode }}</td>
<td class="text-xs-left pa-1" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_TestName}}</td>
<td class="text-xs-center pa-1" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
<div>
<v-btn @click="changeBtnFlag(props.item)" v-if="props.item.status === 'N'" small color="error">
<v-icon left>close</v-icon> Belum dipilih</v-btn>
<v-btn @click="changeBtnFlag(props.item)" v-if="props.item.status === 'Y'" small color="success">
<v-icon left>check</v-icon> Sudah terpilih</v-btn>
</div>
</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="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()"
@close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
<one-dialog-print :title="printtitle" :width="printwidth" :height="500" :status="openprint" :urlprint="urlprint" @close-dialog-print="closePrint"></one-dialog-print>
</v-layout>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot {
min-height: 60px;
}
.searchbox .v-btn {
min-height: 60px;
}
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'),
'one-dialog-print': httpVueLoader('../../../common/oneDialogPrintX.vue')
},
mounted() {
// this.$store.dispatch("samplestorage/getinitdatas")
/*this.$store.dispatch("samplestorage/search",{
code:this.code,
name: this.name,
status:this.xselectedstatus.id,
jpagroup:this.$store.state.samplesend.selected_patient.T_SubCategoryID,
current_page:1,
lastid:-1
})*/
},
methods: {
checkError(value) {
var errors = this.$store.state.samplestorage.errors
if (errors.includes(value)) {
return true
} else {
return false
}
},
formatDate(date) {
if (!date) return null
const [year, month, day] = date.split('-')
return `${day}-${month}-${year}`
},
deFormatedDate(date) {
if (!date) return null
const [day, month, year] = date.split('-')
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
},
isSelected(p) {
return p.T_TestID == this.$store.state.samplestorage.selected_transaction.T_TestID
},
searchTransaction() {
this.$store.commit("samplestorage/update_current_page", 1)
this.$store.dispatch("samplestorage/search", {
code: this.code,
name: this.name,
status: this.xselectedstatus.id,
jpagroup: this.$store.state.samplesend.selected_patient.T_SubCategoryID,
current_page: 1,
lastid: -1
})
},
selectMe(trx) {
if (this.$store.state.samplestorage.no_save == 0) {
console.log(trx)
this.$store.commit("samplestorage/update_selected_transaction", trx)
this.$store.commit("samplestorage/update_act", 'edit')
} else {
this.$store.commit("samplestorage/update_open_alert_confirmation", true)
}
},
closeAlertConfirmation() {
this.$store.commit("samplestorage/update_open_alert_confirmation", false)
},
forgetAlertConfirmation() {
this.$store.commit("samplestorage/update_no_save", 0)
this.$store.commit("samplestorage/update_open_alert_confirmation", false)
},
updateAlert_success(val) {
this.$store.commit("samplestorage/update_alert_success", val)
},
setNewTransaction() {
this.$store.commit("samplestorage/update_selected_transaction", {})
this.$store.commit("samplestorage/update_act", 'new')
this.$store.commit("form/update_transaction_number", "")
this.$store.commit("form/update_transaction_date", moment(new Date()).format('DD-MM-YYYY'))
this.$store.commit("form/update_transaction_time", moment(new Date()).format("hh:mm"))
this.$store.commit("form/update_transaction_note", '')
this.$store.commit("form/update_details", [])
},
closeDialogSuccess() {
let arrtrx = this.$store.state.samplestorage.transactions
var idx = _.findIndex(arrtrx, item => item.T_SampleStorageID === this.$store.state.samplestorage.last_id)
console.log(idx)
this.$store.dispatch("samplestorage/search", {
code: this.code,
name: this.name,
current_page: 1,
lastid: idx
})
this.$store.commit("samplestorage/update_dialog_success", false)
},
closeDialogInfo() {
this.$store.commit("samplestorage/update_open_dialog_info", false)
},
changeBtnFlag(value) {
if (this.in_saving) return;
this.in_saving = true;
var newval = value.status === 'N' ? 'Y' : 'N'
var prm = value
prm.status = newval
prm.jpagroupid = this.$store.state.samplesend.selected_patient.T_SubCategoryID
prm.paramsearch = {
code: this.code,
name: this.name,
status: this.xselectedstatus.id,
jpagroup: this.$store.state.samplesend.selected_patient.T_SubCategoryID,
current_page: this.curr_page,
lastid: -1
}
this.$store.dispatch("samplestorage/save", prm)
},
openform() {
this.$store.commit("samplestorage/update_errors", [])
this.$store.commit("samplestorage/update_act", 'new')
this.$store.commit("samplestorage/update_code_exist", 'N')
this.$store.commit("samplestorage/update_subgroups", [])
this.$store.commit("samplestorage/update_subsubgroups", [])
this.$store.commit("samplestorage/update_units", [])
this.$store.commit("samplestorage/update_samples", [])
var xform = {
code: '',
name: '',
shortname: '',
codebarcode: '',
worklistname: '',
xgroup: {},
subgroup: {},
subsubgroup: {},
type: {},
unit: {},
fontsize: '',
fontcolor: '',
flaggluc: '',
nonlab: {
id: "",
name: "LAB"
},
flagbold: 'N',
flagitalic: 'N',
flagquantitative: 'N',
deltacheck: 'N',
trendanalysis: 'N',
isresult: 'N',
isprice: 'N',
printresult: 'N',
printnote: 'N',
isworklist: 'N',
sample: {},
flaglow: '',
flaghigh: ''
}
this.$store.commit("samplestorage/update_xform", xform)
this.dialognew = true
},
openEdit(value) {
this.$store.commit("samplestorage/update_errors", [])
this.$store.commit("samplestorage/update_act", 'edit')
this.$store.commit("samplestorage/update_code_exist", 'N')
this.$store.commit("samplestorage/update_subgroups", [])
this.$store.commit("samplestorage/update_subsubgroups", [])
this.$store.commit("samplestorage/update_units", [])
this.$store.commit("samplestorage/update_samples", [])
this.$store.dispatch("samplestorage/getdataselected", value)
},
openprintformat() {
this.formatreport = 'pdf'
this.dialogchooseprint = true
},
doPrint() {
console.log('doprint')
this.dialogchooseprint = false
this.printwidth = 1028
this.printtitle = ""
let user = one_user()
var d = new Date();
var n = d.getTime()
var rptname = 'test_nasional'
var formatrpt = this.formatreport
this.urlprint = "/birt/run?__report=report/nasional/masterdata/" + rptname + ".rptdesign&__format=" +
formatrpt + "&username=" + user.M_UserUsername + "&tm=" + n
this.openprint = true
},
closePrint() {
this.openprint = false
},
saveData() {
this.$store.commit("samplestorage/update_errors", [])
var errors = this.$store.state.samplestorage.errors
if (this.$store.state.samplestorage.code_exist === 'Y' && this.$store.state.samplestorage.act ===
'new') {
errors.push("requirecodeexist")
}
if (this.xform.code === '') {
errors.push("requirecode")
}
if (this.xform.code.length !== 8) {
errors.push("requirecodedigit")
}
if (this.xform.name === '') {
errors.push("requirename")
}
if (_.isEmpty(this.xform.xgroup)) {
errors.push("requiregrup")
}
if (_.isEmpty(this.xform.subgroup)) {
errors.push("requiresubgrup")
}
if (_.isEmpty(this.xform.subsubgroup)) {
errors.push("requiresubsubgrup")
}
if (_.isEmpty(this.xform.type)) {
errors.push("requiretype")
}
if (_.isEmpty(this.xform.nonlab)) {
errors.push("requirenonlab")
}
if (this.xform.isresult === 'Y') {
if (_.isEmpty(this.xform.unit)) {
errors.push("requireunit")
}
if (_.isEmpty(this.xform.sample)) {
errors.push("requiresample")
}
}
if (errors.length === 0) {
var searchprm = {
code: this.code,
name: this.name,
current_page: 1,
lastid: -1
}
var prm = this.$store.state.samplestorage.xform
prm.paramsearch = searchprm
prm.act = this.$store.state.samplestorage.act
this.$store.dispatch("samplestorage/save", prm)
}
},
thr_search_unit: _.debounce(function () {
this.$store.dispatch("samplestorage/searchunit", this.search_unit)
}, 2000),
thr_search_sample: _.debounce(function () {
this.$store.dispatch("samplestorage/searchsample", this.search_sample)
}, 2000),
checkCodeExist(code) {
this.$store.dispatch("samplestorage/checkcodeexist", {
code: code
})
},
openAddTest(value) {
this.$store.commit("samplestorage/update_errors", [])
this.codefrom = value.T_TestCode
this.codetoward = this.$store.state.samplestoragesas.selected_transaction.T_TestSasCode
this.dialogaddtest = true
},
doAddTest() {
this.$store.commit("samplestorage/update_errors", [])
var errors = this.$store.state.samplestorage.errors
if (this.codetoward.length <= 8)
errors.push("lenghtcodetoward")
if (this.codetoward.length % 2 !== 0)
errors.push("falseformat")
console.log(errors)
if (errors.length === 0) {
this.dialogaddtest = false
var prm = {}
prm.codefrom = this.codefrom
prm.codetoward = this.codetoward
var searchprm = {
code: this.$store.state.samplestoragesas.xcode,
name: this.$store.state.samplestoragesas.xname,
current_page: this.$store.state.samplestoragesas.current_page,
lastid: -1
}
prm.paramsearch = searchprm
this.$store.dispatch("samplestorage/doaddtest", prm)
}
}
},
computed: {
xstatuses: {
get() {
return this.$store.state.samplestorage.statuses
},
set(val) {
this.$store.commit("samplestorage/update_statuses", val)
}
},
xselectedstatus: {
get() {
return this.$store.state.samplestorage.selected_status
},
set(val) {
this.$store.commit("samplestorage/update_selected_status", val)
}
},
dialognew: {
get() {
return this.$store.state.samplestorage.dialognew
},
set(val) {
this.$store.commit("samplestorage/update_dialognew", val)
}
},
in_saving: {
get() {
return this.$store.state.samplestorage.in_saving
},
set(val) {
this.$store.commit("samplestorage/update_in_saving", val)
}
},
code: {
get() {
return this.$store.state.samplestorage.code
},
set(val) {
this.$store.commit("samplestorage/update_code", val)
}
},
name: {
get() {
return this.$store.state.samplestorage.name
},
set(val) {
this.$store.commit("samplestorage/update_name", val)
}
},
dialogsuccess: {
get() {
return this.$store.state.samplestorage.dialog_success
},
set(val) {
this.$store.commit("samplestorage/update_dialog_success", val)
}
},
msgsuccess() {
return this.$store.state.samplestorage.msg_success
},
snackbar: {
get() {
return this.$store.state.samplestorage.alert_success
},
set(val) {
this.$store.commit("samplestorage/update_alert_success", val)
}
},
isLoading() {
return this.$store.state.samplestorage.search_status == 1
},
xact() {
return this.$store.state.samplestorage.act
},
xdatestart: {
get() {
return this.$store.state.samplestorage.start_date
},
set(val) {
this.$store.commit("samplestorage/update_start_date", val)
}
},
xdateend: {
get() {
return this.$store.state.samplestorage.end_date
},
set(val) {
this.$store.commit("samplestorage/update_end_date", val)
}
},
filterComputedDateFormattedStart() {
return this.formatDate(this.xdatestart)
},
filterComputedDateFormattedEnd() {
return this.formatDate(this.xdateend)
},
xtransactions() {
console.log(this.$store.state.samplestorage.transactions)
return this.$store.state.samplestorage.transactions
},
openalertconfirmation: {
get() {
return this.$store.state.samplestorage.open_alert_confirmation
},
set(val) {
this.$store.commit("samplestorage/update_open_alert_confirmation", val)
}
},
opendialoginfo: {
get() {
return this.$store.state.samplestorage.open_dialog_info
},
set(val) {
this.$store.commit("samplestorage/update_open_dialog_info", false)
}
},
msginfo() {
return this.$store.state.samplestorage.msg_info
},
curr_page: {
get() {
return this.$store.state.samplestorage.current_page
},
set(val) {
this.$store.commit("samplestorage/update_current_page", val)
this.$store.dispatch("samplestorage/search", {
code: this.code,
name: this.name,
status: this.xselectedstatus.id,
jpagroup: this.$store.state.samplesend.selected_patient.T_SubCategoryID,
current_page: val,
lastid: -1
})
}
},
xtotal_page: {
get() {
return this.$store.state.samplestorage.total_page
},
set(val) {
this.$store.commit("samplestorage/update_total_page", val)
}
},
xform: {
get() {
return this.$store.state.samplestorage.xform
},
set(val) {
this.$store.commit("samplestorage/update_xform", val)
}
},
groups: {
get() {
return this.$store.state.samplestorage.groups
},
set(val) {
this.$store.commit("samplestorage/update_groups", val)
}
},
subgroups: {
get() {
return this.$store.state.samplestorage.subgroups
},
set(val) {
this.$store.commit("samplestorage/update_subgroups", val)
}
},
subsubgroups: {
get() {
return this.$store.state.samplestorage.subsubgroups
},
set(val) {
this.$store.commit("samplestorage/update_subsubgroups", val)
}
},
types: {
get() {
return this.$store.state.samplestorage.types
},
set(val) {
this.$store.commit("samplestorage/update_types", val)
}
},
units: {
get() {
return this.$store.state.samplestorage.units
},
set(val) {
this.$store.commit("samplestorage/update_units", val)
}
},
nonlabs: {
get() {
return this.$store.state.samplestorage.nonlabs
},
set(val) {
this.$store.commit("samplestorage/update_nonlabs", val)
}
},
samples: {
get() {
return this.$store.state.samplestorage.samples
},
set(val) {
this.$store.commit("samplestorage/update_samples", val)
}
},
selected_group: {
get() {
return this.$store.state.samplestorage.xform.xgroup
},
set(val) {
this.xform.xgroup = val
this.$store.commit("samplestorage/update_xform", this.xform)
this.$store.dispatch("samplestorage/get_subgroups", val)
this.$store.dispatch("samplestorage/get_subsubgroups", val)
}
}
},
watch: {
search_unit(val, old) {
if (val == old) return
if (!val) return
if (val.length < 1) return
if (this.$store.state.samplestorage.update_autocomplete_status == 1) return
this.thr_search_unit()
},
search_sample(val, old) {
if (val == old) return
if (!val) return
if (val.length < 1) return
if (this.$store.state.samplestorage.update_autocomplete_status == 1) return
this.thr_search_sample()
}
},
data() {
return {
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
menufilterdatestart: false,
menufilterdateend: false,
date: new Date().toISOString().substr(0, 10),
items: [],
dialogaddtest: false,
codefrom: '',
codetoward: '',
dialogchooseprint: false,
openprint: false,
urlprint: '',
printtitle: '',
printwidth: 600,
formatreport: 'pdf',
page: 1,
search_unit: '',
search_sample: '',
headers: [{
text: "KODE",
align: "left",
sortable: false,
width: "10%",
class: "pa-1 blue lighten-3 white--text"
},
{
text: "NAMA",
align: "left",
sortable: false,
width: "25%",
class: "pa-1 blue lighten-3 white--text"
},
{
text: "AKSI",
align: "center",
sortable: false,
width: "10%",
class: "pa-1 blue lighten-3 white--text"
}
],
pagination: {
descending: false,
page: 1,
rowsPerPage: 5,
sortBy: 'T_SampleStorageDate',
totalItems: this.$store.state.samplestorage.total_transactions
}
};
}
}
</script>