Initial import
This commit is contained in:
20
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/conf.js
Normal file
20
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/conf.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const URL = window.BASE_URL + "/one-api/mockup/clinic/fo/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'conf/search',{search:search});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
20
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/diagnose.js
Normal file
20
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/diagnose.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const URL = window.BASE_URL + "/one-api/mockup/clinic/fo/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'diagnose/search',{search:search});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
20
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/gcs.js
Normal file
20
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/gcs.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const URL = window.BASE_URL + "/one-api/mockup/clinic/fo/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'gcs/search',{search:search});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
69
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/order.js
Normal file
69
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/order.js
Normal file
@@ -0,0 +1,69 @@
|
||||
const URL = window.BASE_URL + "/one-api/mockup/clinic/poly/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/search',{search:search});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save(order_id, header, med, lab, token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/save', {
|
||||
order_id: order_id,
|
||||
header: header,
|
||||
med: med,
|
||||
lab: lab,
|
||||
token: token
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function process(order_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/process', {
|
||||
order_id: order_id
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function get_one(order_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/get_one', {
|
||||
id: order_id
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
28
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/patient.js
Normal file
28
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/patient.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
window.BASE_URL + "/one-api/mockup/clinic/poly/";
|
||||
|
||||
export async function search(nolab, search, status) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/search', {
|
||||
search: search,
|
||||
nolab: nolab,
|
||||
status: status
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
74
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/px.js
Normal file
74
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/px.js
Normal file
@@ -0,0 +1,74 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
window.BASE_URL + "/one-api/mockup/clinic/fo/";
|
||||
|
||||
export async function search(mouCompanyID,search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/search_v2', {
|
||||
search:search,
|
||||
mouCompanyID:mouCompanyID
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function panel(mouCompanyID,search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/panel', {
|
||||
search:search,
|
||||
mouCompanyID:mouCompanyID
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function get_price(test_id, mou_id, cito) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/get_price', {
|
||||
test_id:test_id,
|
||||
mou_id:mou_id,
|
||||
cito:cito
|
||||
});
|
||||
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
20
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/status.js
Normal file
20
one-ui/test_x_old/vuex/one-fo-clinic-poly/api/status.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const URL = window.BASE_URL + "/one-api/mockup/clinic/poly/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'status/search',{search:search});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="1000px"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Laporan
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
|
||||
<v-layout>
|
||||
<v-flex xs12>
|
||||
<object :data="rpt_url"
|
||||
width="100%" height="512px"></object>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="dialog = false"
|
||||
flat
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
},
|
||||
methods : {
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.order.print_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_print_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
rpt_url () {
|
||||
return this.$store.state.order.rpt_url
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="500px"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Konfirmasi
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pt-3 pb-3 class="text-md-center">
|
||||
<h6 class="display-1 text-center">PROSES PASIEN INI ?</h6>
|
||||
</v-flex>
|
||||
<!-- <v-flex xs6 pt-3 pb-3 class="text-md-center">
|
||||
<h6 class="display-1 text-center">ANTRIAN LAB : <span class="red--text">{{ queue_number }}</span></h6>
|
||||
</v-flex> -->
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="dialog = false"
|
||||
flat
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="processMee()"
|
||||
>
|
||||
PROSES
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
},
|
||||
methods : {
|
||||
tuing: function() {
|
||||
alert('x')
|
||||
},
|
||||
|
||||
processMee () {
|
||||
this.$store.dispatch('order/process')
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.order.confirm_process_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_confirm_process_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
queue_number () {
|
||||
return this.$store.state.order.queue_number
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,343 @@
|
||||
<template>
|
||||
<v-layout column>
|
||||
<v-flex xs12 mb-2>
|
||||
<v-card>
|
||||
<v-card-text>
|
||||
<one-fo-clinic-poly-info-detail></one-fo-clinic-poly-info-detail>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-card>
|
||||
<v-card-text>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6 pr-3>
|
||||
<v-autocomplete
|
||||
label="Diagnosa"
|
||||
v-model="selected_diagnose"
|
||||
:items="diagnose"
|
||||
:search-input.sync="search"
|
||||
auto-select-first
|
||||
no-filter
|
||||
return-object
|
||||
item-text="M_DiagnoseName"
|
||||
:loading="is_loading"
|
||||
no-data-text="Pilih Diagnosa"
|
||||
:clearable="true"
|
||||
:disabled="!processEnabled"
|
||||
>
|
||||
<template
|
||||
slot="item"
|
||||
slot-scope="{ item }"
|
||||
>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_DiagnoseName"></v-list-tile-title>
|
||||
<!-- <v-list-tile-sub-title v-text="a"></v-list-tile-sub-title> -->
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pl-3>
|
||||
<v-select
|
||||
:disabled="!processEnabled"
|
||||
v-model="selected_gcs"
|
||||
:items="gcs"
|
||||
item-text="M_GcsName"
|
||||
label="Tingkat Kesadaran"
|
||||
return-object
|
||||
></v-select>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs2 pr-3>
|
||||
<v-text-field
|
||||
:disabled="!processEnabled"
|
||||
label="Sistole"
|
||||
v-model="order.sistole"
|
||||
clearable
|
||||
@input="(v) => update_order_d('sistole',v)"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs2 pl-3 pr-3>
|
||||
<v-text-field
|
||||
:disabled="!processEnabled"
|
||||
label="Diastole"
|
||||
v-model="order.diastole"
|
||||
clearable
|
||||
@input="(v) => update_order_d('diastole',v)"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4 pl-3 pr-3>
|
||||
<v-text-field
|
||||
:disabled="!processEnabled"
|
||||
label="Suhu Badan"
|
||||
v-model="order.temperature"
|
||||
clearable
|
||||
@input="(v) => update_order_d('temperature',v)"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4 pl-3>
|
||||
<v-text-field
|
||||
:disabled="!processEnabled"
|
||||
label="Berat Badan"
|
||||
v-model="order.weight"
|
||||
clearable
|
||||
@input="(v) => update_order_d('weight',v)"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4 pr-3>
|
||||
<v-text-field
|
||||
:disabled="!processEnabled"
|
||||
label="Laju Pernafasan"
|
||||
v-model="order.respiratory"
|
||||
clearable
|
||||
@input="(v) => update_order_d('respiratory',v)"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4 pr-3 pl-3>
|
||||
<v-text-field
|
||||
:disabled="!processEnabled"
|
||||
label="Denyut Nadi"
|
||||
v-model="order.pulse"
|
||||
clearable
|
||||
@input="(v) => update_order_d('pulse',v)"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4 pl-3>
|
||||
<v-text-field
|
||||
:disabled="!processEnabled"
|
||||
label="Tinggi Badan"
|
||||
v-model="order.height"
|
||||
clearable
|
||||
@input="(v) => update_order_d('height',v)"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pr-3>
|
||||
<v-textarea
|
||||
:disabled="!processEnabled"
|
||||
label="Keluhan"
|
||||
v-model="order.complaint"
|
||||
clearable
|
||||
@input="(v) => update_order_d('complaint',v)"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pl-3>
|
||||
<v-textarea
|
||||
:disabled="!processEnabled"
|
||||
label="Saran"
|
||||
v-model="order.suggestion"
|
||||
clearable
|
||||
@input="(v) => update_order_d('suggestion',v)"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4 pa-1>
|
||||
<one-fo-clinic-poly-receipt></one-fo-clinic-poly-receipt>
|
||||
<v-btn
|
||||
block
|
||||
color="orange"
|
||||
:dark="processed"
|
||||
:disabled="!processed"
|
||||
@click="dialog_med_open()"
|
||||
>RESEP</v-btn>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4 pa-1>
|
||||
<one-fo-clinic-poly-lab></one-fo-clinic-poly-lab>
|
||||
<v-btn
|
||||
block
|
||||
color="green"
|
||||
:dark="processed"
|
||||
:disabled="!processed"
|
||||
@click="dialog_lab_open()"
|
||||
>LABORATORIUM</v-btn>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4 pa-1>
|
||||
<v-btn
|
||||
block
|
||||
color="blue"
|
||||
:dark="btn_save_enabled"
|
||||
@click="save()"
|
||||
:disabled="!btn_save_enabled"
|
||||
>SIMPAN</v-btn>
|
||||
<one-fo-clinic-poly-finish-dialog></one-fo-clinic-poly-finish-dialog>
|
||||
<one-print-dialog></one-print-dialog>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-fo-clinic-poly-info-detail' : httpVueLoader('./oneFoClinicPolyInfoDetail.vue'),
|
||||
'one-fo-clinic-poly-receipt' : httpVueLoader('./oneFoClinicPolyReceipt.vue'),
|
||||
'one-fo-clinic-poly-lab' : httpVueLoader('./oneFoClinicPolyLab.vue'),
|
||||
'one-fo-clinic-poly-finish-dialog' : httpVueLoader('./oneFoClinicPolyFinishDialog.vue'),
|
||||
'one-print-dialog' : httpVueLoader('./oneDialogPrint.vue')
|
||||
},
|
||||
|
||||
computed : {
|
||||
search:{
|
||||
get() {
|
||||
return this.$store.state.diagnose.search
|
||||
},
|
||||
set(val) {
|
||||
if (val == null) return
|
||||
this.$store.commit('diagnose/update_search',val)
|
||||
}
|
||||
},
|
||||
|
||||
diagnose : {
|
||||
get () {
|
||||
return this.$store.state.diagnose.diagnose
|
||||
}
|
||||
},
|
||||
|
||||
selected_diagnose : {
|
||||
get () {
|
||||
return this.$store.state.diagnose.selected_diagnose
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('diagnose/update_selected_diagnose', v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
gcs : {
|
||||
get () {
|
||||
return this.$store.state.gcs.gcs
|
||||
},
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
selected_gcs : {
|
||||
get () {
|
||||
return this.$store.state.gcs.selected_gcs
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('gcs/update_selected_gcs', v)
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
is_loading() {
|
||||
return this.$store.state.diagnose.search_status == 1
|
||||
},
|
||||
|
||||
order : {
|
||||
get () {
|
||||
return this.$store.state.order.order
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('order/update_order', v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
btn_save_enabled () {
|
||||
|
||||
if (!this.$store.state.patient.selected_patient.M_PatientID ||
|
||||
!this.$store.state.diagnose.selected_diagnose.M_DiagnoseID ||
|
||||
!this.$store.state.gcs.selected_gcs.M_GcsID ||
|
||||
!this.$store.state.order.order.complaint ||
|
||||
!this.$store.state.order.order.suggestion)
|
||||
return false
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
processEnabled () {
|
||||
if (!this.$store.state.patient.selected_patient.M_PatientID)
|
||||
return false
|
||||
|
||||
if (this.$store.state.patient.selected_patient.M_StatusCode != "CLINIC.PROCESS")
|
||||
return false
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
processed () {
|
||||
return this.$store.state.order.processed;
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
thr_search: _.debounce( function () {
|
||||
this.$store.dispatch("diagnose/search")
|
||||
}, 800),
|
||||
|
||||
save () {
|
||||
this.$store.dispatch('order/save');
|
||||
},
|
||||
|
||||
update_order_d (type, val) {
|
||||
this.$store.commit('order/update_order_d', {type:type,val:val})
|
||||
},
|
||||
|
||||
dialog_lab_open () {
|
||||
this.$store.commit('order/update_lab_dialog_is_active', true)
|
||||
},
|
||||
|
||||
dialog_med_open () {
|
||||
this.$store.commit('order/update_med_dialog_is_active', true)
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
search(val,old) {
|
||||
// console.log("val:"+val)
|
||||
// console.log("old:"+old)
|
||||
if (val == null || typeof val == 'undefined') val = ""
|
||||
console.log("1-val:"+val)
|
||||
if (val == old ) return
|
||||
console.log("2-val:"+val)
|
||||
// if (! val) return
|
||||
console.log("3-val:"+val)
|
||||
// if (val.length < 1 ) return
|
||||
console.log("4-val:"+val)
|
||||
if (this.$store.state.diagnose.search_status == 1 ) return
|
||||
console.log("5-val:"+val)
|
||||
this.$store.commit("diagnose/update_search",val)
|
||||
this.thr_search()
|
||||
|
||||
// if (this.$store.state.doctor.search_status == 1 ) return
|
||||
// this.$store.commit("doctor/update_search",val)
|
||||
// this.thr_search()
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$store.dispatch('gcs/search')
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="500px"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Selesai
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<v-layout column>
|
||||
<v-flex xs12 pt-3 pb-3 class="text-md-center">
|
||||
<h6 class="display-1 text-center">PROSES SELESAI</h6>
|
||||
</v-flex>
|
||||
<v-flex xs12 pt-3 pb-3 class="text-md-center">
|
||||
|
||||
|
||||
<v-btn
|
||||
color="orange"
|
||||
dark
|
||||
@click="print_receipt"
|
||||
>
|
||||
Cetak Resep
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
color="green"
|
||||
dark
|
||||
@click="print_resume"
|
||||
>
|
||||
Cetak Resume
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs12 pt-3 pb-3 class="text-md-center" v-show="queue_number != '' && queue_number != '-'">
|
||||
<h6 class="headline text-center">ANTRIAN LAB :</h6>
|
||||
</v-flex>
|
||||
<v-flex xs12 class="text-md-center" v-show="queue_number != '' && queue_number != '-'">
|
||||
<h6 class="display-3 text-center"><span class="red white--text pl-3 pr-3">{{ queue_number }}</span></h6>
|
||||
</v-flex>
|
||||
<v-flex xs12 b-3 class="text-md-center" v-show="queue_number != '' && queue_number != '-'">
|
||||
<v-btn
|
||||
color="blue"
|
||||
dark
|
||||
@click="print_queue"
|
||||
>
|
||||
Cetak Antrian Lab
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog=false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
},
|
||||
methods : {
|
||||
print_receipt () {
|
||||
let id = this.$store.state.order.last_order_id
|
||||
this.$store.dispatch('order/print_receipt', id)
|
||||
},
|
||||
|
||||
print_resume () {
|
||||
let id = this.$store.state.order.last_order_id
|
||||
this.$store.dispatch('order/print_resume', id)
|
||||
},
|
||||
|
||||
print_queue () {
|
||||
let id = this.$store.state.order.last_order_id
|
||||
this.$store.dispatch('order/print_queue', id)
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.order.finish_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_finish_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
queue_number () {
|
||||
return this.$store.state.order.queue_number
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,183 @@
|
||||
<template>
|
||||
|
||||
<v-card flat>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
|
||||
<v-flex xs2>
|
||||
<v-img
|
||||
src="https://www.sgm-inc.com/wp-content/uploads/2014/06/no-profile-male-img.gif"
|
||||
aspect-ratio="1"
|
||||
class="grey lighten-2 elevation-2"
|
||||
>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs10 pl-2>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6>
|
||||
<v-layout column>
|
||||
<v-flex>
|
||||
<h5 class="headline">{{ labno }}</h5>
|
||||
</v-flex>
|
||||
<v-flex pt-3>
|
||||
<v-text-field
|
||||
v-model="mr"
|
||||
label="No RM"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<v-text-field
|
||||
v-model="name"
|
||||
label="Nama"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pl-2>
|
||||
<v-layout column>
|
||||
<v-flex>
|
||||
<v-layout row>
|
||||
<v-flex xs6>
|
||||
<v-text-field
|
||||
v-model="dob"
|
||||
label="Tanggal lahir"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 pl-1>
|
||||
<v-text-field
|
||||
v-model="age"
|
||||
label="Umur"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex>
|
||||
<v-text-field
|
||||
v-model="phone"
|
||||
label="HP"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<!-- <v-flex xs12 pt-1>
|
||||
<v-layout row>
|
||||
<v-flex xs2>
|
||||
<one-field-verification
|
||||
label="Foto sesuai dengan pasien"
|
||||
>
|
||||
</one-field-verification>
|
||||
</v-flex>
|
||||
<v-flex xs5 pl-1>
|
||||
<v-textarea
|
||||
auto-grow
|
||||
label="Catatan FO"
|
||||
rows="1"
|
||||
:value="note_fo"
|
||||
readonly
|
||||
outline
|
||||
class="mb-0"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs5 pl-1>
|
||||
<v-textarea
|
||||
auto-grow
|
||||
label="Catatan Sampling"
|
||||
rows="1"
|
||||
:value="note_sampling"
|
||||
outline
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex> -->
|
||||
</v-layout>
|
||||
</v-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.v-text-field--outline>.v-input__control>.v-input__slot {
|
||||
min-height: 62px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
|
||||
components : {
|
||||
'one-field-verification' : httpVueLoader('./../../common/oneFieldVerification.vue')
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
sex : 'Laki - laki',
|
||||
|
||||
note_fo : 'Tidak ada catatan',
|
||||
note_sampling : '-'
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
labno () {
|
||||
return this.$store.state.patient.selected_patient.C_OrderHeaderNumber
|
||||
},
|
||||
|
||||
mr () {
|
||||
return this.$store.state.patient.selected_patient.mr;
|
||||
},
|
||||
name () {
|
||||
return this.$store.state.patient.selected_patient.name;
|
||||
},
|
||||
dob () {
|
||||
try {
|
||||
return this.$store.state.patient.selected_patient.dob.split('-').reverse().join('-');
|
||||
} catch(e) {
|
||||
console.log(e.message)
|
||||
return '-';
|
||||
}
|
||||
|
||||
},
|
||||
phone () {
|
||||
return this.$store.state.patient.selected_patient.phone;
|
||||
},
|
||||
|
||||
age () {
|
||||
return this.$store.state.patient.selected_patient.C_OrderHeaderM_PatientAge;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog_lab"
|
||||
max-width="1200"
|
||||
full-width
|
||||
>
|
||||
<!-- <v-btn
|
||||
color="green"
|
||||
|
||||
:dark="processed"
|
||||
block
|
||||
@click="search"
|
||||
:disabled="!processed"
|
||||
>
|
||||
LABORATORIUMX
|
||||
</v-btn> -->
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<v-layout>
|
||||
<v-flex xs6 pr-2>
|
||||
<one-fo-clinic-poly-px></one-fo-clinic-poly-px>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6>
|
||||
<one-fo-clinic-poly-px-list></one-fo-clinic-poly-px-list>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog_lab = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style>
|
||||
/* input { display:none } */
|
||||
.no-label.v-text-field--outline>.v-input__control>.v-input__slot {
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.no-label input {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {
|
||||
dialog : false
|
||||
}
|
||||
},
|
||||
|
||||
components : {
|
||||
'one-fo-clinic-poly-px' : httpVueLoader('./oneFoClinicPolyPx.vue'),
|
||||
'one-fo-clinic-poly-px-list' : httpVueLoader('./oneFoClinicPolyPxList.vue')
|
||||
},
|
||||
methods : {
|
||||
|
||||
},
|
||||
computed : {
|
||||
|
||||
dialog_lab : {
|
||||
get () { return this.$store.state.order.lab_dialog_is_active },
|
||||
set (v) { this.$store.commit('order/update_lab_dialog_is_active', v) }
|
||||
},
|
||||
|
||||
isLoading () {
|
||||
return false
|
||||
},
|
||||
|
||||
processed () {
|
||||
return this.$store.state.order.processed;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
watch : {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<v-layout column fill-height>
|
||||
<!-- <v-flex xs12> -->
|
||||
<v-card class="pa-1 mb-2">
|
||||
<v-card-text class="pa-0">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<patient-search-box></patient-search-box>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
<!-- <v-card-actions class="text-xs-right">
|
||||
|
||||
<v-btn color="orange" class="white--text">Lanjut</v-btn>
|
||||
</v-card-actions> -->
|
||||
|
||||
</v-card>
|
||||
<!-- </v-flex> -->
|
||||
|
||||
<!-- <v-flex xs12 grow> -->
|
||||
<v-card class="pa-1 p-left-side grow" grow>
|
||||
<v-card-text class="pa-0">
|
||||
<v-layout column>
|
||||
|
||||
<v-flex xs12>
|
||||
<!-- <patient-detail></patient-detail> -->
|
||||
<patient-search-result></patient-search-result>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<!-- <patient-notes></patient-notes> -->
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
<!-- <v-card-actions class="text-xs-right">
|
||||
|
||||
<v-btn color="orange" class="white--text">Lanjut</v-btn>
|
||||
</v-card-actions> -->
|
||||
|
||||
</v-card>
|
||||
<!-- </v-flex> -->
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* .p-left-side {
|
||||
min-height: 500px;
|
||||
} */
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-search-box' : httpVueLoader('./oneFoClinicPolyPatientSearchBox.vue'),
|
||||
'patient-search-result' : httpVueLoader('./oneFoClinicPolyPatientSearchResult.vue')
|
||||
// 'patient-detail': httpVueLoader('./patientDetail.vue'),
|
||||
// 'patient-search-result' : httpVueLoader('./patientSearchResult.vue')
|
||||
// 'patient-notes' : httpVueLoader('./patientNotes.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<v-card class="pa-2" flat>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs3 pa-1>
|
||||
<v-text-field
|
||||
label="Search"
|
||||
placeholder="No Lab"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
v-model="no_lab"
|
||||
@keyup.native="keyup"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 pa-1>
|
||||
<v-text-field
|
||||
label=""
|
||||
placeholder="Nama"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
v-model="search_x"
|
||||
@keyup.native="keyup"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4 pa-1>
|
||||
<v-select
|
||||
outline
|
||||
label="Status"
|
||||
:items="statuses"
|
||||
item-text="M_StatusName"
|
||||
item-value="M_StatusID"
|
||||
v-model="selected_status"
|
||||
return-object
|
||||
></v-select>
|
||||
</v-flex>
|
||||
|
||||
<!-- <v-flex xs1>
|
||||
<v-btn color="success" class="mr-1 ml-1" large block fill-height @click="search" :disabled="processed">CARI</v-btn>
|
||||
|
||||
|
||||
</v-flex> -->
|
||||
|
||||
<v-flex xs1 pl-1>
|
||||
<v-btn color="success" class="mr-1 ml-1 one-btn-icon" large block fill-height @click="search" :disabled="processed">
|
||||
<span class="icon-search"></span>
|
||||
</v-btn>
|
||||
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card>
|
||||
</template>
|
||||
<style scoped>
|
||||
.v-btn {
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
.v-btn--large {
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
/* .v-input__slot {
|
||||
margin-bottom: 0px !important;
|
||||
} */
|
||||
|
||||
/* .v-messages {
|
||||
display: none;
|
||||
} */
|
||||
|
||||
/* .v-text-field--box>.v-input__control>.v-input__slot,.v-text-field--full-width>.v-input__control>.v-input__slot,.v-text-field--outline>.v-input__control>.v-input__slot {
|
||||
min-height: 44px;
|
||||
} */
|
||||
|
||||
/* .v-text-field--box.v-text-field--single-line input,.v-text-field--full-width.v-text-field--single-line input,.v-text-field--outline.v-text-field--single-line input {
|
||||
margin-top: 6px;
|
||||
} */
|
||||
|
||||
.v-select.v-text-field--enclosed:not(.v-text-field--single-line) .v-select__selections {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.one-btn-icon { font-size: 1.5em; float: right }
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
// 'patient-search-dialog': httpVueLoader('./patientSearchDialog.vue'),
|
||||
// 'patient-new-dialog': httpVueLoader('./patientNewDialog.vue')
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
search : function() {
|
||||
this.$store.dispatch('patient/search')
|
||||
},
|
||||
|
||||
keyup(e) {
|
||||
if (e.which==13) {
|
||||
// this.$store.commit('patient/update_search_dialog_is_active',true)
|
||||
this.$store.dispatch('patient/search')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
search_x: {
|
||||
get() {
|
||||
return this.$store.state.patient.search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_search',val)
|
||||
}
|
||||
},
|
||||
|
||||
statuses () {
|
||||
return this.$store.state.status.status
|
||||
},
|
||||
|
||||
selected_status : {
|
||||
get () {
|
||||
return this.$store.state.status.selected_status
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('status/update_selected_status', v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
processed : {
|
||||
get () {
|
||||
return this.$store.state.order.processed
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('order/update_processed', v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
no_lab: {
|
||||
get() {
|
||||
return this.$store.state.patient.search_no_lab
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_search_no_lab',val)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$store.dispatch('status/search')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<v-card class="xs12 md12 mt-2">
|
||||
|
||||
<v-data-table :headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
|
||||
<template slot="no-data">
|
||||
<v-alert :value="isError" color="error" icon="warning">
|
||||
Data Pasien tidak di temukan
|
||||
{{errorMessage}}
|
||||
</v-alert>
|
||||
</template>
|
||||
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.day }}, <br>{{ format_date(props.item.C_OrderHeaderDate) }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.C_OrderHeaderNumber }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.M_PatientNoReg }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.M_PatientName }}</td>
|
||||
<td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">
|
||||
<v-btn v-show="isStatusReg(props.item.M_StatusCode)"
|
||||
color="blue"
|
||||
:dark="!processed"
|
||||
@click="processMe(props.item)"
|
||||
:disabled="processed"
|
||||
>
|
||||
PROSES
|
||||
</v-btn>
|
||||
<v-btn v-show="isStatusProcess(props.item.M_StatusCode)"
|
||||
color="green"
|
||||
dark
|
||||
@click="justProcessMe(props.item)"
|
||||
flat
|
||||
>
|
||||
DIPROSES
|
||||
</v-btn>
|
||||
|
||||
<template v-show="isStatusFinish(props.item.M_StatusCode)">
|
||||
|
||||
<v-menu offset-y
|
||||
v-model="patients[props.index].vmenu"
|
||||
:position-x="x"
|
||||
:position-y="y"
|
||||
absolute>
|
||||
|
||||
<v-list>
|
||||
<v-list-tile
|
||||
v-for="(item, index) in menu_items"
|
||||
:key="index"
|
||||
class="ml0 mr0"
|
||||
v-show="show_btn_print(item.code, props.item.C_OrderHeaderIsLab)"
|
||||
>
|
||||
<!-- <v-list-tile-title>
|
||||
{{ item.title }}
|
||||
</v-list-tile-title> -->
|
||||
<v-btn
|
||||
color="orange"
|
||||
flat
|
||||
class="ma-0 text-md-left"
|
||||
block
|
||||
small
|
||||
@click="print_me(item.code, props.item.C_OrderHeaderID)"
|
||||
outline
|
||||
>
|
||||
{{ item.title }}
|
||||
</v-btn>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<v-btn v-show="isStatusFinish(props.item.M_StatusCode)"
|
||||
color="orange"
|
||||
dark
|
||||
@click="trigger_vmenu(props.index, $event)"
|
||||
|
||||
>
|
||||
CETAK
|
||||
</v-btn>
|
||||
</td>
|
||||
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
<one-fo-clinic-poly-confirm-process-dialog></one-fo-clinic-poly-confirm-process-dialog>
|
||||
</v-card>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
div.v-list__tile.theme--light {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.v-btn { margin: 0px }
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-fo-clinic-poly-confirm-process-dialog' : httpVueLoader('./oneFoClinicPolyConfirmProcessDialog.vue')
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
x: 0,
|
||||
y: 0,
|
||||
on: false,
|
||||
query: "",
|
||||
headers: [
|
||||
{
|
||||
text: "TANGGAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "date",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO REGISTRASI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO RM",
|
||||
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: "40%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "ACTION",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
|
||||
menu_items: [
|
||||
{ code: '01', title: 'Cetak Resep Obat' },
|
||||
{ code: '02', title: 'Cetak Antrian Lab' },
|
||||
{ code: '03', title: 'Click Resume Pasien' }
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
computed : {
|
||||
isError() {
|
||||
// return true;
|
||||
return this.$store.state.patient.search_status == 3
|
||||
},
|
||||
errorMessage() {
|
||||
return this.$store.state.patient.search_error_message
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.patient.search_status == 1
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.patient.patients
|
||||
},
|
||||
total() {
|
||||
return this.$store.state.patient.total_patient
|
||||
},
|
||||
processed : {
|
||||
get () {
|
||||
return this.$store.state.order.processed
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('order/update_processed', v)
|
||||
return
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
selectMe (a) {
|
||||
a.mr = a.M_PatientNoReg;
|
||||
a.name = a.M_PatientName;
|
||||
a.phone = a.M_PatientHP;
|
||||
a.dob = a.M_PatientDOB;
|
||||
|
||||
this.$store.commit('patient/update_selected_patient', a)
|
||||
this.$store.commit('order/update_order_d', {type:'complaint',val:a.C_OrderHeaderComplaint})
|
||||
// this.$store.state.patient.selected_patient = a
|
||||
// this.$store.state.patient.selected_patient.mr = a.M_PatientNoReg;
|
||||
// this.$store.state.patient.selected_patient.name = a.M_PatientName;
|
||||
// this.$store.state.patient.selected_patient.phone = a.M_PatientHP;
|
||||
// this.$store.state.patient.selected_patient.dob = a.M_PatientDOB;
|
||||
console.log(a)
|
||||
|
||||
},
|
||||
|
||||
processMe (a) {
|
||||
this.$store.commit('order/update_confirm_process_dialog_is_active', true)
|
||||
return this.selectMe(a)
|
||||
},
|
||||
|
||||
justProcessMe (a) {
|
||||
this.$store.commit('order/update_processed', true)
|
||||
return this.selectMe(a)
|
||||
},
|
||||
|
||||
isStatusReg(v) {
|
||||
return v == '01' ? true : false
|
||||
},
|
||||
|
||||
isStatusProcess(v) {
|
||||
return v == '02' ? true : false
|
||||
},
|
||||
|
||||
isStatusFinish(v) {
|
||||
return v == '03' ? true : false
|
||||
},
|
||||
|
||||
print_me (t, a) {
|
||||
if (t == '01') {
|
||||
this.$store.dispatch('order/print_receipt', a)
|
||||
}
|
||||
|
||||
if (t == '02') {
|
||||
this.$store.dispatch('order/print_queue', a)
|
||||
}
|
||||
|
||||
if (t == '03') {
|
||||
this.$store.dispatch('order/print_resume', a)
|
||||
}
|
||||
},
|
||||
|
||||
trigger_vmenu(idx, x) {
|
||||
this.x = x.x - x.offsetX + 10
|
||||
this.y = x.y - x.offsetY + 25
|
||||
console.log(x)
|
||||
this.$store.commit('patient/trigger_patients_vmenu', idx)
|
||||
},
|
||||
|
||||
show_btn_print (code, is_lab) {
|
||||
console.log(is_lab)
|
||||
if (code == '02' && is_lab == 'N')
|
||||
return false
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
format_date (d) {
|
||||
return d.split('-').reverse().join('-')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,293 @@
|
||||
<template>
|
||||
<v-card class="xs12 md12 mt-2">
|
||||
|
||||
<v-data-table :headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
|
||||
<template slot="no-data">
|
||||
<v-alert :value="isError" color="error" icon="warning">
|
||||
Data Pasien tidak di temukan
|
||||
{{errorMessage}}
|
||||
</v-alert>
|
||||
</template>
|
||||
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.day }}, <br>{{ format_date(props.item.C_OrderHeaderDate) }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.C_OrderHeaderNumber }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.M_PatientNoReg }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.M_PatientName }}</td>
|
||||
<td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">
|
||||
<v-btn v-show="isStatusReg(props.item.M_StatusCode)"
|
||||
color="blue"
|
||||
:dark="!processed"
|
||||
@click="processMe(props.item)"
|
||||
:disabled="processed"
|
||||
class="one-btn-icon"
|
||||
>
|
||||
<span class="icon-process"></span>
|
||||
</v-btn>
|
||||
|
||||
<v-btn v-show="isStatusProcess(props.item.M_StatusCode)"
|
||||
color="green"
|
||||
dark
|
||||
@click="justProcessMe(props.item)"
|
||||
flat
|
||||
class="one-btn-icon"
|
||||
>
|
||||
<span class="icon-process"></span>
|
||||
</v-btn>
|
||||
|
||||
<template v-show="isStatusFinish(props.item.M_StatusCode)">
|
||||
|
||||
<v-menu offset-y
|
||||
v-model="patients[props.index].vmenu"
|
||||
:position-x="x"
|
||||
:position-y="y"
|
||||
absolute>
|
||||
|
||||
<v-list>
|
||||
<v-list-tile
|
||||
v-for="(item, index) in patients[props.index].menu_items"
|
||||
:key="index"
|
||||
class="ml0 mr0"
|
||||
v-show="show_btn_print(item.code, props.item.C_OrderHeaderIsLab)"
|
||||
>
|
||||
<!-- <v-list-tile-title>
|
||||
{{ item.title }}
|
||||
</v-list-tile-title> -->
|
||||
<v-btn
|
||||
color="orange"
|
||||
flat
|
||||
class="ma-0 text-md-left"
|
||||
block
|
||||
small
|
||||
@click="print_me(item.code, props.item.C_OrderHeaderID)"
|
||||
outline
|
||||
>
|
||||
{{ item.title }}
|
||||
</v-btn>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<v-btn v-show="isStatusFinish(props.item.M_StatusCode)"
|
||||
color="orange"
|
||||
dark
|
||||
@click="trigger_vmenu(props.index, $event)"
|
||||
|
||||
>
|
||||
CETAK
|
||||
</v-btn>
|
||||
</td>
|
||||
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
<one-fo-clinic-poly-confirm-process-dialog></one-fo-clinic-poly-confirm-process-dialog>
|
||||
</v-card>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
div.v-list__tile.theme--light {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.v-btn { margin: 0px }
|
||||
|
||||
.one-btn-icon { min-width: 0px !important }
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-fo-clinic-poly-confirm-process-dialog' : httpVueLoader('./oneFoClinicPolyConfirmProcessDialog.vue')
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
x: 0,
|
||||
y: 0,
|
||||
on: false,
|
||||
query: "",
|
||||
headers: [
|
||||
{
|
||||
text: "TANGGAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "date",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO REGISTRASI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO RM",
|
||||
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: "40%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "ACTION",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
|
||||
menu_items: [
|
||||
{ code: '01', title: 'Cetak Resep Obat' },
|
||||
{ code: '02', title: 'Cetak Antrian Lab' },
|
||||
{ code: '03', title: 'Click Resume Pasien' }
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
computed : {
|
||||
isError() {
|
||||
// return true;
|
||||
return this.$store.state.patient.search_status == 3
|
||||
},
|
||||
errorMessage() {
|
||||
return this.$store.state.patient.search_error_message
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.patient.search_status == 1
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.patient.patients
|
||||
},
|
||||
total() {
|
||||
return this.$store.state.patient.total_patient
|
||||
},
|
||||
processed : {
|
||||
get () {
|
||||
return this.$store.state.order.processed
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('order/update_processed', v)
|
||||
return
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
selectMe (a) {
|
||||
a.mr = a.M_PatientNoReg;
|
||||
a.name = a.M_PatientName;
|
||||
a.phone = a.M_PatientHP;
|
||||
a.dob = a.M_PatientDOB;
|
||||
|
||||
// clear px
|
||||
this.$store.commit('px/update_cito', {t:'test', v:[]})
|
||||
this.$store.commit('px/update_cito', {t:'panel', v:[]})
|
||||
this.$store.commit('px/update_selected_test', [])
|
||||
this.$store.commit('px/update_nat_test', [])
|
||||
this.$store.dispatch('px/search')
|
||||
|
||||
this.$store.commit('patient/update_selected_patient', a)
|
||||
this.$store.commit('order/update_order_d', {type:'complaint',val:a.C_OrderHeaderComplaint})
|
||||
// this.$store.state.patient.selected_patient = a
|
||||
// this.$store.state.patient.selected_patient.mr = a.M_PatientNoReg;
|
||||
// this.$store.state.patient.selected_patient.name = a.M_PatientName;
|
||||
// this.$store.state.patient.selected_patient.phone = a.M_PatientHP;
|
||||
// this.$store.state.patient.selected_patient.dob = a.M_PatientDOB;
|
||||
console.log(a)
|
||||
|
||||
// SELECT
|
||||
let x = this.$store.state.patient.patients
|
||||
for (let i in x)
|
||||
if (x[i].C_OrderHeaderID == a.C_OrderHeaderID)
|
||||
x[i].selected = true
|
||||
else
|
||||
x[i].selected = false
|
||||
this.$store.commit('patient/update_patients', {records:x, total:this.$store.state.patient.total_patient})
|
||||
},
|
||||
|
||||
processMe (a) {
|
||||
this.$store.commit('order/update_confirm_process_dialog_is_active', true)
|
||||
return this.selectMe(a)
|
||||
},
|
||||
|
||||
justProcessMe (a) {
|
||||
this.$store.commit('order/update_processed', true)
|
||||
return this.selectMe(a)
|
||||
},
|
||||
|
||||
isStatusReg(v) {
|
||||
return v == 'CLINIC.REG' ? true : false
|
||||
},
|
||||
|
||||
isStatusProcess(v) {
|
||||
return v == 'CLINIC.PROCESS' ? true : false
|
||||
},
|
||||
|
||||
isStatusFinish(v) {
|
||||
return v == 'CLINIC.DONE' ? true : false
|
||||
},
|
||||
|
||||
print_me (t, a) {
|
||||
if (t == '01') {
|
||||
this.$store.dispatch('order/print_receipt', a)
|
||||
}
|
||||
|
||||
if (t == '02') {
|
||||
this.$store.dispatch('order/print_queue', a)
|
||||
}
|
||||
|
||||
if (t == '03') {
|
||||
this.$store.dispatch('order/print_resume', a)
|
||||
}
|
||||
},
|
||||
|
||||
trigger_vmenu(idx, x) {
|
||||
this.x = x.x - x.offsetX + 10
|
||||
this.y = x.y - x.offsetY + 25
|
||||
console.log(x)
|
||||
this.$store.commit('patient/trigger_patients_vmenu', idx)
|
||||
},
|
||||
|
||||
show_btn_print (code, is_lab) {
|
||||
console.log(is_lab)
|
||||
if (code == 'CLINIC.PROCESS' && is_lab == 'N')
|
||||
return false
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
format_date (d) {
|
||||
return d.split('-').reverse().join('-')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
<v-card class="search-test">
|
||||
|
||||
<v-divider></v-divider>
|
||||
<!-- <one-mou-px-mou-info v-if="isTab('mou')">
|
||||
</one-mou-px-mou-info> -->
|
||||
<one-fo-clinic-poly-px-px v-show="isTab('px')">
|
||||
</one-fo-clinic-poly-px-px>
|
||||
<!-- <one-mou-px-panel v-if="isTab('panel')">
|
||||
</one-mou-px-panel>
|
||||
<one-mou-px-profile v-if="isTab('profile')">
|
||||
</one-mou-px-profile > -->
|
||||
|
||||
</v-layout>
|
||||
</template>
|
||||
<script>
|
||||
let in_selectPx = false
|
||||
module.exports = {
|
||||
components: {
|
||||
'one-fo-clinic-poly-px-px': httpVueLoader('./oneFoClinicPolyPxPx.vue'),
|
||||
'one-fo-clinic-poly-px-profile': httpVueLoader('./oneFoClinicPolyPxProfile.vue'),
|
||||
'one-fo-clinic-poly-px-panel': httpVueLoader('./oneFoClinicPolyPxPanel.vue')
|
||||
},
|
||||
|
||||
methods: {
|
||||
isTab(tab) {
|
||||
return this.$store.state.px.selected_px_tab == tab
|
||||
},
|
||||
|
||||
selectTab(tab) {
|
||||
|
||||
let prev_tab = this.$store.state.px.selected_px_tab
|
||||
if (tab != this.$store.state.px.selected_px_tab ) {
|
||||
//reset panels tests profiles
|
||||
// this.$store.commit('px/update_tests',[])
|
||||
// this.$store.commit('px/update_panels',[])
|
||||
}
|
||||
this.$store.commit('px/update_selected_px_tab', tab)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
data: function(){
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$store.dispatch('px/search')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
|
||||
<v-card class="pa-1">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="text-md-center pt-2 pb-2" width="10%"> # </th>
|
||||
<th class="text-md-center pt-2 pb-2" width="10%" style="max-width:30px">CITO</th>
|
||||
<th class="text-md-center pt-2 pb-2">PEMERIKSAAN</th>
|
||||
<th class="text-md-center pt-2 pb-2" width="20%">HARGA</th>
|
||||
</tr>
|
||||
<tr v-for="t in selected_test" v-bind:key="t.T_TestID">
|
||||
<td class="text-md-center">
|
||||
<v-icon color="red" @click="deletePx(t)">delete</v-icon>
|
||||
</td>
|
||||
<td class="text-md-left pl-3"><v-checkbox hide-details class="smr-1"
|
||||
:value="t.T_TestID"
|
||||
v-model="cito_test"
|
||||
></v-checkbox></td>
|
||||
<td class="text-md-left pl-3">{{ t.T_TestName}}</td>
|
||||
<td class="pr-3 text-xs-right">{{one_money(t.T_PriceTotal)}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="pr-3 text-xs-right"><strong>SUB TOTAL</strong></td>
|
||||
<td class="pr-3 text-xs-right">{{one_money(sub_total)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</v-card>
|
||||
|
||||
<v-card class="total">
|
||||
<v-layout align-center row>
|
||||
<v-flex xs6>
|
||||
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.nota {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
.total {
|
||||
min-height:76px;
|
||||
}
|
||||
table {
|
||||
font-family: arial, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
background:white;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
table>tr>td {
|
||||
padding: 8px;
|
||||
}
|
||||
table>tr>td:first {
|
||||
padding-left:15px!important;
|
||||
}
|
||||
|
||||
.vintage-text{
|
||||
text-shadow: 0px -2px 0px #fff, 0px 2px 3px #fff;
|
||||
}
|
||||
|
||||
.v-input--selection-controls {
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
|
||||
data () {
|
||||
return {
|
||||
current_cito_change : []
|
||||
}
|
||||
},
|
||||
|
||||
watch : {
|
||||
cito_test (n, o) {
|
||||
|
||||
if (n != o) {
|
||||
if (n.length == 0)
|
||||
this.current_cito_change = [o[0], "N"]
|
||||
else if (o.length == 0)
|
||||
this.current_cito_change = [n[0], "Y"]
|
||||
else if (o.length > n.length) {
|
||||
for (let i in o)
|
||||
if (n.indexOf(o[i]) < 0) this.current_cito_change = [o[i], "N"]
|
||||
}
|
||||
else {
|
||||
for (let i in n)
|
||||
if (o.indexOf(n[i]) < 0) this.current_cito_change = [n[i], "Y"]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
one_money(p) {
|
||||
return window.one_money(p)
|
||||
},
|
||||
|
||||
update_req(px) {
|
||||
// this.$store.dispatch("px/update_req", px)
|
||||
return
|
||||
},
|
||||
|
||||
deletePanel(panel) {
|
||||
let sel = this.selected_panel
|
||||
|
||||
sel.forEach(function(p,idx) {
|
||||
if(p.T_TestPanelID == panel.T_TestPanelID) {
|
||||
sel.splice(idx,1)
|
||||
}
|
||||
});
|
||||
|
||||
this.$store.commit("px/update_selected_panel",sel)
|
||||
let panels = this.$store.state.px.panels
|
||||
if ( panels == undefined ) panels = []
|
||||
panels.push(panel)
|
||||
let dt = {
|
||||
records : panels,
|
||||
total: panels.length
|
||||
}
|
||||
this.$store.commit("px/update_panels",dt)
|
||||
this.update_req()
|
||||
},
|
||||
|
||||
deletePx(test) {
|
||||
this.$store.dispatch("px/delete_px", test)
|
||||
},
|
||||
|
||||
save_order() {
|
||||
// this.$store.dispatch("order/save")
|
||||
return
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
selected_panel() {
|
||||
return this.$store.state.px.selected_panel
|
||||
},
|
||||
selected_test() {
|
||||
return this.$store.state.px.selected_test
|
||||
},
|
||||
|
||||
|
||||
btn_save_enabled () {
|
||||
return true;
|
||||
},
|
||||
|
||||
cito_test : {
|
||||
get () {
|
||||
return this.$store.state.px.cito.test
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('px/update_cito', {t:'test', v:v})
|
||||
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
sub_total() {
|
||||
let t = this.selected_test
|
||||
let s = 0
|
||||
for (let i in t)
|
||||
s += Math.round(t[i].T_PriceTotal)
|
||||
|
||||
return s
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-layout row >
|
||||
<v-flex xs6 class="pa-0 ma-0" >
|
||||
<v-text-field
|
||||
label="Panel"
|
||||
placeholder="Cari Panel"
|
||||
@change="search"
|
||||
class="ma-0"
|
||||
outline
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="pa-3">
|
||||
<v-label >
|
||||
Panel found {{panel_count}}, display {{ panel_count < 20 ? panel_count : 20 }}
|
||||
</v-label>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-container grid-list-xs text-xs-center pa-0>
|
||||
<v-layout row wrap>
|
||||
<v-btn xs3 v-for="p in panels" :key="p.T_TestPanelID"
|
||||
@click="selectPanel(p)"
|
||||
depressed small color="error">
|
||||
{{p.T_TestPanelName}}
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
methods: {
|
||||
search(val) {
|
||||
if (this.prev_val == val ) return
|
||||
this.prev_val = val
|
||||
this.$store.commit("px/update_search_panel",val)
|
||||
this.$store.dispatch("px/panel")
|
||||
},
|
||||
update_req(px) {
|
||||
if (px.T_TestRequirement != '' ) {
|
||||
let reqs = this.$store.state.px.requirement
|
||||
if (! _.find(reqs, function(r) { return r.label == px.T_TestRequirement; }) ) {
|
||||
reqs.push({
|
||||
label: px.T_TestRequirement,
|
||||
is_error: true,
|
||||
checked : false,
|
||||
error_message: 'Hasil harus di isi',
|
||||
note: ''
|
||||
})
|
||||
}
|
||||
this.$store.commit('px/update_requirement',reqs)
|
||||
}
|
||||
},
|
||||
selectPanel(panel) {
|
||||
try {
|
||||
let selected_panel = this.$store.state.px.selected_panel
|
||||
let flag_found = false
|
||||
selected_panel.forEach( function(p,idx) {
|
||||
if (panel.T_TestPanelID == p.T_TestPanelID) {
|
||||
selected_panel[idx] = panel
|
||||
flag_found = true
|
||||
}
|
||||
})
|
||||
if (!flag_found) {
|
||||
let f_update_req = this.update_req
|
||||
selected_panel.push(panel)
|
||||
panel.test.forEach(function(px){
|
||||
f_update_req(px)
|
||||
})
|
||||
}
|
||||
this.$store.commit('px/update_selected_panel',selected_panel)
|
||||
let panels = this.$store.state.px.panels
|
||||
let p_idx= -1
|
||||
panels.forEach( function(p,idx) {
|
||||
if (p.T_TestPanelID == panel.T_TestPanelID) p_idx = idx
|
||||
})
|
||||
if (p_idx >= 0 ) {
|
||||
_.pullAt(panels,[p_idx])
|
||||
let dt = {
|
||||
records: panels,
|
||||
total : panels.length
|
||||
}
|
||||
this.$store.commit('px/update_panels',dt)
|
||||
}
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
panel_count() {
|
||||
return this.$store.state.px.total_panel
|
||||
},
|
||||
panels() {
|
||||
console.log('get panels')
|
||||
return this.$store.state.px.panels
|
||||
},
|
||||
is_loading() {
|
||||
return this.$store.state.px.search_panel_status == 1
|
||||
}
|
||||
},
|
||||
data: function(){
|
||||
return {
|
||||
prev_val: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-layout row >
|
||||
<v-text-field
|
||||
placeholder="ketikkan profile..."
|
||||
class="pt-0"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex text-md-center >
|
||||
<v-btn depressed small color="error">PROFILE 1</v-btn>
|
||||
<v-btn depressed small color="error">PROFILE 2</v-btn>
|
||||
<v-btn depressed small color="error">PROFILE 3</v-btn>
|
||||
<v-btn depressed small color="error">PROFILE 4</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-layout column>
|
||||
<v-layout row>
|
||||
<v-flex xs8 class="pa-0 ma-0" >
|
||||
<v-text-field
|
||||
label="Pemeriksaan"
|
||||
placeholder="ketikkan pemeriksaan ..."
|
||||
@change="search"
|
||||
class="ma-0"
|
||||
outline
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 class="pa-2">
|
||||
<v-label >
|
||||
Test Found {{test_count}}, <br />display {{ test_count < 20 ? test_count : 20 }}
|
||||
</v-label>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-progress-linear class="ma-0 pa-0" indeterminate :active="is_loading" ></>
|
||||
</v-layout>
|
||||
<v-container grid-list-xs text-xs-center pa-0>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6 v-for="test in tests" :key="test.T_TestID"
|
||||
pr-2
|
||||
>
|
||||
<v-btn block
|
||||
:disabled="is_selectPx"
|
||||
@click="selectPx(test)"
|
||||
depressed small :color="px_color(test.px_type)" dark
|
||||
outline
|
||||
class="ma-0 btn-px"
|
||||
|
||||
>
|
||||
{{test.T_TestName}}
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
|
||||
<!-- <v-btn xs3 v-for="test in tests" :key="test.T_TestID"
|
||||
:disabled="is_selectPx"
|
||||
@click="selectPx(test)"
|
||||
depressed small color="error">
|
||||
{{test.T_TestName}}
|
||||
</v-btn> -->
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<script>
|
||||
let in_selectPx = false
|
||||
module.exports = {
|
||||
methods: {
|
||||
search(val) {
|
||||
if ( val == this.prev_search ) return
|
||||
console.log('Searching',val)
|
||||
this.prev_search = val
|
||||
this.$store.commit("px/update_search",val)
|
||||
this.$store.dispatch("px/search")
|
||||
},
|
||||
selectPx(px) {
|
||||
try {
|
||||
|
||||
// START LOADING
|
||||
// this.$store.commit('update_dialog_loading', true)
|
||||
|
||||
// IF PROFILE
|
||||
if (px.px_type == "PR" || px.px_type == "PXR")
|
||||
return this.selectProfile(px)
|
||||
|
||||
// SEARCH NAT TEST
|
||||
let nt = this.$store.state.px.nat_test
|
||||
let found_nt = false
|
||||
for (let i in px.nat_test) {
|
||||
if (nt.indexOf(px.nat_test[i]) > -1)
|
||||
found_nt = true
|
||||
}
|
||||
|
||||
if (found_nt) {
|
||||
alert('Pemeriksaan tersebut sudah ada !')
|
||||
// END LOADING
|
||||
// this.$store.commit('update_dialog_loading', false)
|
||||
return
|
||||
}
|
||||
|
||||
if (in_selectPx) return
|
||||
in_selectPx = true
|
||||
let selected_test = this.$store.state.px.selected_test
|
||||
let flag_found = false
|
||||
selected_test.forEach( function(t,idx) {
|
||||
if (t.T_TestID == px.T_TestID) {
|
||||
selected_test[idx] = px
|
||||
flag_found = true
|
||||
}
|
||||
})
|
||||
if (!flag_found) {
|
||||
selected_test.push(px)
|
||||
let tests = this.$store.state.px.tests
|
||||
let p_idx = -1
|
||||
tests.forEach(function(t,idx) {
|
||||
if (t.T_TestID == px.T_TestID) {
|
||||
p_idx = idx
|
||||
}
|
||||
})
|
||||
if (p_idx >= 0 ) {
|
||||
_.pullAt(tests,[p_idx])
|
||||
let dt = {
|
||||
records: tests,
|
||||
total: tests.length
|
||||
}
|
||||
this.$store.commit('px/update_tests',dt)
|
||||
}
|
||||
}
|
||||
this.$store.commit('px/update_selected_test', selected_test)
|
||||
|
||||
let req = px.requirement
|
||||
let reqs = this.$store.state.px.requirement
|
||||
if (req.length > 0) {
|
||||
for(let i in req) {
|
||||
let found = false
|
||||
for(let j in reqs) {
|
||||
if (reqs[j]['req_id'] == req[i]['req_id'])
|
||||
found = j
|
||||
}
|
||||
|
||||
if (!found)
|
||||
reqs.push({
|
||||
px_id: [px.T_TestID],
|
||||
label: req[i]['req_name'],
|
||||
error_message: 'Hasil harus di isi',
|
||||
is_error: true,
|
||||
checked : false,
|
||||
note: '',
|
||||
req_id: req[i]['req_id']
|
||||
})
|
||||
else
|
||||
reqs[found].px_id.push(px.T_TestID)
|
||||
}
|
||||
|
||||
this.$store.commit('px/update_requirement', reqs)
|
||||
}
|
||||
|
||||
// this.$store.dispatch('px/appx_schedule')
|
||||
|
||||
in_selectPx = false
|
||||
this.$store.commit('px/update_nat_test')
|
||||
|
||||
// END LOADING
|
||||
// this.$store.commit('update_dialog_loading', false)
|
||||
|
||||
// let selected_test = this.$store.state.px.selected_test
|
||||
// let flag_found = false
|
||||
// selected_test.forEach( function(t,idx) {
|
||||
// if (t.T_TestID == px.T_TestID) {
|
||||
// selected_test[idx] = px
|
||||
// flag_found = true
|
||||
// }
|
||||
// })
|
||||
// if (!flag_found) {
|
||||
// selected_test.push(px)
|
||||
// let tests = this.$store.state.px.tests
|
||||
// let p_idx = -1
|
||||
// tests.forEach(function(t,idx) {
|
||||
// if (t.T_TestID == px.T_TestID) {
|
||||
// p_idx = idx
|
||||
// }
|
||||
// })
|
||||
// if (p_idx >= 0 ) {
|
||||
// _.pullAt(tests,[p_idx])
|
||||
// let dt = {
|
||||
// records: tests,
|
||||
// total: tests.length
|
||||
// }
|
||||
// this.$store.commit('px/update_tests',dt)
|
||||
// }
|
||||
// }
|
||||
// this.$store.commit('px/update_selected_test',selected_test)
|
||||
// if (px.T_TestRequirement != '' ) {
|
||||
// let reqs = this.$store.state.px.requirement
|
||||
// let rst = _.find(reqs, function(r) { return r.label == px.T_TestRequirement; })
|
||||
// if ( rst == undefined ) {
|
||||
// reqs.push({
|
||||
// label: px.T_TestRequirement,
|
||||
// error_message: 'Hasil harus di isi',
|
||||
// is_error: true,
|
||||
// checked : false,
|
||||
// note: ''
|
||||
// })
|
||||
// }
|
||||
// this.$store.commit('px/update_requirement',reqs)
|
||||
// }
|
||||
// in_selectPx = false
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
in_selectPx = false
|
||||
}
|
||||
},
|
||||
|
||||
selectProfile(px) {
|
||||
try {
|
||||
|
||||
// SEARCH NAT TEST
|
||||
let nt = this.$store.state.px.nat_test
|
||||
let found_nt = false
|
||||
for (let i in px.nat_test) {
|
||||
if (nt.indexOf(px.nat_test[i]) > -1)
|
||||
found_nt = true
|
||||
}
|
||||
|
||||
if (found_nt) {
|
||||
alert('Pemeriksaan tersebut sudah ada !')
|
||||
// END LOADING
|
||||
this.$store.commit('update_dialog_loading', false)
|
||||
return
|
||||
}
|
||||
|
||||
let pxs = px.child_test
|
||||
|
||||
for (let i in pxs) {
|
||||
px = pxs[i]
|
||||
|
||||
let selected_test = this.$store.state.px.selected_test
|
||||
let flag_found = false
|
||||
|
||||
selected_test.push(px)
|
||||
let tests = this.$store.state.px.tests
|
||||
let p_idx = -1
|
||||
tests.forEach(function(t,idx) {
|
||||
if (t.T_TestID == px.T_TestID) {
|
||||
p_idx = idx
|
||||
}
|
||||
})
|
||||
|
||||
if (p_idx >= 0 ) {
|
||||
_.pullAt(tests,[p_idx])
|
||||
let dt = {
|
||||
records: tests,
|
||||
total: tests.length
|
||||
}
|
||||
this.$store.commit('px/update_tests',dt)
|
||||
}
|
||||
|
||||
this.$store.commit('px/update_selected_test', selected_test)
|
||||
|
||||
let req = px.requirement
|
||||
|
||||
let reqs = this.$store.state.px.requirement
|
||||
if (req.length > 0) {
|
||||
for(let i in req) {
|
||||
let found = false
|
||||
for(let j in reqs) {
|
||||
if (reqs[j]['req_id'] == req[i]['req_id'])
|
||||
found = j
|
||||
}
|
||||
|
||||
if (!found)
|
||||
reqs.push({
|
||||
px_id: [px.T_TestID],
|
||||
label: req[i]['req_name'],
|
||||
error_message: 'Hasil harus di isi',
|
||||
is_error: true,
|
||||
checked : false,
|
||||
note: '',
|
||||
req_id: req[i]['req_id']
|
||||
})
|
||||
else
|
||||
reqs[found].px_id.push(px.T_TestID)
|
||||
}
|
||||
|
||||
this.$store.commit('px/update_requirement', reqs)
|
||||
}
|
||||
}
|
||||
|
||||
// this.$store.dispatch('px/appx_schedule')
|
||||
in_selectPx = false
|
||||
this.$store.commit('px/update_nat_test')
|
||||
|
||||
// END LOADING
|
||||
this.$store.commit('update_dialog_loading', false)
|
||||
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
// END LOADING
|
||||
this.$store.commit('update_dialog_loading', false)
|
||||
in_selectPx = false
|
||||
}
|
||||
},
|
||||
|
||||
px_color (x) {
|
||||
if (x == "PR")
|
||||
return "green"
|
||||
else if (x == "PN")
|
||||
return "orange"
|
||||
else
|
||||
return "error"
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
test_count() {
|
||||
return this.$store.state.px.total_test
|
||||
},
|
||||
tests() {
|
||||
return this.$store.state.px.tests
|
||||
},
|
||||
is_selectPx() {
|
||||
return in_selectPx
|
||||
},
|
||||
is_loading() {
|
||||
return this.$store.state.px.search_status == 1
|
||||
}
|
||||
},
|
||||
data: function(){
|
||||
return {
|
||||
prev_search : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,244 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog_med"
|
||||
max-width="900"
|
||||
full-width
|
||||
>
|
||||
<!-- <v-btn
|
||||
color="orange"
|
||||
slot="activator"
|
||||
:dark="processed"
|
||||
block
|
||||
|
||||
:disabled="!processed"
|
||||
>
|
||||
RESEP
|
||||
</v-btn> -->
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Resep Obat
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
|
||||
<v-data-table :headers="headers" :items="receipts"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
|
||||
<template slot="no-data">
|
||||
<v-alert :value="isError" color="error" icon="warning">
|
||||
Data Pasien tidak di temukan
|
||||
{{errorMessage}}
|
||||
</v-alert>
|
||||
</template>
|
||||
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2 text-md-center" >
|
||||
{{ props.index + 1 }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" >
|
||||
<v-text-field outline
|
||||
hide-details
|
||||
v-model="props.item.med_name"
|
||||
class="no-label"
|
||||
|
||||
@input="(val) => updateReceipt(props.index, 'med_name', val)"
|
||||
></v-text-field>
|
||||
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" >
|
||||
<v-layout>
|
||||
<v-flex xs5>
|
||||
<v-text-field outline
|
||||
hide-details
|
||||
v-model="props.item.med_signa1"
|
||||
class="no-label"
|
||||
reverse
|
||||
|
||||
@input="(val) => updateReceipt(props.index, 'med_signa1', val)"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs2
|
||||
class="font-weight-black">
|
||||
<p class="text-md-center mb-0 mt-2">X</p>
|
||||
</v-flex>
|
||||
<v-flex xs5>
|
||||
<v-text-field outline
|
||||
hide-details
|
||||
v-model="props.item.med_signa2"
|
||||
class="no-label"
|
||||
reverse
|
||||
|
||||
@input="(val) => updateReceipt(props.index, 'med_signa2', val)"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" >
|
||||
<v-text-field outline
|
||||
hide-details
|
||||
v-model="props.item.med_days"
|
||||
class="no-label"
|
||||
reverse
|
||||
|
||||
@input="(val) => updateReceipt(props.index, 'med_days', val)"></v-text-field>
|
||||
</td>
|
||||
<!-- <td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.status }}</td> -->
|
||||
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog_med = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style>
|
||||
/* input { display:none } */
|
||||
.no-label.v-text-field--outline>.v-input__control>.v-input__slot {
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.no-label input {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {
|
||||
headers : [
|
||||
{
|
||||
text: "NO",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA OBAT",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "45%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SIGNA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "HARI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
components : {
|
||||
'patient-search-result': httpVueLoader('./patientSearchResult.vue')
|
||||
},
|
||||
methods : {
|
||||
search: function() {
|
||||
this.$store.dispatch('patient/search')
|
||||
},
|
||||
|
||||
updateReceipt(idx, type, val) {
|
||||
|
||||
let receipts = this.$store.state.receipt.receipts
|
||||
receipts[idx][type] = val
|
||||
this.$store.commit("receipt/update_receipts", receipts)
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog_med : {
|
||||
get() {
|
||||
return this.$store.state.order.med_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_med_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
isLoading () {
|
||||
return false
|
||||
},
|
||||
|
||||
receipts : {
|
||||
get () {
|
||||
return this.$store.state.receipt.receipts
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('receipt/update_receipts', v)
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
isError () {
|
||||
return false;
|
||||
},
|
||||
|
||||
errorMessage () {
|
||||
return ""
|
||||
},
|
||||
|
||||
// test () {
|
||||
// return this.$store.state.receipt.test
|
||||
// }
|
||||
test : {
|
||||
get () {
|
||||
return this.$store.state.receipt.test
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('receipt/update_test', v)
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
processed () {
|
||||
return this.$store.state.order.processed;
|
||||
}
|
||||
},
|
||||
|
||||
watch : {
|
||||
receipts (n, o) {
|
||||
console.log(n)
|
||||
console.log(o)
|
||||
if (n != o)
|
||||
this.$store.commit('receipt/update_receipts', n)
|
||||
},
|
||||
|
||||
test (n, o) {
|
||||
console.log("n-test:"+n+"o-test"+o)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
87
one-ui/test_x_old/vuex/one-fo-clinic-poly/index.php
Normal file
87
one-ui/test_x_old/vuex/one-fo-clinic-poly/index.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>One</title>
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/google-fonts.css">
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/vuetify.min.css">
|
||||
<script src="../../../libs/one_global_clinic.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
|
||||
<one-navbar></one-navbar>
|
||||
<v-content class="blue lighten-5 one" >
|
||||
<v-container fluid pt-2 pb-2 pl-1 pr-1>
|
||||
<v-layout row>
|
||||
<v-flex xs6 pr-1>
|
||||
<one-fo-clinic-poly-patient></one-fo-clinic-poly-patient>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pl-1>
|
||||
<one-fo-clinic-poly-detail></one-fo-clinic-poly-detail>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-content>
|
||||
<one-footer> </one-footer>
|
||||
</v-app>
|
||||
</div>
|
||||
|
||||
<!-- Vendor -->
|
||||
<script src="../../../libs/vendor/moment.min.js"></script>
|
||||
<script src="../../../libs/vendor/numeral.min.js"></script>
|
||||
<script src="../../../libs/vendor/moment-locale-id.js"></script>
|
||||
<script src="../../../libs/vendor/lodash.js"></script>
|
||||
<script src="../../../libs/vendor/axios.min.js"></script>
|
||||
<script src="../../../libs/vendor/vue.js"></script>
|
||||
<script src="../../../libs/vendor/vuex.js"></script>
|
||||
<script src="../../../libs/vendor/vuetify.js"></script>
|
||||
<script src="../../../libs/vendor/httpVueLoader.js"></script>
|
||||
|
||||
<!-- App Script -->
|
||||
<?php
|
||||
$ts = "?ts=" . Date("ymdhis");
|
||||
?>
|
||||
<script type="module">
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
data : {
|
||||
|
||||
},
|
||||
mounted: function() {
|
||||
this.$store.dispatch('conf/search')
|
||||
},
|
||||
computed : {
|
||||
|
||||
},
|
||||
el: '#app',
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
|
||||
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
|
||||
|
||||
'one-fo-clinic-poly-detail': httpVueLoader('./components/oneFoClinicPolyDetail.vue'),
|
||||
'one-fo-clinic-poly-patient': httpVueLoader('./components/oneFoClinicPolyPatientList.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.v-content.one {
|
||||
//padding:64px 0px 0px !important;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
58
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/conf.js
Normal file
58
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/conf.js
Normal file
@@ -0,0 +1,58 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/conf.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search : '',
|
||||
search_status: 0,
|
||||
search_error_message: "",
|
||||
conf: [],
|
||||
total_conf: 0,
|
||||
selected_conf: {}
|
||||
},
|
||||
mutations: {
|
||||
update_search(state, val) {
|
||||
state.search = val
|
||||
},
|
||||
update_search_error_message(state, status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state, status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_conf(state, data) {
|
||||
state.conf = data.records
|
||||
state.total_conf = data.total
|
||||
},
|
||||
update_selected_conf(state, doc) {
|
||||
state.selected_conf = doc
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search()
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
total : resp.data.total,
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_conf", data)
|
||||
context.commit('update_selected_conf', data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/diagnose.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search : '',
|
||||
search_status: 0,
|
||||
search_error_message: "",
|
||||
diagnose: [],
|
||||
total_diagnose: 0,
|
||||
selected_diagnose: {},
|
||||
|
||||
mounted: 0
|
||||
},
|
||||
mutations: {
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_diagnose(state,data) {
|
||||
state.diagnose = data.records
|
||||
state.total_diagnose = data.total
|
||||
},
|
||||
update_selected_diagnose(state,doc) {
|
||||
state.selected_diagnose = doc
|
||||
},
|
||||
|
||||
reset_diagnose(state) {
|
||||
state.selected_diagnose = {}
|
||||
state.search = ""
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
total : resp.data.total,
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_diagnose", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
64
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/gcs.js
Normal file
64
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/gcs.js
Normal file
@@ -0,0 +1,64 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/gcs.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search : '',
|
||||
search_status: 0,
|
||||
search_error_message: "",
|
||||
gcs: [],
|
||||
total_gcs: 0,
|
||||
selected_gcs: {},
|
||||
|
||||
mounted: 0
|
||||
},
|
||||
mutations: {
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_gcs(state,data) {
|
||||
state.gcs = data.records
|
||||
state.total_gcs = data.total
|
||||
},
|
||||
update_selected_gcs(state,doc) {
|
||||
state.selected_gcs = doc
|
||||
},
|
||||
|
||||
reset_gcs(state) {
|
||||
state.selected_gcs = {}
|
||||
state.search = ""
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
total : resp.data.total,
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_gcs", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
296
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/order.js
Normal file
296
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/order.js
Normal file
@@ -0,0 +1,296 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/order.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search : '',
|
||||
search_status: 0,
|
||||
search_error_message: "",
|
||||
|
||||
total_order: 0,
|
||||
selected_order: {},
|
||||
|
||||
order: {
|
||||
order_id: 0,
|
||||
order_number: "",
|
||||
patient_id: 0,
|
||||
patient_age: "",
|
||||
diagnose_id: 0,
|
||||
gcs_id: 0,
|
||||
sistole: 0,
|
||||
diastole: 0,
|
||||
respiratory: 0,
|
||||
temperature: 0,
|
||||
pulse: 0,
|
||||
weight: 0,
|
||||
height: 0,
|
||||
complaint: "",
|
||||
suggestion: ""
|
||||
},
|
||||
|
||||
// Dialogs
|
||||
finish_dialog_is_active: false,
|
||||
confirm_process_dialog_is_active: false,
|
||||
lab_dialog_is_active: false,
|
||||
med_dialog_is_active: false,
|
||||
print_dialog_is_active: false,
|
||||
|
||||
queue_number: '-',
|
||||
processed: false,
|
||||
last_order_id: 0,
|
||||
|
||||
rpt_url: window.BASE_URL + '/one-ui/test/vuex/common/under-cons.pdf'
|
||||
},
|
||||
mutations: {
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_order(state,data) {
|
||||
state.order = data
|
||||
// state.total_order = data.total
|
||||
},
|
||||
|
||||
update_order_d(state, data) {
|
||||
let x = state.order
|
||||
data.val = data.val.replace(/\<(br)\>/g, '\n')
|
||||
x[data.type] = data.val
|
||||
state.order = x
|
||||
// state.total_order = data.total
|
||||
},
|
||||
|
||||
update_selected_order(state,doc) {
|
||||
state.selected_order = doc
|
||||
},
|
||||
|
||||
update_finish_dialog_is_active(state, v) {
|
||||
state.finish_dialog_is_active = v
|
||||
},
|
||||
|
||||
update_confirm_process_dialog_is_active(state, v) {
|
||||
state.confirm_process_dialog_is_active = v
|
||||
},
|
||||
|
||||
update_lab_dialog_is_active(state, v) {
|
||||
state.lab_dialog_is_active = v
|
||||
},
|
||||
|
||||
update_med_dialog_is_active(state, v) {
|
||||
state.med_dialog_is_active = v
|
||||
},
|
||||
|
||||
update_print_dialog_is_active(state, v) {
|
||||
state.print_dialog_is_active = v
|
||||
},
|
||||
|
||||
update_queue_number(state, v) {
|
||||
state.queue_number = v
|
||||
},
|
||||
|
||||
update_processed(state, v) {
|
||||
state.processed = v
|
||||
},
|
||||
|
||||
update_last_order_id(state, v) {
|
||||
state.last_order_id = v
|
||||
},
|
||||
|
||||
update_rpt_url(state, v) {
|
||||
state.rpt_url = v
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
total : resp.data.total,
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_order", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async save(context) {
|
||||
var order_id = context.rootState.patient.selected_patient.C_OrderHeaderID;
|
||||
var med = [];
|
||||
var lab = [];
|
||||
|
||||
var header = {
|
||||
patient_id: context.rootState.patient.selected_patient.M_PatientID,
|
||||
patient_age: context.rootState.patient.selected_patient.patient_age,
|
||||
diagnose_id: context.rootState.diagnose.selected_diagnose.M_DiagnoseID,
|
||||
gcs_id: context.rootState.gcs.selected_gcs.M_GcsID,
|
||||
sistole: context.rootState.order.order.sistole,
|
||||
diastole: context.rootState.order.order.diastole,
|
||||
respiratory: context.rootState.order.order.respiratory,
|
||||
temperature: context.rootState.order.order.temperature,
|
||||
pulse: context.rootState.order.order.pulse,
|
||||
weight: context.rootState.order.order.weight,
|
||||
height: context.rootState.order.order.height,
|
||||
complaint: context.rootState.order.order.complaint,
|
||||
suggestion: context.rootState.order.order.suggestion
|
||||
};
|
||||
|
||||
let meds = context.rootState.receipt.receipts
|
||||
// let med = []
|
||||
for (let j in meds ) {
|
||||
if (meds[j].med_name != '')
|
||||
med.push(meds[j])
|
||||
}
|
||||
|
||||
var px_tmp = [];
|
||||
var st = context.rootState.px.selected_test;
|
||||
for (let i in st) {
|
||||
px_tmp.push({
|
||||
test_id: st[i]['T_TestID'],
|
||||
test_cito: st[i]['T_TestIsCito'],
|
||||
test_type: st[i]['px_type']
|
||||
})
|
||||
}
|
||||
|
||||
lab = px_tmp;
|
||||
|
||||
// context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.save(order_id, header, med, lab, one_token())
|
||||
|
||||
if (resp.status != "200") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
alert('error')
|
||||
} else {
|
||||
console.log(resp)
|
||||
context.commit('update_queue_number', resp.data.data.queue)
|
||||
context.commit('update_finish_dialog_is_active', true)
|
||||
|
||||
context.commit('update_last_order_id', order_id)
|
||||
context.dispatch('resetForm')
|
||||
// context.commit("update_current_order", resp.data.data)
|
||||
// context.commit('update_finish_dialog_is_active', true)
|
||||
|
||||
// context.commit('payment/update_order_id', resp.data.data.id, {root:true})
|
||||
// context.dispatch('payment/get_order', resp.data.data.id, {root:true})
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async process(context) {
|
||||
var order_id = context.rootState.patient.selected_patient.C_OrderHeaderID;
|
||||
|
||||
try {
|
||||
let resp= await api.process(order_id)
|
||||
|
||||
if (resp.status != "200") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
alert('error')
|
||||
} else {
|
||||
context.commit('update_confirm_process_dialog_is_active', false)
|
||||
context.commit('update_processed', true)
|
||||
|
||||
let selected_patient = context.rootState.patient.selected_patient
|
||||
selected_patient.M_StatusCode = "CLINIC.PROCESS"
|
||||
context.commit('patient/update_selected_patient', selected_patient, {root:true})
|
||||
|
||||
let patients = context.rootState.patient.patients
|
||||
let total = context.rootState.patient.total_patient
|
||||
for (let i in patients)
|
||||
if (patients[i].C_OrderHeaderID == selected_patient.C_OrderHeaderID)
|
||||
patients[i].M_StatusCode = "CLINIC.PROCESS"
|
||||
context.commit('patient/update_patients', {records:patients,total:total}, {root:true})
|
||||
}
|
||||
} catch(e) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
async resetForm(context) {
|
||||
try {
|
||||
context.commit('patient/reset_selected_patient', null, {root:true})
|
||||
context.commit('update_processed', false)
|
||||
context.dispatch('patient/search', null, {root:true})
|
||||
context.commit('diagnose/reset_diagnose', null, {root:true})
|
||||
context.commit('gcs/reset_gcs', null, {root:true})
|
||||
context.commit('px/reset_px', null, {root:true})
|
||||
context.commit('receipt/reset_receipt', null, {root:true})
|
||||
|
||||
context.commit('update_order', {
|
||||
order_id: 0,
|
||||
order_number: "",
|
||||
patient_id: 0,
|
||||
patient_age: "",
|
||||
diagnose_id: 0,
|
||||
gcs_id: 0,
|
||||
sistole: 0,
|
||||
diastole: 0,
|
||||
respiratory: 0,
|
||||
temperature: 0,
|
||||
pulse: 0,
|
||||
weight: 0,
|
||||
height: 0,
|
||||
complaint: "",
|
||||
suggestion: ""
|
||||
})
|
||||
} catch(e) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
async print_queue (context, id) {
|
||||
// context.commit('update_print_dialog_is_active', true)
|
||||
|
||||
var order_id = id;
|
||||
|
||||
try {
|
||||
let resp= await api.get_one(order_id)
|
||||
|
||||
if (resp.status != "200") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
alert('error')
|
||||
} else {
|
||||
|
||||
console.log(resp)
|
||||
window.do_print_ticket(resp.data.data.C_OrderHeaderQueueJSON)
|
||||
}
|
||||
} catch(e) {
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
async print_receipt (context, a) {
|
||||
context.commit('update_rpt_url', window.BASE_URL + '/birt/run?__report=reports/klinik/rpt_c_001.rptdesign&PID='+a+'&username=admin&__format=pdf')
|
||||
context.commit('update_print_dialog_is_active', true)
|
||||
},
|
||||
|
||||
async print_resume (context, a) {
|
||||
context.commit('update_rpt_url', window.BASE_URL + '/birt/run?__report=reports/klinik/rpt_c_002.rptdesign&PID='+a+'&username=admin&__format=pdf')
|
||||
context.commit('update_print_dialog_is_active', true)
|
||||
}
|
||||
}
|
||||
}
|
||||
108
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/patient.js
Normal file
108
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/patient.js
Normal file
@@ -0,0 +1,108 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/patient.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
noreg:'',
|
||||
search: '',
|
||||
search_no_lab: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
patients: [],
|
||||
total_patient: 0,
|
||||
selected_patient: {
|
||||
mr : '-',
|
||||
name : '-',
|
||||
dob : '-',
|
||||
phone : '-'
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_noreg(state, val) {
|
||||
state.noreg=val
|
||||
},
|
||||
update_search(state, val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_no_lab(state, val) {
|
||||
state.search_no_lab=val
|
||||
},
|
||||
update_search_status(state, status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_patients(state, data) {
|
||||
for (let i in data.records) {
|
||||
data.records[i].vmenu = false
|
||||
|
||||
let menu_items = [
|
||||
{ code: '01', title: 'Cetak Resep Obat' },
|
||||
{ code: '02', title: 'Cetak Antrian Lab' },
|
||||
{ code: '03', title: 'Click Resume Pasien' }
|
||||
]
|
||||
|
||||
if (data.records[i].C_OrderHeaderIsLab == "N")
|
||||
menu_items.splice(1,1)
|
||||
|
||||
if (data.records[i].C_OrderHeaderIsReceipt == "N")
|
||||
menu_items.splice(0,1)
|
||||
|
||||
data.records[i].menu_items = menu_items
|
||||
}
|
||||
|
||||
state.patients= data.records
|
||||
state.total_patient = data.total
|
||||
|
||||
|
||||
},
|
||||
|
||||
trigger_patients_vmenu(state, idx) {
|
||||
let p = state.patients
|
||||
p[idx].vmenu = !p[idx].vmenu
|
||||
state.patients = p
|
||||
},
|
||||
|
||||
update_selected_patient(state,val) {
|
||||
state.selected_patient=val
|
||||
},
|
||||
|
||||
reset_selected_patient(state) {
|
||||
state.selected_patient = { mr : '-', name : '-', dob : '-', phone : '-' }
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context,prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let status = context.rootState.status.selected_status.M_StatusID ?
|
||||
context.rootState.status.selected_status.M_StatusID : 0
|
||||
let resp= await api.search(context.state.search_no_lab, context.state.search, status)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_patients",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
310
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/px.js
Normal file
310
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/px.js
Normal file
@@ -0,0 +1,310 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/px.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
tests: [],
|
||||
total_test: 0,
|
||||
selected_test: [],
|
||||
|
||||
search_panel: '',
|
||||
search_panel_status:0,
|
||||
panels: [],
|
||||
total_panel: 0,
|
||||
selected_panel: [],
|
||||
requirement: [],
|
||||
|
||||
cito: {test:[], panel:[]},
|
||||
|
||||
selected_px_tab: 'px',
|
||||
nat_test: [],
|
||||
|
||||
req_status: "X",
|
||||
reqs: [],
|
||||
|
||||
citos: [],
|
||||
selected_cito: null,
|
||||
is_cito: "N"
|
||||
},
|
||||
mutations: {
|
||||
update_requirement(state,val) {
|
||||
state.requirement = val
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_selected_test(state,val) {
|
||||
// if (state.cito.length > 0) {
|
||||
for (var i in val) {
|
||||
val[i]['T_TestIsCito'] = 'N'
|
||||
if (state.cito.test.indexOf(val[i]['T_TestID']) > -1)
|
||||
val[i]['T_TestIsCito'] = 'Y'
|
||||
}
|
||||
// }
|
||||
|
||||
state.selected_test = val
|
||||
},
|
||||
update_mouCompanyID(state,val) {
|
||||
state.mouCompanyID=val
|
||||
},
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_tests(state,data) {
|
||||
state.tests= data.records
|
||||
state.total_test= data.total
|
||||
},
|
||||
update_search_panel(state,val) {
|
||||
state.search_panel=val
|
||||
},
|
||||
update_search_panel_status(state,status) {
|
||||
state.search_panel_status = status
|
||||
},
|
||||
update_panels(state,data) {
|
||||
console.log('--comit--',data)
|
||||
state.panels = data.records
|
||||
state.total_panel = data.total
|
||||
},
|
||||
update_selected_panel(state,val) {
|
||||
state.selected_panel= val
|
||||
},
|
||||
|
||||
update_cito(state, val) {
|
||||
let test = state.selected_test
|
||||
let cito = state.cito
|
||||
// if (val.length > 0) {
|
||||
|
||||
for (var i in test) {
|
||||
test[i]['T_TestIsCito'] = 'N'
|
||||
if (val.v.indexOf(test[i]['T_TestID']) > -1)
|
||||
test[i]['T_TestIsCito'] = 'Y'
|
||||
}
|
||||
// }
|
||||
|
||||
cito[val.t] = val.v
|
||||
console.log(cito)
|
||||
state.cito = cito
|
||||
state.selected_test = test
|
||||
},
|
||||
|
||||
update_selected_px_tab(state, tab) {
|
||||
state.selected_px_tab = tab
|
||||
},
|
||||
|
||||
update_nat_test(state) {
|
||||
let px = state.selected_test
|
||||
let nt = []
|
||||
for (let i in px) {
|
||||
for (let j in px[i].nat_test) {
|
||||
nt.push(px[i].nat_test[j])
|
||||
}
|
||||
}
|
||||
|
||||
state.nat_test = nt
|
||||
},
|
||||
|
||||
update_req_status(state, val) {
|
||||
state.req_status = val
|
||||
},
|
||||
|
||||
update_reqs(state, val) {
|
||||
state.reqs = val
|
||||
},
|
||||
|
||||
update_citos(state, val) {
|
||||
state.citos = val.records
|
||||
},
|
||||
|
||||
update_selected_cito(state, val) {
|
||||
state.selected_cito = val
|
||||
},
|
||||
|
||||
update_is_cito(state, val) {
|
||||
state.is_cito = val
|
||||
},
|
||||
|
||||
reset_px (state) {
|
||||
state.selected_test = []
|
||||
state.search = ""
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
delete_px (context, test) {
|
||||
let sel = context.state.selected_test
|
||||
sel.forEach(function(t, idx) {
|
||||
if(t.T_TestID == test.T_TestID && t.px_type == test.px_type) {
|
||||
sel.splice(idx,1)
|
||||
}
|
||||
});
|
||||
|
||||
let cito = context.state.cito.test
|
||||
let cito_idx = cito.indexOf(test.T_TestID)
|
||||
if (cito_idx > -1)
|
||||
cito.splice(cito_idx, 1)
|
||||
|
||||
context.commit("update_selected_test", sel)
|
||||
let tests = context.state.tests
|
||||
if (tests == undefined ) tests = []
|
||||
tests.push(test)
|
||||
|
||||
let dt = {
|
||||
records : tests,
|
||||
total: tests.length
|
||||
}
|
||||
|
||||
context.commit("update_tests", dt)
|
||||
// context.dispatch("delete_req", test)
|
||||
// context.dispatch("update_req", null)
|
||||
// context.dispatch("appx_schedule")
|
||||
context.commit('update_nat_test')
|
||||
},
|
||||
|
||||
update_req(context, px) {
|
||||
|
||||
let reqs = []
|
||||
let tests = context.state.selected_test
|
||||
tests.forEach( function(t) {
|
||||
let label = t.T_TestRequirement
|
||||
if (_.indexOf(reqs,label) == -1 ) reqs.push(label)
|
||||
})
|
||||
|
||||
let panels = context.state.selected_panel
|
||||
panels.forEach( function(p) {
|
||||
let tests = p.test
|
||||
tests.forEach( function(t) {
|
||||
let label = t.T_TestRequirement
|
||||
if (_.indexOf(reqs,label) == -1 ) reqs.push(label)
|
||||
})
|
||||
})
|
||||
|
||||
let requirement = context.state.requirement
|
||||
let flag_update_requirement = false
|
||||
if (reqs.length == 0 ) {
|
||||
requirement = []
|
||||
flag_update_requirement = true
|
||||
}
|
||||
requirement.forEach(function(r,idx) {
|
||||
if ( _.indexOf(reqs,r.label) == -1) {
|
||||
flag_update_requirement = true
|
||||
requirement.splice(idx,1)
|
||||
}
|
||||
})
|
||||
|
||||
if (flag_update_requirement) {
|
||||
context.commit('update_requirement', requirement)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
async search(context,prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let mouCompanyID = context.rootState.conf.selected_conf.Conf_ClinicM_MouID
|
||||
|
||||
let resp= await api.search(mouCompanyID, context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_tests",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
async panel(context,prm) {
|
||||
context.commit("update_search_panel_status",1)
|
||||
try {
|
||||
let mouCompanyID = 0
|
||||
if (context.rootState.company.selected_mou.M_MouCompanyID) {
|
||||
mouCompanyID = context.rootState.company.selected_mou.M_MouCompanyID
|
||||
}
|
||||
let resp= await api.panel(mouCompanyID,context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_panel_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_panel_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_panels",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_panel_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async get_price(context, prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
|
||||
let mou_id = context.rootState.company.selected_mou.M_MouID
|
||||
let resp = await api.get_price(prm.test_id, mou_id, prm.cito)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
let x = context.state.selected_test
|
||||
for (let i in x) {
|
||||
if (x[i].T_TestID == prm.test_id) {
|
||||
if (Math.round(resp.data.test_price) == 0) {
|
||||
x[i].T_TestIsCito = "N"
|
||||
let n = context.state.cito.test.indexOf(x[i].T_TestID)
|
||||
if (n > -1)
|
||||
context.state.cito.test.splice(n, 1)
|
||||
|
||||
let tests = context.state.tests
|
||||
if (tests == undefined ) tests = []
|
||||
tests.push(x[i])
|
||||
let dt = {
|
||||
records : tests,
|
||||
total: tests.length
|
||||
}
|
||||
context.commit("update_tests", dt)
|
||||
|
||||
x.splice(i, 1);
|
||||
}
|
||||
|
||||
else {
|
||||
x[i].T_PriceAmount = resp.data.test_price
|
||||
x[i].T_PriceDisc = resp.data.test_disc
|
||||
x[i].T_PriceDiscRp = resp.data.test_discrp
|
||||
}
|
||||
}
|
||||
}
|
||||
context.commit("update_selected_test", x)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
43
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/receipt.js
Normal file
43
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/receipt.js
Normal file
@@ -0,0 +1,43 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
// import * as api from "../api/diagnose.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
test : "x",
|
||||
receipts : [
|
||||
{n: 1, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0},
|
||||
{n: 2, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0},
|
||||
{n: 3, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0},
|
||||
{n: 4, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0},
|
||||
{n: 5, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0},
|
||||
{n: 6, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0},
|
||||
{n: 7, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0},
|
||||
{n: 8, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0},
|
||||
{n: 9, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0},
|
||||
{n: 10, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0}
|
||||
]
|
||||
},
|
||||
mutations: {
|
||||
update_receipts(state, v) {
|
||||
state.receipts = v
|
||||
},
|
||||
|
||||
update_test(state, v) {
|
||||
state.test = v
|
||||
},
|
||||
|
||||
reset_receipt (state) {
|
||||
let x = []
|
||||
for (let i=1; i<=10; i++)
|
||||
x.push({n: i, med_name: '', med_signa1: 0, med_signa2: 0, med_days: 0})
|
||||
|
||||
state.receipts = x;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
|
||||
}
|
||||
}
|
||||
66
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/status.js
Normal file
66
one-ui/test_x_old/vuex/one-fo-clinic-poly/modules/status.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/status.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search : '',
|
||||
search_status: 0,
|
||||
search_error_message: "",
|
||||
status: [],
|
||||
total_status: 0,
|
||||
selected_status: {},
|
||||
|
||||
mounted: 0
|
||||
},
|
||||
mutations: {
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_status (state, data) {
|
||||
state.status = data.records
|
||||
state.total_status = data.total
|
||||
},
|
||||
update_selected_status(state, doc) {
|
||||
state.selected_status = doc
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
total : resp.data.total,
|
||||
records : resp.data.records
|
||||
}
|
||||
|
||||
context.commit("update_status", data)
|
||||
if (context.rootState.loaded < 1) {
|
||||
context.commit("update_selected_status", data.records[0])
|
||||
context.dispatch("patient/search", null, {root:true})
|
||||
context.commit('inc_loaded', null, {root:true})
|
||||
}
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
44
one-ui/test_x_old/vuex/one-fo-clinic-poly/store.js
Normal file
44
one-ui/test_x_old/vuex/one-fo-clinic-poly/store.js
Normal file
@@ -0,0 +1,44 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import patient from "./modules/patient.js";
|
||||
import gcs from "./modules/gcs.js";
|
||||
import conf from "./modules/conf.js";
|
||||
import diagnose from "./modules/diagnose.js";
|
||||
import order from "./modules/order.js";
|
||||
import receipt from "./modules/receipt.js";
|
||||
import px from "./modules/px.js";
|
||||
import status from "./modules/status.js";
|
||||
import system from "../../../apps/modules/system/system.js";
|
||||
|
||||
export const store = new Vuex.Store({
|
||||
state : {
|
||||
loaded : 0,
|
||||
dialog_loading : false,
|
||||
},
|
||||
|
||||
mutations : {
|
||||
inc_loaded (state) {
|
||||
state.loaded = state.loaded + 1
|
||||
},
|
||||
|
||||
update_dialog_loading(state, v) {
|
||||
state.dialog_loading = v
|
||||
}
|
||||
},
|
||||
|
||||
modules : {
|
||||
diagnose: diagnose,
|
||||
gcs: gcs,
|
||||
conf: conf,
|
||||
patient: patient,
|
||||
order: order,
|
||||
receipt: receipt,
|
||||
px: px,
|
||||
status: status,
|
||||
system: system
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user