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,208 @@
<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-layout>
</v-flex> -->
</v-layout>
</v-card>
<v-card class="grow">
<v-subheader>
<h3 class="title">SPECIMEN DARI SAMPLING</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('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,148 @@
<template>
<v-layout class="fill-height" column>
<v-card class="grow">
<v-subheader>
<h3 class="title">DAFTAR PENERIMAAN SPECIMEN</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.Sampling.To.Verification'" block flat>Pending</v-btn>
<v-btn v-show="props.item.status == 'SAMPLING.Verification.From.Sampling'" block color="primary" flat>Diterima</v-btn>
<v-btn v-show="props.item.status == 'SAMPLING.Verification.Verify'" block color="success" flat>Diverifikasi</v-btn>
<v-btn v-show="props.item.status == 'SAMPLING.Verification.Reject'" block color="red" dark flat>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.Sampling.To.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;
}
</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('ver_verification/update_selected_sent_sample', item)
// this.$store.dispatch('ver_verification/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 Verification
</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_reject"
:disabled="selected_requirements.length < 1"
:dark="selected_requirements.length > 0"
>
Tolak
</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('verification_patient/reject')
// this.$store.dispatch('verification_patient/save_requirement', "N")
},
save_process () {
this.$store.dispatch('verification_patient/verify')
}
},
computed : {
dialog: {
get() {
return this.$store.state.verification_patient.dialog_requirement;
},
set(val) {
this.$store.commit('verification_patient/update_dialog_requirement', val);
}
},
requirements () {
if (this.$store.state.verification_patient.selected_patient.reqs)
return this.$store.state.verification_patient.selected_patient.reqs
return []
},
selected_requirements : {
get () {
return this.$store.state.verification_patient.selected_requirements
},
set (v) {
this.$store.commit('verification_patient/update_selected_requirements', v)
}
},
note : {
get () {
let x = this.$store.state.verification_patient.selected_patient.data
if (typeof x == "undefined")
return ""
return x.note
},
set (v) {
this.$store.commit('verification_patient/update_verification_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('verification_patient/get_requirement')
},
watch : {
dialog(n, o) {
let x = this.$store.state.verification_patient.reqs
if (n && !o)
this.$store.commit('verification_patient/update_selected_requirements', 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,213 @@
<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-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="send" >
Kirim
</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 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;
}
</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('handling_patient/search')
},
send () {
this.$store.dispatch('handling_patient/send')
},
select(item) {
this.$store.commit('handling_patient/update_selected_patient', item)
},
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)
}
},
ids : {
get () {
return this.$store.state.handling_patient.ids
},
set (v) {
this.$store.commit('handling_patient/update_ids', v)
}
}
}
}
</script>

View File

@@ -0,0 +1,145 @@
<template>
<v-layout class="fill-height" column>
<v-card class="grow">
<v-subheader>
<h3 class="title">PENGIRIMAN KE 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 pa-2"
@click="select(props.item)">
{{ oneMoment(props.item.date) }}
</td>
<td class="text-xs-left pa-2"
@click="select(props.item)">
{{ props.item.lab }}
</td>
<td class="pa-2"
@click="select(props.item)">
{{ props.item.sid}}
</td>
<td class="text-xs-left pa-2"
@click="select(props.item)">
{{ props.item.name }}
</td>
<td class="text-xs-left pa-2"
@click="select(props.item)">
<v-btn v-show="props.item.status == 'SAMPLING.Verification.To.SampleHandling'" block flat>Pending</v-btn>
<v-btn v-show="props.item.status == 'SAMPLING.Handling.From.Verification'" block color="primary" flat>Diterima</v-btn>
</td>
<td class="text-xs-left pa-2 text-xs-center">
<v-btn flat icon color="red"
@click="remove(props.item)"
v-show="props.item.status == 'SAMPLING.Verification.To.Handling'">
<v-icon>delete</v-icon>
</v-btn>
</td>
</template>
</v-data-table>
</v-card>
</v-layout>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot{
min-height:60px;
}
.searchbox .v-btn {
min-height:60px;
}
</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('handling_patient/update_selected_sent', item)
this.$store.dispatch('handling_patient/remove')
}
},
computed : {
patients () {
return this.$store.state.handling_patient.sent_patients
}
}
}
</script>

View File

