Flatten nested repos
This commit is contained in:
133
test/vuex/one-mapping-batch-v2/api/pre_analytic.js
Normal file
133
test/vuex/one-mapping-batch-v2/api/pre_analytic.js
Normal file
@@ -0,0 +1,133 @@
|
||||
const URL =
|
||||
"/one-api/mockup/process/mapping-batch-v2/";
|
||||
|
||||
export async function suggest(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/suggest_v2', prm );
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/save_v2', prm );
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function receive(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/worklist_receive', prm );
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function save_reject(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/save_reject', prm );
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function save_confirmation(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/save_confirmation', prm );
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function get(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/get_v2', prm );
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getrequirements(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/getrequirements', prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
88
test/vuex/one-mapping-batch-v2/api/receive_patient.js
Normal file
88
test/vuex/one-mapping-batch-v2/api/receive_patient.js
Normal file
@@ -0,0 +1,88 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/mapping-batch-v2/";
|
||||
|
||||
export async function search(nolab, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'receive_patient/search', {
|
||||
search: search,
|
||||
nolab: nolab
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_sent() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'receive_patient/search_sent', {});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function receive(ids) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'receive_patient/receive', {
|
||||
ids: ids
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function remove(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'receive_patient/remove', {
|
||||
id: id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
20
test/vuex/one-mapping-batch-v2/api/staff.js
Normal file
20
test/vuex/one-mapping-batch-v2/api/staff.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const URL = "/one-api/mockup/process/mapping-batch-v2/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'staff/search', prm );
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
161
test/vuex/one-mapping-batch-v2/api/worklist_new.js
Normal file
161
test/vuex/one-mapping-batch-v2/api/worklist_new.js
Normal file
@@ -0,0 +1,161 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/mapping-batch-v2/";
|
||||
|
||||
export async function search(query, chosen) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/search_v2', {
|
||||
search: query,
|
||||
chosen:chosen
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_chosen(query, worklist_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/search_chosen', {
|
||||
search: query,
|
||||
worklist_id: worklist_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_patient(worklist_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_patient/search_patient', {
|
||||
worklist_id: worklist_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_instrument(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/search_instrument', {
|
||||
token: token
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save(name, test, rujukan, instrument) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/save', {
|
||||
name: name,
|
||||
test: test,
|
||||
rujukan: rujukan,
|
||||
instrument: instrument
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save_edit(id, name, test, rujukan, instrument) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/save_edit', {
|
||||
id: id,
|
||||
name: name,
|
||||
test: test,
|
||||
rujukan: rujukan,
|
||||
instrument: instrument
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function del(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/del', {
|
||||
worklist_id: id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
136
test/vuex/one-mapping-batch-v2/api/worklist_patient.js
Normal file
136
test/vuex/one-mapping-batch-v2/api/worklist_patient.js
Normal file
@@ -0,0 +1,136 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/mapping-batch-v2/";
|
||||
|
||||
|
||||
export async function search() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_patient/search');
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_px(worklist_id, sdate, edate, racktype, curr_page) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/search_px_v3', {
|
||||
worklist_id: worklist_id,
|
||||
sdate: sdate,
|
||||
edate: edate,
|
||||
racktype: racktype,
|
||||
curr_page: curr_page
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_patient(worklist_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/search_patient_v2', {
|
||||
worklist_id: worklist_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// export async function search_sent() {
|
||||
// try {
|
||||
// var resp = await axios.post(URL + 'receive_patient/search_sent', {});
|
||||
// if (resp.status != 200) {
|
||||
// return {
|
||||
// status: "ERR",
|
||||
// message: resp.statusText
|
||||
// };
|
||||
// }
|
||||
// let data = resp.data;
|
||||
// return data;
|
||||
// } catch(e) {
|
||||
// return {
|
||||
// status: "ERR",
|
||||
// message: e.message
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
|
||||
// export async function verify(orderid, laststatusid, datax) {
|
||||
// try {
|
||||
// var resp = await axios.post(URL + 'handling_patient/verify', {
|
||||
// orderid: orderid,
|
||||
// laststatusid: laststatusid,
|
||||
// data: datax
|
||||
// });
|
||||
// if (resp.status != 200) {
|
||||
// return {
|
||||
// status: "ERR",
|
||||
// message: resp.statusText
|
||||
// };
|
||||
// }
|
||||
// let data = resp.data;
|
||||
// return data;
|
||||
// } catch(e) {
|
||||
// return {
|
||||
// status: "ERR",
|
||||
// message: e.message
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
|
||||
// export async function reject(orderid, laststatusid, datax) {
|
||||
// try {
|
||||
// var resp = await axios.post(URL + 'handling_patient/reject', {
|
||||
// orderid: orderid,
|
||||
// laststatusid: laststatusid,
|
||||
// data: datax
|
||||
// });
|
||||
// if (resp.status != 200) {
|
||||
// return {
|
||||
// status: "ERR",
|
||||
// message: resp.statusText
|
||||
// };
|
||||
// }
|
||||
// let data = resp.data;
|
||||
// return data;
|
||||
// } catch(e) {
|
||||
// return {
|
||||
// status: "ERR",
|
||||
// message: e.message
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
77
test/vuex/one-mapping-batch-v2/components/oneDatePicker2.vue
Normal file
77
test/vuex/one-mapping-batch-v2/components/oneDatePicker2.vue
Normal file
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<v-menu
|
||||
v-model="menu2"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
full-width
|
||||
max-width="290px"
|
||||
min-width="290px"
|
||||
>
|
||||
<v-text-field
|
||||
slot="activator"
|
||||
v-model="computedDateFormatted"
|
||||
:label=init_label
|
||||
hint="MM/DD/YYYY format"
|
||||
persistent-hint
|
||||
readonly
|
||||
browser-autocomplete="off"
|
||||
></v-text-field>
|
||||
<v-date-picker v-model="init_date" no-title @input="menu2 = false" :max="init_max_date"></v-date-picker>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props : ['label', 'date', 'data', 'max_date'],
|
||||
|
||||
data () {
|
||||
return {
|
||||
init_date: this.date && this.date != "0000-00-00" ? this.date : null, //new Date().toISOString().substr(0, 10),
|
||||
init_max_date: this.max_date ? this.max_date : '2999-09-09',
|
||||
dateFormatted: this.formatDate(new Date().toISOString().substr(0, 10)),
|
||||
menu1: false,
|
||||
menu2: false,
|
||||
|
||||
init_label: this.label ? this.label : 'Date',
|
||||
init_data: this.data ? this.data : ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
computedDateFormatted () {
|
||||
return this.formatDate(this.init_date)
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
init_date (n, o) {
|
||||
this.dateFormatted = this.formatDate(this.init_date)
|
||||
|
||||
this.$emit('change', {"old_date":o, "new_date":n, "data":this.init_data});
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
formatDate (date) {
|
||||
if (!date) { return null }
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
parseDate (date) {
|
||||
if (!date) return null
|
||||
|
||||
const [month, day, year] = date.split('/')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
|
||||
emitChange (n, o) {
|
||||
console.log("old:"+o)
|
||||
console.log("new:"+n)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,434 @@
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="dialog" persistent max-width="1000px" fullscreen content-class="pt-2 pb-2 pl-4 pr-4">
|
||||
<!-- <template v-slot:activator="{ on }">
|
||||
<v-btn color="primary" dark v-on="on">Open Dialog</v-btn>
|
||||
</template> -->
|
||||
<v-card class="flexcard">
|
||||
<!-- <v-card-title>
|
||||
<span class="headline">Tambah Worklist</span>
|
||||
</v-card-title> -->
|
||||
<v-card-text class="pt-0 grow">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-container grid-list-md class="pt-3 pa-0 ml-0 mr-0">
|
||||
<v-layout wrap>
|
||||
<v-flex xs4 sm4 md4 pr-2>
|
||||
<v-text-field label="Nama Worklist" required v-model="name"></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs2 sm2 md2 pr-2 pl-4>
|
||||
<v-checkbox label="Rujukan" v-model="is_rujukan" true-value="Y" false-value="N"></v-checkbox>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3 sm3 md3 class="text-xs-right">
|
||||
|
||||
<v-select
|
||||
:items="instruments"
|
||||
return-object
|
||||
item-value="Nat_InstrumentID"
|
||||
item-text="Nat_InstrumentName"
|
||||
label="Instrument"
|
||||
v-model="selected_instrument"
|
||||
:disabled="is_rujukan == 'Y'"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3 sm3 md3 class="text-xs-right">
|
||||
|
||||
<span class="headline d-block mt-3" v-if="!state_edit">Worklist Baru</span>
|
||||
<span class="headline d-block mt-3" v-if="state_edit">Ubah Data Worklist</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3 pt-4>
|
||||
Menampilkan {{ total_px }} hasil dari {{ total_display_px }} total item
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3 pr-2 pb-2>
|
||||
<v-text-field
|
||||
hide-details
|
||||
solo
|
||||
label="Pencarian"
|
||||
append-icon="search"
|
||||
v-model="query_left"
|
||||
v-on:keyup.enter="search_left"
|
||||
>
|
||||
<v-text-field>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3 pl-2 pt-4>
|
||||
Menampilkan {{ chosen_total_display_px }} hasil dari {{ chosen_total_px }} total item
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3>
|
||||
<v-text-field
|
||||
hide-details
|
||||
solo
|
||||
label="Pencarian"
|
||||
append-icon="search"
|
||||
v-model="query_right"
|
||||
v-on:keyup.enter="search_right"
|
||||
:disabled="!state_edit"
|
||||
browser-autocomplete="off"
|
||||
>
|
||||
</v-text-field>
|
||||
<!-- Patch do not remove -->
|
||||
<v-text-field
|
||||
hide-details
|
||||
solo
|
||||
label="Pencarian"
|
||||
append-icon="search"
|
||||
v-model="query_left"
|
||||
v-on:keyup.enter="search_right"
|
||||
:disabled="!state_edit"
|
||||
browser-autocomplete="off"
|
||||
v-show="false"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pr-2>
|
||||
<v-card class="xs12 md12" >
|
||||
<v-data-table
|
||||
:headers="pxs_headers" :items="pxs"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" style="height:auto"
|
||||
>
|
||||
{{ props.item.T_TestCode }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" style="height:auto"
|
||||
>
|
||||
{{ props.item.T_TestName }}
|
||||
</td>
|
||||
<td class="text-xs-left pl-2 pr-2 pt-1 pb-1" style="height:auto"
|
||||
>
|
||||
<v-btn fab dark small color="blue" class="ma-0 b-30" @click="select(props.item)">
|
||||
<v-icon dark>arrow_forward</v-icon>
|
||||
</v-btn>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</v-card>
|
||||
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pl-2>
|
||||
<v-card class="xs12 md12" >
|
||||
<v-data-table
|
||||
:headers="chosen_pxs_headers" :items="chosen_pxs"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pl-2 pr-2 pt-1 pb-1" style="height:auto"
|
||||
>
|
||||
<v-btn fab dark small color="red" class="ma-0 b-30" @click="unSelect(props.item)">
|
||||
<v-icon dark>arrow_back</v-icon>
|
||||
</v-btn>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" style="height:auto"
|
||||
>
|
||||
{{ props.item.T_TestCode }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" style="height:auto"
|
||||
>
|
||||
{{ props.item.T_TestName }}
|
||||
</td>
|
||||
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
|
||||
<!-- <small>*indicates required field</small> -->
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn color="red darken-1" dark @click="del" v-show="state_edit">Hapus Worklist</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="dialog = false">Tutup</v-btn>
|
||||
<v-btn color="blue darken-1" :dark="btn_save_enabled" @click="save" :disabled="!btn_save_enabled">Simpan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.flexcard {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.b-30 {
|
||||
height: 30px !important;
|
||||
width: 30px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.v-btn--floating.v-btn--small {
|
||||
height: 30px !important;
|
||||
width: 30px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
|
||||
pxs_headers: [
|
||||
{
|
||||
text: "KODE PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "70%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "5%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
chosen_pxs_headers: [
|
||||
{
|
||||
text: "",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "5%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KODE PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "70%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
|
||||
],
|
||||
isLoading: false
|
||||
// chosen_pxs: []
|
||||
// dialog: true
|
||||
}),
|
||||
|
||||
computed : {
|
||||
dialog : {
|
||||
get () {
|
||||
return this.$store.state.worklist_patient.dialog_form_new
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('worklist_patient/update_dialog_form_new', v)
|
||||
}
|
||||
},
|
||||
|
||||
pxs : {
|
||||
get () {
|
||||
return this.$store.state.worklist_new.pxs
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('worklist_new/update_pxs', v)
|
||||
}
|
||||
},
|
||||
|
||||
total_px () {
|
||||
return this.$store.state.worklist_new.total_px
|
||||
},
|
||||
|
||||
total_display_px () {
|
||||
let x = 0
|
||||
try {
|
||||
x = this.$store.state.worklist_new.pxs.length
|
||||
} catch(e) {
|
||||
x = 0
|
||||
}
|
||||
return x
|
||||
},
|
||||
|
||||
chosen_pxs : {
|
||||
get () {
|
||||
return this.$store.state.worklist_new.chosen_pxs
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('worklist_new/update_chosen_pxs', {records:v})
|
||||
}
|
||||
},
|
||||
|
||||
chosen_total_px () {
|
||||
return this.$store.state.worklist_new.chosen_total_px
|
||||
},
|
||||
|
||||
chosen_total_display_px () {
|
||||
let x = 0
|
||||
try {
|
||||
x = this.$store.state.worklist_new.chosen_pxs.length
|
||||
} catch(e) {
|
||||
x = 0
|
||||
}
|
||||
return x
|
||||
},
|
||||
|
||||
name : {
|
||||
get () {
|
||||
// if (this.$store.state.worklist_new.state_edit == true)
|
||||
// return this.$store.state.worklist_patient.selected_worklist.T_WorklistName
|
||||
|
||||
return this.$store.state.worklist_new.name
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('worklist_new/update_name', v)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
state_edit () {
|
||||
return this.$store.state.worklist_new.state_edit
|
||||
},
|
||||
|
||||
btn_save_enabled () {
|
||||
if (this.name == "" || this.chosen_pxs.length < 1)
|
||||
return false
|
||||
|
||||
if (this.is_rujukan == "N" && !this.selected_instrument)
|
||||
return false
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
query_left : {
|
||||
get () {
|
||||
return this.$store.state.worklist_new.search_left
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('worklist_new/update_search_left', v)
|
||||
}
|
||||
},
|
||||
|
||||
query_right : {
|
||||
get () {
|
||||
return this.$store.state.worklist_new.search_right
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('worklist_new/update_search_right', v)
|
||||
}
|
||||
},
|
||||
|
||||
instruments () {
|
||||
return this.$store.state.worklist_new.instruments
|
||||
},
|
||||
|
||||
selected_instrument : {
|
||||
get () { return this.$store.state.worklist_new.selected_instrument },
|
||||
set (v) { this.$store.commit('worklist_new/update_selected_instrument', v) }
|
||||
},
|
||||
|
||||
is_rujukan : {
|
||||
get () { return this.$store.state.worklist_new.is_rujukan },
|
||||
set (v) {
|
||||
this.$store.commit('worklist_new/update_is_rujukan', v)
|
||||
if (v == "Y")
|
||||
this.selected_instrument = null
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch : {
|
||||
dialog : function(n, o) {
|
||||
|
||||
if (n == true) {
|
||||
this.$store.dispatch('worklist_new/search')
|
||||
} else {
|
||||
this.chosen_pxs = []
|
||||
this.name = ""
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
select : function(a) {
|
||||
let x = this.chosen_pxs
|
||||
// console.log(x)
|
||||
x.push(a)
|
||||
|
||||
this.chosen_pxs = x
|
||||
this.$store.dispatch('worklist_new/search')
|
||||
},
|
||||
|
||||
unSelect : function(a) {
|
||||
let x = this.chosen_pxs
|
||||
let y = x
|
||||
for (let i in x) {
|
||||
if (x[i]['T_TestID'] == a.T_TestID)
|
||||
y.splice(i, 1)
|
||||
}
|
||||
|
||||
this.chosen_pxs = y
|
||||
this.$store.dispatch('worklist_new/search')
|
||||
},
|
||||
|
||||
save : function() {
|
||||
let x = this.chosen_pxs
|
||||
let y = []
|
||||
for (let i in x)
|
||||
y.push(x[i]['T_TestID'])
|
||||
|
||||
// sipe
|
||||
let instrumentID= 0
|
||||
try {
|
||||
instrumentID = this.selected_instrument.Nat_InstrumentID
|
||||
} catch(e) {}
|
||||
if (this.$store.state.worklist_new.state_edit == true) {
|
||||
this.$store.dispatch('worklist_new/save_edit', {id:this.$store.state.worklist_patient.selected_worklist.T_WorklistID, name:this.name, test:y.join(','), rujukan:this.is_rujukan, instrument:instrumentID })
|
||||
}
|
||||
else
|
||||
this.$store.dispatch('worklist_new/save', {name:this.name, test:y.join(','), rujukan:this.is_rujukan, instrument:instrumentID})
|
||||
},
|
||||
|
||||
del : function() {
|
||||
this.$store.dispatch('worklist_new/del')
|
||||
},
|
||||
|
||||
search_left : function() {
|
||||
this.$store.dispatch('worklist_new/search')
|
||||
},
|
||||
|
||||
search_right : function() {
|
||||
this.$store.dispatch('worklist_new/search_chosen')
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$store.dispatch('worklist_new/search_instrument')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-text-field class="flex xs4 ma-1"
|
||||
placeholder="No Lab"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
v-model="nolab"
|
||||
></v-text-field>
|
||||
<v-text-field class="flex xs8 ma-1"
|
||||
label=""
|
||||
placeholder="Nama"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
v-model="search"
|
||||
></v-text-field>
|
||||
|
||||
<v-btn class="mr-1 ml-1 one-btn-icon fz-2" color="success" @click="search_patient" large block fill-height>
|
||||
<span class="icon-search"></span>
|
||||
</v-btn>
|
||||
<v-btn class="mr-1 ml-1 one-btn-icon fz-2" color="info" @click="receive" large block fill-height>
|
||||
<v-icon>send</v-icon>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- <v-flex xs4>
|
||||
<v-layout>
|
||||
<v-btn class="flex xs6 ma-1" color="success" @click="search_patient" >
|
||||
Search
|
||||
</v-btn>
|
||||
<v-btn class="flex xs6 ma-1" color="info" @click="receive" >
|
||||
Terima
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-flex> -->
|
||||
</v-layout>
|
||||
</v-card>
|
||||
|
||||
|
||||
<v-card class="grow">
|
||||
<v-subheader>
|
||||
<h3 class="title">SAMPLE DARI HANDLING</h3>
|
||||
</v-subheader>
|
||||
<v-data-table
|
||||
:headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ oneMoment(props.item.date)}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.lab }}
|
||||
</td>
|
||||
<td class="pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.sid}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.name }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
<v-checkbox :value="props.item.id" v-model="ids" hide-details></v-checkbox>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.fz-2 {
|
||||
font-size: 1.5em
|
||||
}
|
||||
|
||||
.v-btn--large {
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
table.v-table tbody td,xtable.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "SAMPLING",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SAMPLE ID",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "Pilih",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "5%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
isLoading: false,
|
||||
// patients: [
|
||||
// {"status":"","date":"2019-02-21 10:00:00",
|
||||
// "lab":"08000198909", "sid": "08000198909-S",
|
||||
// "name": "Pasien Umum", "selected":false},
|
||||
// {"status":"","date":"2019-02-22 06:30:00",
|
||||
// "lab":"08000198111", "sid": "08000198111-2",
|
||||
// "name": "Heri Suryawan", "selected":false},
|
||||
// {"status":"","date":"2019-02-22 06:45:00",
|
||||
// "lab":"08000198222", "sid": "08000198222-U",
|
||||
// "name": "LUKA MODRIC","selected":true},
|
||||
// ]
|
||||
};
|
||||
},
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
search_patient () {
|
||||
this.$store.dispatch('receive_patient/search')
|
||||
},
|
||||
|
||||
receive () {
|
||||
this.$store.dispatch('receive_patient/receive')
|
||||
},
|
||||
|
||||
select(item) {
|
||||
this.$store.commit('receive_patient/update_selected_patient', item)
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
patients () {
|
||||
return this.$store.state.receive_patient.patients
|
||||
},
|
||||
|
||||
nolab : {
|
||||
get () {
|
||||
return this.$store.state.receive_patient.nolab
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('receive_patient/update_nolab', v)
|
||||
}
|
||||
},
|
||||
|
||||
search : {
|
||||
get () {
|
||||
return this.$store.state.receive_patient.search
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('receive_patient/update_search', v)
|
||||
}
|
||||
},
|
||||
|
||||
ids : {
|
||||
get () {
|
||||
return this.$store.state.receive_patient.ids
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('receive_patient/update_ids', v)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,817 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column >
|
||||
<v-card class="mb-2 pa-2 searchbox" max-width="1300">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-flex xs12>
|
||||
<v-toolbar flat light color="white">
|
||||
<one-date-picker label="Date" :date="init_date" @change="startDateChange" :data="null" :max_date="null" class="mr-4"></one-date-picker>
|
||||
|
||||
<!--
|
||||
<one-date-picker
|
||||
label="End Date"
|
||||
:date="init_edate"
|
||||
@change="endDateChange"
|
||||
:data="null"
|
||||
:max_date="null"
|
||||
class="mr-4"
|
||||
></one-date-picker>
|
||||
-->
|
||||
|
||||
<v-select label="Worklist" :items="worklists" style="width:30%" item-value="T_WorklistID" item-text="T_WorklistName" return-object
|
||||
v-model="selected_worklist" v-on:change="changeWorklist"></v-select>
|
||||
<v-radio-group row hide-details class="mb-2" v-on:change="changeWorklist" v-model="flag_online">
|
||||
<v-radio label="48" value="48"></v-radio>
|
||||
<v-radio label="96" value="96"></v-radio>
|
||||
</v-radio-group>
|
||||
<v-btn v-if="this.isconfirm == 'N'" :disabled="in_saving" @click="save()" color="primary">Konfirmasi</v-btn>
|
||||
<v-btn v-if="this.isconfirm == 'Y'" color="grey"><v-icon class="ml-1" color="black" @click="doPrint()">print</v-icon></v-btn>
|
||||
<!--
|
||||
<v-btn fab @click="edit" :disabled="!btnEditEnabled" class="v-btn--floating--special">
|
||||
<v-icon>edit</v-icon>
|
||||
</v-btn>
|
||||
<v-btn fab @click="addNew" class="v-btn--floating--special">
|
||||
<v-icon>add_circle_outline</v-icon>
|
||||
</v-btn>
|
||||
<v-btn fab class="v-btn--floating--special fz-2" color="success" @click="search_px">
|
||||
<span class="icon-search"></span>
|
||||
</v-btn>
|
||||
-->
|
||||
|
||||
|
||||
</v-toolbar>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
|
||||
|
||||
<v-card class="grow" max-width="1300">
|
||||
<v-pagination style="margin-top:10px;margin-bottom:10px" v-model="curr_page" :length="xtotal_page"></v-pagination>
|
||||
|
||||
<v-data-table :items="pxs" :loading="isLoading" hide-actions class="xelevation-1">
|
||||
<template slot="headers" slot-scope="props">
|
||||
<th class="pa-2 blue lighten-3 white--text" style="text-align:left;v-align:center;">
|
||||
<span style="top:6px;position:relative;">
|
||||
</span>
|
||||
<span dark="" class="white--text" style="font-size:20px;float:right;margin-right:20px">
|
||||
</span>
|
||||
</th>
|
||||
</template>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pl-2 pr-2 pt-1 pb-1" @click="select(props.item)">
|
||||
|
||||
<v-layout row wrap class="scroll-container" style="width:1300px;overflow: auto;">
|
||||
<span class="pr-1" v-for="(p, i) in props.item.patients" v-bind:key="i">
|
||||
<v-card class="box-px" :color="props.item.isconfirm == 'N' ? 'white':'green'"
|
||||
>
|
||||
<v-card-title primary-title class="pl-1 pr-1 pt-1 pb-0 text-xs-center subheading">
|
||||
<span>
|
||||
{{ p.name }}
|
||||
</span>
|
||||
<v-spacer></v-spacer>
|
||||
<span class="icon-group xs2">
|
||||
<v-icon @click.stop="show_patient_requirement(p,props.item)" v-if="havingReq(p)" light :color="getConfirmColor(p)">
|
||||
info
|
||||
</v-icon>
|
||||
</span>
|
||||
<v-icon light right color="white" v-show="p.has_result == 'Y'">check_circle</v-icon>
|
||||
</v-card-title>
|
||||
<v-card-actions class="pl-1 pb-1 pt-0 caption">
|
||||
{{ formatName(p.number) }}
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
|
||||
</span>
|
||||
</v-layout>
|
||||
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</v-card>
|
||||
|
||||
<v-dialog v-model="dialogrequirement" persistent max-width="45%">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Pre Analytic Checklist
|
||||
</v-card-title>
|
||||
<div style="font-weight:normal;font-size:14px;margin-left:20px;" class="subtitle">Checklist jika ada persyaratan yang tidak terpenuhi.</div>
|
||||
<v-card-text>
|
||||
<v-layout wrap>
|
||||
<v-flex v-for="(req,idx) in requirements" :key="idx" 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="grey darken-1" flat @click="dialogrequirement = false">Tutup</v-btn>
|
||||
<v-btn v-if="! isProcessed()" color="green darken-1" flat @click="saveReq()">Simpan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-dialog v-model="dialog_patient_requirement" persistent max-width="45%">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Requirement Info</v-card-title>
|
||||
<v-card-text>
|
||||
<v-layout wrap>
|
||||
<table style="width:100%">
|
||||
<template v-for="(xreq,ix) in patient_requirements">
|
||||
<tr>
|
||||
<td style="text-transform: capitalize" colspan="2">
|
||||
{{ xreq.position }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10%"> </td>
|
||||
<td>
|
||||
{{ xreq.requirement }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="grey darken-1" flat @click="dialog_patient_requirement = false">Tutup</v-btn>
|
||||
<v-btn v-if="! isKonfirm()" color="red darken-1" flat @click="saveReject()">Tolak</v-btn>
|
||||
<v-btn v-if="! isKonfirm()" color="green darken-1" flat @click="saveConfirmation()">Konfirm Running</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<one-process-worklist-form-new></one-process-worklist-form-new>
|
||||
|
||||
<v-snackbar v-model="snackbar" :multi-line="true" class="box-info black--text" :timeout="4000">
|
||||
<span v-html="message_info"></span>
|
||||
</v-snackbar>
|
||||
<one-dialog-print-verify :title="printtitleverify" :width="printwidthverify" :height="500" :status="openprintverify" :urlprint="urlprintverify"
|
||||
@close-dialog-print="closePrint"></one-dialog-print-verify>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
div.subtitle {
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.subheading.is_cito {
|
||||
background-color: rgba(255, 233, 51);
|
||||
}
|
||||
|
||||
span.icon-group {}
|
||||
|
||||
.box-info .v-snack__content {
|
||||
background-color: rgb(255, 230, 255);
|
||||
}
|
||||
|
||||
.req_have {
|
||||
background-color: rgba(255, 0, 0, 0.3) !important;
|
||||
}
|
||||
|
||||
.req_ok.req_have {
|
||||
background-color: rgba(0, 255, 0, 0.3) !important;
|
||||
}
|
||||
|
||||
.not_received {
|
||||
border: solid 1px #000;
|
||||
}
|
||||
|
||||
.handling {
|
||||
border: solid 1px rgb(0, 85, 128);
|
||||
color: rgb(0, 85, 128);
|
||||
background-color: rgba(204, 238, 255, 0.5);
|
||||
cursor: pointer;
|
||||
;
|
||||
}
|
||||
|
||||
.received {
|
||||
border: solid 1px rgb(0, 77, 0);
|
||||
color: rgb(0, 77, 0);
|
||||
background-color: rgb(153, 255, 153);
|
||||
|
||||
}
|
||||
|
||||
.worklist_receive {
|
||||
border: solid 1px rgb(0, 77, 0);
|
||||
color: rgb(0, 77, 0);
|
||||
background-color: rgba(11, 232, 141, 0.5);
|
||||
}
|
||||
|
||||
.box-px {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.v-input__slot {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.v-messages {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.searchbox .v-input.v-text-field .v-input__slot {
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.searchbox .v-btn {
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
table.v-table tbody td,
|
||||
xtable.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.v-btn--floating--special {
|
||||
border-radius: 0% !important;
|
||||
}
|
||||
|
||||
.v-toolbar__content,
|
||||
.v-toolbar__extension {
|
||||
padding-right: 8px !important;
|
||||
}
|
||||
|
||||
.fz-2 {
|
||||
font-size: 1.5em
|
||||
}
|
||||
|
||||
.v-btn--large {
|
||||
height: 52px;
|
||||
}
|
||||
.scroll-container {
|
||||
scroll-padding: 50px 0 0 50px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
}
|
||||
|
||||
/* this targets the default scrollbar (compulsory) */
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #73baf3;
|
||||
}
|
||||
|
||||
/* the new scrollbar will have a flat appearance with the set background color */
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #2196f3;
|
||||
}
|
||||
|
||||
/* this will style the thumb, ignoring the track */
|
||||
|
||||
::-webkit-scrollbar-button {
|
||||
background-color: #0079da;
|
||||
}
|
||||
|
||||
/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
'one-date-picker': httpVueLoader('./oneDatePicker2.vue'),
|
||||
'one-process-worklist-form-new': httpVueLoader('./oneProcessWorklistFormNew.vue'),
|
||||
'one-x-check': httpVueLoader('../../common/onexcheck.vue'),
|
||||
'one-dialog-print-verify': httpVueLoader('../../common/oneDialogPrintX.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
init_date: moment().format("Y-M-D"),
|
||||
openprintverify: false,
|
||||
urlprintverify: '',
|
||||
printtitleverify: '',
|
||||
printwidthverify: 600,
|
||||
formatreport: 'pdf'
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getHeader() {
|
||||
return [
|
||||
|
||||
{
|
||||
text: "NAMA PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PASIEN <span float-right>User</span>",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "75%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
},
|
||||
changeWorklist() {
|
||||
var self = this
|
||||
setTimeout(function () {
|
||||
self.search_px()
|
||||
}, 1)
|
||||
},
|
||||
async save() {
|
||||
if (this.in_saving) return;
|
||||
this.in_saving = true;
|
||||
this.$store.dispatch("pre_analytic/save_confirmation", {
|
||||
sdate: this.sdate,
|
||||
worklistid: this.$store.state.worklist_patient.selected_worklist.T_WorklistID,
|
||||
stype: this.$store.state.worklist_patient.flag_online,
|
||||
sbatch: this.$store.state.worklist_patient.current_page,
|
||||
labs: this.$store.state.worklist_patient.pxs
|
||||
})
|
||||
},
|
||||
doPrint() {
|
||||
console.log('doprint')
|
||||
this.printwidthverify = 1028
|
||||
this.printtitleverify = ""
|
||||
let user = one_user()
|
||||
var id = this.xid
|
||||
var d = new Date();
|
||||
var n = d.getTime()
|
||||
var formatrpt = this.formatreport
|
||||
this.urlprintverify = "/birt/run?__report=report/one/rekap/rpt_r_084.rptdesign&__format=" +
|
||||
formatrpt + "&username=" + user.M_UserUsername + "&PID=" + id + "&tm=" + n
|
||||
this.openprintverify = true
|
||||
|
||||
|
||||
},
|
||||
closePrint() {
|
||||
this.openprintverify = false
|
||||
},
|
||||
show_patient_requirement(p, t) {
|
||||
this.$store.commit("pre_analytic/update_selected_patient", p)
|
||||
this.$store.commit("pre_analytic/update_px", t)
|
||||
this.$store.commit("pre_analytic/update_show_dialog_patient_requirement", true)
|
||||
},
|
||||
getConfirmColor(p) {
|
||||
if (p.is_confirm == 'Y') return '#cc7a00'
|
||||
return 'red'
|
||||
},
|
||||
havingReq(p) {
|
||||
return p.speciment_handling == 'Y' && p.requirements != null
|
||||
},
|
||||
async saveReject() {
|
||||
let pat = this.$store.state.pre_analytic.selected_patient
|
||||
let px = this.$store.state.pre_analytic.selected_px
|
||||
let d_userID = 0
|
||||
let stf = this.$store.state.staff.selected_staff
|
||||
if (stf && stf.userid) {
|
||||
d_userID = stf.userid
|
||||
}
|
||||
let prm = {
|
||||
orderID: pat.id,
|
||||
sampleTypeID: pat.T_SampleTypeID,
|
||||
userID: d_userID
|
||||
}
|
||||
await this.$store.dispatch("pre_analytic/save_reject", prm)
|
||||
this.search_px()
|
||||
this.dialog_patient_requirement = false;
|
||||
},
|
||||
async saveConfirmation() {
|
||||
let pat = this.$store.state.pre_analytic.selected_patient
|
||||
let px = this.$store.state.pre_analytic.selected_px
|
||||
let req = this.patient_requirements
|
||||
let d_userID = 0
|
||||
let stf = this.$store.state.staff.selected_staff
|
||||
if (stf && stf.userid) {
|
||||
d_userID = stf.userid
|
||||
}
|
||||
let prm = {
|
||||
orderID: pat.id,
|
||||
testID: px.T_TestID,
|
||||
requirement: req,
|
||||
userID: d_userID
|
||||
}
|
||||
await this.$store.dispatch("pre_analytic/save_confirmation", prm)
|
||||
this.search_px()
|
||||
this.dialog_patient_requirement = false;
|
||||
},
|
||||
show_info(msg) {
|
||||
this.$store.commit("pre_analytic/update_message_info", msg)
|
||||
this.$store.commit("pre_analytic/update_snackbar", true)
|
||||
},
|
||||
oneMoment: function (d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
async doClickBoxPx(p, testID) {
|
||||
if (p.speciment_handling == 'N') {
|
||||
this.show_info('Speciment <b>' + p.number + ' [' + p.name +
|
||||
'] </b> belum selesai di proses di <b>Speciment Handling</b>')
|
||||
return;
|
||||
}
|
||||
if (p.requirements != null && p.is_confirm != 'Y') {
|
||||
this.show_info('Speciment <b>' + p.number + '</b> memiliki catatan dan belum di konfirmasi! ')
|
||||
return
|
||||
}
|
||||
/*
|
||||
let analytics = this.$store.state.pre_analytic.pre_analytic
|
||||
let idx = _.findIndex(analytics, function(a) { return a.T_TestID == p.testID} )
|
||||
if (idx < 0 ) {
|
||||
this.show_info('Pre-Analytic belum di lakukan!')
|
||||
return
|
||||
}
|
||||
*/
|
||||
let d_userID = 0
|
||||
let stf = this.$store.state.staff.selected_staff
|
||||
if (stf && stf.userid) {
|
||||
d_userID = stf.userid
|
||||
}
|
||||
if (p.speciment_handling == 'Y' && p.is_received == 'N' || p.is_received == null) {
|
||||
let prm = {
|
||||
T_OrderHeaderID: p.id,
|
||||
T_SampleTypeID: p.T_SampleTypeID,
|
||||
userID: d_userID
|
||||
}
|
||||
await this.$store.dispatch("pre_analytic/receive", prm)
|
||||
this.show_info('Speciment <b>' + p.number + '</b> sudah di terima! ')
|
||||
this.search_px()
|
||||
return
|
||||
}
|
||||
if (p.is_received == 'Y') {
|
||||
this.$store.commit("pre_analytic/update_suggested_worklist", " ");
|
||||
let worklistID = this.$store.state.worklist_patient.selected_worklist.T_WorklistID
|
||||
let prm = {
|
||||
T_OrderHeaderID: p.id,
|
||||
T_TestID: testID,
|
||||
T_SampleTypeID: p.T_SampleTypeID,
|
||||
userID: d_userID,
|
||||
worklistID: worklistID
|
||||
}
|
||||
await this.$store.dispatch("pre_analytic/suggest", prm)
|
||||
this.show_info('Speciment <b>' + p.number + '</b> disarankan ke ' +
|
||||
this.$store.state.pre_analytic.suggested_worklist)
|
||||
}
|
||||
|
||||
},
|
||||
isKonfirm() {
|
||||
let pat = this.$store.state.pre_analytic.selected_patient
|
||||
return pat.is_confirm == 'Y'
|
||||
},
|
||||
isProcessed() {
|
||||
let data = this.$store.state.pre_analytic.pre_analytic
|
||||
let px = this.$store.state.pre_analytic.selected_px
|
||||
let worklistID = this.$store.state.worklist_patient.selected_worklist.T_WorklistID
|
||||
let xitem = {
|
||||
"T_TestID": px.T_TestID,
|
||||
'T_WorklistID': worklistID
|
||||
}
|
||||
let idx = _.findIndex(data, xitem)
|
||||
return (idx > -1)
|
||||
},
|
||||
checkReq(val, idx) {
|
||||
let reqs = this.$store.state.pre_analytic.requirements
|
||||
reqs[idx].chex = val
|
||||
this.$store.commit("pre_analytic/update_requirements", reqs)
|
||||
},
|
||||
getColorPreAnalytic(item) {
|
||||
let worklistID = this.$store.state.worklist_patient.selected_worklist.T_WorklistID
|
||||
let xitem = {
|
||||
"T_WorklistID": worklistID,
|
||||
"T_TestID": item.T_TestID
|
||||
}
|
||||
let data = this.$store.state.pre_analytic.pre_analytic
|
||||
let idx = _.findIndex(data, xitem)
|
||||
let result = {
|
||||
'req_ok': false,
|
||||
'req_have': false
|
||||
}
|
||||
if (idx > -1) {
|
||||
if (data[idx].PreAnalyticIsOk == "Y") {
|
||||
result = {
|
||||
'req_ok': true,
|
||||
'req_have': true
|
||||
}
|
||||
} else {
|
||||
result = {
|
||||
'req_ok': false,
|
||||
'req_have': true
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
},
|
||||
myDialog(item) {
|
||||
let reqs = this.$store.state.pre_analytic.requirements
|
||||
this.$store.commit('pre_analytic/update_px', item)
|
||||
let worklistID = this.$store.state.worklist_patient.selected_worklist.T_WorklistID
|
||||
let sel_req = _.find(this.$store.state.pre_analytic.pre_analytic, function (t) {
|
||||
return (t.T_TestID == item.T_TestID && t.T_WorklistID == worklistID)
|
||||
});
|
||||
let arr_req = []
|
||||
if (sel_req != undefined) arr_req = JSON.parse(sel_req.PreAnalyticRequirements);
|
||||
for (let i = 0; i < reqs.length; i++) {
|
||||
if (_.includes(arr_req, reqs[i]["id"])) {
|
||||
reqs[i]["chex"] = "Y"
|
||||
} else {
|
||||
reqs[i]["chex"] = "N"
|
||||
}
|
||||
}
|
||||
this.$store.commit("pre_analytic/update_requirements", reqs)
|
||||
this.$store.commit('pre_analytic/update_show_dialog', true)
|
||||
},
|
||||
async saveReq() {
|
||||
let reqs = this.$store.state.pre_analytic.requirements
|
||||
let val = _.filter(reqs, function (it) {
|
||||
return it.chex == 'Y'
|
||||
})
|
||||
let testID = this.$store.state.pre_analytic.selected_px.T_TestID
|
||||
let worklistID = this.$store.state.worklist_patient.selected_worklist.T_WorklistID
|
||||
let d_userID = 0
|
||||
let stf = this.$store.state.staff.selected_staff
|
||||
if (stf && stf.userid) {
|
||||
d_userID = stf.userid
|
||||
}
|
||||
let prm = {
|
||||
token: one_token(),
|
||||
T_TestID: testID,
|
||||
T_WorklistID: worklistID,
|
||||
reqs: val,
|
||||
userID: d_userID
|
||||
}
|
||||
await this.$store.dispatch('pre_analytic/save', prm)
|
||||
await this.$store.dispatch('pre_analytic/get')
|
||||
this.$store.commit('pre_analytic/update_show_dialog', false)
|
||||
},
|
||||
search_patient() {
|
||||
this.$store.dispatch('worklist_patient/search')
|
||||
},
|
||||
verify() {
|
||||
this.$store.dispatch('worklist_patient/verify')
|
||||
},
|
||||
select(item) {
|
||||
this.$store.commit('worklist_patient/update_selected_patient', item)
|
||||
},
|
||||
search_px() {
|
||||
this.$store.dispatch('worklist_patient/search_px')
|
||||
},
|
||||
startDateChange(prm) {
|
||||
this.$store.commit('worklist_patient/update_sdate', prm.new_date)
|
||||
this.$store.commit("worklist_patient/update_current_page", 1)
|
||||
this.$store.dispatch('worklist_patient/search_px')
|
||||
},
|
||||
formatName(x) {
|
||||
if (x == null) return ''
|
||||
var n = x.length
|
||||
if (n > 20)
|
||||
return x.substr(0, 15) + ' ..'
|
||||
return x
|
||||
},
|
||||
addNew() {
|
||||
this.$store.commit('worklist_patient/update_dialog_form_new', true)
|
||||
this.$store.commit('worklist_new/update_state_edit', false)
|
||||
this.$store.commit('worklist_new/update_is_rujukan', 'N')
|
||||
this.$store.commit('worklist_new/update_selected_instrument', null)
|
||||
},
|
||||
edit() {
|
||||
this.$store.commit('worklist_new/update_id', this.selected_worklist.T_WorklistID)
|
||||
this.$store.commit('worklist_new/update_name', this.selected_worklist.T_WorklistName)
|
||||
this.$store.dispatch('worklist_new/search_chosen')
|
||||
this.$store.commit('worklist_new/update_state_edit', true)
|
||||
this.$store.commit('worklist_patient/update_dialog_form_new', true)
|
||||
|
||||
let rujukan = this.selected_worklist.T_WorklistIsRujukan
|
||||
this.$store.commit('worklist_new/update_is_rujukan', rujukan)
|
||||
this.$store.commit('worklist_new/update_selected_instrument',
|
||||
rujukan == "Y" ? null : {
|
||||
Nat_InstrumentID: this.selected_worklist.Nat_InstrumentID,
|
||||
Nat_InstrumentName: this.selected_worklist.Nat_InstrumentName
|
||||
})
|
||||
},
|
||||
getDark(p) {
|
||||
if (p.speciment_handling == 'Y') {
|
||||
return true
|
||||
}
|
||||
if (p.speciment_received == 'Y') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
showPreAnalytic(p) {
|
||||
if (p == undefined) return false
|
||||
if (p.patients == undefined) return false
|
||||
return p.patients.length > 0
|
||||
},
|
||||
showBadge(p) {
|
||||
return false
|
||||
if (p.speciment_handling == 'Y') return true
|
||||
return false
|
||||
},
|
||||
getClassCito(p) {
|
||||
return {
|
||||
"is_cito": p.is_cito == 'Y'
|
||||
}
|
||||
},
|
||||
getClass(p) {
|
||||
let obj = {
|
||||
"not_received": true,
|
||||
"handling": false,
|
||||
"received": false,
|
||||
"running": false,
|
||||
"worklist_receive": false,
|
||||
"result": false
|
||||
}
|
||||
|
||||
obj.received = false
|
||||
obj.worklist_receive = true
|
||||
obj.not_received = false
|
||||
obj.running = false
|
||||
obj.result = false
|
||||
obj.handling = false
|
||||
obj["white--text"] = false
|
||||
|
||||
return obj
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isLoading() {
|
||||
return this.$store.state.worklist_patient.search_status == 1
|
||||
},
|
||||
staff() {
|
||||
let stf = this.$store.state.staff.selected_staff
|
||||
if (stf && stf.name) {
|
||||
return stf.name
|
||||
}
|
||||
return 'BELUM ADA STAFF'
|
||||
},
|
||||
flag_online: {
|
||||
get() {
|
||||
return this.$store.state.worklist_patient.flag_online
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("worklist_patient/update_flag_online", val)
|
||||
this.$store.commit("worklist_patient/update_current_page", 1)
|
||||
|
||||
}
|
||||
},
|
||||
in_saving: {
|
||||
get() {
|
||||
return this.$store.state.worklist_patient.in_saving
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("worklist_patient/update_in_saving", val)
|
||||
}
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.worklist_patient.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("worklist_patient/update_current_page", val)
|
||||
var self = this
|
||||
setTimeout(function () {
|
||||
self.search_px()
|
||||
}, 1)
|
||||
}
|
||||
},
|
||||
xid: {
|
||||
get() {
|
||||
return this.$store.state.worklist_patient.xid
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("worklist_patient/update_xid", val)
|
||||
}
|
||||
},
|
||||
isconfirm: {
|
||||
get() {
|
||||
return this.$store.state.worklist_patient.isconfirm
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("worklist_patient/update_isconfirm", val)
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.worklist_patient.total_data
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("worklist_patient/update_total_data", val)
|
||||
}
|
||||
},
|
||||
dialog_patient_requirement: {
|
||||
get() {
|
||||
return this.$store.state.pre_analytic.show_dialog_patient_requirement
|
||||
},
|
||||
set(v) {
|
||||
this.$store.commit("pre_analytic/update_show_dialog_patient_requirement", v)
|
||||
}
|
||||
},
|
||||
sel_patient() {
|
||||
return this.$store.state.pre_analytic.selected_patient
|
||||
},
|
||||
patient_requirements() {
|
||||
return this.$store.state.pre_analytic.selected_patient.requirements
|
||||
},
|
||||
requirements() {
|
||||
return this.$store.state.pre_analytic.requirements
|
||||
},
|
||||
message_info() {
|
||||
return this.$store.state.pre_analytic.message_info
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.pre_analytic.snackbar
|
||||
},
|
||||
set(v) {
|
||||
this.$store.commit('pre_analytic/update_snackbar', v)
|
||||
}
|
||||
},
|
||||
dialogrequirement: {
|
||||
get() {
|
||||
return this.$store.state.pre_analytic.show_dialog
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('pre_analytic/update_show_dialog', val)
|
||||
}
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.worklist_patient.patients
|
||||
},
|
||||
nolab: {
|
||||
get() {
|
||||
return this.$store.state.worklist_patient.nolab
|
||||
},
|
||||
set(v) {
|
||||
this.$store.commit('worklist_patient/update_nolab', v)
|
||||
}
|
||||
},
|
||||
|
||||
search: {
|
||||
get() {
|
||||
return this.$store.state.worklist_patient.search
|
||||
},
|
||||
set(v) {
|
||||
this.$store.commit('worklist_patient/update_search', v)
|
||||
}
|
||||
},
|
||||
|
||||
id: {
|
||||
get() {
|
||||
return this.$store.state.worklist_patient.id
|
||||
},
|
||||
set(v) {
|
||||
this.$store.commit('worklist_patient/update_id', v)
|
||||
}
|
||||
},
|
||||
|
||||
worklists() {
|
||||
return this.$store.state.worklist_patient.worklists
|
||||
},
|
||||
selected_worklist: {
|
||||
get() {
|
||||
return this.$store.state.worklist_patient.selected_worklist
|
||||
},
|
||||
set(v) {
|
||||
this.$store.commit('worklist_patient/update_selected_worklist', v)
|
||||
this.$store.commit("worklist_patient/update_current_page", 1)
|
||||
}
|
||||
},
|
||||
pxs() {
|
||||
return this.$store.state.worklist_patient.pxs
|
||||
},
|
||||
sdate() {
|
||||
return this.$store.state.worklist_patient.sdate
|
||||
},
|
||||
edate() {
|
||||
return this.$store.state.worklist_patient.edate
|
||||
},
|
||||
|
||||
btnEditEnabled() {
|
||||
if (!this.$store.state.worklist_patient.selected_worklist.T_WorklistID)
|
||||
return false
|
||||
return true
|
||||
}
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
this.$store.commit('worklist_patient/update_sdate', moment().toDate())
|
||||
await this.$store.dispatch('worklist_patient/search')
|
||||
await this.$store.dispatch('pre_analytic/getrequirements')
|
||||
await this.$store.dispatch('pre_analytic/get')
|
||||
if (this.$store.state.worklist_patient.worklists.length > 0) {
|
||||
let v = this.$store.state.worklist_patient.worklists[0]
|
||||
this.$store.commit('worklist_patient/update_selected_worklist', v)
|
||||
this.$store.dispatch('worklist_patient/search_px')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<v-subheader>
|
||||
<h3 class="title">DAFTAR PENERIMAAN SAMPLE PROCESS</h3>
|
||||
</v-subheader>
|
||||
<hr style="border-top:0px solid #c8c8c8;"></hr>
|
||||
<v-data-table
|
||||
:headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ oneMoment(props.item.date) }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.lab }}
|
||||
</td>
|
||||
<td class="pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.sid}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.name }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
<v-btn v-show="props.item.status == 'PROCESS.Process.From.Handling'" block flat>Diterima</v-btn>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2 text-xs-center">
|
||||
<v-btn flat icon color="red"
|
||||
@click="remove(props.item)"
|
||||
v-show="props.item.status == 'PROCESS.Process.From.Handling'">
|
||||
<v-icon>delete</v-icon>
|
||||
</v-btn>
|
||||
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</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.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "KIRIM",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SAMPLE ID",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "STATUS",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "ACTION",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
// this.$store.commit('ver_verification/update_selected_sent_sample', item)
|
||||
},
|
||||
|
||||
remove (item) {
|
||||
this.$store.commit('receive_patient/update_selected_sent_sample', item)
|
||||
this.$store.dispatch('receive_patient/remove')
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
patients () {
|
||||
return this.$store.state.receive_patient.sent_patients
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<v-layout>
|
||||
<v-flex xs12 text-xs-center mb-2>
|
||||
<v-card color="blue lighten-4">
|
||||
<v-card-text class="pb-0 pt-1">
|
||||
<v-btn
|
||||
v-for="tab in tabs"
|
||||
:color="tab.code == active ? 'white' : 'grey lighten-5'"
|
||||
class="white--text ma-0 tab-btn"
|
||||
:class="[tab.code == active ? 'active' : '']"
|
||||
@click="changeTab(tab.code)"
|
||||
flat
|
||||
:key="tab.code"
|
||||
:data="tab"
|
||||
>
|
||||
<v-icon left dark>{{ tab.icon }}</v-icon>
|
||||
<h6 class="title">{{ tab.label }}</h6>
|
||||
</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.active {
|
||||
border-bottom: solid 3px #ffeb3b!important;
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
min-width: 400px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
changeTab (x) {
|
||||
// this.active = x;
|
||||
this.$store.commit('change_tab', x);
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
tabs : {
|
||||
get () {
|
||||
return this.$store.state.tabs
|
||||
},
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
active () {
|
||||
return this.$store.state.tab_active
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
167
test/vuex/one-mapping-batch-v2/index.php
Normal file
167
test/vuex/one-mapping-batch-v2/index.php
Normal file
@@ -0,0 +1,167 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>One</title>
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/google-fonts.css">
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<one-navbar></one-navbar>
|
||||
<v-content class="blue lighten-5" >
|
||||
<v-container fluid pt-2 pb-2 pl-1 pr-1>
|
||||
<v-layout column>
|
||||
<v-flex xs12 pr-1>
|
||||
<one-process-worklist-list-px></one-process-worklist-list-px>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-content>
|
||||
<v-snackbar v-model="snackbar" :multi-line="true" class="box-info black--text" :timeout="4000" >
|
||||
<span v-html="message_info"></span>
|
||||
</v-snackbar>
|
||||
<one-footer> </one-footer>
|
||||
</v-app>
|
||||
</div>
|
||||
|
||||
<!-- Vendor -->
|
||||
<script src="../../../libs/vendor/axios.min.js"></script>
|
||||
<script src="../../../libs/vendor/lodash.js"></script>
|
||||
<script src="../../../libs/vendor/moment.min.js"></script>
|
||||
<script src="../../../libs/vendor/moment-locale-id.js"></script>
|
||||
<script src="../../../libs/vendor/vue.js"></script>
|
||||
<script src="../../../libs/vendor/vuex.js"></script>
|
||||
<script src="../../../libs/vendor/vuetify.js"></script>
|
||||
<script src="../../../libs/vendor/httpVueLoader.js"></script>
|
||||
<script src="../../../libs/one_global.js"></script>
|
||||
<script src="../../../libs/vendor/socket.io.js"></script>
|
||||
<!-- App Script -->
|
||||
<?php
|
||||
$ts = "?ts=" . Date("ymdhis");
|
||||
?>
|
||||
<script type="module">
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
var socketIoUrl = "http://" + window.location.host + ":9090/";
|
||||
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
|
||||
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
|
||||
'one-process-worklist-list-px': httpVueLoader('./components/oneProcessWorklistListPx.vue'),
|
||||
},
|
||||
computed : {
|
||||
},
|
||||
data : {
|
||||
socket : io.connect(socketIoUrl,{forceNew:false}),
|
||||
message_info : '',
|
||||
snackbar: false
|
||||
},
|
||||
methods : {
|
||||
show_info(msg) {
|
||||
this.$data.message_info = msg + "<br/>";
|
||||
this.$data.snackbar = true;
|
||||
},
|
||||
search_px() {
|
||||
this.$store.dispatch('worklist_patient/search_px')
|
||||
},
|
||||
async process_barcode(p,barcode,testID) {
|
||||
|
||||
let pre_msg = "Barcode : <b>" + barcode.toUpperCase() + "</b><br/>" +
|
||||
"Patient : " + p.number + ", <b>" + p.name + '</b><br/>';
|
||||
if (p.speciment_handling == 'N' ) {
|
||||
this.show_info(pre_msg + 'Speciment <b>' + barcode + ' </b> belum selesai di proses di <b>Speciment Handling</b>')
|
||||
return;
|
||||
}
|
||||
if ( p.requirements != null && p.is_confirm != 'Y' ) {
|
||||
this.show_info(pre_msg + 'Speciment <b>' + barcode + '</b> memiliki catatan dan belum di konfirmasi! ')
|
||||
return
|
||||
}
|
||||
/*
|
||||
let analytics = this.$store.state.pre_analytic.pre_analytic
|
||||
let idx = _.findIndex(analytics, function(a) { return a.T_TestID == testID } )
|
||||
if (idx < 0 ) {
|
||||
this.show_info(pre_msg + 'Pre-Analytic belum di lakukan!')
|
||||
return
|
||||
}
|
||||
*/
|
||||
if (p.speciment_handling == 'Y' && p.is_received == 'N' || p.is_received == null ) {
|
||||
let prm = { T_OrderHeaderID : p.id, T_SampleTypeID : p.T_SampleTypeID }
|
||||
await this.$store.dispatch("pre_analytic/receive",prm)
|
||||
this.show_info(pre_msg + 'Speciment <b>' + barcode + '</b> sudah di terima! ')
|
||||
this.search_px()
|
||||
return
|
||||
}
|
||||
if ( p.is_received == 'Y' ) {
|
||||
let prm = { T_OrderHeaderID : p.id, T_TestID : testID, T_SampleTypeID : p.T_SampleTypeID }
|
||||
await this.$store.dispatch("pre_analytic/suggest",prm)
|
||||
this.show_info(pre_msg + 'Speciment <b>' + barcode + '</b> disarankan ke ' +
|
||||
this.$store.state.pre_analytic.suggested_worklist )
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
document.addEventListener('keypress',logKeyboard)
|
||||
window.key_enter = ''
|
||||
var self = this
|
||||
async function logKeyboard(e) {
|
||||
window.key_enter = (window.key_enter + e.key).toUpperCase()
|
||||
if(e.key == 'Enter') {
|
||||
let barcode = window.key_enter.replace('ENTER','');
|
||||
window.key_enter = ''
|
||||
if ( barcode.substr(0,3) == 'STF') {
|
||||
self.$store.dispatch('staff/search',{search : barcode})
|
||||
return
|
||||
}
|
||||
for(let i=0; i< self.$store.state.worklist_patient.pxs.length ; i++) {
|
||||
let px = self.$store.state.worklist_patient.pxs[i];
|
||||
let testID = px.T_TestID;
|
||||
let pat = _.find(px.patients,{barcode: barcode.toUpperCase()})
|
||||
if (pat) {
|
||||
self.process_barcode(pat,barcode,testID)
|
||||
return
|
||||
}
|
||||
}
|
||||
self.show_info('Barcode : <b>' + barcode +'</b> tidak ditemukan');
|
||||
}
|
||||
|
||||
}
|
||||
self.socket.on("notification", async function(msg) {
|
||||
switch(msg.type) {
|
||||
case "specimen-col-receive" :
|
||||
case "sample-handling-done" :
|
||||
//await self.$store.dispatch('worklist_patient/search')
|
||||
//await self.$store.dispatch('pre_analytic/getrequirements')
|
||||
//await self.$store.dispatch('pre_analytic/get')
|
||||
//if (self.$store.state.worklist_patient.worklists.length > 0 ) {
|
||||
// let v = self.$store.state.worklist_patient.worklists[0]
|
||||
// self.$store.commit('worklist_patient/update_selected_worklist', v)
|
||||
self.$store.dispatch('worklist_patient/search_px')
|
||||
//}
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.box-info .v-snack__content {
|
||||
background-color : rgb(255, 230, 255);
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
150
test/vuex/one-mapping-batch-v2/modules/pre_analytic.js
Normal file
150
test/vuex/one-mapping-batch-v2/modules/pre_analytic.js
Normal file
@@ -0,0 +1,150 @@
|
||||
import * as api from "../api/pre_analytic.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
selected_px: {},
|
||||
selected_req: [],
|
||||
show_dialog: false,
|
||||
status : 'N',
|
||||
requirements : [],
|
||||
data: [],
|
||||
pre_analytic : [],
|
||||
snackbar: false,
|
||||
message_info: '',
|
||||
show_dialog_patient_requirement: false,
|
||||
selected_patient : {},
|
||||
suggested_worklist: ''
|
||||
},
|
||||
mutations: {
|
||||
update_suggested_worklist(state,data) {
|
||||
state.suggested_worklist= data
|
||||
},
|
||||
update_selected_patient(state,data) {
|
||||
state.selected_patient= data
|
||||
},
|
||||
update_show_dialog_patient_requirement(state,data) {
|
||||
state.show_dialog_patient_requirement= data
|
||||
},
|
||||
update_message_info(state,data) {
|
||||
state.message_info = data
|
||||
},
|
||||
update_snackbar(state, data) {
|
||||
state.snackbar = data
|
||||
},
|
||||
update_pre_analytic(state, data) {
|
||||
state.pre_analytic = data
|
||||
},
|
||||
update_data(state,data) {
|
||||
state.data = data
|
||||
},
|
||||
update_show_dialog(state,status) {
|
||||
state.show_dialog= status
|
||||
},
|
||||
update_selected_req(state,status) {
|
||||
state.selected_req= status
|
||||
},
|
||||
update_px(state,status) {
|
||||
state.selected_px= status
|
||||
},
|
||||
update_status(state,val) {
|
||||
state.status=val
|
||||
},
|
||||
update_requirements(state, val) {
|
||||
state.requirements = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async suggest(context,prm) {
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.suggest(prm)
|
||||
if (resp.status == "OK") {
|
||||
context.commit("update_suggested_worklist", resp.data.message)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async save(context,prm) {
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.save(prm)
|
||||
if (resp.status == "OK") {
|
||||
let data = resp.data.records
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async receive(context,prm) {
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.receive(prm)
|
||||
if (resp.status == "OK") {
|
||||
let data = resp.data.records
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async save_reject(context,prm) {
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.save_reject(prm)
|
||||
if (resp.status == "OK") {
|
||||
let data = resp.data.records
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async save_confirmation(context,prm) {
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.save_confirmation(prm)
|
||||
if (resp.status == "OK") {
|
||||
let data = resp.data.records
|
||||
context.commit("worklist_patient/update_in_saving", false, {root:true})
|
||||
|
||||
}
|
||||
context.dispatch("worklist_patient/search_px", null,{root:true})
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async get(context) {
|
||||
try {
|
||||
let prm = {}
|
||||
prm.token = one_token()
|
||||
let resp = await api.get(prm)
|
||||
if (resp.status == "OK") {
|
||||
let data = resp.data.records
|
||||
context.commit("update_pre_analytic", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async getrequirements(context) {
|
||||
try {
|
||||
let prm ={token: one_token()}
|
||||
let resp = await api.getrequirements(prm)
|
||||
if (resp.status == "OK") {
|
||||
let data = resp.data.records
|
||||
context.commit("update_requirements", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
160
test/vuex/one-mapping-batch-v2/modules/receive_patient.js
Normal file
160
test/vuex/one-mapping-batch-v2/modules/receive_patient.js
Normal file
@@ -0,0 +1,160 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/receive_patient.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
nolab:'',
|
||||
search: '',
|
||||
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
patients: [],
|
||||
sent_patients: [],
|
||||
total_patient: 0,
|
||||
sent_total_patient: 0,
|
||||
selected_patient: {},
|
||||
selected_sent_sample: {},
|
||||
|
||||
ids : []
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_noreg(state,val) {
|
||||
state.noreg=val
|
||||
},
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_patients(state, data) {
|
||||
state.patients= data.records
|
||||
state.total_patient = data.total
|
||||
},
|
||||
update_selected_patient(state,val) {
|
||||
state.selected_patient=val
|
||||
},
|
||||
|
||||
update_nolab(state, val) {
|
||||
state.nolab = val
|
||||
},
|
||||
|
||||
update_sent_patients(state, data) {
|
||||
state.sent_patients= data.records
|
||||
state.sent_total_patient = data.total
|
||||
},
|
||||
|
||||
update_ids(state, ids) {
|
||||
state.ids = ids
|
||||
},
|
||||
|
||||
update_selected_sent_sample(state, val) {
|
||||
state.selected_sent_sample = val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search(context.state.nolab, context.state.search)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_patients", data)
|
||||
context.dispatch('search_sent')
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search_sent(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search_sent()
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_sent_patients", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async receive(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.receive(context.state.ids.join(','))
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.dispatch('receive_patient/search', null, {root:true})
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async remove(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.remove(context.state.selected_sent_sample.id)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.dispatch('receive_patient/search', null, {root:true})
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
28
test/vuex/one-mapping-batch-v2/modules/staff.js
Normal file
28
test/vuex/one-mapping-batch-v2/modules/staff.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import * as api from "../api/staff.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
selected_staff: {},
|
||||
},
|
||||
mutations: {
|
||||
update_selected_staff(state,data) {
|
||||
state.selected_staff= data
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context,prm) {
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status == "OK") {
|
||||
let data = resp.data.records
|
||||
console.log(data)
|
||||
context.commit("update_selected_staff",data)
|
||||
}
|
||||
} catch(e) {
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
264
test/vuex/one-mapping-batch-v2/modules/worklist_new.js
Normal file
264
test/vuex/one-mapping-batch-v2/modules/worklist_new.js
Normal file
@@ -0,0 +1,264 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/worklist_new.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
worklist_id:0,
|
||||
search: '',
|
||||
sdate: null,
|
||||
edate: null,
|
||||
state_edit: false,
|
||||
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
pxs: [],
|
||||
chosen_pxs: [],
|
||||
total_px: 0,
|
||||
chosen_total_px: 0,
|
||||
selected_px: {
|
||||
|
||||
},
|
||||
|
||||
dialog_form_new: false,
|
||||
name: "",
|
||||
|
||||
search_left: "",
|
||||
search_right: "",
|
||||
|
||||
instruments: [],
|
||||
selected_instrument: null,
|
||||
is_rujukan: 'N'
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_patients(state, data) {
|
||||
state.patients= data.records
|
||||
state.total_patient = data.total
|
||||
},
|
||||
update_selected_patient(state,val) {
|
||||
state.verification_show = false
|
||||
state.selected_patient=val
|
||||
setTimeout(function() { state.verification_show = true }, 100)
|
||||
},
|
||||
|
||||
update_id(state, id) {
|
||||
state.worklist_id = id
|
||||
},
|
||||
|
||||
update_pxs(state, pxs) {
|
||||
state.pxs = pxs.records
|
||||
state.total_px = pxs.total
|
||||
},
|
||||
|
||||
update_chosen_pxs(state, pxs) {
|
||||
state.chosen_pxs = pxs.records
|
||||
state.chosen_total_px = pxs.total
|
||||
},
|
||||
|
||||
update_selected_px(state, px) {
|
||||
state.selected_px = px
|
||||
},
|
||||
|
||||
update_dialog_form_new(state, d) {
|
||||
state.dialog_form_new = d
|
||||
},
|
||||
|
||||
update_state_edit(state, d) {
|
||||
state.state_edit = d
|
||||
},
|
||||
|
||||
update_name(state, d) {
|
||||
state.name = d
|
||||
},
|
||||
|
||||
update_search_left(state, d) {
|
||||
state.search_left = d
|
||||
},
|
||||
|
||||
update_search_right(state, d) {
|
||||
state.search_right = d
|
||||
},
|
||||
|
||||
update_instruments(state, d) {
|
||||
state.instruments = d.records
|
||||
},
|
||||
|
||||
update_selected_instrument(state, d) {
|
||||
state.selected_instrument = d
|
||||
},
|
||||
|
||||
update_is_rujukan(state, d) {
|
||||
state.is_rujukan = d
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
var y = []
|
||||
for (let i in context.state.chosen_pxs)
|
||||
y.push(context.state.chosen_pxs[i]['T_TestID']);
|
||||
|
||||
let resp = await api.search(context.state.search_left, y.join(','))
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display
|
||||
}
|
||||
context.commit("update_pxs", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search_chosen(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search_chosen(context.state.search_right, context.state.worklist_id)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display
|
||||
}
|
||||
context.commit("update_chosen_pxs", data)
|
||||
context.dispatch('search')
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search_instrument(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
|
||||
let resp = await api.search_instrument(one_token())
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_instruments", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async save(context, data) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
|
||||
let resp= await api.save(data.name, data.test, data.rujukan, data.instrument)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status", 2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.dispatch('worklist_patient/search', null, {root:true})
|
||||
context.commit('worklist_patient/update_dialog_form_new', false, {root:true})
|
||||
// context.commit('update_chosen_pxs', [])
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message_2", e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async save_edit(context, data) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
|
||||
let resp= await api.save_edit(data.id, data.name, data.test, data.rujukan, data.instrument)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status", 2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.dispatch('worklist_patient/search', null, {root:true})
|
||||
context.commit('worklist_patient/update_dialog_form_new', false, {root:true})
|
||||
// context.commit('update_chosen_pxs', [])
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message_2", e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async del(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
|
||||
let resp = await api.del(context.state.worklist_id)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status", 2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.commit('worklist_patient/update_selected_worklist', {}, {root:true})
|
||||
context.dispatch('worklist_patient/search', null, {root:true})
|
||||
context.commit('worklist_patient/update_dialog_form_new', false, {root:true})
|
||||
// context.commit('update_chosen_pxs', [])
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message_2", e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
248
test/vuex/one-mapping-batch-v2/modules/worklist_patient.js
Normal file
248
test/vuex/one-mapping-batch-v2/modules/worklist_patient.js
Normal file
@@ -0,0 +1,248 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/worklist_patient.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
worklist_id:0,
|
||||
search: '',
|
||||
sdate: null,
|
||||
edate: null,
|
||||
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
patients: [],
|
||||
sent_patients: [],
|
||||
total_patient: 0,
|
||||
sent_total_patient: 0,
|
||||
selected_patient: {
|
||||
|
||||
},
|
||||
|
||||
id : [],
|
||||
verification_show : false,
|
||||
|
||||
// PX
|
||||
total_px: 0,
|
||||
pxs: [],
|
||||
|
||||
// Worklist
|
||||
total_worklist: 0,
|
||||
worklists: [],
|
||||
selected_worklist: {},
|
||||
|
||||
dialog_form_new: false,
|
||||
flag_online:'48',
|
||||
current_page:1,
|
||||
total_data: 0,
|
||||
in_saving: false,
|
||||
isconfirm: 'N',
|
||||
xid: 0,
|
||||
},
|
||||
mutations: {
|
||||
update_xid(state, val) {
|
||||
state.xid = val
|
||||
},
|
||||
update_isconfirm(state, val) {
|
||||
state.isconfirm = val
|
||||
},
|
||||
update_in_saving(state, val) {
|
||||
state.in_saving = val
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val
|
||||
},
|
||||
update_total_data(state, val) {
|
||||
state.total_data = val
|
||||
},
|
||||
update_flag_online(state, data) {
|
||||
state.flag_online = data
|
||||
},
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_patients(state, data) {
|
||||
state.patients= data.records
|
||||
state.total_patient = data.total
|
||||
},
|
||||
update_selected_patient(state,val) {
|
||||
state.verification_show = false
|
||||
state.selected_patient=val
|
||||
setTimeout(function() { state.verification_show = true }, 100)
|
||||
},
|
||||
|
||||
update_id(state, id) {
|
||||
state.worklist_id = id
|
||||
},
|
||||
|
||||
update_pxs(state, pxs) {
|
||||
state.pxs = pxs.records
|
||||
},
|
||||
|
||||
update_worklists(state, worklist) {
|
||||
state.worklists = worklist.records
|
||||
},
|
||||
|
||||
update_selected_worklist(state, worklist) {
|
||||
state.selected_worklist = worklist
|
||||
},
|
||||
|
||||
update_sdate(state, date) {
|
||||
state.sdate = date
|
||||
},
|
||||
|
||||
update_edate(state, date) {
|
||||
state.edate = date
|
||||
},
|
||||
|
||||
update_dialog_form_new(state, d) {
|
||||
state.dialog_form_new = d
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search()
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_worklists", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search_px(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
context.commit("update_pxs", [])
|
||||
let resp= await api.search_px(context.state.selected_worklist.T_WorklistID,
|
||||
context.state.sdate,
|
||||
context.state.edate,
|
||||
context.state.flag_online,
|
||||
context.state.current_page)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
totalpage: resp.data.totalpage
|
||||
}
|
||||
context.commit("update_pxs", data)
|
||||
context.commit("update_isconfirm", resp.data.records[0].isconfirm)
|
||||
context.commit("update_xid", resp.data.records[0].T_MappingBatchID)
|
||||
context.commit("update_total_data", data.totalpage)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
// async search_sent(context) {
|
||||
// context.commit("update_search_status", 1)
|
||||
// try {
|
||||
// let resp= await api.search_sent()
|
||||
|
||||
// if (resp.status != "OK") {
|
||||
|
||||
// context.commit("update_search_status", 3)
|
||||
// context.commit("update_search_error_message", resp.message)
|
||||
// } else {
|
||||
// context.commit("update_search_status",2)
|
||||
// context.commit("update_search_error_message","")
|
||||
// let data = {
|
||||
// records : resp.data.records,
|
||||
// total: resp.data.total
|
||||
// }
|
||||
// context.commit("update_sent_patients", data)
|
||||
// }
|
||||
// } catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
// }
|
||||
// },
|
||||
|
||||
async verify(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let data = context.state.selected_patient.data
|
||||
console.log(data)
|
||||
let resp= await api.verify(context.state.selected_patient.order_sample_id,
|
||||
context.state.selected_patient.id, data)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status", 2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.dispatch('worklist_patient/search', null, {root:true})
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message_2", e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async reject(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let data = context.state.selected_patient.data
|
||||
console.log(data)
|
||||
let resp= await api.reject(context.state.selected_patient.order_sample_id,
|
||||
context.state.selected_patient.id, data)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status", 2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.dispatch('worklist_patient/search', null, {root:true})
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message_2", e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
32
test/vuex/one-mapping-batch-v2/store.js
Normal file
32
test/vuex/one-mapping-batch-v2/store.js
Normal file
@@ -0,0 +1,32 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import worklist_patient from "./modules/worklist_patient.js";
|
||||
import worklist_new from "./modules/worklist_new.js";
|
||||
import receive_patient from "./modules/receive_patient.js";
|
||||
import pre_analytic from "./modules/pre_analytic.js";
|
||||
import staff from "./modules/staff.js";
|
||||
import system from "../../../apps/modules/system/system.js";
|
||||
|
||||
export const store = new Vuex.Store({
|
||||
state : {
|
||||
},
|
||||
|
||||
mutations : {
|
||||
change_tab(state, tab) {
|
||||
state.tab_active = tab;
|
||||
}
|
||||
},
|
||||
|
||||
modules : {
|
||||
receive_patient: receive_patient,
|
||||
worklist_patient: worklist_patient,
|
||||
worklist_new: worklist_new,
|
||||
pre_analytic: pre_analytic,
|
||||
staff: staff,
|
||||
system: system
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user