新增查询报告公共方法
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
59afc49a23
commit
db2df3e68b
@ -173,4 +173,14 @@ public class DateUtils {
|
|||||||
// 格式化为所需的格式
|
// 格式化为所需的格式
|
||||||
return String.format("%06d.%06d", totalSeconds, 0);
|
return String.format("%06d.%06d", totalSeconds, 0);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 出生日期计算年龄
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static String calculateAge(LocalDateTime birthDateTime) {
|
||||||
|
// 从LocalDateTime获取出生的日期部分
|
||||||
|
LocalDate birthDate = birthDateTime.toLocalDate();
|
||||||
|
LocalDate currentDate = LocalDate.now(); // 获取当前日期
|
||||||
|
return String.valueOf(Period.between(birthDate, currentDate).getYears()); // 计算两个日期之间的年份差
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ public class JwtTokenAutoConfiguration implements WebMvcConfigurer {
|
|||||||
public void addInterceptors(InterceptorRegistry registry) {
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
registry.addInterceptor(new JwtTokenInterceptor())
|
registry.addInterceptor(new JwtTokenInterceptor())
|
||||||
.addPathPatterns("/admin-api/ultrasoniccom/ultrasonic/InsImageInfo",
|
.addPathPatterns("/admin-api/ultrasoniccom/ultrasonic/InsImageInfo",
|
||||||
|
"/admin-api/tblist/patientexamlist/GetAnalysisInfo",
|
||||||
"/admin-api/tblist/patientexamlist/addPatientExamInfo");
|
"/admin-api/tblist/patientexamlist/addPatientExamInfo");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
package cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist;
|
package cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||||
import cn.iocoder.yudao.module.tblist.service.patientexamlist.org.OrgService;
|
import cn.iocoder.yudao.module.tblist.service.patientexamlist.org.OrgService;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
import com.mzt.logapi.starter.annotation.LogRecord;
|
import com.mzt.logapi.starter.annotation.LogRecord;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -318,4 +321,71 @@ public class PatientexamlistController {
|
|||||||
patientexamlistService.updatePatientexamlist(updateReqVO);
|
patientexamlistService.updatePatientexamlist(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/GetAnalysisInfo")
|
||||||
|
@Operation(summary = "获取报告信息")
|
||||||
|
public CommonResult<String> GetAnalysisInfo(@RequestParam(value = "examId", required = false) String examId,@RequestParam("regId") String regId,@RequestParam("orgId") String orgId)
|
||||||
|
{
|
||||||
|
String msg="";
|
||||||
|
|
||||||
|
if (regId!=null &&!regId.isEmpty() && orgId!=null &&!orgId.isEmpty())
|
||||||
|
{
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("regId", regId);
|
||||||
|
params.put("orgId", orgId);
|
||||||
|
if(examId!=null&&!examId.isEmpty())
|
||||||
|
{
|
||||||
|
params.put("examId", examId);
|
||||||
|
}
|
||||||
|
List<AnalysisInfoVO> analysisInfoVOS=new ArrayList<>();
|
||||||
|
List<PatientexamlistDO> patientexamlistDOList= patientexamlistService.selectMp(params);
|
||||||
|
if(!patientexamlistDOList.isEmpty())
|
||||||
|
{
|
||||||
|
for (PatientexamlistDO patientexamlistDO:patientexamlistDOList)
|
||||||
|
{
|
||||||
|
if(patientexamlistDO.getDiagDoctor()!=null &&!patientexamlistDO.getDiagDoctor().isEmpty())
|
||||||
|
{
|
||||||
|
AnalysisInfoVO infoVO=new AnalysisInfoVO();
|
||||||
|
infoVO.setExamId(patientexamlistDO.getExamId());
|
||||||
|
infoVO.setRegId(patientexamlistDO.getRegId());
|
||||||
|
infoVO.setPName(patientexamlistDO.getPName());
|
||||||
|
infoVO.setGender(patientexamlistDO.getGender());
|
||||||
|
infoVO.setAge(DateUtils.calculateAge(patientexamlistDO.getBirthday()));
|
||||||
|
infoVO.setDeviceName(patientexamlistDO.getDeviceName());
|
||||||
|
infoVO.setExamItemName(patientexamlistDO.getExamItemName());
|
||||||
|
infoVO.setExamDescription(patientexamlistDO.getExamDescription());
|
||||||
|
infoVO.setDiagResults(patientexamlistDO.getDiagResults());
|
||||||
|
infoVO.setDiagDoctor(patientexamlistDO.getDiagDoctor());
|
||||||
|
infoVO.setDiagDate(patientexamlistDO.getDiagDate() != null ? patientexamlistDO.getDiagDate().toString() : null);
|
||||||
|
infoVO.setReviewDoctor(patientexamlistDO.getReviewDoctor());
|
||||||
|
infoVO.setReviewDate(patientexamlistDO.getReviewDate()!=null ?patientexamlistDO.getReviewDate().toString():null);
|
||||||
|
infoVO.setCloudurl("http://114.55.171.231:48081/?no="+regId+"&&orgId="+orgId);
|
||||||
|
analysisInfoVOS.add(infoVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if(!analysisInfoVOS.isEmpty())
|
||||||
|
{
|
||||||
|
Gson gson = new GsonBuilder()
|
||||||
|
.serializeSpecialFloatingPointValues() // 序列化特殊浮点数值(如 NaN, Infinity)
|
||||||
|
.disableHtmlEscaping() // 禁用 HTML 转义
|
||||||
|
.create();
|
||||||
|
msg= gson.toJson(analysisInfoVOS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg="未查询到数据或数据未进行分析";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg="参数为空";
|
||||||
|
}
|
||||||
|
|
||||||
|
return success(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AnalysisInfoVO {
|
||||||
|
|
||||||
|
@Schema(description = "患者ID")
|
||||||
|
private String regId;
|
||||||
|
|
||||||
|
@Schema(description = "检查ID")
|
||||||
|
private String examId;
|
||||||
|
|
||||||
|
@Schema(description = "姓名")
|
||||||
|
private String pName;
|
||||||
|
|
||||||
|
@Schema(description = "性别")
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
@Schema(description = "年龄")
|
||||||
|
private String age;
|
||||||
|
|
||||||
|
@Schema(description = "设备名称")
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
@Schema(description = "检查项目")
|
||||||
|
private String examItemName;
|
||||||
|
|
||||||
|
@Schema(description = "检查所见")
|
||||||
|
private String examDescription;
|
||||||
|
|
||||||
|
@Schema(description = "诊断结论")
|
||||||
|
private String diagResults;
|
||||||
|
|
||||||
|
@Schema(description = "下诊断医生")
|
||||||
|
private String diagDoctor;
|
||||||
|
|
||||||
|
@Schema(description = "下诊断时间")
|
||||||
|
private String diagDate;
|
||||||
|
|
||||||
|
@Schema(description = "审核人")
|
||||||
|
private String reviewDoctor;
|
||||||
|
|
||||||
|
@Schema(description = "审核时间")
|
||||||
|
private String reviewDate;
|
||||||
|
|
||||||
|
@Schema(description = "云胶片地址")
|
||||||
|
private String cloudurl;
|
||||||
|
}
|
@ -112,4 +112,6 @@ public interface PatientexamlistService extends IService<PatientexamlistDO> {
|
|||||||
* getCheckRecord
|
* getCheckRecord
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getCheckRecord(String regId, String orgId);
|
Map<String, Object> getCheckRecord(String regId, String orgId);
|
||||||
|
|
||||||
|
List<PatientexamlistDO> selectMp(Map<String, Object> columnMap);
|
||||||
}
|
}
|
@ -322,5 +322,9 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
|
|||||||
|
|
||||||
return _out;
|
return _out;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public List<PatientexamlistDO> selectMp(Map<String, Object> columnMap)
|
||||||
|
{
|
||||||
|
return patientexamlistMapper.selectByMap(columnMap);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user