liusheng
5 天以前 cc479e6a056785103996cc7ea67dbd5faa3e800e
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
190
191
192
193
194
195
package com.ruoyi.common.core.service.dto;
 
import java.io.Serializable;
import java.util.Date;
 
/**
 * 患者档案的随访侧只读行({@code pat_archive})。
 *
 * <h3>字段来源(@ b25c3b51)</h3>
 * 精确等于 {@code boxedServiceSubtask} / {@code boxedServiceSubtaskForOp} 对
 * {@code patArchive} 的 getter 访问集合(9 个):
 * <pre>
 * age  id  idcardno  name  notrequiredFlag  notrequiredreason  relativetelcode  sex  telcode
 * </pre>
 * 其余 {@code patArchive} 里的字段(病历、诊断、地址…)在随访组装里<b>一个都没用到</b>,
 * 所以刻意不搬 —— 本行只服务随访,不是"PatArchive 的副本"。
 *
 * <h3>⚠️ age 的取法要小心</h3>
 * smartor 的 {@code selectPatMedInhospList} 里 {@code age} 是
 * {@code a.age}(或 {@code CONCAT(a.age, a.age_unit)}),而 {@code PatArchive.age} 是 {@code Long}。
 * 搬迁时必须<b>逐字照抄原列表达式</b>,否则年龄会从"38"变成"38岁"这类不可见差异。
 * 本行按"查询里怎么写就怎么映射"处理,并在
 * {@code verify_inhospvisit_sql_expansion.py} 里逐条比对 SELECT 列清单。
 */
public class VisitArchiveRow implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    /** 患者档案ID(原 patArchive.id,Long) */
    private Long id;
 
    /** 姓名 */
    private String name;
 
    /** 身份证号 */
    private String idcardno;
 
    /** 手机号 */
    private String telcode;
 
    /** 亲属手机号(telcode 为空时兜底) */
    private String relativetelcode;
 
    /** 性别 */
    private Long sex;
 
    /** 年龄 */
    private Long age;
 
    /**
     * 出生日期。
     * <p>
     * ⚠️ 门诊列表富化需要它:原实现用 {@code patArchive.getBirthdate()} <b>现算</b>精确年龄
     * (年/月/日三段),而不是直接读 {@code age} 列。出入院侧不用这个字段,
     * 但两个模块共用本行类型,故一并带上 —— 只读查询多取一列,不影响已有分支。
     */
    private Date birthdate;
 
    /**
     * 年龄单位("岁"/"月"/"天")。
     * <p>
     * ⚠️ 这三个 {@code age*} 字段(含 {@link #age2} / {@link #ageUnit2})在原
     * {@code PatArchive} 里是<b>富化的中间变量</b>:门诊列表富化调 {@code calculateAge(...)}
     * 算出前三段后暂存在档案对象上,紧接着拼成门诊记录的 {@code age} 字符串。
     * <b>它们不落库、也不参与任何持久化</b>,此处仅为忠实保留原逻辑而存在。
     */
    private String ageUnit;
 
    /** 年龄第二段(与 {@link #age} 同段语义,见 {@link #ageUnit} 的说明) */
    private Long age2;
 
    /** 年龄第二段的单位(见 {@link #ageUnit} 的说明) */
    private String ageUnit2;
 
    /** 免随访标记:"1" = 不需要随访(原 notrequired_flag) */
    private String notrequiredFlag;
 
    /** 免随访原因(原 notrequired_reason) */
    private String notrequiredreason;
 
    /** 建档时间(仅日志/排查用) */
    private Date createTime;
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getIdcardno() {
        return idcardno;
    }
 
    public void setIdcardno(String idcardno) {
        this.idcardno = idcardno;
    }
 
    public String getTelcode() {
        return telcode;
    }
 
    public void setTelcode(String telcode) {
        this.telcode = telcode;
    }
 
    public String getRelativetelcode() {
        return relativetelcode;
    }
 
    public void setRelativetelcode(String relativetelcode) {
        this.relativetelcode = relativetelcode;
    }
 
    public Long getSex() {
        return sex;
    }
 
    public void setSex(Long sex) {
        this.sex = sex;
    }
 
    public Long getAge() {
        return age;
    }
 
    public void setAge(Long age) {
        this.age = age;
    }
 
    public Date getBirthdate() {
        return birthdate;
    }
 
    public void setBirthdate(Date birthdate) {
        this.birthdate = birthdate;
    }
 
    public String getAgeUnit() {
        return ageUnit;
    }
 
    public void setAgeUnit(String ageUnit) {
        this.ageUnit = ageUnit;
    }
 
    public Long getAge2() {
        return age2;
    }
 
    public void setAge2(Long age2) {
        this.age2 = age2;
    }
 
    public String getAgeUnit2() {
        return ageUnit2;
    }
 
    public void setAgeUnit2(String ageUnit2) {
        this.ageUnit2 = ageUnit2;
    }
 
    public String getNotrequiredFlag() {
        return notrequiredFlag;
    }
 
    public void setNotrequiredFlag(String notrequiredFlag) {
        this.notrequiredFlag = notrequiredFlag;
    }
 
    public String getNotrequiredreason() {
        return notrequiredreason;
    }
 
    public void setNotrequiredreason(String notrequiredreason) {
        this.notrequiredreason = notrequiredreason;
    }
 
    public Date getCreateTime() {
        return createTime;
    }
 
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}