diff --git a/ruisi_java/ruisi-web-admin/src/main/resources/application-prod.yml b/ruisi_java/ruisi-web-admin/src/main/resources/application-prod.yml index b717432..b90515f 100644 --- a/ruisi_java/ruisi-web-admin/src/main/resources/application-prod.yml +++ b/ruisi_java/ruisi-web-admin/src/main/resources/application-prod.yml @@ -99,11 +99,12 @@ ht: patientUrl: https://api.tall.wiki/ruisi/client/# name: 认知功能评测云平台系统 file: - path: /data/cgav2/profile/ + path: /data/cgav2/server/profile/ #domain: https://api.ccsens.com/test/ domain: http://116.204.40.58/ruisiClient imgDomain: https://test.tall.wiki/htageClient/profile - reportPath: /data/cgav2/server + reportPath: /data/cgav2/server/profile + reportDomain: /data/cgav2/server/profile ldTemplate: /data/cgav2/server/profile/upload/dTemplate.xlsx ldTjbgDir: /data/cgav2/server/profile/tjbg/ ldExportDir: /data/cgav2/server/profile/ldExport @@ -111,8 +112,10 @@ file: ldZQTYTemplate: /data/cgav2/server/profile/upload/2024年河津流调知情同意书模板-V1.docx grPath: /data/cgav2/server/profile/grReportTemplate.docx ysPath: /data/cgav2/server/profile/ysReportTemplate.docx + allPath: /data/cgav2/server/profile/allReportTemplate.docx informed: studySign: /data/cgav2/server/profile/studySign.png template: /data/cgav2/server/profile/知情同意模板.docx wordUrl: /data/cgav2/server/profile/informed/ - prefixWord: /data/cgav2/server/profile/ \ No newline at end of file + prefixWord: /data/cgav2/server/profile/ + diff --git a/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/PmsController.java b/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/PmsController.java index ae89aad..4121571 100644 --- a/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/PmsController.java +++ b/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/PmsController.java @@ -63,7 +63,7 @@ public class PmsController extends BaseController { @ApiOperation("获取患者信息列表") @PostMapping("/queryList") public JsonResponse> queryPatientList(@RequestBody @Validated BaseDto dto) { -// List list = new ArrayList<>(); + List list = new ArrayList<>(); PmsPatientDto.QueryPatient param = dto.getParam(); // if (StrUtil.isNotEmpty(param.getSearchValue()) && param.getSearchValue().length() == 10) { @@ -91,18 +91,18 @@ public class PmsController extends BaseController { startPageOvertop(dto); List serverList = patientService.queryPatientList(dto.getParam(), dataScope, loginUser.getUserId(), loginUser.getUsername()); -// if (CollUtil.isNotEmpty(serverList)) { -// list.addAll(serverList); -// } + if (CollUtil.isNotEmpty(serverList)) { + list.addAll(serverList); + } -// // 创建一个 TreeSet,通过 Comparator 根据 patientId 去重 -// Set uniqueSet = new TreeSet<>( -// Comparator.comparing(PmsPatientVo.PatientList::getPatientId) -// ); -// uniqueSet.addAll(list); -// List uniqueList = new ArrayList<>(uniqueSet); + // 创建一个 TreeSet,通过 Comparator 根据 patientId 去重 + Set uniqueSet = new TreeSet<>( + Comparator.comparing(PmsPatientVo.PatientList::getPatientId) + ); + uniqueSet.addAll(list); + List uniqueList = new ArrayList<>(uniqueSet); - return JsonResponse.ok(new PageInfo<>(serverList)); + return JsonResponse.ok(new PageInfo<>(uniqueList)); } @ApiOperation("通过身份证号查询患者信息,方便页面展示返回和列表一样的格式") diff --git a/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/scheduled/SyncHospitalViwe.java b/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/scheduled/SyncHospitalViwe.java index 5d133a1..1358be5 100644 --- a/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/scheduled/SyncHospitalViwe.java +++ b/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/scheduled/SyncHospitalViwe.java @@ -24,42 +24,42 @@ public class SyncHospitalViwe { @Resource private DockService dockService; - @DataSource(value = DataSourceType.ORACLE) +// @DataSource(value = DataSourceType.ORACLE) // @Scheduled(cron = "0 */10 * * * ?") public void getDeptView() { List sysDepts = dockService.getDeptView(); syncDeptView(sysDepts); } - @DataSource(value = DataSourceType.ORACLE) +// @DataSource(value = DataSourceType.ORACLE) // @Scheduled(cron = "0 */10 * * * ?") public void getEmplView() { List sysEmpls = dockService.getEmplView(); syncEmplView(sysEmpls); } - @DataSource(value = DataSourceType.ORACLE) +// @DataSource(value = DataSourceType.ORACLE) // @Scheduled(cron = "0 */10 * * * ?") public void getPatientBasicView() { List sysPatients = dockService.getPatientBasicView(); syncPatientBasicView(sysPatients); } - @DataSource(value = DataSourceType.ORACLE) +// @DataSource(value = DataSourceType.ORACLE) // @Scheduled(cron = "0 */10 * * * ?") public void getPatientVisitView() { List sysVisits = dockService.getPatientVisitView(); syncPatientVisitView(sysVisits); } - @DataSource(value = DataSourceType.ORACLE) +// @DataSource(value = DataSourceType.ORACLE) // @Scheduled(cron = "0 */10 * * * ?") public void getDiagnosisView() { List sysDiagnosis = dockService.getDiagnosisView(); syncDiagnosisView(sysDiagnosis); } - @DataSource(value = DataSourceType.ORACLE) +// @DataSource(value = DataSourceType.ORACLE) // @Scheduled(cron = "0 */10 * * * ?") public void getMedicationView() { List sysMedications = dockService.getMedicationView(); diff --git a/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/LtHisConnectionServiceImpl.java b/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/LtHisConnectionServiceImpl.java index 83a8f4a..b2bee91 100644 --- a/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/LtHisConnectionServiceImpl.java +++ b/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/LtHisConnectionServiceImpl.java @@ -242,7 +242,7 @@ public class LtHisConnectionServiceImpl implements ILtHisConnectionService { //TODO 性别需要实际调用接口后确定 if ("1".equals(genderCode) || genderCode.contains("男")) { patientVo.setSex((byte) 0); - } else if ("0".equals(genderCode) || genderCode.contains("女")) { + } else if ("0".equals(genderCode) || genderCode.contains("女") || "2".equals(genderCode)) { patientVo.setSex((byte) 1); } patientVo.setBirthday(data.getStr("birthDate")); diff --git a/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/PmsPatientServiceImpl.java b/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/PmsPatientServiceImpl.java index 7b8388b..2228e77 100644 --- a/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/PmsPatientServiceImpl.java +++ b/ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/PmsPatientServiceImpl.java @@ -590,21 +590,54 @@ public class PmsPatientServiceImpl implements IPmsPatientService { @DataSource(DataSourceType.SLAVE) public void editPatientOtherMsgByHis(PmsPatientBody pmsPatientBody, PmsPatientPersonal pmsPatientPersonal, PmsPatientDiagnosis PmsPatientDiagnosis, PmsPatientParentIllness pmsPatientParentIllness) { if(ObjectUtil.isNotNull(pmsPatientBody)){ - log.info("添加就诊信息:{}", pmsPatientBody); - pmsPatientBodyMapper.insertSelective(pmsPatientBody); + //根据就诊号和患者id查询就诊信息是否存在 + PmsPatientBodyExample patientBodyExample = new PmsPatientBodyExample(); + patientBodyExample.createCriteria().andOutpatientNoEqualTo(pmsPatientBody.getOutpatientNo()).andPatientIdEqualTo(pmsPatientBody.getPatientId()) + .andDelFlagEqualTo((byte) 0); + List pmsPatientBodies = pmsPatientBodyMapper.selectByExample(patientBodyExample); + if (CollUtil.isNotEmpty(pmsPatientBodies)) { + //存在则修改 + log.info("修改就诊信息:{}", pmsPatientBody); + PmsPatientBody oldPatientBody = pmsPatientBodies.get(0); + pmsPatientBody.setId(oldPatientBody.getId()); + pmsPatientBodyMapper.updateByPrimaryKeySelective(pmsPatientBody); + } else { + //不存在则添加 + log.info("添加就诊信息:{}", pmsPatientBody); + pmsPatientBody.setId(IDGenerator.nextSnowflakeId()); + pmsPatientBodyMapper.insertSelective(pmsPatientBody); + //首次添加就诊信息是,添加诊断和用药信息,后续同步不更新 + if(ObjectUtil.isNotNull(PmsPatientDiagnosis)){ + log.info("添加诊断信息:{}", PmsPatientDiagnosis); + PmsPatientDiagnosis.setId(IDGenerator.nextSnowflakeId()); + pmsPatientDiagnosisMapper.insertSelective(PmsPatientDiagnosis); + } + if(ObjectUtil.isNotNull(pmsPatientParentIllness)){ + log.info("添加用药信息:{}", pmsPatientParentIllness); + pmsPatientParentIllness.setId(IDGenerator.nextSnowflakeId()); + pmsPatientParentIllnessMapper.insertSelective(pmsPatientParentIllness); + } + } } if(ObjectUtil.isNotNull(pmsPatientPersonal)){ - log.info("添加烟酒史等信息:{}", pmsPatientPersonal); - pmsPatientPersonalMapper.insertSelective(pmsPatientPersonal); - } - if(ObjectUtil.isNotNull(PmsPatientDiagnosis)){ - log.info("添加诊断信息:{}", PmsPatientDiagnosis); - pmsPatientDiagnosisMapper.insertSelective(PmsPatientDiagnosis); - } - if(ObjectUtil.isNotNull(pmsPatientParentIllness)){ - log.info("添加用药信息:{}", pmsPatientParentIllness); - pmsPatientParentIllnessMapper.insertSelective(pmsPatientParentIllness); + //根据就诊号和患者id查询烟酒史 + PmsPatientPersonalExample patientPersonalExample = new PmsPatientPersonalExample(); + patientPersonalExample.createCriteria().andVisitNoEqualTo(pmsPatientPersonal.getVisitNo()).andPatientIdEqualTo(pmsPatientPersonal.getPatientId()) + .andDelFlagEqualTo((byte) 0); + List pmsPatientPersonals = pmsPatientPersonalMapper.selectByExample(patientPersonalExample); + if (CollUtil.isNotEmpty(pmsPatientPersonals)) { + //存在则修改 + log.info("修改烟酒史信息:{}", pmsPatientBody); + PmsPatientPersonal oldPatientPersonal = pmsPatientPersonals.get(0); + pmsPatientPersonal.setId(oldPatientPersonal.getId()); + pmsPatientPersonalMapper.updateByPrimaryKeySelective(pmsPatientPersonal); + }else { + log.info("添加烟酒史等信息:{}", pmsPatientPersonal); + pmsPatientPersonal.setId(IDGenerator.nextSnowflakeId()); + pmsPatientPersonalMapper.insertSelective(pmsPatientPersonal); + } } + } @Override