|
@@ -656,41 +656,76 @@ function handleEnter(event){
|
|
|
if(event.keyCode==13){return false;}
|
|
|
}
|
|
|
//获取病例输入的内容
|
|
|
+// function getEMRParams(){
|
|
|
+// const state = store.getState();
|
|
|
+// const {message} = state.patInfo;
|
|
|
+// const {mainSuit,currentIll,otherHistory,checkBody,inspect,assistCheck,diagnosticList} = state;
|
|
|
+// //console.log('message', message)
|
|
|
+// const main = filterDataArr(mainSuit.saveText)||'',
|
|
|
+// current=filterDataArr(currentIll.saveText)||'',
|
|
|
+// other = filterDataArr(otherHistory.saveText)||'',
|
|
|
+// vital = filterDataArr(checkBody.saveText)||'',
|
|
|
+// lis = inspect.pushItem, //化验推送所需数据
|
|
|
+// pacs = assistCheck.dataString||'',
|
|
|
+// dis=diagnosticList.diagnosticStrNoType||'',
|
|
|
+// advice = '',
|
|
|
+// diseaeId = [];
|
|
|
+// const age = message.patientAge;
|
|
|
+// const sex = message.sex;
|
|
|
+// const patientId = message.patientId //病人id,取上次用药
|
|
|
+// const hosCode = message.hospitalCode
|
|
|
+// return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId, hosCode};
|
|
|
+// };
|
|
|
function getEMRParams(){
|
|
|
const state = store.getState();
|
|
|
const {message} = state.patInfo;
|
|
|
const {mainSuit,currentIll,otherHistory,checkBody,inspect,assistCheck,diagnosticList} = state;
|
|
|
- //console.log('message', message)
|
|
|
- const main = filterDataArr(mainSuit.saveText)||'',
|
|
|
- current=filterDataArr(currentIll.saveText)||'',
|
|
|
- other = filterDataArr(otherHistory.saveText)||'',
|
|
|
- vital = filterDataArr(checkBody.saveText)||'',
|
|
|
- lis = inspect.pushItem, //化验推送所需数据
|
|
|
- pacs = assistCheck.dataString||'',
|
|
|
- dis=diagnosticList.diagnosticStrNoType||'',
|
|
|
- advice = '',
|
|
|
- diseaeId = [];
|
|
|
- const age = message.patientAge;
|
|
|
- const sex = message.sex;
|
|
|
- const patientId = message.patientId //病人id,取上次用药
|
|
|
- const hosCode = message.hospitalCode
|
|
|
- return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId, hosCode};
|
|
|
+ const diag = []
|
|
|
+ for(let i = 0; i < diagnosticList.diagnosticList.length; i++) {
|
|
|
+ diag.push({"dateValue": "","name": "","uniqueName": diagnosticList.diagnosticList[i].name})
|
|
|
+ }
|
|
|
+ const obj = {
|
|
|
+ "hosCode": message.hospitalCode,
|
|
|
+ "age": message.patientAge,
|
|
|
+ "sex": message.sex,
|
|
|
+ "chief": filterDataArr(mainSuit.saveText)||'',
|
|
|
+ "symptom": filterDataArr(currentIll.saveText)||'',
|
|
|
+ "vital": filterDataArr(checkBody.saveText)||'',
|
|
|
+ "pasts": filterDataArr(otherHistory.saveText)||'',
|
|
|
+ "infectious": "",
|
|
|
+ "operation": "",
|
|
|
+ "allergy": "",
|
|
|
+ "vaccination": "",
|
|
|
+ "personal": "",
|
|
|
+ "marital": "",
|
|
|
+ "family": "",
|
|
|
+ "menstrual": "",
|
|
|
+ "other": filterDataArr(otherHistory.saveText)||'',
|
|
|
+ "lisString": "",
|
|
|
+ "pacsString": "",
|
|
|
+ "diagString": "",
|
|
|
+ "drugString": "",
|
|
|
+ "lis": inspect.pushItem,
|
|
|
+ "pacs": assistCheck.dataArr||[],
|
|
|
+ "diag": [],
|
|
|
+ "lisOrder": [],
|
|
|
+ "pacsOrder": [],
|
|
|
+ "diagOrder": diag,
|
|
|
+ "drugOrder": [],
|
|
|
+ "operationOrder": [],
|
|
|
+ "otherOrder": [],
|
|
|
+ "patientId": message.patientId,
|
|
|
+ "drug": [],
|
|
|
+ "marriage": ""
|
|
|
+ }
|
|
|
+ return obj;
|
|
|
};
|
|
|
|
|
|
function didPushParamChange(){
|
|
|
const emrData = getEMRParams();
|
|
|
const oldParams = storageLocal.get('emrParam');
|
|
|
- const newParams = JSON.stringify({
|
|
|
- age: emrData.age,
|
|
|
- hosCode:emrData.hosCode,
|
|
|
- diag: emrData.dis,
|
|
|
- lis: emrData.lis,
|
|
|
- other: emrData.other,
|
|
|
- pacs: emrData.pacs,
|
|
|
- sex: emrData.sex,
|
|
|
- vital:emrData.vital,
|
|
|
- symptom: emrData.current + emrData.main
|
|
|
- });
|
|
|
+
|
|
|
+ const newParams = JSON.stringify(emrData);
|
|
|
if(newParams === oldParams){
|
|
|
return false;
|
|
|
}
|
|
@@ -1254,7 +1289,7 @@ function getPushList(data1,data2){ //推送数据
|
|
|
tmpObj.source = '1';//数据来源
|
|
|
tmpObj.maxValue = part.max || '';
|
|
|
tmpObj.minValue = part.min || '';
|
|
|
- tmpObj.time = part.time ||now;
|
|
|
+ tmpObj.dateValue = part.time ||now;
|
|
|
tmpObj.units = part.unit || '';//单位
|
|
|
tmpObj.value = (part.value-0) === (part.value-0) ? part.value:'';//值
|
|
|
tmpObj.otherValue = (part.value-0) === (part.value-0) ?'':part.value; //阴性阳性
|
|
@@ -1272,7 +1307,7 @@ function getPushList(data1,data2){ //推送数据
|
|
|
tmpObj.source = '0'; //数据来源
|
|
|
tmpObj.maxValue = val.maxValue ? val.maxValue : '';
|
|
|
tmpObj.minValue = val.minValue ? val.minValue : '';
|
|
|
- tmpObj.time = val.time || now;
|
|
|
+ tmpObj.dateValue = val.time || now;
|
|
|
tmpObj.units = val.labelSuffix || '';
|
|
|
tmpObj.value = (val.value-0) === (val.value-0) ? val.value:'';
|
|
|
tmpObj.otherValue = (val.value-0) === (val.value-0) ?'':val.value;
|
|
@@ -1333,8 +1368,8 @@ function getPushLists(data1,data2){ //推送数据
|
|
|
return totalTmpArr;
|
|
|
}
|
|
|
|
|
|
-function getAllString(checkedListImport,assistLabel){
|
|
|
- let tmpImportLis = [],tmpString='';
|
|
|
+function getAllString(checkedListImport,assistLabel,flg){
|
|
|
+ let tmpImportLis = [],tmpString='',tmpArr=[],tmpObj={};
|
|
|
for(let i = 0;i < checkedListImport.length;i++){
|
|
|
for(let j = 0;j < checkedListImport[i].length;j++){
|
|
|
tmpImportLis.push(checkedListImport[i][j])
|
|
@@ -1343,9 +1378,25 @@ function getAllString(checkedListImport,assistLabel){
|
|
|
let tempArr = tmpImportLis.concat(assistLabel)
|
|
|
for (let i = 0; i < tempArr.length; i++) {
|
|
|
let tmpVal = tempArr[i].value ? tempArr[i].value.trim() : tempArr[i].value;
|
|
|
+ let obj = {
|
|
|
+ "dateValue": tempArr[i].time||"",
|
|
|
+ "name": "",
|
|
|
+ "uniqueName": tempArr[i].name||"",
|
|
|
+ "desc": tempArr[i].value||"",
|
|
|
+ "result": tempArr[i].value||"",
|
|
|
+ }
|
|
|
+ tmpArr.push(obj)
|
|
|
tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + '^;')
|
|
|
}
|
|
|
- return tmpString;
|
|
|
+ return tmpObj = {
|
|
|
+ arr:tmpArr,
|
|
|
+ str:tmpString
|
|
|
+ }
|
|
|
+ // if(flg){
|
|
|
+ // return tmpArr;
|
|
|
+ // }else{
|
|
|
+ // return tmpString;
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
// 模板中处理tagType==4的数据
|
|
@@ -1430,7 +1481,6 @@ function moveEnd(obj,flg) {
|
|
|
* 2体征颜色单独处理不需要设置
|
|
|
*/
|
|
|
const setFontColorSize = (flg,pacs) => {
|
|
|
- // setTimeout(() => {
|
|
|
const classNameSelect = ['largeFontSize','middleFontSize','simpleFontSize','simpleLightColor','simpleColor','selectColor']
|
|
|
const state = store.getState();
|
|
|
let readConfig = state.typeConfig.readConfig
|
|
@@ -1452,6 +1502,8 @@ const setFontColorSize = (flg,pacs) => {
|
|
|
classStr = `largeFontSize selectColor`
|
|
|
}else if(pacs == 7){
|
|
|
classStr = `largeFontSize fontWeight selectColor`
|
|
|
+ }else if(pacs == 8){
|
|
|
+ classStr = `largeFontSize selectColor`
|
|
|
}else{
|
|
|
classStr = `largeFontSize`
|
|
|
}
|
|
@@ -1466,6 +1518,8 @@ const setFontColorSize = (flg,pacs) => {
|
|
|
classStr = `simpleFontSize selectColor`
|
|
|
}else if(pacs == 7){
|
|
|
classStr = `simpleFontSize fontWeight selectColor`
|
|
|
+ }else if(pacs == 8){
|
|
|
+ classStr = `simpleFontSize selectColor`
|
|
|
}else{
|
|
|
classStr = `simpleFontSize`
|
|
|
}
|
|
@@ -1486,6 +1540,10 @@ const setFontColorSize = (flg,pacs) => {
|
|
|
classStr = `largeFontSize titleWidth`
|
|
|
}else if(pacs == 5){
|
|
|
classStr = `largeFontSize specialSize`
|
|
|
+ }else if(pacs == 6){
|
|
|
+ classStr = `largeFontSize`
|
|
|
+ }else if(pacs == 8){
|
|
|
+ classStr = `simpleColor largeFontSize`
|
|
|
}else if(pacs == 7){
|
|
|
classStr = `largeFontSize fontWeight`
|
|
|
}else{
|
|
@@ -1500,11 +1558,15 @@ const setFontColorSize = (flg,pacs) => {
|
|
|
if(flg == 2){
|
|
|
if(pacs == 7){
|
|
|
classStr = `simpleFontSize fontWeight`
|
|
|
+ }else if(pacs == 6){
|
|
|
+ classStr = `simpleFontSize`
|
|
|
+ }else if(pacs == 8){
|
|
|
+ classStr = `simpleColor simpleFontSize`
|
|
|
+ }else if(pacs == 7){
|
|
|
+ classStr = `simpleFontSize fontWeight`
|
|
|
}else{
|
|
|
classStr = `simpleFontSize`
|
|
|
}
|
|
|
- }else if(pacs == 7){
|
|
|
- classStr = `simpleFontSize fontWeight`
|
|
|
}else if(flg == 1){
|
|
|
classStr = `simpleLightColor simpleFontSize`
|
|
|
}else{
|
|
@@ -1512,10 +1574,9 @@ const setFontColorSize = (flg,pacs) => {
|
|
|
}
|
|
|
}
|
|
|
return classStr;
|
|
|
- // }, 0);
|
|
|
}
|
|
|
|
|
|
-//获取生命体征或非生命体征标签
|
|
|
+//获取生命体征或非生命体征标签
|
|
|
function getLifeLabels(arr,flag){ //flag=true获取非生命体征
|
|
|
const newArr = arr.filter((it)=>{
|
|
|
return flag?+it.specFlag!==4:+it.specFlag===4;
|
|
@@ -1642,7 +1703,6 @@ module.exports = {
|
|
|
getDomUpDown,
|
|
|
setFontColorSize,
|
|
|
moveEnd,
|
|
|
- setFontColorSize,
|
|
|
getLifeLabels,
|
|
|
getValuedLabels,
|
|
|
removeRepeat,
|