新增添加公卫患者基本信息扩展内容接口

This commit is contained in:
lxd 2025-04-18 20:10:09 +08:00
parent 6e3327b5cf
commit 2da747ef1d
7 changed files with 148 additions and 4 deletions

View File

@ -1465,7 +1465,52 @@ public class InspectPatientController {
}
return success(inspectApiInfoVO);
}
@GetMapping("/updatePatientSupplement")
@Operation(summary = "更新公卫患者扩展信息")
public CommonResult<Boolean> updatePatientSupplement(@RequestParam("medicalSn") String medicalSn,@RequestParam("idCard") String idCard) throws JsonProcessingException {
ConfigDO config = configService.getConfigByKey("url.patientinfo");
String url = config.getValue();
PatientSupplementVO patientSupplementVO = new PatientSupplementVO();
patientSupplementVO.setMedicalSn(medicalSn);
if (url != null) {
String response = HttpUtils.post(url + "?" + "idCard=" + idCard);
if (response != null) {
// 解析 JSON 响应
ObjectMapper objectMapper = new ObjectMapper();
Map<String, Object> responseMap = objectMapper.readValue(response, Map.class);
Map<String, Object> dataMap = (Map<String, Object>) responseMap.get("data");
if (dataMap != null) {
if (dataMap.get("orgname") != null) {
patientSupplementVO.setOrgname(dataMap.get("orgname").toString());
}
if (dataMap.get("districtname") != null) {
patientSupplementVO.setDistrictname(dataMap.get("districtname").toString());
}
if (dataMap.get("oldmanflag") != null) {
patientSupplementVO.setOldmanflag(dataMap.get("oldmanflag").toString());
}
if (dataMap.get("htnflag") != null) {
patientSupplementVO.setHtnflag(dataMap.get("htnflag").toString());
}
if (dataMap.get("diaflag") != null) {
patientSupplementVO.setDiaflag(dataMap.get("diaflag").toString());
}
if (dataMap.get("smiflag") != null) {
patientSupplementVO.setSmiflag(dataMap.get("smiflag").toString());
}
if (dataMap.get("pulflag") != null) {
patientSupplementVO.setPulflag(dataMap.get("pulflag").toString());
}
patientService. updatePatientsupplement(patientSupplementVO);
} else {
return success("没有查询到相关信息");
}
}
}
return success(true);
}
@PutMapping("/syncPatientZyInfo")
@Operation(summary = "同步中医体质结果项")
public CommonResult<Boolean> syncPatientZyInfo(@RequestParam("medicalSn") String medicalSn, @RequestParam("cardId") String cardId) throws JsonProcessingException {

View File

@ -0,0 +1,34 @@
package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatient.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class PatientSupplementVO {
@Schema(description = "体检编号")
private String medicalSn;
@Schema(description = "老年人")
private String oldmanflag;
@Schema(description = "卫生院")
private String orgname;
@Schema(description = "行政村")
private String districtname;
@Schema(description = "高血压")
private String htnflag;
@Schema(description = "糖尿病")
private String diaflag;
@Schema(description = "精神病")
private String smiflag;
@Schema(description = "肺结核")
private String pulflag;
}

View File

@ -213,5 +213,48 @@ public class InspectPatientDO {
@TableField("pdfurl")
private String pdfurl;
/**
* 老年人
*/
@TableField("oldmanflag")
private String oldmanflag;
/**
* 卫生院
*/
@TableField("orgname")
private String orgname;
/**
* 行政村
*/
@TableField("districtname")
private String districtname;
/**
* 高血压
*/
@TableField("htnflag")
private String htnflag;
/**
* 糖尿病
*/
@TableField("diaflag")
private String diaflag;
/**
* 精神病
*/
@TableField("smiflag")
private String smiflag;
/**
* 肺结核
*/
@TableField("pulflag")
private String pulflag;
}

View File

@ -29,13 +29,13 @@ public interface InspectPatientMapper extends BaseMapperX<InspectPatientDO> {
.eqIfPresent(InspectPatientDO::getCardId, reqVO.getCardId())
.eqIfPresent(InspectPatientDO::getNationality, reqVO.getNationality())
.eqIfPresent(InspectPatientDO::getNation, reqVO.getNation())
.eqIfPresent(InspectPatientDO::getRace, reqVO.getRace())
// .eqIfPresent(InspectPatientDO::getRace, reqVO.getRace())
.eqIfPresent(InspectPatientDO::getPhoneNum, reqVO.getPhoneNum())
.eqIfPresent(InspectPatientDO::getStatus, reqVO.getStatus())
.eqIfPresent(InspectPatientDO::getReportType, reqVO.getReportType())
//.eqIfPresent(InspectPatientDO::getReportType, reqVO.getReportType())
.betweenIfPresent(InspectPatientDO::getMedicalDateTime, reqVO.getMedicalDateTime())
.eqIfPresent(InspectPatientDO::getChargeType, reqVO.getChargeType())
.eqIfPresent(InspectPatientDO::getTotalPrice, reqVO.getTotalPrice())
// .eqIfPresent(InspectPatientDO::getChargeType, reqVO.getChargeType())
// .eqIfPresent(InspectPatientDO::getTotalPrice, reqVO.getTotalPrice())
.eqIfPresent(InspectPatientDO::getHeadPicUrl, reqVO.getHeadPicUrl())
.eqIfPresent(InspectPatientDO::getSummaryResult, reqVO.getSummaryResult())
.eqIfPresent(InspectPatientDO::getAuditor, reqVO.getAuditor())

View File

@ -75,6 +75,10 @@ public interface InspectPatientService {
* 根据体检编号获取患者信息的json
* */
InspectPatientDO getPatientInfo(String medicalSn);
/*
* 更新患者的基本信息里的补充信息 高血压老年人行政村卫生院糖尿病精神病
* */
Integer updatePatientsupplement(PatientSupplementVO updateReqVO);
/*
* 根据体检编号更新PDF报告URL

View File

@ -183,6 +183,21 @@ public class InspectPatientServiceImpl implements InspectPatientService {
return patientMapper.update(null, updateWrapper);
}
@Override
public Integer updatePatientsupplement(PatientSupplementVO updateReqVO) {
LambdaUpdateWrapper<InspectPatientDO> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(InspectPatientDO::getMedicalSn, updateReqVO.getMedicalSn());
updateWrapper.set(InspectPatientDO::getOldmanflag, updateReqVO.getOldmanflag());
updateWrapper.set(InspectPatientDO::getOrgname, updateReqVO.getOrgname());
updateWrapper.set(InspectPatientDO::getDistrictname, updateReqVO.getDistrictname());
updateWrapper.set(InspectPatientDO::getHtnflag, updateReqVO.getHtnflag());
updateWrapper.set(InspectPatientDO::getDiaflag, updateReqVO.getDiaflag());
updateWrapper.set(InspectPatientDO::getSmiflag, updateReqVO.getSmiflag());
updateWrapper.set(InspectPatientDO::getPulflag, updateReqVO.getPulflag());
return patientMapper.update(null, updateWrapper);
}
@Override
public void updatePatientPdfUrl(InspectPatientSaveReqVO updateReqVO) {

View File

@ -232,6 +232,7 @@ yudao:
- /admin-api/inspect/patient/getReportUrl # 获取报告地址
- /admin-api/inspect/patient/getUSTj #同步超声
- /admin-api/inspect/patient/generateReport # pdf生成
- /admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
websocket:
enable: true # websocket的开关
path: /infra/ws # 路径
@ -279,6 +280,7 @@ yudao:
- /admin-api/inspect/patient/getReportUrl # 获取报告地址
- /admin-api/inspect/patient/getUSTj #同步超声
- /admin-api/inspect/patient/generateReport # pdf生成存放
- /admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
- /adminInspect/admin-api/inspect/department/getList
- /adminInspect/admin-api/inspect/patient/getUSPatientInfo
- /adminInspect/admin-api/system/captcha/get
@ -293,6 +295,7 @@ yudao:
- /adminInspect/admin-api/inspect/patient/getReportUrl # 获取报告地址
- /adminInspect/admin-api/inspect/patient/getUSTj #同步超声
- /adminInspect/admin-api/inspect/patient/generateReport #pdf生成存放
- /adminInspect/admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
ignore-tables:
- system_tenant
- system_tenant_package