From c4824714b58e87a31e02097670697558923d8d99 Mon Sep 17 00:00:00 2001 From: Indrani Bandyopadhyay Date: Thu, 3 Aug 2023 16:49:35 +0530 Subject: [PATCH] edit api changes --- .../com/iemr/common/identity/domain/MBeneficiarydetail.java | 3 ++- .../java/com/iemr/common/identity/dto/IdentityEditDTO.java | 1 + .../com/iemr/common/identity/service/IdentityService.java | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiarydetail.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiarydetail.java index 08eea68..038f033 100644 --- a/src/main/java/com/iemr/common/identity/domain/MBeneficiarydetail.java +++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiarydetail.java @@ -82,7 +82,8 @@ public class MBeneficiarydetail implements Serializable { @Column(length = 45) private String education; - + + @Column(name = "EmergencyRegistration") private Boolean emergencyRegistration; @Column(length = 50) diff --git a/src/main/java/com/iemr/common/identity/dto/IdentityEditDTO.java b/src/main/java/com/iemr/common/identity/dto/IdentityEditDTO.java index bf16e2d..6b87d8b 100644 --- a/src/main/java/com/iemr/common/identity/dto/IdentityEditDTO.java +++ b/src/main/java/com/iemr/common/identity/dto/IdentityEditDTO.java @@ -145,4 +145,5 @@ public class IdentityEditDTO { private Integer vanID; private Integer parkingPlaceId; + private boolean emergencyRegistration; } diff --git a/src/main/java/com/iemr/common/identity/service/IdentityService.java b/src/main/java/com/iemr/common/identity/service/IdentityService.java index 8564022..b63ea4e 100644 --- a/src/main/java/com/iemr/common/identity/service/IdentityService.java +++ b/src/main/java/com/iemr/common/identity/service/IdentityService.java @@ -742,6 +742,11 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields */ logger.debug("Beneficiary details to update = " + new OutputMapper().gson().toJson(mbDetl)); + if(benDetails.getEmergencyRegistration() != null && benDetails.getEmergencyRegistration()) { + mbDetl.setEmergencyRegistration(true); + }else { + mbDetl.setEmergencyRegistration(false); + } detailRepo.save(mbDetl); }