morphone1995 4 yıl önce
ebeveyn
işleme
0368ef382d

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

@@ -50,7 +50,6 @@ class SearchOption extends React.Component {
         })
     }
     handleClearVal(){
-        console.log(12312313);
         const { handleChangeValue } = this.props;
         this.textInput.current.value = '';
         this.textInput.current.focus();

+ 10 - 12
src/components/BlockEmrCont/index.jsx

@@ -25,7 +25,8 @@ class BlockEMRCont extends Component {
   constructor(props){
     super(props);
     this.state = {
-      isShowSexInput : true
+      isShowSexInput : true,
+      historyId : -1
     }
     this.$cont = React.createRef();
     this.$div = React.createRef();
@@ -46,17 +47,14 @@ class BlockEMRCont extends Component {
     // });
   }
 
-  componentWillReceiveProps(nextProps) {
-    if (nextProps.patInfoData && nextProps.patInfoData.patInfoData[3].value === 1){
-      this.setState({
-        isShowSexInput : false
-      })
-    }else {
-      this.setState({
-        isShowSexInput: true
-      })
-    }
-  }
+  // componentWillReceiveProps(nextProps) {
+  //   console.log(nextProps,'nextProps');
+  //   if (nextProps.historyId !== this.state.historyId){
+  //     this.setState({
+  //       historyId : nextProps.historyId
+  //     })
+  //   }
+  // }
 
   setHighter(ht){
     // console.log(ht, '-=-=-ht=-------');

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

@@ -6,9 +6,10 @@ import PushContainer from '../PushContainer';
 import style from './index.less';
 
 const BodyContainer = (props) =>{
+  console.log(props,'===');
   const { saveDateAll,mode } = props;
   return <div className={style['container'] + ' clearfix'}>
-      <BlockEMRCont/>
+      <BlockEMRCont />
       {/* <PushContainer></PushContainer> */}
   </div>;
 }

+ 3 - 3
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -109,13 +109,14 @@ class HistoryCaseContainer extends React.Component {
     // 确认引用选中病历
     makeSure(){
         const {activeHis} = this.state;
+        // console.log(activeHis,'activeHis');
         this.setState({visible:false});
         store.dispatch(showHistory(false));
         //store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
         //store.dispatch({type: SET_READ_MODE, readMode: activeHis.sign});
         store.dispatch(getHistempDetail(activeHis));  // 获取引用数据
         const {handleQuoteClick} = this.props;
-        handleQuoteClick&&handleQuoteClick();
+        handleQuoteClick && handleQuoteClick(activeHis);
         // dragBox('hisWrapMove','closeHis','del');
     }
     //确认删除病历
@@ -219,10 +220,9 @@ class HistoryCaseContainer extends React.Component {
         visible:true,
         activeId:idx,
         activeHis:val,
-        // dataStr: val.preview||{},
-        // dataJson:JSON.parse(val.dataJson)||{},
         dataStr: JSON.parse(val.preview) || [],
       })
+      document.body.scrollTop = document.documentElement.scrollTop = 0
     }
     // 修改模板名称 input的值
     handleChange(e){

+ 7 - 0
src/components/PatInfo/Select/index.jsx

@@ -4,6 +4,7 @@ import style from "./../index.less";
 import selectSex from '../../../common/images/selectSex.png'
 import { CLEARMENSTRUATIONTEXTDATA, } from '@store/types/menstruationHistory';
 import store from '@store';
+import { embedPush } from '../../../store/async-actions/pushMessage'
 export default class Select extends Component {
   constructor(props) {
     super(props);
@@ -70,6 +71,7 @@ export default class Select extends Component {
   };
 
   onChange(e,val) {
+    const state = store.getState();
     e.stopPropagation()
     this.setState({
       value: val,
@@ -79,6 +81,11 @@ export default class Select extends Component {
     store.dispatch({
       type: CLEARMENSTRUATIONTEXTDATA,
     });
+
+    store.dispatch(embedPush({
+      action: "patientia",
+      mode: 1
+    }))
   };
   handleMouseEnter(){
     // console.log('鼠标进入');

+ 1 - 1
src/components/PreviewBody/MedicalAdvice/index.jsx

@@ -7,7 +7,7 @@ class MedicalAdvice extends Component {
   }
   render() { 
     const {advice} = this.props
-    console.log(advice,'===========');
+    // console.log(advice,'===========');
     const {labelListBig,labelListSmall} = advice
     return ( 
         <tr className={style['patInfoFst']}>

+ 1 - 1
src/containers/BlockEMRContanier.js

@@ -5,7 +5,7 @@ import BlockEMRCont from '../components/BlockEmrCont/index.jsx';
 
 function mapStateToProps(state) {
   return {
-    patInfoData: state.patInfo
+    historyId: state.historyTemplates.historyId
   };
 }
 function mapDispatchToProps(dispatch) {

+ 3 - 2
src/containers/HistoryCases.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import { connect } from 'react-redux';
 import HistoryCaseContainer from '@components/HistoryCaseContainer';
-import { showHistory,sortHistory,activeHistory,visibleHistory } from '@store/actions/historyTemplates'
+import { showHistory,sortHistory,activeHistory,visibleHistory,saveHistoryId } from '@store/actions/historyTemplates'
 import {keepPushData} from '@store/actions/tabTemplate';
 import { dragBox } from '@utils/drag';
 
@@ -27,11 +27,12 @@ function mapDispatchToProps(dispatch) {
             e.stopPropagation();
             dispatch(activeHistory(val))
         },
-        handleQuoteClick(e,data,idx){
+        handleQuoteClick(data,idx){
             // e.stopPropagation();
             dispatch(keepPushData(data,'his'))      //历史病历引用
             dispatch(activeHistory(idx))
             dispatch(visibleHistory(true))
+            dispatch(saveHistoryId(data.id));
         },
         handleSortClick(){
             dispatch(sortHistory())

+ 5 - 1
src/store/actions/historyTemplates.js

@@ -1,4 +1,4 @@
-import { HISTORY_TEMPLATES, HISTORY_TEMPLATES_SORT, HISTORY_INIT, HISTORY_ACTIVE, HISTORY_VISIBLE, HISTORY_UPDATEBYIDUSNAMES, HISTORY_GETHOSPITALINFO } from '@store/types/historyTemplates';
+import {HISTORYID, HISTORY_TEMPLATES, HISTORY_TEMPLATES_SORT, HISTORY_INIT, HISTORY_ACTIVE, HISTORY_VISIBLE, HISTORY_UPDATEBYIDUSNAMES, HISTORY_GETHOSPITALINFO } from '@store/types/historyTemplates';
 
 export const showHistory=(bool) => ({   //显示隐藏历史病历
     type:HISTORY_TEMPLATES,
@@ -23,6 +23,10 @@ export const visibleHistory=(bool) => ({   //历史病历弹窗
 export const updateByIdUsNamesHistory = () => ({   //修改病历名称
     type: HISTORY_UPDATEBYIDUSNAMES,
 });
+export const saveHistoryId = (id) => ({   //修改病历名称
+    type: HISTORYID,
+    id
+});
 
 
 // export const getInitHospitalInfo = (val) => ({   //获取医院信息

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

@@ -43,7 +43,7 @@ export const getHistempDetail = (item) => {
                 //   dispatch(billing());
                 // }
                 // dispatch(getMRAnalyse())
-
+                
                 
             }else{
                 Notify.error(data.msg);

+ 1 - 0
src/store/reducers/assistCheck.js

@@ -163,6 +163,7 @@ export default (state = initSearchList, action) => {
     newState.assistLabel = [];
     newState.dataArr = [];
     newState.dataString = [];
+    newState.totalOrder = [];
     return newState;
   }
   return state;

+ 9 - 1
src/store/reducers/historyTemplates.js

@@ -5,7 +5,8 @@ import {
     HISTORY_ACTIVE,
     HISTORY_VISIBLE,
     HISTORY_UPDATEBYIDUSNAMES,
-    HISTORY_GETHOSPITALINFO
+    HISTORY_GETHOSPITALINFO,
+    HISTORYID
 } from '../types/historyTemplates';
 
 
@@ -15,6 +16,7 @@ const initHistoryList = {
     activeHistory:{},//需要显示的病例
     items: [],
     HospitalInfo: {}, // 医院信息
+    historyId: -1, // 病历id
 }
 
 export default (state = initHistoryList, action) => {
@@ -58,5 +60,11 @@ export default (state = initHistoryList, action) => {
         newState.HospitalInfo = action.data
         return newState;
     }
+     if (action.type === HISTORYID) {
+       const newState = Object.assign({}, state);
+       newState.historyId = action.id;
+       return newState;
+     }
+
     return state;
 }

+ 1 - 0
src/store/reducers/inspect.js

@@ -275,6 +275,7 @@ export default (state = initSearchList, action) => {
       let newState = Object.assign({}, state);
       newState.labelListBig = [];
       newState.labelListSmall = [];
+      newState.totalOrder = [];
       return newState;
     }
     return state;

+ 2 - 0
src/store/reducers/newAdvice.js

@@ -271,6 +271,8 @@ export default (state = initSearchList, action) => {
     const newState = Object.assign({}, state);
     newState.labelListBig = [];
     newState.labelListSmall = [];
+    newState.drugOrder = [];
+    newState.operationOrder = [];
     return newState;
     }
     return state;

+ 1 - 0
src/store/types/historyTemplates.js

@@ -7,3 +7,4 @@ export const HISTORY_VISIBLE = 'HISTORY_VISIBLE';
 
 export const HISTORY_UPDATEBYIDUSNAMES = 'HISTORY_UPDATEBYIDUSNAMES';  //修改病历名称
 export const HISTORY_GETHOSPITALINFO = 'HISTORY_GETHOSPITALINFO';  //获取医院信息
+export const HISTORYID = 'HISTORYID';  //病历ID

+ 11 - 31
src/utils/tools.js

@@ -879,27 +879,8 @@ function handleEnter(event){
     event = event?event:window.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};
-// };
+
+
 // 获取参数value
 function formatFormParmas(val,arr){
     let item = arr.length!==0 && arr.find(item=>{
@@ -907,13 +888,12 @@ function formatFormParmas(val,arr){
     })
     return item.value
 }
-
+//获取病例输入的内容
 function getEMRParams(){
   const state = store.getState();
   const {id} =  state.historyTemplates && state.historyTemplates.HospitalInfo 
   const {message} = state.patInfo;
   const { patInfoData } = state.patInfo;
-  // console.log(state, 'state================');
   const {
     mainSuit,
     currentIll,
@@ -942,10 +922,11 @@ function getEMRParams(){
   tempdrug = tempdrug.filter((item)=>!item.check)
   let tempoperation = newAdvice.labelListSmall
   tempoperation = tempoperation.filter((item)=>!item.check)
+  let sex = formatFormParmas('patientSex', patInfoData);
   const obj = {
     "hospitalId": id || '',
     "age": formatFormParmas('patientAge', patInfoData),
-    "sex": formatFormParmas('patientSex', patInfoData),
+    "sex": sex,
     "deptName": formatFormParmas('hospitalDeptName', patInfoData),
     "chief": filterDataArr(mainSuit.saveText)||'',    //主诉
     "symptom": filterDataArr(currentIll.saveText)||'',  //现病史
@@ -979,6 +960,11 @@ function getEMRParams(){
     "drug": tempdrug,
     "hospitalId": id || ''
   }
+  if(sex !== 2){
+    // 不是女性时,去除月经史
+    obj.menstrual = '';
+  }
+  
   return obj;
 };
 function getMRInfo() {
@@ -2068,13 +2054,7 @@ function checkDeptContent(jsonStr,tmpLis){
     }
   }
 }
-// 获取参数value
-function formatFormParmas(val,arr){
-  let item = arr.length!==0 && arr.find(item=>{
-     return item.id === val
-  })
-  return item.value
-}
+
 module.exports = {
   getIds,
   getWindowInnerWidth,