XMLWAN пре 4 година
родитељ
комит
7accad39b0

+ 5 - 0
package-lock.json Прегледај датотеку

@@ -8144,6 +8144,11 @@
8144 8144
         "nopt": "~4.0.1"
8145 8145
       }
8146 8146
     },
8147
+    "js-pinyin": {
8148
+      "version": "0.1.9",
8149
+      "resolved": "https://registry.npmjs.org/js-pinyin/-/js-pinyin-0.1.9.tgz",
8150
+      "integrity": "sha1-zfGTNWRd2yDUYw3xBYqsJdJWrf0="
8151
+    },
8147 8152
     "js-tokens": {
8148 8153
       "version": "3.0.2",
8149 8154
       "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",

+ 1 - 0
package.json Прегледај датотеку

@@ -22,6 +22,7 @@
22 22
     "better-scroll": "^1.15.2",
23 23
     "cropperjs": "^1.4.3",
24 24
     "element-ui": "^2.9.1",
25
+    "js-pinyin": "^0.1.9",
25 26
     "lib-flexible": "^0.3.2",
26 27
     "mint-ui": "^2.2.13",
27 28
     "moment": "^2.24.0",

+ 53 - 0
src/api/patient/patient.js Прегледај датотеку

@@ -110,3 +110,56 @@ export function ToSearch(name) {
110 110
     params: params
111 111
   })
112 112
 }
113
+
114
+export function getBloodPatientInfo(phone) {
115
+  const params = {
116
+    phone: phone
117
+  }
118
+  return request({
119
+    url: '/m/api/patient/getbloodpatientinfo',
120
+    method: 'get',
121
+    params: params
122
+  })
123
+}
124
+
125
+export function getSlowPatientInfo(phone) {
126
+  const params = {
127
+    phone: phone
128
+  }
129
+  return request({
130
+    url: '/m/api/patient/getslowpatientinfo',
131
+    method: 'get',
132
+    params: params
133
+  })
134
+}
135
+
136
+export function getMemberPatientInfo(phone) {
137
+  const params = {
138
+    phone: phone
139
+  }
140
+  return request({
141
+    url: '/m/api/patient/getmemberpatientinfo',
142
+    method: 'get',
143
+    params: params
144
+  })
145
+}
146
+
147
+export function getCourseManagement(id, limit, page, startime, endtime) {
148
+  console.log('id', id)
149
+  console.log('limit', limit)
150
+  console.log('page', page)
151
+  console.log('startime', startime)
152
+  console.log('endtime', endtime)
153
+  const params = {
154
+    id: id,
155
+    limit: limit,
156
+    page: page,
157
+    startime: startime,
158
+    endtime: endtime
159
+  }
160
+  return request({
161
+    url: '/m/api/patient/getcoursemanagement',
162
+    method: 'get',
163
+    params: params
164
+  })
165
+}

+ 85 - 18
src/pages/doctorAdvice/components/CourseManagement.vue Прегледај датотеку

@@ -16,27 +16,36 @@
16 16
         </div>
17 17
       </div>
18 18
       <div class="adviceBox">
19
-        <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
20
-          <div class="adviceOne" v-for="item in 3" :key="index">
19
+        <van-list
20
+          v-model="loading"
21
+          :finished="finished"
22
+          finished-text="没有更多了"
23
+          @load="onLoad"
24
+        >
25
+          <div
26
+            class="adviceOne"
27
+            v-for="item in this.courseManagement"
28
+            :key="item.id"
29
+          >
21 30
             <div class="adviceTitle">
22
-              <p>2019.09.01</p>
23
-              <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
31
+              <p>{{ getTime(item.record_time) }}</p>
32
+              <van-icon
33
+                class="ellipsis"
34
+                name="ellipsis"
35
+                @click="newShow = true"
36
+              />
24 37
             </div>
25 38
             <div class="statOrder">
26 39
               <div class="statOrderTitle">
27
-                <span>首次病程记录</span>
40
+                <span>{{ item.title }}</span>
28 41
               </div>
29 42
               <div class="orderContent">
30 43
                 <p>
31
-                  病历书写基本规范2010》第二十二条规定:“病程记录
32
-                  是指继入院记录之后,对患者病情和诊疗过程所进行的
33
-                  连续性记录。内容包括患病历书写基本规范2010》第二十二条规定:“病程记录
34
-                  是指继入院记录之后,对患者病情和诊疗过程所进行的
35
-                  连续性记录。内容包括患
44
+                  <span v-html="item.content"></span>
36 45
                 </p>
37 46
               </div>
38 47
               <div class="doctorBox">
39
-                <p>记录医生:钱蛮子</p>
48
+                <p>记录医生:{{ item.user_name }}</p>
40 49
               </div>
41 50
             </div>
42 51
             <div class="all">全部</div>
