From 8464b6294d7105d4d0e523487ba7b32f3947e301 Mon Sep 17 00:00:00 2001 From: "mib.iqbal" Date: Fri, 24 Mar 2017 08:55:00 +0800 Subject: [PATCH] MI | migrate SDIDTK to EC ##433 Signed-off-by: mib.iqbal --- opensrp-app/res/values/styles.xml | 89 +++--- .../java/org/ei/opensrp/AllConstants.java | 2 +- .../ei/opensrp/sync/CloudantSyncHandler.java | 2 +- opensrp-sdidtk/src/main/AndroidManifest.xml | 2 +- .../ei/opensrp/ddtk/NativeHomeActivity.java | 38 ++- ...r.java => SdidtkNavigationController.java} | 9 +- ...pplication.java => SdidtkApplication.java} | 58 +++- .../FormulirDdtkSmartClientsProvider.java | 120 +++++--- .../FormulirDdtkSmartRegisterActivity.java | 6 +- .../ddtk/ddtk/KICommonObjectFilterOption.java | 37 +++ .../FormulirDdtkSmartRegisterFragment.java | 282 ++++++++++++++---- .../BaseRegisterActivityPagerAdapter.java | 28 +- .../main/res/layout/anak_register_autis.xml | 94 ++++++ .../main/res/layout/anak_register_birth.xml | 94 ++++++ .../main/res/layout/anak_register_hearing.xml | 94 ++++++ .../main/res/layout/anak_register_kpsp.xml | 94 ++++++ .../main/res/layout/anak_register_mental.xml | 94 ++++++ ...k_register_overview_service_mode_views.xml | 57 ++++ .../res/layout/smart_register_anak_client.xml | 43 +++ .../smart_register_child_client_profile.xml | 93 ++++++ .../src/main/res/values/strings.xml | 2 +- 21 files changed, 1168 insertions(+), 170 deletions(-) rename opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/{TestNavigationController.java => SdidtkNavigationController.java} (76%) rename opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/application/{ECPApplication.java => SdidtkApplication.java} (50%) create mode 100644 opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/KICommonObjectFilterOption.java create mode 100644 opensrp-sdidtk/src/main/res/layout/anak_register_autis.xml create mode 100644 opensrp-sdidtk/src/main/res/layout/anak_register_birth.xml create mode 100644 opensrp-sdidtk/src/main/res/layout/anak_register_hearing.xml create mode 100644 opensrp-sdidtk/src/main/res/layout/anak_register_kpsp.xml create mode 100644 opensrp-sdidtk/src/main/res/layout/anak_register_mental.xml create mode 100644 opensrp-sdidtk/src/main/res/layout/anak_register_overview_service_mode_views.xml create mode 100644 opensrp-sdidtk/src/main/res/layout/smart_register_anak_client.xml create mode 100644 opensrp-sdidtk/src/main/res/layout/smart_register_child_client_profile.xml diff --git a/opensrp-app/res/values/styles.xml b/opensrp-app/res/values/styles.xml index c322b60b5..7fdb82e66 100644 --- a/opensrp-app/res/values/styles.xml +++ b/opensrp-app/res/values/styles.xml @@ -35,7 +35,7 @@ @@ -46,7 +46,7 @@ @@ -65,9 +65,18 @@ none + + + + + + + + @@ -177,7 +199,7 @@ 20sp center @android:color/white - @drawable/home_button_background + #1d3651 5dp center true @@ -196,6 +218,19 @@ @android:color/white + + - - - - - - - - - - - - diff --git a/opensrp-app/src/main/java/org/ei/opensrp/AllConstants.java b/opensrp-app/src/main/java/org/ei/opensrp/AllConstants.java index 7efa6bb80..43de6f139 100644 --- a/opensrp-app/src/main/java/org/ei/opensrp/AllConstants.java +++ b/opensrp-app/src/main/java/org/ei/opensrp/AllConstants.java @@ -338,7 +338,7 @@ public static class CloudantSync { public static final String BATCHES_REPLICATED = "BATCHES_REPLICATED"; public static final String COUCHDB_PORT = "5984"; - public static final String COUCH_DATABASE_NAME = "opensrp2"; + public static final String COUCH_DATABASE_NAME = "opensrp3"; public static final String COUCH_DATABASE_USER = "admin"; public static final String COUCH_DATABASE_PASS = "Satu2345"; } diff --git a/opensrp-app/src/main/java/org/ei/opensrp/sync/CloudantSyncHandler.java b/opensrp-app/src/main/java/org/ei/opensrp/sync/CloudantSyncHandler.java index 2c5b6261e..a948f0ad8 100644 --- a/opensrp-app/src/main/java/org/ei/opensrp/sync/CloudantSyncHandler.java +++ b/opensrp-app/src/main/java/org/ei/opensrp/sync/CloudantSyncHandler.java @@ -191,7 +191,7 @@ public void reloadReplicationSettings(PullFilter pullFilter) throws URISyntaxExc CloudantDataHandler mCloudantDataHandler = CloudantDataHandler.getInstance(mContext); Datastore mDatastore = mCloudantDataHandler.getDatastore(); - ReplicatorBuilder.Pull mPullBuilder = ReplicatorBuilder.pull().to(mDatastore).from(pullUri); + ReplicatorBuilder.Pull mPullBuilder = ReplicatorBuilder.pull().to(mDatastore).from(uri); ReplicatorBuilder.Push mPushBuilder = ReplicatorBuilder.push().from(mDatastore).to(uri); String username = AllConstants.CloudantSync.COUCH_DATABASE_USER; diff --git a/opensrp-sdidtk/src/main/AndroidManifest.xml b/opensrp-sdidtk/src/main/AndroidManifest.xml index 0269f7b0a..de77962b9 100644 --- a/opensrp-sdidtk/src/main/AndroidManifest.xml +++ b/opensrp-sdidtk/src/main/AndroidManifest.xml @@ -2,7 +2,7 @@ > locationMap = + locationTree.getLocationsHierarchy(); } @Override @@ -196,7 +210,7 @@ protected void onDestroy() { private void updateSyncIndicator() { if (updateMenuItem != null) { - if (context.allSharedPreferences().fetchIsSyncInProgress()) { + if (context().allSharedPreferences().fetchIsSyncInProgress()) { updateMenuItem.setActionView(R.layout.progress); } else updateMenuItem.setActionView(null); diff --git a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/TestNavigationController.java b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/SdidtkNavigationController.java similarity index 76% rename from opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/TestNavigationController.java rename to opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/SdidtkNavigationController.java index 5dacc34e8..20cd17321 100644 --- a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/TestNavigationController.java +++ b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/SdidtkNavigationController.java @@ -11,15 +11,20 @@ import static android.preference.PreferenceManager.getDefaultSharedPreferences; -public class TestNavigationController extends org.ei.opensrp.view.controller.NavigationController { +public class SdidtkNavigationController extends org.ei.opensrp.view.controller.NavigationController { private Activity activity; private ANMController anmController; + private org.ei.opensrp.Context context; - public TestNavigationController(Activity activity, ANMController anmController) { + public SdidtkNavigationController(Activity activity, ANMController anmController) { super(activity,anmController); this.activity = activity; this.anmController = anmController; } + public SdidtkNavigationController(Activity activity, ANMController anmController, org.ei.opensrp.Context context) { + this(activity,anmController); + this.context=context; + } @Override public void startECSmartRegistry() { activity.startActivity(new Intent(activity, FormulirDdtkSmartRegisterActivity.class)); diff --git a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/application/ECPApplication.java b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/application/SdidtkApplication.java similarity index 50% rename from opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/application/ECPApplication.java rename to opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/application/SdidtkApplication.java index e9d73aa53..799df3174 100644 --- a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/application/ECPApplication.java +++ b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/application/SdidtkApplication.java @@ -4,6 +4,7 @@ import android.content.res.Configuration; import org.ei.opensrp.Context; +import org.ei.opensrp.commonregistry.CommonFtsObject; import org.ei.opensrp.ddtk.LoginActivity; import org.ei.opensrp.sync.DrishtiSyncScheduler; import org.ei.opensrp.view.activity.DrishtiApplication; @@ -16,18 +17,22 @@ * Created by koros on 1/22/16. */ -public class ECPApplication extends DrishtiApplication { +public class SdidtkApplication extends DrishtiApplication { @Override public void onCreate() { DrishtiSyncScheduler.setReceiverClass(SyncBroadcastReceiver.class); super.onCreate(); - // ACRA.init(this); + // ACRA.init(this); DrishtiSyncScheduler.setReceiverClass(SyncBroadcastReceiver.class); - + // ErrorReportingFacade.initErrorHandler(getApplicationContext()); + /** + * ENABLE THIS AGAIN AFTER FINISH TESTING*/ + // FlurryFacade.init(this); context = Context.getInstance(); context.updateApplicationContext(getApplicationContext()); + context.updateCommonFtsObject(createCommonFtsObject()); applyUserLanguagePreference(); cleanUpSyncState(); } @@ -69,4 +74,49 @@ private void updateConfiguration(Configuration config) { getBaseContext().getResources().getDisplayMetrics()); } -} + private String[] getFtsSearchFields(String tableName){ + if(tableName.equals("ec_anak")){ + String[] ftsSearchFields = { "namaBayi","tanggalLahirAnak" }; + return ftsSearchFields; + } else if (tableName.equals("ec_kartu_ibu")){ + String[] ftsSearchFields = { "namalengkap", "namaSuami" }; + return ftsSearchFields; + } + return null; + } + + private String[] getFtsSortFields(String tableName){ + if(tableName.equals("ec_anak")){ + String[] sortFields = { "namaBayi","tanggalLahirAnak"}; + return sortFields; + } else if(tableName.equals("ec_kartu_ibu")){ + String[] sortFields = { "namalengkap", "namaSuami"}; + return sortFields; + } + return null; + } + + private String[] getFtsMainConditions(String tableName){ + if(tableName.equals("ec_anak")){ + String[] mainConditions = {"is_closed", "details" , "namaBayi"}; + return mainConditions; + } else if(tableName.equals("ec_kartu_ibu")){ + String[] mainConditions = { "is_closed", "namalengkap"}; + return mainConditions; + } + return null; + } + private String[] getFtsTables(){ + String[] ftsTables = { "ec_anak", "ec_kartu_ibu" }; + return ftsTables; + } + private CommonFtsObject createCommonFtsObject(){ + CommonFtsObject commonFtsObject = new CommonFtsObject(getFtsTables()); + for(String ftsTable: commonFtsObject.getTables()){ + commonFtsObject.updateSearchFields(ftsTable, getFtsSearchFields(ftsTable)); + commonFtsObject.updateSortFields(ftsTable, getFtsSortFields(ftsTable)); + commonFtsObject.updateMainConditions(ftsTable, getFtsMainConditions(ftsTable)); + } + return commonFtsObject; + } +} \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/FormulirDdtkSmartClientsProvider.java b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/FormulirDdtkSmartClientsProvider.java index cf92fbab2..19f3ae599 100644 --- a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/FormulirDdtkSmartClientsProvider.java +++ b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/FormulirDdtkSmartClientsProvider.java @@ -14,9 +14,13 @@ import android.widget.LinearLayout; import android.widget.TextView; +import org.ei.opensrp.commonregistry.AllCommonsRepository; +import org.ei.opensrp.commonregistry.CommonPersonObject; import org.ei.opensrp.commonregistry.CommonPersonObjectClient; import org.ei.opensrp.commonregistry.CommonPersonObjectController; +import org.ei.opensrp.cursoradapter.SmartRegisterCLientsProviderForCursorAdapter; import org.ei.opensrp.provider.SmartRegisterClientsProvider; +import org.ei.opensrp.repository.DetailsRepository; import org.ei.opensrp.service.AlertService; import org.ei.opensrp.ddtk.R; import org.ei.opensrp.view.contract.SmartRegisterClient; @@ -27,29 +31,29 @@ import org.ei.opensrp.view.viewHolder.OnClickFormLauncher; +import java.text.SimpleDateFormat; + import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; /** * Created by user on 2/12/15. */ -public class FormulirDdtkSmartClientsProvider implements SmartRegisterClientsProvider{ - +public class FormulirDdtkSmartClientsProvider implements SmartRegisterCLientsProviderForCursorAdapter { private final LayoutInflater inflater; - public final Context context; + private final Context context; private final View.OnClickListener onClickListener; - + private Drawable iconPencilDrawable; private final int txtColorBlack; private final AbsListView.LayoutParams clientViewLayoutParams; - private Drawable iconPencilDrawable; + protected CommonPersonObjectController controller; AlertService alertService; - public FormulirDdtkSmartClientsProvider(Context context, - View.OnClickListener onClickListener, - CommonPersonObjectController controller, AlertService alertService) { + View.OnClickListener onClickListener, + AlertService alertService) { this.onClickListener = onClickListener; - this.controller = controller; +// this.controller = controller; this.context = context; this.alertService = alertService; this.inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); @@ -61,22 +65,25 @@ public FormulirDdtkSmartClientsProvider(Context context, } @Override - public View getView(SmartRegisterClient smartRegisterClient, View convertView, ViewGroup viewGroup) { - + public void getView(SmartRegisterClient smartRegisterClient, View convertView) { ViewHolder viewHolder; - ViewGroup itemView = viewGroup; - if (convertView == null){ - convertView = (ViewGroup) inflater().inflate(R.layout.smart_register_ddtk_client, null); + + if(convertView.getTag() == null || !(convertView.getTag() instanceof ViewHolder)){ + viewHolder = new ViewHolder(); viewHolder.profilelayout = (LinearLayout)convertView.findViewById(R.id.profile_info_layout); - viewHolder.nama_anak = (TextView)convertView.findViewById(R.id.text_nama_anak); - viewHolder.jenis_kelamin = (TextView)convertView.findViewById(R.id.text_jenis_kelamin); - viewHolder.umur = (TextView)convertView.findViewById(R.id.text_umur); - viewHolder.nama_ibu = (TextView)convertView.findViewById(R.id.text_nama_ibu); + viewHolder.nama_anak = (TextView)convertView.findViewById(R.id.child_name); + viewHolder.village_name = (TextView)convertView.findViewById(R.id.txt_village_name); + viewHolder.umur = (TextView)convertView.findViewById(R.id.child_age); + viewHolder.nama_ibu = (TextView)convertView.findViewById(R.id.mother_name); + + //kpsp + viewHolder.tgl_kpsp = (TextView)convertView.findViewById(R.id.txt_tgl); viewHolder.berat = (TextView)convertView.findViewById(R.id.text_berat); viewHolder.tinggi = (TextView)convertView.findViewById(R.id.text_tinggi); viewHolder.lingkar_kepala = (TextView)convertView.findViewById(R.id.text_lingkar_kepala); - viewHolder.kpsp_test_date1 = (TextView)convertView.findViewById(R.id.text_kpsp_test_date); + + /* viewHolder.kpsp_test_date1 = (TextView)convertView.findViewById(R.id.text_kpsp_test_date); viewHolder.status_kembang1 = (TextView)convertView.findViewById(R.id.text_status_kembang); viewHolder.status_kembang2 = (TextView)convertView.findViewById(R.id.text_status_kembang); viewHolder.kpsp_test_date2 = (TextView)convertView.findViewById(R.id.text_kpsp_test_date); @@ -98,11 +105,11 @@ public View getView(SmartRegisterClient smartRegisterClient, View convertView, V viewHolder.sight_test_date = (TextView)convertView.findViewById(R.id.text_sight_test_date); viewHolder.mental_test_date = (TextView)convertView.findViewById(R.id.text_mental_test_date); viewHolder.autis_test_date = (TextView)convertView.findViewById(R.id.text_autis_test_date); - viewHolder.gpph_test_date = (TextView)convertView.findViewById(R.id.text_gpph_test_date); - viewHolder.profilepic =(ImageView)convertView.findViewById(R.id.childdetailprofileview); + viewHolder.gpph_test_date = (TextView)convertView.findViewById(R.id.text_gpph_test_date);*/ + viewHolder.profilepic =(ImageView)convertView.findViewById(R.id.img_profile); viewHolder.follow_up = (ImageButton)convertView.findViewById(R.id.btn_edit); convertView.setTag(viewHolder); - }else{ + } else { viewHolder = (ViewHolder) convertView.getTag(); } @@ -122,36 +129,54 @@ public View getView(SmartRegisterClient smartRegisterClient, View convertView, V // List alertlist_for_client = alertService.findByEntityIdAndAlertNames(pc.entityId(), "FW CENSUS"); */ - + DetailsRepository detailsRepository = org.ei.opensrp.Context.getInstance().detailsRepository(); + detailsRepository.updateDetails(pc); //set image picture - final ImageView childview = (ImageView)convertView.findViewById(R.id.childdetailprofileview); + final ImageView childview = (ImageView)convertView.findViewById(R.id.img_profile); + if (pc.getDetails().get("profilepic") != null) { + ChildDetailActivity.setImagetoHolderFromUri((Activity) context, pc.getDetails().get("profilepic"), childview, R.drawable.child_boy_infant); + childview.setTag(smartRegisterClient); + } + else { + if(pc.getDetails().get("gender") != null && pc.getDetails().get("gender").equals("male")) { + viewHolder.profilepic.setImageDrawable(context.getResources().getDrawable(R.drawable.child_boy_infant)); + } + else if(pc.getDetails().get("gender") != null && pc.getDetails().get("gender").equals("laki")) { + viewHolder.profilepic.setImageDrawable(context.getResources().getDrawable(R.drawable.child_boy_infant)); + } + else + viewHolder.profilepic.setImageDrawable(context.getResources().getDrawable(R.drawable.child_girl_infant)); + } - if (pc.getDetails().get("profilepic") == null) { - if (pc.getDetails().get("jenis_kelamin").equalsIgnoreCase("laki_laki")) { - viewHolder.profilepic.setImageResource(org.ei.opensrp.R.drawable.child_boy_infant); + //viewHolder.profilepic.setImageDrawable(context.getResources().getDrawable(R.drawable.child_boy_infant)); + //viewHolder.village.setText(pc.getDetails().get("village") != null ? pc.getDetails().get("village") : ""); + viewHolder.nama_anak.setText(pc.getDetails().get("namaBayi") != null ? pc.getDetails().get("namaBayi").replaceAll("_", " ") : "-"); + String ages = pc.getColumnmaps().get("tanggalLahirAnak").substring(0, pc.getColumnmaps().get("tanggalLahirAnak").indexOf("T")); + viewHolder.umur.setText(pc.getDetails().get("tanggalLahirAnak") != null ? Integer.toString(monthRangeToToday(ages))+"B" : ""); + viewHolder.village_name.setText(pc.getDetails().get("address1")!=null?pc.getDetails().get("address1") :"-"); - } else { + AllCommonsRepository childRepository = org.ei.opensrp.Context.getInstance().allCommonsRepositoryobjects("ec_anak"); + CommonPersonObject childobject = childRepository.findByCaseID(pc.entityId()); - viewHolder.profilepic.setImageResource(org.ei.opensrp.R.drawable.child_girl_infant); + AllCommonsRepository kirep = org.ei.opensrp.Context.getInstance().allCommonsRepositoryobjects("ec_kartu_ibu"); + final CommonPersonObject kiparent = kirep.findByCaseID(childobject.getColumnmaps().get("relational_id")); - } + if(kiparent != null) { + detailsRepository.updateDetails(kiparent); + String namaayah = kiparent.getDetails().get("namaSuami") != null ? kiparent.getDetails().get("namaSuami") : ""; + String namaibu = kiparent.getColumnmaps().get("namalengkap") != null ? kiparent.getColumnmaps().get("namalengkap") : ""; - } if (pc.getDetails().get("profilepic") != null) { - ChildDetailActivity.setImagetoHolderFromUri((Activity) context, pc.getDetails().get("profilepic"), childview, R.drawable.ic_dristhi_logo); - childview.setTag(smartRegisterClient); + viewHolder.nama_ibu.setText(namaibu + "," + namaayah); + viewHolder.village_name.setText(kiparent.getDetails().get("address1")!=null?kiparent.getDetails().get("address1") :"-"); } - - //viewHolder.profilepic.setImageDrawable(context.getResources().getDrawable(R.drawable.child_boy_infant)); - //viewHolder.village.setText(pc.getDetails().get("village") != null ? pc.getDetails().get("village") : ""); - viewHolder.nama_anak.setText(pc.getDetails().get("nama_anak") != null ? pc.getDetails().get("nama_anak").replaceAll("_", " ") : "-"); - viewHolder.jenis_kelamin.setText(pc.getDetails().get("jenis_kelamin") != null ? pc.getDetails().get("jenis_kelamin").replaceAll("_", " ") : "-"); - viewHolder.umur.setText(pc.getDetails().get("umur")!=null?pc.getDetails().get("umur").replaceAll("_", " ")+" Bulan" :"-"); - viewHolder.nama_ibu.setText(pc.getDetails().get("nama_ibu") != null ? pc.getDetails().get("nama_ibu").replaceAll("_", " ") : "-"); +/* viewHolder.berat.setText("Berat: "+ (pc.getDetails().get("berat")!=null?pc.getDetails().get("berat").replaceAll("_", " "):"-")); viewHolder.tinggi.setText("Tinggi: "+ (pc.getDetails().get("tinggi") != null ? pc.getDetails().get("tinggi").replaceAll("_", " ") : "-")); viewHolder.lingkar_kepala.setText("Lingkar Kepala: "+ (pc.getDetails().get("lingkar_kepala")!=null?pc.getDetails().get("lingkar_kepala").replaceAll("_", " "):"-")); viewHolder.kpsp_test_date1.setText("Tanggal: "+ (pc.getDetails().get("kpsp_test_date1")!=null?pc.getDetails().get("kpsp_test_date1").replaceAll("_", " "):"-")); + + viewHolder.kpsp_test_date2.setText(pc.getDetails().get("kpsp_test_date2")!=null?pc.getDetails().get("kpsp_test_date2").replaceAll("_", " "):"-"); viewHolder.status_kembang2.setText(pc.getDetails().get("status_kembang2")!=null?pc.getDetails().get("status_kembang2").replaceAll("_", " "):"-"); viewHolder.kpsp_test_date3.setText(pc.getDetails().get("kpsp_test_date3")!=null?pc.getDetails().get("kpsp_test_date3").replaceAll("_", " "):"-"); @@ -178,11 +203,11 @@ public View getView(SmartRegisterClient smartRegisterClient, View convertView, V // viewHolder.headofhouseholdname.setText(pc.getDetails().get("FWHOHFNAME")!=null?pc.getDetails().get("FWHOHFNAME"):""); // viewHolder.no_of_mwra.setText(pc.getDetails().get("ELCO")!=null?pc.getDetails().get("ELCO"):""); // Date lastdate = null; +*/ convertView.setLayoutParams(clientViewLayoutParams); - return convertView; } CommonPersonObjectController householdelcocontroller; @@ -190,7 +215,6 @@ public View getView(SmartRegisterClient smartRegisterClient, View convertView, V - @Override public SmartRegisterClients getClients() { return controller.getClients(); } @@ -214,6 +238,16 @@ public OnClickFormLauncher newFormLauncher(String formName, String entityId, Str public LayoutInflater inflater() { return inflater; } + @Override + public View inflatelayoutForCursorAdapter() { + View View = inflater().inflate(R.layout.smart_register_anak_client, null); + return View; + } + private int monthRangeToToday(String lastVisitDate){ + String currentDate[] = new SimpleDateFormat("yyyy-MM").format(new java.util.Date()).substring(0,7).split("-"); + return ((Integer.parseInt(currentDate[0]) - Integer.parseInt(lastVisitDate.substring(0,4)))*12 + + (Integer.parseInt(currentDate[1]) - Integer.parseInt(lastVisitDate.substring(5,7)))); + } class ViewHolder { @@ -256,6 +290,8 @@ class ViewHolder { TextView kpsp_test_date5; TextView kpsp_test_date6; TextView gpph_test_date; + TextView village_name; + TextView tgl_kpsp; } diff --git a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/FormulirDdtkSmartRegisterActivity.java b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/FormulirDdtkSmartRegisterActivity.java index ec3758864..b1e37a688 100644 --- a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/FormulirDdtkSmartRegisterActivity.java +++ b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/FormulirDdtkSmartRegisterActivity.java @@ -76,7 +76,7 @@ public void onPageSelected(int position) { } }); - ziggyService = context.ziggyService(); + ziggyService = context().ziggyService(); } public void onPageChanged(int page){ setRequestedOrientation(page == 0 ? ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); @@ -183,7 +183,7 @@ public void startFormActivity(String formName, String entityId, String metaData) DisplayFormFragment displayFormFragment = getDisplayFormFragmentAtIndex(formIndex); if (displayFormFragment != null) { displayFormFragment.setFormData(data); - displayFormFragment.loadFormData(); + // displayFormFragment.loadFormData(); displayFormFragment.setRecordId(entityId); displayFormFragment.setFieldOverides(metaData); } @@ -213,7 +213,7 @@ public void run() { if (displayFormFragment != null) { displayFormFragment.hideTranslucentProgressDialog(); displayFormFragment.setFormData(null); - displayFormFragment.loadFormData(); + // displayFormFragment.loadFormData(); } displayFormFragment.setRecordId(null); diff --git a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/KICommonObjectFilterOption.java b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/KICommonObjectFilterOption.java new file mode 100644 index 000000000..2b601ef15 --- /dev/null +++ b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/ddtk/KICommonObjectFilterOption.java @@ -0,0 +1,37 @@ +package org.ei.opensrp.ddtk.ddtk; + +import org.ei.opensrp.cursoradapter.CursorFilterOption; +import org.ei.opensrp.view.contract.SmartRegisterClient; + +public class KICommonObjectFilterOption implements CursorFilterOption { + public final String criteria; + public final String fieldname; + private final String filterOptionName; + + @Override + public String filter() { + + + return " and ec_anak.relational_id IN (SELECT DISTINCT base_entity_id FROM ec_details WHERE value MATCH '"+criteria+"')"; + + } + + + + public KICommonObjectFilterOption(String criteria, String fieldname, String filteroptionname) { + this.criteria = criteria; + this.fieldname = fieldname; + this.filterOptionName = filteroptionname; + } + + @Override + public String name() { + return filterOptionName; + } + + @Override + public boolean filter(SmartRegisterClient client) { + + return false; + } +} diff --git a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/fragment/FormulirDdtkSmartRegisterFragment.java b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/fragment/FormulirDdtkSmartRegisterFragment.java index 092349d83..4f5a40d76 100644 --- a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/fragment/FormulirDdtkSmartRegisterFragment.java +++ b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/fragment/FormulirDdtkSmartRegisterFragment.java @@ -1,19 +1,30 @@ package org.ei.opensrp.ddtk.fragment; +import android.app.AlertDialog; import android.app.Fragment; import android.app.FragmentTransaction; +import android.content.DialogInterface; import android.content.Intent; import android.text.Editable; import android.text.TextWatcher; import android.view.View; +import android.widget.EditText; +import android.widget.Toast; import org.ei.opensrp.Context; import org.ei.opensrp.adapter.SmartRegisterPaginatedAdapter; import org.ei.opensrp.commonregistry.CommonObjectSort; import org.ei.opensrp.commonregistry.CommonPersonObjectClient; import org.ei.opensrp.commonregistry.CommonPersonObjectController; +import org.ei.opensrp.commonregistry.CommonRepository; +import org.ei.opensrp.cursoradapter.CursorCommonObjectFilterOption; +import org.ei.opensrp.cursoradapter.CursorCommonObjectSort; +import org.ei.opensrp.cursoradapter.SecuredNativeSmartRegisterCursorAdapterFragment; +import org.ei.opensrp.cursoradapter.SmartRegisterPaginatedCursorAdapter; +import org.ei.opensrp.cursoradapter.SmartRegisterQueryBuilder; import org.ei.opensrp.ddtk.LoginActivity; import org.ei.opensrp.ddtk.ddtk.FormulirDdtkServiceModeOption; +import org.ei.opensrp.ddtk.ddtk.KICommonObjectFilterOption; import org.ei.opensrp.provider.SmartRegisterClientsProvider; import org.ei.opensrp.ddtk.R; @@ -21,6 +32,8 @@ import org.ei.opensrp.ddtk.ddtk.FormulirDdtkSmartRegisterActivity; import org.ei.opensrp.ddtk.ddtk.FormulirDdtkSearchOption; import org.ei.opensrp.ddtk.ddtk.FormulirDdtkSmartClientsProvider; +import org.ei.opensrp.sync.ClientProcessor; +import org.ei.opensrp.util.StringUtil; import org.ei.opensrp.view.activity.SecuredNativeSmartRegisterActivity; import org.ei.opensrp.view.contract.ECClient; import org.ei.opensrp.view.contract.SmartRegisterClient; @@ -32,6 +45,7 @@ import org.ei.opensrp.view.dialog.DialogOptionModel; import org.ei.opensrp.view.dialog.EditOption; import org.ei.opensrp.view.dialog.FilterOption; +import org.ei.opensrp.view.dialog.LocationSelectorDialogFragment; import org.ei.opensrp.view.dialog.NameSort; import org.ei.opensrp.view.dialog.ServiceModeOption; import org.ei.opensrp.view.dialog.SortOption; @@ -53,25 +67,24 @@ /** * Created by koros on 10/12/15. */ -public class FormulirDdtkSmartRegisterFragment extends SecuredNativeSmartRegisterFragment { +public class FormulirDdtkSmartRegisterFragment extends SecuredNativeSmartRegisterCursorAdapterFragment { private SmartRegisterClientsProvider clientProvider = null; private CommonPersonObjectController controller; private VillageController villageController; private DialogOptionMapper dialogOptionMapper; - + private ClientProcessor clientProcessor; private final ClientActionHandler clientActionHandler = new ClientActionHandler(); private String locationDialogTAG = "locationDialogTAG"; - @Override protected void onCreation() { // } - @Override - protected SmartRegisterPaginatedAdapter adapter() { - return new SmartRegisterPaginatedAdapter(clientsProvider()); - } +// @Override +// protected SmartRegisterPaginatedAdapter adapter() { +// return new SmartRegisterPaginatedAdapter(clientsProvider()); +// } @Override protected SecuredNativeSmartRegisterActivity.DefaultOptionsProvider getDefaultOptionsProvider() { @@ -79,8 +92,7 @@ protected SecuredNativeSmartRegisterActivity.DefaultOptionsProvider getDefaultOp @Override public ServiceModeOption serviceMode() { - - return new FormulirDdtkServiceModeOption(clientsProvider()); + return new FormulirDdtkServiceModeOption(clientsProvider()); } @Override @@ -91,7 +103,6 @@ public FilterOption villageFilter() { @Override public SortOption sortOption() { return new NameSort(); - // return new HouseholdCensusDueDateSort(); } @@ -108,19 +119,17 @@ protected SecuredNativeSmartRegisterActivity.NavBarOptionsProvider getNavBarOpti @Override public DialogOption[] filterOptions() { - + // FlurryAgent.logEvent("click_filter_option_on_kohort_ibu_dashboard"); ArrayList dialogOptionslist = new ArrayList(); - dialogOptionslist.add(new AllClientsFilter()); - // dialogOptionslist.add( new NOHHMWRAEXISTFilterOption("0","ELCO", NOHHMWRAEXISTFilterOption.ByColumnAndByDetails.byDetails)); - // dialogOptionslist.add(new HHMWRAEXISTFilterOption("0","ELCO", HHMWRAEXISTFilterOption.ByColumnAndByDetails.byDetails)); + dialogOptionslist.add(new CursorCommonObjectFilterOption(getString(R.string.filter_by_all_label),filterStringForAll())); - String locationjson = context.anmLocationController().get(); + String locationjson = context().anmLocationController().get(); LocationTree locationTree = EntityUtils.fromJson(locationjson, LocationTree.class); Map> locationMap = locationTree.getLocationsHierarchy(); - // addChildToList(dialogOptionslist,locationMap); + addChildToList(dialogOptionslist,locationMap); DialogOption[] dialogOptions = new DialogOption[dialogOptionslist.size()]; for (int i = 0;i < dialogOptionslist.size();i++){ dialogOptions[i] = dialogOptionslist.get(i); @@ -136,14 +145,14 @@ public DialogOption[] serviceModeOptions() { @Override public DialogOption[] sortingOptions() { + // FlurryFacade.logEvent("click_sorting_option_on_kohort_ibu_dashboard"); return new DialogOption[]{ // new HouseholdCensusDueDateSort(), - new CommonObjectSort(CommonObjectSort.ByColumnAndByDetails.byDetails, false, "nama_anak", getResources().getString(R.string.child_alphabetical_sort)), - new CommonObjectSort(CommonObjectSort.ByColumnAndByDetails.byDetails, false, "nama_ibu", getResources().getString(R.string.mothername_alphabetical_sort)), - new CommonObjectSort(CommonObjectSort.ByColumnAndByDetails.byDetails, false, "umur", getResources().getString(R.string.age_alphabetical_sort)), -//"" -// new CommonObjectSort(true,false,true,"age") + + new CursorCommonObjectSort(getResources().getString(R.string.sort_by_name_label),KiSortByNameAZ()), + new CursorCommonObjectSort(getResources().getString(R.string.sort_by_name_label_reverse),KiSortByNameZA()), + }; } @@ -154,13 +163,15 @@ public String searchHint() { }; } + + @Override protected SmartRegisterClientsProvider clientsProvider() { - if (clientProvider == null) { - clientProvider = new FormulirDdtkSmartClientsProvider( - getActivity(),clientActionHandler , controller,context.alertService()); - } - return clientProvider; +// if (clientProvider == null) { +// clientProvider = new HouseHoldSmartClientsProvider( +// getActivity(),clientActionHandler , context().alertService()); +// } + return null; } private DialogOption[] getEditOptions() { @@ -169,18 +180,7 @@ private DialogOption[] getEditOptions() { @Override protected void onInitialization() { - if (controller == null) { - controller = new CommonPersonObjectController(context.allCommonsRepositoryobjects("anak"), - context.allBeneficiaries(), context.listCache(), - context.personObjectClientsCache(), "nama_anak", "jenis_kelamin", "nama_ibu", - CommonPersonObjectController.ByColumnAndByDetails.byDetails.byDetails); - - } - //controller = new CommonPersonObjectController(context.allCommonsRepositoryobjects("mother"), - // context.allBeneficiaries(), context.listCache(), - // context.personObjectClientsCache(),"nama","mother"); - dialogOptionMapper = new DialogOptionMapper(); - // context.formSubmissionRouter().getHandlerMap().put("census_enrollment_form",new CensusEnrollmentHandler()); + // context().formSubmissionRouter().getHandlerMap().put("census_enrollment_form", new CensusEnrollmentHandler()); } @Override @@ -189,12 +189,55 @@ public void setupViews(View view) { super.setupViews(view); view.findViewById(R.id.btn_report_month).setVisibility(INVISIBLE); - - setServiceModeViewDrawableRight(null); + view.findViewById(R.id.service_mode_selection).setVisibility(View.GONE); + clientsView.setVisibility(View.VISIBLE); + clientsProgressView.setVisibility(View.INVISIBLE); +// list.setBackgroundColor(Color.RED); + initializeQueries(); + } + private String filterStringForAll(){ + return ""; + } + private String sortByAlertmethod() { + return " CASE WHEN alerts.status = 'urgent' THEN '1'" + + + "WHEN alerts.status = 'upcoming' THEN '2'\n" + + "WHEN alerts.status = 'normal' THEN '3'\n" + + "WHEN alerts.status = 'expired' THEN '4'\n" + + "WHEN alerts.status is Null THEN '5'\n" + + "Else alerts.status END ASC"; + } + public void initializeQueries(){ + FormulirDdtkSmartClientsProvider kiscp = new FormulirDdtkSmartClientsProvider(getActivity(),clientActionHandler,context().alertService()); + clientAdapter = new SmartRegisterPaginatedCursorAdapter(getActivity(), null, kiscp, new CommonRepository("ec_anak",new String []{"tanggalLahirAnak","namaBayi"})); + clientsView.setAdapter(clientAdapter); + + setTablename("ec_anak"); + SmartRegisterQueryBuilder countqueryBUilder = new SmartRegisterQueryBuilder(); + countqueryBUilder.SelectInitiateMainTableCounts("ec_anak"); + mainCondition = " is_closed = 0 "; + countSelect = countqueryBUilder.mainCondition(" is_closed = 0 "); + // mainCondition = " isClosed !='true' "; + super.CountExecute(); + + SmartRegisterQueryBuilder queryBUilder = new SmartRegisterQueryBuilder(); + queryBUilder.SelectInitiateMainTable("ec_anak", new String[]{"ec_anak.relationalid","ec_anak.is_closed","ec_anak.details","tanggalLahirAnak","namaBayi"}); + mainSelect = queryBUilder.mainCondition(" is_closed = 0 "); + // Sortqueries = KiSortByNameAZ(); + + currentlimit = 20; + currentoffset = 0; + + super.filterandSortInInitializeQueries(); + +// setServiceModeViewDrawableRight(null); updateSearchView(); -// checkforNidMissing(view); + refresh(); + + } + @Override public void startRegistration() { FragmentTransaction ft = getActivity().getFragmentManager().beginTransaction(); @@ -202,24 +245,34 @@ public void startRegistration() { if (prev != null) { ft.remove(prev); } + + // String uniqueIdJson = LoginActivity.generator.uniqueIdController().getUniqueIdJson(); + /* if(uniqueIdJson == null || uniqueIdJson.isEmpty()){ + Toast.makeText(getActivity(),"No unique id",Toast.LENGTH_LONG).show(); + return; + }*/ + ft.addToBackStack(null); - TestLocationSelectorDialogFragment - .newInstance((FormulirDdtkSmartRegisterActivity) getActivity(), new EditDialogOptionModel(), context.anmLocationController().get(), "formulir_ddtk") + LocationSelectorDialogFragment +//<<<<<<< HEAD +// .newInstance((GiziSmartRegisterActivity) getActivity(), new EditDialogOptionModel(), context.anmLocationController().get(), "registrasi_gizi") +//======= + .newInstance((FormulirDdtkSmartRegisterActivity) getActivity(), new EditDialogOptionModel(), context().anmLocationController().get(), "registrasi_gizi") +//>>>>>>> a226fad729247ae36c3882a71e1d3f15be4ade8a .show(ft, locationDialogTAG); } private class ClientActionHandler implements View.OnClickListener { - @Override public void onClick(View view) { switch (view.getId()) { case R.id.profile_info_layout: + CharSequence selections[] = new CharSequence[] {"Detail View", "Charts"}; ChildDetailActivity.childclient = (CommonPersonObjectClient) view.getTag(); - Intent intent = new Intent(getActivity(), ChildDetailActivity.class); - startActivity(intent); - getActivity().finish(); + break; //untuk follow up button case R.id.btn_edit: + // FlurryFacade.logEvent("click_button_edit_vaksinator"); showFragmentDialog(new EditDialogOptionModel(), view.getTag()); break; } @@ -230,25 +283,64 @@ private void showProfileView(ECClient client) { } } + + + private String KiSortByNameAZ() { + return " namaBayi ASC"; + } + private String KiSortByNameZA() { + return " namaBayi DESC"; + } + private String KiSortByAgeASC() { + return " tanggalLahirAnak DESC"; + } + private String KiSortByAgeDESC() { + return " tanggalLahirAnak ASC"; + } + + private String KiSortByAge() { + return " umur DESC"; + } + private String KiSortByNoIbu() { + return " noIbu ASC"; + } + + private String KiSortByEdd() { + return " htp IS NULL, htp"; + } + + private class EditDialogOptionModel implements DialogOptionModel { @Override public DialogOption[] getDialogOptions() { return getEditOptions(); } - @Override public void onDialogOptionSelection(DialogOption option, Object tag) { + + + /*if(option.name().equalsIgnoreCase(getString(R.string.str_register_anc_form)) ) { + CommonPersonObjectClient pc = KIDetailActivity.kiclient; + if(pc.getDetails().get("ibu.type")!= null) { + if (pc.getDetails().get("ibu.type").equals("anc") || pc.getDetails().get("ibu.type").equals("pnc")) { + Toast.makeText(getActivity().getApplicationContext(), getString(R.string.mother_already_registered), Toast.LENGTH_SHORT).show(); + return; + } + } + }*/ onEditSelection((EditOption) option, (SmartRegisterClient) tag); } } @Override protected void onResumption() { - super.onResumption(); +// super.onResumption(); getDefaultOptionsProvider(); - updateSearchView(); - //checkforNidMissing(mView); - + if(isPausedOrRefreshList()) { + initializeQueries(); + } + // updateSearchView(); +// try{ LoginActivity.setLanguage(); }catch (Exception e){ @@ -256,6 +348,57 @@ protected void onResumption() { } } + @Override + public void setupSearchView(View view) { + searchView = (EditText) view.findViewById(org.ei.opensrp.R.id.edt_search); + searchView.setHint(getNavBarOptionsProvider().searchHint()); + searchView.addTextChangedListener(new TextWatcher() { + @Override + public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { + } + + @Override + public void onTextChanged(final CharSequence cs, int start, int before, int count) { + + (new AsyncTask() { + SmartRegisterClients filteredClients; + + @Override + protected Object doInBackground(Object[] params) { +// currentSearchFilter = +// setCurrentSearchFilter(new HHSearchOption(cs.toString())); +// filteredClients = getClientsAdapter().getListItemProvider() +// .updateClients(getCurrentVillageFilter(), getCurrentServiceModeOption(), +// getCurrentSearchFilter(), getCurrentSortOption()); +// + filters = cs.toString(); + joinTable = ""; + mainCondition = " is_closed = 0 AND namaBayi !='' "; + return null; + } + + @Override + protected void onPostExecute(Object o) { +// clientsAdapter +// .refreshList(currentVillageFilter, currentServiceModeOption, +// currentSearchFilter, currentSortOption); +// getClientsAdapter().refreshClients(filteredClients); +// getClientsAdapter().notifyDataSetChanged(); + getSearchCancelView().setVisibility(isEmpty(cs) ? INVISIBLE : VISIBLE); + CountExecute(); + filterandSortExecute(); + super.onPostExecute(o); + } + }).execute(); + } + + @Override + public void afterTextChanged(Editable editable) { + } + }); + searchCancelView = view.findViewById(org.ei.opensrp.R.id.btn_search_cancel); + searchCancelView.setOnClickListener(searchCancelHandler); + } public void updateSearchView(){ getSearchView().addTextChangedListener(new TextWatcher() { @@ -271,12 +414,15 @@ public void onTextChanged(final CharSequence cs, int start, int before, int coun @Override protected Object doInBackground(Object[] params) { // currentSearchFilter = - setCurrentSearchFilter(new FormulirDdtkSearchOption(cs.toString())); - filteredClients = getClientsAdapter().getListItemProvider() - .updateClients(getCurrentVillageFilter(), getCurrentServiceModeOption(), - getCurrentSearchFilter(), getCurrentSortOption()); - +// setCurrentSearchFilter(new HHSearchOption(cs.toString())); +// filteredClients = getClientsAdapter().getListItemProvider() +// .updateClients(getCurrentVillageFilter(), getCurrentServiceModeOption(), +// getCurrentSearchFilter(), getCurrentSortOption()); +// + filters = cs.toString(); + joinTable = ""; + mainCondition = " is_closed = 0 AND namaBayi !='' "; return null; } @@ -285,9 +431,10 @@ protected void onPostExecute(Object o) { // clientsAdapter // .refreshList(currentVillageFilter, currentServiceModeOption, // currentSearchFilter, currentSortOption); - getClientsAdapter().refreshClients(filteredClients); - getClientsAdapter().notifyDataSetChanged(); +// getClientsAdapter().refreshClients(filteredClients); +// getClientsAdapter().notifyDataSetChanged(); getSearchCancelView().setVisibility(isEmpty(cs) ? INVISIBLE : VISIBLE); + filterandSortExecute(); super.onPostExecute(o); } }).execute(); @@ -307,7 +454,22 @@ public void afterTextChanged(Editable editable) { } }); } + public void addChildToList(ArrayList dialogOptionslist,Map> locationMap){ + for(Map.Entry> entry : locationMap.entrySet()) { + + if(entry.getValue().getChildren() != null) { + addChildToList(dialogOptionslist,entry.getValue().getChildren()); + + }else{ + StringUtil.humanize(entry.getValue().getLabel()); + String name = StringUtil.humanize(entry.getValue().getLabel()); + dialogOptionslist.add(new KICommonObjectFilterOption(name,"desa", name)); + + } + } + } + -} +} \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/pageradapter/BaseRegisterActivityPagerAdapter.java b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/pageradapter/BaseRegisterActivityPagerAdapter.java index abfd3cbbd..6001f1609 100644 --- a/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/pageradapter/BaseRegisterActivityPagerAdapter.java +++ b/opensrp-sdidtk/src/main/java/org/ei/opensrp/ddtk/pageradapter/BaseRegisterActivityPagerAdapter.java @@ -14,12 +14,23 @@ public class BaseRegisterActivityPagerAdapter extends FragmentPagerAdapter { public static final String ARG_PAGE = "page"; String[] dialogOptions; Fragment mBaseFragment; + Fragment mProfileFragment; + public int offset = 0; public BaseRegisterActivityPagerAdapter(FragmentManager fragmentManager, String[] dialogOptions, Fragment baseFragment) { super(fragmentManager); this.dialogOptions = dialogOptions; this.mBaseFragment = baseFragment; + offset += 1; } + public BaseRegisterActivityPagerAdapter(FragmentManager fragmentManager, String[] dialogOptions, Fragment baseFragment, Fragment mProfileFragment) { + super(fragmentManager); + this.dialogOptions = dialogOptions; + this.mBaseFragment = baseFragment; + this.mProfileFragment = mProfileFragment; + offset += 2; + } + @Override public Fragment getItem(int position) { @@ -28,9 +39,13 @@ public Fragment getItem(int position) { case 0: fragment = mBaseFragment; break; - + case 1: + if(mProfileFragment != null) { + fragment = mProfileFragment; + break; + } default: - String formName = dialogOptions[position - 1]; // account for the base fragment + String formName = dialogOptions[position - offset]; // account for the base fragment DisplayFormFragment f = new DisplayFormFragment(); f.setFormName(formName); fragment = f; @@ -45,6 +60,11 @@ public Fragment getItem(int position) { @Override public int getCount() { - return dialogOptions.length + 1; // index 0 is always occupied by the base fragment + return dialogOptions.length + offset; // index 0 is always occupied by the base fragment + } + + public int offset() { + return offset; } -} + +} \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/res/layout/anak_register_autis.xml b/opensrp-sdidtk/src/main/res/layout/anak_register_autis.xml new file mode 100644 index 000000000..860e42ac4 --- /dev/null +++ b/opensrp-sdidtk/src/main/res/layout/anak_register_autis.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/res/layout/anak_register_birth.xml b/opensrp-sdidtk/src/main/res/layout/anak_register_birth.xml new file mode 100644 index 000000000..156f9ea6d --- /dev/null +++ b/opensrp-sdidtk/src/main/res/layout/anak_register_birth.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/res/layout/anak_register_hearing.xml b/opensrp-sdidtk/src/main/res/layout/anak_register_hearing.xml new file mode 100644 index 000000000..860e42ac4 --- /dev/null +++ b/opensrp-sdidtk/src/main/res/layout/anak_register_hearing.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/res/layout/anak_register_kpsp.xml b/opensrp-sdidtk/src/main/res/layout/anak_register_kpsp.xml new file mode 100644 index 000000000..860e42ac4 --- /dev/null +++ b/opensrp-sdidtk/src/main/res/layout/anak_register_kpsp.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/res/layout/anak_register_mental.xml b/opensrp-sdidtk/src/main/res/layout/anak_register_mental.xml new file mode 100644 index 000000000..860e42ac4 --- /dev/null +++ b/opensrp-sdidtk/src/main/res/layout/anak_register_mental.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/res/layout/anak_register_overview_service_mode_views.xml b/opensrp-sdidtk/src/main/res/layout/anak_register_overview_service_mode_views.xml new file mode 100644 index 000000000..1f045f017 --- /dev/null +++ b/opensrp-sdidtk/src/main/res/layout/anak_register_overview_service_mode_views.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/res/layout/smart_register_anak_client.xml b/opensrp-sdidtk/src/main/res/layout/smart_register_anak_client.xml new file mode 100644 index 000000000..7210dc18d --- /dev/null +++ b/opensrp-sdidtk/src/main/res/layout/smart_register_anak_client.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/res/layout/smart_register_child_client_profile.xml b/opensrp-sdidtk/src/main/res/layout/smart_register_child_client_profile.xml new file mode 100644 index 000000000..b3f198c1e --- /dev/null +++ b/opensrp-sdidtk/src/main/res/layout/smart_register_child_client_profile.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-sdidtk/src/main/res/values/strings.xml b/opensrp-sdidtk/src/main/res/values/strings.xml index 6064b9c99..c1a7f03fd 100644 --- a/opensrp-sdidtk/src/main/res/values/strings.xml +++ b/opensrp-sdidtk/src/main/res/values/strings.xml @@ -297,7 +297,7 @@ sam PNC Visit - Tanggal: + Tgl: Berat: Tinggi: Ling Kepala: