WXL
13 小时以前 05c363fdd7ab04e3bd9a753e2c5d5bfff04d681c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  __name: "detail",
  setup(__props) {
    const record = common_vendor.ref({
      id: 1,
      hospitalName: "青岛镜湖医院",
      hospitalLogo: "/static/hospital/kiang-wu.jpg",
      hospitalAddress: "青岛连胜马路33号",
      departmentName: "心内科",
      departmentIcon: "/static/department/cardiology.png",
      doctorName: "张医生",
      doctorTitle: "主任医师",
      date: "2024-03-25",
      time: "09:30",
      fee: 60,
      status: "completed",
      statusText: "已完成",
      patientName: "张三",
      cardNo: "1234567890",
      diagnosis: {
        complaint: "胸闷、气短2天",
        result: "冠心病、高血压2级",
        advice: "建议定期复查,控制饮食,规律服药"
      },
      examinations: [
        {
          id: 1,
          name: "心电图检查",
          time: "2024-03-25 10:00",
          status: "completed",
          statusText: "已完成",
          hasReport: true
        },
        {
          id: 2,
          name: "血常规检查",
          time: "2024-03-25 10:30",
          status: "processing",
          statusText: "检验中"
        }
      ],
      prescriptions: [
        {
          name: "硝酸甘油片",
          specification: "0.5mg*50片/盒",
          dosage: "遵医嘱",
          frequency: "需要时含服",
          quantity: 1
        },
        {
          name: "阿司匹林肠溶片",
          specification: "100mg*30片/盒",
          dosage: "1片",
          frequency: "每日1次",
          quantity: 2
        }
      ],
      prescriptionAmount: 156.5
    });
    const getStatusDesc = (status) => {
      const desc = {
        upcoming: "请按时就诊,提前半小时到医院",
        completed: "就诊已完成,请遵医嘱用药",
        cancelled: "预约已取消,如需就诊请重新预约"
      };
      return desc[status];
    };
    const getStatusImage = (status) => {
      const images = {
        upcoming: "/static/status/upcoming.png",
        completed: "/static/status/completed.png",
        cancelled: "/static/status/cancelled.png"
      };
      return images[status];
    };
    const viewReport = (exam) => {
      if (exam.hasReport) {
        common_vendor.index.navigateTo({
          url: `/pages/records/report?id=${exam.id}`
        });
      }
    };
    const reschedule = () => {
      common_vendor.index.navigateTo({
        url: `/pages/appointment/schedule?recordId=${record.value.id}`
      });
    };
    const cancelAppointment = () => {
      common_vendor.index.showModal({
        title: "取消预约",
        content: "确定要取消该预约吗?",
        success: (res) => {
          if (res.confirm) {
            common_vendor.index.__f__("log", "at pages/records/detail.vue:241", "取消预约:", record.value.id);
          }
        }
      });
    };
    const viewAllReports = () => {
      common_vendor.index.navigateTo({
        url: `/pages/records/reports?recordId=${record.value.id}`
      });
    };
    const bookAgain = () => {
      common_vendor.index.navigateTo({
        url: `/pages/appointment/doctor?departmentId=${record.value.departmentId}&hospitalId=${record.value.hospitalId}`
      });
    };
    common_vendor.onMounted(() => {
      var _a, _b;
      const pages = getCurrentPages();
      const page = pages[pages.length - 1];
      (_b = (_a = page.$page) == null ? void 0 : _a.options) == null ? void 0 : _b.id;
      loadRecordDetail();
    });
    const loadRecordDetail = (id) => {
    };
    return (_ctx, _cache) => {
      var _a, _b, _c, _d;
      return common_vendor.e({
        a: common_vendor.t(record.value.statusText),
        b: common_vendor.t(getStatusDesc(record.value.status)),
        c: getStatusImage(record.value.status),
        d: common_vendor.n(record.value.status),
        e: record.value.hospitalLogo,
        f: common_vendor.t(record.value.hospitalName),
        g: common_vendor.t(record.value.hospitalAddress),
        h: common_vendor.o((...args) => _ctx.navigateToHospital && _ctx.navigateToHospital(...args)),
        i: record.value.departmentIcon,
        j: common_vendor.t(record.value.departmentName),
        k: common_vendor.t(record.value.doctorName),
        l: common_vendor.t(record.value.doctorTitle),
        m: common_vendor.t(record.value.date),
        n: common_vendor.t(record.value.time),
        o: common_vendor.t(record.value.patientName),
        p: common_vendor.t(record.value.cardNo),
        q: common_vendor.t(record.value.fee),
        r: record.value.diagnosis
      }, record.value.diagnosis ? {
        s: common_vendor.t(record.value.diagnosis.complaint),
        t: common_vendor.t(record.value.diagnosis.result),
        v: common_vendor.t(record.value.diagnosis.advice)
      } : {}, {
        w: (_a = record.value.examinations) == null ? void 0 : _a.length
      }, ((_b = record.value.examinations) == null ? void 0 : _b.length) ? {
        x: common_vendor.f(record.value.examinations, (exam, index, i0) => {
          return {
            a: common_vendor.t(exam.name),
            b: common_vendor.t(exam.time),
            c: common_vendor.t(exam.statusText),
            d: common_vendor.n(exam.status),
            e: index,
            f: common_vendor.o(($event) => viewReport(exam), index)
          };
        })
      } : {}, {
        y: (_c = record.value.prescriptions) == null ? void 0 : _c.length
      }, ((_d = record.value.prescriptions) == null ? void 0 : _d.length) ? {
        z: common_vendor.f(record.value.prescriptions, (medicine, index, i0) => {
          return {
            a: common_vendor.t(medicine.name),
            b: common_vendor.t(medicine.specification),
            c: common_vendor.t(medicine.dosage),
            d: common_vendor.t(medicine.frequency),
            e: common_vendor.t(medicine.quantity),
            f: index
          };
        }),
        A: common_vendor.t(record.value.prescriptionAmount)
      } : {}, {
        B: record.value.status === "upcoming"
      }, record.value.status === "upcoming" ? {
        C: common_vendor.o(reschedule),
        D: common_vendor.o(cancelAppointment)
      } : {}, {
        E: record.value.status === "completed"
      }, record.value.status === "completed" ? {
        F: common_vendor.o(viewAllReports),
        G: common_vendor.o(bookAgain)
      } : {}, {
        H: common_vendor.gei(_ctx, "")
      });
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/records/detail.js.map