|
@@ -187,6 +187,8 @@ const getAllDataList =(baseList) =>{ //获取所有模块结构化的
|
|
|
jsonData.checkBodySelecteds = baseList.checkBody.selecteds; //主诉选中状态保存
|
|
|
jsonData.addItems = baseList.homePage.addItems||{};
|
|
|
jsonData.mainsuitIds = baseList.mainSuit.mainIds; //主诉去重
|
|
|
+ jsonData.mainChronicDesease = baseList.mainSuit.chronicDesease; //主诉慢病{}
|
|
|
+ jsonData.diagChronicMagItem = baseList.diagnosticList.chronicMagItem; //诊断慢病{}
|
|
|
jsonData.currentIds = baseList.currentIll.symptomIds; //现病史去重
|
|
|
jsonData.isFirstMainDiag = baseList.treat.isFirstMainDiag; //治疗方案
|
|
|
// console.log(jsonData,'结构化数据获取')
|
|
@@ -256,6 +258,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{ //回读清
|
|
|
data:[],
|
|
|
saveText:'',
|
|
|
mainSuitStr: '',
|
|
|
+ chronicMagItem:{}
|
|
|
});
|
|
|
store.dispatch({
|
|
|
type: CLEAR_ALL_PUSH_MESSAGE,
|
|
@@ -283,6 +286,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{ //回读清
|
|
|
selecteds:dataJson.mainSuitSelecteds?dataJson.mainSuitSelecteds:[],
|
|
|
saveText:JSON.parse(dataJsonStr.chief),
|
|
|
mainIds:dataJson.mainsuitIds?dataJson.mainsuitIds:[],
|
|
|
+ chronicDesease:dataJson.mainChronicDesease,
|
|
|
});
|
|
|
store.dispatch({
|
|
|
type: CLEAR_CURRENT_ILL,
|
|
@@ -320,7 +324,8 @@ const pushAllDataList =(whichSign,action,reData,type) =>{ //回读清
|
|
|
store.dispatch({
|
|
|
type: CLEAR_ALL_DIAG,
|
|
|
data:dataJson.diag,
|
|
|
- saveText:dataJsonStr.diag
|
|
|
+ saveText:dataJsonStr.diag,
|
|
|
+ chronicMagItem:dataJson.diagChronicMagItem
|
|
|
});
|
|
|
store.dispatch({
|
|
|
type: CLEAR_ALL_PUSH_MESSAGE,
|
|
@@ -348,6 +353,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{ //回读清
|
|
|
selecteds:dataJson.mainSuitSelecteds?dataJson.mainSuitSelecteds:[],
|
|
|
saveText:dataJsonStr[0].content ? JSON.parse(dataJsonStr[0].content) :[],
|
|
|
mainIds:dataJson.mainsuitIds?dataJson.mainsuitIds:[],
|
|
|
+ chronicDesease:dataJson.mainChronicDesease,
|
|
|
});
|
|
|
store.dispatch({
|
|
|
type: CLEAR_CURRENT_ILL,
|
|
@@ -388,7 +394,8 @@ const pushAllDataList =(whichSign,action,reData,type) =>{ //回读清
|
|
|
store.dispatch({
|
|
|
type: CLEAR_ALL_DIAG,
|
|
|
data:dataJson.diag,
|
|
|
- saveText:dataJsonStr[6].content ? dataJsonStr[6].content:''
|
|
|
+ saveText:dataJsonStr[6].content ? dataJsonStr[6].content:'',
|
|
|
+ chronicMagItem:dataJson.diagChronicMagItem
|
|
|
});
|
|
|
store.dispatch({
|
|
|
type: CLEAR_ALL_PUSH_MESSAGE,
|
|
@@ -648,7 +655,8 @@ function getEMRParams(){
|
|
|
diseaeId = [];
|
|
|
const age = message.patientAge;
|
|
|
const sex = message.sex;
|
|
|
- return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age};
|
|
|
+ const patientId = message.patientId //病人id,取上次用药
|
|
|
+ return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId};
|
|
|
};
|
|
|
|
|
|
function didPushParamChange(){
|
|
@@ -764,36 +772,48 @@ function getPageLength(event) { //兼容ie8获取页面距离左和上的距
|
|
|
return page;
|
|
|
}
|
|
|
function dragBox(domWrap,domDrag){
|
|
|
+ console.log(domWrap,domDrag,'拖拽')
|
|
|
let drag = document.getElementById(domDrag);//拖拽区域
|
|
|
let wrap = document.getElementById(domWrap);//被拖拽的元素
|
|
|
+ let wrapHeight = wrap.offsetHeight;//被拖拽的元素高度
|
|
|
+ let wrapWidth = wrap.offsetWidth;//被拖拽的元素高度
|
|
|
let width = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;//屏幕宽度
|
|
|
let height = window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;//屏幕高度
|
|
|
let mouseX = 0,mouseY = 0,dragX = 0,dragY = 0,isDrag = false,isMove = false;
|
|
|
- windowEventHandler('mousedown',(event)=>{ //鼠标位置获取,计算点击位置到拖拽元素左边的距离
|
|
|
- let wrap = document.getElementById(domWrap);
|
|
|
+ windowEventHandler('mousedown',function(event){ //鼠标位置获取,计算点击位置到拖拽元素左边的距离
|
|
|
let page = getPageLength(event);
|
|
|
- drag = document.getElementById(domDrag);
|
|
|
mouseX = page.pageX - wrap.offsetLeft //鼠标到拖拽元素的左边界的距离
|
|
|
mouseY = page.pageY - wrap.offsetTop //鼠标到拖拽元素的上边界的距离
|
|
|
isDrag = true
|
|
|
- isMove = false
|
|
|
+ // isMove = false
|
|
|
},drag)
|
|
|
// windowEventHandler('mousemove',handleMove,document)
|
|
|
- windowEventHandler('mousemove',(event)=>{ //移动的
|
|
|
+ windowEventHandler('mousemove',handleMove,document)
|
|
|
+ windowEventHandler('mouseup',()=>{
|
|
|
+ // if(isMove){ //有move就设置位置没有移动就不处理
|
|
|
+ // console.log(dragX)
|
|
|
+ // wrap.style.left = dragX + 'px'
|
|
|
+ // wrap.style.top = dragY + 'px'
|
|
|
+ // }
|
|
|
+ isDrag = false
|
|
|
+ return false
|
|
|
+ },drag)
|
|
|
+
|
|
|
+ function handleMove(event){ //移动的
|
|
|
let dragDes = document.getElementById('treatDescBox');//展開区域
|
|
|
let page = getPageLength(event);
|
|
|
let maxDragX = 0,dragDesWidth = 0;
|
|
|
- let maxDragY = height - wrap.offsetHeight;//最大可拖拽y方向距离
|
|
|
-
|
|
|
+ let maxDragY = height - wrapHeight;//最大可拖拽y方向距离
|
|
|
+
|
|
|
if(domDrag == 'dragTreatTitle'){//最大可推拽x方向距离
|
|
|
if(dragDes != null){
|
|
|
dragDesWidth = dragDes.offsetWidth
|
|
|
}else{
|
|
|
dragDesWidth = 0
|
|
|
}
|
|
|
- maxDragX = width - wrap.offsetWidth - dragDesWidth
|
|
|
+ maxDragX = width - wrapWidth - dragDesWidth
|
|
|
}else{
|
|
|
- maxDragX = width - wrap.offsetWidth
|
|
|
+ maxDragX = width - wrapWidth
|
|
|
}
|
|
|
if(isDrag){
|
|
|
dragX = page.pageX - mouseX //鼠标可拖拽到左边的最大距离
|
|
@@ -805,36 +825,25 @@ function dragBox(domWrap,domDrag){
|
|
|
dragY = 0
|
|
|
}
|
|
|
if(domDrag == 'dragTreatTitle'){
|
|
|
- if(width-dragX-dragDesWidth < wrap.offsetWidth){ //不能超出右边界
|
|
|
+ if(width-dragX-dragDesWidth < wrapWidth){ //不能超出右边界
|
|
|
dragX = maxDragX
|
|
|
}
|
|
|
}else{
|
|
|
- if(width-dragX < wrap.offsetWidth){ //不能超出右边界
|
|
|
+ if(width-dragX < wrapWidth){ //不能超出右边界
|
|
|
dragX = maxDragX
|
|
|
}
|
|
|
}
|
|
|
- if(height-dragY < wrap.offsetHeight){ //不能超出下边界
|
|
|
+ if(height-dragY < wrapHeight){ //不能超出下边界
|
|
|
dragY = maxDragY
|
|
|
}
|
|
|
- isMove = true
|
|
|
+ // isMove = true
|
|
|
wrap.style.left = dragX + 'px'
|
|
|
wrap.style.marginLeft = 0 + 'px'
|
|
|
wrap.style.top = dragY + 'px'
|
|
|
}
|
|
|
- },document)
|
|
|
- windowEventHandler('mouseup',()=>{
|
|
|
- // if(isMove){ //有move就设置位置没有移动就不处理
|
|
|
- // console.log(dragX)
|
|
|
- // wrap.style.left = dragX + 'px'
|
|
|
- // wrap.style.top = dragY + 'px'
|
|
|
- // }
|
|
|
- isDrag = false
|
|
|
- return false
|
|
|
- },document)
|
|
|
+ }
|
|
|
}
|
|
|
-// function handleMove(event,mouseX){
|
|
|
-// console.log(event)
|
|
|
-// }
|
|
|
+
|
|
|
function getCurrentDate(){
|
|
|
let myDate = new Date();
|
|
|
let year = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
|
|
@@ -844,20 +853,10 @@ function getCurrentDate(){
|
|
|
return date;
|
|
|
}
|
|
|
function inspectAndAssist(){
|
|
|
- let obj = { //添加化验
|
|
|
- details: [],
|
|
|
- name: '',
|
|
|
- questionId: '',
|
|
|
- showType: 1,
|
|
|
- }
|
|
|
- let obj1 = { //添加辅检
|
|
|
- name: '',
|
|
|
- questionId: '',
|
|
|
- showType: 1,
|
|
|
- time:getCurrentDate(),
|
|
|
- value:''
|
|
|
- }
|
|
|
const state = store.getState();
|
|
|
+ let mainType = state.typeConfig.typeConfig
|
|
|
+ if(mainType == 1){return}//文本模式不放化验辅检的模板
|
|
|
+
|
|
|
let tmpAll = state.homePage.allModules;
|
|
|
let tmpInspected = state.inspect.labelList;
|
|
|
let tmpAssisted = state.assistCheck.assistLabel;
|
|
@@ -872,7 +871,13 @@ function inspectAndAssist(){
|
|
|
}
|
|
|
}
|
|
|
for(let i = 0;i < tmpInspect.length;i++){//化验数据处理
|
|
|
- let tmpObj = JSON.parse(JSON.stringify(obj));
|
|
|
+ let tmpObj = { //添加化验
|
|
|
+ details: [],
|
|
|
+ name: '',
|
|
|
+ questionId: '',
|
|
|
+ showType: 1,
|
|
|
+ }
|
|
|
+ // let tmpObj = JSON.parse(JSON.stringify(obj));
|
|
|
if (tmpInspect[i].controlType == 0) {
|
|
|
tmpDetail = tmpInspect[i].questionMapping
|
|
|
}else if(tmpInspect[i].controlType == 1 || tmpInspect[i].controlType == 6){
|
|
@@ -884,7 +889,14 @@ function inspectAndAssist(){
|
|
|
assayArr.push(tmpObj)
|
|
|
}
|
|
|
for(let i = 0;i < tmpAssist.length;i++){//辅检数据处理
|
|
|
- let tmpObj = JSON.parse(JSON.stringify(obj1));
|
|
|
+ let tmpObj = { //添加辅检
|
|
|
+ name: '',
|
|
|
+ questionId: '',
|
|
|
+ showType: 1,
|
|
|
+ time:getCurrentDate(),
|
|
|
+ value:''
|
|
|
+ }
|
|
|
+ // let tmpObj = JSON.parse(JSON.stringify(obj1));
|
|
|
tmpObj.questionId = tmpAssist[i].id
|
|
|
tmpObj.name = tmpAssist[i].name
|
|
|
checkArr.push(tmpObj)
|