Browse Source

大丰病历

huangyw 2 years ago
parent
commit
433f8b4930

+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderFortyEight.vue View File

@@ -134,7 +134,7 @@
134 134
             <td style="text-align: left" colspan="1">
135 135
               <span style="display: inline-block; margin-left: 15px">
136 136
                 上次透后体重:
137
-                {{ predialysis.dry_weight ? predialysis.dry_weight : "/" }}kg
137
+                {{ predialysis.weight_after_last_transparency?predialysis.weight_after_last_transparency:'/' }}kg
138 138
               </span>
139 139
             </td>
140 140
             <td style="text-align: left" colspan="2">

+ 113 - 82
src/xt_pages/outpatientDoctorStation/recordPrint.vue View File

@@ -2,7 +2,7 @@
2 2
   <div>
3 3
     <template>
4 4
       <el-button
5
-        style="position:fixed;right:25px;z-index:999"
5
+        style="position: fixed; right: 25px; z-index: 999"
6 6
         size="small"
7 7
         icon="el-icon-printer"
8 8
         @click="printThisPage"
@@ -10,52 +10,71 @@
10 10
         >打印</el-button
11 11
       >
12 12
     </template>
13
-            
14
-    <div class='dialysisPage' style="padding-top:40px;">
15
-      <printOne ref="printOne"  v-bind:childResponse="childResponse" :patient="patient" :hispatient="hispatient" :history="history" :patientid="patientid"></printOne>
13
+
14
+    <div class="dialysisPage" style="padding-top: 40px">
15
+      <printOne
16
+        v-if="org_id != 10217 && org_id != 0"
17
+        ref="printOne"
18
+        v-bind:childResponse="childResponse"
19
+        :patient="patient"
20
+        :hispatient="hispatient"
21
+        :history="history"
22
+        :patientid="patientid"
23
+      ></printOne>
24
+      <printTwo
25
+        v-if="org_id == 10217 || org_id == 0"
26
+        ref="printTwo"
27
+        v-bind:childResponse="childResponse"
28
+        :patient="patient"
29
+        :hispatient="hispatient"
30
+        :history="history"
31
+        :patientid="patientid"
32
+      ></printTwo>
16 33
     </div>
17 34
   </div>
18 35
 </template>
19 36
 
20 37
 <script>
21
-
22 38
 import { parseTime } from "@/utils";
23 39
 import { getDataConfig } from "@/utils/data";
24 40
 import { jsGetAge, uParseTime } from "@/utils/tools";
25 41
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
26 42
 import print from "print-js";
