|
|
|
@ -174,13 +174,16 @@ public class SdBusinessServiceImpl implements SdBusinessService {
|
|
|
|
|
TBasic tBasic = tBasicMapper.getTBasicInfo(parentPatientId);
|
|
|
|
|
// 查医院患者索引
|
|
|
|
|
String parentIndex = tBasicMapper.getSdRyIndex(parentPatientId);
|
|
|
|
|
List<String> babyPatientIds = new ArrayList<>();
|
|
|
|
|
// 查母婴关联关系
|
|
|
|
|
MaternalInfantRelationship maternalInfantRelationship = tBasicMapper.getMiRelationByPatientIndexAndAdmissTimes(parentIndex, tBasic.getAdmissTimes().toString());
|
|
|
|
|
// 根据宝宝的患者索引查病案主键,进行补偿
|
|
|
|
|
String babyPatientId = tBasicMapper.getPatientIdBySdRyIndex(maternalInfantRelationship.getBabyId());
|
|
|
|
|
List<String> patientIds = Collections.singletonList(babyPatientId);
|
|
|
|
|
log.info("补偿婴儿任务 patientIds:{} collectId:{}", patientIds, babyCollectorIds);
|
|
|
|
|
compensateTask(patientIds, babyCollectorIds);
|
|
|
|
|
List<MaternalInfantRelationship> maternalInfantRelationship = tBasicMapper.getMiRelationByPatientIndexAndAdmissTimes(parentIndex, tBasic.getAdmissTimes().toString());
|
|
|
|
|
// 根据宝宝的患者索引查病案主键,进行补偿,可能多个宝宝
|
|
|
|
|
for (MaternalInfantRelationship infantRelationship : maternalInfantRelationship) {
|
|
|
|
|
String babyPatientId = tBasicMapper.getPatientIdBySdRyIndex(infantRelationship.getBabyId());
|
|
|
|
|
babyPatientIds.add(babyPatientId);
|
|
|
|
|
}
|
|
|
|
|
log.info("补偿婴儿任务 patientIds:{} collectId:{}", babyPatientIds, babyCollectorIds);
|
|
|
|
|
compensateTask(babyPatientIds, babyCollectorIds);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
log.error("判断是否产科与生成婴儿任务错误了,patientId:" + parentPatientId, ex);
|
|
|
|
@ -190,7 +193,8 @@ public class SdBusinessServiceImpl implements SdBusinessService {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 是否是产科的患者
|
|
|
|
|
* @param patientId 病案主键
|
|
|
|
|
*
|
|
|
|
|
* @param patientId 病案主键
|
|
|
|
|
* @param haveBabyQuery 产科患者的查询条件,如果为空,直接判定不是产科
|
|
|
|
|
* @return 根据产科患者查询条件,判定是否是产科的患者
|
|
|
|
|
*/
|
|
|
|
|