Browse Source

病历质控(未完成)

zhangxc 5 năm trước cách đây
mục cha
commit
847ad5838e

+ 23 - 11
src/components/PushItems/MRAnalyse/index.jsx

@@ -4,37 +4,49 @@ import up from '@common/images/slide-up.png';
 import down from '@common/images/slide-down.png';
 import chronicPic from "@common/images/chronic.png";
 import className from 'classnames';
+import $ from 'jquery';
+import config from '@config/index';
 
 class MRAnalyse extends Component {
     constructor(props) {
         super(props)
+        this.state = {
+            slideUp: false
+        }
+        this.$content = React.createRef();
+
         this.slideToggle = this.slideToggle.bind(this);
     }
     slideToggle(){
-        // const {toggleSlide,slideUp} = this.props;
-        // toggleSlide&&toggleSlide(!slideUp);
+        const { slideUp } = this.state
+        $(this.$content.current).slideToggle(config.slideTime);
+        this.setState({
+            slideUp: !slideUp
+        })
     }
     getDetail() {
-        const result =[
-            "诊断名称不标准(腹痛待查)",
-            "现病史缺少症状部位(腹痛)",
-            "现病史缺少症状缓解情况(腹痛)",
-            "现病史缺少症状加剧情况(腹痛)"
-        ]
-        return result.map(item => (
+        const { MRAnalyseResult } = this.props
+        // const result =[
+        //     "诊断名称不标准(腹痛待查)",
+        //     "现病史缺少症状部位(腹痛)",
+        //     "现病史缺少症状缓解情况(腹痛)",
+        //     "现病史缺少症状加剧情况(腹痛)"
+        // ]
+        return MRAnalyseResult.map(item => (
             <p>{item}</p>
         ))
     }
     render() {
+        const {slideUp} = this.state
         return <div className={style["tips"]} style={{marginBottom:'15px'}}>
             <div className={className(style["tips-title"],style["chronic"],"clearfix")} onClick={this.slideToggle}>
                 <div className={style["tips-name"]}>
                     <img src={chronicPic} />
                     <h2>{'病历书写规范提示'}<span className={style["redTips"]}></span></h2>
                 </div>
-                {/* <div className={style['toggle-btn']}>
+                <div className={style['toggle-btn']}>
                     <img src={slideUp?down:up} alt="展开/收起"/>
-                </div> */}
+                </div>
             </div>
             <div className={style["content"]} ref={this.$content}>
                 {this.getDetail()}

+ 6 - 4
src/components/PushItems/index.jsx

@@ -163,7 +163,8 @@ class PushItems extends Component {
       tipsDetails,
       tmpFlg,
       showPartName,
-      showAllName
+      showAllName,
+      MRAnalyseResult
     } = this.props.pushMessage;
     const { tipsDiscalimer,chronicPushItems,wholeIndexs,setPushEmergencyIdx,sysConfig,windowHeight,hideAllDrop,getInfomation} = this.props;
     const {
@@ -270,9 +271,10 @@ class PushItems extends Component {
             {<ChronicInfo
               patDom={this.$cont}
               data={chronicPushItems}></ChronicInfo>}
-            <MRAnalyse>
-              
-            </MRAnalyse>
+           {MRAnalyseResult.length > 0 && <MRAnalyse
+              MRAnalyseResult = {MRAnalyseResult}
+            >
+            </MRAnalyse>}
             <TipsMsg
               patDom={this.$cont}
              tmpFlg = {tmpFlg}

+ 16 - 14
src/store/async-actions/pushMessage.js

@@ -296,22 +296,24 @@ export const getScaleInfo = (it)=>{
 // 病历质控
 export const getMRAnalyse = () => {
   return (dispatch, getState) => {
-    const MRInfoStr = getMRInfo()
-    const param = {
-      "cid": 0,
-      "medrec": [
-        {
-          "content": MRInfoStr,
-          "label": [],
-          "title": ""
-        }
-      ],
-      "token": ""
-    }
-    console.log('getMRAnalyse')
+    const param = getMRInfo()
     json(api.getMRAnalyse, param)
     .then((res) =>{
-        console.log('getMRAnalyse',res)
+        const data = res.data;
+        if(data.code == '0') {
+          dispatch({
+            type: SET_MR_ANALYSE,
+            MRAnalyseResult: data.data.warning
+          })
+        } else {
+          dispatch({
+            type: SET_MR_ANALYSE,
+            MRAnalyseResult: []
+          })
+        }
+        
+    }).catch((e) => {
+      console.log(e)
     })
   }
 }

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

@@ -14,6 +14,7 @@ const initState = {
   possible: [],
   assay: [],
   determine: [],
+  MRAnalyseResult:[],
   check: [ //辅检
   ],
   tips: {},

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 37 - 6
src/utils/tools.js