C1J0ET - add icd10 stemcell validation

This commit is contained in:
sas.fajri
2026-06-25 11:16:33 +07:00
parent 46525e5622
commit 6d40e1c7bf
4 changed files with 35 additions and 22 deletions

View File

@@ -245,7 +245,7 @@ export async function edit(datas, id) {
export async function search_icd10(prm) { export async function search_icd10(prm) {
try { try {
var resp = await axios.post(URL + 'patient/search_icd10', prm); var resp = await axios.post(URL + 'order/search_icd10', prm);
if (resp.status != 200) { if (resp.status != 200) {
return { return {
status: "ERR", status: "ERR",

View File

@@ -248,7 +248,7 @@
></v-textarea> ></v-textarea>
</v-flex> </v-flex>
<!----<v-flex xs12 pa-1> <v-flex xs12 pa-1>
<v-autocomplete <v-autocomplete
label="ICD-10" label="ICD-10"
v-model="selected_icd10" v-model="selected_icd10"
@@ -265,7 +265,7 @@
> >
</v-autocomplete> </v-autocomplete>
</v-flex>--> </v-flex>
</v-flex> </v-flex>
</v-layout> </v-layout>

View File

@@ -175,6 +175,18 @@ export default {
}, },
actions: { actions: {
async save(context) { 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 req = [];
var detail = []; var detail = [];
@@ -224,9 +236,9 @@ export default {
prm.selected_patient = context.rootState.patient.selected_patient prm.selected_patient = context.rootState.patient.selected_patient
prm.patient_age = context.rootState.patient.selected_patient.patient_age prm.patient_age = context.rootState.patient.selected_patient.patient_age
prm.patient_note = context.state.patient_note prm.patient_note = context.state.patient_note
prm.diagnosa = context.state.diagnosa prm.diagnosa = diagnosa
prm.catatan_fo = context.state.catatan_fo 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_doctor = context.rootState.doctor.selected_doctor
prm.selected_language = context.rootState.language.selected_language ? context.rootState.language.selected_language.id : 1 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 prm.selected_language_2 = context.rootState.language.selected_language_2 ? context.rootState.language.selected_language_2.id : 0

View File

@@ -472,9 +472,10 @@ export default {
context.commit("update_loading_icd10",false) context.commit("update_loading_icd10",false)
context.commit("update_search_error_message",resp.message) context.commit("update_search_error_message",resp.message)
} else { } 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_loading_icd10",false)
context.commit("update_search_error_message","") context.commit("update_search_error_message","")
context.commit("update_icd10", resp.data.records) context.commit("update_icd10", records)
} }
} catch(e) { } catch(e) {
context.commit("update_loading_icd10",false) context.commit("update_loading_icd10",false)