修改BUG
This commit is contained in:
parent
593d3f4698
commit
dc5526f8bb
@ -103,4 +103,13 @@ public class InspectPacsDataController {
|
||||
BeanUtils.toBean(list, InspectPacsDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/getByMedicalSnAndType")
|
||||
@Operation(summary = "根据体检编号和类型查询报告状态")
|
||||
public CommonResult<Map<String, Object>> getPacsDataByMedicalSnAndType(
|
||||
@RequestParam("medicalSn") String medicalSn,
|
||||
@RequestParam("type") String type) {
|
||||
Map<String, Object> result = pacsDataService.getPacsDataByMedicalSnAndType(medicalSn, type);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cn.iocoder.yudao.module.inspect.controller.admin.inspectpacsdata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@Schema(description = "管理后台 - 报告状态 Response VO")
|
||||
@Data
|
||||
public class ReportStatusRespVO {
|
||||
|
||||
@Schema(description = "体检编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20241201123456")
|
||||
private String medicalSn;
|
||||
|
||||
@Schema(description = "检查类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "US")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private String status;
|
||||
|
||||
}
|
@ -588,12 +588,15 @@ public class InspectPatientController {
|
||||
ReportData reportData = reportResponse.getData();
|
||||
// 获取 reportPath
|
||||
String reportPath = reportData.getReportPath();
|
||||
String barCodestatus=reportData.getBarCodestatus();
|
||||
String barCodestatus=reportData.getBarCodeStatus();
|
||||
//更新检验检查状态
|
||||
if (barCodestatus!=null) {
|
||||
pacsDataService.updatebarcodestatus(medicalSn, model, barCodestatus);
|
||||
if (pacsDataService.existsReportStatus(medicalSn, model)) {
|
||||
pacsDataService.updateReportStatus(medicalSn, model, barCodestatus);
|
||||
} else {
|
||||
pacsDataService.insertReportStatus(medicalSn, model, barCodestatus);
|
||||
}
|
||||
}
|
||||
|
||||
if (!reportPath.contains("报告暂未出")) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
InspectPacsDataSaveReqVO inspectPacs = new InspectPacsDataSaveReqVO();
|
||||
@ -639,10 +642,14 @@ public class InspectPatientController {
|
||||
ReportData reportData = reportResponse.getData();
|
||||
// 获取 reportPath
|
||||
String reportPath = reportData.getReportPath();
|
||||
String barCodestatus=reportData.getBarCodestatus();
|
||||
String barCodestatus=reportData.getBarCodeStatus();
|
||||
//更新检验检查状态
|
||||
if (barCodestatus!=null) {
|
||||
pacsDataService.updatebarcodestatus(medicalSn, model, barCodestatus);
|
||||
if (pacsDataService.existsReportStatus(medicalSn, model)) {
|
||||
pacsDataService.updateReportStatus(medicalSn, model, barCodestatus);
|
||||
} else {
|
||||
pacsDataService.insertReportStatus(medicalSn, model, barCodestatus);
|
||||
}
|
||||
}
|
||||
if (!reportPath.contains("报告暂未出")) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@ -1000,7 +1007,8 @@ public class InspectPatientController {
|
||||
@Operation(summary = "获取超声报告")
|
||||
public CommonResult<Boolean> GetApiPacsInfo(@RequestParam("medicalSn") String medicalSn) {
|
||||
// 只获取shortid字段,提高查询性能
|
||||
String shortid = patientService.getPatientShortid(medicalSn);
|
||||
InspectPatientDO patientDO = patientService.getPatientShortid(medicalSn);
|
||||
String shortid = patientDO != null ? patientDO.getShortid() : null;
|
||||
if (shortid == null) {
|
||||
return success(false);
|
||||
}
|
||||
@ -1918,7 +1926,7 @@ public class InspectPatientController {
|
||||
public CommonResult<BarcodeInfoVO> GetbarcodeInfo(@RequestParam("medicalSn") String medicalSn) {
|
||||
|
||||
// 获取患者信息
|
||||
InspectPatientDO patientDO = patientService.getPatientInfo(medicalSn);
|
||||
InspectPatientDO patientDO = patientService.getPatientShortid(medicalSn);
|
||||
if (patientDO == null) {
|
||||
return success("未找到该患者信息");
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import java.util.List;
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ReportData {
|
||||
private String barCodestatus;
|
||||
private String barCodeStatus;
|
||||
private String reportPath;
|
||||
private List<ResultItem> results;
|
||||
private List<ResultItem> resultsAll;
|
||||
|
@ -8,6 +8,7 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpacsdata.InspectPacsDataDO;
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import cn.iocoder.yudao.module.inspect.controller.admin.inspectpacsdata.vo.*;
|
||||
|
||||
/**
|
||||
@ -34,4 +35,28 @@ public interface InspectPacsDataMapper extends BaseMapperX<InspectPacsDataDO> {
|
||||
.orderByDesc(InspectPacsDataDO::getId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入检验报告状态
|
||||
*/
|
||||
int insertReportStatus(@Param("medicalSn") String medicalSn,
|
||||
@Param("type") String type,
|
||||
@Param("status") String status);
|
||||
|
||||
/**
|
||||
* 更新检验报告状态
|
||||
*/
|
||||
int updateReportStatus(@Param("medicalSn") String medicalSn,
|
||||
@Param("type") String type,
|
||||
@Param("status") String status);
|
||||
|
||||
/**
|
||||
* 统计检验报告状态表中指定体检编号和类型的记录数
|
||||
*/
|
||||
int countReportStatus(@Param("medicalSn") String medicalSn, @Param("type") String type);
|
||||
|
||||
/**
|
||||
* 根据体检编号和类型查询PACS数据
|
||||
*/
|
||||
Map<String, Object> getPacsDataByMedicalSnAndType(@Param("medicalSn") String medicalSn, @Param("type") String type);
|
||||
|
||||
}
|
@ -49,6 +49,26 @@ public interface InspectPacsDataService {
|
||||
* */
|
||||
void updatebarcodestatus(String medicalSn, String type, String barcodestatus);
|
||||
|
||||
/**
|
||||
* 插入检验报告状态到tb_report_status表
|
||||
*
|
||||
* @param medicalSn 体检编号
|
||||
* @param type 类型
|
||||
* @param status 状态
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertReportStatus(String medicalSn, String type, String status);
|
||||
|
||||
/**
|
||||
* 更新检验报告状态到tb_report_status表
|
||||
*
|
||||
* @param medicalSn 体检编号
|
||||
* @param type 类型
|
||||
* @param status 状态
|
||||
* @return 影响行数
|
||||
*/
|
||||
int updateReportStatus(String medicalSn, String type, String status);
|
||||
|
||||
/**
|
||||
* 获得pacs抓取数据
|
||||
*
|
||||
@ -86,4 +106,18 @@ public interface InspectPacsDataService {
|
||||
PageResult<InspectPacsDataDO> getPacsDataPage(InspectPacsDataPageReqVO pageReqVO);
|
||||
|
||||
List<InspectPacsDataDO> getPacsDataByCode(String medicalSn);
|
||||
|
||||
/**
|
||||
* 判断检验报告状态表中指定体检编号和类型的记录是否存在
|
||||
*/
|
||||
boolean existsReportStatus(String medicalSn, String type);
|
||||
|
||||
/**
|
||||
* 根据体检编号和类型查询PACS数据
|
||||
*
|
||||
* @param medicalSn 体检编号
|
||||
* @param type 数据类型
|
||||
* @return 报告状态数据
|
||||
*/
|
||||
Map<String, Object> getPacsDataByMedicalSnAndType(String medicalSn, String type);
|
||||
}
|
@ -79,6 +79,23 @@ public class InspectPacsDataServiceImpl implements InspectPacsDataService {
|
||||
.set(InspectPacsDataDO::getRemark, barcodestatus);
|
||||
pacsDataMapper.update(null, updateWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入检验报告状态到tb_report_status表
|
||||
*/
|
||||
@Override
|
||||
public int insertReportStatus(String medicalSn, String type, String status) {
|
||||
return pacsDataMapper.insertReportStatus(medicalSn, type, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新检验报告状态到tb_report_status表
|
||||
*/
|
||||
@Override
|
||||
public int updateReportStatus(String medicalSn, String type, String status) {
|
||||
return pacsDataMapper.updateReportStatus(medicalSn, type, status);
|
||||
}
|
||||
|
||||
private void validatePacsDataExists(Integer id) {
|
||||
if (pacsDataMapper.selectById(id) == null) {
|
||||
|
||||
@ -131,4 +148,14 @@ public class InspectPacsDataServiceImpl implements InspectPacsDataService {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean existsReportStatus(String medicalSn, String type) {
|
||||
return pacsDataMapper.countReportStatus(medicalSn, type) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPacsDataByMedicalSnAndType(String medicalSn, String type) {
|
||||
return pacsDataMapper.getPacsDataByMedicalSnAndType(medicalSn, type);
|
||||
}
|
||||
|
||||
}
|
@ -84,9 +84,9 @@ public interface InspectPatientService {
|
||||
InspectPatientDO getPatientInfo(String medicalSn);
|
||||
|
||||
/*
|
||||
* 根据体检编号只获取shortid字段
|
||||
* 根据体检编号获取患者信息(除头像外)
|
||||
* */
|
||||
String getPatientShortid(String medicalSn);
|
||||
InspectPatientDO getPatientShortid(String medicalSn);
|
||||
/*
|
||||
* 更新患者的基本信息里的补充信息 高血压、老年人、行政村、卫生院、糖尿病、精神病
|
||||
* */
|
||||
|
@ -176,12 +176,59 @@ public class InspectPatientServiceImpl implements InspectPatientService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPatientShortid(String medicalSn) {
|
||||
public InspectPatientDO getPatientShortid(String medicalSn) {
|
||||
LambdaQueryWrapper<InspectPatientDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(InspectPatientDO::getMedicalSn, medicalSn)
|
||||
.select(InspectPatientDO::getShortid);
|
||||
.select(
|
||||
InspectPatientDO::getId,
|
||||
InspectPatientDO::getMedicalSn,
|
||||
InspectPatientDO::getPName,
|
||||
InspectPatientDO::getGender,
|
||||
InspectPatientDO::getBirthday,
|
||||
InspectPatientDO::getCardType,
|
||||
InspectPatientDO::getCardId,
|
||||
InspectPatientDO::getNationality,
|
||||
InspectPatientDO::getNation,
|
||||
InspectPatientDO::getRace,
|
||||
InspectPatientDO::getPhoneNum,
|
||||
InspectPatientDO::getStatus,
|
||||
InspectPatientDO::getReportType,
|
||||
InspectPatientDO::getMedicalDateTime,
|
||||
InspectPatientDO::getChargeType,
|
||||
InspectPatientDO::getTotalPrice,
|
||||
InspectPatientDO::getIsprint,
|
||||
InspectPatientDO::getSummaryResult,
|
||||
InspectPatientDO::getAuditor,
|
||||
InspectPatientDO::getAuditorTime,
|
||||
InspectPatientDO::getAuditStatus,
|
||||
InspectPatientDO::getInspectionOpinion,
|
||||
InspectPatientDO::getChargetime,
|
||||
InspectPatientDO::getDomicileaddress,
|
||||
InspectPatientDO::getHospitalNo,
|
||||
InspectPatientDO::getXcgcode,
|
||||
InspectPatientDO::getNcgcode,
|
||||
InspectPatientDO::getShqx,
|
||||
InspectPatientDO::getZybs,
|
||||
InspectPatientDO::getFeatures,
|
||||
InspectPatientDO::getChiefinspectorid,
|
||||
InspectPatientDO::getChiefinspector,
|
||||
InspectPatientDO::getPrinttime,
|
||||
InspectPatientDO::getBarcodetime,
|
||||
InspectPatientDO::getPdfurl,
|
||||
InspectPatientDO::getOldmanflag,
|
||||
InspectPatientDO::getOrgname,
|
||||
InspectPatientDO::getDistrictname,
|
||||
InspectPatientDO::getHtnflag,
|
||||
InspectPatientDO::getDiaflag,
|
||||
InspectPatientDO::getSmiflag,
|
||||
InspectPatientDO::getPulflag,
|
||||
InspectPatientDO::getExamhoscode,
|
||||
InspectPatientDO::getExamhosname,
|
||||
InspectPatientDO::getShortid
|
||||
);
|
||||
|
||||
InspectPatientDO patientDO = patientMapper.selectOne(queryWrapper);
|
||||
return patientDO != null ? patientDO.getShortid() : null;
|
||||
return patientDO;
|
||||
}
|
||||
@Override
|
||||
public List<InspectPatientDO> getPatientdetails(PatientDetailsVO detailsVO) {
|
||||
|
@ -9,4 +9,29 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<!-- 插入检验报告状态 -->
|
||||
<insert id="insertReportStatus">
|
||||
INSERT INTO tb_report_status (medicalSn, type, status)
|
||||
VALUES (#{medicalSn}, #{type}, #{status})
|
||||
</insert>
|
||||
|
||||
<!-- 更新检验报告状态 -->
|
||||
<update id="updateReportStatus">
|
||||
UPDATE tb_report_status
|
||||
SET status = #{status}
|
||||
WHERE medicalSn = #{medicalSn} AND type = #{type}
|
||||
</update>
|
||||
|
||||
<!-- 统计检验报告状态表中指定体检编号和类型的记录数 -->
|
||||
<select id="countReportStatus" resultType="int">
|
||||
SELECT COUNT(*) FROM tb_report_status WHERE medicalSn = #{medicalSn} AND type = #{type}
|
||||
</select>
|
||||
|
||||
<!-- 根据体检编号和类型查询PACS数据 -->
|
||||
<select id="getPacsDataByMedicalSnAndType" resultType="java.util.Map">
|
||||
SELECT medicalSn, type, status FROM tb_report_status
|
||||
WHERE medicalSn = #{medicalSn} AND type = #{type}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user