Browse Source

治疗方案接口修改

zhangxc 5 năm trước cách đây
mục cha
commit
06dfa61751
2 tập tin đã thay đổi với 5 bổ sung84 xóa
  1. 4 83
      src/store/async-actions/treat.js
  2. 1 1
      src/utils/tools.js

+ 4 - 83
src/store/async-actions/treat.js

@@ -28,91 +28,13 @@ export const getTreatResult = (item) =>{
         
 
         const emrData = getEMRParams();
-        const diagnosticList = state.diagnosticList.diagnosticList;
-        let diag = '';
-        if(diagnosticList) {
-            for (let i = 0; i < diagnosticList.length; i++ ) {
-                if(i === 0 ) {
-                    diag = diag + diagnosticList[i].name;
-                } else {
-                    diag = diag + ',' + diagnosticList[i].name;
-                }
-                
-            }
-        }
         const diseaseName = {
             "dateValue": "",
             "name": "",
             "uniqueName": item.name
-          }
-        const params = {
-            "age": emrData.age,
-            "featureType": "8",
-            "ruleType":config.ruleTypeMap["8"],
-            "diag": diag,
-            "diseaseName":  item.name,
-            "lis": emrData.lis,
-            "other": emrData.other,
-            "pasts": emrData.other,
-            "pacs": emrData.pacs,
-            "sex": emrData.sex,
-            "symptom": emrData.current + emrData.main,
-            "vital": emrData.vital,
-            "patientId": emrData.patientId,
-            "hosCode": emrData.hosCode
-        };
-        // const params = {
-        //     "disType":"1",
-        //     "age":28,
-        //     "diag":"2型糖尿病性肾病,1型糖尿病,糖尿病肾病",
-        //     "diseaseName":"2型糖尿病",
-        //     "featureType":"8",
-        //     "hosCode":"A001",
-        //     "lis":[
-        //         {
-        //             "name":"糖化血红蛋白测定",
-        //             "detailName":"糖化血红蛋白(HbA1c)",
-        //             "uniqueName":"糖化血红蛋白测定--糖化血红蛋白(HbA1c)",
-        //             "source":"0",
-        //             "minValue":4,
-        //             "otherValue":"",
-        //             "maxValue":6,
-        //             "units":"%",
-        //             "value":"5"
-        //         },
-        //         {
-        //             "name":"空腹葡萄糖测定",
-        //             "detailName":"葡萄糖(GLU)",
-        //             "uniqueName":"空腹葡萄糖测定--葡萄糖(GLU)",
-        //             "source":"0",
-        //             "minValue":3.9,
-        //             "otherValue":"",
-        //             "maxValue":6.1,
-        //             "units":"mmol/L",
-        //             "value":"5"
-        //         },
-        //         {
-        //             "name":"肝功能测定",
-        //             "detailName":"谷丙转氨酶(ALT)",
-        //             "uniqueName":"肝功能测定--谷丙转氨酶(ALT)",
-        //             "source":"0",
-        //             "minValue":5,
-        //             "otherValue":"",
-        //             "maxValue":40,
-        //             "units":"U/L",
-        //             "value":"180"
-        //         }
-        //     ],
-        //     "lisOrder":"",
-        //     "lisString":"",
-        //     "other":"",
-        //     "otherOrder":"",
-        //     "pacs":"",
-        //     "pacsOrder":"",
-        //     "sex":1,
-        //     "symptom":"患者患有2型糖尿病近来出现泡沫尿",
-        //     "vital":"体温40℃"
-        // }
+        }
+        const params = Object.assign(emrData,{"diseaseName":diseaseName,"featureType": "8",
+            "ruleType":config.ruleTypeMap["8"],})
         const isChronic = state.diagnosticList.chronicMagItem ||state.mainSuit.chronicDesease;
         // const isChronic = true
         if (isChronic) {
@@ -150,10 +72,9 @@ function getTreatment(item, dispatch, state,url,params, isChronic) {
         if(data.data.code == '0') {
             // dispatch({type:MODI_LOADING,flag:false});
             // dispatch({type:SHOW_LOADING,flag:false});
-           
             let treat;
             if(data.data.data) {
-                treat = data.data.data || {}
+                treat = data.data.data.treat || {}
             }
             if(treat) {
                 let { treatmentPlan, commonTreatment, surgeryTreatment, drugHistory, adverseEvent, followUp} = treat

+ 1 - 1
src/utils/tools.js

@@ -709,7 +709,7 @@ function getEMRParams(){
     "diagString": "",
     "drugString": "",
     "lis": inspect.pushItem,
-    "pacs": assistCheck.dataArr||'',
+    "pacs": assistCheck.dataArr||[],
     "diag": diag,
     "lisOrder": [],
     "pacsOrder": [],