Initial import
This commit is contained in:
51
process/one-process-resultentry-px/api/__old/re_history.js
Normal file
51
process/one-process-resultentry-px/api/__old/re_history.js
Normal file
@@ -0,0 +1,51 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/resultentry/";
|
||||
|
||||
export async function search(token, order_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_px/search', {
|
||||
token: token,
|
||||
order_id: order_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function history(token, order_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_patient/history', {
|
||||
token: token,
|
||||
order_id: order_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/resultentry/";
|
||||
|
||||
export async function search_method(token, nattest_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_normal_method/search_method', {
|
||||
token: token,
|
||||
nattest_id: nattest_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save_method(token, detail_id, method_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_normal_method/save_method', {
|
||||
token: token,
|
||||
detail_id: detail_id,
|
||||
method_id: method_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
74
process/one-process-resultentry-px/api/__old/re_patient.js
Normal file
74
process/one-process-resultentry-px/api/__old/re_patient.js
Normal file
@@ -0,0 +1,74 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/resultentry/";
|
||||
|
||||
export async function search(token, sdate, search, page) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_patient/search', {
|
||||
token: token,
|
||||
start_date: sdate,
|
||||
search: search,
|
||||
page: page
|
||||
});
|
||||
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_note(token, order_id, note) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_patient/save_note', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
note: note
|
||||
});
|
||||
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 info_req(token, order_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_patient/info_req', {
|
||||
token: token,
|
||||
order_id: order_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
139
process/one-process-resultentry-px/api/__old/re_px.js
Normal file
139
process/one-process-resultentry-px/api/__old/re_px.js
Normal file
@@ -0,0 +1,139 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/resultentry/";
|
||||
|
||||
export async function search(token, order_id, lang_id, lang_si, group_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_px/search', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
lang_id: lang_id,
|
||||
lang_si: lang_si,
|
||||
group_id: group_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save(token, lang_id, is_si, datax) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_px/save', {
|
||||
token: token,
|
||||
lang_id: lang_id,
|
||||
is_si: is_si,
|
||||
data: datax
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save_template(token, test_id, value) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_px/save_template', {
|
||||
token: token,
|
||||
test_id: test_id,
|
||||
value: value
|
||||
});
|
||||
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 lang_export(token, order_id, lang_id, is_si) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_px/export', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
lang_id: lang_id,
|
||||
is_si: is_si
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_group() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_px/search_group', {});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_rerun(detail_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 're_px/search_rerun', {detail_id: detail_id});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
23
process/one-process-resultentry-px/api/list_order.js
Normal file
23
process/one-process-resultentry-px/api/list_order.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/resultentry_px/";
|
||||
export async function save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'search_box/save_order', prm)
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
23
process/one-process-resultentry-px/api/list_px.js
Normal file
23
process/one-process-resultentry-px/api/list_px.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/resultentry_px/";
|
||||
export async function search_order(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'search_box/search_order', prm)
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
46
process/one-process-resultentry-px/api/search_box.js
Normal file
46
process/one-process-resultentry-px/api/search_box.js
Normal file
@@ -0,0 +1,46 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/resultentry_px/";
|
||||
export async function search_group(token, sdate, search, page) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'search_box/search_group', {
|
||||
token: token,
|
||||
start_date: sdate,
|
||||
search: search,
|
||||
page: page
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function search_px(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'search_box/search_px', prm);
|
||||
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,89 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
max-width="500px"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-text>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
label="Pemeriksaan"
|
||||
v-model="selected_px.t_testname"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
label="Metode sekarang"
|
||||
v-model="selected_px.methode_name"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-select
|
||||
:items="methods"
|
||||
item-text="Nat_MethodeName"
|
||||
item-value="Nat_MethodeID"
|
||||
return-object
|
||||
v-model="selected_method"
|
||||
label="Pilih Metode baru"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn color="primary" flat @click="dialog=!dialog">Tutup</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" dark @click="save">Simpan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
dialog : {
|
||||
get () { return this.$store.state.normal_method.dialog_method },
|
||||
set (v) { this.$store.commit('normal_method/update_dialog_method', v) }
|
||||
},
|
||||
|
||||
methods () {
|
||||
return this.$store.state.normal_method.methods
|
||||
},
|
||||
|
||||
selected_method : {
|
||||
get () { return this.$store.state.normal_method.selected_method },
|
||||
set (v) { this.$store.commit('normal_method/update_selected_method', v) }
|
||||
},
|
||||
|
||||
selected_px () {
|
||||
return this.$store.state.re_px.selected_px
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
save () {
|
||||
this.$store.dispatch('normal_method/save_method')
|
||||
}
|
||||
},
|
||||
|
||||
watch : {
|
||||
dialog(val, old) {
|
||||
if (val && !old) {
|
||||
this.$store.dispatch('normal_method/search_method')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
max-width="500px"
|
||||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-text>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-textarea
|
||||
rows="5"
|
||||
outline
|
||||
label="Catatan Proses"
|
||||
hide-details
|
||||
v-model="result_note"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn color="primary" flat @click="dialog=!dialog">Tutup</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" @click="save">Simpan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
/* .v-overlay--active {
|
||||
z-index: 1005 !important;
|
||||
}
|
||||
|
||||
.v-dialog__content--active {
|
||||
z-index: 1006 !important;
|
||||
} */
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
|
||||
computed : {
|
||||
dialog : {
|
||||
get () { return this.$store.state.re_patient.dialog_note },
|
||||
set (v) { this.$store.commit('re_patient/update_dialog_note', v) }
|
||||
},
|
||||
|
||||
result_note : {
|
||||
get () { return this.$store.state.re_patient.result_note },
|
||||
set (v) { this.$store.commit('re_patient/update_result_note', v) }
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
save () {
|
||||
this.$store.dispatch('re_patient/save_note')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
max-width="500px"
|
||||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-text>
|
||||
<v-layout row wrap mb-2 v-show="info_req.note_fo != ''">
|
||||
<v-flex xs12>
|
||||
<h5 class="caption">Catatan FO</h5>
|
||||
<h3 class="title font-weight-regular">{{info_req.note_fo}}</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap mb-2 v-show="info_req.note_sampling != ''">
|
||||
<v-flex xs12>
|
||||
<h5 class="caption">Catatan Specimen</h5>
|
||||
<h3 class="title font-weight-regular">{{info_req.note_sampling}}</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap mb-2 v-show="info_req.req_fo.length > 0">
|
||||
<v-flex xs12>
|
||||
<h5 class="caption">Requirement FO</h5>
|
||||
<h3 class="title font-weight-regular">{{info_req.req_fo.join(', ')}}</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap mb-2 v-show="info_req.req_spec_col.length > 0">
|
||||
<v-flex xs12>
|
||||
<h5 class="caption">Requirement Specimen Collection</h5>
|
||||
<h3 class="title font-weight-regular">{{info_req.req_spec_col.join(', ')}}</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap mb-2 v-show="info_req.req_spec_ver.length > 0">
|
||||
<v-flex xs12>
|
||||
<h5 class="caption">Requirement Specimen Verification</h5>
|
||||
<h3 class="title font-weight-regular">{{info_req.req_spec_ver.join(', ')}}</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap mb-2 v-show="info_req.req_samp_ver.length > 0">
|
||||
<v-flex xs12>
|
||||
<h5 class="caption">Requirement Sample Verification</h5>
|
||||
<h3 class="title font-weight-regular">{{info_req.req_samp_ver.join(', ')}}</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap mb-2 v-show="info_req.req_pre_an.length > 0">
|
||||
<v-flex xs12>
|
||||
<h5 class="caption">Requirement Pre Analitik</h5>
|
||||
<h3 class="title font-weight-regular">{{info_req.req_pre_an.join(', ')}}</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" flat @click="dialog=!dialog">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
/* .v-overlay--active {
|
||||
z-index: 1005 !important;
|
||||
}
|
||||
|
||||
.v-dialog__content--active {
|
||||
z-index: 1006 !important;
|
||||
} */
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
|
||||
computed : {
|
||||
dialog : {
|
||||
get () { return this.$store.state.re_patient.dialog_req },
|
||||
set (v) { this.$store.commit('re_patient/update_dialog_req', v) }
|
||||
},
|
||||
|
||||
info_req () {
|
||||
return this.$store.state.re_patient.info_req
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
max-width="400px"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title primary-title class="grey darken-3 white--text">
|
||||
<h3 class="headliine">Tambah Template Hasil</h3>
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
label="Pemeriksaan"
|
||||
readonly
|
||||
v-model="curr_px"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
label="Keterangan Hasil"
|
||||
v-model="template_new_value"
|
||||
:error="error || dup_error"
|
||||
:error-messages="error_msg"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn color="primary" flat @click="dialog=false">Tutup</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" dark @click="save">Simpan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
error_messages: ''
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
dialog : {
|
||||
get() {
|
||||
return this.$store.state.re_px.dialog_template_new
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('re_px/update_dialog_template_new', v)
|
||||
}
|
||||
},
|
||||
|
||||
template_new_value : {
|
||||
get() {
|
||||
return this.$store.state.re_px.template_new_value
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('re_px/update_template_new_value', v)
|
||||
}
|
||||
},
|
||||
|
||||
curr_px () {
|
||||
return this.$store.state.re_px.selected_px.t_testname
|
||||
},
|
||||
|
||||
error () {
|
||||
|
||||
if (this.template_new_value.length < 1) {
|
||||
this.error_messages = "Keterangan Isi Hasil tidak boleh kosong !"
|
||||
return true
|
||||
}
|
||||
|
||||
this.error_messages = ""
|
||||
return false
|
||||
},
|
||||
|
||||
error_msg () {
|
||||
if (this.error_messages != '')
|
||||
return this.error_messages
|
||||
|
||||
return this.dup_error_messages
|
||||
},
|
||||
|
||||
dup_error : {
|
||||
get() { return this.$store.state.re_px.dup_template_error.status },
|
||||
set (v) {
|
||||
let x = this.$store.state.re_px.dup_template_error
|
||||
x.status = v
|
||||
this.$store.commit('re_px/update_dup_template_error', x)
|
||||
}
|
||||
},
|
||||
|
||||
dup_error_messages : {
|
||||
get() { return this.$store.state.re_px.dup_template_error.messages },
|
||||
set (v) {
|
||||
let x = this.$store.state.re_px.dup_template_error
|
||||
x.messages = v
|
||||
this.$store.commit('re_px/update_dup_template_error', x)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
save () {
|
||||
if (this.error) {
|
||||
return
|
||||
} else {
|
||||
this.$store.dispatch('re_px/save_template')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch : {
|
||||
template_new_value (v, o) {
|
||||
|
||||
if (this.dup_error) {
|
||||
if (v != o)
|
||||
this.$store.commit('re_px/update_dup_template_error', {
|
||||
status: false,
|
||||
messages: ''
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
dialog (v, o) {
|
||||
if (v && !o)
|
||||
this.template_new_value = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
persistent
|
||||
max-width="500px"
|
||||
transition="dialog-transition"
|
||||
>
|
||||
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow" color="blue-grey lighten-2">
|
||||
<v-card-title primary-title class="title white--text pb-2">
|
||||
HISTORI PEMERIKSAAN
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<v-expansion-panel>
|
||||
<v-expansion-panel-content
|
||||
v-for="(px, i) in pxs"
|
||||
:key="i"
|
||||
>
|
||||
<template v-slot:header>
|
||||
<div class="subheading">{{ px.date }}</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text class="pt-1 pb-1">
|
||||
<v-data-table
|
||||
:headers="headers" :items="px.data"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1 table-history"
|
||||
>
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pl-2 pr-2 pa-1 green--text" v-bind:class="is_selected(props.item)">
|
||||
{{ props.item.px_name }}
|
||||
</td>
|
||||
<td class="text-xs-left pl-2 pr-2 pa-1" v-bind:class="is_selected(props.item)">
|
||||
{{ props.item.result }}
|
||||
</td>
|
||||
<td class="text-xs-left pl-2 pr-2 pa-1" v-bind:class="is_selected(props.item)">
|
||||
{{ props.item.flag }}
|
||||
</td>
|
||||
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="white" flat @click="dialog = false">Tutup</v-btn>
|
||||
<!-- <v-btn color="blue darken-1" :dark="btn_save_enabled" @click="save" :disabled="!btn_save_enabled">Simpan</v-btn> -->
|
||||
</v-card-actions>
|
||||
|
||||
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
|
||||
.table-history table td {
|
||||
height: 40px !important
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "45%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "HASIL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "35%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "FLAG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
// this.$store.commit('re_px/update_selected_rerun', item)
|
||||
// this.$store.commit('re_px/update_dialog_rerun', false)
|
||||
|
||||
// let x = this.$store.state.re_px.pxs
|
||||
// x[this.$store.state.re_px.selected_px_idx]['result'] = item.result
|
||||
// this.$store.commit('re_px/update_pxs', {records:x})
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
// let x = this.$store.state.re_patient.selected_patient
|
||||
// if (!x)
|
||||
// return ''
|
||||
|
||||
// if (x.T_OrderHeaderID == item.T_OrderHeaderID)
|
||||
// return 'green lighten-4'
|
||||
|
||||
return ''
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
pxs () {
|
||||
return this.$store.state.re_history.pxs
|
||||
},
|
||||
|
||||
dialog : {
|
||||
get () { return this.$store.state.re_history.dialog_history },
|
||||
set (v) { this.$store.commit('re_history/update_dialog_history', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
// this.$store.dispatch('re_px/search_rerun')
|
||||
},
|
||||
|
||||
watch : {
|
||||
dialog (n, o) {
|
||||
if (n && !o) {
|
||||
this.$store.dispatch('re_history/history')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
persistent
|
||||
max-width="500px"
|
||||
transition="dialog-transition"
|
||||
>
|
||||
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow" color="blue-grey lighten-2">
|
||||
<v-card-title primary-title class="title white--text pb-2">
|
||||
HISTORI PEMERIKSAAN
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
|
||||
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="white" flat @click="dialog = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.v-card__actions { display:none }
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "45%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "HASIL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "35%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "FLAG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
|
||||
},
|
||||
|
||||
computed : {
|
||||
dialog : {
|
||||
get () { return this.$store.state.re_history.dialog_history },
|
||||
set (v) { this.$store.commit('re_history/update_dialog_history', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,295 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-card class="pa-2" v-show="!detail">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs3>
|
||||
<div class="caption font-weight-light">No Reg / Tanggal</div>
|
||||
<div class="subheading">{{selected_patient.T_OrderHeaderLabNumber}} / {{order_date}}</div>
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
<div class="caption font-weight-light">Nama / Jenis Kelamin</div>
|
||||
<div class="subheading">{{selected_patient.M_PatientName}} / {{selected_patient.M_SexName}}</div>
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
<div class="caption font-weight-light">DOB / Umur</div>
|
||||
<div class="subheading">{{dob_date}} / {{age}}</div>
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
<div class="caption font-weight-light">Pengirim</div>
|
||||
<div class="subheading">{{selected_patient.doctor_sender_name}} </div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-btn
|
||||
absolute
|
||||
dark
|
||||
top
|
||||
right
|
||||
color="black"
|
||||
flat
|
||||
depressed
|
||||
@click="detail=!detail"
|
||||
class="btn-detail"
|
||||
>
|
||||
<v-icon>keyboard_arrow_up</v-icon>
|
||||
</v-btn>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
<v-flex xs12 v-show="detail">
|
||||
<v-card class="pa-2">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6>
|
||||
<div class="caption font-weight-light">No Reg / Tanggal</div>
|
||||
<div class="subheading">{{selected_patient.T_OrderHeaderLabNumber}} / {{order_date}}</div>
|
||||
|
||||
<div class="caption font-weight-light mt-2">Nama / Jenis Kelamin</div>
|
||||
<div class="subheading">{{selected_patient.M_PatientName}} / {{selected_patient.M_SexName}}</div>
|
||||
|
||||
<div class="caption font-weight-light mt-2">DOB / Umur</div>
|
||||
<div class="subheading">{{dob_date}} / {{age}}</div>
|
||||
|
||||
<div class="caption font-weight-light mt-2">Phone / Janji hasil</div>
|
||||
<div class="subheading">{{selected_patient.M_PatientHP}} / {{selected_patient.order_promise?selected_patient.order_promise.join(', '):''}}</div>
|
||||
</v-flex>
|
||||
<v-flex xs6>
|
||||
<div class="caption font-weight-light">Kel. Pelanggan</div>
|
||||
<div class="subheading">{{selected_patient.M_CompanyName}} </div>
|
||||
|
||||
<div class="caption font-weight-light mt-2">Pengirim</div>
|
||||
<div class="subheading">{{selected_patient.doctor_sender_name}} </div>
|
||||
|
||||
<div class="caption font-weight-light mt-2">Pengiriman Hasil</div>
|
||||
<div class="subheading">{{selected_patient.delivery?selected_patient.delivery.join(", "):''}} </div>
|
||||
|
||||
<div class="caption font-weight-light mt-2">Format Hasil</div>
|
||||
<div class="subheading">{{langs}} </div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row v-show="false">
|
||||
<v-flex xs3>
|
||||
<v-layout row wrap pr-2>
|
||||
<v-flex xs7 pr-2>
|
||||
|
||||
<v-text-field
|
||||
label="Nomor Lab"
|
||||
v-model="selected_patient.T_OrderHeaderLabNumber"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs5>
|
||||
<v-text-field
|
||||
label="Tanggal"
|
||||
v-model="order_date"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
label="Nama"
|
||||
v-model="selected_patient.M_PatientName"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3>
|
||||
<v-layout row wrap pl-2>
|
||||
<v-flex xs5 pr-2>
|
||||
<v-text-field
|
||||
label="DOB"
|
||||
v-model="dob_date"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs7 pl-2>
|
||||
<v-text-field
|
||||
label="Umur"
|
||||
v-model="age"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
label="Jenis Kelamin"
|
||||
v-model="selected_patient.M_SexName"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3>
|
||||
<v-layout row wrap pl-2>
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
label="Dokter"
|
||||
v-model="selected_patient.doctor_pj_name"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
label="Company"
|
||||
v-model="selected_patient.M_CompanyName"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3>
|
||||
<v-layout row wrap pl-2>
|
||||
<v-flex xs12 mb-3>
|
||||
<v-text-field
|
||||
label="No HP"
|
||||
v-model="selected_patient.M_PatientHP"
|
||||
readonly
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
label="Catatan Pasien"
|
||||
outline
|
||||
readonly
|
||||
hide-details
|
||||
v-model="selected_patient.M_PatientNote"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap v-show="false">
|
||||
<v-flex xs4 pr-2>
|
||||
<v-text-field
|
||||
label="Catatan FO"
|
||||
outline
|
||||
readonly
|
||||
hide-details
|
||||
v-model="selected_patient.T_OrderHeaderFoNote"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4 pr-2>
|
||||
<v-text-field
|
||||
label="Catatan Sampling"
|
||||
outline
|
||||
readonly
|
||||
hide-details
|
||||
v-model="selected_patient.T_OrderHeaderSamplingNote"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4>
|
||||
<v-text-field
|
||||
label="Catatan Sample Handling"
|
||||
outline
|
||||
readonly
|
||||
hide-details
|
||||
v-model="selected_patient.T_OrderHeaderResultNote"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-btn
|
||||
absolute
|
||||
dark
|
||||
top
|
||||
right
|
||||
color="black"
|
||||
flat
|
||||
depressed
|
||||
@click="detail=!detail"
|
||||
class="btn-detail"
|
||||
>
|
||||
<v-icon>keyboard_arrow_down</v-icon>
|
||||
</v-btn>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.btn-detail {
|
||||
min-width: 0px !important;
|
||||
height: auto;
|
||||
padding: 0px;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
detail: false
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
selected_patient () {
|
||||
return this.$store.state.re_patient.selected_patient
|
||||
},
|
||||
|
||||
order_date() {
|
||||
let d = this.selected_patient.T_OrderHeaderDate
|
||||
let e = ''
|
||||
try {
|
||||
e = d.substr(0,10).split('-').reverse().join('-')
|
||||
} catch(e) { /*console.log(e.message)*/ }
|
||||
|
||||
return e
|
||||
},
|
||||
|
||||
dob_date() {
|
||||
let d = this.selected_patient.M_PatientDOB
|
||||
let e = ''
|
||||
try {
|
||||
e = d.substr(0,10).split('-').reverse().join('-')
|
||||
} catch(e) { /*console.log(e.message)*/ }
|
||||
|
||||
return e
|
||||
},
|
||||
|
||||
age() {
|
||||
let d = this.selected_patient.T_OrderHeaderM_PatientAge
|
||||
let e = ''
|
||||
try {
|
||||
e = d.replace(/tahun/, 'th').replace(/bulan/, 'bl').replace(/hari/, 'hr')
|
||||
} catch(e) { /*console.log(e.message)*/ }
|
||||
|
||||
return e
|
||||
},
|
||||
|
||||
langs() {
|
||||
let x = this.selected_patient
|
||||
if (!x) return ''
|
||||
|
||||
let si_01 = x.T_OrderHeaderLangIsSI == 'Y' ? ' (SI)' : ''
|
||||
let si_02 = x.T_OrderHeaderAddOnSecondLangIsSI == 'Y' ? ' (SI)' : ''
|
||||
|
||||
if (!x.SecondM_LangID) return x.M_LangName + si_01
|
||||
|
||||
return x.M_LangName + si_01 + ', ' + x.SecondM_LangName + si_02
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<!-- <v-subheader>
|
||||
<h3 class="title">DAFTAR PASIEN</h3>
|
||||
</v-subheader> -->
|
||||
<hr style="border-top:0px solid #c8c8c8;" />
|
||||
<v-data-table
|
||||
:headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2 green--text" v-bind:class="[is_selected(props.item), is_cito(props.item)]"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.T_OrderHeaderLabNumber }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="[is_selected(props.item), is_cito(props.item)]"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.M_PatientName }}
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
<!-- <v-pagination
|
||||
v-model="curr_patient_page"
|
||||
:length="total_patient_page"
|
||||
:total-visible="5"
|
||||
@input="change_page"
|
||||
></v-pagination> -->
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "NO LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "70%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
this.$store.commit('re_patient/update_selected_patient', item)
|
||||
this.$store.commit('re_px/update_id', item.T_OrderHeaderID)
|
||||
this.$store.dispatch('re_px/search')
|
||||
this.$store.dispatch('re_patient/info_req')
|
||||
// this.$store.commit('ver_verification/update_selected_sent_sample', item)
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
let x = this.$store.state.re_patient.selected_patient
|
||||
if (!x)
|
||||
return ''
|
||||
|
||||
if (x.T_OrderHeaderID == item.T_OrderHeaderID)
|
||||
return 'green lighten-4'
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
is_cito (item) {
|
||||
let x = this.$store.state.re_patient.selected_patient
|
||||
if (!x)
|
||||
return ''
|
||||
|
||||
if (item.T_OrderHeaderIsCito == "Y")
|
||||
return 'amber'
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
change_page(x) {
|
||||
this.curr_patient_page = x
|
||||
this.$store.dispatch('re_patient/search')
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
patients () {
|
||||
return this.$store.state.re_patient.patients
|
||||
},
|
||||
|
||||
total_patient () {
|
||||
return this.$store.state.re_patient.total_patient
|
||||
},
|
||||
|
||||
total_patient_page () {
|
||||
return this.$store.state.re_patient.total_patient_page
|
||||
},
|
||||
|
||||
curr_patient_page : {
|
||||
get () { return this.$store.state.re_patient.curr_patient_page },
|
||||
set (v) { this.$store.commit('re_patient/update_curr_patient_page', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$store.dispatch('re_patient/search')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,340 @@
|
||||
<template>
|
||||
<v-layout class="fill-height flex-card" column>
|
||||
<v-card class="fill-height">
|
||||
<!-- <v-subheader>
|
||||
<h3 class="title">DAFTAR PASIEN</h3>
|
||||
</v-subheader> -->
|
||||
<hr style="border-top:0px solid #c8c8c8;" />
|
||||
<v-progress-linear :indeterminate="true" class="mt-1 mb-1" v-if="search_status == 1"
|
||||
height="10" striped></v-progress-linear>
|
||||
<v-data-table
|
||||
:headers="headers" :items="pxs"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
|
||||
<template slot="items" slot-scope="props">
|
||||
|
||||
<td class="text-xs-left pt-2 pb-2 pr-2 green--text" v-bind:class="margin_left(props.item)"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'N'" colspan="7">
|
||||
{{ props.item.t_testname }}
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pt-2 pb-2 pr-2 green--text" v-bind:class="margin_left(props.item)"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
{{ props.item.t_testname }}
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'" style="position: relative">
|
||||
|
||||
<v-textarea
|
||||
label=""
|
||||
solo
|
||||
rows=1
|
||||
hide-details
|
||||
v-on:keyup="update_result(props.index, $event.target.value)"
|
||||
:value="props.item.result"
|
||||
v-if="props.item.is_quantitative == 'Y'"
|
||||
auto-grow
|
||||
:readonly="props.item.T_OrderDetailVerification == 'Y'"
|
||||
:flat="props.item.T_OrderDetailVerification == 'Y'"
|
||||
></v-textarea>
|
||||
|
||||
<v-select
|
||||
:items="props.item.template"
|
||||
label=""
|
||||
item-value="T_ResultTemplateValue"
|
||||
item-text="T_ResultTemplateValue"
|
||||
v-if="props.item.is_quantitative == 'N'"
|
||||
solo
|
||||
hide-details
|
||||
:value="props.item.result"
|
||||
@change="update_result(props.index, $event)"
|
||||
:disabled="props.item.T_OrderDetailVerification == 'Y'"
|
||||
>
|
||||
|
||||
|
||||
<template v-slot:append-outer>
|
||||
<v-btn icon dark color="blue" small class="btn-outer ma-0" @click="template_new(props.item)"><v-icon>add_circle</v-icon></v-btn>
|
||||
</template>
|
||||
</v-select>
|
||||
|
||||
<!-- <v-textarea
|
||||
solo
|
||||
hide-details
|
||||
rows="2"
|
||||
:value="props.item.result"
|
||||
@change="update_result(props.index, $event)"
|
||||
>
|
||||
</v-textarea> -->
|
||||
|
||||
<v-btn v-if="props.item.is_quantitative == 'Y' && props.item.result_instrument_n > 0" color="blue lighten-2" class="btn_rerun" icon flat small @click="rerun_me">
|
||||
<v-img :src="icon_info" aspect-ratio="1" height="20" contain></v-img>
|
||||
</v-btn>
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
{{ props.item.normal_note }}
|
||||
<a href="javascript:;" v-show="props.item.normal_note != '' && props.item.normal_note != null" @click="normalChange(props)"><v-icon small color="blue">create</v-icon></a>
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
{{ props.item.unit_name }}
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
{{ props.item.methode_name }}
|
||||
<a href="javascript:;" v-show="props.item.methode_name != '' && props.item.methode_name != null" @click="methodeChange(props)"><v-icon small color="blue">create</v-icon></a>
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
<v-textarea
|
||||
label=""
|
||||
solo
|
||||
rows=1
|
||||
hide-details
|
||||
v-on:keyup="update_note(props.index, $event.target.value)"
|
||||
:value="props.item.note"
|
||||
auto-grow
|
||||
:readonly="props.item.T_OrderDetailVerification == 'Y'"
|
||||
:flat="props.item.T_OrderDetailVerification == 'Y'"
|
||||
></v-textarea>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
|
||||
</v-card>
|
||||
|
||||
<one-process-re-rerun-result></one-process-re-rerun-result>
|
||||
<one-process-re-history></one-process-re-history>
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
:timeout="5000"
|
||||
bottom right
|
||||
>
|
||||
{{ save_text }}
|
||||
<v-btn
|
||||
color="pink"
|
||||
flat
|
||||
@click="snackbar = false"
|
||||
>
|
||||
Close
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
|
||||
<one-dialog-template>
|
||||
</one-dialog-template>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.btn_rerun {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 2px
|
||||
}
|
||||
|
||||
.flex-card {
|
||||
min-height: -webkit-min-content;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.v-text-field.v-text-field--solo .v-input__control {
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.v-textarea.v-text-field--box.v-text-field--single-line .v-text-field__prefix, .v-textarea.v-text-field--box.v-text-field--single-line textarea, .v-textarea.v-text-field--enclosed.v-text-field--single-line .v-text-field__prefix, .v-textarea.v-text-field--enclosed.v-text-field--single-line textarea {
|
||||
margin-top: 6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-process-re-rerun-result': httpVueLoader('./oneProcessReRerunResult.vue'),
|
||||
'one-process-re-history': httpVueLoader('./oneProcessReHistory.vue'),
|
||||
'one-dialog-template': httpVueLoader('./oneProcessReDialogResultTemplateNew.vue')
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
save_text: "Data telah tersimpan.",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "NAMA PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "HASIL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "FLAG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NILAI NORMAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "UNIT",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "METODE",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "CATATAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
computed : {
|
||||
pxs () {
|
||||
return this.$store.state.re_px.pxs
|
||||
},
|
||||
|
||||
icon_info () {
|
||||
return window.BASE_URL + '/one-ui/apps/image/info.png'
|
||||
},
|
||||
|
||||
snackbar : {
|
||||
get () { return this.$store.state.re_px.snackbar },
|
||||
set (v) { this.$store.commit('re_px/update_snackbar', v) }
|
||||
},
|
||||
|
||||
search_status () {
|
||||
return this.$store.state.re_px.search_status
|
||||
},
|
||||
|
||||
selected_px () {
|
||||
return this.$store.state.re_px.selected_px
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (idx, item) {
|
||||
this.$store.commit('re_px/update_selected_px', item)
|
||||
this.$store.commit('re_px/update_selected_px_idx', idx)
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
margin_left (item) {
|
||||
if (item.level == 2)
|
||||
return 'pl-4'
|
||||
|
||||
if (item.level == 3)
|
||||
return 'pl-5'
|
||||
|
||||
return 'pl-2'
|
||||
},
|
||||
|
||||
rerun_me () {
|
||||
this.$store.commit('re_px/update_dialog_rerun', true)
|
||||
},
|
||||
|
||||
update_result(idx, result) {
|
||||
let x = this.$store.state.re_px.pxs
|
||||
x[idx]['result'] = result
|
||||
|
||||
this.$store.commit('re_px/update_pxs', {records:x})
|
||||
},
|
||||
|
||||
update_note(idx, note) {
|
||||
|
||||
let x = this.$store.state.re_px.pxs
|
||||
x[idx]['note'] = note
|
||||
|
||||
this.$store.commit('re_px/update_pxs', {records:x})
|
||||
},
|
||||
|
||||
template_new(item) {
|
||||
this.$store.commit('re_px/update_selected_px', item)
|
||||
this.$store.commit('re_px/update_dialog_template_new', true)
|
||||
},
|
||||
|
||||
methodeChange(d) {
|
||||
this.select(d.index, d.item)
|
||||
this.$store.commit('normal_method/update_nattest_id', d.item.nattest_id)
|
||||
this.$store.commit('normal_method/update_id', d.item.id)
|
||||
this.$store.commit('normal_method/update_dialog_method', true)
|
||||
},
|
||||
|
||||
normalChange(d) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
// this.$store.dispatch('re_patient/search')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
persistent
|
||||
max-width="500px"
|
||||
transition="dialog-transition"
|
||||
>
|
||||
|
||||
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<v-card-text>
|
||||
<v-data-table
|
||||
:headers="headers" :items="reruns"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2 green--text" v-bind:class="is_selected(props.item)">
|
||||
{{ props.item.order_date }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)">
|
||||
{{ props.item.instrument_name }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)">
|
||||
{{ props.item.result }}
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)">
|
||||
<v-btn flat icon color="green" @click="select(props.item)">
|
||||
<v-icon>get_app</v-icon>
|
||||
</v-btn>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="dialog = false">Tutup</v-btn>
|
||||
<!-- <v-btn color="blue darken-1" :dark="btn_save_enabled" @click="save" :disabled="!btn_save_enabled">Simpan</v-btn> -->
|
||||
</v-card-actions>
|
||||
|
||||
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "TANGGAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "ALAT",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "35%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "HASIL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "40%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "5%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
this.$store.commit('re_px/update_selected_rerun', item)
|
||||
this.$store.commit('re_px/update_dialog_rerun', false)
|
||||
|
||||
let x = this.$store.state.re_px.pxs
|
||||
x[this.$store.state.re_px.selected_px_idx]['result'] = item.result
|
||||
this.$store.commit('re_px/update_pxs', {records:x})
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
// let x = this.$store.state.re_patient.selected_patient
|
||||
// if (!x)
|
||||
// return ''
|
||||
|
||||
// if (x.T_OrderHeaderID == item.T_OrderHeaderID)
|
||||
// return 'green lighten-4'
|
||||
|
||||
return ''
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
reruns () {
|
||||
return this.$store.state.re_px.reruns
|
||||
},
|
||||
|
||||
dialog : {
|
||||
get () { return this.$store.state.re_px.dialog_rerun },
|
||||
set (v) { this.$store.commit('re_px/update_dialog_rerun', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
// this.$store.dispatch('re_px/search_rerun')
|
||||
},
|
||||
|
||||
watch : {
|
||||
dialog(n, o) {
|
||||
if (n && !o) {
|
||||
this.$store.dispatch('re_px/search_rerun')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
max-width="400px"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-text>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
label="Keterangan Hasil"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
computed : {
|
||||
dialog : {
|
||||
get() {
|
||||
return this.$store.state.re_px.dialog_template_new
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('re_px/update_dialog_template_new', v)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
max-width="500px"
|
||||
>
|
||||
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
|
||||
computed : {
|
||||
dialog : {
|
||||
get () { return this.$store.state.re_patient.dialog_note },
|
||||
set (v) { this.$store.commit('re_patient/update_dialog_note', v) }
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<v-subheader>
|
||||
<h3 class="title">DAFTAR PASIEN</h3>
|
||||
</v-subheader>
|
||||
<hr style="border-top:0px solid #c8c8c8;" />
|
||||
<v-data-table
|
||||
:headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.T_OrderHeaderLabNumber }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.M_PatientName }}
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "NO LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
// this.$store.commit('ver_verification/update_selected_sent_sample', item)
|
||||
},
|
||||
|
||||
remove (item) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
patients () {
|
||||
return this.$store.state.re_patient.patients
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<v-menu
|
||||
v-model="menu2"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
full-width
|
||||
max-width="290px"
|
||||
min-width="290px"
|
||||
>
|
||||
<v-text-field
|
||||
slot="activator"
|
||||
v-model="computedDateFormatted"
|
||||
:label=init_label
|
||||
hint="DD-MM-YYYY format"
|
||||
persistent-hint
|
||||
readonly
|
||||
solo
|
||||
hide-details
|
||||
class="ma-1"
|
||||
></v-text-field>
|
||||
<v-date-picker v-model="init_date" no-title @input="menu2 = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props : ['label', 'date', 'data'],
|
||||
|
||||
data () {
|
||||
return {
|
||||
init_date: this.date ? this.date : new Date().toISOString().substr(0, 10),
|
||||
dateFormatted: this.formatDate(new Date().toISOString().substr(0, 10)),
|
||||
menu1: false,
|
||||
menu2: false,
|
||||
|
||||
init_label: this.label ? this.label : 'Date',
|
||||
init_data: this.data ? this.data : ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
computedDateFormatted () {
|
||||
return this.formatDate(this.init_date)
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
init_date (n, o) {
|
||||
this.dateFormatted = this.formatDate(this.init_date)
|
||||
|
||||
this.$emit('change', {"old_date":o, "new_date":n, "data":this.init_data});
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
formatDate (date) {
|
||||
if (!date) return null
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
parseDate (date) {
|
||||
if (!date) return null
|
||||
const [month, day, year] = date.split('/')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
|
||||
emitChange (n, o) {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
90
process/one-process-resultentry-px/components/onePxList.vue
Normal file
90
process/one-process-resultentry-px/components/onePxList.vue
Normal file
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<hr style="border-top:0px solid #c8c8c8;" />
|
||||
<v-data-table
|
||||
:headers="headers" :items="pxs"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2 " :class="getClass(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.Nat_TestCode}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" :class="getClass(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.Nat_TestName}}
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
td.selected {
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "KODE",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "70%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
select (item) {
|
||||
this.$store.commit("list_px/update_selected_px",item)
|
||||
let sdate = this.$store.state.search_box.sdate
|
||||
let prm = { nat_test_id : item.Nat_TestID, sdate: sdate , token: window.one_token() }
|
||||
this.$store.dispatch("list_px/search_order",prm)
|
||||
},
|
||||
getClass(item) {
|
||||
let cls={ 'amber lighten-4' : false }
|
||||
if (item.Nat_TestID == this.$store.state.list_px.selected_px.Nat_TestID ) {
|
||||
cls = { 'amber lighten-4' : true }
|
||||
}
|
||||
return cls
|
||||
},
|
||||
},
|
||||
computed : {
|
||||
pxs() {
|
||||
return this.$store.state.search_box.pxs
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("search_box/search_px")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
202
process/one-process-resultentry-px/components/oneResultList.vue
Normal file
202
process/one-process-resultentry-px/components/oneResultList.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<hr style="border-top:0px solid #c8c8c8;" />
|
||||
<v-data-table
|
||||
:headers="headers" :items="orders"
|
||||
:loading="isLoading"
|
||||
hide-actions class="tblresult xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pl-2 pa-1" :class="getClass(props.item)"
|
||||
>
|
||||
{{ short_name(props.item.M_PatientName) }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-1" :class="getClass(props.item)"
|
||||
>
|
||||
{{ props.item.T_OrderHeaderLabNumber}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-1" :class="getClass(props.item)" >
|
||||
<v-textarea
|
||||
style="text-align:right"
|
||||
label=""
|
||||
solo
|
||||
rows=1
|
||||
hide-details
|
||||
class="text_on_right"
|
||||
:value="props.item.T_OrderDetailResult"
|
||||
v-on:keyup="doChange($event.target.value,props.item)"
|
||||
v-if="props.item.T_TestIsQuantitative == 'Y' && isShowResult(props.item) "
|
||||
auto-grow
|
||||
:readonly="props.item.T_OrderDetailVerification == 'Y'"
|
||||
:flat="props.item.T_OrderDetailVerification == 'Y'"
|
||||
></v-textarea>
|
||||
<v-select
|
||||
:items="props.item.template"
|
||||
label=""
|
||||
item-value="T_ResultTemplateValue"
|
||||
item-text="T_ResultTemplateValue"
|
||||
v-if="props.item.is_quantitative == 'N' && isShowResult(props.item) "
|
||||
solo
|
||||
hide-details
|
||||
:value="props.item.T_OrderDetailResult"
|
||||
:disabled="props.item.T_OrderDetailVerification == 'Y'"
|
||||
></v-select>
|
||||
<span class="d_right" :class="getResultClass(props.item)">
|
||||
{{ labelResult(props.item) }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-xs-left pa-1" :class="getClass(props.item)"
|
||||
>
|
||||
{{ props.item.Nat_UnitName}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-1 " :class="getClass(props.item)"
|
||||
>
|
||||
{{ props.item.T_OrderDetailNormalValueNote}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-1 " :class="getClass(props.item)"
|
||||
>
|
||||
{{ props.item.T_OrderDetailNote}}
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
span.d_right {
|
||||
display:inline-block;
|
||||
width:100%;
|
||||
padding-right:15px;
|
||||
text-align:right;
|
||||
}
|
||||
.text_on_right textarea {
|
||||
text-align:right;
|
||||
}
|
||||
td.selected {
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "Nama",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "No Reg",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "Hasil",
|
||||
align: "right",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "Unit",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "Nilai Normal",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "Catatan",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
doChange(v,item) {
|
||||
let orders = this.$store.state.list_px.orders
|
||||
let idx = _.findIndex(orders,function(order) { return order.T_OrderDetailID == item.T_OrderDetailID })
|
||||
if (idx > -1) {
|
||||
orders[idx].T_OrderDetailResult = v
|
||||
this.$store.commit("list_px/update_orders",orders)
|
||||
}
|
||||
},
|
||||
getResultClass(it) {
|
||||
return {}
|
||||
if (it.SampleStatus == "OK") {
|
||||
if (it.T_OrderSampleWorklistReceive== 'N') return {};
|
||||
if (it.IsPreAnalytic == "N") return {"red--text":true};
|
||||
return {};
|
||||
}
|
||||
if (it.IsPreAnalytic == "N") return {"red--text":true};
|
||||
},
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
short_name(p) {
|
||||
if (p.length > 20) return p.substr(0,20) + '...'
|
||||
return p
|
||||
},
|
||||
getClass(item) {
|
||||
let cls={ 'amber lighten-4' : false }
|
||||
if (item.Nat_TestID == this.$store.state.list_px.selected_px.Nat_TestID ) {
|
||||
cls = { 'amber lighten-4' : true }
|
||||
}
|
||||
return cls
|
||||
},
|
||||
isShowResult(it) {
|
||||
if (it.SampleStatus == "OK") {
|
||||
if (it.T_OrderSampleWorklistReceive== 'N') return false;
|
||||
if (it.IsPreAnalytic == "N") return false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
labelResult(it) {
|
||||
if (it.SampleStatus != "OK") return it.SampleStatus;
|
||||
if (it.IsPreAnalytic == "N" ) return "Belum Pre-Analytic";
|
||||
if (it.T_OrderSampleWorklistReceive == "N") return it.T_OrderDetailResult;
|
||||
return "";
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
orders() {
|
||||
return this.$store.state.list_px.orders
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("list_px/search_order")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
150
process/one-process-resultentry-px/components/oneSearchBox.vue
Normal file
150
process/one-process-resultentry-px/components/oneSearchBox.vue
Normal file
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<v-card class="mb-1 pa-1">
|
||||
<v-layout row>
|
||||
<v-flex xs4>
|
||||
<v-layout>
|
||||
<one-date-picker
|
||||
label="Tanggal"
|
||||
:date="sdate"
|
||||
data="0"
|
||||
@change="changeDate"
|
||||
></one-date-picker>
|
||||
<v-text-field class="flex xs8 ma-1"
|
||||
label=""
|
||||
placeholder="Pemeriksaan"
|
||||
single-line
|
||||
solo
|
||||
hide-details
|
||||
v-model="search"
|
||||
@keyup.enter="keySearch"
|
||||
></v-text-field>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3 pt-1 pl-2>
|
||||
<v-select
|
||||
:items="groups"
|
||||
v-model="selected_group"
|
||||
item-text="group_name"
|
||||
item-value="group_id"
|
||||
label="Grup Pemeriksaan"
|
||||
return-object
|
||||
solo
|
||||
hide-details
|
||||
@change="changeGroup"
|
||||
clearable
|
||||
></v-select>
|
||||
</v-flex>
|
||||
<v-flex xs2>
|
||||
<v-layout>
|
||||
<v-btn class="btn-search one-btn-icon ma-1" color="success" @click="search_px" >
|
||||
<span class="icon-search"><span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3 class="text-xs-right">
|
||||
<v-btn
|
||||
color="blue"
|
||||
class="white--text ma-1"
|
||||
@click="save_result"
|
||||
>
|
||||
Simpan
|
||||
<v-icon right dark>save_alt</v-icon>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
button {
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.btn-search {
|
||||
font-size: 1.5em
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-date-picker' : httpVueLoader('./oneDatePicker.vue')
|
||||
},
|
||||
computed : {
|
||||
sdate: {
|
||||
get() { return this.$store.state.search_box.sdate }
|
||||
,set(v) { this.$store.commit('search_box/update_sdate',v) }
|
||||
},
|
||||
search:{
|
||||
get() { return this.$store.state.search_box.search}
|
||||
,set(v) { this.$store.commit('search_box/update_search',v) }
|
||||
},
|
||||
groups() {
|
||||
return this.$store.state.search_box.groups
|
||||
},
|
||||
selected_group: {
|
||||
get() { return this.$store.state.search_box.selected_group },
|
||||
set(v) { this.$store.commit('search_box/update_selected_group',v) }
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
changeDate(o) {
|
||||
this.sdate = o.new_date
|
||||
this.search_px()
|
||||
},
|
||||
keySearch(src) {
|
||||
this.search_px()
|
||||
},
|
||||
changeGroup() {
|
||||
let self = this
|
||||
setTimeout( function() {
|
||||
self.search_px()
|
||||
},1)
|
||||
},
|
||||
async search_px() {
|
||||
let sel_group = this.$store.state.search_box.selected_group
|
||||
let group_id =0
|
||||
if (sel_group != undefined && sel_group.group_id != undefined) group_id = sel_group.group_id
|
||||
let search = this.$store.state.search_box.search
|
||||
let sdate= this.$store.state.search_box.sdate
|
||||
|
||||
|
||||
this.$store.commit("list_px/update_selected_px",{})
|
||||
this.$store.commit("list_px/update_orders",[])
|
||||
let prm = { group_id : group_id , search : search, sdate: sdate, token: window.one_token() }
|
||||
await this.$store.dispatch("search_box/search_px", prm)
|
||||
let pxs = this.$store.state.search_box.pxs
|
||||
if (pxs.length > 0 ) {
|
||||
this.$store.commit("list_px/update_selected_px",pxs[0])
|
||||
let sdate = this.$store.state.search_box.sdate
|
||||
let prm = { nat_test_id : pxs[0].Nat_TestID, sdate: sdate , token: window.one_token() }
|
||||
this.$store.dispatch("list_px/search_order",prm)
|
||||
}
|
||||
},
|
||||
async save_result() {
|
||||
// list change
|
||||
let orders = this.$store.state.list_px.orders
|
||||
let upd_order = _.filter(orders, function(it) {
|
||||
if (it.OriginalResult == null && (it.T_OrderDetailResult == "" || it.T_OrderDetailResult == null) ) return false
|
||||
return it.T_OrderDetailResult != it.OriginalResult
|
||||
})
|
||||
if ( upd_order ) {
|
||||
let prm = { orders : upd_order , token: window.one_token() }
|
||||
await this.$store.dispatch("list_order/save",prm)
|
||||
let msg = _.map(upd_order,"T_OrderHeaderLabNumber").join(", ")
|
||||
msg = 'Hasil <b>' + this.$store.state.list_px.selected_px.Nat_TestName + '</b> untuk No Reg. <b>' + msg +
|
||||
' </b>sudah di simpan'
|
||||
this.$store.commit("list_order/update_snackbar_info",msg)
|
||||
this.$store.commit("list_order/update_snackbar",true)
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.$store.dispatch('search_box/search_group')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
122
process/one-process-resultentry-px/index.php
Normal file
122
process/one-process-resultentry-px/index.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>One</title>
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/google-fonts.css">
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<one-navbar></one-navbar>
|
||||
<v-content class="blue lighten-5" >
|
||||
<v-container fluid pt-2 pb-2 pl-1 pr-1 fill-height>
|
||||
<v-layout column fill-height>
|
||||
<v-flex class="fixed-search">
|
||||
<one-search-box></one-search-box>
|
||||
</v-flex>
|
||||
<v-flex fill-height class="mt-6">
|
||||
<v-layout fill-height>
|
||||
<v-flex xs3 pr-1>
|
||||
<one-px-list></one-px-list>
|
||||
</v-flex>
|
||||
<v-flex xs9 pl-1 fill-height>
|
||||
<one-result-list></one-result-list>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-flex>
|
||||
</v-layout>
|
||||
<v-snackbar v-model="snackbar" :multi-line="true" class="box-info black--text" :timeout="3000" >
|
||||
<span v-html="snackbar_info"></span>
|
||||
</v-snackbar>
|
||||
</v-container>
|
||||
</v-content>
|
||||
<one-footer> </one-footer>
|
||||
</v-app>
|
||||
</div>
|
||||
|
||||
<!-- Vendor -->
|
||||
<script src="../../libs/vendor/axios.min.js"></script>
|
||||
<script src="../../libs/vendor/moment.min.js"></script>
|
||||
<script src="../../libs/vendor/moment-locale-id.js"></script>
|
||||
<script src="../../libs/vendor/lodash.js"></script>
|
||||
<script src="../../libs/vendor/vue.js"></script>
|
||||
<script src="../../libs/vendor/vuex.js"></script>
|
||||
<script src="../../libs/vendor/vuetify.js"></script>
|
||||
<script src="../../libs/vendor/httpVueLoader.js"></script>
|
||||
<script src="../../libs/one_global.js"></script>
|
||||
<!-- App Script -->
|
||||
<?php
|
||||
$ts = "?ts=" . Date("ymdhis");
|
||||
?>
|
||||
|
||||
<style scoped>
|
||||
.flex-0 {
|
||||
flex: 0 !important;
|
||||
}
|
||||
|
||||
.flex-1 {
|
||||
flex: 1 !important;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.fixed-search {
|
||||
position: fixed;
|
||||
top: 68px;
|
||||
left: 4px;
|
||||
right: 4px;
|
||||
z-index: 7;
|
||||
}
|
||||
|
||||
.fixed-search .v-card {
|
||||
|
||||
}
|
||||
|
||||
.mt-6 {
|
||||
margin-top: 66px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="module">
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../apps/components/oneNavbarComponent.vue'),
|
||||
'one-footer': httpVueLoader('../../apps/components/oneFooter.vue'),
|
||||
'one-search-box': httpVueLoader('./components/oneSearchBox.vue'),
|
||||
'one-px-list': httpVueLoader('./components/onePxList.vue'),
|
||||
'one-result-list': httpVueLoader('./components/oneResultList.vue'),
|
||||
},
|
||||
computed : {
|
||||
snackbar : {
|
||||
get() {return this.$store.state.list_order.snackbar},
|
||||
set(v){ this.$store.commit("list_order/update_snackbar",v) }
|
||||
},
|
||||
snackbar_info() {
|
||||
return this.$store.state.list_order.snackbar_info
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.box-info .v-snack__content {
|
||||
background-color : rgb(255, 230, 255);
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,95 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/re_history.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
order_id:0,
|
||||
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
|
||||
// HISTORY
|
||||
total_px: 0,
|
||||
pxs: [{
|
||||
date: '2019-07-07',
|
||||
data: [
|
||||
{px_name: 'Hematologi Rutin', is_result: 'N', result: '', flag: '', level:1},
|
||||
{px_name: 'Trombosit', is_result: 'Y', result: '300', flag: 'H', level:2},
|
||||
{px_name: 'Leukosit', is_result: 'Y', result: '100', flag: '', level:2},
|
||||
{px_name: 'Hemoglobin', is_result: 'Y', result: '105', flag: '', level:2} ]
|
||||
},
|
||||
{
|
||||
date: '2019-06-07',
|
||||
data: [
|
||||
{px_name: 'SGOT', is_result: 'Y', result: '230', flag: '', level:1},
|
||||
{px_name: 'SGPT', is_result: 'Y', result: '320', flag: 'H', level:1} ]
|
||||
}],
|
||||
selected_px: {},
|
||||
selected_px_idx: 0,
|
||||
|
||||
dialog_history: false
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
|
||||
update_id(state, id) {
|
||||
state.order_id = id
|
||||
},
|
||||
|
||||
update_pxs(state, pxs) {
|
||||
state.pxs = pxs.records
|
||||
},
|
||||
|
||||
update_selected_px(state, px) {
|
||||
state.selected_px = px
|
||||
},
|
||||
|
||||
update_selected_px_idx(state, idx) {
|
||||
state.selected_px_idx = idx
|
||||
},
|
||||
|
||||
update_dialog_history(state, v) {
|
||||
state.dialog_history = v
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async history(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.history(one_token(), context.rootState.re_patient.selected_patient.T_OrderHeaderID)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.commit('update_pxs', {
|
||||
records: resp.data
|
||||
})
|
||||
|
||||
console.log(resp)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/re_normal_method.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
order_id: 0,
|
||||
nattest_id: 0,
|
||||
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
|
||||
methods: [],
|
||||
selected_method: null,
|
||||
normals: [],
|
||||
selected_normal: null,
|
||||
|
||||
dialog_method: false,
|
||||
dialog_normal: false
|
||||
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
|
||||
update_id(state, id) {
|
||||
state.order_id = id
|
||||
},
|
||||
|
||||
update_nattest_id(state, id) {
|
||||
state.nattest_id = id
|
||||
},
|
||||
|
||||
update_methods(state, d) {
|
||||
state.methods = d.records
|
||||
},
|
||||
|
||||
update_selected_method(state, d) {
|
||||
state.selected_method = d
|
||||
},
|
||||
|
||||
update_normals(state, d) {
|
||||
state.normals = d.records
|
||||
},
|
||||
|
||||
update_selected_normal(state, d) {
|
||||
state.selected_normal = d
|
||||
},
|
||||
|
||||
update_dialog_method(state, v) {
|
||||
state.dialog_method = v
|
||||
},
|
||||
|
||||
update_dialog_normal(state, v) {
|
||||
state.dialog_normal = v
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search_method(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
|
||||
let resp = await api.search_method(one_token(), context.state.nattest_id)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status", 2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
let data = {
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_methods", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async save_method(context) {
|
||||
try {
|
||||
|
||||
let resp = await api.save_method(one_token(), context.state.order_id, context.state.selected_method.Nat_MethodeID)
|
||||
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.rootState.re_px.selected_px
|
||||
x.methode_id = resp.data.data.method_id
|
||||
x.methode_name = resp.data.data.method_name
|
||||
x.normal_id = resp.data.data.normal_id
|
||||
x.normal_note = resp.data.data.normal_note
|
||||
context.commit('re_px/update_selected_px', x, {root:true})
|
||||
context.commit("update_dialog_method", false)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
212
process/one-process-resultentry-px/modules/__old/re_patient.js
Normal file
212
process/one-process-resultentry-px/modules/__old/re_patient.js
Normal file
@@ -0,0 +1,212 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/re_patient.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
order_id:0,
|
||||
search: '',
|
||||
nolab: '',
|
||||
sdate: new Date().toISOString().substr(0, 10),
|
||||
edate: null,
|
||||
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
|
||||
patients: [],
|
||||
total_patient: 0,
|
||||
total_patient_page: 0,
|
||||
curr_patient_page: 1,
|
||||
selected_patient: { },
|
||||
|
||||
|
||||
// PX
|
||||
total_px: 0,
|
||||
pxs: [],
|
||||
|
||||
langs: [],
|
||||
lang_code: "ID",
|
||||
lang_id: 0,
|
||||
lang_si: "N",
|
||||
|
||||
dialog_req: false,
|
||||
dialog_note: false,
|
||||
result_note: '',
|
||||
info_req: {req_fo:[],req_spec_col:[],req_spec_ver:[],req_samp_ver:[],req_pre_an:[]}
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
|
||||
update_nolab(state, val) {
|
||||
state.nolab = val
|
||||
},
|
||||
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
|
||||
update_patients(state, data) {
|
||||
state.patients= data.records
|
||||
state.total_patient = data.total
|
||||
state.total_patient_page = data.total_page
|
||||
},
|
||||
|
||||
update_curr_patient_page(state, data) {
|
||||
state.curr_patient_page = data
|
||||
},
|
||||
|
||||
update_selected_patient(state,val) {
|
||||
state.selected_patient = val
|
||||
state.langs = val.lang
|
||||
|
||||
state.lang_code = val.lang[0].code
|
||||
state.lang_id = val.lang[0].id
|
||||
state.lang_si = val.lang[0].is_si
|
||||
|
||||
state.result_note = val.T_OrderHeaderResultNote
|
||||
},
|
||||
|
||||
update_id(state, id) {
|
||||
state.order_id = id
|
||||
},
|
||||
|
||||
update_pxs(state, pxs) {
|
||||
state.pxs = pxs.records
|
||||
},
|
||||
|
||||
update_sdate(state, date) {
|
||||
state.sdate = date
|
||||
},
|
||||
|
||||
update_edate(state, date) {
|
||||
state.edate = date
|
||||
},
|
||||
|
||||
update_lang(state, lang) {
|
||||
state.lang_code = lang.code
|
||||
state.lang_id = lang.id
|
||||
state.lang_si = lang.is_si
|
||||
},
|
||||
|
||||
update_dialog_note(state, v) {
|
||||
state.dialog_note = v
|
||||
},
|
||||
|
||||
update_result_note(state, v) {
|
||||
state.result_note = v
|
||||
},
|
||||
|
||||
update_info_req(state, v) {
|
||||
state.info_req = v
|
||||
},
|
||||
|
||||
update_dialog_req(state, v) {
|
||||
state.dialog_req = v
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search(one_token(), context.state.sdate, context.state.search, context.state.curr_patient_page)
|
||||
|
||||
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,
|
||||
total_page: resp.data.total_page
|
||||
}
|
||||
context.commit("update_patients", data)
|
||||
|
||||
if (data.records.length < 1) {
|
||||
context.commit('update_selected_patient', null)
|
||||
context.commit('re_px/update_pxs', [], {root:true})
|
||||
}
|
||||
else {
|
||||
context.commit('update_selected_patient', data.records[0])
|
||||
context.commit('re_px/update_id', data.records[0].T_OrderHeaderID, {root:true})
|
||||
context.dispatch('re_px/search', null, {root:true})
|
||||
|
||||
context.dispatch('info_req')
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async save_note(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.save_note(one_token(), context.state.selected_patient.T_OrderHeaderID, context.state.result_note)
|
||||
|
||||
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","")
|
||||
console.log(resp)
|
||||
|
||||
context.commit('update_dialog_note', false)
|
||||
let x = context.state.selected_patient
|
||||
let y = context.state.patients
|
||||
for (let i in y)
|
||||
if (x.T_OrderHeaderID == y[i].T_OrderHeaderID)
|
||||
y[i].T_OrderHeaderResultNote = context.state.result_note
|
||||
|
||||
context.commit("update_patients", {
|
||||
records : y,
|
||||
total: context.state.total_patient,
|
||||
total_page: context.state.total_patient_page
|
||||
})
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async info_req(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.info_req(one_token(), context.state.selected_patient.T_OrderHeaderID)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.commit('update_info_req', resp.data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
269
process/one-process-resultentry-px/modules/__old/re_px.js
Normal file
269
process/one-process-resultentry-px/modules/__old/re_px.js
Normal file
@@ -0,0 +1,269 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/re_px.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
order_id:0,
|
||||
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
|
||||
// PX
|
||||
total_px: 0,
|
||||
pxs: [],
|
||||
selected_px: {},
|
||||
selected_px_idx: 0,
|
||||
|
||||
// template
|
||||
dialog_template_new: false,
|
||||
template_new_value: "",
|
||||
dup_template_error: {status:false, messages:''},
|
||||
|
||||
groups: [{group_id:'1', group_name:'DUMMY - KIMIA'}, {group_id:'2', group_name:'DUMMY - HEMATOLOGI'}],
|
||||
selected_group: {},
|
||||
|
||||
reruns: [{date:'2019-07-10 08:00', instrument:'COBAS', result:'56'}, {date:'2019-07-10 08:20', instrument:'COBAS', result:'68'}],
|
||||
selected_rerun: {},
|
||||
dialog_rerun: false,
|
||||
snackbar: false
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
|
||||
update_id(state, id) {
|
||||
state.order_id = id
|
||||
},
|
||||
|
||||
update_pxs(state, pxs) {
|
||||
state.pxs = pxs.records
|
||||
},
|
||||
|
||||
update_selected_px(state, px) {
|
||||
state.selected_px = px
|
||||
},
|
||||
|
||||
update_selected_px_idx(state, idx) {
|
||||
state.selected_px_idx = idx
|
||||
},
|
||||
|
||||
update_selected_group(state, group) {
|
||||
state.selected_group = group
|
||||
},
|
||||
|
||||
update_dialog_rerun(state, v) {
|
||||
state.dialog_rerun = v
|
||||
},
|
||||
|
||||
update_reruns(state, reruns) {
|
||||
state.reruns = reruns.records
|
||||
},
|
||||
|
||||
update_selected_rerun(state, rerun) {
|
||||
state.selected_rerun = rerun
|
||||
},
|
||||
|
||||
update_snackbar(state, v) {
|
||||
state.snackbar = v
|
||||
},
|
||||
|
||||
update_dialog_template_new(state, v) {
|
||||
state.dialog_template_new = v
|
||||
},
|
||||
|
||||
update_template_new_value(state, v) {
|
||||
state.template_new_value = v
|
||||
},
|
||||
|
||||
update_dup_template_error(state, v) {
|
||||
state.dup_template_error = v
|
||||
},
|
||||
|
||||
update_groups(state, v) {
|
||||
state.groups = v.records
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let g_id = 0
|
||||
if (context.state.selected_group)
|
||||
g_id = context.state.selected_group.group_id
|
||||
let resp= await api.search(one_token(), context.state.order_id,
|
||||
context.rootState.re_patient.lang_id,
|
||||
context.rootState.re_patient.lang_si,
|
||||
g_id)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status", 2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_pxs", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async save(context) {
|
||||
let data = []
|
||||
let x = context.state.pxs
|
||||
for (let i in x) {
|
||||
let y = x[i]
|
||||
if ((y.result != null && y.result != y.result_old) || (y.note != y.note_old))
|
||||
data.push({id:y.id, result:y.result, note:y.note, test_id:y.t_testid, test_name:y.t_testname, order_id:context.state.order_id})
|
||||
}
|
||||
|
||||
if (data.length < 1) {
|
||||
alert('Tidak ada data yang perlu disimpan !')
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
let ptn = context.rootState.re_patient
|
||||
let resp= await api.save(one_token(), ptn.lang_id, ptn.lang_si, JSON.stringify(data))
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.dispatch("search")
|
||||
context.commit("update_snackbar", true)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async save_template(context) {
|
||||
|
||||
try {
|
||||
let resp= await api.save_template(one_token(), context.state.selected_px.t_testid, context.state.template_new_value)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
context.commit('update_dup_template_error', {status:true, messages:'Value tersebut sudah ada !'})
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.commit("update_dialog_template_new", false)
|
||||
|
||||
let pxs = context.state.pxs
|
||||
for (let i in pxs) {
|
||||
if (pxs[i].t_testid == context.state.selected_px.t_testid)
|
||||
pxs[i].template = resp.data
|
||||
}
|
||||
|
||||
context.commit('update_dup_template_error', {status:false, messages:''})
|
||||
context.commit('update_pxs', {records:pxs, total:context.state.total_px})
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async lang_export(context) {
|
||||
|
||||
try {
|
||||
let sp = context.rootState.re_patient
|
||||
let resp= await api.lang_export(one_token(), sp.selected_patient.T_OrderHeaderID,
|
||||
sp.lang_id, sp.lang_si)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.dispatch("search")
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search_group(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
|
||||
let resp= await api.search_group()
|
||||
|
||||
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_groups", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search_rerun(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
|
||||
let resp= await api.search_rerun(context.state.selected_px.id)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status", 2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.commit("update_reruns", resp.data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
49
process/one-process-resultentry-px/modules/list_order.js
Normal file
49
process/one-process-resultentry-px/modules/list_order.js
Normal file
@@ -0,0 +1,49 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/list_order.js"
|
||||
window.api = api
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
save_status:0,
|
||||
save_error_message:'',
|
||||
snackbar: false,
|
||||
snackbar_info: ''
|
||||
},
|
||||
mutations: {
|
||||
update_save_error_message(state,status) {
|
||||
state.save_message= status
|
||||
},
|
||||
update_snackbar_info(state,status) {
|
||||
state.snackbar_info= status
|
||||
},
|
||||
update_snackbar(state,status) {
|
||||
state.snackbar= status
|
||||
},
|
||||
update_save(state,status) {
|
||||
state.save= status
|
||||
},
|
||||
update_save_status(state,status) {
|
||||
state.save_status = status
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async save(context,prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp= await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_save_error_message","")
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
context.commit("update_save_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
75
process/one-process-resultentry-px/modules/list_px.js
Normal file
75
process/one-process-resultentry-px/modules/list_px.js
Normal file
@@ -0,0 +1,75 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/list_px.js"
|
||||
window.api = api
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
selected_px: {},
|
||||
orders: [],
|
||||
patients: []
|
||||
},
|
||||
mutations: {
|
||||
update_search_error_message(state,status) {
|
||||
state.search_message= status
|
||||
},
|
||||
update_search(state,status) {
|
||||
state.search= status
|
||||
},
|
||||
update_selected_px(state,val) {
|
||||
state.selected_px= val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_patients(state,status) {
|
||||
state.patients = status
|
||||
},
|
||||
update_orders(state,status) {
|
||||
state.orders= status
|
||||
}
|
||||
|
||||
},
|
||||
actions: {
|
||||
async search_order(context,prm) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search_order(prm)
|
||||
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 = resp.data.records
|
||||
context.commit("update_orders", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async search(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search(one_token())
|
||||
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 = resp.data.records
|
||||
context.commit("update_patients", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
105
process/one-process-resultentry-px/modules/search_box.js
Normal file
105
process/one-process-resultentry-px/modules/search_box.js
Normal file
@@ -0,0 +1,105 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/search_box.js"
|
||||
window.api = api
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search: '',
|
||||
sdate: new Date().toISOString().substr(0, 10),
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
groups: [],
|
||||
selected_group: {},
|
||||
requirements:[],
|
||||
note: '',
|
||||
pxs: []
|
||||
},
|
||||
mutations: {
|
||||
update_search_error_message(state,status) {
|
||||
state.search_message= status
|
||||
},
|
||||
update_search(state,status) {
|
||||
state.search= status
|
||||
},
|
||||
update_sdate(state, val) {
|
||||
state.sdate= val
|
||||
},
|
||||
update_groups(state,val) {
|
||||
state.groups = val
|
||||
},
|
||||
update_pxs(state,val) {
|
||||
state.pxs= val
|
||||
},
|
||||
update_selected_group(state,val) {
|
||||
state.selected_group = val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_dialog_req(state, v) {
|
||||
state.dialog_req = v
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search_group(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search_group(one_token())
|
||||
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 = resp.data.records
|
||||
context.commit("update_groups", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async search_px(context,prm) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search_px(prm)
|
||||
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 = resp.data.records
|
||||
context.commit("update_pxs", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async search(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search(one_token(), context.state.sdate, context.state.search, context.state.curr_patient_page)
|
||||
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,
|
||||
total_page: resp.data.total_page
|
||||
}
|
||||
context.commit("update_pxs", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
26
process/one-process-resultentry-px/store.js
Normal file
26
process/one-process-resultentry-px/store.js
Normal file
@@ -0,0 +1,26 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import system from "../../apps/modules/system/system.js";
|
||||
import search_box from "./modules/search_box.js";
|
||||
import list_px from "./modules/list_px.js";
|
||||
import list_order from "./modules/list_order.js";
|
||||
|
||||
export const store = new Vuex.Store({
|
||||
state : {
|
||||
},
|
||||
mutations : {
|
||||
change_tab(state, tab) {
|
||||
state.tab_active = tab;
|
||||
}
|
||||
},
|
||||
modules : {
|
||||
search_box: search_box,
|
||||
list_px: list_px,
|
||||
list_order: list_order,
|
||||
system: system
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user