输血评估

This commit is contained in:
jiangs 2026-06-17 09:19:50 +08:00
parent 9dbdcb4d51
commit 8031411716
34 changed files with 25162 additions and 84 deletions

View File

@ -1,5 +1,8 @@
package com.czblood.bus.constants;
/**
* 接口常量类
*/
public class BloodInterfaceTypeConstants {
/**
* 申请单审核

View File

@ -5,4 +5,6 @@ package com.czblood.bus.constants;
*/
public class BloodSysLogConstants {
public static final String LOG_TYPE_TRANSFUSE_APPLY_BEFORE = "输血前评估";
public static final String LOG_TYPE_YLJG = "医疗机构";
public static final String LOG_TYPE_DMZD = "代码字典";
}

View File

@ -1,10 +0,0 @@
package com.czblood.bus.mapper;
import com.czblood.bus.pojo.XkHosInfo;
import java.util.List;
public interface XKHosInfoMapper {
List<XkHosInfo> query(XkHosInfo xkHosInfo);
}

View File

@ -0,0 +1,13 @@
package com.czblood.bus.mapper;
import com.czblood.bus.pojo.XkHosInfo;
import java.util.List;
public interface XkHosInfoMapper {
List<XkHosInfo> queryList(XkHosInfo xkHosInfo);
XkHosInfo queryOne(String hospital_code);
void insert(XkHosInfo xkHosInfo);
void update(XkHosInfo xkHosInfo);
}

View File

@ -9,4 +9,5 @@ public interface XkTransfuseApplyBeforeMapper {
void insertXkTransfuseApplyBefore(XkTransfuseApplyBefore xkTransfuseApplyBefore);
void updateXkTransfuseApplyBefore(XkTransfuseApplyBefore xkTransfuseApplyBefore);
void deleteXkTransfuseApplyBefore(String bill_no);
XkTransfuseApplyBefore queryOne(String bill_no);
}

View File

@ -1,6 +1,8 @@
package com.czblood.bus.pojo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -8,18 +10,29 @@ import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(("医院信息"))
@ApiModel("医院信息")
public class XkHosInfo {
@ApiModelProperty("医院编码")
private String hospital_code;
@ApiModelProperty("医院名称")
private String hospital_name;
@ApiModelProperty("医院地址")
private String address;
@ApiModelProperty("邮政编码")
private String post_code;
@ApiModelProperty("电话")
private String telno;
@ApiModelProperty("联系人")
private String link_person;
@ApiModelProperty("类型")
private String org_kind;
@ApiModelProperty("结算类型")
private String foot_mode;
@ApiModelProperty("所属行政区")
private String org_zone;
@ApiModelProperty("所属街道")
private String org_street;
@ApiModelProperty(value = "使用标志,Y使用,N不使用")
private String sfby;
private String last_modified;
}

View File

@ -7,6 +7,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.util.Date;
@Data
@ -17,8 +18,10 @@ public class XkPatientInfo {
@ApiModelProperty("医疗机构ID")
private String hos_id;
@ApiModelProperty("住院号")
@NotBlank(message = "住院号不能为空")
private String beinhos_id;
@ApiModelProperty("病人姓名")
@NotBlank(message = "病人姓名不能为空")
private String patient_name;
@ApiModelProperty("病人性别")
private String patient_sex;

View File

@ -1,6 +1,7 @@
package com.czblood.bus.pojo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -11,15 +12,19 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@ApiModel(value = "输血前检查项目")
public class XkProTransfuseProject {
@ApiModelProperty("序号")
private Integer sid;
@ApiModelProperty("项目名称")
private String pro_name;
private String result_type;
private String unit;
private String need;
@ApiModelProperty("lis项目名称")
private String lis_name;
private String max_value;
private String min_value;
private String upload_flag;
private String Pro_Name_All;
@ApiModelProperty("有效时间")
private Float ValidTime;
}

View File

@ -34,6 +34,7 @@ public class XkTransfuseApply {
private String match_history;
private String transplant_history;
private String dept_id;
@ApiModelProperty("申请时间")
private Date apply_date;
private String send_person;
private String charge_sign;
@ -44,6 +45,7 @@ public class XkTransfuseApply {
private String causalis;
private String bank_director;
private String medical_affairs;
@ApiModelProperty("对应的条码ID")
private String sample_id;
private Date gather_date;
private String abo_type;
@ -59,12 +61,14 @@ public class XkTransfuseApply {
private String diagnoses;
@ApiModelProperty("输血目的")
private String intent;
@ApiModelProperty("申请单类型")
private String apply_type;
private Date use1_date;
private Date use2_date;
private Date use3_date;
private String remark;
private String is_plan;
@ApiModelProperty("申请单状态类型")
private String bill_sort;
private String sample_sign;
private String input_dept;
@ -95,5 +99,6 @@ public class XkTransfuseApply {
private String Valid_Flag;
private String notice_yn;
private String his_SerialNo;
@ApiModelProperty("输血评估单")
private String assess_bill_no;
}

View File

@ -1,6 +1,7 @@
package com.czblood.bus.pojo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -18,7 +19,9 @@ public class XkTransfuseApplyApproval {
private Date Archiater_CheckTime;
private String Medical_Dept;
private Date Medical_CheckTime;
@ApiModelProperty("2级审批,科主任审批,3级审批,需要科主任和医务部审批")
private String ApplyLevel;
@ApiModelProperty("是否审批标志")
private String Flag;
private BigDecimal SID;
}

View File

@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;
@ -17,6 +18,7 @@ public class XkTransfuseApplyBefore {
@ApiModelProperty("单据编号")
private String bill_no;
@ApiModelProperty("住院号")
@NotBlank(message = "住院号不能为空")
private String beinhos_id;
@ApiModelProperty("科室ID")
private String dept_id;
@ -27,8 +29,10 @@ public class XkTransfuseApplyBefore {
@ApiModelProperty("出血量")
private BigDecimal blood_loss;
@ApiModelProperty("申请时间")
@NotBlank(message = "申请时间不允许为空")
private Date assess_data;
@ApiModelProperty("申请人")
@NotBlank(message = "申请人不能为空")
private String assess_person;
@ApiModelProperty("申请血液品种")
private String blood_breed;
@ -50,4 +54,10 @@ public class XkTransfuseApplyBefore {
private String bqgy;
@ApiModelProperty("医疗机构ID")
private String hos_id;
@ApiModelProperty("单据状态,1保存状态,2使用状态,0作废")
private String bill_status;
private Date stime;
private Date etime;
}

View File

@ -26,6 +26,4 @@ public class XkTransfuseApplyTestitem {
private Date test_date;
@ApiModelProperty("上传标志")
private String upload_flag;
@ApiModelProperty("医疗机构ID")
private String hos_id;
}

View File

@ -1,6 +1,6 @@
package com.czblood.bus.system;
import com.czblood.bus.mapper.XKHosInfoMapper;
import com.czblood.bus.mapper.XkHosInfoMapper;
import com.czblood.bus.mapper.XkOperatorInfoMapper;
import com.czblood.bus.pojo.XkHosInfo;
import com.czblood.bus.pojo.XkOperatorInfo;
@ -27,7 +27,7 @@ import java.util.List;
public class BloodExtInterfaceService implements ExtSystemInterface {
@Resource
XKHosInfoMapper xkHosInfoMapper;
XkHosInfoMapper xkHosInfoMapper;
@Resource
XkOperatorInfoMapper xkOperatorInfoMapper;
@Autowired
@ -77,6 +77,7 @@ public class BloodExtInterfaceService implements ExtSystemInterface {
@Override
public Object gethospList() {
XkHosInfo xkHosInfo = new XkHosInfo();
return xkHosInfoMapper.query(xkHosInfo);
xkHosInfo.setSfby("Y");
return xkHosInfoMapper.queryList(xkHosInfo);
}
}

View File

@ -1,12 +0,0 @@
<?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.czblood.bus.mapper.XKHosInfoMapper">
<select id="query" resultType="com.czblood.bus.pojo.XkHosInfo">
select * from xk_hos_info
<where>
<if test="hospital_code != null and hospital_code != ''">and hospital_code = #{hospital_code}</if>
<if test="hospital_name != null and hospital_name != ''">and hospital_name = #{hospital_name}</if>
</where>
</select>
</mapper>

View File

@ -0,0 +1,55 @@
<?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.czblood.bus.mapper.XkHosInfoMapper">
<select id="queryList" resultType="com.czblood.bus.pojo.XkHosInfo">
select * from xk_hos_info
<where>
<if test="hospital_code != null and hospital_code != ''">and hospital_code = #{hospital_code}</if>
<if test="hospital_name != null and hospital_name != ''">and hospital_name = #{hospital_name}</if>
</where>
</select>
<select id="queryOne" resultType="com.czblood.bus.pojo.XkHosInfo">
select * from xk_hos_info where hospital_code = #{hospital_code}
</select>
<insert id="insert">
insert into xk_hos_info(
<if test="address != null and address != ''">address,</if>
<if test="post_code != null and post_code != ''">post_code,</if>
<if test="telno != null and telno != ''">telno,</if>
<if test="link_person != null and link_person != ''">link_person,</if>
<if test="org_kind != null and org_kind != ''">org_kind,</if>
<if test="foot_mode != null and foot_mode != ''">foot_mode,</if>
<if test="org_zone != null and org_zone != ''">org_zone,</if>
<if test="org_street != null and org_street != ''">org_street,</if>
hospital_code,hospital_name,sfby) values
(
<if test="address != null and address != ''">#{address},</if>
<if test="post_code != null and post_code != ''">#{post_code},</if>
<if test="telno != null and telno != ''">#{telno},</if>
<if test="link_person != null and link_person != ''">#{link_person},</if>
<if test="org_kind != null and org_kind != ''">#{org_kind},</if>
<if test="foot_mode != null and foot_mode != ''">#{foot_mode},</if>
<if test="org_zone != null and org_zone != ''">#{org_zone},</if>
<if test="org_street != null and org_street != ''">#{org_street},</if>
#{hospital_code},#{hospital_name},#{sfby})
</insert>
<update id="update">
update xk_hos_info set
<if test="address != null and address != ''">address = #{address},</if>
<if test="post_code != null and post_code != ''">post_code = #{post_code},</if>
<if test="telno != null and telno != ''">telno = #{telno},</if>
<if test="link_person != null and link_person != ''">link_person = #{link_person},</if>
<if test="org_kind != null and org_kind != ''">org_kind = #{org_kind},</if>
<if test="foot_mode != null and foot_mode != ''">foot_mode = #{foot_mode},</if>
<if test="org_zone != null and org_zone != ''">org_zone = #{org_zone},</if>
<if test="org_street != null and org_street != ''">org_street = #{org_street},</if>
<if test="hospital_name != null and hospital_name != ''">hospital_name = #{hospital_name},</if>
<if test="sfby != null and sfby != ''">sfby = #{sfby},</if>
hospital_code = #{hospital_code}
where hospital_code = #{hospital_code}
</update>
</mapper>

View File

@ -70,7 +70,7 @@
<if test="transplant_history != null and transplant_history != ''">transplant_history = #{transplant_history},</if>
<if test="last_modified != null">last_modified = #{last_modified},</if>
<if test="times != null and times != ''">times = #{times},</if>
hos_id = #{hosid}
hos_id = #{hos_id}
</set>
where beinhos_id = #{beinhos_id}
</update>

View File

@ -11,6 +11,11 @@
</select>
<select id="queryOne" resultType="com.czblood.bus.pojo.XkTransfuseApplyBefore">
select * from xk_transfuse_apply_before where bill_no = #{bill_no}
</select>
<insert id="insertXkTransfuseApplyBefore">
insert into xk_transfuse_apply_before(
<if test="dept_id != null and dept_id !=''">dept_id,</if>
@ -30,7 +35,7 @@
<if test="cruor != null and cruor != ''">cruor,</if>
<if test="bqgy != null and bqgy != ''">bqgy,</if>
<if test="hos_id != null and hos_id != ''">hos_id,</if>
bill_no, beinhos_id
bill_no, beinhos_id,bill_status
)
values(
<if test="dept_id != null and dept_id !=''">#{dept_id},</if>
@ -50,7 +55,7 @@
<if test="cruor != null and cruor != ''">#{cruor},</if>
<if test="bqgy != null and bqgy != ''">#{bqgy},</if>
<if test="hos_id != null and hos_id != ''">#{hos_id},</if>
#{bill_no}, #{beinhos_id}
#{bill_no}, #{beinhos_id},#{bill_status}
)
</insert>
@ -74,7 +79,8 @@
<if test="metabolism != null and metabolism != ''">metabolism = #{metabolism},</if>
<if test="cruor != null and cruor != ''">cruor = #{cruor},</if>
<if test="bqgy != null and bqgy != ''">bqgy = #{bqgy},</if>
hos_id = #{hos_id}
<if test="bill_status != null and bill_status != ''">bill_status = #{bill_status},</if>
bill_no = #{bill_no}
</set>
where bill_no = #{bill_no}
</update>

View File

@ -13,14 +13,14 @@
<if test="Item_unit != null and Item_unit != ''">Item_unit,</if>
<if test="test_date != null">test_date,</if>
<if test="upload_flag != null and upload_flag != ''">upload_flag,</if>
bill_no,sid,hos_id
bill_no,sid
)values (
<if test="item_name != null and item_name != ''">#{item_name},</if>
<if test="item_result != null and item_result != ''">#{item_result},</if>
<if test="Item_unit != null and Item_unit != ''">#{Item_unit},</if>
<if test="test_date != null ">#{test_date},</if>
<if test="upload_flag != null and upload_flag != ''">#{upload_flag},</if>
#{bill_no},#{sid},#{hos_id}
#{bill_no},#{sid}
)
</insert>
@ -30,7 +30,7 @@
<if test="Item_unit != null and Item_unit != ''">Item_unit=#{Item_unit},</if>
<if test="test_date != null">test_date=#{test_date},</if>
<if test="upload_flag != null and upload_flag != ''">upload_flag=#{upload_flag},</if>
item_name=#{item_name},hos_id = #{hos_id}
item_name=#{item_name}
where bill_no=#{bill_no}
<if test="sid != null">and sid=#{sid}</if>
</update>

View File

@ -2,11 +2,14 @@ package com.czblood.busBloodbank.controller;
import com.czblood.bus.cache.DmzdCache;
import com.czblood.bus.constants.BloodSysLogConstants;
import com.czblood.bus.mapper.XkDmzdMapper;
import com.czblood.bus.pojo.XkDmzd;
import com.czblood.bus.utils.BloodBankUtil;
import com.czblood.common.annotation.Log;
import com.czblood.common.core.controller.BaseController;
import com.czblood.common.core.domain.Result;
import com.czblood.common.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
@ -34,6 +37,7 @@ public class XkDmzdController extends BaseController {
return new Result("0","获取数据成功!",collect);
}
@Log(title = BloodSysLogConstants.LOG_TYPE_DMZD, businessType = BusinessType.INSERT)
@ApiOperation("添加字典")
@PostMapping("/add")
public Result addDmzd(@RequestBody XkDmzd xkDmzd){
@ -43,6 +47,7 @@ public class XkDmzdController extends BaseController {
return new Result("0","添加成功!");
}
@Log(title = BloodSysLogConstants.LOG_TYPE_DMZD, businessType = BusinessType.UPDATE)
@ApiOperation("修改字典")
@PostMapping("/update")
public Result updateDmzd(@RequestBody XkDmzd xkDmzd){
@ -52,6 +57,7 @@ public class XkDmzdController extends BaseController {
return new Result("0","修改成功!");
}
@Log(title = BloodSysLogConstants.LOG_TYPE_DMZD, businessType = BusinessType.DELETE)
@ApiOperation("删除字典")
@GetMapping("/delete")
public Result deleteDmzd(XkDmzd xkDmzd){

View File

@ -0,0 +1,48 @@
package com.czblood.busBloodbank.controller;
import com.czblood.bus.constants.BloodSysLogConstants;
import com.czblood.bus.mapper.XkHosInfoMapper;
import com.czblood.bus.pojo.XkHosInfo;
import com.czblood.common.annotation.Log;
import com.czblood.common.core.domain.Result;
import com.czblood.common.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@Api(tags = "医疗机构")
@RestController
@RequestMapping("/bus/bloodbank/hosInfo")
public class XkHosInfoController {
@Resource
XkHosInfoMapper xkHosInfoMapper;
@ApiOperation("获取医疗机构列表")
@GetMapping("/queryList")
public Result queryList(){
XkHosInfo xkHosInfo = new XkHosInfo();
List<XkHosInfo> xkHosInfoList = xkHosInfoMapper.queryList(xkHosInfo);
return new Result("0","获取数据成功!",xkHosInfoList);
}
@Log(title = BloodSysLogConstants.LOG_TYPE_YLJG, businessType = BusinessType.INSERT)
@ApiOperation("新增机构")
@PostMapping("/add")
public Result add(@RequestBody XkHosInfo xkHosInfo){
xkHosInfoMapper.insert(xkHosInfo);
return new Result("0","新增数据成功!");
}
@Log(title = BloodSysLogConstants.LOG_TYPE_YLJG, businessType = BusinessType.UPDATE)
@ApiOperation("修改数据")
@PostMapping("/update")
public Result update(@RequestBody XkHosInfo xkHosInfo){
xkHosInfoMapper.update(xkHosInfo);
return new Result("0","修改数据成功!");
}
}

View File

@ -3,6 +3,7 @@ package com.czblood.busDoctor.controller;
import com.czblood.bus.constants.BloodSysLogConstants;
import com.czblood.bus.pojo.XkTransfuseApplyBefore;
import com.czblood.busDoctor.pojo.TransfuseApplyBeforeDTO;
import com.czblood.busDoctor.pojo.TransfuseApplyBeforeVO;
import com.czblood.busDoctor.service.TransfuseApplyBeforeService;
import com.czblood.common.annotation.Log;
import com.czblood.common.core.controller.BaseController;
@ -24,10 +25,16 @@ public class TransfuseApplyBeforeController extends BaseController {
@Resource
private TransfuseApplyBeforeService transfuseApplyBeforeService;
@ApiOperation("查询单据信息")
@ApiOperation("查询单据信息列表")
@GetMapping("/queryList")
public Result queryList(XkTransfuseApplyBefore xkTransfuseApplyBefore){
return transfuseApplyBeforeService.queryList(xkTransfuseApplyBefore);
public Result queryList(TransfuseApplyBeforeVO xktransfuseApplyBeforeVO){
return transfuseApplyBeforeService.queryList(xktransfuseApplyBeforeVO);
}
@ApiOperation("查询单个申请单信息")
@GetMapping("/queryOne")
public Result queryOne(String billNo){
return transfuseApplyBeforeService.queryOne(billNo);
}
@ApiOperation("根据住院号获取病人信息")
@ -41,13 +48,9 @@ public class TransfuseApplyBeforeController extends BaseController {
@PostMapping("/save")
public Result save(@RequestBody TransfuseApplyBeforeDTO transfuseApplyBeforeDTO){
transfuseApplyBeforeDTO.getXkPatientInfo().setHos_id(getLoginUser().getSysLoginParam().getLoginYLJG());
transfuseApplyBeforeDTO.getXkTransfuseApply().setHos_id(getLoginUser().getSysLoginParam().getLoginYLJG());
transfuseApplyBeforeDTO.getXkTransfuseApplyBeforeList().forEach(xkTransfuseApplyBefore -> {
xkTransfuseApplyBefore.setHos_id(getLoginUser().getSysLoginParam().getLoginYLJG());
});
transfuseApplyBeforeDTO.getXkTransfuseApplyTestitemList().forEach(xkTransfuseApplyTestitem -> {
xkTransfuseApplyTestitem.setHos_id(getLoginUser().getSysLoginParam().getLoginYLJG());
});
return transfuseApplyBeforeService.save(transfuseApplyBeforeDTO);
}

View File

@ -1,10 +1,16 @@
package com.czblood.busDoctor.controller;
import com.czblood.busDoctor.service.TransfuseApplyService;
import com.czblood.common.core.domain.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 输血申请
*/
@ -13,4 +19,30 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/bus/doctor/apply")
@Slf4j
public class TransfuseApplyController {
@Resource
private TransfuseApplyService transfuseApplyService;
@ApiOperation("查询申请单列表")
@GetMapping("/queryList")
public Result queryList(){
return null;
}
@ApiOperation("获取病人信息")
@GetMapping("/getPatInfo")
public Result getPatInfo(String beinhosId){
return transfuseApplyService.getPatInfo(beinhosId);
}
@ApiOperation("获取申请单明细")
@GetMapping("/queryDetail")
public Result queryDetail(){
return null;
}
}

View File

@ -0,0 +1,10 @@
package com.czblood.busDoctor.mapper;
import com.czblood.busDoctor.pojo.TransfuseApplyBeforeVO;
import java.util.List;
import java.util.Map;
public interface TransfuseApplyBeforeMapper {
List<Map<String,Object>> queryList(TransfuseApplyBeforeVO transfuseApplyBeforeVO);
}

View File

@ -19,6 +19,4 @@ public class TransfuseApplyBeforeDTO {
private List<XkTransfuseApplyBefore> xkTransfuseApplyBeforeList;
@ApiModelProperty(value = "输血前lis检查项目")
private List<XkTransfuseApplyTestitem> xkTransfuseApplyTestitemList;
@ApiModelProperty(value = "输血前申请信息")
private XkTransfuseApply xkTransfuseApply;
}

View File

@ -0,0 +1,27 @@
package com.czblood.busDoctor.pojo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("查询参数")
public class TransfuseApplyBeforeVO {
@ApiModelProperty("开始时间")
private Date stime;
@ApiModelProperty("结束时间")
private Date etime;
@ApiModelProperty("病人姓名")
private String patient_name;
@ApiModelProperty("住院号")
private String beinhos_id;
@ApiModelProperty("单据编号")
private String bill_no;
}

View File

@ -2,10 +2,11 @@ package com.czblood.busDoctor.service;
import com.czblood.bus.pojo.XkTransfuseApplyBefore;
import com.czblood.busDoctor.pojo.TransfuseApplyBeforeDTO;
import com.czblood.busDoctor.pojo.TransfuseApplyBeforeVO;
import com.czblood.common.core.domain.Result;
public interface TransfuseApplyBeforeService {
Result queryList(XkTransfuseApplyBefore xkTransfuseApplyBefore);
Result queryList(TransfuseApplyBeforeVO transfuseApplyBeforeVO);
Result getPatInfo(String patNo);
@ -16,4 +17,6 @@ public interface TransfuseApplyBeforeService {
Result delete(String billNo);
Result print(String billNo,String templateName);
Result queryOne(String billNo);
}

View File

@ -0,0 +1,7 @@
package com.czblood.busDoctor.service;
import com.czblood.common.core.domain.Result;
public interface TransfuseApplyService {
Result getPatInfo(String beinhosId);
}

View File

@ -7,6 +7,7 @@ import com.czblood.bus.constants.BloodPrintTypeConstants;
import com.czblood.bus.mapper.XkPatientInfoMapper;
import com.czblood.bus.mapper.XkTransfuseApplyBeforeMapper;
import com.czblood.bus.mapper.XkTransfuseApplyMapper;
import com.czblood.bus.mapper.XkTransfuseApplyTestitemMapper;
import com.czblood.bus.pojo.*;
import com.czblood.bus.pojo.inter.BeforeAssessRequest;
import com.czblood.bus.pojo.inter.GetPatientInfoRequest;
@ -14,7 +15,9 @@ import com.czblood.bus.pojo.inter.GetTestResultRequest;
import com.czblood.bus.utils.BloodBankUtil;
import com.czblood.bus.utils.BloodInterfaceUtil;
import com.czblood.bus.utils.ReportUtil;
import com.czblood.busDoctor.mapper.TransfuseApplyBeforeMapper;
import com.czblood.busDoctor.pojo.TransfuseApplyBeforeDTO;
import com.czblood.busDoctor.pojo.TransfuseApplyBeforeVO;
import com.czblood.busDoctor.service.TransfuseApplyBeforeService;
import com.czblood.busDoctor.utils.TransfuseApplyBeforeUtil;
import com.czblood.common.config.RuoYiConfig;
@ -28,6 +31,7 @@ import javax.annotation.Resource;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Service
@ -43,22 +47,37 @@ public class TransfuseApplyBeforeServiceImpl implements TransfuseApplyBeforeServ
@Resource
TransfuseApplyBeforeUtil transfuseApplyBeforeUtil;
@Resource
XkTransfuseApplyMapper xkTransfuseApplyMapper;
XkTransfuseApplyTestitemMapper xkTransfuseApplyTestitemMapper;
@Resource
ReportUtil reportUtil;
@Resource
TransfuseApplyBeforeMapper transfuseApplyBeforeMapper;
@Override
public Result queryList(XkTransfuseApplyBefore xkTransfuseApplyBefore) {
String beinhosId = xkTransfuseApplyBefore.getBeinhos_id();
//病人基本信息
XkPatientInfo xkPatientInfo = new XkPatientInfo();
xkPatientInfo.setBeinhos_id(beinhosId);
List<XkPatientInfo> xkPatientInfoList = xkPatientInfoMapper.queryList(xkPatientInfo);
public Result queryList(TransfuseApplyBeforeVO xkTransfuseApplyBeforeVO) {
if(xkTransfuseApplyBeforeVO.getStime() == null || xkTransfuseApplyBeforeVO.getEtime() == null) return new Result("-1","开始时间和结束时间不能为空!");
List<Map<String, Object>> mapList = transfuseApplyBeforeMapper.queryList(xkTransfuseApplyBeforeVO);
return new Result("0","获取数据成功!", mapList);
}
@Override
public Result queryOne(String billNo) {
//输血前评估信息
XkTransfuseApplyBefore xkTransfuseApplyBefore = new XkTransfuseApplyBefore();
xkTransfuseApplyBefore.setBill_no(billNo);
List<XkTransfuseApplyBefore> xkTransfuseApplyBeforeList = xkTransfuseApplyBeforeMapper.queryList(xkTransfuseApplyBefore);
if(xkTransfuseApplyBeforeList.size() <= 0) return new Result("-1","没有找到对应的评估单信息!");
TransfuseApplyBeforeDTO transfuseApplyBeforeDTO = new TransfuseApplyBeforeDTO();
if(xkPatientInfoList.size() > 0) transfuseApplyBeforeDTO.setXkPatientInfo(xkPatientInfoList.get(0));
transfuseApplyBeforeDTO.setXkTransfuseApplyBeforeList(xkTransfuseApplyBeforeList);
//病人信息
XkPatientInfo xkPatientInfo = new XkPatientInfo();
xkPatientInfo.setBeinhos_id(xkTransfuseApplyBeforeList.get(0).getBeinhos_id());
List<XkPatientInfo> xkPatientInfoList = xkPatientInfoMapper.queryList(xkPatientInfo);
if(xkPatientInfoList.size() <= 0) return new Result("-1","没有找到对应的病人信息!");
transfuseApplyBeforeDTO.setXkPatientInfo(xkPatientInfoList.get(0));
//输血前检查lis项目信息
List<XkTransfuseApplyTestitem> xkTransfuseApplyTestitemList = xkTransfuseApplyTestitemMapper.queryList(billNo);
transfuseApplyBeforeDTO.setXkTransfuseApplyTestitemList(xkTransfuseApplyTestitemList);
return new Result("0","获取数据成功!", transfuseApplyBeforeDTO);
}
@ -69,7 +88,6 @@ public class TransfuseApplyBeforeServiceImpl implements TransfuseApplyBeforeServ
getPatientInfoRequest.setBeinhos_id(patNo);
Result result = BloodInterfaceUtil.invokeBloodInterface(getPatientInfoRequest);
if(!result.getCode().equals("0")) return result;
XkTransfuseApply xkTransfuseApply = JSONUtil.parseObj(result.getData()).toBean(XkTransfuseApply.class);
XkPatientInfo xkPatientInfo = JSONUtil.parseObj(result.getData()).toBean(XkPatientInfo.class);
if(xkPatientInfo.getBeinhos_id() == null){
XkPatientInfo xkPatientInfoOne = new XkPatientInfo();
@ -77,7 +95,7 @@ public class TransfuseApplyBeforeServiceImpl implements TransfuseApplyBeforeServ
List<XkPatientInfo> xkPatientInfoList = xkPatientInfoMapper.queryList(xkPatientInfoOne);
if(!xkPatientInfoList.isEmpty()) xkPatientInfo = xkPatientInfoList.get(0);
}
//调用检验接口,获取病人检验信息
//调用检验接口,获取病人检验信息,包括血型结果
GetTestResultRequest getTestResultRequest = new GetTestResultRequest();
getTestResultRequest.setBeinhos_id(patNo);
Result result1 = BloodInterfaceUtil.invokeBloodInterface(getTestResultRequest);
@ -86,7 +104,6 @@ public class TransfuseApplyBeforeServiceImpl implements TransfuseApplyBeforeServ
TransfuseApplyBeforeDTO transfuseApplyBeforeDTO = new TransfuseApplyBeforeDTO();
transfuseApplyBeforeDTO.setXkPatientInfo(xkPatientInfo);
transfuseApplyBeforeDTO.setXkTransfuseApplyTestitemList(xkTransfuseApplyTestitemList);
transfuseApplyBeforeDTO.setXkTransfuseApply(xkTransfuseApply);
return new Result("0","获取数据成功!", transfuseApplyBeforeDTO);
}
@ -97,6 +114,7 @@ public class TransfuseApplyBeforeServiceImpl implements TransfuseApplyBeforeServ
if(xkTransfuseApplyBeforeList.size() > 0){
XkTransfuseApplyBefore xkTransfuseApplyBefore = xkTransfuseApplyBeforeList.get(0);
xkTransfuseApplyBefore.setBill_no(billNo);
xkTransfuseApplyBefore.setBill_status("1"); //保存状态
}
List<XkTransfuseApplyTestitem> xkTransfuseApplyTestitemList = transfuseApplyBeforeDTO.getXkTransfuseApplyTestitemList();
for (XkTransfuseApplyTestitem xkTransfuseApplyTestitem : xkTransfuseApplyTestitemList) {
@ -126,12 +144,14 @@ public class TransfuseApplyBeforeServiceImpl implements TransfuseApplyBeforeServ
return new Result("0","修改成功!");
}
@Transactional
@Override
public Result delete(String billNo) {
Result result = canModify(billNo);
if(!result.getCode().equals("0")) return result;
xkTransfuseApplyBeforeMapper.deleteXkTransfuseApplyBefore(billNo);
XkTransfuseApplyBefore xkTransfuseApplyBefore = new XkTransfuseApplyBefore();
xkTransfuseApplyBefore.setBill_status("0"); //作废状态
xkTransfuseApplyBefore.setBill_no(billNo);
xkTransfuseApplyBeforeMapper.updateXkTransfuseApplyBefore(xkTransfuseApplyBefore);
return new Result("0","删除成功!");
}
@ -172,16 +192,22 @@ public class TransfuseApplyBeforeServiceImpl implements TransfuseApplyBeforeServ
}
public Result canModify(String billNo){
XkTransfuseApply xkTransfuseApply = new XkTransfuseApply();
xkTransfuseApply.setAssess_bill_no(billNo);
List<XkTransfuseApply> xkTransfuseApplyList = xkTransfuseApplyMapper.queryList(xkTransfuseApply);
if(xkTransfuseApplyList.size() > 0){
for (XkTransfuseApply transfuseApply : xkTransfuseApplyList) {
String checkSign = transfuseApply.getCheck_sign();
if(checkSign.equals("Y")) return new Result("-1","该评估单对应的申请单已审核,无法修改或删除!");
}
}
XkTransfuseApplyBefore xkTransfuseApplyBefore = xkTransfuseApplyBeforeMapper.queryOne(billNo);
if(xkTransfuseApplyBefore == null) return new Result("-1","没有找到对应的评估单!");
String billStatus = xkTransfuseApplyBefore.getBill_status();
if(billStatus.equals("2")) return new Result("-1","该单据已使用,无法修改!");
// XkTransfuseApply xkTransfuseApply = new XkTransfuseApply();
// xkTransfuseApply.setAssess_bill_no(billNo);
// List<XkTransfuseApply> xkTransfuseApplyList = xkTransfuseApplyMapper.queryList(xkTransfuseApply);
// if(xkTransfuseApplyList.size() > 0){
// for (XkTransfuseApply transfuseApply : xkTransfuseApplyList) {
// String checkSign = transfuseApply.getCheck_sign();
// if(checkSign.equals("Y")) return new Result("-1","该评估单对应的申请单已审核,无法修改或删除!");
// }
// }
return new Result("0","可以修改!");
}
}

View File

@ -0,0 +1,18 @@
package com.czblood.busDoctor.service.impl;
import com.czblood.busDoctor.service.TransfuseApplyService;
import com.czblood.common.core.domain.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Service
@Slf4j
public class TransfuseApplyServiceImpl implements TransfuseApplyService {
@Override
public Result getPatInfo(String beinhosId) {
return null;
}
}

View File

@ -0,0 +1,12 @@
<?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.czblood.busDoctor.mapper.TransfuseApplyBeforeMapper">
<select id="queryList" resultType="map">
select * from xk_transfuse_apply_before a ,xk_patient_info b
<![CDATA[where a.beinhos_id = b.beinhos_id and a.assess_data >= #{stime} and a.assess_data <= #{etime} and isnull(a.bill_status,'') <> '0']]>
<if test="bill_no != null and bill_no != ''">and a.bill_no = #{bill_no}</if>
<if test="beinhos_id != null and beinhos_id != ''">and a.beinhos_id = #{beinhos_id}</if>
<if test="patient_name != null and patient_name != ''">and b.patient_name like '%'+#{patient_name}+'%' </if>
</select>
</mapper>

View File

@ -146,6 +146,10 @@ swagger:
# 请求前缀
pathMapping: /
#开启knife4j增强
knife4j:
enable: true
# 防止XSS攻击
xss:
# 过滤开关

24766
sql/operation_dict.sql Normal file

File diff suppressed because it is too large Load Diff

View File

@ -634,24 +634,10 @@ if not exists(select 1 from dbo.sys_menu where menu_id = '1060')
end
if not exists(select 1 from dbo.sys_menu where menu_id = '2000')
begin
INSERT INTO dbo.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (2000, '住院采血', 0, 5, 'zycx', NULL, NULL, '', 1, 0, 'M', '0', '0', NULL, 'table', 'admin', '2025-05-08 17:31:10.647', '', NULL, '')
end
if not exists(select 1 from dbo.sys_menu where menu_id = '2001')
begin
INSERT INTO dbo.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (2001, '护士条码工作站', 2000, 1, 'barcode', NULL, NULL, '', 1, 0, 'C', '0', '0', NULL, 'tree-table', 'lis', '2025-05-08 17:38:53.69', '', NULL, '')
end
if not exists(select 1 from dbo.sys_menu where menu_id = '2002')
begin
INSERT INTO dbo.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES (2002, '字典管理(lis)', 1, 10, 'comdict', 'liswork/dict/index', NULL, '', 1, 0, 'C', '0', '0', 'liswork:dict:list', 'dict', 'admin', '2025-05-09 11:01:23.03', 'admin', '2025-05-09 17:38:19.337', '')
VALUES (2002, '字典管理(blood)', 1, 10, 'comdict', 'liswork/dict/index', NULL, '', 1, 0, 'C', '0', '0', 'liswork:dict:list', 'dict', 'admin', '2025-05-09 11:01:23.03', 'admin', '2025-05-09 17:38:19.337', '')
end
@ -808,13 +794,13 @@ if not exists(select 1 from dbo.sys_dept where dept_id = '100' and parent_id = '
if not exists(select 1 from dbo.sys_dept where dept_id = '101' and parent_id = '100')
begin
INSERT INTO dbo.sys_dept (dept_id, parent_id, ancestors, dept_name, order_num, leader, phone, email, status, del_flag, create_by, create_time, update_by, update_time)
VALUES (101, 100, '0,100', '检验科', 1, 'lis', '15888888888', null, '0', '0', 'admin', '2025-05-05 11:09:44.197', '', NULL)
VALUES (101, 100, '0,100', '输血科', 1, 'lis', '15888888888', null, '0', '0', 'admin', '2025-05-05 11:09:44.197', '', NULL)
end
if not exists(select 1 from dbo.sys_dept where dept_id = '103' and parent_id = '101')
begin
INSERT INTO dbo.sys_dept (dept_id, parent_id, ancestors, dept_name, order_num, leader, phone, email, status, del_flag, create_by, create_time, update_by, update_time)
VALUES (103, 101, '0,100,101', '临检组', 1, 'lis', '15888888888', null, '0', '0', 'admin', '2025-05-05 11:09:44.197', '', NULL)
VALUES (103, 101, '0,100,101', '输血科', 1, 'lis', '15888888888', null, '0', '0', 'admin', '2025-05-05 11:09:44.197', '', NULL)
end
SET IDENTITY_INSERT dbo.sys_dept OFF;

View File

@ -289,6 +289,29 @@ if not exists(select 1 from dbo.xk_dmzd where wordbook_sign = 'BASE')
('sxqjcxmmrz','未查','未查','Y'),
('sxqjcxmmrz','已查未报','已查未报','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign)values('BASE','nldw','年龄单位','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign)values('nldw','岁','岁','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign)values('nldw','月','月','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign)values('nldw','天','天','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('BASE','anemia','贫血程度','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('anemia','轻度贫血','轻度贫血','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('anemia','中度贫血','中度贫血','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('anemia','重度贫血','重度贫血','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('anemia','极重度贫血','极重度贫血','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('BASE','billApplyStatus','申请单状态','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','A','未审核','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','B','已审核','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','F','已复核血型','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','C','已配血','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','D','已发血','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','Z','已作废','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','BD','未补录','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','W','已补录','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','SF','已复核血型(追加)','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','S','已追加配血','Y')
insert into xk_dmzd (wordbook_sign,wordbook_code,wordbook_name,use_sign) values('billApplyStatus','N','审核未通过','Y')
END
@ -303,4 +326,17 @@ IF NOT EXISTS (SELECT 1 FROM sys.key_constraints WHERE name = 'PK_xk_patient_inf
BEGIN
ALTER TABLE xk_patient_info ADD CONSTRAINT PK_xk_patient_info PRIMARY KEY CLUSTERED (beinhos_id);
END
GO
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'xk_transfuse_apply_before' AND COLUMN_NAME = 'bill_status')
begin
alter table xk_transfuse_apply_before add bill_status varchar(10)
end
go
IF NOT EXISTS (SELECT 1 FROM sys.key_constraints WHERE name = 'PK_xk_hos_info' AND type = 'PK' )
BEGIN
ALTER TABLE xk_hos_info ADD CONSTRAINT PK_xk_hos_info PRIMARY KEY CLUSTERED (hospital_code);
END
GO