package com.ruoyi.inhospvisit.domain.row;
|
|
import java.io.Serializable;
|
import java.util.Date;
|
|
/**
|
* {@code pat_med_inhosp} 的随访侧只读行。
|
*
|
* <h3>⚠️ 与本模块的 SQL 重复问题(必读)</h3>
|
* 同一张表在 smartor 的 {@code PatMedInhospMapper} 也有一份查询。这里<b>刻意各自持有一份</b>,
|
* 理由:
|
* <ul>
|
* <li>本模块的 {@code pom.xml} 只依赖 ruoyi-common(不依赖 smartor,否则循环依赖),
|
* 而 smartor 反过来要依赖本模块,所以只能自己查;</li>
|
* <li>纪律:<b>两边的 SQL 必须逐条等价</b>。由
|
* {@code sql/_probe/verify_inhospvisit_mapper.py}(接口↔XML 一致性)与
|
* {@code sql/_probe/verify_inhospvisit_sql_expansion.py}(展开后逐条比对,AND 顺序无关)
|
* 双向把关。改任一边都必须同步改另一边并重跑这两个探针。</li>
|
* <li>⚠️ 还有一条更硬的纪律:<b>XML 里出现的每个属性,本类都必须有 getter</b>。
|
* 因为"逐条等价"意味着 XML 保留了原文件的全部 {@code <if test=...>}(含随访链上
|
* 不可达的那些),而 MyBatis 用 OGNL 求值这些 {@code test}——
|
* 缺 getter 会直接抛 {@code ReflectionException}(不是"条件不成立")。
|
* 2026-10 就是这么把 {@code dealOutHospInfo} 整条打停的(缺 {@code startOutHospTime}
|
* 等 15 个过滤属性)。守卫:{@code sql/_probe/verify_mapper_ognl_params.py}(全仓)。</li>
|
* <li>另一种做法是把查询"包一层端口"委托回 smartor,但那样本模块就只剩编排逻辑、
|
* CRUD 全靠回调,反而更碎。这里选择了"重复但可验证"。</li>
|
* </ul>
|
*
|
* <h3>字段来源(@ b25c3b51)</h3>
|
* 字段集是按 <b>{@code boxedServiceSubtask} 与编排层的真实 getter 访问</b>倒推出来的:
|
* <ul>
|
* <li>盒子组装用 24 个:{@code Campusid Deptcode Deptname Diagname Drcode Drname Endtime Fudate
|
* Hospitaldistrictcode Hospitaldistrictname Inhospid Leavediagname Leavehospitaldistrictcode
|
* Leavehospitaldistrictname Leaveicd10code Leaveldeptcode Leaveldeptname ManagementDoctor
|
* ManagementDoctorCode NurseId NurseName Orgid Remark Starttime};</li>
|
* <li>扫描/停机用:{@code deptcheck_flag wardcheck_flag diagcheck_flag schedulecheck_flag
|
* in_deptcheck_flag in_wardcheck_flag inhospstate fuflag patid long_task_reason};</li>
|
* <li>日志用:{@code patname patno serialnum medical_code}。</li>
|
* </ul>
|
* <b>少一个字段 = 对应的 setter 静默不生效</b>(XML 里是 {@code <if test="xxx != null">}),
|
* 所以这里不做"精简",宁可多带几个。
|
*/
|
public class VisitInhospRow implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
// ==================== 主键与归属 ====================
|
/** 出入院记录ID */
|
private Long inhospid;
|
/** 患者档案ID(Long,与 PatArchive.id 一致) */
|
private Long patid;
|
/** 机构ID */
|
private String orgid;
|
/** 院区ID */
|
private String campusid;
|
/** 患者编号 */
|
private String patno;
|
/** 住院流水号 */
|
private String serialnum;
|
/** 患者姓名(仅日志用) */
|
private String patname;
|
/** 住院号(原 inhospno)—— 仅日志/排查用 */
|
private String inhospno;
|
/**
|
* 患者年龄。
|
* <p>
|
* ⚠️ 来源是 JOIN 出来的 {@code pat_archive.age}(原 SQL 写的 {@code a.age AS age}),
|
* 类型 {@code Long};{@code selectByInhospid} 那条单表查询<b>不带</b> age(与原实现一致),
|
* 所以按主键查出来的行里这个字段是 null。
|
*/
|
private Long age;
|
/** 患者性别(来源 {@code pat_archive.sex},原 SQL 是 {@code a.sex}) */
|
private Long sex;
|
/** 患者手机号(来源 {@code pat_archive.telcode},原 SQL 是 {@code a.telcode as telcode}) */
|
private String telcode;
|
|
// ==================== 时间 ====================
|
/** 入院时间 */
|
private Date starttime;
|
/** 出院时间 */
|
private Date endtime;
|
/** HIS 给的随访时间 */
|
private Date fudate;
|
|
// ==================== 入院维度 ====================
|
/** 入院科室编码 */
|
private String deptcode;
|
/** 入院科室名称 */
|
private String deptname;
|
/** 入院病区编码 */
|
private String hospitaldistrictcode;
|
/** 入院病区名称 */
|
private String hospitaldistrictname;
|
|
// ==================== 离院维度 ====================
|
/** 离院科室编码 */
|
private String leaveldeptcode;
|
/** 离院科室名称 */
|
private String leaveldeptname;
|
/** 离院病区编码 */
|
private String leavehospitaldistrictcode;
|
/** 离院病区名称 */
|
private String leavehospitaldistrictname;
|
|
// ==================== 诊断 ====================
|
/** 离院 ICD10 编码 */
|
private String leaveicd10code;
|
/** 离院诊断名称 */
|
private String leavediagname;
|
/** 诊断名称 */
|
private String diagname;
|
|
// ==================== 医护 ====================
|
/** 责任护士ID */
|
private String nurseId;
|
/** 责任护士姓名 */
|
private String nurseName;
|
/** 医生编码 */
|
private String drcode;
|
/** 医生姓名 */
|
private String drname;
|
/** 管理医生 */
|
private String managementDoctor;
|
/** 管理医生编码 */
|
private String managementDoctorCode;
|
|
// ==================== 随访状态标志(随访状态机本体) ====================
|
/** 离院科室维度是否已处理:0=未处理 1=已处理 2=跳过/失败 */
|
private String deptcheckFlag;
|
/** 离院病区维度是否已处理 */
|
private String wardcheckFlag;
|
/** 疾病维度是否已处理 */
|
private String diagcheckFlag;
|
/** 任务组是否已纳入(独立于上面三个维度) */
|
private String scheduleCheckFlag;
|
/** 入院科室宣教维度是否已处理 */
|
private String inDeptcheckFlag;
|
/** 入院病区宣教维度是否已处理 */
|
private String inWardcheckFlag;
|
/** 在院状态:0=在院 1=已出院 2=转科 3=预入院 */
|
private String inhospstate;
|
/** 是否需要随访:1=需要 */
|
private String fuflag;
|
/** 未生成任务的原因累积 */
|
private String longTaskReason;
|
|
// ==================== 其它 ====================
|
/** 备注 */
|
private String remark;
|
/** 药品编码串(仅 sltd 药品宣教用) */
|
private String medicalCode;
|
|
public Long getInhospid() {
|
return inhospid;
|
}
|
|
public void setInhospid(Long inhospid) {
|
this.inhospid = inhospid;
|
}
|
|
public Long getPatid() {
|
return patid;
|
}
|
|
public void setPatid(Long patid) {
|
this.patid = patid;
|
}
|
|
public String getOrgid() {
|
return orgid;
|
}
|
|
public void setOrgid(String orgid) {
|
this.orgid = orgid;
|
}
|
|
public String getCampusid() {
|
return campusid;
|
}
|
|
public void setCampusid(String campusid) {
|
this.campusid = campusid;
|
}
|
|
public String getPatno() {
|
return patno;
|
}
|
|
public void setPatno(String patno) {
|
this.patno = patno;
|
}
|
|
public String getSerialnum() {
|
return serialnum;
|
}
|
|
public void setSerialnum(String serialnum) {
|
this.serialnum = serialnum;
|
}
|
|
public String getPatname() {
|
return patname;
|
}
|
|
public void setPatname(String patname) {
|
this.patname = patname;
|
}
|
|
public String getInhospno() {
|
return inhospno;
|
}
|
|
public void setInhospno(String inhospno) {
|
this.inhospno = inhospno;
|
}
|
|
public Long getAge() {
|
return age;
|
}
|
|
public void setAge(Long age) {
|
this.age = age;
|
}
|
|
public Long getSex() {
|
return sex;
|
}
|
|
public void setSex(Long sex) {
|
this.sex = sex;
|
}
|
|
public String getTelcode() {
|
return telcode;
|
}
|
|
public void setTelcode(String telcode) {
|
this.telcode = telcode;
|
}
|
|
public Date getStarttime() {
|
return starttime;
|
}
|
|
public void setStarttime(Date starttime) {
|
this.starttime = starttime;
|
}
|
|
public Date getEndtime() {
|
return endtime;
|
}
|
|
public void setEndtime(Date endtime) {
|
this.endtime = endtime;
|
}
|
|
public Date getFudate() {
|
return fudate;
|
}
|
|
public void setFudate(Date fudate) {
|
this.fudate = fudate;
|
}
|
|
public String getDeptcode() {
|
return deptcode;
|
}
|
|
public void setDeptcode(String deptcode) {
|
this.deptcode = deptcode;
|
}
|
|
public String getDeptname() {
|
return deptname;
|
}
|
|
public void setDeptname(String deptname) {
|
this.deptname = deptname;
|
}
|
|
public String getHospitaldistrictcode() {
|
return hospitaldistrictcode;
|
}
|
|
public void setHospitaldistrictcode(String hospitaldistrictcode) {
|
this.hospitaldistrictcode = hospitaldistrictcode;
|
}
|
|
public String getHospitaldistrictname() {
|
return hospitaldistrictname;
|
}
|
|
public void setHospitaldistrictname(String hospitaldistrictname) {
|
this.hospitaldistrictname = hospitaldistrictname;
|
}
|
|
public String getLeaveldeptcode() {
|
return leaveldeptcode;
|
}
|
|
public void setLeaveldeptcode(String leaveldeptcode) {
|
this.leaveldeptcode = leaveldeptcode;
|
}
|
|
public String getLeaveldeptname() {
|
return leaveldeptname;
|
}
|
|
public void setLeaveldeptname(String leaveldeptname) {
|
this.leaveldeptname = leaveldeptname;
|
}
|
|
public String getLeavehospitaldistrictcode() {
|
return leavehospitaldistrictcode;
|
}
|
|
public void setLeavehospitaldistrictcode(String leavehospitaldistrictcode) {
|
this.leavehospitaldistrictcode = leavehospitaldistrictcode;
|
}
|
|
public String getLeavehospitaldistrictname() {
|
return leavehospitaldistrictname;
|
}
|
|
public void setLeavehospitaldistrictname(String leavehospitaldistrictname) {
|
this.leavehospitaldistrictname = leavehospitaldistrictname;
|
}
|
|
public String getLeaveicd10code() {
|
return leaveicd10code;
|
}
|
|
public void setLeaveicd10code(String leaveicd10code) {
|
this.leaveicd10code = leaveicd10code;
|
}
|
|
public String getLeavediagname() {
|
return leavediagname;
|
}
|
|
public void setLeavediagname(String leavediagname) {
|
this.leavediagname = leavediagname;
|
}
|
|
public String getDiagname() {
|
return diagname;
|
}
|
|
public void setDiagname(String diagname) {
|
this.diagname = diagname;
|
}
|
|
public String getNurseId() {
|
return nurseId;
|
}
|
|
public void setNurseId(String nurseId) {
|
this.nurseId = nurseId;
|
}
|
|
public String getNurseName() {
|
return nurseName;
|
}
|
|
public void setNurseName(String nurseName) {
|
this.nurseName = nurseName;
|
}
|
|
public String getDrcode() {
|
return drcode;
|
}
|
|
public void setDrcode(String drcode) {
|
this.drcode = drcode;
|
}
|
|
public String getDrname() {
|
return drname;
|
}
|
|
public void setDrname(String drname) {
|
this.drname = drname;
|
}
|
|
public String getManagementDoctor() {
|
return managementDoctor;
|
}
|
|
public void setManagementDoctor(String managementDoctor) {
|
this.managementDoctor = managementDoctor;
|
}
|
|
public String getManagementDoctorCode() {
|
return managementDoctorCode;
|
}
|
|
public void setManagementDoctorCode(String managementDoctorCode) {
|
this.managementDoctorCode = managementDoctorCode;
|
}
|
|
public String getDeptcheckFlag() {
|
return deptcheckFlag;
|
}
|
|
public void setDeptcheckFlag(String deptcheckFlag) {
|
this.deptcheckFlag = deptcheckFlag;
|
}
|
|
public String getWardcheckFlag() {
|
return wardcheckFlag;
|
}
|
|
public void setWardcheckFlag(String wardcheckFlag) {
|
this.wardcheckFlag = wardcheckFlag;
|
}
|
|
public String getDiagcheckFlag() {
|
return diagcheckFlag;
|
}
|
|
public void setDiagcheckFlag(String diagcheckFlag) {
|
this.diagcheckFlag = diagcheckFlag;
|
}
|
|
public String getScheduleCheckFlag() {
|
return scheduleCheckFlag;
|
}
|
|
public void setScheduleCheckFlag(String scheduleCheckFlag) {
|
this.scheduleCheckFlag = scheduleCheckFlag;
|
}
|
|
public String getInDeptcheckFlag() {
|
return inDeptcheckFlag;
|
}
|
|
public void setInDeptcheckFlag(String inDeptcheckFlag) {
|
this.inDeptcheckFlag = inDeptcheckFlag;
|
}
|
|
public String getInWardcheckFlag() {
|
return inWardcheckFlag;
|
}
|
|
public void setInWardcheckFlag(String inWardcheckFlag) {
|
this.inWardcheckFlag = inWardcheckFlag;
|
}
|
|
public String getInhospstate() {
|
return inhospstate;
|
}
|
|
public void setInhospstate(String inhospstate) {
|
this.inhospstate = inhospstate;
|
}
|
|
public String getFuflag() {
|
return fuflag;
|
}
|
|
public void setFuflag(String fuflag) {
|
this.fuflag = fuflag;
|
}
|
|
public String getLongTaskReason() {
|
return longTaskReason;
|
}
|
|
public void setLongTaskReason(String longTaskReason) {
|
this.longTaskReason = longTaskReason;
|
}
|
|
public String getRemark() {
|
return remark;
|
}
|
|
public void setRemark(String remark) {
|
this.remark = remark;
|
}
|
|
public String getMedicalCode() {
|
return medicalCode;
|
}
|
|
public void setMedicalCode(String medicalCode) {
|
this.medicalCode = medicalCode;
|
}
|
|
// ==========================================================================
|
// 以下字段【不是 pat_med_inhosp 的列】,只作为 selectForScan 的过滤条件/排序开关。
|
// 放在同一个行对象里,是为了让"查询条件"与"结果行"共用一套属性名 ——
|
// 与原实现"用 PatMedInhosp 当查询入参"的写法保持一致,避免两套类来回映射出错。
|
//
|
// ⚠️⚠️ 这一组【必须有 getter】,哪怕随访生成链上一个都不设它:
|
// `VisitInhospMapper.xml#selectForScan` 是从原 `PatMedInhospMapper.xml` 逐条照抄的,
|
// 里面保留了原文件的全部 `<if test="xxx != null">`(含随访链上不可达的那些)。
|
// MyBatis 用 OGNL 求值 `test`,**读不到 getter 不是"条件不成立",而是直接抛**:
|
// ReflectionException: There is no getter for property named 'startOutHospTime'
|
// in 'class com.ruoyi.inhospvisit.domain.row.VisitInhospRow'
|
// 后果是 `InhospVisitTaskService#dealOutHospInfo` 在第一次 `selectForScan` 就中断,
|
// 一条随访任务都不生成(2026-10 实机踩到,`sys_job_log` 里表现为
|
// `InvocationTargetException`,很容易误判成模块开关没开)。
|
// 守卫:`sql/_probe/verify_mapper_ognl_params.py`(全仓)
|
// (XML 引用属性 ⊆ 参数类 getter,缺一个就 FAIL)。
|
// ==========================================================================
|
|
/**
|
* 出院/在院维度开关(原 {@code PatMedInhosp.cry}):
|
* 0=在院({@code endtime is null})、1=已出院、2=转科、3=预入院。
|
* <p>
|
* ⚠️ 类型与原实体一致是 {@code Integer},因为 XML 里是**数值比较**
|
* ({@code cry == 0/1/2/3})—— 写成 String 会让 OGNL 靠隐式转换去比,语义不明确。
|
* <p>
|
* ⚠️ 它同时决定排序:{@code cry=1/2/3} → {@code order by endtime desc};
|
* {@code cry=0} → 按 {@link #bedSort} 三选一。
|
*/
|
private Integer cry;
|
|
/**
|
* 在院患者({@code cry=0})的床位排序方向:"asc" / "desc";其它值走默认排序。
|
* <p>
|
* 原 {@code PatMedInhospMapper.xml} L382-405 的 {@code <choose>} 用它三选一,
|
* 床位按自然序排(空床位最后 → 纯数字按数值 → 带字母按长度+字符串 → inhospid 兜底)。
|
*/
|
private String bedSort;
|
|
// ---- 时间区间过滤(原 PatMedInhospMapper.xml 的 4 个 <if>) ----
|
/** 过滤:出院时间区间下界 */
|
private Date startOutHospTime;
|
/** 过滤:出院时间区间上界 */
|
private Date endOutHospTime;
|
/** 过滤:入院时间区间下界 */
|
private Date startInHospTime;
|
/** 过滤:入院时间区间上界 */
|
private Date endInHospTime;
|
|
// ---- 单值过滤(随访链不可达,但 XML 里保留了条件) ----
|
/** 过滤:导诊挂号标识(原 {@code inhosp_myd_flag}) */
|
private String inhospMydFlag;
|
/** 过滤:床位号(原 {@code bed_no}) */
|
private String bedNo;
|
/** 过滤:离院方式ID */
|
private String outWayId;
|
/** 过滤:离院方式名称 */
|
private String outWayName;
|
/** 过滤:就诊来源ID */
|
private String encounterSourceId;
|
/** 过滤:重要程度代码 */
|
private String importanceFlagCode;
|
/** 过滤:急诊分级代码 */
|
private String emergencyLevelCode;
|
/** 过滤:医院名称(原 XML 里该列未加表别名) */
|
private String hospitalname;
|
/** 过滤:药品名称(省立同德药品宣教) */
|
private String medicalName;
|
/** 过滤:药品公司(省立同德药品宣教) */
|
private String medicalCompany;
|
/** 过滤:排班状态(原类型 {@code Long}) */
|
private Long schemestatus;
|
|
/** 过滤:离院科室编码列表(原 {@code leaveldeptcodes}) */
|
private java.util.List<String> leaveldeptcodes;
|
/** 过滤:离院病区编码列表(原 {@code leavehospitaldistrictcodes}) */
|
private java.util.List<String> leavehospitaldistrictcodes;
|
/** 过滤:入院病区编码列表(原 {@code hospitaldistrictcodeList}) */
|
private java.util.List<String> hospitaldistrictcodeList;
|
/** 过滤:入院科室编码列表(原 {@code deptcodeList}) */
|
private java.util.List<String> deptcodeList;
|
/** 过滤:离院 ICD10 编码列表(原 {@code icd10codeList}) */
|
private java.util.List<String> icd10codeList;
|
|
public Integer getCry() {
|
return cry;
|
}
|
|
public void setCry(Integer cry) {
|
this.cry = cry;
|
}
|
|
public String getBedSort() {
|
return bedSort;
|
}
|
|
public void setBedSort(String bedSort) {
|
this.bedSort = bedSort;
|
}
|
|
public Date getStartOutHospTime() {
|
return startOutHospTime;
|
}
|
|
public void setStartOutHospTime(Date startOutHospTime) {
|
this.startOutHospTime = startOutHospTime;
|
}
|
|
public Date getEndOutHospTime() {
|
return endOutHospTime;
|
}
|
|
public void setEndOutHospTime(Date endOutHospTime) {
|
this.endOutHospTime = endOutHospTime;
|
}
|
|
public Date getStartInHospTime() {
|
return startInHospTime;
|
}
|
|
public void setStartInHospTime(Date startInHospTime) {
|
this.startInHospTime = startInHospTime;
|
}
|
|
public Date getEndInHospTime() {
|
return endInHospTime;
|
}
|
|
public void setEndInHospTime(Date endInHospTime) {
|
this.endInHospTime = endInHospTime;
|
}
|
|
public String getInhospMydFlag() {
|
return inhospMydFlag;
|
}
|
|
public void setInhospMydFlag(String inhospMydFlag) {
|
this.inhospMydFlag = inhospMydFlag;
|
}
|
|
public String getBedNo() {
|
return bedNo;
|
}
|
|
public void setBedNo(String bedNo) {
|
this.bedNo = bedNo;
|
}
|
|
public String getOutWayId() {
|
return outWayId;
|
}
|
|
public void setOutWayId(String outWayId) {
|
this.outWayId = outWayId;
|
}
|
|
public String getOutWayName() {
|
return outWayName;
|
}
|
|
public void setOutWayName(String outWayName) {
|
this.outWayName = outWayName;
|
}
|
|
public String getEncounterSourceId() {
|
return encounterSourceId;
|
}
|
|
public void setEncounterSourceId(String encounterSourceId) {
|
this.encounterSourceId = encounterSourceId;
|
}
|
|
public String getImportanceFlagCode() {
|
return importanceFlagCode;
|
}
|
|
public void setImportanceFlagCode(String importanceFlagCode) {
|
this.importanceFlagCode = importanceFlagCode;
|
}
|
|
public String getEmergencyLevelCode() {
|
return emergencyLevelCode;
|
}
|
|
public void setEmergencyLevelCode(String emergencyLevelCode) {
|
this.emergencyLevelCode = emergencyLevelCode;
|
}
|
|
public String getHospitalname() {
|
return hospitalname;
|
}
|
|
public void setHospitalname(String hospitalname) {
|
this.hospitalname = hospitalname;
|
}
|
|
public String getMedicalName() {
|
return medicalName;
|
}
|
|
public void setMedicalName(String medicalName) {
|
this.medicalName = medicalName;
|
}
|
|
public String getMedicalCompany() {
|
return medicalCompany;
|
}
|
|
public void setMedicalCompany(String medicalCompany) {
|
this.medicalCompany = medicalCompany;
|
}
|
|
public Long getSchemestatus() {
|
return schemestatus;
|
}
|
|
public void setSchemestatus(Long schemestatus) {
|
this.schemestatus = schemestatus;
|
}
|
|
public java.util.List<String> getLeaveldeptcodes() {
|
return leaveldeptcodes;
|
}
|
|
public void setLeaveldeptcodes(java.util.List<String> leaveldeptcodes) {
|
this.leaveldeptcodes = leaveldeptcodes;
|
}
|
|
public java.util.List<String> getLeavehospitaldistrictcodes() {
|
return leavehospitaldistrictcodes;
|
}
|
|
public void setLeavehospitaldistrictcodes(java.util.List<String> leavehospitaldistrictcodes) {
|
this.leavehospitaldistrictcodes = leavehospitaldistrictcodes;
|
}
|
|
public java.util.List<String> getHospitaldistrictcodeList() {
|
return hospitaldistrictcodeList;
|
}
|
|
public void setHospitaldistrictcodeList(java.util.List<String> hospitaldistrictcodeList) {
|
this.hospitaldistrictcodeList = hospitaldistrictcodeList;
|
}
|
|
public java.util.List<String> getDeptcodeList() {
|
return deptcodeList;
|
}
|
|
public void setDeptcodeList(java.util.List<String> deptcodeList) {
|
this.deptcodeList = deptcodeList;
|
}
|
|
public java.util.List<String> getIcd10codeList() {
|
return icd10codeList;
|
}
|
|
public void setIcd10codeList(java.util.List<String> icd10codeList) {
|
this.icd10codeList = icd10codeList;
|
}
|
}
|