|
|
@ -7,11 +7,14 @@ import cn.hutool.core.util.IdcardUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.ccsens.ht.bean.dto.PatientReportDto; |
|
|
|
import com.ccsens.ht.bean.dto.PatientReportSearchDto; |
|
|
|
import com.ccsens.ht.bean.po.*; |
|
|
|
import com.ccsens.ht.bean.vo.PatientReportSearchVo; |
|
|
|
import com.ccsens.ht.bean.vo.PatientReportVo; |
|
|
|
import com.ccsens.ht.persist.dao.HtDoctorDao; |
|
|
|
import com.ccsens.ht.persist.dao.HtPatientReportDao; |
|
|
|
import com.ccsens.ht.persist.dao.HtPositionDao; |
|
|
|
import com.ccsens.ht.persist.dao.HtReportDao; |
|
|
|
import com.ccsens.ht.persist.mapper.HtPatientFollowUpMapper; |
|
|
|
import com.ccsens.ht.persist.mapper.HtPatientMapper; |
|
|
|
import com.ccsens.ht.persist.mapper.HtPatientReportRecordMapper; |
|
|
@ -22,7 +25,6 @@ import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.github.pagehelper.StringUtil; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -46,7 +48,7 @@ import java.util.concurrent.atomic.AtomicReference; |
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
|
|
|
public class PatientReportService implements IPatientReportService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Resource |
|
|
|
private Snowflake snowflake; |
|
|
|
@Resource |
|
|
|
private HtDoctorDao htDoctorDao; |
|
|
@ -60,6 +62,8 @@ public class PatientReportService implements IPatientReportService { |
|
|
|
private HtPatientReportRecordMapper htPatientReportRecordMapper; |
|
|
|
@Resource |
|
|
|
private HtPatientFollowUpMapper htPatientFollowUpMapper; |
|
|
|
@Resource |
|
|
|
private HtReportDao htReportDao; |
|
|
|
|
|
|
|
@Override |
|
|
|
public JsonResponse<PatientReportVo.Generate> generatePatientReport(PatientReportDto.Generate generate, Long userId) { |
|
|
@ -577,5 +581,31 @@ public class PatientReportService implements IPatientReportService { |
|
|
|
return htPatientReportDao.queryReportAnswer(param.getId(),param.getEvaluationCode()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PatientReportSearchVo.SearchParam> searchParam(PatientReportSearchDto.SearchParam param) { |
|
|
|
List<PatientReportSearchVo.SearchParam> list = htReportDao.queryParam(param.getParentCode()); |
|
|
|
if (CollectionUtil.isEmpty(list)) { |
|
|
|
return list; |
|
|
|
} |
|
|
|
Map<String, PatientReportSearchVo.SearchParam> map = new HashMap<>(); |
|
|
|
List<PatientReportSearchVo.SearchParam> nodes = new ArrayList<>(); |
|
|
|
list.forEach(searchParam -> { |
|
|
|
if (param.getParentCode().equals(searchParam.getParentCode())) { |
|
|
|
nodes.add(searchParam); |
|
|
|
} else { |
|
|
|
PatientReportSearchVo.SearchParam parent = map.get(searchParam.getParentCode()); |
|
|
|
parent.getChildren().add(searchParam); |
|
|
|
} |
|
|
|
map.put(searchParam.getCode(), searchParam); |
|
|
|
}); |
|
|
|
return nodes; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PatientReportSearchVo.Search> search(PatientReportSearchDto.SearchList param) { |
|
|
|
List<PatientReportSearchVo.Search> list = htPatientReportDao.search(param.getCodes()); |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|