Flatten nested repos

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

View File

@@ -0,0 +1,209 @@
// API :
// search bank
// paramater : query , page , rowPerPage
const URL =
"/one-api/mockup/sampling/handling/";
export async function search(nolab, search) {
try {
var resp = await axios.post(URL + 'handling_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 verify(token, orderid, laststatusid, datax) {
try {
var resp = await axios.post(URL + 'handling_patient/verify', {
token: token,
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 verify_process(token, orderid, laststatusid) {
try {
var resp = await axios.post(URL + 'handling_patient/verify_process', {
token: token,
orderid: orderid,
laststatusid: laststatusid
});
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(token, orderid, laststatusid, datax) {
try {
var resp = await axios.post(URL + 'handling_patient/reject', {
token: token,
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_process(token, orderid, laststatusid) {
try {
var resp = await axios.post(URL + 'handling_patient/reject_process', {
token: token,
orderid: orderid,
laststatusid: laststatusid
});
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_requirement() {
try {
var resp = await axios.post(URL + 'handling_patient/get_requirement', {});
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_requirement(token, order_id, sample_id, status, reqs) {
try {
var resp = await axios.post(URL + 'handling_patient/save_requirement', {
token: token,
order_id: order_id,
sample_id: sample_id,
status: status,
reqs: reqs
});
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_requirement_process(token, order_id, sample_id, status, reqs) {
try {
var resp = await axios.post(URL + 'handling_patient/save_requirement_process', {
token: token,
order_id: order_id,
sample_id: sample_id,
status: status,
reqs: reqs
});
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch(e) {
return {
status: "ERR",
message: e.message
};
}
}

View File

@@ -0,0 +1,88 @@
// API :
// search bank
// paramater : query , page , rowPerPage
const URL =
"/one-api/mockup/sampling/handling/";
export async function search(nolab, search) {
try {
var resp = await axios.post(URL + 'process_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 + 'process_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 send(ids) {
try {
var resp = await axios.post(URL + 'process_patient/send', {
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 + 'process_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
};
}
}

View File

@@ -0,0 +1,88 @@
// API :
// search bank
// paramater : query , page , rowPerPage
const URL =
"/one-api/mockup/sampling/handling/";
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
};
}
}

View File

@@ -0,0 +1,222 @@
<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"
@keyup.native="keySearch"
></v-text-field>
<v-text-field class="flex xs8 ma-1"
label=""
placeholder="Nama"
single-line
outline
hide-details
v-model="search"
@keyup.native="keySearch"
></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">SPECIMEN DARI VERIFICATION</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)
},
keySearch(e) {
if (e.which == 13) {
this.search_patient()
}
}
},
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>

View File

@@ -0,0 +1,154 @@
<template>
<v-layout class="fill-height" column>
<v-card class="grow">
<v-subheader>
<h3 class="title">DAFTAR PENERIMAAN SPECIMEN HANDLING</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 pl-2 pr-2"
@click="select(props.item)">
{{ oneMoment(props.item.date) }}
</td>
<td class="text-xs-left pl-2 pr-2"
@click="select(props.item)">
{{ props.item.lab }}
</td>
<td class=" pl-2 pr-2"
@click="select(props.item)">
{{ props.item.sid}}
</td>
<td class="text-xs-left pl-2 pr-2"
@click="select(props.item)">
{{ props.item.name }}
</td>
<td class="text-xs-left pl-2 pr-2"
@click="select(props.item)">
<v-btn v-show="props.item.status == 'SAMPLING.Handling.From.Verification'" block flat>Diterima</v-btn>
<v-btn v-show="props.item.status == 'SAMPLING.Handling.Process'" block flat color="green">Diproses</v-btn>
<v-btn v-show="props.item.status == 'SAMPLING.Handling.Reject'" block flat color="red">Ditolak</v-btn>
</td>
<td class="text-xs-left pl-2 pr-2 text-xs-center">
<v-btn flat icon color="red"
@click="remove(props.item)"
v-show="props.item.status == 'SAMPLING.Handling.From.Verification'">
<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>

View File

@@ -0,0 +1,187 @@
<template>
<v-dialog
v-model="dialog"
:width="this.requirements.length <= 5 ? 500 : 900"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
SAMPLE VERIFIKASI
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row wrap>
<v-flex v-bind:class="this.requirements.length <= 5 ? 'xs12' : 'xs6'">
<v-layout row wrap>
<v-flex xs12 v-for="(req, i) in reqs_odd" v-bind:key="i">
<v-checkbox :label="req.req_name" v-model="selected_requirements" :value="req.req_id"
hide-details
class="mt-2"></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs6 v-if="this.requirements.length > 5">
<v-layout row wrap>
<v-flex xs12 v-for="(req, i) in reqs_even" v-bind:key="i">
<v-checkbox :label="req.req_name" v-model="selected_requirements" :value="req.req_id"
hide-details
class="mt-2"></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout row wrap>
<v-flex xs12 pt-4>
<v-textarea
auto-grow
label="Catatan"
rows="3"
v-model="note"
outline
></v-textarea>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-btn
color="primary"
flat
@click="dialog = false"
>
Tutup
</v-btn>
<v-spacer></v-spacer>
<v-btn
color="red"
@click="save"
:disabled="selected_requirements.length < 1"
:dark="selected_requirements.length > 0"
>
OK
</v-btn>
<!-- <v-btn
color="primary"
@click="save_process"
:disabled="selected_requirements.length < 1"
:dark="selected_requirements.length > 0"
>
Proses
</v-btn> -->
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
components : {
},
methods : {
// save_reject () {
// this.$store.dispatch('handling_patient/reject')
// // this.$store.dispatch('handling_patient/save_requirement', "N")
// },
// save_process () {
// this.$store.dispatch('handling_patient/verify')
// }
save () {
this.$store.commit('handling_patient/update_req_status', {req_status:'N', reqs:this.$store.state.handling_patient.reqs})
this.dialog = false
}
},
computed : {
dialog: {
get() {
return this.$store.state.handling_patient.dialog_requirement;
},
set(val) {
this.$store.commit('handling_patient/update_dialog_requirement', val);
}
},
requirements () {
if (this.$store.state.handling_patient.selected_patient.reqs_handling)
return this.$store.state.handling_patient.selected_patient.reqs_handling
return []
},
selected_requirements : {
get () {
return this.$store.state.handling_patient.selected_reqs
},
set (v) {
this.$store.commit('handling_patient/update_selected_reqs', v)
}
},
note : {
get () {
return this.$store.state.handling_patient.req_note
},
set (v) {
this.$store.commit('handling_patient/update_req_note', v)
}
},
reqs_odd () {
if (!this.requirements)
return []
if (this.requirements.length <= 5)
return this.requirements
if (this.requirements <= 10)
return this.requirements.slice(0,4)
else {
let x = Math.ceil(this.requirements.length / 2)
return this.requirements.slice(0, x-1)
}
},
reqs_even () {
if (!this.requirements)
return []
if (this.requirements.length <= 5)
return []
if (this.requirements <= 10)
return this.requirements.slice(5, this.requirements-1)
else {
let x = Math.ceil(this.requirements.length / 2)
return this.requirements.slice(x, this.requirements.length-1)
}
}
},
mounted () {
// this.$store.dispatch('handling_patient/get_requirement')
},
watch : {
dialog(n, o) {
let x = this.$store.state.handling_patient.selected_reqs_handling
if (n && !o)
this.$store.commit('handling_patient/update_selected_requirements', {pos:'HANDLING', data:x})
}
}
}
</script>

View File

@@ -0,0 +1,187 @@
<template>
<v-dialog
v-model="dialog"
:width="this.requirements.length <= 5 ? 500 : 900"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Sample Handling
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row wrap>
<v-flex v-bind:class="this.requirements.length <= 5 ? 'xs12' : 'xs6'">
<v-layout row wrap>
<v-flex xs12 v-for="(req, i) in reqs_odd" v-bind:key="i">
<v-checkbox :label="req.req_name" v-model="selected_requirements" :value="req.req_id"
hide-details
class="mt-2"></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs6 v-if="this.requirements.length > 5">
<v-layout row wrap>
<v-flex xs12 v-for="(req, i) in reqs_even" v-bind:key="i">
<v-checkbox :label="req.req_name" v-model="selected_requirements" :value="req.req_id"
hide-details
class="mt-2"></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout row wrap>
<v-flex xs12 pt-4>
<v-textarea
auto-grow
label="Catatan"
rows="3"
v-model="note"
outline
></v-textarea>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-btn
color="primary"
flat
@click="dialog = false"
>
Tutup
</v-btn>
<v-spacer></v-spacer>
<v-btn
color="red"
@click="save"
:disabled="selected_requirements.length < 1"
:dark="selected_requirements.length > 0"
>
OK
</v-btn>
<!-- <v-btn
color="primary"
@click="save_process"
:disabled="selected_requirements.length < 1"
:dark="selected_requirements.length > 0"
>
Proses
</v-btn> -->
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
components : {
},
methods : {
// save_reject () {
// this.$store.dispatch('handling_process_patient/reject')
// // this.$store.dispatch('handling_patient/save_requirement', "N")
// },
// save_process () {
// this.$store.dispatch('handling_process_patient/verify')
// }
save () {
this.$store.commit('handling_process_patient/update_req_status', {req_status:'N', reqs:this.$store.state.handling_process_patient.reqs})
this.dialog = false
}
},
computed : {
dialog: {
get() {
return this.$store.state.handling_process_patient.dialog_requirement;
},
set(val) {
this.$store.commit('handling_process_patient/update_dialog_requirement', val);
}
},
requirements () {
if (this.$store.state.handling_process_patient.reqs)
return this.$store.state.handling_process_patient.reqs
return []
},
selected_requirements : {
get () {
return this.$store.state.handling_process_patient.selected_reqs
},
set (v) {
this.$store.commit('handling_process_patient/update_selected_reqs', v)
}
},
note : {
get () {
return this.$store.state.handling_process_patient.req_note
},
set (v) {
this.$store.commit('handling_process_patient/update_req_note', v)
}
},
reqs_odd () {
if (!this.requirements)
return []
if (this.requirements.length <= 5)
return this.requirements
if (this.requirements <= 10)
return this.requirements.slice(0,4)
else {
let x = Math.ceil(this.requirements.length / 2)
return this.requirements.slice(0, x-1)
}
},
reqs_even () {
if (!this.requirements)
return []
if (this.requirements.length <= 5)
return []
if (this.requirements <= 10)
return this.requirements.slice(5, this.requirements-1)
else {
let x = Math.ceil(this.requirements.length / 2)
return this.requirements.slice(x, this.requirements.length-1)
}
}
},
mounted () {
// this.$store.dispatch('handling_patient/get_requirement')
},
watch : {
dialog(n, o) {
let x = this.$store.state.handling_patient.selected_reqs_process
if (n && !o)
this.$store.commit('handling_patient/update_selected_requirements', {pos:'PROCESS', data:x})
}
}
}
</script>

View File

@@ -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>

View File

@@ -0,0 +1,206 @@
<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"
@keyup.native="keySearch"
></v-text-field>
<v-text-field class="flex xs8 ma-1"
label=""
placeholder="Nama"
single-line
outline
hide-details
v-model="search"
@keyup.native="keySearch"
></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="send" large block fill-height >
<v-icon>send</v-icon>
</v-btn>
</v-layout>
</v-flex>
</v-layout>
</v-card>
<v-card class="grow">
<v-subheader>
<h3 class="title">SPECIMEN SIAP KIRIM</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 pl-2 pr-2"
@click="select(props.item)">
{{ oneMoment(props.item.date)}}
</td>
<td class="text-xs-left pl-2 pr-2"
@click="select(props.item)">
{{ props.item.lab }}
</td>
<td class=" pl-2 pr-2"
@click="select(props.item)">
{{ props.item.sid}}
</td>
<td class="text-xs-left pl-2 pr-2"
@click="select(props.item)">
{{ props.item.name }}
</td>
<td class="text-xs-left pl-2 pr-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;
}
</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('process_patient/search')
},
send () {
this.$store.dispatch('process_patient/send')
},
select(item) {
this.$store.commit('process_patient/update_selected_patient', item)
},
keySearch (e) {
if (e.which == 13) {
this.search_patient()
}
}
},
computed : {
patients () {
return this.$store.state.process_patient.patients
},
nolab : {
get () {
return this.$store.state.process_patient.nolab
},
set (v) {
this.$store.commit('process_patient/update_nolab', v)
}
},
search : {
get () {
return this.$store.state.process_patient.search
},
set (v) {
this.$store.commit('process_patient/update_search', v)
}
},
ids : {
get () {
return this.$store.state.process_patient.ids
},
set (v) {
this.$store.commit('process_patient/update_ids', v)
}
}
}
}
</script>

View File

@@ -0,0 +1,149 @@
<template>
<v-layout class="fill-height" column>
<v-card class="grow">
<v-subheader>
<h3 class="title">PENGIRIMAN KE BAGIAN PROSES</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-1"
@click="select(props.item)">
{{ oneMoment(props.item.date) }}
</td>
<td class="text-xs-left pa-1"
@click="select(props.item)">
{{ props.item.lab }}
</td>
<td class="pa-1"
@click="select(props.item)">
{{ props.item.sid}}
</td>
<td class="text-xs-left pa-1"
@click="select(props.item)">
{{ props.item.name }}
</td>
<td class="text-xs-left pa-1"
@click="select(props.item)">
<v-btn v-show="props.item.status == 'SAMPLING.Handling.To.Process'" block flat>Pending</v-btn>
<!-- <v-btn v-show="props.item.status == 'SAMPLING.SampleHandling.From.Verification'" block color="primary" flat>Diterima</v-btn> -->
</td>
<td class="text-xs-left pa-1 text-xs-center">
<v-btn flat icon color="red"
@click="remove(props.item)"
v-show="props.item.status == 'SAMPLING.Handling.To.Process'">
<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;
}
</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('process_patient/update_selected_sent', item)
this.$store.dispatch('process_patient/remove')
}
},
computed : {
patients () {
return this.$store.state.process_patient.sent_patients
}
}
}
</script>

View File

@@ -0,0 +1,431 @@
<template>
<v-layout class="fill-height" column>
<v-card class="grow">
<v-layout column ma-3>
<v-flex xs12>
<h3 class="title mb-2">INFORMASI SPECIMEN :</h3>
</v-flex>
<v-flex xs12>
<v-layout row>
<v-flex xs4>
<v-text-field
label="Durasi Sampling"
outline
v-model="duration_sampling"
readonly
hide-details
></v-text-field>
</v-flex>
<v-flex xs8 ml-2>
<v-text-field
label="Petugas Sampling"
outline
v-model="user_sampling"
readonly
hide-details
></v-text-field>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs12 mt-1>
<v-layout row>
<v-flex xs6>
<v-text-field
label="Petugas Verifikasi"
outline
v-model="user_verification"
readonly
hide-details
></v-text-field>
</v-flex>
<v-flex xs6 ml-2>
<v-text-field
label="Catatan Verifikasi"
outline
v-model="verification_note"
readonly
hide-details
></v-text-field>
</v-flex>
</v-layout>
</v-flex>
<v-divider class="mb-0 mt-2"></v-divider>
<v-flex xs12>
<v-layout row wrap v-show="verification_show">
<v-flex xs12 pt-2>
<v-card color="blue lighten-3 white--text" outlined flat v-show="true">
<v-card-text class="pt-2 pb-2">
<v-layout row wrap>
<v-flex xs6>
<p class="title mb-0 mt-2">Sampling Verification</p>
</v-flex>
<v-flex xs6 class="text-xs-right">
<v-btn
:color="req_status_handling == 'N' ? 'red' : 'white'"
:dark="req_status_handling == 'N'"
class="one-btn-icon mr-1 ma-0" @click="req_handling_notok">
<v-icon>clear</v-icon>
</v-btn>
<v-btn
:color="req_status_handling == 'Y' ? 'green' : 'white'" class="one-btn-icon ma-0" @click="req_handling_ok"
:dark="req_status_handling == 'Y'">
<v-icon>done</v-icon>
</v-btn>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
<v-card v-if="false">
<v-card-text class="pb-2 pt-2">
<v-layout row wrap>
<v-flex v-bind:class="this.reqs_handling.length <= 5 ? 'xs12' : 'xs6'">
<v-layout row wrap>
<v-flex xs12 v-for="(req, i) in reqs_odd_handling" v-bind:key="i">
<v-checkbox :label="req.req_name" :value="req.req_id"
hide-details
class="mt-2"></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs6 v-if="this.reqs_handling.length > 5">
<v-layout row wrap>
<v-flex xs12 v-for="(req, i) in reqs_even_handling" v-bind:key="i">
<v-checkbox :label="req.req_name" :value="req.req_id"
hide-details
class="mt-2"></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout row wrap>
<v-flex xs12 pt-4>
<v-textarea
auto-grow
label="Catatan"
rows="3"
outline
></v-textarea>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
<v-card v-if="true">
<v-card-text class="pb-2 pt-2">
<v-btn :color="selected_reqs_handling.indexOf(req.req_id) > -1 ? 'red' : 'black'" outline flat depressed small dark
v-for="(req, i) in reqs_handling" v-bind:key="i"
class="mt-1 mr-1 ma-0">
{{ req.req_name }}
</v-btn>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
<v-layout row wrap v-show="verification_show">
<v-flex xs12 pt-2>
<v-card color="blue lighten-3 white--text" outlined flat v-show="true">
<v-card-text class="pt-2 pb-2">
<v-layout row wrap>
<v-flex xs6>
<p class="title mb-0 mt-2">Pre Analitik</p>
</v-flex>
<v-flex xs6 class="text-xs-right">
<v-btn
:color="req_status_process == 'N' ? 'red' : 'white'"
:dark="req_status_process == 'N'"
class="one-btn-icon mr-1 ma-0" @click="req_process_notok">
<v-icon>clear</v-icon>
</v-btn>
<v-btn
:color="req_status_process == 'Y' ? 'green' : 'white'"
class="one-btn-icon ma-0" @click="req_process_ok"
:dark="req_status_process == 'Y'">
<v-icon>done</v-icon>
</v-btn>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
<v-card v-if="true">
<v-card-text class="pb-2 pt-2">
<v-btn :color="selected_reqs_process.indexOf(req.req_id) > -1 ? 'red' : 'black'" outline flat depressed small dark
v-for="(req, i) in reqs_process" v-bind:key="i"
class="mt-1 mr-1 ma-0">
{{ req.req_name }}
</v-btn>
</v-card-text>
</v-card>
<v-card v-if="false">
<v-card-text class="pb-2 pt-2">
<v-layout row wrap>
<v-flex v-bind:class="this.reqs_process.length <= 5 ? 'xs12' : 'xs6'">
<v-layout row wrap>
<v-flex xs12 v-for="(req, i) in reqs_odd_process" v-bind:key="i">
<v-checkbox :label="req.req_name" :value="req.req_id"
hide-details
class="mt-2"></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs6 v-if="this.reqs_process.length > 5">
<v-layout row wrap>
<v-flex xs12 v-for="(req, i) in reqs_even_process" v-bind:key="i">
<v-checkbox :label="req.req_name" :value="req.req_id"
hide-details
class="mt-2"></v-checkbox>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout row wrap>
<v-flex xs12 pt-4>
<v-textarea
auto-grow
label="Catatan"
rows="3"
outline
></v-textarea>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
<v-layout row wrap v-show="verification_show">
<v-flex xs12 pt-2>
<v-card color="blue lighten-3 white--text" outlined flat v-show="true">
<v-card-text class="pt-2 pb-2">
<v-layout row wrap>
<v-flex xs12 class="text-xs-right">
<v-btn color="red"
:dark="btn_process_enabled"
class="mr-1 ma-0"
@click="reject"
:disabled="!btn_process_enabled">
REJECT
</v-btn>
<v-btn color="green" class="ma-0"
:dark="btn_process_enabled"
@click="verify"
:disabled="!btn_process_enabled">
PROSES
</v-btn>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card>
</v-layout>
</template>
<script>
module.exports = {
components : {
'one-field-verification' : httpVueLoader('./../../common/oneFieldVerification.vue')
},
computed : {
data () {
let x = this.$store.state.handling_patient.selected_patient.data
if (typeof x == "undefined")
return {clott_checked:false,lipemik_checked:false,lisis_checked:false,
clott_note:"",lipemik_note:"",lisis_note:""}
x.clott_checked = x.clott == "Y" ? true : false
x.lipemik_checked = x.lipemik == "Y" ? true : false
x.lisis_checked = x.lisis == "Y" ? true : false
return x
},
patient () {
return this.$store.state.handling_patient.selected_patient
},
user_sampling () {
let x = this.$store.state.handling_patient.selected_patient
if (typeof x.user_sampling == "undefined")
return '-'
return 'Sampling : ' + x.user_sampling + ' / Receive : ' + x.user_receive
},
duration_sampling () {
let x = this.$store.state.handling_patient.selected_patient
if (typeof x.sampling_duration == "undefined")
return '0'
return Math.round(moment.duration(x.sampling_duration).asMinutes()) + ' menit'
},
user_verification () {
let x = this.$store.state.handling_patient.selected_patient
if (typeof x.user_verification == "undefined")
return '-'
return x.user_verification
},
verification_note () {
let x = this.$store.state.handling_patient.selected_patient
if (typeof x.verification_note == "undefined")
return '-'
return x.verification_note
},
note : {
get () {
let x = this.$store.state.handling_patient.selected_patient.data
if (typeof x == "undefined")
return ""
return x.note
},
set (v) {
this.$store.commit('handling_patient/update_verification_note', v)
}
},
verification_show : {
get () {
return this.$store.state.handling_patient.verification_show
},
set (v) {
this.$store.commit('handling_patient/update_verification_show', v)
}
},
reqs_handling () {
return this.$store.state.handling_patient.reqs
},
reqs_process () {
return this.$store.state.handling_process_patient.reqs
},
req_status_handling () {
return this.$store.state.handling_patient.req_status
},
req_status_process () {
return this.$store.state.handling_process_patient.req_status
},
selected_reqs_handling () {
return this.$store.state.handling_patient.selected_reqs
},
selected_reqs_process () {
return this.$store.state.handling_process_patient.selected_reqs
},
reqs_odd_handling () {
if (!this.reqs_handling) return []
if (this.reqs_handling.length <= 5) return this.reqs_handling
if (this.reqs_handling <= 10) return this.reqs_handling.slice(0,4)
let x = Math.ceil(this.reqs_handling.length / 2)
return this.reqs_handling.slice(0, x-1)
},
reqs_even_handling () {
if (!this.reqs_handling) return []
if (this.reqs_handling.length <= 5) return []
if (this.reqs_handling.length <= 10) return this.reqs_handling.slice(5, this.reqs_handling.length-1)
let x = Math.ceil(this.reqs_handling.length / 2)
return this.reqs_handling.slice(x, this.reqs_handling.length-1)
},
reqs_odd_process () {
if (!this.reqs_process) return []
if (this.reqs_process.length <= 5) return this.reqs_process
if (this.reqs_process <= 10) return this.reqs_process.slice(0,4)
let x = Math.ceil(this.reqs_process.length / 2)
return this.reqs_process.slice(0, x-1)
},
reqs_even_process () {
if (!this.reqs_process) return []
if (this.reqs_process.length <= 5) return []
if (this.reqs_process.length <= 10) return this.reqs_process.slice(5, this.reqs_process.length-1)
let x = Math.ceil(this.reqs_process.length / 2)
return this.reqs_process.slice(x, this.reqs_process.length-1)
},
btn_process_enabled () {
if (this.req_status_handling == 'X' || this.req_status_process == 'X')
return false
return true
}
},
methods : {
req_handling_ok () {
this.$store.commit('handling_patient/update_req_status', {req_status:'Y', reqs:this.reqs_handling})
this.$store.commit('handling_patient/update_selected_reqs', [])
},
req_handling_notok () {
this.$store.commit('handling_patient/update_dialog_requirement', true)
},
req_process_ok () {
this.$store.commit('handling_process_patient/update_req_status', {req_status:'Y', reqs:this.reqs_process})
this.$store.commit('handling_process_patient/update_selected_reqs', [])
},
req_process_notok () {
this.$store.commit('handling_process_patient/update_dialog_requirement', true)
},
verify () {
this.$store.dispatch('handling_patient/verify')
},
reject () {
this.$store.dispatch('handling_patient/reject')
}
}
}
</script>

View File

@@ -0,0 +1,220 @@
<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"
@keyup.native="keySearch"
></v-text-field>
<v-text-field class="flex xs8 ma-1"
label=""
placeholder="Nama"
single-line
outline
hide-details
v-model="search"
@keyup.native="keySearch"
></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-layout>
</v-flex>
</v-layout>
</v-card>
<v-card class="grow">
<v-subheader>
<h3 class="title">SPECIMEN SIAP 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)"
v-bind:class="is_selected(props.item)">
{{ props.item.sid }}
</td>
<td class="text-xs-left pa-2"
@click="select(props.item)"
v-bind:class="is_selected(props.item)">
{{ props.item.lab }}
</td>
<td class="pa-2"
@click="select(props.item)"
v-bind:class="is_selected(props.item)">
{{ props.item.name }}
</td>
<td class="text-xs-left pa-2"
@click="select(props.item)"
v-bind:class="is_selected(props.item)">
{{ props.item.sample_name }}
</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: "BARCODE ID",
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: "NAMA",
align: "left",
sortable: false,
value: "name",
width: "25%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "JENIS SAMPEL",
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('handling_patient/search')
},
verify () {
this.$store.dispatch('handling_patient/verify')
},
select(item) {
this.$store.commit('handling_patient/update_selected_patient', item)
// update requirements
this.$store.commit('handling_patient/update_req_status', {reqs:item.reqs_handling, req_status:item.req_status_handling})
this.$store.commit('handling_process_patient/update_req_status', {reqs:item.reqs_process, req_status:item.req_status_process})
this.$store.commit('handling_patient/update_selected_reqs', item.selected_reqs_handling)
this.$store.commit('handling_process_patient/update_selected_reqs', item.selected_reqs_process)
},
is_selected (item) {
let x = this.$store.state.handling_patient.selected_patient
if (!x)
return ''
if (x.order_sample_id == item.order_sample_id)
return 'amber lighten-5'
return ''
},
keySearch(e) {
if (e.which == 13) {
this.search_patient()
}
}
},
computed : {
patients () {
return this.$store.state.handling_patient.patients
},
nolab : {
get () {
return this.$store.state.handling_patient.nolab
},
set (v) {
this.$store.commit('handling_patient/update_nolab', v)
}
},
search : {
get () {
return this.$store.state.handling_patient.search
},
set (v) {
this.$store.commit('handling_patient/update_search', v)
}
},
id : {
get () {
return this.$store.state.handling_patient.id
},
set (v) {
this.$store.commit('handling_patient/update_id', v)
}
}
}
}
</script>

View File

@@ -0,0 +1,114 @@
<!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-layout>
<one-sampling-handling-tab></one-sampling-handling-tab>
</v-layout>
<v-layout v-show="tab_active == '01'">
<v-flex xs6 pr-1>
<one-sampling-handling-from-verification-list></one-sampling-handling-from-verification-list>
</v-flex>
<v-flex xs6 pl-1>
<one-sampling-handling-receive-list></one-sampling-handling-receive-list>
</v-flex>
</v-layout>
<v-layout v-show="tab_active == '02'">
<v-flex xs6 pr-1>
<one-sampling-handling-verify-list></one-sampling-handling-verify-list>
</v-flex>
<v-flex xs6 pl-1>
<one-sampling-handling-verify></one-sampling-handling-verify>
</v-flex>
</v-layout>
<v-layout v-show="tab_active == '03'">
<v-flex xs6 pr-1>
<one-sampling-handling-to-process></one-sampling-handling-to-process>
</v-flex>
<v-flex xs6 pl-1>
<one-sampling-handling-to-process-sent></one-sampling-handling-to-process-sent>
</v-flex>
</v-layout>
</v-layout>
</v-container>
<one-sampling-handling-requirement></one-sampling-handling-requirement>
<one-sampling-handling-requirement-process></one-sampling-handling-requirement-process>
</v-content>
<one-footer> </one-footer>
</v-app>
</div>
<!-- Vendor -->
<script src="../../../libs/vendor/axios.min.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>
<!-- App Script -->
<?php
$ts = "?ts=" . Date("ymdhis");
?>
<script type="module">
import { store } from './store.js<?php echo $ts ?>';
//for testing
window.store = store;
new Vue({
store,
el: '#app',
components: {
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
'one-sampling-handling-tab': httpVueLoader('./components/oneSamplingHandlingTab.vue'),
'one-sampling-handling-from-verification-list': httpVueLoader('./components/oneSamplingHandlingFromVerificationList.vue'),
'one-sampling-handling-receive-list': httpVueLoader('./components/oneSamplingHandlingReceiveList.vue'),
'one-sampling-handling-verify-list': httpVueLoader('./components/oneSamplingHandlingVerifyList.vue'),
'one-sampling-handling-verify': httpVueLoader('./components/oneSamplingHandlingVerify.vue'),
'one-sampling-handling-to-process-sent': httpVueLoader('./components/oneSamplingHandlingToProcessSent.vue'),
'one-sampling-handling-to-process': httpVueLoader('./components/oneSamplingHandlingToProcess.vue'),
'one-sampling-handling-requirement': httpVueLoader('./components/oneSamplingHandlingRequirement.vue'),
'one-sampling-handling-requirement-process': httpVueLoader('./components/oneSamplingHandlingRequirementProcess.vue')
},
computed : {
tab_active () {
return store.state.tab_active
}
},
mounted () {
// store.dispatch('receive_patient/search')
}
})
</script>
<style>
[v-cloak] {
display: none
}
</style>
</body>
</html>

View File

@@ -0,0 +1,260 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/handling_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: {
},
id : [],
verification_show : false,
// requirement
dialog_requirement: false,
requirements: [],
selected_requirements: [],
reqs: [],
req_status: 'X',
req_note: '',
selected_reqs: []
},
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.verification_show = false
state.selected_patient= val
setTimeout(function() { state.verification_show = true }, 100)
},
update_nolab(state, val) {
state.nolab = val
},
update_id(state, id) {
state.id = id
},
update_verification_data (state, data) {
let p = state.selected_patient
if (data.type == "clott") {
p.data.clott = data.clott
p.data.clott_note = data.clott_note
} else if (data.type == "lipemik") {
p.data.lipemik = data.lipemik
p.data.lipemik_note = data.lipemik_note
} else if (data.type == "lisis") {
p.data.lisis = data.lisis
p.data.lisis_note = data.lisis_note
}
state.selected_patient = p
},
update_verification_note (state, data) {
let p = state.selected_patient
p.data.note = data
state.selected_patient = p
},
update_verification_show(state, v) {
state.verification_show = v
},
update_requirements(state, v) {
state.requirements = v
},
update_selected_requirements(state, v) {
state.selected_requirements = v
},
update_dialog_requirement(state, v) {
state.dialog_requirement = v
},
update_req_status(state, d) {
state.req_status = d.req_status
state.reqs = d.reqs
},
update_selected_reqs(state, v) {
state.selected_reqs = v
},
update_req_note(state, v) {
state.req_note = v
}
},
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)
// SELECT FIRST ROW
try {
context.commit("update_selected_patient", data.records[0])
// update requirements
context.commit('update_req_status', {reqs:data.records[0].reqs_handling, req_status:data.records[0].req_status_handling})
context.commit('handling_process_patient/update_req_status', {reqs:data.records[0].reqs_process, req_status:data.records[0].req_status_process}, {root:true})
context.commit('update_selected_reqs', data.records[0].selected_reqs_handling)
context.commit('handling_process_patient/update_selected_reqs', data.records[0].selected_reqs_process, {root:true})
} catch (error) {}
}
} 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 = {
ordersample_id: context.state.selected_patient.order_sample_id,
req_status_handling: context.state.req_status,
reqs_handling: context.state.selected_reqs,
req_status_process: context.rootState.handling_process_patient.req_status,
reqs_process: context.rootState.handling_process_patient.selected_reqs
}
let resp= await api.verify(one_token(), context.state.selected_patient.T_OrderHeaderID,
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","")
// clear and reset reqs
context.commit('update_req_status', {req_status:'X', reqs:[]})
context.commit('handling_process_patient/update_req_status', {req_status:'X', reqs:[]}, {root:true})
context.dispatch('handling_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 = {
ordersample_id: context.state.selected_patient.order_sample_id,
req_status_handling: context.state.req_status,
reqs_handling: context.state.selected_reqs,
req_status_process: context.rootState.handling_process_patient.req_status,
reqs_process: context.rootState.handling_process_patient.selected_reqs
}
let resp= await api.reject(one_token(), context.state.selected_patient.T_OrderHeaderID,
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","")
// clear and reset reqs
context.commit('update_req_status', {req_status:'X', reqs:[]})
context.commit('handling_process_patient/update_req_status', {req_status:'X', reqs:[]}, {root:true})
context.dispatch('handling_patient/search', null, {root:true})
}
} catch(e) {
context.commit("update_search_status", 3)
context.commit("update_search_error_message_2", e.message )
}
},
async save_requirement(context, status) {
// context.commit("update_search_status", 1)
try {
let resp = await api.save_requirement(one_token(), context.state.selected_patient.T_OrderHeaderID,
context.state.selected_patient.order_sample_id,
status,
JSON.stringify(context.state.selected_reqs))
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('update_dialog_requirement', false)
context.commit('update_req_status',
{ req_status:status, reqs:context.state.reqs})
// Pindahan
context.dispatch('handling_patient/search', null, {root:true})
}
} catch(e) {
console.log(e)
// context.commit("update_search_status", 3)
// context.commit("update_search_error_message", e.message )
}
}
}
}

