Flatten nested repos

This commit is contained in:
sas.fajri
2026-04-27 10:13:31 +07:00
parent 01c2963a43
commit 8347aef8f4
17935 changed files with 5015229 additions and 3 deletions

View File

@@ -0,0 +1,138 @@
<template>
<v-dialog
v-model="show"
width="40%"
>
<v-card>
<v-card-title
class="headline white--text primary"
primary-title
v-html="patient_info"
>
</v-card-title>
<v-card-text>
<ul class="mb-2">
<li>
Order {{order_tgl}} by {{order_user}}
<div v-if="fo_note != ''" class="mb-2 pa-2 " style="background:rgba(230, 255, 255)" >
{{fo_note}}
</div>
</li>
<li>
Screening {{ver_tgl}} by {{ver_user}}
<div v-if="ver_note != ''" class="mb-2 pa-2 " style="background:rgba(230, 255, 255)" >
{{ver_note}}
</div>
</li>
</ul>
<v-layout row>
<v-flex xs12>
<v-textarea
outline
label="Catatan"
v-model="comment"
></v-textarea>
</v-flex>
</v-layout>
<v-layout mb-2 row>
<v-flex xs12>
<v-progress-linear :active="loading" :indeterminate="true">
</v-progress-linear>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="grey"
dark
flat
text
@click="close_dialog"
>
Tutup
</v-btn>
<v-btn
color="primary"
dark
flat
text
@click="saveComment()"
>
Simpan
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
methods: {
async saveComment() {
await this.$store.dispatch("comment/save")
this.$store.commit("comment/update_show",false)
},
close_dialog() {
this.$store.commit("comment/update_show",false)
}
},
computed: {
ver_user() {
let p = this.$store.state.comment.history
return p.verStaffName
},
ver_tgl() {
let p = this.$store.state.comment.history
return moment(p.verDate).format('DD.MM.YYYY HH:mm')
},
ver_note() {
let p = this.$store.state.comment.history
if ( p.verNote == null ) return ''
return p.verNote
},
fo_note() {
let p = this.$store.state.comment.history
return p.T_OrderHeaderFoNote
},
order_tgl() {
let p = this.$store.state.comment.history
return moment(p.T_OrderHeaderDate).format('DD.MM.YYYY HH:mm')
},
order_user() {
let p = this.$store.state.comment.history
return p.foStaffName
},
patient_info() {
let patient = this.$store.state.comment.patient
return patient.T_OrderHeaderLabNumber +
"<span style='color:yellow;margin-left:5px;margin-right:5px;padding:2px;'>[" + patient.T_OrderHeaderLabNumberExt + "]</span>" +
"&nbsp;&nbsp;&nbsp;" + patient.M_PatientName
},
loading() {
return this.$store.state.comment.loading
},
show: {
get() { return this.$store.state.comment.show },
set(v) { this.$store.state.commit("comment/update_show",v)}
},
comment: {
get() {
let note = this.$store.state.comment.patient.T_OrderHeaderSamplingNote
if ( note == null ) return ''
return note
},
set(v) {
let patient = this.$store.state.comment.patient
patient.T_OrderHeaderSamplingNote = v
this.$store.commit("comment/update_patient",patient)
}
}
},
}
</script>

View File

@@ -0,0 +1,76 @@
<template>
<div v-show="show" class="orderbox">
<h3>
Daftar Pemeriksaan
<v-progress-circular
style="height: 20px"
v-show="loading"
:indeterminate="true"
>
</v-progress-circular>
</h3>
<div class="px" v-for="order in orders">
{{ order.name }}
</div>
</div>
</template>
<style scoped>
.orderbox {
z-index: 0;
background-color: rgba(230, 255, 230, 0.9);
color: #004d00;
padding: 20px;
border-radius-top: 10px;
overflow-y: scroll;
overflow-x: hidden;
}
.px {
padding: 5px;
width: 280px;
border: 1px solid #004d00;
display: inline-block;
margin: 0px 2px 0px 2px;
}
</style>
<script>
let ts = "?ts=" + moment().format("YYYYMMDDHHmmss");
module.exports = {
data() {
return {
orderHeaderID: 0,
};
},
components: {
//'one-fpp':httpVueLoader('../../../../apps/components/oneFpp.vue' + ts),
},
computed: {
orders() {
return this.$store.state.order_info.orders;
},
loading() {
return this.$store.state.order_info.loading;
},
show: {
get() {
return this.$store.state.order_info.show;
},
set(v) {
return this.$store.commit("order_info/update_show", v);
},
},
sel_patient() {
return this.$store.state.samplecall.selected_patient;
},
},
methods: {},
watch: {
async sel_patient(n, o) {
this.$store.dispatch("order_info/search", { id: n.T_OrderHeaderID });
this.orderHeaderID = n.T_OrderHeaderID;
},
},
};
</script>

View File

