|
@@ -5,16 +5,42 @@ import {getInfos} from '@store/actions/getInfoByUuid';
|
|
|
import {getUrlArgObject,pushAllDataList} from '@utils/tools';
|
|
|
import {getInitModules,getCommonList} from '@store/async-actions/homePage.js';
|
|
|
import store from '@store'
|
|
|
-import {ISREAD,MODI_LOADING} from "../types/homePage";
|
|
|
+import {ISREAD,MODI_LOADING,SETPRE} from "../types/homePage";
|
|
|
import { initItemList } from '@store/async-actions/tabTemplate';
|
|
|
import config from '@config/index';
|
|
|
|
|
|
const api = {
|
|
|
getPatInfo: '/patientInfo/getTopPatientInfo',
|
|
|
getPatBaseInfo: '/patientInfo/getPatientInfo',
|
|
|
- getHospitalInfo:'/hospitalInfo/getHospitalInfo'
|
|
|
+ getHospitalInfo:'/hospitalInfo/getHospitalInfo',
|
|
|
+ getPreMsg:'/api/prec/inquiryInfo/getInquiryDetail'
|
|
|
};
|
|
|
|
|
|
+//获取预问诊信息
|
|
|
+export const getPreMsg = (dispatch, getState) => {
|
|
|
+ // let baseList = getState();
|
|
|
+ // let state = baseList.patInfo.message;
|
|
|
+ json(api.getPreMsg, {
|
|
|
+ "hospitalCode": getUrlArgObject('hospitalId'),
|
|
|
+ "inquiryCode":getUrlArgObject("recordId"),
|
|
|
+ "patientCode": getUrlArgObject("patientNo")
|
|
|
+ },true).then((res) => {
|
|
|
+ const data = res.data;
|
|
|
+ if (data.code == 0) {
|
|
|
+ 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?result.supplement:''
|
|
|
+ }
|
|
|
+ pushAllDataList(1,'push',preIcss,'preIcss');
|
|
|
+ dispatch({type:SETPRE,show:false});
|
|
|
+ } else {
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
//获取医院id
|
|
|
export const initHospitalInfo = (dispatch, getState) => {
|
|
|
let baseList = getState();
|
|
@@ -63,7 +89,12 @@ export const initHistoryDetails = (dispatch) => {
|
|
|
const data = res.data;
|
|
|
if (data.code == 0) {
|
|
|
const detail = data.data;
|
|
|
- pushAllDataList(detail.sign,'push',detail,'history');
|
|
|
+ if(detail.dataJson){
|
|
|
+ pushAllDataList(detail.sign,'push',detail,'history');
|
|
|
+ }else{
|
|
|
+ let pre = baseList.homePage.sysConfig.connect_prec;
|
|
|
+ (pre==1)&&dispatch({type:SETPRE,show:true});
|
|
|
+ }
|
|
|
dispatch({
|
|
|
type:ISREAD
|
|
|
});
|