diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java index 7aec115b..f01c4d3f 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java @@ -211,11 +211,13 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra EncounterLocation encounterLocation = new EncounterLocation(); BeanUtils.copyProperties(encounterLocationFormData, encounterLocation); iEncounterLocationService.saveEncounterLocationByRegister(encounterLocation); - // 保存就诊参数者信息 - encounterParticipantFormData.setEncounterId(encounterId); - EncounterParticipant encounterParticipant = new EncounterParticipant(); - BeanUtils.copyProperties(encounterParticipantFormData, encounterParticipant); - iEncounterParticipantService.saveEncounterParticipantByRegister(encounterParticipant); + // 保存就诊参数者信息 , 选了参与这才保存 + if (encounterParticipantFormData.getPractitionerId() != null) { + encounterParticipantFormData.setEncounterId(encounterId); + EncounterParticipant encounterParticipant = new EncounterParticipant(); + BeanUtils.copyProperties(encounterParticipantFormData, encounterParticipant); + iEncounterParticipantService.saveEncounterParticipantByRegister(encounterParticipant); + } // 保存就诊账户信息 accountFormData.setEncounterId(encounterId); Account account = new Account(); diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/EncounterParticipantFormData.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/EncounterParticipantFormData.java index d86d844b..dbbf2fa8 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/EncounterParticipantFormData.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/EncounterParticipantFormData.java @@ -1,6 +1,5 @@ package com.openhis.web.chargemanage.dto; -import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -27,7 +26,6 @@ public class EncounterParticipantFormData { private String typeCode; /** 参与者ID */ - @NotNull(message = "参与者ID不能为空") @JsonSerialize(using = ToStringSerializer.class) private Long practitionerId;