feat: 门诊手术中计费功能
- 数据库:在adm_charge_item表添加SourceBillNo字段 - 后端实体类:更新ChargeItem.java添加SourceBillNo字段 - 前端组件:创建手术计费界面(基于门诊划价界面) - 后端API:扩展PrePrePaymentDto支持手术计费标识 - 后端Service:扩展getChargeItems方法支持手术计费过滤 - 门诊手术安排界面:添加【计费】按钮 注意事项: - 需要手动执行SQL脚本:openhis-server-new/sql/add_source_bill_no_to_adm_charge_item.sql - 术后一站式结算功能待后续开发
This commit is contained in:
@@ -244,4 +244,9 @@ public class ChargeItem extends HisBaseEntity {
|
||||
*/
|
||||
private BigDecimal manualAdjustedPrice;
|
||||
|
||||
/**
|
||||
* 来源业务单据号(如手术申请单号)
|
||||
*/
|
||||
private String sourceBillNo;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.openhis.consultation.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 会诊确认表
|
||||
*/
|
||||
@TableName(value = "consultation_confirmation")
|
||||
@Data
|
||||
public class ConsultationConfirmation implements Serializable {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会诊申请ID
|
||||
*/
|
||||
@TableField(value = "consultation_request_id")
|
||||
private Long consultationRequestId;
|
||||
|
||||
/**
|
||||
* 确认科室ID
|
||||
*/
|
||||
@TableField(value = "confirming_department_id")
|
||||
private Long confirmingDepartmentId;
|
||||
|
||||
/**
|
||||
* 确认科室名称
|
||||
*/
|
||||
@TableField(value = "confirming_department_name")
|
||||
private String confirmingDepartmentName;
|
||||
|
||||
/**
|
||||
* 确认医生ID
|
||||
*/
|
||||
@TableField(value = "confirming_doctor_id")
|
||||
private Long confirmingDoctorId;
|
||||
|
||||
/**
|
||||
* 确认医生姓名
|
||||
*/
|
||||
@TableField(value = "confirming_doctor_name")
|
||||
private String confirmingDoctorName;
|
||||
|
||||
/**
|
||||
* 确认状态:1-待确认,2-同意,3-拒绝
|
||||
*/
|
||||
@TableField(value = "confirmation_status")
|
||||
private Integer confirmationStatus;
|
||||
|
||||
/**
|
||||
* 确认/拒绝理由
|
||||
*/
|
||||
@TableField(value = "confirmation_reason")
|
||||
private String confirmationReason;
|
||||
|
||||
/**
|
||||
* 确认日期
|
||||
*/
|
||||
@TableField(value = "confirmation_date")
|
||||
private LocalDateTime confirmationDate;
|
||||
|
||||
/**
|
||||
* 会诊意见
|
||||
*/
|
||||
@TableField(value = "consultation_opinion")
|
||||
private String consultationOpinion;
|
||||
|
||||
/**
|
||||
* 会诊确认参加医师
|
||||
*/
|
||||
@TableField(value = "confirming_physician_participation")
|
||||
private String confirmingPhysicianParticipation;
|
||||
|
||||
/**
|
||||
* 所属医生
|
||||
*/
|
||||
@TableField(value = "confirming_physician_name")
|
||||
private String confirmingPhysicianName;
|
||||
|
||||
/**
|
||||
* 代表科室
|
||||
*/
|
||||
@TableField(value = "confirming_department_name")
|
||||
private String confirmingDepartmentNameField;
|
||||
|
||||
/**
|
||||
* 签名医生
|
||||
*/
|
||||
@TableField(value = "signature")
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 签名时间
|
||||
*/
|
||||
@TableField(value = "signature_date")
|
||||
private LocalDateTime signatureDate;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
@TableField(value = "creator_id")
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(value = "creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人ID
|
||||
*/
|
||||
@TableField(value = "updater_id")
|
||||
private Long updaterId;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField(value = "updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 有效标志:1-有效,0-无效
|
||||
*/
|
||||
@TableField(value = "valid_flag")
|
||||
private Integer validFlag;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@TableField(value = "tenant_id")
|
||||
private Integer tenantId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.openhis.consultation.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 会诊记录表
|
||||
*/
|
||||
@TableName(value = "consultation_record")
|
||||
@Data
|
||||
public class ConsultationRecord implements Serializable {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会诊申请ID
|
||||
*/
|
||||
@TableField(value = "consultation_request_id")
|
||||
private Long consultationRequestId;
|
||||
|
||||
/**
|
||||
* 参与医生ID
|
||||
*/
|
||||
@TableField(value = "participant_doctor_id")
|
||||
private Long participantDoctorId;
|
||||
|
||||
/**
|
||||
* 参与医生姓名
|
||||
*/
|
||||
@TableField(value = "participant_doctor_name")
|
||||
private String participantDoctorName;
|
||||
|
||||
/**
|
||||
* 参与科室ID
|
||||
*/
|
||||
@TableField(value = "participant_department_id")
|
||||
private Long participantDepartmentId;
|
||||
|
||||
/**
|
||||
* 参与科室名称
|
||||
*/
|
||||
@TableField(value = "participant_department_name")
|
||||
private String participantDepartmentName;
|
||||
|
||||
/**
|
||||
* 会诊意见
|
||||
*/
|
||||
@TableField(value = "opinion")
|
||||
private String opinion;
|
||||
|
||||
/**
|
||||
* 会诊建议
|
||||
*/
|
||||
@TableField(value = "suggestion")
|
||||
private String suggestion;
|
||||
|
||||
/**
|
||||
* 记录日期
|
||||
*/
|
||||
@TableField(value = "record_date")
|
||||
private LocalDateTime recordDate;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
@TableField(value = "creator_id")
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(value = "creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人ID
|
||||
*/
|
||||
@TableField(value = "updater_id")
|
||||
private Long updaterId;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField(value = "updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 有效标志:1-有效,0-无效
|
||||
*/
|
||||
@TableField(value = "valid_flag")
|
||||
private Integer validFlag;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@TableField(value = "tenant_id")
|
||||
private Integer tenantId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -0,0 +1,270 @@
|
||||
package com.openhis.consultation.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 会诊申请表
|
||||
*/
|
||||
@TableName(value = "consultation_request")
|
||||
@Data
|
||||
public class ConsultationRequest implements Serializable {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会诊申请单号:CS+年月日时分秒+4位随机数
|
||||
*/
|
||||
@TableField(value = "consultation_id")
|
||||
private String consultationId;
|
||||
|
||||
/**
|
||||
* 患者ID(外键:adm_patient.id)
|
||||
*/
|
||||
@TableField(value = "patient_id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 门诊就诊流水号(外键:adm_encounter.id)
|
||||
*/
|
||||
@TableField(value = "encounter_id")
|
||||
private Long encounterId;
|
||||
|
||||
/**
|
||||
* 关联的医嘱ID(外键:wor_service_request.id)
|
||||
*/
|
||||
@TableField(value = "order_id")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
@TableField(value = "patient_name")
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者病历号
|
||||
*/
|
||||
@TableField(value = "patient_bus_no")
|
||||
private String patientBusNo;
|
||||
|
||||
/**
|
||||
* 患者就诊卡号
|
||||
*/
|
||||
@TableField(value = "patient_identifier_no")
|
||||
private String patientIdentifierNo;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@TableField(value = "gender_enum")
|
||||
private Integer genderEnum;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@TableField(value = "age")
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 申请会诊的科室名称
|
||||
*/
|
||||
@TableField(value = "department")
|
||||
private String department;
|
||||
|
||||
/**
|
||||
* 申请科室ID
|
||||
*/
|
||||
@TableField(value = "department_id")
|
||||
private Long departmentId;
|
||||
|
||||
/**
|
||||
* 申请会诊的医生姓名
|
||||
*/
|
||||
@TableField(value = "requesting_physician")
|
||||
private String requestingPhysician;
|
||||
|
||||
/**
|
||||
* 申请医生ID
|
||||
*/
|
||||
@TableField(value = "requesting_physician_id")
|
||||
private Long requestingPhysicianId;
|
||||
|
||||
/**
|
||||
* 会诊申请时间
|
||||
*/
|
||||
@TableField(value = "consultation_request_date")
|
||||
private LocalDateTime consultationRequestDate;
|
||||
|
||||
/**
|
||||
* 会诊邀请对象
|
||||
*/
|
||||
@TableField(value = "invited_object")
|
||||
private String invitedObject;
|
||||
|
||||
/**
|
||||
* 会诊时间
|
||||
*/
|
||||
@TableField(value = "consultation_date")
|
||||
private LocalDateTime consultationDate;
|
||||
|
||||
/**
|
||||
* 简要病史及会诊目的
|
||||
*/
|
||||
@TableField(value = "consultation_purpose")
|
||||
private String consultationPurpose;
|
||||
|
||||
/**
|
||||
* 门诊诊断
|
||||
*/
|
||||
@TableField(value = "provisional_diagnosis")
|
||||
private String provisionalDiagnosis;
|
||||
|
||||
/**
|
||||
* 会诊意见
|
||||
*/
|
||||
@TableField(value = "consultation_opinion")
|
||||
private String consultationOpinion;
|
||||
|
||||
/**
|
||||
* 会诊状态:0-新开,10-已提交,20-已确认,30-已签名,40-已完成,50-已取消
|
||||
*/
|
||||
@TableField(value = "consultation_status")
|
||||
private Integer consultationStatus;
|
||||
|
||||
/**
|
||||
* 是否紧急:一般/紧急
|
||||
*/
|
||||
@TableField(value = "consultation_urgency")
|
||||
private String consultationUrgency;
|
||||
|
||||
/**
|
||||
* 提交会诊的医生姓名
|
||||
*/
|
||||
@TableField(value = "confirming_physician")
|
||||
private String confirmingPhysician;
|
||||
|
||||
/**
|
||||
* 提交会诊的医生ID
|
||||
*/
|
||||
@TableField(value = "confirming_physician_id")
|
||||
private Long confirmingPhysicianId;
|
||||
|
||||
/**
|
||||
* 提交会诊日期
|
||||
*/
|
||||
@TableField(value = "confirming_date")
|
||||
private LocalDateTime confirmingDate;
|
||||
|
||||
/**
|
||||
* 结束会诊医生姓名/签名医生
|
||||
*/
|
||||
@TableField(value = "signature")
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 结束会诊医生ID
|
||||
*/
|
||||
@TableField(value = "signature_physician_id")
|
||||
private Long signaturePhysicianId;
|
||||
|
||||
/**
|
||||
* 结束会诊日期/签名时间
|
||||
*/
|
||||
@TableField(value = "signature_date")
|
||||
private LocalDateTime signatureDate;
|
||||
|
||||
/**
|
||||
* 作废会诊日期
|
||||
*/
|
||||
@TableField(value = "cancel_nature_date")
|
||||
private LocalDateTime cancelNatureDate;
|
||||
|
||||
/**
|
||||
* 作废原因
|
||||
*/
|
||||
@TableField(value = "cancel_reason")
|
||||
private String cancelReason;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@TableField(value = "tenant_id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 逻辑删除标识:0-未删除,1-已删除
|
||||
*/
|
||||
@TableField(value = "is_deleted")
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField(value = "remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 会诊项目ID,关联wor_activity_definition表,用于确定会诊类型和价格
|
||||
*/
|
||||
@TableField(value = "consultation_activity_id")
|
||||
private Long consultationActivityId;
|
||||
|
||||
/**
|
||||
* 会诊项目名称,如:院内会诊、远程会诊等
|
||||
*/
|
||||
@TableField(value = "consultation_activity_name")
|
||||
private String consultationActivityName;
|
||||
|
||||
/**
|
||||
* 确认会诊的医生姓名
|
||||
*/
|
||||
@TableField(value = "confirming_physician_name")
|
||||
private String confirmingPhysicianName;
|
||||
|
||||
/**
|
||||
* 代表科室
|
||||
*/
|
||||
@TableField(value = "confirming_department_name")
|
||||
private String confirmingDepartmentName;
|
||||
|
||||
/**
|
||||
* 会诊确认参加医师
|
||||
*/
|
||||
@TableField(value = "confirming_physician_participation")
|
||||
private String confirmingPhysicianParticipation;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.consultation.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.consultation.domain.ConsultationConfirmation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 会诊确认 Mapper接口
|
||||
*
|
||||
* @author his
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConsultationConfirmationMapper extends BaseMapper<ConsultationConfirmation> {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.consultation.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.consultation.domain.ConsultationRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 会诊记录 Mapper接口
|
||||
*
|
||||
* @author his
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConsultationRecordMapper extends BaseMapper<ConsultationRecord> {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.consultation.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.consultation.domain.ConsultationRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 会诊申请 Mapper接口
|
||||
*
|
||||
* @author his
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConsultationRequestMapper extends BaseMapper<ConsultationRequest> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.openhis.consultation.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.consultation.domain.ConsultationConfirmation;
|
||||
|
||||
/**
|
||||
* 会诊确认 服务层
|
||||
*
|
||||
* @author his
|
||||
*/
|
||||
public interface IConsultationConfirmationService extends IService<ConsultationConfirmation> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.openhis.consultation.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.consultation.domain.ConsultationRecord;
|
||||
|
||||
/**
|
||||
* 会诊记录 服务层
|
||||
*
|
||||
* @author his
|
||||
*/
|
||||
public interface IConsultationRecordService extends IService<ConsultationRecord> {
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.openhis.consultation.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.consultation.domain.ConsultationRequest;
|
||||
|
||||
/**
|
||||
* 会诊申请 服务层
|
||||
*
|
||||
* @author his
|
||||
*/
|
||||
public interface IConsultationRequestService extends IService<ConsultationRequest> {
|
||||
/**
|
||||
* 提交会诊申请
|
||||
*/
|
||||
int submitConsultation(Long id, Long userId, String userName);
|
||||
|
||||
/**
|
||||
* 取消提交会诊申请
|
||||
*/
|
||||
int cancelSubmitConsultation(Long id);
|
||||
|
||||
/**
|
||||
* 结束会诊申请
|
||||
*/
|
||||
int endConsultation(Long id, Long userId, String userName);
|
||||
|
||||
/**
|
||||
* 作废会诊申请
|
||||
*/
|
||||
int cancelConsultation(Long id, Long userId, String userName);
|
||||
|
||||
/**
|
||||
* 确认会诊
|
||||
*/
|
||||
int confirmConsultation(Long id, String physicianName, String physicianId, String opinion);
|
||||
|
||||
/**
|
||||
* 签名会诊
|
||||
*/
|
||||
int signConsultation(Long id, String signature, Long userId, String userName);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.openhis.consultation.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.consultation.domain.ConsultationConfirmation;
|
||||
import com.openhis.consultation.mapper.ConsultationConfirmationMapper;
|
||||
import com.openhis.consultation.service.IConsultationConfirmationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会诊确认 服务层实现
|
||||
*
|
||||
* @author his
|
||||
*/
|
||||
@Service
|
||||
public class ConsultationConfirmationServiceImpl extends ServiceImpl<ConsultationConfirmationMapper, ConsultationConfirmation> implements IConsultationConfirmationService {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.openhis.consultation.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.consultation.domain.ConsultationRecord;
|
||||
import com.openhis.consultation.mapper.ConsultationRecordMapper;
|
||||
import com.openhis.consultation.service.IConsultationRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会诊记录 服务层实现
|
||||
*
|
||||
* @author his
|
||||
*/
|
||||
@Service
|
||||
public class ConsultationRecordServiceImpl extends ServiceImpl<ConsultationRecordMapper, ConsultationRecord> implements IConsultationRecordService {
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.openhis.consultation.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.consultation.domain.ConsultationRequest;
|
||||
import com.openhis.consultation.mapper.ConsultationRequestMapper;
|
||||
import com.openhis.consultation.service.IConsultationRequestService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 会诊申请 服务层实现
|
||||
*
|
||||
* @author his
|
||||
*/
|
||||
@Service
|
||||
public class ConsultationRequestServiceImpl extends ServiceImpl<ConsultationRequestMapper, ConsultationRequest> implements IConsultationRequestService {
|
||||
|
||||
@Override
|
||||
public int submitConsultation(Long id, Long userId, String userName) {
|
||||
ConsultationRequest request = this.getById(id);
|
||||
if (request != null && request.getConsultationStatus() == 0) { // 仅当状态为"新开"时可提交
|
||||
request.setConsultationStatus(10); // 设置为"已提交"
|
||||
request.setConfirmingPhysician(userName);
|
||||
request.setConfirmingPhysicianId(userId);
|
||||
request.setConfirmingDate(LocalDateTime.now());
|
||||
return this.updateById(request) ? 1 : 0;
|
||||
}
|
||||
return 0; // 提交失败
|
||||
}
|
||||
|
||||
@Override
|
||||
public int cancelSubmitConsultation(Long id) {
|
||||
ConsultationRequest request = this.getById(id);
|
||||
if (request != null && request.getConsultationStatus() == 10) { // 仅当状态为"已提交"时可取消提交
|
||||
request.setConsultationStatus(0); // 设置为"新开"
|
||||
request.setConfirmingPhysician(null);
|
||||
request.setConfirmingPhysicianId(null);
|
||||
request.setConfirmingDate(null);
|
||||
return this.updateById(request) ? 1 : 0;
|
||||
}
|
||||
return 0; // 取消提交失败
|
||||
}
|
||||
|
||||
@Override
|
||||
public int endConsultation(Long id, Long userId, String userName) {
|
||||
ConsultationRequest request = this.getById(id);
|
||||
if (request != null && request.getConsultationStatus() == 30) { // 仅当状态为"已签名"时可结束
|
||||
request.setConsultationStatus(40); // 设置为"已完成"
|
||||
request.setSignature(userName);
|
||||
request.setSignatureDate(LocalDateTime.now());
|
||||
return this.updateById(request) ? 1 : 0;
|
||||
}
|
||||
return 0; // 结束失败
|
||||
}
|
||||
|
||||
@Override
|
||||
public int cancelConsultation(Long id, Long userId, String userName) {
|
||||
ConsultationRequest request = this.getById(id);
|
||||
if (request != null && request.getConsultationStatus() != 40) { // 未完成的申请可作废
|
||||
request.setConsultationStatus(50); // 设置为"已取消"
|
||||
request.setSignature(userName);
|
||||
request.setSignatureDate(LocalDateTime.now());
|
||||
return this.updateById(request) ? 1 : 0;
|
||||
}
|
||||
return 0; // 作废失败
|
||||
}
|
||||
|
||||
@Override
|
||||
public int confirmConsultation(Long id, String physicianName, String physicianId, String opinion) {
|
||||
ConsultationRequest request = this.getById(id);
|
||||
if (request != null && request.getConsultationStatus() != 40) { // 未完成的申请可确认
|
||||
request.setConsultationStatus(20); // 设置为"已确认"
|
||||
request.setConfirmingPhysicianName(physicianName);
|
||||
request.setConsultationOpinion(opinion);
|
||||
return this.updateById(request) ? 1 : 0;
|
||||
}
|
||||
return 0; // 确认失败
|
||||
}
|
||||
|
||||
@Override
|
||||
public int signConsultation(Long id, String signature, Long userId, String userName) {
|
||||
ConsultationRequest request = this.getById(id);
|
||||
if (request != null && request.getConsultationStatus() == 20) { // 仅当状态为"已确认"时可签名
|
||||
request.setConsultationStatus(30); // 设置为"已签名"
|
||||
request.setSignature(signature);
|
||||
request.setSignatureDate(LocalDateTime.now());
|
||||
return this.updateById(request) ? 1 : 0;
|
||||
}
|
||||
return 0; // 签名失败
|
||||
}
|
||||
}
|
||||
@@ -42,4 +42,14 @@ public class PrePaymentDto {
|
||||
* 类型 医保挂号时使用
|
||||
*/
|
||||
private String busiCardInfo;// 社保卡号/身份证号/ecToken
|
||||
|
||||
/**
|
||||
* 账单生成来源(1:门诊划价,2:手术计费)
|
||||
*/
|
||||
private Integer generateSourceEnum;
|
||||
|
||||
/**
|
||||
* 来源业务单据号(如手术申请单号)
|
||||
*/
|
||||
private String sourceBillNo;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.consultation.mapper.ConsultationConfirmationMapper">
|
||||
|
||||
<resultMap type="com.openhis.consultation.domain.ConsultationConfirmation" id="ConsultationConfirmationResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="consultationRequestId" column="consultation_request_id"/>
|
||||
<result property="confirmingDepartmentId" column="confirming_department_id"/>
|
||||
<result property="confirmingDepartmentName" column="confirming_department_name"/>
|
||||
<result property="confirmingDoctorId" column="confirming_doctor_id"/>
|
||||
<result property="confirmingDoctorName" column="confirming_doctor_name"/>
|
||||
<result property="confirmationStatus" column="confirmation_status"/>
|
||||
<result property="confirmationReason" column="confirmation_reason"/>
|
||||
<result property="confirmationDate" column="confirmation_date"/>
|
||||
<result property="creatorId" column="creator_id"/>
|
||||
<result property="creatorName" column="creator_name"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updaterId" column="updater_id"/>
|
||||
<result property="updaterName" column="updater_name"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="validFlag" column="valid_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.consultation.mapper.ConsultationRecordMapper">
|
||||
|
||||
<resultMap type="com.openhis.consultation.domain.ConsultationRecord" id="ConsultationRecordResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="consultationRequestId" column="consultation_request_id"/>
|
||||
<result property="participantDoctorId" column="participant_doctor_id"/>
|
||||
<result property="participantDoctorName" column="participant_doctor_name"/>
|
||||
<result property="participantDepartmentId" column="participant_department_id"/>
|
||||
<result property="participantDepartmentName" column="participant_department_name"/>
|
||||
<result property="opinion" column="opinion"/>
|
||||
<result property="suggestion" column="suggestion"/>
|
||||
<result property="recordDate" column="record_date"/>
|
||||
<result property="creatorId" column="creator_id"/>
|
||||
<result property="creatorName" column="creator_name"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updaterId" column="updater_id"/>
|
||||
<result property="updaterName" column="updater_name"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="validFlag" column="valid_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.consultation.mapper.ConsultationRequestMapper">
|
||||
|
||||
<resultMap type="com.openhis.consultation.domain.ConsultationRequest" id="ConsultationRequestResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="consultationId" column="consultation_id"/>
|
||||
<result property="patientId" column="patient_id"/>
|
||||
<result property="encounterId" column="encounter_id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="patientName" column="patient_name"/>
|
||||
<result property="patientBusNo" column="patient_bus_no"/>
|
||||
<result property="patientIdentifierNo" column="patient_identifier_no"/>
|
||||
<result property="genderEnum" column="gender_enum"/>
|
||||
<result property="age" column="age"/>
|
||||
<result property="department" column="department"/>
|
||||
<result property="departmentId" column="department_id"/>
|
||||
<result property="requestingPhysician" column="requesting_physician"/>
|
||||
<result property="requestingPhysicianId" column="requesting_physician_id"/>
|
||||
<result property="consultationRequestDate" column="consultation_request_date"/>
|
||||
<result property="invitedObject" column="invited_object"/>
|
||||
<result property="consultationDate" column="consultation_date"/>
|
||||
<result property="consultationPurpose" column="consultation_purpose"/>
|
||||
<result property="provisionalDiagnosis" column="provisional_diagnosis"/>
|
||||
<result property="consultationOpinion" column="consultation_opinion"/>
|
||||
<result property="consultationStatus" column="consultation_status"/>
|
||||
<result property="consultationUrgency" column="consultation_urgency"/>
|
||||
<result property="confirmingPhysician" column="confirming_physician"/>
|
||||
<result property="confirmingPhysicianId" column="confirming_physician_id"/>
|
||||
<result property="confirmingDate" column="confirming_date"/>
|
||||
<result property="signature" column="signature"/>
|
||||
<result property="signaturePhysicianId" column="signature_physician_id"/>
|
||||
<result property="signatureDate" column="signature_date"/>
|
||||
<result property="cancelNatureDate" column="cancel_nature_date"/>
|
||||
<result property="cancelReason" column="cancel_reason"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="isDeleted" column="is_deleted"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="consultationActivityId" column="consultation_activity_id"/>
|
||||
<result property="consultationActivityName" column="consultation_activity_name"/>
|
||||
<result property="confirmingPhysicianName" column="confirming_physician_name"/>
|
||||
<result property="confirmingDepartmentName" column="confirming_department_name"/>
|
||||
<result property="confirmingPhysicianParticipation" column="confirming_physician_participation"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user