C1J0ET - add icd10 stemcell validation
This commit is contained in:
@@ -243,12 +243,12 @@ export async function edit(datas, id) {
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_icd10(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/search_icd10', prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
export async function search_icd10(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/search_icd10', prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
|
||||
@@ -248,24 +248,24 @@
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
|
||||
<!----<v-flex xs12 pa-1>
|
||||
<v-autocomplete
|
||||
label="ICD-10"
|
||||
v-model="selected_icd10"
|
||||
:items="icd10"
|
||||
<v-flex xs12 pa-1>
|
||||
<v-autocomplete
|
||||
label="ICD-10"
|
||||
v-model="selected_icd10"
|
||||
:items="icd10"
|
||||
:search-input.sync="search_icd10"
|
||||
class="pb-2"
|
||||
no-filter
|
||||
:item-text="item => item.code + ' - ' + item.display"
|
||||
item-value="code"
|
||||
return-object
|
||||
:loading="loading_icd10"
|
||||
no-data-text="Ketikkan pencarian ICD-10"
|
||||
clearable
|
||||
>
|
||||
|
||||
</v-autocomplete>
|
||||
</v-flex>-->
|
||||
:loading="loading_icd10"
|
||||
no-data-text="Ketikkan pencarian ICD-10"
|
||||
clearable
|
||||
>
|
||||
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
@@ -425,4 +425,4 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -175,6 +175,18 @@ export default {
|
||||
},
|
||||
actions: {
|
||||
async save(context) {
|
||||
let diagnosa = context.state.diagnosa ? context.state.diagnosa.trim() : ''
|
||||
let selectedIcd10 = context.rootState.patient.selected_icd10 || {}
|
||||
let icd10Code = selectedIcd10.code ? selectedIcd10.code.toString().trim() : ''
|
||||
|
||||
if (!diagnosa && !icd10Code) {
|
||||
context.commit('update_in_saving', false)
|
||||
context.commit('update_loading_process', false)
|
||||
context.commit('update_dialog_loading', false, { root: true })
|
||||
context.commit('update_message_error', 'Diagnosa atau ICD-10 wajib diisi salah satu')
|
||||
context.commit('update_dialog_pop_up_error', true)
|
||||
return
|
||||
}
|
||||
|
||||
var req = [];
|
||||
var detail = [];
|
||||
@@ -224,9 +236,9 @@ export default {
|
||||
prm.selected_patient = context.rootState.patient.selected_patient
|
||||
prm.patient_age = context.rootState.patient.selected_patient.patient_age
|
||||
prm.patient_note = context.state.patient_note
|
||||
prm.diagnosa = context.state.diagnosa
|
||||
prm.diagnosa = diagnosa
|
||||
prm.catatan_fo = context.state.catatan_fo
|
||||
prm.selected_icd10 = context.rootState.patient.selected_icd10
|
||||
prm.selected_icd10 = selectedIcd10
|
||||
prm.selected_doctor = context.rootState.doctor.selected_doctor
|
||||
prm.selected_language = context.rootState.language.selected_language ? context.rootState.language.selected_language.id : 1
|
||||
prm.selected_language_2 = context.rootState.language.selected_language_2 ? context.rootState.language.selected_language_2.id : 0
|
||||
|
||||
@@ -472,9 +472,10 @@ export default {
|
||||
context.commit("update_loading_icd10",false)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
let records = Array.isArray(resp.data) ? resp.data : (resp.data && resp.data.records ? resp.data.records : [])
|
||||
context.commit("update_loading_icd10",false)
|
||||
context.commit("update_search_error_message","")
|
||||
context.commit("update_icd10", resp.data.records)
|
||||
context.commit("update_icd10", records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_loading_icd10",false)
|
||||
|
||||
Reference in New Issue
Block a user