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