@@ -52,10 +61,23 @@
52 61
 
53 62
     <!-- 弹出层 -->
54 63
     <div>
55
-      <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
56
-        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
64
+      <van-popup
65
+        v-model="typeShow"
66
+        position="bottom"
67
+        :style="{ height: '40%' }"
68
+      >
69
+        <van-picker
70
+          show-toolbar
71
+          :columns="columns"
72
+          @cancel="onCancel"
73
+          @confirm="onConfirm"
74
+        />
57 75
       </van-popup>
58
-      <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
76
+      <van-popup
77
+        v-model="startShow"
78
+        position="bottom"
79
+        :style="{ height: '40%' }"
80
+      >
59 81
         <van-datetime-picker
60 82
           v-model="currentDate"
61 83
           type="date"
@@ -75,27 +97,46 @@
75 97
           @cancel="endShow = false"
76 98
         />
77 99
       </van-popup>
78
-      <van-action-sheet v-model="newShow" :actions="actions" cancel-text="取消" @cancel="onCancel" />
100
+      <van-action-sheet
101
+        v-model="newShow"
102
+        :actions="actions"
103
+        cancel-text="取消"
104
+        @cancel="onCancel"
105
+      />
79 106
     </div>
80 107
   </div>
81 108
 </template>
82 109
 
83 110
 <script>
111
+import { getCourseManagement } from "@/api/patient/patient";
112
+import { uParseTime } from "@/utils/tools";
113
+const moment = require("moment");
84 114
 export default {
85 115
   data() {
86 116
     return {
87 117
       newShow: false,
88 118
       startShow: false,
89 119
       endShow: false,
90
-      startTime: "请选择",
91
-      endTime: "请选择",
120
+      startTime: moment()
121
+        .subtract(30, "days")
122
+        .format("YYYY-MM-DD"),
123
+      endTime: moment(new Date()).format("YYYY-MM-DD"),
92 124
       minDate: new Date(1970, 0, 1),
93 125
       maxDate: new Date(2025, 10, 1),
94 126
       currentDate: new Date(),
95
-      actions: [{ name: "编辑" }, { name: "删除" }]
127
+      actions: [{ name: "编辑" }, { name: "删除" }],
128
+      limit: 10,
129
+      page: 1,
130
+      total: 0,
131
+      finished: false,
132
+      loading: false,
133
+      typeShow: false,
134
+      columns: [],
135
+      courseManagement: []
96 136
     };
97 137
   },
98 138
   methods: {
139
+    onLoad() {},
99 140
     onCancel() {
100 141
       this.typeShow = false;
101 142
     },
@@ -132,7 +173,33 @@ export default {
132 173
 
133 174
       this.endTime = `${year}-${month}-${day}`;
134 175
       this.endShow = false;
176
+    },
177
+    getTime(time) {
178
+      // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
179
+      return uParseTime(time, "{y}-{m}-{d}");
180
+    },
181
+    getCourseManagement(patientid) {
182
+      getCourseManagement(
183
+        patientid,
184
+        this.limit,
185
+        this.page,
186
+        this.startTime,
187
+        this.endTime
188
+      ).then(response => {
189
+        if (response.data.state == 1) {
190
+          var coursemanagement = response.data.data.coursemanagement;
191
+          console.log("病程管理", coursemanagement);
192
+          this.courseManagement = coursemanagement;
193
+          var total = response.data.data.total;
194
+          console.log("总共", total);
195
+        }
196
+      });
135 197
     }
198
+  },
199
+  created() {
200
+    var patientid = this.$route.query.patientid;
201
+    console.log("干体重id", patientid);
202
+    this.getCourseManagement(patientid);
136 203
   }
137 204
 };
138 205
 </script>

+ 2 - 1
src/pages/patientManagement/index.vue Прегледај датотеку

