|
|
|
@ -19,10 +19,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -43,7 +40,6 @@ public class MzZyHisServiceImpl implements MzZyHisService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void firstPageCheckout(FirstPageCheckoutInDTO dto) {
|
|
|
|
|
System.out.println(dto);
|
|
|
|
|
PatientInfoDTO patientInfo = dto.getPatientInfo();
|
|
|
|
|
//验证基础数据是否存在
|
|
|
|
|
String patientId = tBasicMapper.getPatientIdByJzh(patientInfo.getInpatientNo());
|
|
|
|
@ -67,6 +63,27 @@ public class MzZyHisServiceImpl implements MzZyHisService {
|
|
|
|
|
if (result.getCode().equals(ResultCode.FAILED.getCode())) {
|
|
|
|
|
throw new RuntimeException(commonResult.getMsg());
|
|
|
|
|
}
|
|
|
|
|
babyTaskCompensate(patientInfo.getInpatientNo(),collectorIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据母亲的住院流水号,查询宝宝的病案主键,进行任务补偿
|
|
|
|
|
* @param momJzh 母亲住院流水号
|
|
|
|
|
* @param collectorIds 采集器id
|
|
|
|
|
*/
|
|
|
|
|
private void babyTaskCompensate(String momJzh, List<String> collectorIds) {
|
|
|
|
|
List<String> babyPatientIds=tBasicMapper.getPatientIdByMomJzh(momJzh);
|
|
|
|
|
if(Func.isNotEmpty(babyPatientIds)){
|
|
|
|
|
// 进行任务补偿
|
|
|
|
|
CompensateTasRequest request = new CompensateTasRequest();
|
|
|
|
|
request.setPatientIds(babyPatientIds);
|
|
|
|
|
request.setPriority(4);
|
|
|
|
|
request.setCollectorIds(collectorIds);
|
|
|
|
|
collectTaskService.compensateTask(request);
|
|
|
|
|
for (String babyPatientId : babyPatientIds) {
|
|
|
|
|
medicalrecordService.signOutOrBackRepair(babyPatientId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<String> systemMappingCollectorIds(FirstPageCheckoutInDTO dto) {
|
|
|
|
|