Browse Source

柳铁同步相关

ltszxyy
zhangye 1 day ago
parent
commit
832a6b54f2
  1. 7
      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. 43
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/PmsPatientServiceImpl.java

7
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/

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("获取患者信息列表")
@PostMapping("/queryList")
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();
// if (StrUtil.isNotEmpty(param.getSearchValue()) && param.getSearchValue().length() == 10) {
@ -91,18 +91,18 @@ public class PmsController extends BaseController {
startPageOvertop(dto);
List<PmsPatientVo.PatientList> 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<PmsPatientVo.PatientList> uniqueSet = new TreeSet<>(
// Comparator.comparing(PmsPatientVo.PatientList::getPatientId)
// );
// uniqueSet.addAll(list);
// List<PmsPatientVo.PatientList> uniqueList = new ArrayList<>(uniqueSet);
// 创建一个 TreeSet,通过 Comparator 根据 patientId 去重
Set<PmsPatientVo.PatientList> uniqueSet = new TreeSet<>(
Comparator.comparing(PmsPatientVo.PatientList::getPatientId)
);
uniqueSet.addAll(list);
List<PmsPatientVo.PatientList> uniqueList = new ArrayList<>(uniqueSet);
return JsonResponse.ok(new PageInfo<>(serverList));
return JsonResponse.ok(new PageInfo<>(uniqueList));
}
@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
private DockService dockService;
@DataSource(value = DataSourceType.ORACLE)
// @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?")
public void getDeptView() {
List<DockVo.DeptInfo> sysDepts = dockService.getDeptView();
syncDeptView(sysDepts);
}
@DataSource(value = DataSourceType.ORACLE)
// @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?")
public void getEmplView() {
List<DockVo.EmplInfo> sysEmpls = dockService.getEmplView();
syncEmplView(sysEmpls);
}
@DataSource(value = DataSourceType.ORACLE)
// @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?")
public void getPatientBasicView() {
List<DockVo.PatientBasicInfo> sysPatients = dockService.getPatientBasicView();
syncPatientBasicView(sysPatients);
}
@DataSource(value = DataSourceType.ORACLE)
// @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?")
public void getPatientVisitView() {
List<DockVo.PatientVisitInfo> sysVisits = dockService.getPatientVisitView();
syncPatientVisitView(sysVisits);
}
@DataSource(value = DataSourceType.ORACLE)
// @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?")
public void getDiagnosisView() {
List<DockVo.DiagnosisInfo> sysDiagnosis = dockService.getDiagnosisView();
syncDiagnosisView(sysDiagnosis);
}
@DataSource(value = DataSourceType.ORACLE)
// @DataSource(value = DataSourceType.ORACLE)
// @Scheduled(cron = "0 */10 * * * ?")
public void 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 性别需要实际调用接口后确定
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"));

43
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/PmsPatientServiceImpl.java

@ -590,22 +590,55 @@ public class PmsPatientServiceImpl implements IPmsPatientService {
@DataSource(DataSourceType.SLAVE)
public void editPatientOtherMsgByHis(PmsPatientBody pmsPatientBody, PmsPatientPersonal pmsPatientPersonal, PmsPatientDiagnosis PmsPatientDiagnosis, PmsPatientParentIllness pmsPatientParentIllness) {
if(ObjectUtil.isNotNull(pmsPatientBody)){
//根据就诊号和患者id查询就诊信息是否存在
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(pmsPatientPersonal)){
log.info("添加烟酒史等信息:{}", pmsPatientPersonal);
pmsPatientPersonalMapper.insertSelective(pmsPatientPersonal);
}
//首次添加就诊信息是,添加诊断和用药信息,后续同步不更新
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)){
//根据就诊号和患者id查询烟酒史
PmsPatientPersonalExample patientPersonalExample = new PmsPatientPersonalExample();
patientPersonalExample.createCriteria().andVisitNoEqualTo(pmsPatientPersonal.getVisitNo()).andPatientIdEqualTo(pmsPatientPersonal.getPatientId())
.andDelFlagEqualTo((byte) 0);
List<PmsPatientPersonal> 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
public Integer delPatient(PmsPatientDto.GetPatientById param) {

Loading…
Cancel
Save