View File

@@ -0,0 +1,189 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/handling_patient.js"
window.api = api
export default {
namespaced: true,
state: {
nolab:'',
search: '',
search_status:0,
search_error_message:'',
search_dialog_is_active: false,
id : [],
verification_show : false,
// requirement
dialog_requirement: false,
requirements: [],
selected_requirements: [],
reqs: [],
req_status: 'X',
req_note: '',
selected_reqs: []
},
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_verification_note (state, data) {
let p = state.selected_patient
p.data.note = data
state.selected_patient = p
},
update_verification_show(state, v) {
state.verification_show = v
},
update_requirements(state, v) {
state.requirements = v
},
update_selected_requirements(state, v) {
state.selected_requirements = v
},
update_dialog_requirement(state, v) {
state.dialog_requirement = v
},
update_req_status(state, d) {
state.req_status = d.req_status
state.reqs = d.reqs
},
update_selected_reqs(state, v) {
state.selected_reqs = v
},
update_req_note(state, v) {
state.req_note = v
}
},
actions: {
async verify(context) {
context.commit("update_search_status", 1)
try {
let resp= await api.verify_process(one_token(), context.state.selected_patient.order_sample_id,
context.state.selected_patient.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","")
// Update REQ
if (context.state.selected_reqs.length > 0)
context.dispatch("save_requirement", "N")
else
context.dispatch("save_requirement", "Y")
// Pindah ke bawah
// context.dispatch('handling_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 resp= await api.reject_process(one_token(), context.state.selected_patient.order_sample_id,
context.state.selected_patient.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("save_requirement", "N")
// context.dispatch('handling_patient/search', null, {root:true})
}
} catch(e) {
context.commit("update_search_status", 3)
context.commit("update_search_error_message_2", e.message )
}
},
async get_requirement(context) {
// context.commit("update_search_status", 1)
try {
let resp= await api.get_requirement()
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("update_requirements", resp.data)
}
} catch(e) {
console.log(e)
// context.commit("update_search_status", 3)
// context.commit("update_search_error_message", e.message )
}
},
async save_requirement(context, status) {
// context.commit("update_search_status", 1)
try {
let resp = await api.save_requirement_process(one_token(), context.state.selected_patient.T_OrderHeaderID,
context.state.selected_patient.order_sample_id,
status,
JSON.stringify(context.state.selected_reqs))
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('update_dialog_requirement', false)
context.commit('update_req_status',
{ req_status:status, reqs:context.state.reqs})
// Pindahan
context.dispatch('handling_patient/search', null, {root:true})
}
} catch(e) {
console.log(e)
// context.commit("update_search_status", 3)
// context.commit("update_search_error_message", e.message )
}
}
}
}