@@ -0,0 +1,262 @@
<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-divider class="mb-3 mt-3"></v-divider>
<v-flex xs12>
<!-- <v-layout row wrap>
<v-flex xs12>
<v-btn color="red" dark @click="reject" v-show="verification_show">
<v-icon>clear</v-icon>
</v-btn>
<v-btn color="blue" dark @click="verify" v-show="verification_show">
<v-icon>done</v-icon>
</v-btn>
</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 mt-2 mb-0">Specimen sudah sesuai ?</p>
</v-flex>
<v-flex xs6 class="text-xs-right">
<v-btn color="red" dark class="one-btn-icon mr-1 ma-0" @click="reject">
<v-icon>clear</v-icon>
</v-btn>
<v-btn color="green" class="one-btn-icon ma-0" @click="verify"
dark>
<v-icon>done</v-icon>
</v-btn>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
<v-card>
<v-card-text>
<v-btn color="black" outline flat depressed small dark
v-for="(req, i) in reqs" v-bind:key="i"
class="mt-2 mr-2 ma-0">
{{ req.req_name }}
</v-btn>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
<v-layout row v-if="false">
<v-flex xs6>
<v-layout column>
<v-flex xs12>
<one-field-verification
label="Jenis sampel sesuai"
:value="data.sample_checked"
:note="data.sample_note"
@change="update_data_sample"
v-if="verification_show"
></one-field-verification>
</v-flex>
<v-flex xs12 mt-2>
<one-field-verification
label="Kuantitas OK"
:value="data.quantity_checked"
:note="data.quantity_note"
@change="update_data_quantity"
v-if="verification_show"
></one-field-verification>
</v-flex>
<v-flex xs12 mt-2>
<one-field-verification
label="Kualitas OK"
:value="data.quality_checked"
:note="data.quality_note"
@change="update_data_quality"
v-if="verification_show"
></one-field-verification>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs6 pl-2>
<v-layout column fill-height>
<v-flex xs12>
<v-textarea
auto-grow
label="Catatan"
rows="5"
v-model="note"
outline
v-show="verification_show"
></v-textarea>
</v-flex>
<v-flex xs12>
<v-btn color="red" dark @click="reject" v-show="verification_show">TOLAK</v-btn>
<v-btn color="blue" dark @click="verify" v-show="verification_show">PROSES</v-btn>
</v-flex>
</v-layout>
<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.verification_patient.selected_patient.data
if (typeof x == "undefined")
return {quality_checked:false,quantity_checked:false,sample_checked:false,
quality_note:"",quantity_note:"",sample_note:""}
x.quality_checked = x.quality == "Y" ? true : false
x.quantity_checked = x.quantity == "Y" ? true : false
x.sample_checked = x.sample == "Y" ? true : false
return x
},
patient () {
return this.$store.state.verification_patient.selected_patient
},
user_sampling () {
let x = this.$store.state.verification_patient.selected_patient
if (typeof x == "undefined")
return '-'
return 'Sampling : ' + x.user_sampling + ' / Receive : ' + x.user_receive
},
duration_sampling () {
let x = this.$store.state.verification_patient.selected_patient
if (typeof x == "undefined")
return '0'
return Math.round(moment.duration(x.sampling_duration).asMinutes()) + ' menit'
},
note : {
get () {
let x = this.$store.state.verification_patient.selected_patient.data
if (typeof x == "undefined")
return ""
return x.note
},
set (v) {
this.$store.commit('verification_patient/update_verification_note', v)
}
},
verification_show : {
get () {
return this.$store.state.verification_patient.verification_show
},
set (v) {
this.$store.commit('verification_patient/update_verification_show', v)
}
},
reqs () {
if (this.$store.state.verification_patient.selected_patient.reqs)
return this.$store.state.verification_patient.selected_patient.reqs
return []
}
},
methods : {
update_data_quality (v) {
let data = { type:"quality", quality:v.checked?"Y":"N", quality_note:v.note }
this.$store.commit('verification_patient/update_verification_data', data)
},
update_data_quantity (v) {
let data = { type:"quantity", quantity:v.checked?"Y":"N", quantity_note:v.note }
this.$store.commit('verification_patient/update_verification_data', data)
},
update_data_sample (v) {
let data = { type:"sample", sample:v.checked?"Y":"N", sample_note:v.note }
this.$store.commit('verification_patient/update_verification_data', data)
},
verify () {
this.$store.commit('verification_patient/update_selected_requirements', [])
this.$store.dispatch('verification_patient/verify')
},
reject () {
this.$store.commit('verification_patient/update_dialog_requirement', true)
// this.$store.dispatch('verification_patient/reject')
},
sampleReqOK () {
this.$store.dispatch('verification_patient/save_requirement', "Y")
},
sampleReqNotOK () {
this.$store.commit('verification_patient/update_dialog_requirement', true)
}
},
mounted () {
this.$store.dispatch('verification_patient/get_requirement')
}
}
</script>

View File

@@ -0,0 +1,214 @@
<template>
<v-layout class="fill-height" column>
<v-card class="mb-2 pa-2 searchbox">
<v-layout row>
<v-flex xs12>
<v-layout>
<v-text-field class="flex xs4 ma-1"
placeholder="No Lab"
single-line
outline
hide-details
v-model="nolab"
@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 VERIFIKASI</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>
table.v-table tbody td,xtable.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
.fz-2 {
font-size: 1.5em
}
.v-btn--large {
height: 52px;
}
</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('verification_patient/search')
},
verify () {
this.$store.dispatch('verification_patient/verify')
},
select(item) {
this.$store.commit('verification_patient/update_selected_patient', item)
this.$store.commit('verification_patient/update_req_status', item)
},
is_selected (item) {
let x = this.$store.state.verification_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.verification_patient.patients
},
nolab : {
get () {
return this.$store.state.verification_patient.nolab
},
set (v) {
this.$store.commit('verification_patient/update_nolab', v)
}
},
search : {
get () {
return this.$store.state.verification_patient.search
},
set (v) {
this.$store.commit('verification_patient/update_search', v)
}
},
id : {
get () {
return this.$store.state.verification_patient.id
},
set (v) {
this.$store.commit('verification_patient/update_id', v)
}
}
}
}
</script>