瀏覽代碼

新增输血

luolei 4 年之前
父節點
當前提交
d191cc53f4

+ 1 - 0
src/common/components/SearchOption/index.jsx

@@ -130,6 +130,7 @@ class SearchOption extends React.Component {
                         <ul className={styles.lisul} style={{'display':showInsp?'block':'none'}}>
                             <li onClick={()=>{this.detailClick(5,'药品')}}>药品</li>
                             <li onClick={()=>{this.detailClick(6,'手术/操作')}}>手术/操作</li>
+                            <li onClick={()=>{this.detailClick(8,'输血')}}>输血</li>
                         </ul>
                     }
                 </div>

+ 1 - 1
src/components/AddAssistCheck/AssistName/index.jsx

@@ -32,7 +32,7 @@ class AssistName extends Component {
 	render() {
 		const { winWidth, name, getInfomation,normal,item } = this.props;
 		return (
-				<span className={`${styles.assistName} ${setFontColorSize(2)}`} style={{ width: winWidth < 1150 ? '120px' : 'auto',fontWeight:normal?'normal':'bold' }} ref={this.$assistName}>
+				<span className={`${styles.assistName} ${setFontColorSize(2)}`} style={{ width: winWidth < 1150 ? '120px' : 'auto',fontWeight:normal?'normal':'bold'}} ref={this.$assistName}>
           <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item)} alt=""/>
 					<span className={styles.tagSpan} title={name}>
 						{name&&this.splitName(name)}:

+ 1 - 0
src/components/AddAssistCheck/Textarea/index.less

@@ -2,6 +2,7 @@
   /*overflow-y: auto;*/
   // overflow-x: hidden;
   /*max-height: 100px;*/
+  padding-bottom: 3px;
   border-bottom: 1px dashed #333;
   box-sizing: border-box;
   min-height: 21px;

+ 1 - 0
src/components/AddAssistCheck/index.less

@@ -103,6 +103,7 @@
     }
 
     .textareaWrap {
+      margin-top: 8px;
       padding-right: 245px;
       width: 100%;
     }

+ 2 - 2
src/components/AddNewInspect/SlidePic/index.jsx

@@ -141,10 +141,10 @@ class SlidePic extends Component {
       <li key={item.time} className={`${styles.slideLi} clearfix`}> 
           <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item)} alt=""/>
           <span className={styles.bigname}>{item.name}</span>
-          <span className={styles.smallname}>{item.flg == 5?'药品':'手术/操作'}</span>
+          <span className={styles.smallname}>{item.flg == 5?'药品':item.flg == 6?'手术/操作':'输血'}</span>
           <span className={styles.edit}>
             {
-              item.flg == 5?
+              item.flg == 5||item.flg == 8?
               <input disabled='disabled' type="text" 
                 class="canEdit" 
                 onDoubleClick={(e)=>this.setEdit(e)}

+ 14 - 1
src/components/AddNewInspect/index.jsx

@@ -327,7 +327,7 @@ class AddNewInspect extends React.Component {
     }
   }
   render() {
-    const {setHighter,refreshScroller,checkOnOff, getInfomation,setTipValue, handleChangeValue,labelListSmall,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush,handleDelConfirm } = this.props;
+    const {labelListBlood,setHighter,refreshScroller,checkOnOff, getInfomation,setTipValue, handleChangeValue,labelListSmall,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush,handleDelConfirm } = this.props;
     const { tmpId, tmpIdx, time, pageTop, impId } = this.state;
     const contStyle={
       opacity:'0.4',
@@ -368,6 +368,19 @@ class AddNewInspect extends React.Component {
                 ></SlidePic>
               })
             }
+            {
+              labelListBlood && labelListBlood.map((item, idx) => {
+                return <SlidePic
+                  item={item}
+                  checkOnOff={checkOnOff}
+                  time={time}
+                  handlePush={handlePush}
+                  handleDelClick={this.handleDelClick}
+                  setTipValue={setTipValue}
+                  handleDelConfirm={handleDelConfirm}
+                ></SlidePic>
+              })
+            }
           </ul>
         </div>
         <div style={{ position: "relative", clear: "both", top: "-2px" }}>

