Browse Source

柳铁同步相关

ltszxyy
zhangye 1 day ago
parent
commit
832a6b54f2
  1. 9
      ruisi_java/ruisi-web-admin/src/main/resources/application-prod.yml
  2. 22
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/PmsController.java
  3. 12
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/scheduled/SyncHospitalViwe.java
  4. 2
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/LtHisConnectionServiceImpl.java
  5. 57
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/PmsPatientServiceImpl.java

9
ruisi_java/ruisi-web-admin/src/main/resources/application-prod.yml

@ -99,11 +99,12 @@ ht:
patientUrl: https://api.tall.wiki/ruisi/client/# patientUrl: https://api.tall.wiki/ruisi/client/#
name: 认知功能评测云平台系统 name: 认知功能评测云平台系统
file: file:
path: /data/cgav2/profile/ path: /data/cgav2/server/profile/
#domain: https://api.ccsens.com/test/ #domain: https://api.ccsens.com/test/
domain: http://116.204.40.58/ruisiClient domain: http://116.204.40.58/ruisiClient
imgDomain: https://test.tall.wiki/htageClient/profile 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 ldTemplate: /data/cgav2/server/profile/upload/dTemplate.xlsx
ldTjbgDir: /data/cgav2/server/profile/tjbg/ ldTjbgDir: /data/cgav2/server/profile/tjbg/
ldExportDir: /data/cgav2/server/profile/ldExport ldExportDir: /data/cgav2/server/profile/ldExport
@ -111,8 +112,10 @@ file:
ldZQTYTemplate: /data/cgav2/server/profile/upload/2024年河津流调知情同意书模板-V1.docx ldZQTYTemplate: /data/cgav2/server/profile/upload/2024年河津流调知情同意书模板-V1.docx
grPath: /data/cgav2/server/profile/grReportTemplate.docx grPath: /data/cgav2/server/profile/grReportTemplate.docx
ysPath: /data/cgav2/server/profile/ysReportTemplate.docx ysPath: /data/cgav2/server/profile/ysReportTemplate.docx
allPath: /data/cgav2/server/profile/allReportTemplate.docx
informed: informed:
studySign: /data/cgav2/server/profile/studySign.png studySign: /data/cgav2/server/profile/studySign.png
template: /data/cgav2/server/profile/知情同意模板.docx template: /data/cgav2/server/profile/知情同意模板.docx
wordUrl: /data/cgav2/server/profile/informed/ wordUrl: /data/cgav2/server/profile/informed/
prefixWord: /data/cgav2/server/profile/ prefixWord: /data/cgav2/server/profile/

22
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/PmsController.java

