Przeglądaj źródła

5月10日杨青

杨青 2 lat temu
rodzic
commit
7bc95c93e3

+ 289 - 0
src/xt_pages/outpatientDoctorStation/recordTemplate/printFour.vue Wyświetl plik

@@ -0,0 +1,289 @@
1
+<template>
2
+    <div id='prescription-print'>
3
+        <div class="prescription-print" style="box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;">
4
+            <div class="printTitle" style="border: none;">{{orgname}} &nbsp;&nbsp; 门诊病历</div>
5
+            <div class="infoTitle">
6
+                <div>姓名:{{patient.name?patient.name:''}}</div>
7
+                <div>性别:
8
+                    <span v-if="patient.gender == 1">男</span>
9
+                    <span v-if="patient.gender == 2">女</span>
10
+                </div>
11
+                <div>年龄:{{getAge(patient)?getAge(patient):""}}岁</div>
12
+            </div>
13
+            <div class="infoTitle">
14
+                <div>婚姻状况:
15
+                  <span v-if="patient.marital_status == 1">未婚</span>
16
+                  <span v-if="patient.marital_status == 2">已婚</span>
17
+                  <span v-if="patient.marital_status == 3">离异</span>
18
+                </div>
19
+                <div>职业:{{getProfession(patient.profession)?getProfession(patient.profession):''}}</div>
20
+                <div>病历编号:{{patient.id?patient.id:''}}</div>
21
+            </div>
22
+            <div class="infoTitle">
23
+                <div >医保号:{{patient.health_care_no?patient.health_care_no:''}}</div>
24
+                <div>联系电话:{{patient.phone?patient.phone:''}}</div>
25
+                <!-- <div style="flex:1;">{{patient.health_care_no?patient.health_care_no:''}}</div> -->
26
+            </div>
27
+            <!-- <div class="otherInfo">
28
+                <div>联系电话:{{patient.phone?patient.phone:''}}</div>
29
+                <div style="flex:1;">{{patient.phone?patient.phone:''}}</div>
30
+            </div> -->
31
+            <div class="otherInfo">
32
+                <div>通讯地址:</div>
33
+                <div style="flex:1;">{{patient.home_address?patient.home_address:''}}</div>
34
+            </div>
35
+            <!-- <div class="otherInfo">
36
+                <div>药物过敏史:</div>
37
+                <div style="flex:1;">{{patient.past_history?patient.past_history:''}}</div>
38
+            </div> -->
39
+            <!-- <div class="otherInfo">
40
+                <div>病历编号:</div>
41
+                <div style="flex:1;">{{patient.id?patient.id:''}}</div>
42
+            </div> -->
43
+
44
+            <div class="printTitle" style="border: none;margin-top: 10px;">病历内容</div>
45
+            <div class=" recordTitle" style=" border-bottom: 2px solid black;">
46
+                <div style="width: 230px;">科别:{{getDeparment(hispatient.departments)?getDeparment(hispatient.departments):''}}</div>
47
+                <div style="">姓名:{{patient.name?patient.name:''}}</div> 
48
+                <div >性别:
49
+                    <span v-if="patient.gender == 1">男</span>
50
+                    <span v-if="patient.gender == 2">女</span>
51
+                </div>
52
+               <div >年龄:{{patient.age?patient.age:''}}岁</div> 
53
+            </div> 
54
+            <div class="otherInfo">
55
+                <div class="otherName">主诉:</div>
56
+                <div style="flex:1;">{{history.chief_conplaint?history.chief_conplaint:''}}</div>
57
+            </div>
58
+            <div class="otherInfo">
59
+                <div class="otherName">现病史:</div>
60
+                <div style="flex:1;">{{history.history_of_present_illness?history.history_of_present_illness:''}}</div>
61
+            </div>
62
+            <div class="otherInfo">
63
+                <div class="otherName">既往史:</div>
64
+                <div style="flex:1;">{{history.past_history?history.past_history:''}}</div>
65
+            </div>
66
+            <!-- <div class="otherInfo">
67
+                <div class="otherName">药物过敏史:</div>
68
+                <div style="flex:1;">{{history.allergic_history?history.allergic_history:''}}</div>
69
+            </div>
70
+            <div class="otherInfo">
71
+                <div class="otherName">个人史:</div>
72
+                <div style="flex:1;">{{history.personal_history?history.personal_history:''}}</div>
73
+            </div>
74
+            <div class="otherInfo">
75
+                <div class="otherName">家族史:</div>
76
+                <div style="flex:1;">{{history.family_history?history.family_history:''}}</div>
77
+            </div> -->
78
+            <div class="otherInfo">
79
+                <div class="otherName">体格检查:</div>
80
+                <div style="flex:1;">
81
+                    <span>体温:{{ history.temperature ? history.temperature + '℃' : '/' }}</span>
82
+                    <span>脉搏:{{ history.pulse ? history.pulse + '次/分' : '/' }}</span>
83
+                    <span>呼吸:{{ history.breathing ? history.breathing + '次/分' : '/' }}</span>
84
+                    <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
85
+                </div>
86
+            </div>
87
+            <div class="otherInfo">
88
+                <div class="otherName">门诊诊断:</div>
89
+                <div style="flex:1;">{{history.diagnostic?history.diagnostic:''}}</div>
90
+            </div>
91
+            <div class="otherInfo">
92
+                <div class="otherName">门诊医嘱:</div>
93
+                <div style="flex:1;">{{history.doctor_advice?history.doctor_advice:''}}</div>
94
+            </div>
95
+            <div style="display:flex;justify-content: space-between;margin-bottom: 10px;">
96
+                <div style="margin-top:20px;">
97
+                    打印日期:{{ printDate }}
98
+                </div>
99
+                <div style="margin-top:20px;text-align:right;">
100
+                    医生签名:{{getDoctor(history.doctor)?getDoctor(history.doctor):''}}
101
+                </div>
102
+            </div>
103
+        </div>
104
+    
105
+        <!-- <div class="prescription-print">
106
+            
107
+        </div> -->
108
+    </div>
109
+    </template>
110
+    <script>
111
+      import { jsGetAge, uParseTime } from '@/utils/tools'
112
+    
113
+    import { getDataConfig } from "@/utils/data";
114
+    import { getAllDoctorList,getPatientCaseHistory } from "@/api/project/project"
115
+    export default {
116
+        props:{
117
+          patient:Object,
118
+          hispatient:Object,
119
+          patientid:Number
120
+        //   history:Object,
121
+        },
122
+        data(){
123
+            return{
124
+                educationOptions:[],
125
+                departmentList:[],
126
+                orgname:'',
127
+                history:{},
128
+                printDate:''
129
+            }
130
+        },
131
+        methods:{
132
+          getAge(patient){
133
+            var thisLen = patient.id_card_no.length
134
+            var birth = ''
135
+            if (thisLen == 15) {
136
+              birth = '19' + patient.id_card_no.substr(6, 6)
137
+            } else {
138
+              birth = patient.id_card_no.substr(6, 8)
139
+            }
140
+            var births =
141
+              birth.substr(0, 4) +
142
+              '-' +
143
+              birth.substr(4, 2) +
144
+              '-' +
145
+              birth.substr(6, 2)
146
+            return jsGetAge(births, '-')
147
+    
148
+          },
149
+          show(val){
150
+    
151
+            this.patientid = val
152
+            this.getAllDoctorList()
153
+            this.getPatientCaseHistory()
154
+          },
155
+          getProfession(id){
156
+            var name = ""
157
+            for(let i=0;i<this.educationOptions.length;i++){
158
+                if(id == this.educationOptions[i].id){
159
+                    name = this.educationOptions[i].name
160
+                }
161
+            }
162
+            return name
163
+          },
164
+          getAllDoctorList(){
165
+               getAllDoctorList().then(response=>{
166
+                 if(response.data.state == 1){
167
+                   var doctor =  response.data.data.doctor
168
+    
169
+                   this.doctorList = doctor
170
+                   var department = response.data.data.department
171
+                   console.log("department",department)
172
+                   this.departmentList = department
173
+                 }
174
+               })
175
+           },
176
+          getDoctor(id){
177
+            var name = ""
178
+            for(let i=0;i<this.doctorList.length;i++){
179
+              if(id == this.doctorList[i].admin_user_id){
180
+                  name = this.doctorList[i].user_name
181
+              }
182
+            }
183
+            return name
184
+          },
185
+          getPatientCaseHistory(){
186
+    
187
+            const params = {
188
+              patient_id:this.patientid
189
+            }
190
+          console.log("病历22222",params)
191
+          getPatientCaseHistory(params).then(response=>{
192
+             if(response.data.state == 1){
193
+               var patient = response.data.data.patient
194
+            //    console.log("patinet",patient)
195
+               this.patient = patient
196
+               var history = response.data.data.history
197
+               console.log("中国history222222",history)
198
+               this.history = history
199
+               var hispatient = response.data.data.hispatient
200
+            //    console.log("hispatient",hispatient)
201
+               this.hispatient = hispatient
202
+             }
203
+          })
204
+        },
205
+        getDeparment(id){
206
+    
207
+         var name = ''
208
+         for(let i=0;i<this.departmentList.length;i++){
209
+             if(id == this.departmentList[i].id){
210
+                name = this.departmentList[i].name
211
+             }
212
+          }
213
+          return name
214
+        },
215
+    
216
+    
217
+        },
218
+        created(){
219
+            this.educationOptions = getDataConfig("patient", "education_types");
220
+            this.getAllDoctorList()
221
+            this.getPatientCaseHistory()
222
+    
223
+            var xtuser = this.$store.getters.xt_user
224
+            this.orgname = xtuser.org.org_name
225
+            var data = new Date();
226
+            var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
227
+            var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
228
+            this.printDate = data.getFullYear() + "-" + month + "-" + date;
229
+        },
230
+        watch:{
231
+           'patientid':function(val){
232
+             console.log("val22332323",val)
233
+           }
234
+        }
235
+    }
236
+    </script>
237
+    
238
+    
239
+    <style lang="scss" scoped>
240
+    *{
241
+        margin: 0;
242
+        padding: 0;
243
+        border: 0;
244
+    }
245
+    .prescription-print{
246
+        // -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
247
+        // -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
248
+        // box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
249
+        margin-bottom: 20px;
250
+        padding:20px 10px;
251
+        font-size: 14px;
252
+    }
253
+    .printTitle{
254
+        font-size: 18px;
255
+        text-align: center;
256
+        font-weight: bold;
257
+        border: none;
258
+    }
259
+    .infoTitle{
260
+        display: flex;
261
+        // justify-content: space-around;
262
+        margin-top:10px;
263
+        line-height: 24px;
264
+        padding:0 10px;
265
+        border: none;
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
+    .recordTitle{
277
+        display: flex;
278
+        justify-content: space-around;
279
+        margin-top:10px;
280
+        line-height: 24px;
281
+        padding:0 10px;
282
+        // border-bottom: 2px solid #000;
283
+    }
284
+    .recordTitle div {
285
+        // display: inline-block;
286
+        width: 200px ;
287
+    }
288
+</style>
289
+