public void setupANCVisitLayout(
      ANCSmartRegisterClient client, NativeANCSmartRegisterViewHolder viewHolder) {
    if (client.isVisitsDone()) {
      viewHolder.txtANCVisitDoneOn().setVisibility(VISIBLE);
      viewHolder.txtANCVisitDoneOn().setText(client.visitDoneDateWithVisitName());
    } else {
      viewHolder.txtANCVisitDoneOn().setVisibility(View.INVISIBLE);
    }

    AlertDTO ancVisitAlert = client.getAlert(ANCServiceType.ANC_1);
    if (ancVisitAlert != emptyAlert) {
      viewHolder.btnAncVisitView().setVisibility(View.INVISIBLE);
      viewHolder.layoutANCVisitAlert().setVisibility(VISIBLE);
      viewHolder
          .layoutANCVisitAlert()
          .setOnClickListener(launchForm(client, ancVisitAlert, ANC_VISIT));
      setAlertLayout(
          viewHolder.layoutANCVisitAlert(), viewHolder.txtANCVisitDueType(), ancVisitAlert);
      setAlertDateDetails(client, ancVisitAlert, viewHolder.txtANCVisitAlertDueOn());
    } else {
      viewHolder.layoutANCVisitAlert().setVisibility(View.INVISIBLE);
      viewHolder.btnAncVisitView().setVisibility(View.INVISIBLE);
      viewHolder.btnAncVisitView().setOnClickListener(launchForm(client, ancVisitAlert, ANC_VISIT));
    }
  }
 private void setupEditView(
     ANCSmartRegisterClient client,
     NativeANCSmartRegisterViewHolder viewHolder,
     View.OnClickListener onClickListener) {
   if (iconPencilDrawable == null) {
     iconPencilDrawable = Context.getInstance().getDrawableResource(R.drawable.ic_pencil);
   }
   viewHolder.btnEditView().setImageDrawable(iconPencilDrawable);
   viewHolder.btnEditView().setOnClickListener(onClickListener);
   viewHolder.btnEditView().setTag(client);
 }
  @Override
  public void setupListView(
      ANCSmartRegisterClient client,
      NativeANCSmartRegisterViewHolder viewHolder,
      View.OnClickListener clientSectionClickListener) {
    viewHolder.serviceModeOverviewView().setVisibility(VISIBLE);

    setupRiskFactorsView(client, viewHolder);
    setupANCVisitLayout(client, viewHolder);
    setupTTLayout(client, viewHolder);
    setupIFALayout(client, viewHolder);
    setupEditView(client, viewHolder, clientSectionClickListener);
  }
  public void setupIFALayout(
      ANCSmartRegisterClient client, NativeANCSmartRegisterViewHolder viewHolder) {
    if (client.isIFADone()) {
      viewHolder.txtIFADoneOn().setVisibility(VISIBLE);
      viewHolder.txtIFADoneOn().setText(client.ifaDoneDate());
    } else {
      viewHolder.txtIFADoneOn().setVisibility(View.INVISIBLE);
    }

    AlertDTO ifaAlert = client.getAlert(ANCServiceType.IFA);
    if (ifaAlert != emptyAlert) {
      viewHolder.btnIFAView().setVisibility(View.INVISIBLE);
      viewHolder.layoutIFAAlert().setVisibility(VISIBLE);
      viewHolder.layoutIFAAlert().setOnClickListener(launchForm(client, ifaAlert, IFA));
      setAlertLayout(viewHolder.layoutIFAAlert(), viewHolder.txtIFADueType(), ifaAlert);
      viewHolder.txtIFADueType().setText(ifaAlert.name());
      setAlertDateDetails(client, ifaAlert, viewHolder.txtIFADueOn());
    } else {
      viewHolder.layoutIFAAlert().setVisibility(View.INVISIBLE);
      viewHolder.btnIFAView().setVisibility(View.INVISIBLE);
      viewHolder.btnIFAView().setOnClickListener(launchForm(client, ifaAlert, IFA));
    }
  }
  public void setupTTLayout(
      ANCSmartRegisterClient client, NativeANCSmartRegisterViewHolder viewHolder) {
    if (client.isTTDone()) {
      viewHolder.txtTTDoneOn().setVisibility(VISIBLE);
      viewHolder.txtTTDoneOn().setText(client.ttDoneDate());
    } else {
      viewHolder.txtTTDoneOn().setVisibility(View.INVISIBLE);
    }

    AlertDTO ttAlert = client.getAlert(ANCServiceType.TT_1);
    if (ttAlert != emptyAlert) {
      viewHolder.btnTTView().setVisibility(View.INVISIBLE);
      viewHolder.layoutTTAlert().setVisibility(VISIBLE);
      viewHolder.layoutTTAlert().setOnClickListener(launchForm(client, ttAlert, TT));
      setAlertLayout(viewHolder.layoutTTAlert(), viewHolder.txtTTDueType(), ttAlert);
      setAlertDateDetails(client, ttAlert, viewHolder.txtTTDueOn());
    } else {
      viewHolder.layoutTTAlert().setVisibility(View.INVISIBLE);
      viewHolder.btnTTView().setVisibility(View.INVISIBLE);
      viewHolder.btnTTView().setOnClickListener(launchForm(client, ttAlert, TT));
    }
  }
 private void setupRiskFactorsView(
     ANCSmartRegisterClient client, NativeANCSmartRegisterViewHolder viewHolder) {
   viewHolder.txtRiskFactors().setText(client.riskFactors());
 }