|
@@ -7,10 +7,12 @@ import store from '@store';
|
|
|
import {fullfillText} from '@common/js/func';
|
|
|
import {getOtherHisRecord,getInitData} from '@store/async-actions/fetchModules.js';
|
|
|
import {initHistoryDetails} from '@store/async-actions/patInfo';
|
|
|
+import {storageLocal} from '@utils/tools';
|
|
|
|
|
|
const api = {
|
|
|
getModules:'/api/icss/moduleInfo/getAll',
|
|
|
- clickCount:'/api/icss/buriedSomeStatistical/saveBuriedSomeStatisticals' //埋点统计
|
|
|
+ clickCount:'/api/icss/buriedSomeStatistical/saveBuriedSomeStatisticals', //埋点统计
|
|
|
+ getChronic:'/api/icss/disType/getDisType' //慢病列表
|
|
|
};
|
|
|
|
|
|
function modulesParseJson(data){
|
|
@@ -27,7 +29,14 @@ function modulesParseJson(data){
|
|
|
export const getInitModules= (dispatch,getStore)=>{
|
|
|
const state = getStore();
|
|
|
const {message} = state.patInfo;
|
|
|
- return json(api.getModules,{age:message.patientAge,sexType:message.sex}).then((res) => {
|
|
|
+ const param = {
|
|
|
+ age:message.patientAge,
|
|
|
+ sexType:message.sex,
|
|
|
+ mouduleType:1,//慢病2 科室1 其他0
|
|
|
+ relationId:message.hospitalDeptId, //慢病id 科室id 其他0
|
|
|
+ }
|
|
|
+ // return json(api.getModules,{age:message.patientAge,sexType:message.sex}).then((res) => {
|
|
|
+ return json(api.getModules,param).then((res) => {
|
|
|
dispatch(initHistoryDetails(message)); //历史病历回读
|
|
|
if (res.data.code == '0') {
|
|
|
const newObj = modulesParseJson(res.data.data);
|
|
@@ -85,4 +94,18 @@ export const saveClickNum = (dispatch,getState)=>{
|
|
|
console.log("埋点请求失败",res);
|
|
|
}
|
|
|
})
|
|
|
+}
|
|
|
+
|
|
|
+// 请求慢病列表
|
|
|
+export const getChronic = (dispatch,getState)=>{
|
|
|
+ return json(api.getChronic,{}).then((res) => {
|
|
|
+ const result = res.data;
|
|
|
+ if (result.code == '0') {
|
|
|
+ console.log("请求成功",result);
|
|
|
+ const chronic = JSON.stringify(result.data.chronic);
|
|
|
+ storageLocal.set('chronic',chronic);
|
|
|
+ }else{
|
|
|
+ console.log("请求失败",res);
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|