@ -63,7 +63,7 @@ public class PmsController extends BaseController {
@ApiOperation("获取患者信息列表") @ApiOperation("获取患者信息列表")
@PostMapping("/queryList") @PostMapping("/queryList")
public JsonResponse<PageInfo<PmsPatientVo.PatientList>> queryPatientList(@RequestBody @Validated BaseDto<PmsPatientDto.QueryPatient> dto) { public JsonResponse<PageInfo<PmsPatientVo.PatientList>> queryPatientList(@RequestBody @Validated BaseDto<PmsPatientDto.QueryPatient> dto) {
// List<PmsPatientVo.PatientList> list = new ArrayList<>(); List<PmsPatientVo.PatientList> list = new ArrayList<>();
PmsPatientDto.QueryPatient param = dto.getParam(); PmsPatientDto.QueryPatient param = dto.getParam();
// if (StrUtil.isNotEmpty(param.getSearchValue()) && param.getSearchValue().length() == 10) { // if (StrUtil.isNotEmpty(param.getSearchValue()) && param.getSearchValue().length() == 10) {
@ -91,18 +91,18 @@ public class PmsController extends BaseController {
startPageOvertop(dto); startPageOvertop(dto);
List<PmsPatientVo.PatientList> serverList = patientService.queryPatientList(dto.getParam(), dataScope, loginUser.getUserId(), loginUser.getUsername()); List<PmsPatientVo.PatientList> serverList = patientService.queryPatientList(dto.getParam(), dataScope, loginUser.getUserId(), loginUser.getUsername());
// if (CollUtil.isNotEmpty(serverList)) { if (CollUtil.isNotEmpty(serverList)) {
// list.addAll(serverList); list.addAll(serverList);
// } }
// // 创建一个 TreeSet,通过 Comparator 根据 patientId 去重 // 创建一个 TreeSet,通过 Comparator 根据 patientId 去重
// Set<PmsPatientVo.PatientList> uniqueSet = new TreeSet<>( Set<PmsPatientVo.PatientList> uniqueSet = new TreeSet<>(
// Comparator.comparing(PmsPatientVo.PatientList::getPatientId) Comparator.comparing(PmsPatientVo.PatientList::getPatientId)
// ); );
// uniqueSet.addAll(list); uniqueSet.addAll(list);
// List<PmsPatientVo.PatientList> uniqueList = new ArrayList<>(uniqueSet); List<PmsPatientVo.PatientList> uniqueList = new ArrayList<>(uniqueSet);
return JsonResponse.ok(new PageInfo<>(serverList)); return JsonResponse.ok(new PageInfo<>(uniqueList));
} }
@ApiOperation("通过身份证号查询患者信息,方便页面展示返回和列表一样的格式") @ApiOperation("通过身份证号查询患者信息,方便页面展示返回和列表一样的格式")

12
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/scheduled/SyncHospitalViwe.java

@ -24,42 +24,42 @@ public class SyncHospitalViwe {
@Resource @Resource
private DockService dockService; private DockService dockService;
@DataSource(value = DataSourceType.ORACLE) // @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?") // @Scheduled(cron = "0 */10 * * * ?")
public void getDeptView() { public void getDeptView() {
List<DockVo.DeptInfo> sysDepts = dockService.getDeptView(); List<DockVo.DeptInfo> sysDepts = dockService.getDeptView();
syncDeptView(sysDepts); syncDeptView(sysDepts);
} }
@DataSource(value = DataSourceType.ORACLE) // @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?") // @Scheduled(cron = "0 */10 * * * ?")
public void getEmplView() { public void getEmplView() {
List<DockVo.EmplInfo> sysEmpls = dockService.getEmplView(); List<DockVo.EmplInfo> sysEmpls = dockService.getEmplView();
syncEmplView(sysEmpls); syncEmplView(sysEmpls);
} }
@DataSource(value = DataSourceType.ORACLE) // @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?") // @Scheduled(cron = "0 */10 * * * ?")
public void getPatientBasicView() { public void getPatientBasicView() {
List<DockVo.PatientBasicInfo> sysPatients = dockService.getPatientBasicView(); List<DockVo.PatientBasicInfo> sysPatients = dockService.getPatientBasicView();
syncPatientBasicView(sysPatients); syncPatientBasicView(sysPatients);
} }
@DataSource(value = DataSourceType.ORACLE) // @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?") // @Scheduled(cron = "0 */10 * * * ?")
public void getPatientVisitView() { public void getPatientVisitView() {
List<DockVo.PatientVisitInfo> sysVisits = dockService.getPatientVisitView(); List<DockVo.PatientVisitInfo> sysVisits = dockService.getPatientVisitView();
syncPatientVisitView(sysVisits); syncPatientVisitView(sysVisits);
} }
@DataSource(value = DataSourceType.ORACLE) // @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?") // @Scheduled(cron = "0 */10 * * * ?")
public void getDiagnosisView() { public void getDiagnosisView() {
List<DockVo.DiagnosisInfo> sysDiagnosis = dockService.getDiagnosisView(); List<DockVo.DiagnosisInfo> sysDiagnosis = dockService.getDiagnosisView();
syncDiagnosisView(sysDiagnosis); syncDiagnosisView(sysDiagnosis);
} }
@DataSource(value = DataSourceType.ORACLE) // @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?") // @Scheduled(cron = "0 */10 * * * ?")
public void getMedicationView() { public void getMedicationView() {
List<DockVo.MedicationInfo> sysMedications = dockService.getMedicationView(); List<DockVo.MedicationInfo> sysMedications = dockService.getMedicationView();

2
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 性别需要实际调用接口后确定 //TODO 性别需要实际调用接口后确定
if ("1".equals(genderCode) || genderCode.contains("男")) { if ("1".equals(genderCode) || genderCode.contains("男")) {
patientVo.setSex((byte) 0); 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.setSex((byte) 1);
} }
patientVo.setBirthday(data.getStr("birthDate")); patientVo.setBirthday(data.getStr("birthDate"));

57
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) @DataSource(DataSourceType.SLAVE)
public void editPatientOtherMsgByHis(PmsPatientBody pmsPatientBody, PmsPatientPersonal pmsPatientPersonal, PmsPatientDiagnosis PmsPatientDiagnosis, PmsPatientParentIllness pmsPatientParentIllness) { public void editPatientOtherMsgByHis(PmsPatientBody pmsPatientBody, PmsPatientPersonal pmsPatientPersonal, PmsPatientDiagnosis PmsPatientDiagnosis, PmsPatientParentIllness pmsPatientParentIllness) {
if(ObjectUtil.isNotNull(pmsPatientBody)){ if(ObjectUtil.isNotNull(pmsPatientBody)){
log.info("添加就诊信息:{}", pmsPatientBody); //根据就诊号和患者id查询就诊信息是否存在
pmsPatientBodyMapper.insertSelective(pmsPatientBody); PmsPatientBodyExample patientBodyExample = new PmsPatientBodyExample();
patientBodyExample.createCriteria().andOutpatientNoEqualTo(pmsPatientBody.getOutpatientNo()).andPatientIdEqualTo(pmsPatientBody.getPatientId())
.andDelFlagEqualTo((byte) 0);
List<PmsPatientBody> 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)){ if(ObjectUtil.isNotNull(pmsPatientPersonal)){
log.info("添加烟酒史等信息:{}", pmsPatientPersonal); //根据就诊号和患者id查询烟酒史
pmsPatientPersonalMapper.insertSelective(pmsPatientPersonal); PmsPatientPersonalExample patientPersonalExample = new PmsPatientPersonalExample();
} patientPersonalExample.createCriteria().andVisitNoEqualTo(pmsPatientPersonal.getVisitNo()).andPatientIdEqualTo(pmsPatientPersonal.getPatientId())
if(ObjectUtil.isNotNull(PmsPatientDiagnosis)){ .andDelFlagEqualTo((byte) 0);
log.info("添加诊断信息:{}", PmsPatientDiagnosis); List<PmsPatientPersonal> pmsPatientPersonals = pmsPatientPersonalMapper.selectByExample(patientPersonalExample);
pmsPatientDiagnosisMapper.insertSelective(PmsPatientDiagnosis); if (CollUtil.isNotEmpty(pmsPatientPersonals)) {
} //存在则修改
if(ObjectUtil.isNotNull(pmsPatientParentIllness)){ log.info("修改烟酒史信息:{}", pmsPatientBody);
log.info("添加用药信息:{}", pmsPatientParentIllness); PmsPatientPersonal oldPatientPersonal = pmsPatientPersonals.get(0);
pmsPatientParentIllnessMapper.insertSelective(pmsPatientParentIllness); pmsPatientPersonal.setId(oldPatientPersonal.getId());
pmsPatientPersonalMapper.updateByPrimaryKeySelective(pmsPatientPersonal);
}else {
log.info("添加烟酒史等信息:{}", pmsPatientPersonal);
pmsPatientPersonal.setId(IDGenerator.nextSnowflakeId());
pmsPatientPersonalMapper.insertSelective(pmsPatientPersonal);
}
} }
} }
@Override @Override

Loading…
Cancel
Save