@@ -0,0 +1,117 @@
<template>
<v-dialog
v-model="show"
width="40%"
>
<v-card>
<v-card-title
class="headline white--text primary"
primary-title
v-html="patient_info"
>
</v-card-title>
<v-card-text style="font-size:16px;">
<ul >
<li v-if="have_note">
Catatan FO <span style="color:brown;padding:2px">[{{user}}]</span>
<div>
{{fo_note()}}
</div>
</li>
<li v-if="have_ver_note">
Catatan FO Verifikasi<span style="color:brown;padding:2px">[{{ver_user}}]</span>
<div>
{{ver_note()}}
</div>
</li>
<li v-for="req in requirements" >
{{get_position(req)}}
<div >
{{get_detail(req)}}
</div>
</li>
</ul>
</v-card-text>
<v-progress-linear :active="loading" :indeterminate="true">
</v-progress-linear>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="grey"
dark
flat
text
@click="close_dialog"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
methods: {
get_position(req) {
if( req.Nat_PositionName == null ) return ''
return req.Nat_PositionName.toUpperCase()
},
get_detail(req) {
return req.Requirement
},
close_dialog() {
this.$store.commit("req/update_show",false)
},
fo_note() {
return this.$store.state.req.note.T_OrderHeaderFoNote
},
ver_note() {
return this.$store.state.req.note.T_OrderHeaderVerificationNote
},
},
computed: {
user() {
return this.$store.state.req.note.Fo_User
},
have_note() {
let note = this.$store.state.req.note.T_OrderHeaderFoNote
if (note == null ) return false
return note != ''
},
have_ver_note() {
let note = this.$store.state.req.note
if ( note.T_OrderHeaderVerificationNote == null ) return false
return note.T_OrderHeaderVerificationNote != ''
},
ver_user() {
return this.$store.state.req.note.Ver_User
},
requirements() {
return this.$store.state.req.requirements
},
patient_info() {
let patient = this.$store.state.req.patient
return patient.T_OrderHeaderLabNumber +
"<span style='color:yellow;margin-left:5px;margin-right:5px;padding:2px;'>[" + patient.T_OrderHeaderLabNumberExt + "]</span>" +
"&nbsp;&nbsp;&nbsp;" + patient.M_PatientName
},
loading() {
return this.$store.state.req.loading
},
show: {
get() { return this.$store.state.req.show},
set(v) { this.$store.commit("req/update_show",v)}
},
reqs() {
return this.$store.state.req.requirements
}
},
}
</script>

View File

