zhangxc 6 роки тому
батько
коміт
3dadc7f0de

+ 7 - 4
src/components/ChronicInfo/index.jsx

@@ -265,7 +265,10 @@ class ChronicInfo extends React.Component{
                                           <span>{'请输入'+item.name+':'}</span>
                                         </td>
                                         <td>
-                                          <input type="text" placeholder="请输入"/>
+                                          <input type="text" placeholder="请输入" value={item.value}/>
+                                        </td>
+                                        <td>
+                                          <span>{item.uint}</span>
                                         </td>
                                         
                                       </tr>
@@ -278,9 +281,9 @@ class ChronicInfo extends React.Component{
                                           {item.details.map((ii,ind)=>{
                                             return <div className={style["chooseItem"]}>
                                                     <Radio label={ii.detailName}
-                                                             isSelect={radioVal[i]==ii.detailName}
-                                                             handleClick={this.handleForRadio.bind(this,ii,v,i)}>
-                                                      </Radio>
+                                                            isSelect={radioVal[i]==ii.detailName}
+                                                            handleClick={this.handleForRadio.bind(this,ii,v,i)}>
+                                                    </Radio>
                                                   </div>
                                           })}
                                         </td>

+ 0 - 1
src/components/Treat/AdverseReactions/index.jsx

@@ -10,7 +10,6 @@ class AdverseReactions extends Component {
       
     }
     changeReact(it, index) {
-        console.log('itttttttt', it, index)
         this.props.changeReact(it, index);
     }
 

src/components/Treat/LastTreat/LastDrug/index.jsx → src/components/Treat/DrugHistory/LastDrug/index.jsx


src/components/Treat/LastTreat/LastDrug/index.less → src/components/Treat/DrugHistory/LastDrug/index.less


+ 33 - 0
src/components/Treat/DrugHistory/index.jsx

@@ -0,0 +1,33 @@
+import React, { Component } from 'react';
+import style from './index.less';
+import LastDrug from './LastDrug/index.jsx';
+import info2 from './../img/info2.png';
+import info3 from './../img/info3.png';
+import $ from "jquery";
+
+class DrugHistory extends Component {
+    constructor(props){
+        super(props);
+        this.state = {
+            currentIndex: -1    
+        }
+    }
+   
+
+    render() {
+        const { icon, titleStyle,titleBg, filter, title, drugHistory, showDrugInfo, setDrugInfo } = this.props
+        console.log('1111111111111111')
+        return(
+            (drugHistory['慢病用药内容'] && drugHistory['慢病用药内容'].length > 0 || drugHistory['普通病用药内容'] && drugHistory['普通病用药内容'].length > 0) &&
+            <div className={style['last-treat-wrapper']}>
+                <div className={style['last-treat-title-box']} style={titleStyle}></div>
+                <div className={style['last-treat-title']} ><img className={style['last-treat-icon']} src={icon}/>{title}</div>
+                {drugHistory['慢病用药内容'].length > 0 && <LastDrug title='普通病用药内容' lastDrugList = {drugHistory['慢病用药内容']}  showDrugInfo={showDrugInfo} setDrugInfo={setDrugInfo}></LastDrug>}
+                {drugHistory['普通病用药内容'].length > 0 && <LastDrug title='慢病用药内容' lastDrugList = {drugHistory['普通病用药内容']}  showDrugInfo={showDrugInfo} setDrugInfo={setDrugInfo}></LastDrug>}
+            </div>
+        )
+    }
+
+}
+
+export default DrugHistory;

src/components/Treat/LastTreat/index.less → src/components/Treat/DrugHistory/index.less


+ 0 - 33
src/components/Treat/LastTreat/index.jsx

@@ -1,33 +0,0 @@
-import React, { Component } from 'react';
-import style from './index.less';
-import LastDrug from './LastDrug/index.jsx';
-import info2 from './../img/info2.png';
-import info3 from './../img/info3.png';
-import $ from "jquery";
-
-class LastTreat extends Component {
-    constructor(props){
-        super(props);
-        this.state = {
-            currentIndex: -1
-        }
-    }
-   
-
-    render() {
-        const { icon, titleStyle,titleBg, filter, title, lastTreat, showDrugInfo, setDrugInfo } = this.props
-        const { chronicDisMedica, commonDisMedica } = lastTreat
-        return(
-            chronicDisMedica && chronicDisMedica.length > 0 && commonDisMedica && commonDisMedica.length > 0 &&
-            <div className={style['last-treat-wrapper']}>
-                <div className={style['last-treat-title-box']} style={titleStyle}></div>
-                <div className={style['last-treat-title']} ><img className={style['last-treat-icon']} src={icon}/>{title}</div>
-                {commonDisMedica.length > 0 && <LastDrug title='普通病用药内容' lastDrugList = {commonDisMedica}  showDrugInfo={showDrugInfo} setDrugInfo={setDrugInfo}></LastDrug>}
-                {chronicDisMedica.length > 0 && <LastDrug title='慢病用药内容' lastDrugList = {chronicDisMedica}  showDrugInfo={showDrugInfo} setDrugInfo={setDrugInfo}></LastDrug>}
-            </div>
-        )
-    }
-
-}
-
-export default LastTreat;

BIN
src/components/Treat/img/adverseReaction.png


BIN
src/components/Treat/img/followUp.png


+ 20 - 5
src/components/Treat/index.jsx

@@ -2,7 +2,7 @@ import React,{ Component } from 'react';
 import style from './index.less';
 import GeneralTreat from './GeneralTreat/index.jsx';
 import DrugTreat from './DrugTreat/index.jsx';
-import LastTreat from './LastTreat/index.jsx';
+import DrugHistory from './DrugHistory/index.jsx';
 import FollowUp from './FollowUp/index.jsx';
 import AdverseReactions from './AdverseReactions/index.jsx';
 import TreatDesc from '@components/TreatDesc'
@@ -12,6 +12,9 @@ import Notify from '@commonComp/Notify'
 import close from './img/close.png';
 import generalIcon from './img/general.png';
 import surgicalIcon from './img/surgical.png';
+import followUpIcon from './img/followUp.png';
+import drugIcon from './img/drug.png';
+import adverseReactionIcon from './img/adverseReaction.png';
 import $ from "jquery";
 
 class Treat extends Component {
@@ -58,7 +61,7 @@ class Treat extends Component {
       $('#drugWrapper').css({'z-index': 301});
     }
     render(){
-        const {setDrugInfoMore,treatIndex,treatIndexSet, generalTreat, treatment, treatItem, surgeryTreat, lastTreat, 
+        const {setDrugInfoMore,treatIndex,treatIndexSet, generalTreat, treatment, treatItem, surgeryTreat, drugHistory, 
                 selectDrug, drugInfo, treatDesc, setOtherRecommend, setDrugInfo, showDrug, showDrugInfo,hideDrugInfo,
                 title, drugInfoList, hideDrugInfoMore, adversReactionList, changeReact, followUp, setFollowUp, isRead, hasFollowUp} = this.props;
         const { zIndex,show } = this.state
@@ -72,7 +75,7 @@ class Treat extends Component {
 
                     <div className={style['treat-inner-box']}>
                         <GeneralTreat icon={generalIcon} title='一般治疗'   generalTreat={generalTreat}></GeneralTreat>
-                        {hasFollowUp && <FollowUp icon={generalIcon} title='回访时间'   setFollowUp={setFollowUp} followUp = {followUp} isRead={isRead}></FollowUp>}
+                        {hasFollowUp && <FollowUp icon={followUpIcon} title='回访时间'   setFollowUp={setFollowUp} followUp = {followUp} isRead={isRead}></FollowUp>}
                         {/* 回访时间 */}
                         {/* {followUp && <div>回访时间: 
                             <span  className={style['follow-up-box']}
@@ -80,8 +83,20 @@ class Treat extends Component {
                                     onInput = {this.handleInputFollowUp}>
                                 {followUp}</span>后回访,不适随诊
                         </div>} */}
-                        { lastTreat && lastTreat.chronicDisMedica &&lastTreat. chronicDisMedica.length > 0 && lastTreat.commonDisMedica && lastTreat.commonDisMedica.length > 0 &&<LastTreat icon={generalIcon} title='上次用药情况' lastTreat={lastTreat}  showDrugInfo = {showDrugInfo} setDrugInfo={ setDrugInfo }></LastTreat>}
-                        {adversReactionList&&adversReactionList.length>0&&<AdverseReactions icon={generalIcon} title='不良反应' adversReactionList = {adversReactionList} changeReact = {changeReact}></AdverseReactions>}
+                        {console.log('222222', drugHistory)}
+                        { drugHistory && (drugHistory['慢病用药内容'] && drugHistory['慢病用药内容'].length > 0 || drugHistory['普通病用药内容'] && drugHistory['普通病用药内容'].length > 0) &&<DrugHistory icon={drugIcon} 
+                            titleStyle={{background:'#EAF7FA',opacity:'1', filter:'alpha(opacity=100);',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=100);'}}
+                            title='上次用药情况' 
+                            drugHistory={drugHistory}  
+                            showDrugInfo = {showDrugInfo} 
+                            setDrugInfo={ setDrugInfo }>
+                        </DrugHistory>}
+                        {adversReactionList&&adversReactionList.length>0&&<AdverseReactions icon={adverseReactionIcon} 
+                            titleStyle={{background:'#C72F2F',opacity:'0.1', filter:'alpha(opacity=10);',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=10);'}} 
+                            title='不良反应' 
+                            adversReactionList = {adversReactionList} 
+                            changeReact = {changeReact}>
+                        </AdverseReactions>}
                         <DrugTreat treatment={ treatment } 
                                 selectDrug={selectDrug} 
                                 setOtherRecommend={ setOtherRecommend } 

+ 0 - 1
src/containers/AdviceContainer.js

@@ -5,7 +5,6 @@ import { SET_CHANGE_ADVICE_TREATMENT, SET_CHANGE_ADVICE_ASSAY, SET_CHANGE_ADVICE
 import { SET_FOLLOW_UP } from '@store/types/treat.js';
 
 function mapStateToProps(state) {
-    console.log('state', state)
     return ({
         pushMessage: state.pushMessage,
         isRead:state.homePage.isRead,

+ 2 - 2
src/containers/Treat.js

@@ -8,12 +8,12 @@ import { showDrugInfo } from '../store/actions/treat';
 
 
 function mapStateToProps(state){
-    const { treatment, generalTreat, surgeryTreat, lastTreat, adversReactionList, treatDesc, drugInfo, showDrugInfo, treatItem , drugInfoList, followUp, hasFollowUp} = state.treat;
+    const { treatment, generalTreat, surgeryTreat, drugHistory, adversReactionList, treatDesc, drugInfo, showDrugInfo, treatItem , drugInfoList, followUp, hasFollowUp} = state.treat;
     return {
         treatment: treatment,
         generalTreat: generalTreat,
         surgeryTreat: surgeryTreat,
-        lastTreat: lastTreat,
+        drugHistory: drugHistory,
         adversReactionList: adversReactionList,
         treatDesc: treatDesc,
         drugInfo: drugInfo,

+ 2 - 0
src/store/actions/treat.js

@@ -15,6 +15,7 @@ export const clearTreat = (state, action) => {
     const res = Object.assign({}, state);
     res.generalTreat = '';
     res.surgeryTreat = '';
+    res.drugHistory = {};
     res.treatment = [];
     res.adversReactionList=[];
     res.hasFollowUp = false;
@@ -26,6 +27,7 @@ export const setTreatment = (state, action) => {
     res.treatment = action.treatment;
     res.generalTreat = action.generalTreat;
     res.surgeryTreat = action.surgeryTreat;
+    res.drugHistory= action.drugHistory
     return res
 }
 

+ 6 - 3
src/store/async-actions/treat.js

@@ -47,7 +47,8 @@ export const addDiagnostic = (item) => {
                 "pacs": emrData.pacs,
                 "sex": emrData.sex,
                 "symptom": emrData.current + emrData.main,
-                "vital": emrData.vital
+                "vital": emrData.vital,
+                "patientId": emrData.patientId,
             };
             //判断是否走慢病系统
             // const isChronic = state.diagnosticList.chronicMagItem && state.diagnosticList.chronicMagItem.name||state.mainSuit.chronicDesease && state.mainSuit.chronicDesease.name;
@@ -143,7 +144,8 @@ export const getTreatResult = (item) =>{
             "pacs": emrData.pacs,
             "sex": emrData.sex,
             "symptom": emrData.current + emrData.main,
-            "vital": emrData.vital
+            "vital": emrData.vital,
+            "patientId": emrData.patientId,
         };
         // const params = {
         //         "age": 20,
@@ -197,12 +199,13 @@ function getTreatment(item, dispatch, state,url,params) {
              treat = data.data.data.treat || {}
         }
         if(treat) {
-           let { treatment, commonTreatment, surgeryTreatment, adverseReactions, followUp} = treat
+           let { treatment, commonTreatment, surgeryTreatment, drugHistory, adverseReactions, followUp} = treat
            dispatch({
                 type: SET_TREATMENT,
                 treatment: treatment,
                 generalTreat: commonTreatment,
                 surgeryTreat: surgeryTreatment,
+                drugHistory: drugHistory,
             })
             if (adverseReactions) { //如何之前存过不良反应,则替换成之前的不良反应
                 const allAdversReactionList = state.treat.allAdversReactionList

+ 3 - 3
src/store/reducers/treat.js

@@ -68,8 +68,8 @@ const initState = {
     //         ]
     //     }
     // ],
-    lastTreat: {
-        // commonDisMedica: [
+    drugHistory: {
+        // '慢病用药内容': [
         //     {
         //         medicitionName: '泮托拉唑',
         //         id: 145
@@ -79,7 +79,7 @@ const initState = {
         //         id: 341
         //     }
         // ],
-        // chronicDisMedica: [
+        // '普通病用药内容': [
         //     {
         //         medicitionName: '兰索拉唑',
         //         id: 342

+ 2 - 1
src/utils/tools.js

@@ -648,7 +648,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(){