输血申请界面功能

This commit is contained in:
jiangs 2026-06-25 17:47:44 +08:00
parent f1b36f8ff1
commit 951365061a
28 changed files with 484 additions and 35 deletions

View File

@ -2,6 +2,6 @@
<project version="4">
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
<option name="chatAppRouterInfo" value="chat-session" />
<option name="progress" value="1.0" />
<option name="progress" value="0.42" />
</component>
</project>

View File

@ -1,11 +1,15 @@
package com.czblood.bus.controller;
import com.czblood.bus.mapper.XkProTransfuseProjectMapper;
import com.czblood.bus.mapper.XkXtwhIllDiagnoseMapper;
import com.czblood.bus.pojo.XkBloodBreed;
import com.czblood.bus.pojo.XkDmzd;
import com.czblood.bus.pojo.XkProTransfuseProject;
import com.czblood.bus.pojo.XkXtwhIllDiagnose;
import com.czblood.bus.utils.BloodBankUtil;
import com.czblood.common.core.controller.BaseController;
import com.czblood.common.core.domain.Result;
import com.czblood.common.core.page.TableDataInfo;
import com.czblood.system.util.CommonUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -17,7 +21,7 @@ import java.util.List;
@Api(tags = "公共接口")
@RestController
@RequestMapping("/bus/common")
public class BloodCommonController {
public class BloodCommonController extends BaseController {
@Resource
private XkProTransfuseProjectMapper xkProTransfuseProjectMapper;
@ -25,6 +29,8 @@ public class BloodCommonController {
private BloodBankUtil bloodBankUtil;
@Resource
CommonUtil commonUtil;
@Resource
XkXtwhIllDiagnoseMapper xkXtwhIllDiagnoseMapper;
@ApiOperation("获取输血前检验项目")
@PostMapping("/queryLisProject")
@ -65,6 +71,14 @@ public class BloodCommonController {
public Result getBloodBreed(){
List<XkBloodBreed> bloodBreedList = bloodBankUtil.getBloodBreed();
return new Result("0","获取数据成功!",bloodBreedList);
}
@ApiOperation("查询诊断信息")
@GetMapping("/queryDiagnose")
public TableDataInfo queryDiagnose(XkXtwhIllDiagnose xkXtwhIllDiagnose){
startPage();
List<XkXtwhIllDiagnose> xkXtwhIllDiagnoseList = xkXtwhIllDiagnoseMapper.queryList(xkXtwhIllDiagnose);
return getDataTable(xkXtwhIllDiagnoseList);
}
}

View File

@ -6,4 +6,5 @@ import java.util.List;
public interface XkTransfuseApplyBloodbreedMapper {
List<XkTransfuseApplyBloodbreed> queryList(XkTransfuseApplyBloodbreed xkTransfuseApplyBloodbreed);
List<XkTransfuseApplyBloodbreed> queryOne(String bill_no);
}

View File

@ -0,0 +1,9 @@
package com.czblood.bus.mapper;
import com.czblood.bus.pojo.XkXtwhIllDiagnose;
import java.util.List;
public interface XkXtwhIllDiagnoseMapper {
List<XkXtwhIllDiagnose> queryList(XkXtwhIllDiagnose xkXtwhIllDiagnose);
}

View File

@ -0,0 +1,9 @@
package com.czblood.bus.mapper;
import com.czblood.bus.pojo.XkXtwhIll;
import java.util.List;
public interface XkXtwhIllMapper {
List<XkXtwhIll> queryList(XkXtwhIll xkXtwhIll);
}

View File

@ -0,0 +1,18 @@
package com.czblood.bus.pojo;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("疾病诊断")
public class XkXtwhIllDiagnose {
private String Ill_Code;
private String Dia_Code;
private String Dia_Name;
private String Dia_Pym;
private String Remark;
}

View File

@ -6,4 +6,7 @@
select * from xk_transfuse_apply_bloodbreed where bill_no = #{bill_no}
<if test="blood_breed != null and blood_breed != ''">and blood_breed = #{blood_breed}</if>
</select>
<select id="queryOne" resultType="com.czblood.bus.pojo.XkTransfuseApplyBloodbreed">
select * from xk_transfuse_apply_bloodbreed where bill_no = #{bill_no}
</select>
</mapper>

View File

@ -0,0 +1,14 @@
<?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.XkXtwhIllDiagnoseMapper">
<select id="queryList" resultType="com.czblood.bus.pojo.XkXtwhIllDiagnose">
select * from xk_xtwh_ill_diagnose
<where>
<if test="Ill_Code != null and Ill_Code != ''">Ill_Code = #{Ill_Code}</if>
<if test="Dia_Code != null and Dia_Code != ''">Dia_Code = #{Dia_Code}</if>
<if test="Dia_Name != null and Dia_Name != ''">Dia_Name like '%'+#{Dia_Name}+'%'</if>
</where>
</select>
</mapper>

View File

@ -0,0 +1,14 @@
<?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.XkXtwhIllMapper">
<select id="queryList" resultType="com.czblood.bus.pojo.XkXtwhIll">
select * from xk_xtwh_ill
<where>
<if test="Ill_Code != null and Ill_Code != ''">and Ill_Code = #{Ill_Code}</if>
<if test="Ill_Name != null and Ill_Name != ''">and Ill_Name like '%'+ #{Ill_Name} +'%' </if>
<if test="Use_Sign != null and Use_Sign !=''">and Use_Sign = #{Use_Sign}</if>
</where>
</select>
</mapper>

View File

@ -0,0 +1,28 @@
package com.czblood.busBloodbank.controller;
import com.czblood.bus.pojo.XkXtwhIll;
import com.czblood.busBloodbank.service.XkXtwhIllService;
import com.czblood.common.core.domain.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;
@Api(tags = "单病种")
@RestController
@RequestMapping("/bus/bloodbank/ill")
public class XkXtwhIllController {
@Resource
XkXtwhIllService xkXtwhIllService;
@ApiOperation("单病种查询")
@GetMapping("/queryList")
public Result queryList(XkXtwhIll xkXtwhIll) {
return xkXtwhIllService.queryList(xkXtwhIll);
}
}

View File

@ -0,0 +1,8 @@
package com.czblood.busBloodbank.service;
import com.czblood.bus.pojo.XkXtwhIll;
import com.czblood.common.core.domain.Result;
public interface XkXtwhIllService {
Result queryList(XkXtwhIll xkXtwhIll);
}

View File

@ -0,0 +1,23 @@
package com.czblood.busBloodbank.service.impl;
import com.czblood.bus.mapper.XkXtwhIllMapper;
import com.czblood.bus.pojo.XkXtwhIll;
import com.czblood.busBloodbank.service.XkXtwhIllService;
import com.czblood.common.core.domain.Result;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class XkXtwhIllServiceImpl implements XkXtwhIllService {
@Resource
XkXtwhIllMapper xkXtwhIllMapper;
@Override
public Result queryList(XkXtwhIll xkXtwhIll) {
List<XkXtwhIll> list = xkXtwhIllMapper.queryList(xkXtwhIll);
return new Result("0","查询成功!",list);
}
}

View File

@ -1,9 +1,8 @@
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.pojo.DTO.TransfuseApplyBeforeDTO;
import com.czblood.busDoctor.pojo.VO.TransfuseApplyBeforeVO;
import com.czblood.busDoctor.service.TransfuseApplyBeforeService;
import com.czblood.common.annotation.Log;
import com.czblood.common.core.controller.BaseController;

View File

@ -1,8 +1,12 @@
package com.czblood.busDoctor.controller;
import com.czblood.bus.pojo.XkTransfuseApply;
import com.czblood.bus.pojo.XkXtwhIllDiagnose;
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
import com.czblood.busDoctor.service.TransfuseApplyService;
import com.czblood.common.core.controller.BaseController;
import com.czblood.common.core.domain.Result;
import com.czblood.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@ -19,7 +23,7 @@ import javax.annotation.Resource;
@RestController
@RequestMapping("/bus/doctor/apply")
@Slf4j
public class TransfuseApplyController {
public class TransfuseApplyController extends BaseController {
@Resource
private TransfuseApplyService transfuseApplyService;
@ -28,21 +32,27 @@ public class TransfuseApplyController {
@ApiOperation("查询申请单列表")
@GetMapping("/queryList")
public Result queryList(XkTransfuseApply xkTransfuseApply){
return transfuseApplyService.queryList(xkTransfuseApply);
public Result queryList(TransfuseApplyVO transfuseApplyVO){
return transfuseApplyService.queryList(transfuseApplyVO);
}
@ApiOperation("获取病人信息")
@GetMapping("/getPatInfo")
public Result getPatInfo(String beinhosId){
return transfuseApplyService.getPatInfo(beinhosId);
public Result getPatInfo(TransfuseApplyVO transfuseApplyVO){
return transfuseApplyService.getPatInfo(transfuseApplyVO);
}
@ApiOperation("获取申请单明细")
@GetMapping("/queryDetail")
public Result queryDetail(){
return null;
@ApiOperation("查询输血前评估信息列表")
@GetMapping("/queryApplyBeforeList")
public Result queryApplyBeforeList(String dept_id,String user_id){
return transfuseApplyService.queryApplyBeforeList(dept_id,user_id);
}
@ApiOperation("查询单条申请单")
@GetMapping("/queryApplyOne")
public Result queryApplyOne(String billNo){
return transfuseApplyService.queryApplyOne(billNo);
}

View File

@ -1,6 +1,6 @@
package com.czblood.busDoctor.mapper;
import com.czblood.busDoctor.pojo.TransfuseApplyBeforeVO;
import com.czblood.busDoctor.pojo.VO.TransfuseApplyBeforeVO;
import java.util.List;
import java.util.Map;

View File

@ -0,0 +1,16 @@
package com.czblood.busDoctor.mapper;
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface TransfuseApplyMapper {
List<Map<String,Object>> queryList(TransfuseApplyVO transfuseApplyVO);
@MapKey("bill_no")
Map<String,Object> queryApplyOne(TransfuseApplyVO transfuseApplyVO);
List<Map<String,Object>> queryApplyBeforeList(@Param("dept_id") String dept_id,@Param("assess_person") String assess_person);
}

View File

@ -1,7 +1,6 @@
package com.czblood.busDoctor.pojo;
package com.czblood.busDoctor.pojo.DTO;
import com.czblood.bus.pojo.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

View File

@ -0,0 +1,26 @@
package com.czblood.busDoctor.pojo.DTO;
import com.czblood.bus.pojo.XkTransfuseApply;
import com.czblood.bus.pojo.XkTransfuseApplyBloodbreed;
import com.czblood.bus.pojo.XkTransfuseApplyTestitem;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
import java.util.Map;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TransfuseApplyDTO {
@ApiModelProperty("输血申请单列表信息")
private List<Map<String,Object>> transfuseApplyList;
@ApiModelProperty("输血申请单信息")
private Map<String,Object> transfuseApplyMap;
@ApiModelProperty(value = "输血前lis检查项目")
private List<XkTransfuseApplyTestitem> xkTransfuseApplyTestitemList;
@ApiModelProperty("输血申请单品种列表")
private List<XkTransfuseApplyBloodbreed> xkTransfuseApplyBloodbreedList;
}

View File

@ -1,6 +1,5 @@
package com.czblood.busDoctor.pojo;
package com.czblood.busDoctor.pojo.VO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;

View File

@ -0,0 +1,22 @@
package com.czblood.busDoctor.pojo.VO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TransfuseApplyVO {
@ApiModelProperty("单据状态")
private String bill_status;
@ApiModelProperty("查询多少天之前的")
private Integer day;
@ApiModelProperty("查询的科室")
private String dept_code;
@ApiModelProperty("查询的医生")
private String doctor_code;
@ApiModelProperty("查询的单据编号")
private String bill_no;
}

View File

@ -1,8 +1,7 @@
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.busDoctor.pojo.DTO.TransfuseApplyBeforeDTO;
import com.czblood.busDoctor.pojo.VO.TransfuseApplyBeforeVO;
import com.czblood.common.core.domain.Result;
public interface TransfuseApplyBeforeService {

View File

@ -1,10 +1,15 @@
package com.czblood.busDoctor.service;
import com.czblood.bus.pojo.XkTransfuseApply;
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
import com.czblood.common.core.domain.Result;
public interface TransfuseApplyService {
Result getPatInfo(String beinhosId);
Result getPatInfo(TransfuseApplyVO transfuseApplyVO);
Result queryList(XkTransfuseApply xkTransfuseApply);
Result queryList(TransfuseApplyVO transfuseApplyVO);
Result queryApplyOne(String billNo);
Result queryApplyBeforeList(String dept_id,String assess_person);
}

View File

@ -6,7 +6,6 @@ import cn.hutool.json.JSONUtil;
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;
@ -16,8 +15,8 @@ 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.pojo.DTO.TransfuseApplyBeforeDTO;
import com.czblood.busDoctor.pojo.VO.TransfuseApplyBeforeVO;
import com.czblood.busDoctor.service.TransfuseApplyBeforeService;
import com.czblood.busDoctor.utils.TransfuseApplyBeforeUtil;
import com.czblood.common.config.RuoYiConfig;
@ -25,7 +24,6 @@ import com.czblood.common.core.domain.Result;
import com.czblood.common.utils.file.FileUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.File;

View File

@ -1,24 +1,92 @@
package com.czblood.busDoctor.service.impl;
import com.czblood.bus.pojo.XkTransfuseApply;
import com.czblood.bus.mapper.XkPatientInfoMapper;
import com.czblood.bus.mapper.XkTransfuseApplyBeforeMapper;
import com.czblood.bus.mapper.XkTransfuseApplyBloodbreedMapper;
import com.czblood.bus.mapper.XkTransfuseApplyTestitemMapper;
import com.czblood.bus.pojo.*;
import com.czblood.busDoctor.mapper.TransfuseApplyMapper;
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyDTO;
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
import com.czblood.busDoctor.service.TransfuseApplyService;
import com.czblood.common.core.domain.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service
@Slf4j
public class TransfuseApplyServiceImpl implements TransfuseApplyService {
@Resource
TransfuseApplyMapper transfuseApplyMapper;
@Resource
XkTransfuseApplyTestitemMapper xkTransfuseApplyTestitemMapper;
@Resource
XkTransfuseApplyBloodbreedMapper xkTransfuseApplyBloodbreedMapper;
@Resource
XkTransfuseApplyBeforeMapper xkTransfuseApplyBeforeMapper;
@Resource
XkPatientInfoMapper xkPatientInfoMapper;
/**
* 获取病人信息
*
* @param transfuseApplyVO
* @return
*/
@Override
public Result getPatInfo(String beinhosId) {
public Result getPatInfo(TransfuseApplyVO transfuseApplyVO) {
//获取输血前评估单对应的病人信息
String billNo = transfuseApplyVO.getBill_no();
if (billNo == null || billNo.equals("")) return new Result("-1", "查询的申请单号不能为空!");
XkTransfuseApplyBefore xkTransfuseApplyBefore = xkTransfuseApplyBeforeMapper.queryOne(billNo);
if (xkTransfuseApplyBefore != null) return new Result("-1", "没有查到对应的输血评估单!");
String beinhosId = xkTransfuseApplyBefore.getBeinhos_id();
XkPatientInfo xkPatientInfo = xkPatientInfoMapper.queryOne(beinhosId);
if (xkPatientInfo != null) return new Result("-1"," 没有查到对应的病人信息!");
//将输血评估的信息写入到输血申请单
XkTransfuseApply xkTransfuseApply = new XkTransfuseApply();
xkTransfuseApply.setBeinhos_id(beinhosId);
return null;
}
@Override
public Result queryList(XkTransfuseApply xkTransfuseApply) {
return null;
public Result queryList(TransfuseApplyVO transfuseApplyVO) {
Integer day = transfuseApplyVO.getDay();
if (day == null || day == 0) return new Result("-1", "查询天数不能为空!");
List<Map<String, Object>> transfuseApplyList = transfuseApplyMapper.queryList(transfuseApplyVO);
return new Result("0", "查询成功", transfuseApplyList);
}
@Override
public Result queryApplyOne(String billNo) {
TransfuseApplyVO transfuseApplyVO = new TransfuseApplyVO();
transfuseApplyVO.setBill_no(billNo);
Map<String, Object> transfuseApplyMap = transfuseApplyMapper.queryApplyOne(transfuseApplyVO);
TransfuseApplyDTO transfuseApplyDTO = new TransfuseApplyDTO();
transfuseApplyDTO.setTransfuseApplyMap(transfuseApplyMap);
List<XkTransfuseApplyTestitem> xkTransfuseApplyTestitemList = xkTransfuseApplyTestitemMapper.queryList(billNo);
transfuseApplyDTO.setXkTransfuseApplyTestitemList(xkTransfuseApplyTestitemList);
List<XkTransfuseApplyBloodbreed> xkTransfuseApplyBloodbreedList = xkTransfuseApplyBloodbreedMapper.queryOne(billNo);
transfuseApplyDTO.setXkTransfuseApplyBloodbreedList(xkTransfuseApplyBloodbreedList);
return new Result("0", "查询成功", transfuseApplyDTO);
}
/**
* 查询输血前评估信息列表
*
* @return
*/
@Override
public Result queryApplyBeforeList(String dept_id, String assess_person) {
List<Map<String, Object>> transfuseApplyBeforeList = transfuseApplyMapper.queryApplyBeforeList(dept_id, assess_person);
return new Result("0", "查询成功", transfuseApplyBeforeList);
}
}

View File

@ -6,7 +6,7 @@ import com.czblood.bus.mapper.XkTransfuseApplyTestitemMapper;
import com.czblood.bus.pojo.XkPatientInfo;
import com.czblood.bus.pojo.XkTransfuseApplyBefore;
import com.czblood.bus.pojo.XkTransfuseApplyTestitem;
import com.czblood.busDoctor.pojo.TransfuseApplyBeforeDTO;
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyBeforeDTO;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

View File

@ -0,0 +1,14 @@
package com.czblood.busDoctor.utils;
import org.springframework.stereotype.Component;
@Component
public class TransfuseApplyUtil {
/**
* 计算大量用血
*/
public void computeLargeBlood(){
}
}

View File

@ -0,0 +1,112 @@
<?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.TransfuseApplyMapper">
<select id="queryList" resultType="map">
SELECT DISTINCT xk_transfuse_apply.bill_no,
xk_transfuse_apply.dept_id,
xk_patient_info.patient_name,
xk_transfuse_apply.apply_date,
xk_transfuse_apply.apply_medic,
xk_transfuse_apply.bill_stasus,
xk_transfuse_apply.beinhos_id ,
xk_transfuse_apply.abo_type,
xk_transfuse_apply.rh_type,
xk_transfuse_apply.is_large_use,
SUBSTRING(( SELECT ',' +xx.breed_name+CONVERT(varchar(255),CONVERT(decimal(10,1),x.blood_num))+x.unit
from xk_transfuse_apply_bloodbreed x join xk_blood_breed xx on xx.breed_code=x.blood_breed where x.bill_no=xk_transfuse_apply.bill_no FOR XML PATH('') ),2,999) as req_breed
FROM xk_patient_info RIGHT OUTER JOIN xk_transfuse_apply ON xk_patient_info.beinhos_id = xk_transfuse_apply.beinhos_id
WHERE ( xk_transfuse_apply.operation_type = 'C' OR ISNULL(xk_transfuse_apply.operation_type,'') = '')
and xk_transfuse_apply.apply_date > getdate() - #{day}
<if test="bill_status != null and bill_status != ''">and xk_transfuse_apply.bill_stasus = #{bill_status}</if>
<if test="dept_code != null and dept_code != ''">and xk_transfuse_apply.dept_id = #{dept_code}</if>
<if test="dept_code != null and dept_code != ''">and (xk_transfuse_apply.dept_id = #{dept_code} or xk_transfuse_apply.input_dept = #{dept_code})</if>
<if test="doctor_code != null and doctor_code != ''">and xk_transfuse_apply.apply_medic = #{doctor_code}</if>
</select>
<select id="queryApplyOne" resultType="java.util.Map">
SELECT top 1 xk_patient_info.hos_id,
xk_patient_info.patient_name,
xk_patient_info.age,
xk_transfuse_apply.zone_id,
xk_patient_info.patient_sex,
xk_patient_info.patient_birthday,
xk_transfuse_apply.patient_bed,
xk_transfuse_apply.casehistory_id,
xk_transfuse_apply.dept_id,
xk_transfuse_apply.card_no,
xk_patient_info.apanage,
xk_transfuse_apply.hos_id,
xk_transfuse_apply.bill_no,
xk_transfuse_apply.beinhos_id,
xk_patient_info.transfuse_history,
xk_patient_info.gestation_history,
xk_patient_info.parturition_history,
xk_patient_info.reaction_history,
xk_transfuse_apply.apply_date,
xk_transfuse_apply.send_person,
xk_transfuse_apply.charge_sign,
xk_transfuse_apply.input_person,
xk_transfuse_apply.receive_date,
xk_transfuse_apply.attending_medic,
xk_transfuse_apply.bank_director,
xk_transfuse_apply.medical_affairs,
xk_transfuse_apply.sample_id,
xk_transfuse_apply.gather_date,
xk_transfuse_apply.abo_type,
xk_transfuse_apply.rh_type,
xk_transfuse_apply.check_sign,
xk_transfuse_apply.bill_stasus,
xk_patient_info.out_sign,
xk_transfuse_apply.apply_medic,
xk_transfuse_apply.diagnoses,
xk_transfuse_apply.intent,
xk_transfuse_apply.treat_medic,
xk_transfuse_apply.causalis,
xk_transfuse_apply.use3_date,
xk_transfuse_apply.use2_date,
xk_transfuse_apply.use1_date,
xk_patient_info.match_history,
xk_transfuse_apply.apply_type,
xk_transfuse_apply.bill_type,
xk_transfuse_apply.operation_type ,
xk_transfuse_apply_bloodbreed.blood_breed ,
xk_transfuse_apply_bloodbreed.blood_num ,
xk_transfuse_apply_bloodbreed.unit ,
xk_transfuse_apply_bloodbreed.onetime_num ,
xk_transfuse_apply_bloodbreed.special_deal ,
xk_transfuse_apply_bloodbreed.replace_bloodbreed,
xk_transfuse_apply_bloodbreed.remark,
xk_transfuse_apply.bill_sort,
xk_transfuse_apply.sample_sign,
xk_transfuse_apply_bloodbreed.apply_bloodtype,
xk_transfuse_apply.check_explain,
xk_transfuse_apply.input_dept,
xk_transfuse_apply.send_able,
xk_transfuse_apply.medic_check_date,
xk_transfuse_apply.check_medic,xk_transfuse_apply.remark,
xk_transfuse_apply.is_large_use,xk_transfuse_apply.agreement_ink,
xk_transfuse_apply.beinhos_number ,xk_transfuse_apply.notify_sign,
xk_transfuse_apply.Use_Type ,xk_transfuse_apply.Valid_Flag,
xk_transfuse_apply.Ill_Code,xk_transfuse_apply.Dept_Type,
xk_transfuse_apply.Ops_Name,xk_transfuse_apply.Use1_Num,xk_transfuse_apply.operation_name,xk_transfuse_apply.operation_level
FROM xk_patient_info RIGHT OUTER JOIN xk_transfuse_apply ON xk_patient_info.beinhos_id = xk_transfuse_apply.beinhos_id ,
xk_transfuse_apply_bloodbreed
WHERE xk_transfuse_apply.bill_no = xk_transfuse_apply_bloodbreed.bill_no AND
xk_transfuse_apply.bill_no = #{bill_no}
</select>
<select id="queryApplyBeforeList" resultType="java.util.Map">
select
xk_transfuse_apply_before.bill_no,
xk_transfuse_apply_before.dept_id,
xk_patient_info.patient_name,
xk_transfuse_apply_before.beinhos_id,
xk_transfuse_apply_before.assess_data,
xk_transfuse_apply_before.assess_person
from
xk_transfuse_apply_before,xk_patient_info
where
xk_transfuse_apply_before.beinhos_id = xk_patient_info.beinhos_id AND
xk_transfuse_apply_before.assess_data>GETDATE() - 1 AND
(xk_transfuse_apply_before.dept_id=#{dept_id} or xk_transfuse_apply_before.assess_person=#{assess_person})
</select>
</mapper>

View File

@ -325,6 +325,25 @@ if not exists(select 1 from dbo.xk_dmzd where wordbook_sign = 'BASE')
('workgroup','004','医生','Y'),
('workgroup','005','支助中心','Y')
insert into xk_dmzd(wordbook_sign,wordbook_code,wordbook_name,use_sign) values('BASE','depttype','科室类型','Y')
insert into xk_dmzd(wordbook_sign,wordbook_code,wordbook_name,use_sign) values
('depttype','A','手术科室','Y'),
('depttype','B','非手术科室','Y')
insert into xk_dmzd(wordbook_sign,wordbook_code,wordbook_name,use_sign) values('BASE','operatype','手术科室类型','Y')
insert into xk_dmzd(wordbook_sign,wordbook_code,wordbook_name,use_sign) values
('operatype','术前','术前','Y'),
('operatype','术中','术中','Y'),
('operatype','术后','术后','Y'),
('operatype','无','无','Y')
insert into xk_dmzd(wordbook_sign,wordbook_code,wordbook_name,use_sign) values('BASE','nooperatype','非手术科室类型','Y')
insert into xk_dmzd(wordbook_sign,wordbook_code,wordbook_name,use_sign) values
('nooperatype','无','无','Y'),
('nooperatype','慢性贫血','慢性贫血','Y'),
('nooperatype','急性失血','急性失血','Y'),
('nooperatype','新生儿科','新生儿科','Y')
END
@ -405,5 +424,27 @@ if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'sys_
alter table sys_dept add hos_id varchar(10)
end
go
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'xk_transfuse_apply' AND COLUMN_NAME = 'operation_name')
begin
alter table xk_transfuse_apply add operation_name varchar(200)
end
go
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'xk_transfuse_apply' AND COLUMN_NAME = 'operation_level')
begin
alter table xk_transfuse_apply add operation_level varchar(10)
end
go
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'xk_transfuse_apply' AND COLUMN_NAME = 'card_no')
begin
alter table xk_transfuse_apply add card_no varchar(50)
end
go
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'xk_patient_info' AND COLUMN_NAME = 'beinhos_number')
begin
alter table xk_patient_info add beinhos_number varchar(50)
end
go