@@ -58,7 +58,8 @@ export default {
58 58
       option1: [
59 59
         { text: "全部患者", value: 0 },
60 60
         { text: "透析患者", value: 1 },
61
-        { text: "慢病患者", value: 2 }
61
+        { text: "慢病患者", value: 2 },
62
+        { text: "会员患者", value: 3 }
62 63
       ],
63 64
       option2: [
64 65
         { text: "全部状态", value: 0 },

+ 114 - 52
src/pages/patients/addPatient.vue Прегледај датотеку

@@ -202,21 +202,39 @@
202 202
           </template>
203 203
         </van-cell>
204 204
 
205
-        <van-field
206
-          label="慢性病"
207
-          v-model="patientForm.slowDisease"
208
-          right-icon="arrow"
209
-          readonly
210
-          placeholder="请选择"
211
-          @click="show12 = true"
212
-        />
213
-        <van-popup
214
-          v-model="show12"
215
-          position="bottom"
216
-          :style="{ height: '30%' }"
217
-        >
218
-          <van-picker :columns="checkDisease" @change="onChangeFive" />
219
-        </van-popup>
205
+        <van-cell>
206
+          <!-- 使用 title 插槽来自定义标题 -->
207
+          <template slot="title">
208
+            <span class="custom-title2">慢性病</span>
209
+            <div style="width:60%;margin-left:2rem">
210
+              <van-checkbox-group v-model="resultFour">
211
+                <van-checkbox name="1" shape="square">血透</van-checkbox>
212
+                <van-checkbox name="2" shape="square">腹透</van-checkbox>
213
+                <van-checkbox name="3" shape="square">移植</van-checkbox>
214
+                <van-checkbox name="4" shape="square">高血压</van-checkbox>
215
+                <van-checkbox name="5" shape="square">糖尿病</van-checkbox>
216
+                <van-checkbox name="6" shape="square">慢性肾病</van-checkbox>
217
+                <van-checkbox name="7" shape="square">其他</van-checkbox>
218
+              </van-checkbox-group>
219
+            </div>
220
+          </template>
221
+        </van-cell>
222
+
223
+        <!--        <van-field-->
224
+        <!--          label="慢性病"-->
225
+        <!--          v-model="patientForm.slowDisease"-->
226
+        <!--          right-icon="arrow"-->
227
+        <!--          readonly-->
228
+        <!--          placeholder="请选择"-->
229
+        <!--          @click="show12 = true"-->
230
+        <!--        />-->
231
+        <!--        <van-popup-->
232
+        <!--          v-model="show12"-->
233
+        <!--          position="bottom"-->
234
+        <!--          :style="{ height: '30%' }"-->
235
+        <!--        >-->
236
+        <!--          <van-picker :columns="checkDisease" @change="onChangeFive" />-->
237
+        <!--        </van-popup>-->
220 238
       </div>
221 239
     </div>
222 240
 
@@ -282,7 +300,10 @@ import {
282 300
   GenerateDialysisNo,
283 301
   GetIllnessList,
284 302
   savePatient,
285
-  GetPatientInfo
303
+  GetPatientInfo,
304
+  getBloodPatientInfo,
305
+  getSlowPatientInfo,
306
+  getMemberPatientInfo
286 307
 } from "@/api/patient/patient";
287 308
 import { isCardNo, checkMobile, getFileExtension } from "@/utils/tools";
288 309
 import { getToken } from "@/api/qiniu";
@@ -309,7 +330,7 @@ export default {
309 330
       idCard: "",
310 331
       birthday: "",
311 332
       tel: "",
312
-      result: ["1"],
333
+      result: [],
313 334
       resultTwo: [],
314 335
       resultThree: [],
315 336
       resultFour: [],
@@ -327,7 +348,15 @@ export default {
327 348
       columns3: ["门诊", "住院"],
328 349
       columns4: ["留治", "转出"],
329 350
       contagionList: ["乙肝", "丙肝", "艾滋病", "肺结核", "梅毒"],
330
-      checkDisease: ["慢性病", "神经病", "抑郁症"],
351
+      checkDisease: [
352
+        "血透",
353
+        "腹透",
354
+        "移植",
355
+        "高血压",
356
+        "糖尿病",
357
+        "慢性肾病",
358
+        "其他"
359
+      ],
331 360
       treatmentMethod: [
332 361
         "西医治疗",
333 362
         "中医治疗",
@@ -440,6 +469,43 @@ export default {
440 469
       this.show2 = false;
441 470
     },
442 471
     changeMode(val) {
472
+      alert(val);
473
+      if (val == 1) {
474
+        getBloodPatientInfo(this.patientForm.phone).then(response => {
475
+          if (response.data.state === 1) {
476
+            var msg = response.data.data.msg;
477
+            console.log("患者不存在");
478
+          } else {
479
+            this.$toast("血透患者已存在");
480
+            return false;
481
+          }
482
+        });
483
+      }
484
+
485
+      if (val == 2) {
486
+        getSlowPatientInfo(this.patientForm.phone).then(response => {
487
+          if (response.data.state === 1) {
488
+            var msg = response.data.data.msg;
489
+            console.log("患者不存在");
490
+          } else {
491
+            this.$toast("慢病患者已存在");
492
+            return false;
493
+          }
494
+        });
495
+      }
496
+
497
+      if (val == 3) {
498
+        getMemberPatientInfo(this.patientForm.phone).then(response => {
499
+          if (response.data.state === 1) {
500
+            var msg = response.data.data.msg;
501
+            console.log("会员不存在");
502
+          } else {
503
+            this.$toast("会员已存在");
504
+            return false;
505
+          }
506
+        });
507
+      }
508
+
443 509
       if (this.result.indexOf("1") != -1) {
444 510
         this.bloodShow = true;
445 511
         this.slowShow = false;
@@ -502,7 +568,6 @@ export default {
502 568
         this.slowShow = false;
503 569
         this.memberShow = false;
504 570
       }
505
-      GetPatientInfo(this.patientForm.phone).then(response => {});
506 571
     },
507 572
 
508 573
     generatedialysisno() {
@@ -569,14 +634,34 @@ export default {
569 634
         this.$toast("患者标签不能为空");
570 635
         return false;
571 636
       }
572
-      if (this.patientForm.dialysis === "") {
637
+      if (this.patientForm.dialysis === "" && this.result.indexOf("1") != -1) {
573 638
         this.$toast("透析号不能为空");
574 639
         return false;
575 640
       }
576
-      if (this.patientForm.patientsoure === "") {
641
+      if (
642
+        this.patientForm.patientsoure === "" &&
643
+        this.result.indexOf("1") != -1
644
+      ) {
577 645
         this.$toast("患者来源不能为空");
578 646
         return false;
579 647
       }
648
+
649
+      for (let i = 0; i < this.result.length; i++) {
650
+        console.log("判断成立马", this.result[i]);
651
+        if (this.result[i] == 1) {
652
+          this.patientForm.bloodPatient = 1;
653
+        }
654
+        if (this.result[i] == 2) {
655
+          this.patientForm.slowPatient = 1;
656
+        }
657
+        if (this.result[i] == 3) {
658
+          this.patientForm.memberPatient = 1;
659
+        }
660
+      }
661
+
662
+      if (this.patientForm.patientsoure === "") {
663
+        this.patientForm.patientsoure = 0;
664
+      }
580 665
       if (this.patientForm.patientsoure !== "") {
581 666
         if (this.patientForm.patientsoure === "门诊") {
582 667
           this.patientForm.patientsoure = 1;
@@ -585,10 +670,15 @@ export default {
585 670
           this.patientForm.patientsoure = 2;
586 671
         }
587 672
       }
588
-      if (this.patientForm.lapseto === "") {
673
+      if (this.patientForm.lapseto === "" && this.result.indexOf("1") != -1) {
589 674
         this.$toast("留置状态不能为空");
590 675
         return false;
591 676
       }
677
+
678
+      if (this.patientForm.lapseto === "") {
679
+        this.patientForm.lapseto = 0;
680
+      }
681
+
592 682
       if (this.patientForm.lapseto !== "") {
593 683
         if (this.patientForm.lapseto === "留治") {
594 684
           this.patientForm.lapseto = 1;
@@ -597,37 +687,11 @@ export default {
597 687
           this.patientForm.lapseto = 2;
598 688
         }
599 689
       }
600
-      if (this.resultTwo.length === 0) {
690
+      if (this.resultTwo.length === 0 && this.result.indexOf("1") != -1) {
601 691
         this.$toast("传染病不能为空");
602 692
         return false;
603 693
       }
604 694
 
605
-      for (let i = 0; i < this.result.length; i++) {
606
-        if (this.result[i] == 1) {
607
-          this.patientForm.bloodPatient = 1;
608
-        }
609
-        if (this.result[i] == 2) {
610
-          this.patientForm.slowPatients = 1;
611
-        }
612
-        if (this.result[i] == 3) {
613
-          this.patientForm.memberPatient = 1;
614
-        }
615
-      }
616
-
617
-      if (this.patientForm.slowDisease === "") {
618
-        this.patientForm.slowDisease = 0;
619
-      }
620
-
621
-      if (this.patientForm.slowDisease === "慢性病") {
622
-        this.patientForm.slowDisease = 1;
623
-      }
624
-      if (this.patientForm.slowDisease === "神经病") {
625
-        this.patientForm.slowDisease = 2;
626
-      }
627
-      if (this.patientForm.slowDisease === "抑郁症") {
628
-        this.patientForm.slowDisease = 3;
629
-      }
630
-
631 695
       console.log("治疗方式", this.patientForm.treatmentMethod);
632 696
 
633 697
       if (this.patientForm.treatmentMethod === undefined) {
@@ -682,7 +746,7 @@ export default {
682 746
         avatar: this.patientForm.avatar,
683 747
         requipmentId: this.patientForm.requipmentId, // 慢病信息
684 748
         resultThree: this.resultThree,
685
-        slowDisease: this.patientForm.slowDisease,
749
+        resultFour: this.resultFour,
686 750
         patientType: this.patientForm.patient_type,
687 751
         memberFistDate: this.patientForm.memberFistDate,
688 752
         treatmentMethod: this.patientForm.treatmentMethod
@@ -701,8 +765,6 @@ export default {
701 765
     checkMobile() {
702 766
       if (!checkMobile(this.patientForm.phone)) {
703 767
         this.$toast("请填写正确的手机号");
704
-      } else {
705
-        callback();
706 768
       }
707 769
     },
708 770
     checkIdCardNo() {