ソースを参照

诊断信息维护匹配

zhouna 3 年 前
コミット
0d0f1cefc7

+ 1 - 0
src/api/request.js

@@ -105,6 +105,7 @@ const request = {
 	addOperation:'/daqe-center/operationManage/addOperation',//新增手术
 	matchingOperation:'/daqe-center/operationManage/matchingOperation',//匹配手术信息
 	upOperationById:'/daqe-center/operationManage/upOperationById',//通过id修改手术
+    importOperation:'/daqe-center/operationManage/importOperation',  //手术导入
 	
 	
 

+ 3 - 0
src/common/common.less

@@ -23,6 +23,9 @@ body{
 .ant-form-item-label > label{
   color: #000;
 }
+.ant-modal-body .ant-table-tbody > tr > td{
+  padding: 6px;
+}
 /*.ant-table-wrapper{
   height: calc(100vh - 240px);
   overflow-y: auto;

+ 2 - 0
src/components/AMenu/index.js

@@ -18,6 +18,7 @@ import DiagManager from "../DiagManager"
 import DocTemplate from "../DocTemplate";
 import DutyRecord from "../DutyRecord";
 import MedicalTeam from "../MedicalTeam";
+import SurgeryManager from "../SurgeryManager";
 import apiObj from '@api/index';
 
 const { post, api } = apiObj;
@@ -41,6 +42,7 @@ const pageMap = {
   	'JCSJ-WSMBWH': <DocTemplate />,
     'JCSJ-ZWZCBGJL': <DutyRecord />,
     'QXGL-YLZGL': <MedicalTeam />,
+    'JCSJ-SSXXWH': <SurgeryManager />,
 }
 
 let firstMenuPage = {};         //第一个菜单,自动激活时用

+ 49 - 26
src/components/DiagManager/MatchDiag.js

@@ -1,44 +1,49 @@
 import React, {
-  useState, useEffect, useContext
+  useState, useEffect
 } from 'react';
-import { Form, Input, Select, Button, Switch, TreeSelect, message, Space,Table } from 'antd';
+import {  Input, Table,Row,Col } from 'antd';
 import apiObj from '@api/index';
 import { getCookie,setCookie } from '@utils/index';
 import DiagContext from './Diag-context';
 import { useSelector } from 'react-redux'
-import Item from 'antd/lib/list/Item';
 const { post, api } = apiObj;
-const { TextArea } = Input;
+const { Search } = Input;
 
-function AddDiag(props) {
+function MatchDiag(props) {
+  const [DiagList, setDiagList] = useState([]);//当前页列表数据
   const [size, setSize] = useState(15);//每页显示条数
   const [total, setTotal] = useState(0);
   const [current, setCurrent] = useState(1);//当前页
+  const [text,setText] = useState(props.row.name);//输入框中内容
+  const [diagId,setDiagId] = useState(props.row.id);//诊断id
   const [params, setParams] = useState({
     pages: 1,
   	current: 1,
-    size: 15
+    size: 15,
+    name:""
   });
-  const [form] = Form.useForm();
-  const staticInfo = useSelector(state => {
-    return state.staticInfo;
-  });
-console.log(props.row)
  
  const columns = [
    { title: 'ICD-10编码', dataIndex: 'icd10',},
    { title: '标准诊断名称', dataIndex: 'standard',},
-   { title: '同义词', dataIndex: 'isMapping',},
- ]
+   { title: '同义词', dataIndex: 'synonym',},
+ ];
+  useEffect(() => {
+    //默认显示诊断
+	const param = {...params,name:text.trim(),current:1};
+	getPage(param);
+  }, []);
  const rowSelection = {
    onChange: (selectedRowKeys, selectedRows) => {
      console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
+     const param = {icd10:selectedRows[0].icd10,
+       standard:selectedRows[0].standard,
+       synonym:selectedRows[0].synonym,
+       id:diagId
+     };
+	 //setParams(param);
+	 props.onChange(param);
    },
-   getCheckboxProps: (record) => ({
-     disabled: record.name === 'Disabled User',
-     // Column configuration not to be checked
-     name: record.name,
-   }),
  };
  //每页显示条数切换
  function onSizeChange(current, pageSize) {
@@ -57,20 +62,38 @@ console.log(props.row)
    setParams(params)
    getPage()
  }
- function getPage() {
-   
+ function onSearch(){
+   const param = {...params,name:text.trim(),current:1};
+   setParams({...params,name:text.trim(),current:1});
+   getPage(param);
+ }
+ function onChange(e){
+   const val = e.target.value;
+   setText(val);
+ }
+ function getPage(param) {
+   post(api.getMatchingDiseasePage, param||params).then((res) => {
+	 if (res.data.code === 200) {
+	   const data = res.data.data;
+	   setDiagList(data.records);
+	   setTotal(data.total)
+	 }
+   })
  }
- const list=[]
-  
 
   return (
     <>
+	  <Row gutter={24}>
+		<Col span={12} key={0}>
+	      <Search placeholder="请输入诊断" onSearch={onSearch} value={text} onChange={onChange} enterButton style={{marginBottom:'14px'}}/>
+        </Col>
+      </Row>
       <Table
-        rowSelection={{type: 'checkbox',...rowSelection,}}
+        rowSelection={{type: 'radio',...rowSelection,}}
         columns={columns}
         scroll={{ y: 'calc(100vh - 320px)' }}
-        dataSource={list}
-        rowKey={record => record.code}
+        dataSource={DiagList}
+        rowKey={(record,i) => {return i+record.icd10}}
         pagination={{
           current: current,
           pageSize: size,
@@ -89,4 +112,4 @@ console.log(props.row)
   );
 }
 
-export default AddDiag;
+export default MatchDiag;

+ 25 - 4
src/components/DiagManager/index.js

@@ -31,6 +31,7 @@ function DiagManager() {
   const [current, setCurrent] = useState(1);//当前页
   const [uploadStatus, setUploadStatus] = useState(0);//导入状态,0初始,1成功,2格式错误,3导入数据错误
   const [uploadTip,setUploadTip] = useState("");		//导入状态提示语
+  const [saveParams, setSaveParams] = useState({});		//匹配诊断选中
   const [params, setParams] = useState({
     pages: 1,
 	current: 1,
@@ -184,6 +185,18 @@ function DiagManager() {
     setVisible(false)
 	getDiseasePage();
   }
+  function saveMatching(){
+	post(api.matchingDisease, saveParams).then((res) => {
+	  setvisible2(false);
+	  if (res.data.code === 200) {
+		message.success("匹配成功");
+	  }else{
+		message.warning(res.data.message||"匹配失败,请重试");
+	  }
+	}).catch((error)=>{
+	  message.warning(error.message||"接口出错,请重试",);
+	})
+  }
   const rowSelection = {
     onChange: (selectedRowKeys, selectedRows) => {
       console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
@@ -217,7 +230,9 @@ function DiagManager() {
 	}
     },
   };
-  
+  function matchChange(data){
+	setSaveParams(data);
+  }
   const columns = [
     { title: '序号', dataIndex: 'index',render: (text, record,index) => (current-1)*params.size+index+1},
     { title: '医院诊断名称', dataIndex: 'name',},
@@ -336,6 +351,7 @@ function DiagManager() {
             <AddDiag DiagChange={DiagChange} cancel={cancel} isChange={isChange}/>
           </DiagContext.Provider>
 				<Modal
+				maskClosable={false}
 				title="提示"
 				okText='确定'
 				cancelText='关闭'
@@ -349,6 +365,7 @@ function DiagManager() {
         </Modal>
         : ''}
       <Modal
+		maskClosable={false}
         title="提示"
         okText='确定'
         cancelText='关闭'
@@ -360,6 +377,7 @@ function DiagManager() {
         <p>诊断信息删除后将无法恢复,确认删除这{Diagid.length}条信息。</p>
       </Modal>
 	  <Modal
+		maskClosable={false}
 		destroyOnClose={true}
 	    title="提示"
 	    width={400}
@@ -374,14 +392,17 @@ function DiagManager() {
 		{uploadStatus===1?(<span style={{color: '#00AF71'}}>{uploadTip}</span>):(<span style={{color: '#E3505B'}}>{tipMap[uploadStatus]}</span>)}
 	  </Modal>
 	  <Modal
+		maskClosable={false}
+		destroyOnClose={true}
 	    title="提示"
-	    cancelText='关闭'
+	    okText='保存'
+		cancelText='关闭'
 	    width={800}
 	    visible={visible2}
 	    onCancel={handleCancel2}
-	  	footer={[<Button key="back" onClick={handleCancel2}>关闭</Button>,<Button key="1" onClick={handleCancel2}>保存</Button>]}
+		onOk={saveMatching}
 	  >
-	    <MatchDiag row={formData}></MatchDiag>	
+	    <MatchDiag row={formData} onChange={matchChange}></MatchDiag>
 	  </Modal>
     </div>
   )