コード例 #1
0
 @SuppressWarnings("unchecked")
 @Override
 public void prepareEdit() {
   stillBirthRegistration =
       (StillBirthRegistration) birthRegistrationService.getBirthRegistrationById(idTemp);
   // stillBirthRegistration =
   // (StillBirthRegistration)birthRegistrationService.merge(stillBirthRegistration);
   fatherAddressSet =
       (Set<Address>)
           stillBirthRegistration
               .getCitizen()
               .getRelatedPerson(BndConstants.FATHER.toUpperCase())
               .getAddress();
   motherAddressSet =
       (Set<Address>)
           stillBirthRegistration
               .getCitizen()
               .getRelatedPerson(BndConstants.MOTHER.toUpperCase())
               .getAddress();
   informantAddressSet.add(
       stillBirthRegistration.getInformant().getRelatedAddress(BndConstants.PRESENTADDRESS));
   citizenAddressSet = (Set<Address>) stillBirthRegistration.getCitizen().getAddress();
   oldRelations = stillBirthRegistration.getCitizen().getRelations();
   fatherAddressSet.removeAll(informantAddressSet);
   motherAddressSet.removeAll(informantAddressSet);
   getDetailsAddressTypeAndRelation();
 }
コード例 #2
0
  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());
  }