@@ -0,0 +1,529 @@
<template>
<v-layout class="mb-2 mt-2" column>
<one-req></one-req>
<one-comment></one-comment>
<v-dialog v-model="dialognote" width="40%">
<v-card>
<v-card-title class="headline white--text error" primary-title>
</v-card-title>
<v-card-text>
<v-layout v-if="selected_patient.fo_note != ''" mb-2 row>
<v-flex mb-2 xs3>
<span style="color: #0e6fbc" class="mono name">Catatan </span>
</v-flex>
<v-flex xs9>
<v-layout row>
<v-flex mb-1 xs12>
<code style="
box-shadow: none !important;
color: #0e6fbc !important;
background-color: #2196f34d !important;
">front office</code>
<div class="v-markdown">
<p style="margin-top: 2px; margin-bottom: 0">
{{ selected_patient.fo_note }}
</p>
</div>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout v-if="xnoterequirement.length > 0" mb-2 row>
<v-flex mb-2 xs3>
<span style="color: #c0341d" class="mono name">Requirement </span>
</v-flex>
<v-flex xs9>
<v-layout v-for="notereq in xnoterequirement" row>
<v-flex mb-1 xs12>
<code style="
box-shadow: none !important;
color: #c0341d !important;
background-color: #fbe5e1 !important;
">{{ notereq.position }}</code>
<div class="v-markdown">
<p style="margin-top: 2px; margin-bottom: 0">
{{ notereq.requirements }}
</p>
</div>
</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="grey" dark flat text @click="dialognote = false">
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogformnote" width="40%">
<v-card>
<v-card-title class="headline white--text primary" primary-title>
</v-card-title>
<v-card-text>
<v-layout mb-2 row>
<v-flex xs12>
<v-textarea outline label="Catatan" v-model="selected_patient.sampling_note"></v-textarea>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="grey" dark flat text @click="searchPatientLastSelect">
Tutup
</v-btn>
<v-btn color="primary" dark flat text @click="saveNoteSampling()">
Simpan
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogrequirement" persistent max-width="45%">
<v-card>
<v-card-title color="success" class="headline">Pilih yang tidak terpenuhi</v-card-title>
<v-card-text>
<v-layout wrap>
<v-flex v-for="(req, idx) in requirements" xs6>
<one-x-check :xdatalabel="req.name" :xdatacbx="req.chex"
@update-data-cbx="(val) => checkReq(val, idx)"></one-x-check>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="green darken-1" flat @click="saveRequirement">Tutup</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-card style="overflow-y: auto; max-height: 550px" v-if="xsampletypes.length > 0">
<v-layout row>
<v-flex xs12>
<v-subheader style="background: #03a9f4; padding: 5px">
<v-icon dark large left>assignment_ind</v-icon>
<h3 style="font-size: x-large" dark class="font-weight-bold white--text">
{{ staff.name.toUpperCase() }}
</h3>
<v-flex text-md-right>
<v-btn v-if="
selected_patient.fo_note !== '' ||
selected_patient.fo_ver_note !== '' ||
selected_patient.fo_requirements_status !== 'Y' ||
selected_patient.fo_verification_status !== 'X'
" @click="openDialogFoNoteRequirement()" style="min-width: 20px; margin-left: 1px; margin-right: 1px"
deppressed small color="error"><v-icon small>info</v-icon></v-btn>
<v-btn @click="openDialogFormNote()" style="min-width: 20px; margin-left: 1px; margin-right: 1px"
deppressed small color="warning"><v-icon small>speaker_notes</v-icon></v-btn>
</v-flex>
</v-subheader>
<v-divider></v-divider>
<v-layout align-center pa-2 mb-1 class="grey lighten-2" row>
<v-flex xs4> SPECIMEN / PEMERIKSAAN </v-flex>
<v-flex xs3> BARCODE </v-flex>
<v-flex xs2> REQUIREMENT </v-flex>
<v-flex class="text-xs-center" xs3> AKSI </v-flex>
</v-layout>
<v-layout pb-1 row v-for="(sampletype, idx) in xsampletypes" :key="sampletype.T_BarcodeLabBarcode">
<v-flex xs12>
<v-layout align-center class="pa-2 grey lighten-4" row>
<v-flex pl-2 xs4>
{{ sampletype.sampletype_name }}
</v-flex>
<v-flex xs3>
<span v-if="sampletype.is_sampling === 'X'" style="text-decoration: line-through" class="red--text">{{
sampletype.T_BarcodeLabBarcode }}</span>
<span v-if="sampletype.is_sampling !== 'X'">{{
sampletype.barcode
}}</span>
</v-flex>
<v-flex xs2>
<div v-if="
selected_patient.status === 'Process' ||
selected_patient.status === 'Done'
">
<!-- TODO: Field: sampletype.requirement_status pakai apa? -->
<span @click="openDialogRequirement(sampletype, idx)" v-bind:class="{
white: sampletype.requirement_status === 'X',
error: sampletype.requirement_status === 'N',
}" class="icon-medium-fill-base-small white"><v-icon
:dark="sampletype.requirement_status === 'N'">close</v-icon></span>
<span @click="confirmRequirement(sampletype, idx)" v-bind:class="{
white: sampletype.requirement_status === 'X',
success: sampletype.requirement_status === 'Y',
}" class="icon-medium-fill-base-small white"><v-icon
:dark="sampletype.requirement_status === 'Y'">check</v-icon></span>
</div>
<div v-if="
selected_patient.status === 'New' ||
selected_patient.status === 'Call' ||
selected_patient.status === 'Skip'
">
-
</div>
</v-flex>
<v-flex class="text-xs-center" xs3>
<v-btn v-if="
selected_patient.status === 'Process' ||
selected_patient.status === 'Done'
" style="margin: 3px 2px" small color="warning">{{ sampletype.sampling_date }}
{{ sampletype.sample_time }}</v-btn>
<v-btn v-if="
selected_patient.status === 'Process' &&
sampletype.is_sampling === 'Y' &&
sampletype.requirement_status !== 'X'
" @click="receiveSample(sampletype)" style="margin: 3px 2px" small color="success">{{
sampletype.done_date }}
{{ sampletype.receive_time }}</v-btn>
<v-btn depressed dark v-if="
selected_patient.status === 'Process' &&
sampletype.is_received === 'N' &&
sampletype.requirement_status === 'X'
" style="margin: 3px 2px" small color="grey">00-00-0000 00:00</v-btn>
<div v-if="
selected_patient.status === 'New' ||
selected_patient.status === 'Call' ||
selected_patient.status === 'Skip'
">
-
</div>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-divider></v-divider>
<!-- TODO: Hilangkan -->
<!-- <v-layout row>
<v-flex xs12>
<v-layout wrap>
<v-flex v-for="inf in info" :key="inf.id" pb-1 pl-1 pr-1 xs3>
<v-btn block small color="primary" v-bind:class="{
success: inf.status_bahan === 'R',
warning: inf.status_bahan === 'P',
}" dark>{{ inf.T_BahanName }}</v-btn>
</v-flex>
</v-layout>
</v-flex>
</v-layout> -->
</v-card>
</v-layout>
</template>
<style scoped>
.overline {
font-size: 0.625rem !important;
font-weight: 400;
letter-spacing: 0.1666666667em !important;
line-height: 1rem;
text-transform: uppercase;
}
.redcode {
box-shadow: none !important;
color: #c0341d !important;
background-color: #fbe5e1 !important;
}
</style>
<script>
let ts = "?ts=" + moment().format("YYYYMMDDHHmmss");
module.exports = {
components: {
"one-x-check": httpVueLoader("../../common/onexcheck.vue"),
"one-req": httpVueLoader("./oneRequirement.vue" + ts),
"one-comment": httpVueLoader("./oneComment.vue" + ts),
},
data: () => ({
checkbox: false,
//dialognote:false,
dialognotecolor: "warning",
// msgnote:''
}),
computed: {
xnoterequirement() {
return this.$store.state.samplecall.note_requirement;
},
xsampletypes() {
return this.$store.state.samplecall.sampletypes;
},
xstatus() {
return this.$store.state.samplecall.selected_status;
},
selected_patient() {
return this.$store.state.samplecall.selected_patient;
},
dialogrequirement: {
get() {
return this.$store.state.samplecall.dialog_requirement;
},
set(val) {
this.$store.commit("samplecall/update_dialog_requirement", val);
},
},
dialognote: {
get() {
return this.$store.state.samplecall.dialog_note;
},
set(val) {
this.$store.commit("samplecall/update_dialog_note", val);
},
},
dialogformnote: {
get() {
return this.$store.state.samplecall.dialog_form_note;
},
set(val) {
this.$store.commit("samplecall/update_dialog_form_note", val);
},
},
msgnote: {
get() {
return this.$store.state.samplecall.msg_note;
},
set(val) {
this.$store.commit("samplecall/update_msg_note", val);
},
},
requirements: {
get() {
return this.$store.state.samplecall.requirements;
},
set(val) {
this.$store.commit("samplecall/update_requirements", val);
},
},
info: {
get() {
return this.$store.state.samplecall.information_bahan;
},
set(val) {
this.$store.commit("samplecall/update_information_bahan", val);
},
},
staff: {
get() {
return this.$store.state.samplecall.staff;
},
set(val) {
this.$store.commit("samplecall/update_staff", val);
},
},
},
methods: {
processSample(sampletype) {
var patient = this.$store.state.samplecall.selected_patient;
var msg =
"Anda yakin akan melakukan proses untuk " +
sampletype.T_SampleTypeName +
" dari " +
patient.patient_fullname +
" ? ";
this.$store.commit("samplecall/update_msg_action", msg);
this.$store.commit("samplecall/update_act", "samplingprocess");
this.$store.commit("samplecall/update_selected_sampletype", sampletype);
this.$store.commit("samplecall/update_dialog_action", true);
},
doneSample(sampletype) {
var patient = this.$store.state.samplecall.selected_patient;
var msg =
"Anda yakin proses untuk " +
sampletype.T_SampleTypeName +
" dari " +
patient.patient_fullname +
" telah selesai ? ";
this.$store.commit("samplecall/update_msg_action", msg);
this.$store.commit("samplecall/update_act", "samplingdone");
this.$store.commit("samplecall/update_selected_sampletype", sampletype);
this.$store.commit("samplecall/update_dialog_action", true);
},
printBarcodeGroup() {
var id = this.selected_patient.T_OrderHeaderID;
one_print_barcode_so_group(id);
},
printBarcode(sampletype) {
var id = sampletype.T_OrderDetailID;
one_print_barcode_so(id);
},
openDialogRequirement(value, idx) {
if (value.status === "D" && value.requirement_status === "Y") {
} else {
this.$store.commit("samplecall/update_selected_sample", value);
var sampletypes = this.$store.state.samplecall.sampletypes;
sampletypes[idx].requirement_status = "N";
this.$store.commit(
"samplecall/update_requirements",
sampletypes[idx].requirements
);
this.$store.commit("samplecall/update_dialog_requirement", true);
}
},
confirmRequirement(value, idx) {
if (value.status === "P") {
var sampletypes = this.$store.state.samplecall.sampletypes;
sampletypes[idx].requirement_status = "Y";
this.$store.commit("samplecall/update_sampletypes", sampletypes);
sampletypes[idx].requirements.forEach((el) => {
el.chex = "N";
});
}
},
saveRequirement() {
//console.log(this.$store.state.samplecall.selected_sample)
var sampletypes = this.$store.state.samplecall.sampletypes;
var selected_sample = this.$store.state.samplecall.selected_sample;
var idx = _.findIndex(sampletypes, function (o) {
return o.T_BarcodeLabBarcode == selected_sample.T_BarcodeLabBarcode;
});
if (sampletypes[idx].status === "P") {
sampletypes[idx].requirements =
this.$store.state.samplecall.requirements;
}
this.$store.commit("samplecall/update_dialog_requirement", false);
},
checkReq(val, idx) {
var xrequirements = this.requirements;
console.log(xrequirements[idx]);
if (xrequirements[idx].T_OrderSampleReceive === "N") {
xrequirements[idx].chex = val;
this.$store.commit("samplecall/update_requirements", xrequirements);
}
},
receiveSample(value) {
var goaction = true;
if (value.requirement_status === "N") {
var req_check = _.filter(value.requirements, function (o) {
return o.chex === "Y";
});
if (req_check.length === 0) {
goaction = false;
}
}
if (
value.T_OrderSampleReceive === "N" &&
value.requirement_status !== "X" &&
goaction
) {
this.$store.commit("samplecall/update_act", "samplingdone");
var prm = this.selected_patient;
prm.id = this.selected_patient.T_OrderHeaderID;
prm.act = "samplingdone";
prm.sample = value;
prm.staff = this.$store.state.samplecall.staff;
prm.search = {
xdate: this.$store.state.samplecall.start_date,
name: this.$store.state.samplecall.name,
nolab: this.$store.state.samplecall.nolab,
stationid: this.$store.state.samplecall.selected_station.id,
statusid: this.$store.state.samplecall.selected_status.id,
companyid: this.$store.state.samplecall.selected_company.id,
lastid: this.$store.state.samplecall.last_id,
locationid: this.$store.state.samplecall.selected_location.locationID,
};
this.$store.dispatch("samplecall/receivesample", prm);
} else {
//console.log('oeey')
if (value.status === "P") {
this.$store.commit(
"samplecall/update_msg_info",
"Jalan - jalan ke gunung merapi, Requirement-nya tolong dilengkapi"
);
this.$store.commit("samplecall/update_open_dialog_info", true);
}
}
},
addNewLabel(sampletype) {
this.$store.commit("samplecall/update_selected_sampletype", sampletype);
var sample = sampletype.T_SampleTypeName;
var patient = this.$store.state.samplecall.selected_patient;
var msg =
"Anda yakin akan melakukan penambahan label spesimen " +
sample +
" untuk pasien " +
patient.patient_fullname +
" ? ";
this.$store.commit("samplecall/update_msg_action", msg);
this.$store.commit("samplecall/update_act", "addnewlabel");
//this.closeDialogAction()
this.$store.commit("samplecall/update_dialog_action", true);
},
openDialogNote() {
this.msgnote = '<p><code color="red">catatan dari fo : </code></p>';
this.msgnote +=
"<p>" +
this.$store.state.samplecall.selected_patient.T_OrderHeaderFoNote +
"</p>";
this.dialognotecolor = "warning";
this.dialognote = true;
},
openDialogFormNote() {
//this.dialogformnote = true
//WIP
this.$store.commit("comment/update_show", true);
this.$store.commit(
"comment/update_patient",
this.$store.state.samplecall.selected_patient
);
this.$store.dispatch("comment/load");
},
openDialogFoNoteRequirement() {
var prm = this.$store.state.samplecall.selected_patient;
this.$store.commit("req/update_patient", prm);
this.$store.dispatch("req/load");
this.$store.commit("req/update_show", true);
// this.$store.dispatch("samplecall/getdatanoterequirement",prm)
},
searchPatientLastSelect() {
this.dialogformnote = false;
this.$store.dispatch("samplecall/search", {
xdate: this.$store.state.samplecall.start_date,
name: this.$store.state.samplecall.name,
nolab: this.$store.state.samplecall.nolab,
stationid: this.$store.state.samplecall.selected_station.id,
statusid: this.$store.state.samplecall.selected_status.id,
companyid: this.$store.state.samplecall.selected_company.id,
lastid: this.$store.state.samplecall.last_id,
locationid: this.$store.state.samplecall.selected_location.locationID,
});
},
saveNoteSampling() {
var prm = this.$store.state.samplecall.selected_patient;
prm.search = {
xdate: this.$store.state.samplecall.start_date,
name: this.$store.state.samplecall.name,
nolab: this.$store.state.samplecall.nolab,
stationid: this.$store.state.samplecall.selected_station.id,
statusid: this.$store.state.samplecall.selected_status.id,
companyid: this.$store.state.samplecall.selected_company.id,
lastid: this.$store.state.samplecall.last_id,
locationid: this.$store.state.samplecall.selected_location.locationID,
};
this.$store.dispatch("samplecall/savenotesampling", prm);
},
},
};
</script>