27
-import { getSchedulePatientList } from '@/api/his/his'
28
-import { getPatientCaseHistory } from "@/api/project/project"
29
-import printOne from "./recordTemplate/printOne"
43
+import { getSchedulePatientList } from "@/api/his/his";
44
+import { getPatientCaseHistory } from "@/api/project/project";
45
+import printOne from "./recordTemplate/printOne";
46
+import printTwo from "./recordTemplate/printTwo";
30 47
 export default {
31 48
   name: "dialysisPrintOrder",
32 49
   components: {
33 50
     BreadCrumb,
34
-    printOne
51
+    printOne,
52
+    printTwo,
35 53
   },
36
-  props:{
37
-    patientid:Number,
54
+  props: {
55
+    patientid: Number,
38 56
   },
39 57
   data() {
40 58
     return {
41 59
       crumbs: [
42 60
         { path: false, name: "透析管理" },
43
-        { path: false, name: "打印单" }
61
+        { path: false, name: "打印单" },
44 62
       ],
45 63
       childResponse: {},
46 64
       patientTableData: [],
47
-      search_input:"",
48
-      patient:{},
49
-      hispatient:{},
50
-      educationOptions:[],
51
-      history:{},
52
-      keyword:"",
65
+      search_input: "",
66
+      patient: {},
67
+      hispatient: {},
68
+      educationOptions: [],
69
+      history: {},
70
+      keyword: "",
71
+      org_id,
53 72
     };
54 73
   },
55 74
   methods: {
56
-    show(val){
57
-       
58
-       this.$refs.printOne.show(val)
75
+    show(val) {
76
+      this.$refs.printOne.show(val);
77
+      this.$refs.printTwo.show(val);
59 78
     },
60 79
     getAdminUser(id) {
61 80
       if (id == 0) {
@@ -84,68 +103,80 @@ export default {
84 103
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
85 104
 
86 105
       const style =
87
-        '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;padding:0 10px;}.infoTitle div{width: 200px;}.otherInfo{display: flex;margin-top:20px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle div{width: 200px;}}';
88
-      printJS({
89
-        printable: "prescription-print",
90
-        type: "html",
91
-        style: style,
92
-        scanStyles: false
93
-      });
106
+        "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;padding:0 10px;}.infoTitle div{width: 200px;}.otherInfo{display: flex;margin-top:20px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle div{width: 200px;}}";
107
+       const style1 =
108
+        "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;}.infoTitle div{width: 300px;}.otherInfo{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;justify-content: center;flex-direction: column;margin-top:10px;line-height: 24px;padding:0 10px;border-top: 1px solid;}.recordTitle div{width: 100%;text-align: center;} .recordTitle .recordContent{width: 100%;height: 150px;text-align: left;} .endInfo{display: flex;flex-direction: column;justify-content: end;margin-top: 10px;line-height: 24px;} .endInfo div{width: 300px;}}";
109
+      
110
+      
111
+      if (this.org_id != 10217 && this.org_id != 0) {
112
+        printJS({
113
+          printable: "prescription-print",
114
+          type: "html",
115
+          style: style,
116
+          scanStyles: false,
117
+        });
118
+      } else if (this.org_id == 10217 || this.org_id == 0) {
119
+        printJS({
120
+          printable: "prescription-print",
121
+          type: "html",
122
+          style: style1,
123
+          scanStyles: false,
124
+        });
125
+      }
94 126
     },
95 127
 
96
-     //患者列表
97
-      getPatientList(){
98
-        
99
-         let params = {
100
-           'record_date':this.$route.query.record,
101
-        }
102
-     
103
-      getSchedulePatientList(params).then(response => {
104
-         if (response.data.state == 0) {
105
-            this.$message.error(response.data.msg)
106
-            return false
107
-         } else {
108
-            this.patientTableData = []
109
-            console.log("list0000000",response.data.data.list)
110
-            // for (let i = 0; i < response.data.data.list.length; i++) {
111
-            //   if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
112
-            //      this.patientTableData.push(response.data.data.list[i])
113
-            //     }
114
-            //   }
115
-              this.patientTableData = response.data.data.list
116
-             }  
117
-          })
118
-      },
128
+    //患者列表
129
+    getPatientList() {
130
+      let params = {
131
+        record_date: this.$route.query.record,
132
+      };
119 133
 
120
-    changePatient(val){
134
+      getSchedulePatientList(params).then((response) => {
135
+        if (response.data.state == 0) {
136
+          this.$message.error(response.data.msg);
137
+          return false;
138
+        } else {
139
+          this.patientTableData = [];
140
+          console.log("list0000000", response.data.data.list);
141
+          // for (let i = 0; i < response.data.data.list.length; i++) {
142
+          //   if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
143
+          //      this.patientTableData.push(response.data.data.list[i])
144
+          //     }
145
+          //   }
146
+          this.patientTableData = response.data.data.list;
147
+        }
148
+      });
149
+    },
121 150
 
122
-        const params = {
123
-          patient_id:val.patient_id
151
+    changePatient(val) {
152
+      const params = {
153
+        patient_id: val.patient_id,
154
+      };
155
+      console.log("params", params);
156
+      getPatientCaseHistory(params).then((response) => {
157
+        if (response.data.state == 1) {
158
+          var patient = response.data.data.patient;
159
+          console.log("patinet", patient);
160
+          this.patient = patient;
161
+          var history = response.data.data.history;
162
+          console.log("history", history);
163
+          this.history = history;
164
+          var hispatient = response.data.data.hispatient;
165
+          console.log("hispatient", hispatient);
166
+          this.hispatient = hispatient;
124 167
         }
125
-        console.log("params",params)
126
-      getPatientCaseHistory(params).then(response=>{
127
-         if(response.data.state == 1){
128
-           var patient = response.data.data.patient
129
-           console.log("patinet",patient)
130
-           this.patient = patient
131
-           var history = response.data.data.history
132
-           console.log("history",history)
133
-           this.history = history
134
-           var hispatient = response.data.data.hispatient
135
-           console.log("hispatient",hispatient)
136
-           this.hispatient = hispatient
137
-         }
138
-      })
168
+      });
139 169
     },
140
-    searchAction(){
141
-      this.getPatientList()
170
+    searchAction() {
171
+      this.getPatientList();
142 172
     },
143
-  
144 173
   },
145 174
   created() {
146
-    // this.getPatientList() 
147
-    console.log("455555555555555",this.patientid)
148
-    this.$refs.printOne.show(this.patientid)
175
+    // this.getPatientList()
176
+    this.org_id = this.$store.getters.xt_user.org.id;
177
+    console.log("=====", this.org_id);
178
+    this.$refs.printOne.show(this.patientid);
179
+    this.$refs.printTwo.show(this.patientid);
149 180
   },
150 181
   // computed:{
151 182
   //   filtedSchedules: function() {
@@ -336,22 +367,22 @@ export default {
336 367
 </style>
337 368
 
338 369
 <style lang="scss">
339
-
340
-.newContainer{
370
+.newContainer {
341 371
   .dialysisPage::-webkit-scrollbar {
342 372
     height: 15px;
343 373
   }
344
-  
345
-  .el-date-editor{
346
-    .el-input__inner{
347
-      padding-right:0px;
374
+
375
+  .el-date-editor {
376
+    .el-input__inner {
377
+      padding-right: 0px;
348 378
     }
349 379
   }
350
-  .el-table td, .el-table th{
380
+  .el-table td,
381
+  .el-table th {
351 382
     text-align: center;
352 383
   }
353 384
 }
354
-.newContainer::-webkit-scrollbar{
385
+.newContainer::-webkit-scrollbar {
355 386
   height: 15px !important;
356 387
 }
357 388
 </style>

+ 304 - 0
src/xt_pages/outpatientDoctorStation/recordTemplate/printTwo.vue View File

@@ -0,0 +1,304 @@
1
+<template>
2
+  <div id="prescription-print">
3
+    <div class="prescription-print">
4
+      <div class="printTitle">{{ orgname }} &nbsp;&nbsp; 血透中心病历</div>
5
+      <div class="infoTitle">
6
+        <div>姓名:{{ patient.name ? patient.name : "" }}</div>
7
+        <div>
8
+          家庭住址:{{ patient.home_address ? patient.home_address : "" }}
9
+        </div>
10
+      </div>
11
+      <div class="infoTitle">
12
+        <div>
13
+          性别:
14
+          <span v-if="patient.gender == 1">男</span>
15
+          <span v-if="patient.gender == 2">女</span>
16
+        </div>
17
+        <div>工作单位:</div>
18
+       
19
+      </div>
20
+      <div class="infoTitle">
21
+        <div>出生日期:</div>
22
+        <div>身份证号:</div>
23
+      </div>
24
+      <div class="infoTitle">
25
+        <div>联系人:</div>
26
+        <div>联系电话:{{ patient.phone ? patient.phone : "" }}</div>
27
+      </div>
28
+      <div class="otherInfo" style="border-bottom: 1px solid">
29
+        <div>进入透析时间:</div>
30
+        <div style="flex: 1"></div>
31
+      </div>
32
+      <div class="infoTitle">
33
+        <div style="width: 300px">原发病:</div>
34
+        <div>确诊肾衰日期:</div>
35
+      </div>
36
+      <div class="infoTitle">
37
+        <div style="width: 300px">
38
+          药物过敏史:{{ patient.past_history ? patient.past_history : "" }}
39
+        </div>
40
+        <div>初始透析日期:</div>
41
+      </div>
42
+      <div class="otherInfo" style="border-bottom: 1px solid">
43
+        <div>血管通路:</div>
44
+        <div style="flex: 1"></div>
45
+      </div>
46
+
47
+      <div class="otherInfo" style="min-height: 60px;">
48
+        <div class="otherName">主诉:</div>
49
+        <div style="flex: 1">
50
+          {{ history.chief_conplaint ? history.chief_conplaint : "" }}
51
+        </div>
52
+      </div>
53
+
54
+      <div class="otherInfo" style="min-height: 200px;">
55
+        <div class="otherName">现病史:</div>
56
+        <div style="flex: 1">
57
+          {{
58
+            history.history_of_present_illness
59
+              ? history.history_of_present_illness
60
+              : ""
61
+          }}
62
+        </div>
63
+      </div>
64
+
65
+      <div class="otherInfo" style="min-height: 100px;">
66
+        <div class="otherName">既往史:</div>
67
+        <div style="flex: 1">
68
+          {{ history.past_history ? history.past_history : "" }}
69
+        </div>
70
+      </div>
71
+
72
+      <div class="otherInfo" style="min-height: 80px;">
73
+        <div class="otherName">个人史:</div>
74
+        <div style="flex: 1">
75
+          {{ history.personal_history ? history.personal_history : "" }}
76
+        </div>
77
+      </div>
78
+
79
+      <div class="otherInfo" style="min-height: 80px;">
80
+        <div class="otherName">家族史:</div>
81
+        <div style="flex: 1">
82
+          {{ history.family_history ? history.family_history : "" }}
83
+        </div>
84
+      </div>
85
+
86
+      <div style="page-break-after: always; margin-top: 50px"></div>
87
+    </div>
88
+
89
+    <div class="prescription-print">
90
+      <!-- <div class="printTitle">病历内容</div> -->
91
+      <div class="recordTitle">
92
+        <div>体格检查</div>
93
+        <div class="recordContent" style="height:250px;"></div>
94
+      </div>
95
+      <div class="recordTitle">
96
+        <div>专科检查</div>
97
+        <div class="recordContent"></div>
98
+      </div>
99
+      <div class="recordTitle" style="border-bottom: 1px solid">
100
+        <div>实验室及器械检查</div>
101
+        <div class="recordContent" style="height:250px;"></div>
102
+      </div>
103
+      <div style="display: flex; justify-content: end">
104
+        <div class="endInfo">
105
+          <div style="height: 100px">
106
+            诊断:{{ history.diagnostic ? history.diagnostic : "" }}
107
+          </div>
108
+          <div style="display: flex">
109
+            <div>医师:</div>
110
+            <div>
111
+              手签:{{
112
+                getDoctor(history.doctor) ? getDoctor(history.doctor) : ""
113
+              }}
114
+            </div>
115
+          </div>
116
+          <div style="text-align: center; letter-spacing: 3px">2000 年 2 月 4 日</div>
117
+        </div>
118
+      </div>
119
+    </div>
120
+  </div>
121
+</template>
122
+<script>
123
+import { jsGetAge, uParseTime } from "@/utils/tools";
124
+
125
+import { getDataConfig } from "@/utils/data";
126
+import { getAllDoctorList, getPatientCaseHistory } from "@/api/project/project";
127
+export default {
128
+  props: {
129
+    patient: Object,
130
+    hispatient: Object,
131
+    patientid: Number,
132
+    //   history:Object,
133
+  },
134
+  data() {
135
+    return {
136
+      educationOptions: [],
137
+      departmentList: [],
138
+      orgname: "",
139
+      history: {},
140
+      printDate: "",
141
+    };
142
+  },
143
+  methods: {
144
+    getAge(patient) {
145
+      var thisLen = patient.id_card_no.length;
146
+      var birth = "";
147
+      if (thisLen == 15) {
148
+        birth = "19" + patient.id_card_no.substr(6, 6);
149
+      } else {
150
+        birth = patient.id_card_no.substr(6, 8);
151
+      }
152
+      var births =
153
+        birth.substr(0, 4) +
154
+        "-" +
155
+        birth.substr(4, 2) +
156
+        "-" +
157
+        birth.substr(6, 2);
158
+      return jsGetAge(births, "-");
159
+    },
160
+    show(val) {
161
+      this.patientid = val;
162
+      this.getAllDoctorList();
163
+      this.getPatientCaseHistory();
164
+    },
165
+    getProfession(id) {
166
+      var name = "";
167
+      for (let i = 0; i < this.educationOptions.length; i++) {
168
+        if (id == this.educationOptions[i].id) {
169
+          name = this.educationOptions[i].name;
170
+        }
171
+      }
172
+      return name;
173
+    },
174
+    getAllDoctorList() {
175
+      getAllDoctorList().then((response) => {
176
+        if (response.data.state == 1) {
177
+          var doctor = response.data.data.doctor;
178
+
179
+          this.doctorList = doctor;
180
+          var department = response.data.data.department;
181
+          console.log("department", department);
182
+          this.departmentList = department;
183
+        }
184
+      });
185
+    },
186
+    getDoctor(id) {
187
+      var name = "";
188
+      for (let i = 0; i < this.doctorList.length; i++) {
189
+        if (id == this.doctorList[i].admin_user_id) {
190
+          name = this.doctorList[i].user_name;
191
+        }
192
+      }
193
+      return name;
194
+    },
195
+    getPatientCaseHistory() {
196
+      const params = {
197
+        patient_id: this.patientid,
198
+      };
199
+      console.log("病历22222", params);
200
+      getPatientCaseHistory(params).then((response) => {
201
+        if (response.data.state == 1) {
202
+          var patient = response.data.data.patient;
203
+          //    console.log("patinet",patient)
204
+          this.patient = patient;
205
+          var history = response.data.data.history;
206
+          console.log("中国history222222", history);
207
+          this.history = history;
208
+          var hispatient = response.data.data.hispatient;
209
+          //    console.log("hispatient",hispatient)
210
+          this.hispatient = hispatient;
211
+        }
212
+      });
213
+    },
214
+    getDeparment(id) {
215
+      var name = "";
216
+      for (let i = 0; i < this.departmentList.length; i++) {
217
+        if (id == this.departmentList[i].id) {
218
+          name = this.departmentList[i].name;
219
+        }
220
+      }
221
+      return name;
222
+    },
223
+  },
224
+  created() {
225
+    this.educationOptions = getDataConfig("patient", "education_types");
226
+    this.getAllDoctorList();
227
+    this.getPatientCaseHistory();
228
+
229
+    var xtuser = this.$store.getters.xt_user;
230
+    this.orgname = xtuser.org.org_name;
231
+    var data = new Date();
232
+    var month =
233
+      data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
234
+    var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
235
+    this.printDate = data.getFullYear() + "-" + month + "-" + date;
236
+  },
237
+  watch: {
238
+    patientid: function (val) {
239
+      console.log("val22332323", val);
240
+    },
241
+  },
242
+};
243
+</script>
244
+
245
+
246
+<style lang="scss" scoped>
247
+.prescription-print {
248
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
249
+    0 0 60px rgba(0, 0, 0, 0.06) inset;
250
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
251
+    0 0 40px rgba(0, 0, 0, 0.06) inset;
252
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
253
+  margin-bottom: 20px;
254
+  padding: 20px 10px;
255
+}
256
+.printTitle {
257
+  font-size: 22px;
258
+  text-align: center;
259
+  font-weight: bold;
260
+}
261
+.infoTitle {
262
+  display: flex;
263
+  margin-top: 10px;
264
+  line-height: 24px;
265
+  padding: 0 10px;
266
+}
267
+.infoTitle div {
268
+  width: 200px;
269
+}
270
+.otherInfo {
271
+  display: flex;
272
+  margin-top: 10px;
273
+  line-height: 24px;
274
+  padding: 0 10px;
275
+}
276
+.endInfo {
277
+  display: flex;
278
+  flex-direction: column;
279
+  justify-content: end;
280
+  margin-top: 10px;
281
+  line-height: 24px;
282
+}
283
+.endInfo div {
284
+  width: 300px;
285
+}
286
+.recordTitle {
287
+  display: flex;
288
+  justify-content: center;
289
+  flex-direction: column;
290
+  margin-top: 10px;
291
+  line-height: 24px;
292
+  padding: 0 10px;
293
+  border-top: 1px solid;
294
+}
295
+.recordTitle div {
296
+  width: 100%;
297
+  text-align: center;
298
+}
299
+.recordTitle .recordContent {
300
+  width: 100%;
301
+  height: 150px;
302
+  text-align: left;
303
+}
304
+</style>