Browse Source

治疗方案接口修改(未完成)

zhangxc 6 years ago
parent
commit
0a1b1fb781
3 changed files with 13 additions and 12 deletions
  1. 3 3
      src/components/DiagnosticItem/index.jsx
  2. 7 8
      src/store/async-actions/treat.js
  3. 3 1
      src/utils/tools.js

+ 3 - 3
src/components/DiagnosticItem/index.jsx

@@ -42,9 +42,9 @@ class DiagnosticItem extends Component{
     chooseDiagodal(item) {
         const { diagnosticList,getTips, type } = this.props;
         // getTips && getTips(item);
-        if (type == 'search') {
-            getTips && getTips({id:item.id,type:7});
-        }
+        // if (type == 'search') {
+        //     getTips && getTips({type:7,name: item.name, position: 1});
+        // }
         for (let i = 0; i < diagnosticList.length; i++) {
             if(diagnosticList[i].id === item.id && diagnosticList[i].name === item.name) {
                 Notify.info('该诊断已存在');

+ 7 - 8
src/store/async-actions/treat.js

@@ -10,18 +10,16 @@ import {MODI_LOADING} from '@store/types/homePage.js';
 import { SHOW_TREAT} from '@store/types/treat.js';
 
 const api={
-    push:'/push/pushInner',
-    textPush:'/push/pushText'
+    pushTreatment:'/push/pushTreatment',
+    getConceptDetail:'/conceptDetail/getConceptDetail'
 }
 
 export const addDiagnostic = (item) => {
         return (dispatch, getState) => {
             const state = getState();
-            let url = api.push;
-            if(+state.typeConfig.confirmType===1){
-                url=api.textPush;
-            }
+            let url = api.pushTreatment;
             const emrData = getEMRParams();
+            console.log('emrData', emrData)
             const diagnosticList = state.diagnosticList.diagnosticList;
             let diag = '';
             if(diagnosticList) {
@@ -312,9 +310,10 @@ export const setAllFollowUp = (item) => {
 export const getInstroduce = (item, type, position)=>{
 
     return (dispatch, getState) =>{
-        const url = '/introduceInfo/getByQuestionId';
+        const url = '/conceptDetail/getConceptDetail';
         const params = {
             questionId: item.id,
+            name: item.name,
             type: type,
             position: position
         }
@@ -348,7 +347,7 @@ export const  getInstroduceMore = (drugIdList) =>{
     return (dispatch, getState) =>{
         let drugInfoList = [];
         for (let i = 0; i < drugIdList.drugIdList.length; i++ ) {
-            const url = '/introduceInfo/getByQuestionId';
+            const url = '/conceptDetail/getConceptDetail';
             const params = {
                 questionId: drugIdList.drugIdList[i],
                 type: 8,

+ 3 - 1
src/utils/tools.js

@@ -645,6 +645,7 @@ 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)||'',
@@ -657,7 +658,8 @@ function getEMRParams(){
   const age = message.patientAge;
   const sex = message.sex;
   const patientId = message.patientId //病人id,取上次用药
-  return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId};
+  const hosCode = message.hospitalCode
+  return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId, hosCode};
 };
 
 function didPushParamChange(){