View File

@@ -0,0 +1,423 @@
<template>
<v-layout class="fill-height" column>
<v-card class="mb-2 pa-2 searchbox">
<v-layout row>
<v-flex class="xs2 pr-2">
<v-menu v-model="menufilterdatestart" :close-on-content-click="false" :nudge-right="40" lazy
transition="scale-transition" offset-y full-width max-width="290px" min-width="290px">
<template v-slot:activator="{ on }">
<v-text-field v-model="filterComputedDateFormattedStart" label="Tanggal" style="font-size: 14px" outline
hide-details readonly v-on="on"
@blur="date = deFormatedDate(filterComputedDateFormattedStart)"></v-text-field>
</template>
<v-date-picker v-model="xdatestart" no-title @input="menufilterdatestart = false"></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs3>
<v-text-field style="font-size: 14px" label="Cari..." placeholder="No Reg / Nama" class="mr-1" outline
v-model="nolab" hide-details></v-text-field>
</v-flex>
<v-flex xs3>
<v-autocomplete label="Kel. Pelanggan" v-model="selected_company" class="ml-1" :items="xcompanies"
:search-input.sync="search_company" auto-select-first hide-details style="font-size: 14px" outline no-filter
item-text="name" return-object :loading="isLoading" no-data-text="Semua Kel. Pelanggan">
<template slot="item" slot-scope="{ item }">
<v-list-tile-content>
<v-list-tile-title v-text="item.name"></v-list-tile-title>
</v-list-tile-content>
</template>
</v-autocomplete>
</v-flex>
<v-flex xs3>
<v-select class="mini-select ml-1" :items="xstations" item-text="name" return-object style="font-size: 14px"
v-model="xselectedstation" label="Station" outline hide-details></v-select>
</v-flex>
<!-- <v-flex xs2>
<v-select class="mini-select ml-1" :items="locations" item-text="locationName" return-object
style="font-size: 14px" v-model="selected_location" label="Lokasi" outline hide-details></v-select>
</v-flex> -->
<v-flex xs1>
<span @click="searchPatient" class="icon-medium-fill-base white--text success iconsearch-search"></span>
</v-flex>
</v-layout>
</v-card>
</v-layout>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot {
min-height: 60px;
}
.searchbox .v-btn {
min-height: 60px;
}
table,
td,
th {
border: 0.5px solid rgba(0, 0, 0, 0.12);
text-align: left;
}
table {
border-collapse: collapse;
width: 100%;
}
table.v-table tbody td,
table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
.fixed_header tbody {
display: block;
max-height: 630px;
overflow-y: scroll;
}
.fixed_header thead,
tbody tr {
display: table;
width: 100%;
table-layout: fixed;
}
</style>
<script>
module.exports = {
components: {
"one-dialog-info": httpVueLoader("../../common/oneDialogInfo.vue"),
"one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
},
mounted() {
//this.$store.dispatch("samplecall/getinitdata")
this.$store.dispatch("samplecall/getstationstatus", {
xdate: this.$store.state.samplecall.start_date,
name: this.name,
nolab: this.nolab,
stationid: this.xselectedstation.id,
statusid: this.xselectedstatus.id,
companyid: this.selected_company.id,
// current_page:1,
lastid: -1,
});
},
methods: {
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")}`;
},
format_date(d) {
return moment(d).format("DD.MM.YYYY");
},
isSelected(p) {
if (p.coming === "Y" || p.iscito === "Y") return false;
else
return (
p.T_OrderHeaderID ==
this.$store.state.samplecall.selected_patient.T_OrderHeaderID
);
},
searchPatient() {
this.$store.commit("samplecall/update_last_id", -1);
this.$store.dispatch("samplecall/search", {
xdate: this.$store.state.samplecall.start_date,
name: this.name,
nolab: this.nolab,
stationid: this.xselectedstation.id,
statusid: this.xselectedstatus.id,
companyid: this.selected_company.id,
locationid: this.selected_location.locationID,
//current_page:1,
lastid: -1,
});
},
selectMe(pat) {
if (this.$store.state.samplecall.no_save == 0) {
var patients = this.$store.state.samplecall.patients;
this.$store.commit("samplecall/update_selected_patient", pat);
var idx = _.findIndex(patients, function (o) {
return o.T_OrderHeaderID == pat.T_OrderHeaderID;
});
this.$store.commit("samplecall/update_last_id", idx);
this.$store.dispatch("samplecall/getsampletypes", {
orderid: pat.T_OrderHeaderID,
stationid: pat.T_SampleStationID,
statusid: pat.statusid,
labnumber: pat.T_OrderHeaderLabNumber,
});
} else {
this.$store.commit("samplecall/update_open_alert_confirmation", true);
}
},
closeAlertConfirmation() {
this.$store.commit("samplecall/update_open_alert_confirmation", false);
},
forgetAlertConfirmation() {
this.$store.commit("samplecall/update_no_save", 0);
this.$store.commit("samplecall/update_open_alert_confirmation", false);
},
updateAlert_success(val) {
this.$store.commit("samplecall/update_alert_success", val);
},
setNewPatient() { },
closeDialogSuccess() {
let arrPatient = this.$store.state.samplecall.patients;
var idx = _.findIndex(
arrPatient,
(item) => item.M_PatientID === this.$store.state.samplecall.last_id
);
console.log(idx);
var xcur_page = 1;
this.$store.dispatch("samplecall/search", {
name: this.name,
nolab: this.nolab,
stationid: this.xselectedstation.id,
statusid: this.xselectedstatus.id,
locationid: this.selected_location.locationID,
lastid: idx,
});
this.$store.commit("samplecall/update_dialog_success", false);
},
closeDialogInfo() {
this.$store.commit("samplecall/update_open_dialog_info", false);
},
thr_search_company: _.debounce(function () {
this.$store.dispatch("samplecall/searchcompany", this.search_company);
}, 2000),
},
computed: {
xdatestart: {
get() {
return this.$store.state.samplecall.start_date;
},
set(val) {
this.$store.commit("samplecall/update_start_date", val);
//this.searchTransaction()
},
},
filterComputedDateFormattedStart() {
return this.formatDate(this.xdatestart);
},
dialogsuccess: {
get() {
return this.$store.state.samplecall.dialog_success;
},
set(val) {
this.$store.commit("samplecall/update_dialog_success", val);
},
},
msgsuccess() {
return this.$store.state.samplecall.msg_success;
},
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;
},
xstations() {
return this.$store.state.samplecall.stations;
},
xselectedstation: {
get() {
return this.$store.state.samplecall.selected_station;
},
set(val) {
this.$store.commit("samplecall/update_selected_station", val);
this.$store.dispatch("samplecall/getLocation", val.id);
this.$store.commit("samplecall/update_patients", []);
this.$store.commit("samplecall/update_selected_patient", {});
this.$store.commit("samplecall/update_sampletypes", []);
// this.searchPatient()
},
},
xstatuses() {
return this.$store.state.samplecall.statuses;
},
xselectedstatus: {
get() {
return this.$store.state.samplecall.selected_status;
},
set(val) {
this.$store.commit("samplecall/update_selected_status", val);
// this.searchPatient()
},
},
patients() {
return this.$store.state.samplecall.patients;
},
openalertconfirmation: {
get() {
return this.$store.state.samplecall.open_alert_confirmation;
},
set(val) {
this.$store.commit("samplecall/update_open_alert_confirmation", val);
},
},
curr_page: {
get() {
return this.$store.state.samplecall.current_page;
},
set(val) {
this.$store.commit("samplecall/update_current_page", val);
this.$store.dispatch("samplecall/search", {
name: this.name,
nolab: this.nolab,
stationid: this.xselectedstation.id,
statusid: this.xselectedstatus.id,
current_page: val,
locationid: this.selected_location.locationID,
lastid: idx,
});
},
},
xtotal_page: {
get() {
return this.$store.state.samplecall.total_page;
},
set(val) {
this.$store.commit("samplecall/update_total_page", val);
},
},
opendialoginfo: {
get() {
return this.$store.state.samplecall.open_dialog_info;
},
set(val) {
this.$store.commit("samplecall/update_open_dialog_info", false);
},
},
msginfo() {
return this.$store.state.samplecall.msg_info;
},
name: {
get() {
return this.$store.state.samplecall.name;
},
set(val) {
this.$store.commit("samplecall/update_name", val);
},
},
nolab: {
get() {
return this.$store.state.samplecall.nolab;
},
set(val) {
this.$store.commit("samplecall/update_nolab", val);
//this.searchPatient()
},
},
xcompanies() {
return this.$store.state.samplecall.companies;
},
selected_company: {
get() {
return this.$store.state.samplecall.selected_company;
},
set(val) {
this.$store.commit("samplecall/update_selected_company", val);
// this.searchPatient()
},
},
selected_location: {
get() {
return this.$store.state.samplecall.selected_location;
},
set(val) {
this.$store.commit("samplecall/update_selected_location", val);
this.$store.commit("samplecall/update_patients", []);
this.$store.commit("samplecall/update_selected_patient", {});
this.$store.commit("samplecall/update_sampletypes", []);
// this.searchPatient()
},
},
locations() {
return this.$store.state.samplecall.locations;
},
},
watch: {
search_company(val, old) {
if (val == old) return;
if (!val) return;
if (val.length < 1) return;
if (this.$store.state.samplecall.update_autocomplete_status == 1) return;
this.thr_search_company();
},
},
data() {
return {
msgalertconfirmation:
"Perubahan yang telah dilakukan belum disimpan dong !",
items: [],
search_company: "",
menufilterdatestart: false,
//isLoading: false,
page: 1,
headers: [
{
text: "TANGGAL",
align: "center",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text",
},
{
text: "NO REG",
align: "center",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text",
},
{
text: "KEL. PELANGGAN",
align: "center",
sortable: false,
value: "lab",
width: "15%",
class: "pa-2 blue lighten-3 white--text",
},
{
text: "NAMA",
align: "center",
sortable: false,
value: "name",
width: "20%",
class: "pa-2 blue lighten-3 white--text",
},
{
text: "STATUS",
align: "center",
sortable: false,
value: "status",
width: "10%",
class: "pa-2 blue lighten-3 white--text",
},
],
};
},
};
</script>

