标本接收,标本送出
This commit is contained in:
parent
c6de39e994
commit
101ba77adb
@ -12,4 +12,5 @@ public class BloodSysLogConstants {
|
|||||||
public static final String LOG_TYPE_SAMPLE_INFO = "样本信息";
|
public static final String LOG_TYPE_SAMPLE_INFO = "样本信息";
|
||||||
public static final String LOG_TYPE_SEARCH_TRANSFUSEBILL_INFO = "申请单扫描登记";
|
public static final String LOG_TYPE_SEARCH_TRANSFUSEBILL_INFO = "申请单扫描登记";
|
||||||
public static final String LOG_TYPE_ACCEPT_SAMPLE_INFO = "标本接收";
|
public static final String LOG_TYPE_ACCEPT_SAMPLE_INFO = "标本接收";
|
||||||
|
public static final String LOG_TYPE_SEND_SAMPLE_INFO = "标本送检";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,4 +8,5 @@ import java.util.Map;
|
|||||||
public interface SearchTransfuseBillMapper {
|
public interface SearchTransfuseBillMapper {
|
||||||
List<Map<String, Object>> queryList(XkSearchTransfuseBillVO xkSearchTransfuseBillVO);
|
List<Map<String, Object>> queryList(XkSearchTransfuseBillVO xkSearchTransfuseBillVO);
|
||||||
Integer getMaxSid();
|
Integer getMaxSid();
|
||||||
|
List<Map<String,Object>> queryOne(String billNo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,12 +57,12 @@ public class SearchTransfuseBillServiceImpl implements SearchTransfuseBillServic
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result queryOne(String billNo) {
|
public Result queryOne(String billNo) {
|
||||||
XkSearchTransfuseBill xkSearchTransfuseBill = xkSearchTransfuseBillMapper.queryOne(billNo);
|
List<Map<String, Object>> mapList = searchTransfuseBillMapper.queryOne(billNo);
|
||||||
return new Result("0","查询成功",xkSearchTransfuseBill);
|
return new Result("0","查询成功",mapList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除某个申请单
|
* 取消扫描登记
|
||||||
* @param billNo
|
* @param billNo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -39,4 +39,34 @@
|
|||||||
<select id="getMaxSid" resultType="java.lang.Integer">
|
<select id="getMaxSid" resultType="java.lang.Integer">
|
||||||
select max(sid) from xk_search_transfuse_bill
|
select max(sid) from xk_search_transfuse_bill
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryOne" resultType="java.util.Map">
|
||||||
|
SELECT xk_search_transfuse_bill.sid,
|
||||||
|
xk_search_transfuse_bill.bill_no,
|
||||||
|
xk_search_transfuse_bill.input_person,
|
||||||
|
xk_search_transfuse_bill.input_date,
|
||||||
|
xk_search_transfuse_bill.hgbz,
|
||||||
|
xk_search_transfuse_bill.hgyy,
|
||||||
|
xk_transfuse_apply.patient_bed,
|
||||||
|
xk_transfuse_apply.dept_id,
|
||||||
|
xk_transfuse_apply.apply_date,
|
||||||
|
xk_transfuse_apply.apply_medic,
|
||||||
|
xk_transfuse_apply.diagnoses,
|
||||||
|
xk_patient_info.patient_name,
|
||||||
|
xk_patient_info.patient_sex,
|
||||||
|
xk_transfuse_apply_bloodbreed.blood_breed,
|
||||||
|
xk_transfuse_apply_bloodbreed.blood_num,
|
||||||
|
xk_transfuse_apply_bloodbreed.unit ,
|
||||||
|
CONVERT(datetime, getdate(), 20) as input_date_temp
|
||||||
|
FROM xk_patient_info,
|
||||||
|
xk_search_transfuse_bill,
|
||||||
|
xk_transfuse_apply,
|
||||||
|
xk_transfuse_apply_bloodbreed
|
||||||
|
WHERE ( xk_search_transfuse_bill.bill_no = xk_transfuse_apply.bill_no ) and
|
||||||
|
( xk_transfuse_apply.beinhos_id = xk_patient_info.beinhos_id ) and
|
||||||
|
( xk_transfuse_apply.bill_no = xk_transfuse_apply_bloodbreed.bill_no ) and
|
||||||
|
( ( xk_search_transfuse_bill.bill_no = #{billNo} ) )
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.czblood.busNurse.controller;
|
||||||
|
|
||||||
|
import com.czblood.bus.constants.BloodSysLogConstants;
|
||||||
|
import com.czblood.busNurse.pojo.VO.SendSampleInfoQueryVO;
|
||||||
|
import com.czblood.busNurse.pojo.VO.SendSampleInfoVO;
|
||||||
|
import com.czblood.busNurse.service.SendSampleInfoService;
|
||||||
|
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 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;
|
||||||
|
|
||||||
|
@Api(tags = "标本送检")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/bus/nurse/sendSampleInfo")
|
||||||
|
@Slf4j
|
||||||
|
public class SendSampleInfoController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SendSampleInfoService sendSampleInfoService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("查询样本信息列表")
|
||||||
|
@GetMapping("/queryList")
|
||||||
|
public Result queryList(SendSampleInfoQueryVO sendSampleInfoQueryVO) {
|
||||||
|
return sendSampleInfoService.queryList(sendSampleInfoQueryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询单个样本信息")
|
||||||
|
@GetMapping("/queryOne")
|
||||||
|
public Result queryOne(String sampleNo){
|
||||||
|
return sendSampleInfoService.queryOne(sampleNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log(title = BloodSysLogConstants.LOG_TYPE_SEND_SAMPLE_INFO, businessType = BusinessType.INSERT)
|
||||||
|
@ApiOperation("标本送检")
|
||||||
|
@GetMapping("/sendSampleInfo")
|
||||||
|
public Result sendSampleInfo(SendSampleInfoVO sendSampleInfoVO){
|
||||||
|
sendSampleInfoVO.setUserId(getUsername());
|
||||||
|
return sendSampleInfoService.sendSampleInfo(sendSampleInfoVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
package com.czblood.busNurse.mapper;
|
||||||
|
|
||||||
|
import com.czblood.busNurse.pojo.VO.SendSampleInfoQueryVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface SendSampleInfoMapper {
|
||||||
|
List<Map<String,Object>> queryList(SendSampleInfoQueryVO sendSampleInfoQueryVO);
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.czblood.busNurse.pojo.VO;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class SendSampleInfoQueryVO {
|
||||||
|
private String sampleNo;
|
||||||
|
private String stime;
|
||||||
|
private String etime;
|
||||||
|
private String dept;
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.czblood.busNurse.pojo.VO;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Api(tags = "标本送检VO")
|
||||||
|
public class SendSampleInfoVO {
|
||||||
|
private String sampleNo;
|
||||||
|
@ApiModelProperty("送检人")
|
||||||
|
private String sendMan;
|
||||||
|
@ApiModelProperty("运送人")
|
||||||
|
private String sendPerson;
|
||||||
|
private String userId;
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.czblood.busNurse.service;
|
||||||
|
|
||||||
|
import com.czblood.busNurse.pojo.VO.SendSampleInfoQueryVO;
|
||||||
|
import com.czblood.busNurse.pojo.VO.SendSampleInfoVO;
|
||||||
|
import com.czblood.common.core.domain.Result;
|
||||||
|
|
||||||
|
public interface SendSampleInfoService {
|
||||||
|
Result queryList(SendSampleInfoQueryVO sendSampleInfoQueryVO);
|
||||||
|
|
||||||
|
Result queryOne(String billNo);
|
||||||
|
|
||||||
|
Result sendSampleInfo(SendSampleInfoVO sendSampleInfoVO);
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.czblood.busNurse.service.impl;
|
||||||
|
|
||||||
|
import com.czblood.bus.mapper.XkSampleInfoMapper;
|
||||||
|
import com.czblood.bus.pojo.XkSampleInfo;
|
||||||
|
import com.czblood.bus.utils.BloodBankUtil;
|
||||||
|
import com.czblood.busNurse.mapper.SendSampleInfoMapper;
|
||||||
|
import com.czblood.busNurse.pojo.VO.SendSampleInfoQueryVO;
|
||||||
|
import com.czblood.busNurse.pojo.VO.SendSampleInfoVO;
|
||||||
|
import com.czblood.busNurse.service.SendSampleInfoService;
|
||||||
|
import com.czblood.common.core.domain.Result;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SendSampleInfoServiceImpl implements SendSampleInfoService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SendSampleInfoMapper sendSampleInfoMapper;
|
||||||
|
@Resource
|
||||||
|
XkSampleInfoMapper xkSampleInfoMapper;
|
||||||
|
@Resource
|
||||||
|
BloodBankUtil bloodBankUtil;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result queryList(SendSampleInfoQueryVO sendSampleInfoQueryVO) {
|
||||||
|
List<Map<String, Object>> mapList = sendSampleInfoMapper.queryList(sendSampleInfoQueryVO);
|
||||||
|
return new Result("0","查询成功",mapList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result queryOne(String sampleNo) {
|
||||||
|
XkSampleInfo xkSampleInfo = xkSampleInfoMapper.queryOne(sampleNo);
|
||||||
|
return new Result("0","查询成功",xkSampleInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标本送出
|
||||||
|
* @param sendSampleInfoVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Result sendSampleInfo(SendSampleInfoVO sendSampleInfoVO) {
|
||||||
|
String sampleNo = sendSampleInfoVO.getSampleNo();
|
||||||
|
XkSampleInfo xkSampleInfo = xkSampleInfoMapper.queryOne(sampleNo);
|
||||||
|
String sendNurse = BloodBankUtil.isBank(xkSampleInfo.getSend_Nurse());
|
||||||
|
if(!sendNurse.equals("")) return new Result("-1","该标本已经送检!");
|
||||||
|
XkSampleInfo xkSampleInfoTemp = new XkSampleInfo();
|
||||||
|
xkSampleInfoTemp.setSend_Nurse(sendSampleInfoVO.getSendMan());
|
||||||
|
xkSampleInfoTemp.setSendperson(sendSampleInfoVO.getSendPerson());
|
||||||
|
xkSampleInfoTemp.setSample_status("4");
|
||||||
|
xkSampleInfoTemp.setSend_Date(bloodBankUtil.getCurrentTimeDate());
|
||||||
|
xkSampleInfoTemp.setSample_No(sendSampleInfoVO.getSampleNo());
|
||||||
|
xkSampleInfoMapper.update(xkSampleInfoTemp);
|
||||||
|
return new Result("0","送检成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
<?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.busNurse.mapper.SendSampleInfoMapper">
|
||||||
|
<select id="queryList" resultType="java.util.Map">
|
||||||
|
SELECT xk_sample_info.Sample_No,
|
||||||
|
xk_sample_info.Purpose,
|
||||||
|
xk_sample_info.Dept,
|
||||||
|
xk_sample_info.Relate_ApplyNo,
|
||||||
|
xk_sample_info.Blood_Type,
|
||||||
|
xk_sample_info.Rh_Blood_Type,
|
||||||
|
xk_sample_info.Sample_Name,
|
||||||
|
xk_sample_info.Sex,
|
||||||
|
xk_sample_info.Age,
|
||||||
|
xk_sample_info.Birthday,
|
||||||
|
xk_sample_info.Pick_Nurse,
|
||||||
|
xk_sample_info.Pick_Date,
|
||||||
|
xk_sample_info.Send_Nurse,
|
||||||
|
xk_sample_info.Send_Date,
|
||||||
|
xk_sample_info.TakeOver_Man,
|
||||||
|
xk_sample_info.TakeOver_Date,
|
||||||
|
xk_sample_info.Discard_Person,
|
||||||
|
xk_sample_info.Discard_Date,
|
||||||
|
xk_sample_info.Discard_Reason,
|
||||||
|
xk_sample_info.Exp2,
|
||||||
|
xk_sample_info.Overdue_Flag ,
|
||||||
|
xk_sample_info.sendperson,
|
||||||
|
xk_sample_info.sample_status,
|
||||||
|
xk_transfuse_apply.beinhos_id,
|
||||||
|
xk_transfuse_apply.bill_stasus
|
||||||
|
FROM xk_sample_info ,xk_transfuse_apply
|
||||||
|
where xk_sample_info.Relate_ApplyNo = xk_transfuse_apply.bill_no
|
||||||
|
<if test="sampleNo != null and sampleNo != ''">and xk_sample_info.Sample_No = #{sampleNo}</if>
|
||||||
|
<if test="dept != null and dept != ''">and xk_transfuse_apply.dept_id = #{dept}</if>
|
||||||
|
<if test="status != null and status != ''">and xk_sample_info.sample_status = #{status}</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@ -361,6 +361,14 @@ if not exists(select 1 from dbo.xk_dmzd where wordbook_sign = 'BASE')
|
|||||||
('rhtype','-','-','Y'),
|
('rhtype','-','-','Y'),
|
||||||
('rhtype','未知','未知','Y')
|
('rhtype','未知','未知','Y')
|
||||||
|
|
||||||
|
insert into xk_dmzd(wordbook_sign,wordbook_code,wordbook_name,use_sign) values('BASE','sampleStatus','样本状态','Y')
|
||||||
|
insert into xk_dmzd(wordbook_sign,wordbook_code,wordbook_name,use_sign) values
|
||||||
|
('sampleStatus','1','打印条码','Y'),
|
||||||
|
('sampleStatus','2','已采样','Y'),
|
||||||
|
('sampleStatus','3','已送检','Y'),
|
||||||
|
('sampleStatus','4','已签收','Y'),
|
||||||
|
('sampleStatus','5','复核血型','Y')
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
IF NOT EXISTS (SELECT 1 FROM sys.key_constraints WHERE name = 'PK_xk_dmzd' AND type = 'PK' )
|
IF NOT EXISTS (SELECT 1 FROM sys.key_constraints WHERE name = 'PK_xk_dmzd' AND type = 'PK' )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user