|
@@ -20,18 +20,21 @@ const api = {
|
|
|
export const getPreMsg = (dispatch, getState) => {
|
|
|
// let baseList = getState();
|
|
|
// let state = baseList.patInfo.message;
|
|
|
- json('http://192.168.2.121:5050'+api.getPreMsg, {
|
|
|
+ json(api.getPreMsg, {
|
|
|
"hospitalCode": getUrlArgObject('hospitalId'),
|
|
|
"inquiryCode":getUrlArgObject("recordId"),
|
|
|
"patientCode": getUrlArgObject("patientNo")
|
|
|
},true).then((res) => {
|
|
|
const data = res.data;
|
|
|
if (data.code == 0) {
|
|
|
- // dispatch({
|
|
|
- // type: GET_HOSPITAL_MESSAGE,
|
|
|
- // data:data.data.sysSetInfoData||[]
|
|
|
- // });
|
|
|
- console.log(data,77777)
|
|
|
+ let result = data.data;
|
|
|
+ let preIcss = {
|
|
|
+ chief:result.chiefComplaint?new Array(result.chiefComplaint):[],
|
|
|
+ current:result.xbs?new Array(result.xbs):[],
|
|
|
+ other:result.qts?new Array(result.qts):[],
|
|
|
+ checkBody:result.supplement?new Array(result.supplement):[]
|
|
|
+ }
|
|
|
+ pushAllDataList(1,'push',preIcss,'preIcss');
|
|
|
} else {
|
|
|
console.log(res)
|
|
|
}
|
|
@@ -84,9 +87,12 @@ export const initHistoryDetails = (dispatch) => {
|
|
|
}).then((res) => {
|
|
|
const data = res.data;
|
|
|
if (data.code == 0) {
|
|
|
- getPreMsg()
|
|
|
const detail = data.data;
|
|
|
- pushAllDataList(detail.sign,'push',detail,'history');
|
|
|
+ if(detail.dataJson){
|
|
|
+ pushAllDataList(detail.sign,'push',detail,'history');
|
|
|
+ }else{
|
|
|
+ getPreMsg()
|
|
|
+ }
|
|
|
dispatch({
|
|
|
type:ISREAD
|
|
|
});
|