View File

@@ -0,0 +1,253 @@
<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 class="pt-1 pb-1 pr-1" elevation="3" color="light-blue">
<v-layout align-center justify-center row shrink fill-height>
<v-flex xs2>
<v-card flat>
<v-img :src="xselected_patient.M_PatientPhotoThumb"
:lazy-src="xselected_patient.M_PatientPhotoThumb" aspect-ratio="1" width="100%"
class="light-blue" contain>
</v-card>
</v-flex>
<v-flex xs10>
<v-card flat>
<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>
</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>
</div>
</template>
<style scoped></style>
<script>
module.exports = {
data: () => ({
}),
computed: {
selected_location: {
get() {
return this.$store.state.samplecall.selected_location;
},
set(val) {
this.$store.commit("samplecall/update_selected_location", val);
// this.searchPatient()
},
},
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
}
let patients = this.$store.state.samplecall.patients
let last_idx = patients.length - 1
//console.log(last_idx)
let last_patient = patients[last_idx]
//console.log(last_patient)
if (act != 'addnewlabel') {
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,
xdate: this.$store.state.samplecall.start_date,
name: this.$store.state.samplecall.name,
nolab: this.$store.state.samplecall.nolab,
stationid: patient.T_SampleStationID,
statusid: this.$store.state.samplecall.selected_status.id,
orderlocationid: patient.order_location_id,
antritime: patient.antri_time,
skiptime: patient.skip_time,
last_skiptime: last_patient.skip_time,
statusnextid: status,
sample: sample,
lastid: lastid,
locationid: this.selected_location.locationID,
companyid: this.$store.state.samplecall.selected_company.id,
staff: this.$store.state.samplecall.staff
})
}
else {
var patient = this.$store.state.samplecall.selected_patient
var lastid = this.$store.state.samplecall.last_id
this.$store.dispatch("samplecall/addnewlabel", {
act: act,
id: patient.T_OrderHeaderID,
xdate: this.$store.state.samplecall.start_date,
name: this.$store.state.samplecall.name,
nolab: this.$store.state.samplecall.nolab,
stationid: patient.T_SampleStationID,
statusid: this.$store.state.samplecall.selected_status.id,
orderlocationid: patient.order_location_id,
antritime: patient.antri_time,
skiptime: patient.skip_time,
last_skiptime: last_patient.skip_time,
statusnextid: status,
sample: this.$store.state.samplecall.selected_sampletype,
lastid: lastid,
locationid: this.selected_location.locationID,
companyid: this.$store.state.samplecall.selected_company.id,
staff: this.$store.state.samplecall.staff
})
}
},
callPatient() {
this.$store.commit("samplecall/update_act", 'call')
this.closeDialogAction()
},
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,488 @@
<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>
<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 fixed_header"
>
<template slot="items" slot-scope="props">
<td
style="width: 10%;"
class="text-xs-center pa-2"
v-bind:class="{
'amber lighten-4': isSelected(props.item),
'teal white--text': props.item.coming === 'Y',
amber: props.item.iscito === 'Y',
}"
@click="selectMe(props.item)"
>
{{ format_date(props.item.T_OrderHeaderDate) }}
</td>
<td
style="width: 10%;"
class="text-xs-center pa-2"
v-bind:class="{
'amber lighten-4': isSelected(props.item),
'teal white--text': props.item.coming === 'Y',
amber: props.item.iscito === 'Y',
}"
@click="selectMe(props.item)"
>
<p class="mb-0 font-weight-black caption">
{{ props.item.T_OrderHeaderLabNumber }}
</p>
<p
style="color: #800000;"
class="mb-0 font-weight-bold caption"
>
{{ props.item.T_OrderHeaderLabNumberExt }}
</p>
<kbd>{{ props.item.antrianNumber }}</kbd>
</td>
<td
style="width: 15%;"
class="text-xs-center pa-2"
v-bind:class="{
'amber lighten-4': isSelected(props.item),
'teal white--text': props.item.coming === 'Y',
amber: props.item.iscito === 'Y',
}"
@click="selectMe(props.item)"
>
{{ props.item.CorporateName }}
</td>
<td
style="width: 20%;"
class="text-xs-center pa-2"
v-bind:class="{
'amber lighten-4': isSelected(props.item),
'teal white--text': props.item.coming === 'Y',
amber: props.item.iscito === 'Y',
}"
@click="selectMe(props.item)"
>
{{ props.item.patient_fullname }}
</td>
<td
style="width: 10%;"
class="text-xs-center pa-2"
v-bind:class="{
'amber lighten-4': isSelected(props.item),
'teal white--text': props.item.coming === 'Y',
amber: props.item.iscito === 'Y',
}"
@click="selectMe(props.item)"
>
{{ props.item.status }}
</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,
td,
th {
border: 0.5px solid rgba(0, 0, 0, 0.12);
text-align: left;
}
table {
border-collapse: collapse;
width: 100%;
}
table.v-table tbody td,
table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
.fixed_header tbody {
display: block;
max-height: 630px;
overflow-y: scroll;
}
.fixed_header thead,
tbody tr {
display: table;
width: 100%;
table-layout: fixed;
}
</style>
<script>
module.exports = {
components: {
"one-dialog-info": httpVueLoader("../../common/oneDialogInfo.vue"),
"one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
},
mounted() {
//this.$store.dispatch("samplecall/getinitdata")
this.$store.dispatch("samplecall/getstationstatus", {
xdate: this.$store.state.samplecall.start_date,
name: this.name,
nolab: this.nolab,
stationid: this.xselectedstation.id,
statusid: this.xselectedstatus.id,
companyid: this.selected_company.id,
// current_page:1,
lastid: -1,
});
},
methods: {
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")}`;
},
format_date(d) {
return moment(d).format("DD.MM.YYYY");
},
isSelected(p) {
if (p.coming === "Y" || p.iscito === "Y") return false;
else
return (
p.T_OrderHeaderID ==
this.$store.state.samplecall.selected_patient.T_OrderHeaderID
);
},
searchPatient() {
this.$store.commit("samplecall/update_last_id", -1);
this.$store.dispatch("samplecall/search", {
xdate: this.$store.state.samplecall.start_date,
name: this.name,
nolab: this.nolab,
stationid: this.xselectedstation.id,
statusid: this.xselectedstatus.id,
companyid: this.selected_company.id,
locationid: this.selected_location.locationID,
//current_page:1,
lastid: -1,
});
},
selectMe(pat) {
if (this.$store.state.samplecall.no_save == 0) {
var patients = this.$store.state.samplecall.patients;
this.$store.commit("samplecall/update_selected_patient", pat);
var idx = _.findIndex(patients, function (o) {
return o.T_OrderHeaderID == pat.T_OrderHeaderID;
});
this.$store.commit("samplecall/update_last_id", idx);
this.$store.dispatch("samplecall/getsampletypes", {
orderid: pat.T_OrderHeaderID,
stationid: pat.T_SampleStationID,
statusid: pat.statusid,
labnumber: pat.T_OrderHeaderLabNumber,
});
} else {
this.$store.commit("samplecall/update_open_alert_confirmation", true);
}
},
closeAlertConfirmation() {
this.$store.commit("samplecall/update_open_alert_confirmation", false);
},
forgetAlertConfirmation() {
this.$store.commit("samplecall/update_no_save", 0);
this.$store.commit("samplecall/update_open_alert_confirmation", false);
},
updateAlert_success(val) {
this.$store.commit("samplecall/update_alert_success", val);
},
setNewPatient() {},
closeDialogSuccess() {
let arrPatient = this.$store.state.samplecall.patients;
var idx = _.findIndex(
arrPatient,
(item) => item.M_PatientID === this.$store.state.samplecall.last_id
);
console.log(idx);
var xcur_page = 1;
this.$store.dispatch("samplecall/search", {
name: this.name,
nolab: this.nolab,
stationid: this.xselectedstation.id,
statusid: this.xselectedstatus.id,
locationid: this.selected_location.locationID,
lastid: idx,
});
this.$store.commit("samplecall/update_dialog_success", false);
},
closeDialogInfo() {
this.$store.commit("samplecall/update_open_dialog_info", false);
},
thr_search_company: _.debounce(function () {
this.$store.dispatch("samplecall/searchcompany", this.search_company);
}, 2000),
},
computed: {
xdatestart: {
get() {
return this.$store.state.samplecall.start_date;
},
set(val) {
this.$store.commit("samplecall/update_start_date", val);
//this.searchTransaction()
},
},
filterComputedDateFormattedStart() {
return this.formatDate(this.xdatestart);
},
dialogsuccess: {
get() {
return this.$store.state.samplecall.dialog_success;
},
set(val) {
this.$store.commit("samplecall/update_dialog_success", val);
},
},
msgsuccess() {
return this.$store.state.samplecall.msg_success;
},
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;
},
xstations() {
return this.$store.state.samplecall.stations;
},
xselectedstation: {
get() {
return this.$store.state.samplecall.selected_station;
},
set(val) {
this.$store.commit("samplecall/update_selected_station", val);
this.$store.dispatch("samplecall/getLocation", val.id);
// this.searchPatient()
},
},
xstatuses() {
return this.$store.state.samplecall.statuses;
},
xselectedstatus: {
get() {
return this.$store.state.samplecall.selected_status;
},
set(val) {
this.$store.commit("samplecall/update_selected_status", val);
// this.searchPatient()
},
},
patients() {
return this.$store.state.samplecall.patients;
},
openalertconfirmation: {
get() {
return this.$store.state.samplecall.open_alert_confirmation;
},
set(val) {
this.$store.commit("samplecall/update_open_alert_confirmation", val);
},
},
curr_page: {
get() {
return this.$store.state.samplecall.current_page;
},
set(val) {
this.$store.commit("samplecall/update_current_page", val);
this.$store.dispatch("samplecall/search", {
name: this.name,
nolab: this.nolab,
stationid: this.xselectedstation.id,
statusid: this.xselectedstatus.id,
current_page: val,
locationid: this.selected_location.locationID,
lastid: idx,
});
},
},
xtotal_page: {
get() {
return this.$store.state.samplecall.total_page;
},
set(val) {
this.$store.commit("samplecall/update_total_page", val);
},
},
opendialoginfo: {
get() {
return this.$store.state.samplecall.open_dialog_info;
},
set(val) {
this.$store.commit("samplecall/update_open_dialog_info", false);
},
},
msginfo() {
return this.$store.state.samplecall.msg_info;
},
name: {
get() {
return this.$store.state.samplecall.name;
},
set(val) {
this.$store.commit("samplecall/update_name", val);
},
},
nolab: {
get() {
return this.$store.state.samplecall.nolab;
},
set(val) {
this.$store.commit("samplecall/update_nolab", val);
//this.searchPatient()
},
},
xcompanies() {
return this.$store.state.samplecall.companies;
},
selected_company: {
get() {
return this.$store.state.samplecall.selected_company;
},
set(val) {
this.$store.commit("samplecall/update_selected_company", val);
// this.searchPatient()
},
},
selected_location: {
get() {
return this.$store.state.samplecall.selected_location;
},
set(val) {
this.$store.commit("samplecall/update_selected_location", val);
// this.searchPatient()
},
},
locations() {
return this.$store.state.samplecall.locations;
},
},
watch: {
search_company(val, old) {
if (val == old) return;
if (!val) return;
if (val.length < 1) return;
if (this.$store.state.samplecall.update_autocomplete_status == 1)
return;
this.thr_search_company();
},
},
data() {
return {
msgalertconfirmation:
"Perubahan yang telah dilakukan belum disimpan dong !",
items: [],
search_company: "",
menufilterdatestart: false,
//isLoading: false,
page: 1,
headers: [
{
text: "TANGGAL",
align: "center",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text",
},
{
text: "NO REG",
align: "center",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text",
},
{
text: "KEL. PELANGGAN",
align: "center",
sortable: false,
value: "lab",
width: "15%",
class: "pa-2 blue lighten-3 white--text",
},
{
text: "NAMA",
align: "center",
sortable: false,
value: "name",
width: "20%",
class: "pa-2 blue lighten-3 white--text",
},
{
text: "STATUS",
align: "center",
sortable: false,
value: "status",
width: "10%",
class: "pa-2 blue lighten-3 white--text",
},
],
};
},
};
</script>