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