public ScheduleConfigurationVo(ims.pci.vo.beans.ScheduleConfigurationVoBean bean) {
   this.id = bean.getId();
   this.version = bean.getVersion();
   this.schedulename = bean.getScheduleName();
   this.status =
       bean.getStatus() == null
           ? null
           : ims.core.vo.lookups.PreActiveActiveInactiveStatus.buildLookup(bean.getStatus());
   this.startdob = bean.getStartDob() == null ? null : bean.getStartDob().buildDate();
   this.enddob = bean.getEndDob() == null ? null : bean.getEndDob().buildDate();
   this.isdefaultschedule = bean.getIsDefaultSchedule();
   this.scheduletype =
       bean.getScheduleType() == null
           ? null
           : ims.pci.vo.lookups.ScheduleType.buildLookup(bean.getScheduleType());
   this.campaignstartdate =
       bean.getCampaignStartDate() == null ? null : bean.getCampaignStartDate().buildDate();
   this.stages =
       ims.pci.vo.StageConfigurationVoCollection.buildFromBeanCollection(bean.getStages());
 }
  /** public void updateVaccinesCodesAndDriver(StageConfigurationVoCollection value) */
  public void updateVaccinesCodesAndDriver(ims.pci.vo.StageConfigurationVoCollection value)
      throws ims.domain.exceptions.DomainInterfaceException {
    if (value == null) return;

    if (this.stages.size() != value.size())
      throw new ims.domain.exceptions.DomainInterfaceException(
          "Stage configutation provided not matching the current stage configuration");

    for (int i = 0; i < this.stages.size(); i++) {
      if (this.stages.get(i) == null)
        throw new ims.domain.exceptions.DomainInterfaceException(
            "Stage configuration provided not matching the current stage configuration");

      if (this.stages.get(i).getStage() == null)
        throw new ims.domain.exceptions.DomainInterfaceException(
            "Stage configuration provided not matching the current stage configuration");

      if (!this.stages.get(i).getStage().equals(value.get(i).getStage())) {
        throw new ims.domain.exceptions.DomainInterfaceException(
            "Stage configuration provided not matching the current stage configuration");
      }

      if (!ims.pci.vo.lookups.ScheduleType.OUTBREAKSCHEDULE.equals(this.scheduletype)) {
        if (this.stages.get(i).getAgeInMonths() == null)
          throw new ims.domain.exceptions.DomainInterfaceException(
              "Stage configuration provided not matching the current stage configuration");

        if (!this.stages.get(i).getAgeInMonths().equals(value.get(i).getAgeInMonths())) {
          throw new ims.domain.exceptions.DomainInterfaceException(
              "Stage configuration provided not matching the current stage configuration");
        }
      }

      if (this.stages.get(i).getStageVaccines() == null) {
        if (value.get(i).getStageVaccines() == null) continue;
        else
          throw new ims.domain.exceptions.DomainInterfaceException(
              "Stage configuration provided not matching the current stage configuration");
      }

      if (this.stages.get(i).getStageVaccines().size() != value.get(i).getStageVaccines().size()) {
        throw new ims.domain.exceptions.DomainInterfaceException(
            "Stage configuration provided not matching the current stage configuration");
      }

      for (int k = 0; k < this.stages.get(i).getStageVaccines().size(); k++) {
        if (!this.stages
            .get(i)
            .getStageVaccines()
            .get(k)
            .getVaccine()
            .equals(value.get(i).getStageVaccines().get(k).getVaccine()))
          throw new ims.domain.exceptions.DomainInterfaceException(
              "Stage configuration provided not matching the current stage configuration");
      }
    }

    for (int i = 0; i < this.stages.size(); i++) {
      if (this.stages.get(i) == null) continue;

      for (int k = 0; k < this.stages.get(i).getStageVaccines().size(); k++) {
        if (this.stages.get(i).getStageVaccines().get(k) == null) continue;

        this.stages
            .get(i)
            .getStageVaccines()
            .get(k)
            .setPcrsCode(value.get(i).getStageVaccines().get(k).getPcrsCode());

        // wdev-7566
        this.stages
            .get(i)
            .getStageVaccines()
            .get(k)
            .setDriver(value.get(i).getStageVaccines().get(k).getDriver());
        this.stages
            .get(i)
            .getStageVaccines()
            .get(k)
            .setIntervalMonths(value.get(i).getStageVaccines().get(k).getIntervalMonths());

        // WDEV-9612
        this.stages
            .get(i)
            .getStageVaccines()
            .get(k)
            .setCanBeRescheduled(value.get(i).getStageVaccines().get(k).getCanBeRescheduled());

        // WDEV-8654
        this.stages
            .get(i)
            .getStageVaccines()
            .get(k)
            .setIsLastShotForVaccine(
                value.get(i).getStageVaccines().get(k).getIsLastShotForVaccine());
      }
    }
  }