@Override
 @Transactional
 @ValidationErrorPage(NEW)
 @Action(
     value = "/stillBirthRegistration-edit",
     results = {@Result(name = NEW, type = "dispatcher")})
 public String edit() {
   if (getMode().equals(LOCK)) {
     birthRegistrationService.buildAdoptionDetial(stillBirthRegistration);
     buildRegistration();
     stillBirthRegistration.setPlaceType(bndCommonService.getPlaceType(placeTypeTemp));
     stillBirthRegistration.setStatus(
         bndCommonService.getStatusByModuleAndCode(
             BndConstants.STILLBIRTHREGISTRATION, BndConstants.LOCK));
     final EgwSatuschange change = new EgwSatuschange();
     change.setFromstatus(
         bndCommonService
             .getStatusByModuleAndCode(BndConstants.STILLBIRTHREGISTRATION, BndConstants.APPROVED)
             .getId());
     change.setTostatus(
         bndCommonService
             .getStatusByModuleAndCode(BndConstants.STILLBIRTHREGISTRATION, BndConstants.LOCK)
             .getId());
     change.setModuleid(stillBirthRegistration.getId().intValue());
     change.setModuletype(BndConstants.STILLBIRTHREGISTRATIONMODULE);
     // change.setCreatedby(EgovThreadLocals.getUserId());
     // TODO egifix-hibernateutil
     // HibernateUtil.getCurrentSession().persist(change);
     entityManager.persist(change);
     birthRegistrationService.save(stillBirthRegistration, workFlowType);
   } else if (getMode().equals(UNLOCK)) {
     birthRegistrationService.buildAdoptionDetial(stillBirthRegistration);
     buildRegistration();
     stillBirthRegistration.setPlaceType(bndCommonService.getPlaceType(placeTypeTemp));
     stillBirthRegistration.setStatus(
         bndCommonService.getStatusByModuleAndCode(
             BndConstants.STILLBIRTHREGISTRATION, BndConstants.APPROVED));
     final EgwSatuschange change = new EgwSatuschange();
     change.setFromstatus(
         bndCommonService
             .getStatusByModuleAndCode(BndConstants.STILLBIRTHREGISTRATION, BndConstants.LOCK)
             .getId());
     change.setTostatus(
         bndCommonService
             .getStatusByModuleAndCode(BndConstants.STILLBIRTHREGISTRATION, BndConstants.APPROVED)
             .getId());
     change.setModuleid(stillBirthRegistration.getId().intValue());
     change.setModuletype(BndConstants.STILLBIRTHREGISTRATIONMODULE);
     //             change.setCreatedby(EgovThreadLocals.getUserId());
     // TODO egifix-hibernateutil
     // HibernateUtil.getCurrentSession().persist(change);
     entityManager.persist(change);
     birthRegistrationService.save(stillBirthRegistration, workFlowType);
   } else {
     saveOrUpdate();
     if (BndConstants.APPROVED.equalsIgnoreCase(stillBirthRegistration.getStatus().getCode())
         && stillBirthRegistration
             .getRegistrationNo()
             .contains(BndConstants.HOSPITALSTILLBIRTHSUFFIX))
       numberGenerationService.reGenerateStillBirthRegistrationNumber(stillBirthRegistration);
     if (remarksHistory != null && !"".equals(remarksHistory))
       bndCommonService.saveHistory(
           stillBirthRegistration, BndConstants.STILLBIRTHREGISTRATION, remarksHistory);
   }
   mode = VIEW;
   return NEW;
 }