|
|
|
@ -17,6 +17,7 @@ import com.ccsens.common.core.domain.model.LoginUser; |
|
|
|
import com.ccsens.common.enums.DataSourceType; |
|
|
|
import com.ccsens.common.exception.base.BaseException; |
|
|
|
import com.ccsens.common.utils.DateUtils; |
|
|
|
import com.ccsens.common.utils.IDGenerator; |
|
|
|
import com.ccsens.common.utils.SecurityUtils; |
|
|
|
import com.ccsens.common.utils.StringUtils; |
|
|
|
import com.ccsens.system.domain.SysUserRole; |
|
|
|
@ -143,7 +144,7 @@ public class DockServiceImpl implements DockService { |
|
|
|
} else { |
|
|
|
//不存在则插入
|
|
|
|
pmsPatient = new PmsPatient(); |
|
|
|
pmsPatient.setId(IdUtil.getSnowflake().nextId()); |
|
|
|
pmsPatient.setId(IDGenerator.nextSnowflakeId()); |
|
|
|
apiSavePatient(pmsPatient, patientInfo); |
|
|
|
pmsPatient.setHospitalId(hospitalId); |
|
|
|
pmsPatient.setCreateBy(doctorName); |
|
|
|
@ -168,7 +169,7 @@ public class DockServiceImpl implements DockService { |
|
|
|
pmsPatientBodyMapper.updateByPrimaryKeySelective(pmsPatientBody); |
|
|
|
} else { |
|
|
|
pmsPatientBody = new PmsPatientBody(); |
|
|
|
pmsPatientBody.setId(IdUtil.getSnowflake().nextId()); |
|
|
|
pmsPatientBody.setId(IDGenerator.nextSnowflakeId()); |
|
|
|
pmsPatientBody.setPatientId(pmsPatient.getId()); |
|
|
|
apiSaveVisit(pmsPatientBody, visitInfo); |
|
|
|
pmsPatientBody.setDepartment(deptName); |
|
|
|
@ -186,7 +187,7 @@ public class DockServiceImpl implements DockService { |
|
|
|
for (DockDto.Zhenduan dockPatientDiagnosis : visitInfo.getDiagnosis()) { |
|
|
|
//添加业务表
|
|
|
|
PmsPatientDiagnosis pmsPatientDiagnosis = new PmsPatientDiagnosis(); |
|
|
|
pmsPatientDiagnosis.setId(IdUtil.getSnowflake().nextId()); |
|
|
|
pmsPatientDiagnosis.setId(IDGenerator.nextSnowflakeId()); |
|
|
|
pmsPatientDiagnosis.setPatientId(pmsPatientBody.getPatientId()); |
|
|
|
pmsPatientDiagnosis.setVisitNo(dockPatientDiagnosis.getVisitNo()); |
|
|
|
pmsPatientDiagnosis.setDiagnosisType(dockPatientDiagnosis.getDiagnosisType()); |
|
|
|
@ -207,7 +208,7 @@ public class DockServiceImpl implements DockService { |
|
|
|
|
|
|
|
for (DockDto.Yongyao dockPatientMedicationInfo : visitInfo.getMedications()) { |
|
|
|
PmsPatientParentIllness pmsPatientParentIllness = new PmsPatientParentIllness(); |
|
|
|
pmsPatientParentIllness.setId(IdUtil.getSnowflake().nextId()); |
|
|
|
pmsPatientParentIllness.setId(IDGenerator.nextSnowflakeId()); |
|
|
|
pmsPatientParentIllness.setPatientId(pmsPatientBody.getPatientId()); |
|
|
|
pmsPatientParentIllness.setVisitNo(dockPatientMedicationInfo.getVisitNo()); |
|
|
|
pmsPatientParentIllness.setDrugName(dockPatientMedicationInfo.getDrugName()); |
|
|
|
@ -653,7 +654,7 @@ public class DockServiceImpl implements DockService { |
|
|
|
} else { |
|
|
|
//不存在则插入
|
|
|
|
pmsPatient = new PmsPatient(); |
|
|
|
pmsPatient.setId(IdUtil.getSnowflake().nextId()); |
|
|
|
pmsPatient.setId(IDGenerator.nextSnowflakeId()); |
|
|
|
disposePmsPatient(dockPatientBaseInfo, pmsPatient); |
|
|
|
pmsPatient.setHospitalId(hospitalId); |
|
|
|
pmsPatient.setCreateBy(CollUtil.isEmpty(sysUserList) ? null : sysUserList.get(0).getUserName()); |
|
|
|
@ -722,7 +723,7 @@ public class DockServiceImpl implements DockService { |
|
|
|
if (CollUtil.isNotEmpty(dockPatientBaseInfos)) { |
|
|
|
//存在则更新
|
|
|
|
pmsPatient = new PmsPatient(); |
|
|
|
pmsPatient.setId(IdUtil.getSnowflake().nextId()); |
|
|
|
pmsPatient.setId(IDGenerator.nextSnowflakeId()); |
|
|
|
disposePmsPatient(dockPatientBaseInfos.get(0), pmsPatient); |
|
|
|
//更新患者所属的部门和创建者信息,暂不考虑其他,每次都更新
|
|
|
|
pmsPatient.setHospitalId(hospitalId); |
|
|
|
@ -757,7 +758,7 @@ public class DockServiceImpl implements DockService { |
|
|
|
pmsPatientBodyMapper.updateByPrimaryKeySelective(pmsPatientBody); |
|
|
|
} else { |
|
|
|
pmsPatientBody = new PmsPatientBody(); |
|
|
|
pmsPatientBody.setId(IdUtil.getSnowflake().nextId()); |
|
|
|
pmsPatientBody.setId(IDGenerator.nextSnowflakeId()); |
|
|
|
pmsPatientBody.setPatientId(pmsPatient.getId()); |
|
|
|
disposePmsPatientBody(dockPatientVisitInfo, pmsPatientBody); |
|
|
|
pmsPatientBody.setDepartment(deptName); |
|
|
|
@ -811,7 +812,7 @@ public class DockServiceImpl implements DockService { |
|
|
|
for (DockPatientDiagnosis dockPatientDiagnosis : dockPatientDiagnosisMap.get(key)) { |
|
|
|
//添加业务表
|
|
|
|
PmsPatientDiagnosis pmsPatientDiagnosis = new PmsPatientDiagnosis(); |
|
|
|
pmsPatientDiagnosis.setId(IdUtil.getSnowflake().nextId()); |
|
|
|
pmsPatientDiagnosis.setId(IDGenerator.nextSnowflakeId()); |
|
|
|
pmsPatientDiagnosis.setPatientId(pmsPatientBody.getPatientId()); |
|
|
|
pmsPatientDiagnosis.setVisitNo(dockPatientDiagnosis.getVisitNo()); |
|
|
|
pmsPatientDiagnosis.setDiagnosisType(dockPatientDiagnosis.getDiagnosisType()); |
|
|
|
@ -871,7 +872,7 @@ public class DockServiceImpl implements DockService { |
|
|
|
|
|
|
|
for (DockPatientMedicationInfo dockPatientMedicationInfo : dockPatientMedicationInfoMap.get(key)) { |
|
|
|
PmsPatientParentIllness pmsPatientParentIllness = new PmsPatientParentIllness(); |
|
|
|
pmsPatientParentIllness.setId(IdUtil.getSnowflake().nextId()); |
|
|
|
pmsPatientParentIllness.setId(IDGenerator.nextSnowflakeId()); |
|
|
|
pmsPatientParentIllness.setPatientId(pmsPatientBody.getPatientId()); |
|
|
|
pmsPatientParentIllness.setVisitNo(dockPatientMedicationInfo.getVisitNo()); |
|
|
|
pmsPatientParentIllness.setDrugName(dockPatientMedicationInfo.getDrugName()); |
|
|
|
|