private void buildHospitalList() {
    if (stillBirthRegistration.getEstablishment() != null
        && stillBirthRegistration.getRegistrarId().getRegUnitId() != null)
      addDropdownData(
          "hospitalList",
          bndCommonService.getHospitalByTypeAndUnit(
              stillBirthRegistration.getEstablishment().getType().getId(),
              stillBirthRegistration.getRegistrarId().getRegUnitId().getId()));
    else addDropdownData("hospitalList", Collections.EMPTY_LIST);

    if (stillBirthRegistration.getCitizenBDDetails() != null
        && stillBirthRegistration.getCitizenBDDetails().getCauseOfDeath() != null
        && stillBirthRegistration.getCitizenBDDetails().getCauseOfDeath().getParent() != null)
      addDropdownData(
          "diseaseList",
          bndCommonService.getCauseofDeathbyParentId(
              stillBirthRegistration.getCitizenBDDetails().getCauseOfDeath().getParent().getId()));
    else addDropdownData("diseaseList", Collections.EMPTY_LIST);
  }
 private void buildRegistration() {
   // stillBirthRegistration.setPlaceType(bndCommonService.getPlaceType(placeTypeTemp));
   stillBirthRegistration.setIsCitizenKnown(Boolean.FALSE);
   buildCitizenAddress();
   buildCitizenRelation(stillBirthRegistration);
   buildInfomantDetails(stillBirthRegistration);
   buildAddress(stillBirthRegistration);
   // stillBirthRegistration.setStatus(birthStatusFlag==1?bndCommonService.getStatusByModuleAndCode(BndConstants.STILLBIRTHREGISTRATION,BndConstants.APPROVED)
   // :bndCommonService.getStatusByModuleAndCode(BndConstants.STILLBIRTHREGISTRATION,BndConstants.CREATED));
   stillBirthRegistration.getCitizenBDDetails().setIsStillBirth('Y');
   stillBirthRegistration.setIsStillBirth('Y');
   stillBirthRegistration.setAdoptionDetail(null);
   LOGGER.info(
       "Mother Education-------:::"
           + stillBirthRegistration.getCitizenBDDetails().getMotherEducation());
   if (stillBirthRegistration.getCitizenBDDetails().getCauseOfDeath() == null)
     stillBirthRegistration
         .getCitizenBDDetails()
         .setCauseOfDeath(stillBirthRegistration.getCauseOfDeathParent());
 }
  private void beforeViewAndModify() {
    stillBirthRegistration =
        (StillBirthRegistration) birthRegistrationService.getBirthRegistrationById(idTemp);
    stillBirthRegistration.setFather(
        stillBirthRegistration.getCitizen().getRelatedPerson(BndConstants.FATHER.toUpperCase()));
    stillBirthRegistration.setMother(
        stillBirthRegistration.getCitizen().getRelatedPerson(BndConstants.MOTHER.toUpperCase()));

    if (stillBirthRegistration.getInformant() != null) {
      final CRelation relation =
          stillBirthRegistration.getCitizen().getRelation(stillBirthRegistration.getInformant());
      if (relation != null) informantFlag = relation.getDesc();
      informantCitizen = stillBirthRegistration.getInformant();
      stillBirthRegistration.setInformantAddress(
          stillBirthRegistration.getInformant().getRelatedAddress(BndConstants.PRESENTADDRESS));
    }
    stillBirthRegistration.setMotherResidenceAddress(
        stillBirthRegistration.getMother().getRelatedAddress(BndConstants.USUALADDRESS));
    placeTypeTemp = stillBirthRegistration.getPlaceType().getDesc();

    if (stillBirthRegistration.getCitizenBDDetails().getCauseOfDeath() != null)
      if (stillBirthRegistration.getCitizenBDDetails().getCauseOfDeath().getParent() != null) {
        stillBirthRegistration.setCauseOfDeathParent(
            stillBirthRegistration.getCitizenBDDetails().getCauseOfDeath().getParent());
        addDropdownData(
            "diseaseList",
            bndCommonService.getCauseofDeathbyParentId(
                stillBirthRegistration
                    .getCitizenBDDetails()
                    .getCauseOfDeath()
                    .getParent()
                    .getId()));
      } else
        stillBirthRegistration.setCauseOfDeathParent(
            stillBirthRegistration.getCitizenBDDetails().getCauseOfDeath());
  }