+ 2 - 1
src/components/NewAdvice/index.jsx

@@ -240,7 +240,7 @@ class NewAdvice extends React.Component {
 
   }
   render() {
-    const {hideAllDrop,setHighter,labelListBig, fetchPushInfos,getInfomation,labelListSmall, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick,handleDelConfirm,checkOnOff } = this.props;
+    const {hideAllDrop,setHighter,labelListBig, fetchPushInfos,getInfomation,labelListSmall, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick,handleDelConfirm,checkOnOff ,labelListBlood} = this.props;
     const { ieVersion, isIE, hide,importLis } = this.state;
     const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
     if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -302,6 +302,7 @@ class NewAdvice extends React.Component {
               handleDelConfirm={handleDelConfirm}
               labelListBig={labelListBig}
               labelListSmall={labelListSmall}
+              labelListBlood={labelListBlood}
               handleSign={handleSign}
               setHighter={setHighter}
               refreshScroller={this.refreshScroller}

+ 2 - 1
src/containers/NewAdvice.js

@@ -30,7 +30,7 @@ import {
 } from '@store/async-actions/pushMessage';
 import {HIDEDROP} from '@types/homePage';
 
-function mapStateToProps(state) {//console.log(state)
+function mapStateToProps(state) {//console.log(state.newAdvice)
   return {
     list: state.newAdvice.list,
     labelList: state.newAdvice.labelList,
@@ -45,6 +45,7 @@ function mapStateToProps(state) {//console.log(state)
     message: state.patInfo.message,
     labelListBig: state.newAdvice.labelListBig,
     labelListSmall: state.newAdvice.labelListSmall,
+    labelListBlood: state.newAdvice.labelListBlood,
     hospitalMsg: state.homePage.sysConfig || {},
     typeConfig: state.typeConfig
   }

+ 1 - 1
src/store/async-actions/assistCheck.js

@@ -21,7 +21,7 @@ export const getSearchList = (val) => {
         .then((res)=>{
             if(res.data.code==0){
                 const data = res.data.data;let curDate=[];
-                let arr = data.pacsNames;
+                let arr = data.pacsNames||[];
                     for (var key in arr) {
                         let obj = {}
                         obj['uniqueName'] = arr[key];

+ 1 - 1
src/store/async-actions/diagnosticSearch.js

@@ -40,7 +40,7 @@ export const getSearchList = (val,flag) => {
             if(res.data.code==0){
                 const data = res.data.data;let curDate=[];
 
-                let arr = data.diseaseNames;
+                let arr = data.diseaseNames||[];
                     for (var key in arr) {
                         let obj = {}
                         obj['name'] = arr[key];

+ 2 - 2
src/store/async-actions/inspect.js

@@ -23,13 +23,13 @@ export const getSearchList = (val) => {
             if(res.data.code==0){
                 const data = res.data.data;let curDate=[];
                 if(type==2){
-                    curDate = data && data.lisDetailNames
+                    curDate = (data && data.lisDetailNames) ||[]
                     for (let i = 0;i < curDate.length;i++) {
                         curDate[i]['detailName'] = curDate[i]['uniqueName']
                         curDate[i]['flg'] = 0;
                     }
                 }else{
-                    let arr = data.lisNames,tmp=[];
+                    let arr = data.lisNames||[],tmp=[];
                     for (var key in arr) {
                         let obj = {}
                         obj['uniqueName'] = arr[key];

+ 10 - 4
src/store/async-actions/newAdvice.js

@@ -22,12 +22,18 @@ export const getSearchList = (val) => {
             if(res.data.code==0){
                 const data = res.data.data;let curDate=[];
                 //药:阿替乐尔;手术:髂动脉造影
-                let arr = type==5?data.drugNames:data.operationNames,tmp=[];
+                let arr = type==5?(data.drugNames||[]):type==6?(data.operationNames||[]):(data.transfusionNames||[]),tmp=[];
                 for(let i = 0;i < arr.length;i++){
                     let obj = {}
-                    obj['uniqueName'] = arr[i].name;
-                    obj['name'] = arr[i].name;
-                    obj['flg'] = type;
+                    if(type==8){
+                        obj['uniqueName'] = arr[i];
+                        obj['name'] = arr[i];
+                        obj['flg'] = type;
+                    }else{
+                        obj['uniqueName'] = arr[i].name;
+                        obj['name'] = arr[i].name;
+                        obj['flg'] = type;
+                    }
                     tmp.push(obj)
                 }
                 curDate=tmp

+ 46 - 9
src/store/reducers/newAdvice.js

@@ -38,8 +38,10 @@ const initSearchList = {
     shType:5,
     labelListBig:[],//大项
     labelListSmall:[],//小项
+    labelListBlood:[],//输血
     drugOrder:[],//开单项
     operationOrder:[],//开单项
+    transfusionOrder:[]
 }
 
 export default (state = initSearchList, action) => {
@@ -47,7 +49,8 @@ export default (state = initSearchList, action) => {
         const newState = Object.assign({}, state);
         let tempArr = newState.labelListBig;
         let tempArrs = newState.labelListSmall;
-        let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempTotalOrder=[];
+        let tmpArr = newState.labelListBlood;
+        let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempBloodOrder=[],tempTotalOrder=[];
         if(tmpLis&&tmpLis.flg == 5){//药品
             for(let i = 0;i < tempArr.length;i++){
                 if(tempArr[i].time == tmpLis.time){
@@ -56,7 +59,7 @@ export default (state = initSearchList, action) => {
                 }
             }
             newState.labelListBig = [...tempArr]
-        }else{//手术、操作
+        }else if(tmpLis&&tmpLis.flg == 6){//手术、操作
             for(let i = 0;i < tempArrs.length;i++){
                 if(tempArrs[i].time == tmpLis.time){
                     let flg = tempArrs[i].check;
@@ -64,29 +67,46 @@ export default (state = initSearchList, action) => {
                 }
             }
             newState.labelListSmall = [...tempArrs]
+        }else if(tmpLis&&tmpLis.flg == 8){//输血
+            for(let i = 0;i < tmpArr.length;i++){
+                if(tmpArr[i].time == tmpLis.time){
+                    let flg = tmpArr[i].check;
+                    tmpArr[i].check = !flg
+                }
+            }
+            newState.labelListBlood = [...tmpArr]
         }
         tempBigOrder = tempArr.filter((item)=>item.check)
         tempSmallOrder = tempArrs.filter((item)=>item.check)
+        tempBloodOrder = tmpArr.filter((item)=>item.check)
         newState.drugOrder=[...tempBigOrder]
         newState.operationOrder=[...tempSmallOrder]
+        newState.transfusionOrder=[...tempBloodOrder]
         return newState;
     }
     if (action.type == DEL_ONE_PIC) {
         const newState = Object.assign({}, state);
         let tempArr = newState.labelListBig;
         let tempArrs = newState.labelListSmall;
-        let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempTotalOrder=[];
-        if(tmpLis&&tmpLis.flg == 5){//大项
+        let tmpArr = newState.labelListBlood;
+        let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempBloodOrder=[],tempTotalOrder=[];
+        if(tmpLis&&tmpLis.flg == 5){
             tempArr = tempArr.filter((item)=>item.time != tmpLis.time)
             newState.labelListBig = [...tempArr]
-        }else{//小项
+        }else if(tmpLis&&tmpLis.flg == 6){
             tempArrs = tempArrs.filter((item)=> item.time != tmpLis.time )
             newState.labelListSmall = [...tempArrs]
+        }else if(tmpLis&&tmpLis.flg == 8){
+            tmpArr = tmpArr.filter((item)=> item.time != tmpLis.time )
+            newState.labelListBlood = [...tmpArr]
         }
         tempBigOrder = tempArr.filter((item)=>item.check)
         tempSmallOrder = tempArrs.filter((item)=>item.check)
+        tempBloodOrder = tmpArr.filter((item)=>item.check)
         tempTotalOrder=tempBigOrder.concat(tempSmallOrder)
-        newState.totalOrder=[...tempTotalOrder]
+        newState.drugOrder=[...tempBigOrder]
+        newState.operationOrder=[...tempSmallOrder]
+        newState.transfusionOrder=[...tempBloodOrder]
         return newState;
     }
 
@@ -94,6 +114,7 @@ export default (state = initSearchList, action) => {
         const newState = Object.assign({}, state);
         let tempArr = newState.labelListBig;
         let tempArrs = newState.labelListSmall;
+        let tmpArr = newState.labelListBlood;
         let tmpLis = action.item
         if(tmpLis.flg == 5){
             for(let i= 0;i < tempArr.length;i++){
@@ -106,16 +127,28 @@ export default (state = initSearchList, action) => {
                     }
                 }
             }
-        }else{
+        }else if(tmpLis.flg == 6){
             for(let i= 0;i < tempArrs.length;i++){
                 if(tmpLis.time == tempArrs[i].time){
                     tempArrs[i].time = action.value
                     tempArrs[i].dateValue = action.value
                 }
             }
+        }if(tmpLis.flg == 8){
+            for(let i= 0;i < tmpArr.length;i++){
+                if(tmpLis.time == tmpArr[i].time){
+                    if(action.sign == 1){
+                        tmpArr[i].time = action.value
+                        tmpArr[i].dateValue = action.value
+                    }else{
+                        tmpArr[i].value = action.value
+                    }
+                }
+            }
         }
         newState.labelListBig = [...tempArr]
         newState.labelListSmall = [...tempArrs]
+        newState.labelListBlood = [...tmpArr]
         return newState;
     }
     if (action.type == SEARCH_TYPE_NEW) {
@@ -127,15 +160,19 @@ export default (state = initSearchList, action) => {
         const newState = Object.assign({}, state);
         const tempArr = newState.labelListBig;
         const tempArrs = newState.labelListSmall;
+        const tmpArr = newState.labelListBlood;
         let tmpLis = action.list
         tmpLis['time'] = getCurrentDate(1)
         tmpLis['dateValue'] = getCurrentDate(1)
-        if(tmpLis.flg == 5){//大项
+        if(tmpLis.flg == 5){
             tempArr.push(tmpLis)
             newState.labelListBig = [...tempArr]
-        }else{//小项
+        }else if(tmpLis.flg == 6){
             tempArrs.push(tmpLis)
             newState.labelListSmall = [...tempArrs]
+        }else{
+            tmpArr.push(tmpLis)
+            newState.labelListBlood = [...tmpArr]
         }
         return newState;
     }

+ 5 - 1
src/utils/tools.js

@@ -921,6 +921,8 @@ function getEMRParams(){
   tempdrug = tempdrug.filter((item)=>!item.check)
   let tempoperation = newAdvice.labelListSmall
   tempoperation = tempoperation.filter((item)=>!item.check)
+  let tempblood = newAdvice.labelListBlood
+  tempblood = tempblood.filter((item)=>!item.check)
   let sex = formatFormParmas('patientSex', patInfoData);
   const obj = {
     "hospitalId": id || '',
@@ -957,7 +959,9 @@ function getEMRParams(){
     "otherOrder": [],
     "patientId": message.patientId,
     "drug": tempdrug,
-    "hospitalId": id || ''
+    "hospitalId": id || '',
+    'transfusion':tempblood,//输血
+    'transfusionOrder':newAdvice.transfusionOrder
   }
   if(sex !== 2){
     // 不是女性时,去除月经史