View File

@@ -0,0 +1,162 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/process_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: {},
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(state, item) {
state.selected_sent = item
}
},
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 send(context) {
context.commit("update_search_status", 1)
try {
let resp= await api.send(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('process_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.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('process_patient/search', null, {root:true})
}
} catch(e) {
console.log(e.message)
context.commit("update_search_status", 3)
context.commit("update_search_error_message", e.message )
}
}
}
}

View 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 )
}
}
}
}

View File

@@ -0,0 +1,36 @@
// State
// data ...
// Mutations
//
//
// Actions
import receive_patient from "./modules/receive_patient.js";
import process_patient from "./modules/process_patient.js";
import handling_patient from "./modules/handling_patient.js";
import handling_process_patient from "./modules/handling_process_patient.js";
import system from "../../../apps/modules/system/system.js";
export const store = new Vuex.Store({
state : {
tab_active : '01',
tabs : [
{"label":"TERIMA DARI VERIFICATION", "icon":"opacity", "code":"01"},
{"label":"SPECIMEN HANDLING", "icon":"verified_user", "code":"02"},
{"label":"KIRIM KE SPECIMEN PROSES", "icon":"verified_user", "code":"03"}
]
},
mutations : {
change_tab(state, tab) {
state.tab_active = tab;
}
},
modules : {
receive_patient: receive_patient,
process_patient: process_patient,
handling_patient: handling_patient,
handling_process_patient: handling_process_patient,
system: system
}
});