diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaProfileActivity.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaProfileActivity.java index d57dd1d..8644bbb 100644 --- a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaProfileActivity.java +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaProfileActivity.java @@ -5,6 +5,7 @@ import android.support.v4.view.ViewPager; import org.smartregister.chw.malaria.contract.MalariaProfileContract; import org.smartregister.commonregistry.CommonPersonObject; +import org.smartregister.commonregistry.CommonPersonObjectClient; import org.smartregister.malaria.R; import org.smartregister.view.activity.BaseProfileActivity; @@ -12,6 +13,7 @@ public class BaseMalariaProfileActivity extends BaseProfileActivity implements MalariaProfileContract.View, MalariaProfileContract.Presenter { private Context context; + private CommonPersonObjectClient client; private WeakReference view; @Override @@ -35,7 +37,7 @@ public MalariaProfileContract.View getView() { } @Override - public void getProfileData(CommonPersonObject client) { + public void getProfileData(CommonPersonObjectClient client) { //feed the view with the processed data } @@ -52,12 +54,14 @@ public void startProfileActivity(Intent intent) { @Override public void fetchProfileData(Intent intent) { //process profile data from the intent + this.client = (CommonPersonObjectClient) intent.getSerializableExtra("client"); + getProfileData(this.client); } @Override protected void initializePresenter() { - + //initialize presenter } @Override diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaRegisterActivity.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaRegisterActivity.java index ea6ed4e..3572e9a 100644 --- a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaRegisterActivity.java +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/activity/BaseMalariaRegisterActivity.java @@ -7,8 +7,6 @@ import android.support.design.bottomnavigation.LabelVisibilityMode; import android.support.v4.app.Fragment; import android.util.Log; -import android.view.Menu; -import android.view.MenuInflater; import android.widget.Toast; import com.vijay.jsonwizard.constants.JsonFormConstants; diff --git a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/contract/MalariaProfileContract.java b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/contract/MalariaProfileContract.java index d77123e..bfe209c 100644 --- a/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/contract/MalariaProfileContract.java +++ b/opensrp-chw-malaria/src/main/java/org/smartregister/chw/malaria/contract/MalariaProfileContract.java @@ -2,13 +2,13 @@ import android.content.Context; import android.content.Intent; -import org.smartregister.commonregistry.CommonPersonObject; +import org.smartregister.commonregistry.CommonPersonObjectClient; public interface MalariaProfileContract { interface View { Context getContext(); MalariaProfileContract.View getView(); - void getProfileData(CommonPersonObject client); + void getProfileData(CommonPersonObjectClient client); }