diff --git a/opensrp-bidan/.gitignore b/opensrp-bidan/.gitignore deleted file mode 100644 index 796b96d..0000000 --- a/opensrp-bidan/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/opensrp-bidan/build.gradle b/opensrp-bidan/build.gradle deleted file mode 100644 index 3405233..0000000 --- a/opensrp-bidan/build.gradle +++ /dev/null @@ -1,138 +0,0 @@ -buildscript { - repositories { - jcenter() - } - dependencies { - classpath "com.android.tools.build:gradle:1.2.3" - classpath 'org.robolectric:robolectric-gradle-plugin:1.1.0' - classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.1' - } -} - -allprojects { - repositories { - maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } - mavenLocal() - } -} - -apply plugin: 'com.android.application' -apply plugin: 'jacoco' -apply plugin: 'com.github.kt3k.coveralls' - -android { - compileSdkVersion 23 - buildToolsVersion "26.0.1" - - defaultConfig { - applicationId "org.ei.opensrp.gizi" - minSdkVersion 18 - targetSdkVersion 21 - versionCode 1 - versionName "1.0" - multiDexEnabled true - buildConfigField "long", "MAX_SERVER_TIME_DIFFERENCE", "1800000l" - buildConfigField "boolean", "TIME_CHECK", "false" - resValue "string", 'opensrp_url', '"http://46.101.51.199:8181/opensrp"' - } - - dexOptions { - incremental true - javaMaxHeapSize "4g" - } - - lintOptions { - lintConfig file("lint.xml") - abortOnError false - } - - buildTypes { - release { - minifyEnabled false - zipAlignEnabled true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - - debug { - testCoverageEnabled true - } - - } - packagingOptions { - exclude 'META-INF/DEPENDENCIES.txt' - exclude 'META-INF/LICENSE.txt' - exclude 'META-INF/NOTICE.txt' - exclude 'META-INF/NOTICE' - exclude 'META-INF/LICENSE' - exclude 'META-INF/DEPENDENCIES' - exclude 'META-INF/notice.txt' - exclude 'META-INF/license.txt' - exclude 'META-INF/dependencies.txt' - exclude 'META-INF/LGPL2.1' - exclude 'LICENSE.txt' - } - - testOptions { - unitTests.returnDefaultValues = true - } - - dexOptions { - incremental true - javaMaxHeapSize "4g" - } -} - -dependencies { - compile('org.smartregister:opensrp-client-core:1.0.0-SNAPSHOT@aar') { - transitive = true - exclude group: 'com.github.bmelnychuk', module: 'atv' - exclude group: 'com.google.guava', module: 'guava' - } - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:design:22.2.1' - - compile 'com.jjoe64:graphview:4.0.1' - compile 'com.google.code.gson:gson:2.8.2' - compile 'com.android.support:appcompat-v7:22.2.1' -// compile project(':json2view') - compile 'com.google.guava:guava:20.0' - - androidTestCompile 'junit:junit:4.12' - - testCompile 'junit:junit:4.12' - testCompile 'org.apache.maven:maven-ant-tasks:2.1.3' - testCompile('com.squareup:fest-android:1.0.8') { exclude module: 'support-v4' } - testCompile 'org.robolectric:robolectric:3.4.2' - testCompile "org.robolectric:shadows-multidex:3.4-rc2" - // PowerMock - def powerMockVersion = '1.7.3' - testCompile "org.powermock:powermock-module-junit4:$powerMockVersion" - testCompile "org.powermock:powermock-module-junit4-rule:$powerMockVersion" - testCompile "org.powermock:powermock-api-mockito2:$powerMockVersion" - testCompile("org.powermock:powermock-classloading-xstream:$powerMockVersion") -} - -task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebug']) { - - reports { - xml.enabled = true - html.enabled = true - } - - getReports().getXml().setDestination(file("${buildDir}/reports/jacoco/jacocoRootReport/merged.xml")) - getReports().getHtml().setDestination(file("${buildDir}/reports/jacoco/jacocoRootReport/html")) - - def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*', '**/*$ViewBinder*.*'] - def debugTree = fileTree(dir: "$project.buildDir/intermediates/classes/debug", excludes: fileFilter) - def mainSrc = "$project.projectDir/src/main/java" - - sourceDirectories = files([mainSrc]) - classDirectories = files([debugTree]) - executionData = fileTree(dir: project.buildDir, includes: [ - 'jacoco/testDebug.exec', 'outputs/code-coverage/connected/*coverage.ec' - ]) -} - -coveralls { - jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/merged.xml" -} diff --git a/opensrp-bidan/libs/FlurryAnalytics-6.0.0.jar b/opensrp-bidan/libs/FlurryAnalytics-6.0.0.jar deleted file mode 100644 index b53d8a5..0000000 Binary files a/opensrp-bidan/libs/FlurryAnalytics-6.0.0.jar and /dev/null differ diff --git a/opensrp-bidan/proguard-rules.pro b/opensrp-bidan/proguard-rules.pro deleted file mode 100644 index 8ecbe01..0000000 --- a/opensrp-bidan/proguard-rules.pro +++ /dev/null @@ -1,25 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Users/wildan/Library/Android/sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/opensrp-bidan/src/androidTest/java/org/smartregister/facialrecognition/sample/ApplicationTest.java b/opensrp-bidan/src/androidTest/java/org/smartregister/facialrecognition/sample/ApplicationTest.java deleted file mode 100644 index 89cf6df..0000000 --- a/opensrp-bidan/src/androidTest/java/org/smartregister/facialrecognition/sample/ApplicationTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.smartregister.facialrecognition.sample; - -import android.app.Application; -import android.test.ApplicationTestCase; - -public class ApplicationTest extends ApplicationTestCase{ - - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file diff --git a/opensrp-bidan/src/main/AndroidManifest.xml b/opensrp-bidan/src/main/AndroidManifest.xml deleted file mode 100644 index 8b14e3d..0000000 --- a/opensrp-bidan/src/main/AndroidManifest.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opensrp-bidan/src/main/assets/app.properties b/opensrp-bidan/src/main/assets/app.properties deleted file mode 100644 index db22fc0..0000000 --- a/opensrp-bidan/src/main/assets/app.properties +++ /dev/null @@ -1,4 +0,0 @@ -DRISHTI_BASE_URL=http://202.141.249.106:6806/opensrp -PORT=-1 -SHOULD_VERIFY_CERTIFICATE=false -SYNC_DOWNLOAD_BATCH_SIZE=100 \ No newline at end of file diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/BaseRegisterActivity.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/BaseRegisterActivity.java deleted file mode 100644 index 61d5793..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/BaseRegisterActivity.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.smartregister.bidan.activity; - -/** - * Created by sid on 10/15/17. - */ - -class BaseRegisterActivity { -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/BidanHomeActivity.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/BidanHomeActivity.java deleted file mode 100644 index e17df00..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/BidanHomeActivity.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.smartregister.bidan.activity; - -import org.smartregister.bidan.R; -import org.smartregister.bidan.lib.FlurryAgent; -import org.smartregister.view.activity.SecuredActivity; -import org.smartregister.view.fragment.DisplayFormFragment; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -import static com.flurry.android.FlurryAgent.logEvent; - -/** - * Created by sid on 10/15/17. - */ - -public class BidanHomeActivity extends SecuredActivity { - - SimpleDateFormat timer = new SimpleDateFormat("hh:mm:ss"); - - @Override - protected void onCreation() { - // Get Starting Time - String homeStart = timer.format(new Date()); - Map home = new HashMap<>(); - home.put("start", homeStart); - - logEvent("home_dashboard", home, true); - - setContentView(R.layout.smart_registers_home_bidan); - -// navigationController = new NavigationControllerINA(this, anmController, context()); -// setupViews(); -// initialize(); - - DisplayFormFragment.formInputErrorMessage = getResources().getString(R.string.forminputerror); - DisplayFormFragment.okMessage = getResources().getString(R.string.okforminputerror); - - } - - @Override - protected void onResumption() { - - } -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/LoginActivity.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/LoginActivity.java deleted file mode 100644 index 6fd0460..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/LoginActivity.java +++ /dev/null @@ -1,423 +0,0 @@ -package org.smartregister.bidan.activity; - -import android.app.Activity; -import android.app.AlertDialog; -import android.app.ProgressDialog; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.pm.ApplicationInfo; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import android.content.res.Resources; -import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.text.InputType; -import android.util.DisplayMetrics; -import android.view.KeyEvent; -import android.view.LayoutInflater; -import android.view.Menu; -import android.view.MenuItem; -import android.view.View; -import android.view.inputmethod.EditorInfo; -import android.view.inputmethod.InputMethodManager; -import android.widget.EditText; -import android.widget.ImageView; -import android.widget.TextView; - -import com.flurry.android.FlurryAgent; - -import org.smartregister.Context; -import org.smartregister.bidan.R; -import org.smartregister.bidan.application.BidanApplication; -import org.smartregister.domain.LoginResponse; -import org.smartregister.domain.Response; -import org.smartregister.domain.ResponseStatus; -import org.smartregister.event.Listener; -import org.smartregister.bidan.lib.ErrorReportingFacade; -import org.smartregister.repository.AllSharedPreferences; -import org.smartregister.sync.DrishtiSyncScheduler; -import org.smartregister.util.Log; -import org.smartregister.view.BackgroundAction; -import org.smartregister.view.LockingBackgroundTask; -import org.smartregister.view.ProgressIndicator; -import org.smartregister.bidan.activity.SettingsActivity; - -import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.Locale; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import util.uniqueIdGenerator.Generator; - -import static android.preference.PreferenceManager.getDefaultSharedPreferences; -import static android.view.inputmethod.InputMethodManager.HIDE_NOT_ALWAYS; -import static org.smartregister.domain.LoginResponse.NO_INTERNET_CONNECTIVITY; -import static org.smartregister.domain.LoginResponse.SUCCESS; -import static org.smartregister.domain.LoginResponse.UNAUTHORIZED; -import static org.smartregister.domain.LoginResponse.UNKNOWN_RESPONSE; -import static org.smartregister.util.Log.logError; -import static org.smartregister.util.Log.logVerbose; - -public class LoginActivity extends AppCompatActivity { - private Context context; - private EditText userNameEditText; - private EditText passwordEditText; - private ProgressDialog progressDialog; - public static final String ENGLISH_LOCALE = "en"; - public static final String KANNADA_LOCALE = "kn"; - public static final String BENGALI_LOCALE = "bn"; - public static final String BAHASA_LOCALE = "in"; - public static final String ENGLISH_LANGUAGE = "English"; - public static final String KANNADA_LANGUAGE = "Kannada"; - public static final String Bengali_LANGUAGE = "Bengali"; - public static final String Bahasa_LANGUAGE = "Bahasa"; - - public static Generator generator; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - logVerbose("Initializing ..."); - try{ - AllSharedPreferences allSharedPreferences = new AllSharedPreferences(getDefaultSharedPreferences(this)); - String preferredLocale = allSharedPreferences.fetchLanguagePreference(); - Resources res = getOpenSRPContext().applicationContext().getResources(); - // Change locale settings in the app. - DisplayMetrics dm = res.getDisplayMetrics(); - android.content.res.Configuration conf = res.getConfiguration(); - conf.locale = new Locale(preferredLocale); - res.updateConfiguration(conf, dm); - }catch(Exception e){ - - } - setContentView(R.layout.login); - - positionViews(); - - initializeLoginFields(); - initializeBuildDetails(); - setDoneActionHandlerOnPasswordField(); - initializeProgressDialog(); - setLanguage(); - -// debugApp(); - - } - - private void positionViews() { - ImageView loginglogo = (ImageView)findViewById(R.id.login_logo); - loginglogo.setImageDrawable(getResources().getDrawable(R.drawable.login_logo_bidan)); - context = Context.getInstance().updateApplicationContext(this.getApplicationContext()); -// getActionBar().setTitle(""); -// getActionBar().setIcon(getResources().getDrawable(R.mipmap.logo)); -// getActionBar().setBackgroundDrawable(getResources().getDrawable(R.color.action_bar_background)); - - } - - public static Context getOpenSRPContext() { - return BidanApplication.getInstance().context(); - } - - @Override - public boolean onCreateOptionsMenu(Menu menu) - { - // Inflate the menu; this adds items to the action bar if it is present. - menu.add("Settings"); - return true; - } - @Override - public boolean onOptionsItemSelected(MenuItem item) { - if(item.getTitle().toString().equalsIgnoreCase("Settings")){ - startActivity(new Intent(this, SettingsActivity.class)); - return true; - } - return super.onOptionsItemSelected(item); - } - - private void initializeBuildDetails() { - TextView buildDetailsTextView = (TextView) findViewById(org.smartregister.R.id.login_build); - try { - buildDetailsTextView.setText("Version " + getVersion() + ", Built on: " + getBuildDate()); - } catch (Exception e) { - logError("Error fetching build details: " + e); - } - } - - @Override - protected void onResume() { - super.onResume(); - - if (!context.IsUserLoggedOut()) { - goToHome(); - } - - fillUserIfExists(); - } - - public void login(final View view) { - hideKeyboard(); - view.setClickable(false); - - final String userName = userNameEditText.getText().toString(); - final String password = passwordEditText.getText().toString(); - - if (context.userService().hasARegisteredUser()) { - localLogin(view, userName, password); - } else { - remoteLogin(view, userName, password); - } - } - - private void initializeLoginFields() { - userNameEditText = ((EditText) findViewById(org.smartregister.R.id.login_userNameText)); - userNameEditText.setRawInputType(InputType.TYPE_CLASS_TEXT); - passwordEditText = ((EditText) findViewById(org.smartregister.R.id.login_passwordText)); - passwordEditText.setRawInputType(InputType.TYPE_CLASS_TEXT); - } - - private void setDoneActionHandlerOnPasswordField() { - passwordEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() { - @Override - public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { - if (actionId == EditorInfo.IME_ACTION_DONE) { - login(findViewById(R.id.login_loginButton)); - } - return false; - } - }); - } - - private void initializeProgressDialog() { - progressDialog = new ProgressDialog(this); - progressDialog.setCancelable(false); - progressDialog.setTitle(getString(org.smartregister.R.string.loggin_in_dialog_title)); - progressDialog.setMessage(getString(org.smartregister.R.string.loggin_in_dialog_message)); - } - - private void localLogin(View view, String userName, String password) { - if (context.userService().isValidLocalLogin(userName, password)) { - localLoginWith(userName, password); - // Tracking Error - ErrorReportingFacade.setUsername("", userName); - FlurryAgent.setUserId(userName); - } else { - showErrorDialog(getString(org.smartregister.R.string.login_failed_dialog_message)); - view.setClickable(true); - } - } - - private void remoteLogin(final View view, final String userName, final String password) { - tryRemoteLogin(userName, password, new Listener() { - public void onEvent(LoginResponse loginResponse) { - ErrorReportingFacade.setUsername("", userName); - FlurryAgent.setUserId(userName); - if (loginResponse == SUCCESS) { - remoteLoginWith(userName, password, loginResponse.payload()); - } else { - if (loginResponse == null) { - showErrorDialog("Login failed. Unknown reason. Try Again"); - } else { - if(loginResponse == NO_INTERNET_CONNECTIVITY){ - showErrorDialog(getResources().getString(R.string.no_internet_connectivity)); - }else if (loginResponse == UNKNOWN_RESPONSE){ - showErrorDialog(getResources().getString(R.string.unknown_response)); - }else if (loginResponse == UNAUTHORIZED){ - showErrorDialog(getResources().getString(R.string.unauthorized)); - } -// showErrorDialog(loginResponse.message()); - } - view.setClickable(true); - } - } - }); - -/* tryGetUniqueId(userName, password, new Listener() { - @Override - public void onEvent(ResponseStatus data) { - if (data == ResponseStatus.failure) { - logError("failed to fetch unique id"); - } - goToHome(); - } - });*/ - } - - private void showErrorDialog(String message) { - AlertDialog dialog = new AlertDialog.Builder(this) - .setTitle(getString(R.string.login_failed_dialog_title)) - .setMessage(message) - .setPositiveButton("OK", new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - } - }) - .create(); - dialog.show(); - } - - private void getLocation() { - tryGetLocation(new Listener>() { - @Override - public void onEvent(Response data) { - if (data.status() == ResponseStatus.success) { - context.userService().saveAnmLocation(data.payload()); - } - } - }); - } - - private void tryGetLocation(final Listener> afterGet) { - LockingBackgroundTask task = new LockingBackgroundTask(new ProgressIndicator() { - @Override - public void setVisible() { } - - @Override - public void setInvisible() { Log.logInfo("Successfully get location"); } - }); - - task.doActionInBackground(new BackgroundAction>() { - @Override - public Response actionToDoInBackgroundThread() { - return context.userService().getLocationInformation(); - } - - @Override - public void postExecuteInUIThread(Response result) { - afterGet.onEvent(result); - } - }); - } - - private void tryRemoteLogin(final String userName, final String password, final Listener afterLoginCheck) { - LockingBackgroundTask task = new LockingBackgroundTask(new ProgressIndicator() { - @Override - public void setVisible() { - progressDialog.show(); - } - - @Override - public void setInvisible() { - progressDialog.dismiss(); - } - }); - - task.doActionInBackground(new BackgroundAction() { - public LoginResponse actionToDoInBackgroundThread() { - return context.userService().isValidRemoteLogin(userName, password); - } - - public void postExecuteInUIThread(LoginResponse result) { - afterLoginCheck.onEvent(result); - } - }); - } - - private void fillUserIfExists() { - if (context.userService().hasARegisteredUser()) { - userNameEditText.setText(context.allSharedPreferences().fetchRegisteredANM()); - userNameEditText.setEnabled(false); - } - } - - private void hideKeyboard() { - InputMethodManager inputManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); - inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), HIDE_NOT_ALWAYS); - } - - private void localLoginWith(String userName, String password) { - context.userService().localLogin(userName, password); - LoginActivity.generator = new Generator(context, userName, password); - goToHome(); - DrishtiSyncScheduler.startOnlyIfConnectedToNetwork(getApplicationContext()); - } - - private void remoteLoginWith(String userName, String password, String userInfo) { - context.userService().remoteLogin(userName, password, userInfo); - LoginActivity.generator = new Generator(context, userName, password); - goToHome(); - DrishtiSyncScheduler.startOnlyIfConnectedToNetwork(getApplicationContext()); - } - - private void goToHome() { - startActivity(new Intent(this, BidanHomeActivity.class)); - finish(); - } - - private String getVersion() throws PackageManager.NameNotFoundException { - PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0); - return packageInfo.versionName; - } - - private String getBuildDate() throws PackageManager.NameNotFoundException, IOException { - ApplicationInfo applicationInfo = getPackageManager().getApplicationInfo(getPackageName(), 0); - ZipFile zf = new ZipFile(applicationInfo.sourceDir); - ZipEntry ze = zf.getEntry("classes.dex"); - return new SimpleDateFormat("dd MMM yyyy", Locale.getDefault()).format(new java.util.Date(ze.getTime())); - } - - public static void setLanguage(){ - AllSharedPreferences allSharedPreferences = new AllSharedPreferences(getDefaultSharedPreferences(Context.getInstance().applicationContext())); - String preferredLocale = allSharedPreferences.fetchLanguagePreference(); - Resources res = Context.getInstance().applicationContext().getResources(); - // Change locale settings in the app. - DisplayMetrics dm = res.getDisplayMetrics(); - android.content.res.Configuration conf = res.getConfiguration(); - conf.locale = new Locale(preferredLocale); - res.updateConfiguration(conf, dm); - - } - public static String switchLanguagePreference() { - AllSharedPreferences allSharedPreferences = new AllSharedPreferences(getDefaultSharedPreferences(Context.getInstance().applicationContext())); - - String preferredLocale = allSharedPreferences.fetchLanguagePreference(); - if (ENGLISH_LOCALE.equals(preferredLocale)) { - allSharedPreferences.saveLanguagePreference(BAHASA_LOCALE); - Resources res = Context.getInstance().applicationContext().getResources(); - // Change locale settings in the app. - DisplayMetrics dm = res.getDisplayMetrics(); - android.content.res.Configuration conf = res.getConfiguration(); - conf.locale = new Locale(BAHASA_LOCALE); - res.updateConfiguration(conf, dm); - return Bahasa_LANGUAGE; - } else { - allSharedPreferences.saveLanguagePreference(ENGLISH_LOCALE); - Resources res = Context.getInstance().applicationContext().getResources(); - // Change locale settings in the app. - DisplayMetrics dm = res.getDisplayMetrics(); - android.content.res.Configuration conf = res.getConfiguration(); - conf.locale = new Locale(ENGLISH_LOCALE); - res.updateConfiguration(conf, dm); - return ENGLISH_LANGUAGE; - } - } - - private void tryGetUniqueId(final String username, final String password, final Listener afterGetUniqueId) { - LockingBackgroundTask task = new LockingBackgroundTask(new ProgressIndicator() { - @Override - public void setVisible() { - progressDialog.show(); - } - @Override - public void setInvisible() { - progressDialog.dismiss(); - } - }); - - task.doActionInBackground(new BackgroundAction() { - @Override - public ResponseStatus actionToDoInBackgroundThread() { - LoginActivity.generator = new Generator(context,username,password); - LoginActivity.generator.uniqueIdService().syncUniqueIdFromServer(username, password); - return (LoginActivity.generator.uniqueIdService().getLastUsedId(username, password)); - } - - @Override - public void postExecuteInUIThread(ResponseStatus result) { - afterGetUniqueId.onEvent(result); - } - }); - } - -} - diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/MainActivity.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/MainActivity.java deleted file mode 100644 index c255b2e..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/MainActivity.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.smartregister.bidan.activity; - -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.Snackbar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; -import android.view.View; -import android.view.Menu; -import android.view.MenuItem; - -import org.smartregister.bidan.R; - - -/** - * Created by wildan on 9/14/17. - */ - -public class MainActivity extends AppCompatActivity { - - private static final String TAG = MainActivity.class.getSimpleName(); - private static final String DIALOG_TAG = "DIALOG_TAG_BLA"; - Long latestId; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); - setSupportActionBar(toolbar); - - FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); - fab.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) - .setAction("Action", null).show(); - } - }); - - FloatingActionButton fab_camera = (FloatingActionButton) findViewById(R.id.fab_cam); - - fab_camera.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - // Use SNAPDRAGON SDK -// SampleUtil.showCameraDialog(MainActivity.this, view, DIALOG_TAG); - - } - }); - } - - @Override - protected void onResume() { - super.onResume(); - } - - View.OnClickListener onclicklistener = new View.OnClickListener() { - - @Override - public void onClick(View v) { -// SampleUtil.showEditWeightDialog(MainActivity.this, finalI, DIALOG_TAG); - // Use SNAPDRAGON SDK - } - }; - - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - // Inflate the menu; this adds items to the action bar if it is present. - getMenuInflater().inflate(R.menu.menu_main, menu); - return true; - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - // Handle action bar item clicks here. The action bar will - // automatically handle clicks on the Home/Up button, so long - // as you specify a parent activity in AndroidManifest.xml. - int id = item.getItemId(); - - //noinspection SimplifiableIfStatement - if (id == R.id.action_settings) { - return true; - } - - return super.onOptionsItemSelected(item); - } - - - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { - super.onActivityResult(requestCode, resultCode, data); - if (requestCode==0 && resultCode== Activity.RESULT_OK){ - - } - } - - - - @Override - public boolean onSearchRequested() { - return super.onSearchRequested(); - } -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/SettingsActivity.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/SettingsActivity.java deleted file mode 100644 index cf414c0..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/activity/SettingsActivity.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.smartregister.bidan.activity; - -/** - * Created by sid on 10/16/17. - */ - -import android.content.SharedPreferences; -import android.os.Bundle; -import android.preference.EditTextPreference; -import android.preference.Preference; -import android.preference.PreferenceActivity; -import android.preference.PreferenceFragment; -import android.preference.PreferenceManager; - -import org.smartregister.repository.AllSharedPreferences; - -import java.net.MalformedURLException; -import java.net.URL; - -import static org.smartregister.util.Log.logError; -import static org.smartregister.util.Log.logInfo; - -import org.smartregister.bidan.R; - -public class SettingsActivity extends PreferenceActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - getFragmentManager().beginTransaction().replace(android.R.id.content, new MyPreferenceFragment()).commit(); - } - - - public static class MyPreferenceFragment extends PreferenceFragment { - @Override - public void onCreate(final Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - addPreferencesFromResource(R.xml.preferences); - - Preference baseUrlPreference = findPreference("DRISHTI_BASE_URL"); - if (baseUrlPreference != null) { - EditTextPreference baseUrlEditTextPreference = (EditTextPreference) baseUrlPreference; - baseUrlEditTextPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { - @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - if (newValue != null) { - updateUrl(newValue.toString()); - } - return true; - } - }); - } - } - - private void updateUrl(String baseUrl) { - try { - SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity()); - AllSharedPreferences allSharedPreferences = new AllSharedPreferences(preferences); - - URL url = new URL(baseUrl); - - String base = url.getProtocol() + "://" + url.getHost(); - int port = url.getPort(); - - logInfo("Base URL: " + base); - logInfo("Port: " + port); - - allSharedPreferences.saveHost(base); - allSharedPreferences.savePort(port); - - logInfo("Saved URL: " + allSharedPreferences.fetchHost("")); - logInfo("Port: " + allSharedPreferences.fetchPort(0)); - } catch (MalformedURLException e) { - logError("Malformed Url: " + baseUrl); - } - } - } - -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/application/BidanApplication.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/application/BidanApplication.java deleted file mode 100644 index 37b7bff..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/application/BidanApplication.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.smartregister.bidan.application; - -import android.util.Log; -import android.util.Pair; - -import org.smartregister.Context; -import org.smartregister.CoreLibrary; -import org.smartregister.bidan.repository.BidanRepository; -import org.smartregister.bidan.util.BidanConstants; -import org.smartregister.commonregistry.CommonFtsObject; -import org.smartregister.repository.Repository; -import org.smartregister.view.activity.DrishtiApplication; - -import java.util.Map; - -/** - * Created by wildan on 10/2/17. - */ - -public class BidanApplication extends DrishtiApplication { - - private static final String TAG = BidanApplication.class.getSimpleName(); - private static CommonFtsObject commonFtsObject; - private static Map> alertScheduleMap; - private static Context crashlyticsUser; - - public static Map> getAlertScheduleMap() { - return alertScheduleMap; - } - - public static void setCrashlyticsUser(Context crashlyticsUser) { - BidanApplication.crashlyticsUser = crashlyticsUser; - } - - @Override - public void onCreate() { - super.onCreate(); - - mInstance = this; - context = Context.getInstance(); - - context.updateApplicationContext(getApplicationContext()); - - // Init Module - CoreLibrary.init(context); - - } - - @Override - public void logoutCurrentUser() { - - } - - public static synchronized BidanApplication getInstance(){ - return (BidanApplication) mInstance; - } - - @Override - public Repository getRepository() { - try { - if (repository == null) - repository = new BidanRepository(getInstance().getApplicationContext(), context); - } catch (UnsatisfiedLinkError e){ - Log.e(TAG, "Error on getRepository: "+ e.getMessage() ); - } - return repository; - } - - private static String[] getFtsTables() { - return new String[]{BidanConstants.CHILD_TABLE_NAME, BidanConstants.MOTHER_TABLE_NAME}; - } - - public static CommonFtsObject createCommonFtsObject() { - if (commonFtsObject == null) { - commonFtsObject = new CommonFtsObject(getFtsTables()); - for (String ftsTable : commonFtsObject.getTables()) { - commonFtsObject.updateSearchFields(ftsTable, getFtsSearchFields(ftsTable)); - commonFtsObject.updateSortFields(ftsTable, getFtsSortFields(ftsTable)); - } - } - commonFtsObject.updateAlertScheduleMap(getAlertScheduleMap()); - return commonFtsObject; - } - - private static String[] getFtsSortFields(String ftsTable) { - return new String[0]; - } - - private static String[] getFtsSearchFields(String ftsTable) { - return new String[0]; - } - - public Context context() { - return context; - } -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/domain/UniqueId.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/domain/UniqueId.java deleted file mode 100644 index 0a8db4a..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/domain/UniqueId.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.smartregister.bidan.domain; - -import java.util.Date; - -/** - * Created by sid on 10/12/17. - */ - - -public class UniqueId { - private String id; - private String openmrsId; - private String status; - private String usedBy; - private Date createdAt; - private Date updatedAt; - - public UniqueId() { - } - - public UniqueId(String id, String openmrsId, String status, String usedBy, Date createdAt) { - this.id = id; - this.openmrsId = openmrsId; - this.status = status; - this.usedBy = usedBy; - this.createdAt = createdAt; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getOpenmrsId() { - return openmrsId; - } - - public void setOpenmrsId(String openmrsId) { - this.openmrsId = openmrsId; - } - - public String getUsedBy() { - return usedBy; - } - - public void setUsedBy(String usedBy) { - this.usedBy = usedBy; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public Date getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(Date createdAt) { - this.createdAt = createdAt; - } - - public Date getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(Date updatedAt) { - this.updatedAt = updatedAt; - } - -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/lib/ErrorReportingFacade.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/lib/ErrorReportingFacade.java deleted file mode 100644 index 28d1e95..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/lib/ErrorReportingFacade.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.smartregister.bidan.lib; - -import android.content.Context; - -import com.crashlytics.android.Crashlytics; -import io.fabric.sdk.android.Fabric; -/** - * Created by sid on 10/15/17. - */ - -public class ErrorReportingFacade { - - public static void initErrorHandler(Context context) { - Fabric.with(context, new Crashlytics()); - } - - public static void setUsername(String fullName, String userName) { - Crashlytics.setUserIdentifier(userName); - Crashlytics.setUserName(userName); - } -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/lib/FlurryAgent.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/lib/FlurryAgent.java deleted file mode 100644 index 0937de5..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/lib/FlurryAgent.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.smartregister.bidan.lib; - -/** - * Created by sid on 10/15/17. - */ - -public class FlurryAgent { - private static String userId; - - public static void setUserId(String userId) { - FlurryAgent.userId = userId; - } -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/repository/BidanRepository.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/repository/BidanRepository.java deleted file mode 100644 index 06a3203..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/repository/BidanRepository.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.smartregister.bidan.repository; - -import android.content.Context; - -import net.sqlcipher.database.SQLiteDatabase; - -import org.smartregister.bidan.application.BidanApplication; -import org.smartregister.bidan.util.BidanConstants; -import org.smartregister.repository.EventClientRepository; -import org.smartregister.repository.Repository; - -/** - * Created by sid on 10/12/17. - */ - -public class BidanRepository extends Repository { - - public BidanRepository(Context context, org.smartregister.Context opensrpContext) { - super(context, BidanConstants.DATABASE_NAME, BidanConstants.DATABASE_VERSION, opensrpContext.session(), BidanApplication.createCommonFtsObject(), opensrpContext.sharedRepositoriesArray()); - } - - @Override - public void onCreate(SQLiteDatabase database) { - super.onCreate(database); - EventClientRepository.createTable(database, EventClientRepository.Table.client, EventClientRepository.client_column.values()); - EventClientRepository.createTable(database, EventClientRepository.Table.address, EventClientRepository.address_column.values()); - EventClientRepository.createTable(database, EventClientRepository.Table.event, EventClientRepository.event_column.values()); - EventClientRepository.createTable(database, EventClientRepository.Table.obs, EventClientRepository.obs_column.values()); - UniqueIdRepository.createTable(database); -// WeightRepository.createTable(database); -// VaccineRepository.createTable(database); - onUpgrade(database, 1, BidanConstants.DATABASE_VERSION); - - } - - - -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/repository/UniqueIdRepository.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/repository/UniqueIdRepository.java deleted file mode 100644 index c3faa83..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/repository/UniqueIdRepository.java +++ /dev/null @@ -1,233 +0,0 @@ -package org.smartregister.bidan.repository; - -import android.content.ContentValues; -import android.database.Cursor; -import android.database.SQLException; -import android.util.Log; - -import net.sqlcipher.database.SQLiteDatabase; - -import org.smartregister.bidan.application.BidanApplication; -import org.smartregister.bidan.domain.UniqueId; -import org.smartregister.repository.BaseRepository; - -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class UniqueIdRepository extends BaseRepository { - private static final String TAG = UniqueIdRepository.class.getCanonicalName(); - private static final String UniqueIds_SQL = "CREATE TABLE unique_ids(_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,openmrs_id VARCHAR NOT NULL,status VARCHAR NULL, used_by VARCHAR NULL,synced_by VARCHAR NULL,created_at DATETIME NULL,updated_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP )"; - private static final String UniqueIds_TABLE_NAME = "unique_ids"; - private static final String ID_COLUMN = "_id"; - private static final String OPENMRS_ID_COLUMN = "openmrs_id"; - private static final String STATUS_COLUMN = "status"; - private static final String USED_BY_COLUMN = "used_by"; - private static final String SYNCED_BY_COLUMN = "synced_by"; - private static final String CREATED_AT_COLUMN = "created_at"; - private static final String UPDATED_AT_COLUMN = "updated_at"; - private static final String[] UniqueIds_TABLE_COLUMNS = {ID_COLUMN, OPENMRS_ID_COLUMN, STATUS_COLUMN, USED_BY_COLUMN, SYNCED_BY_COLUMN, CREATED_AT_COLUMN, UPDATED_AT_COLUMN}; - - private static final String STATUS_USED = "used"; - private static final String STATUS_NOT_USED = "not_used"; - private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - - - public UniqueIdRepository(BidanRepository bidanRepository) { - super(bidanRepository); - } - - protected static void createTable(SQLiteDatabase database) { - database.execSQL(UniqueIds_SQL); - } - - public void add(UniqueId uniqueId) { - SQLiteDatabase database = getWritableDatabase(); - database.insert(UniqueIds_TABLE_NAME, null, createValuesFor(uniqueId)); - //database.close(); - } - - /** - * inserts ids in bulk to the db in a transaction since normally, each time db.insert() is used, SQLite creates a transaction (and resulting journal file in the filesystem), which slows things down. - * - * @param ids - */ - public void bulkInserOpenmrsIds(List ids) { - SQLiteDatabase database = getWritableDatabase(); - - try { - String userName = BidanApplication.getInstance().context().allSharedPreferences().fetchRegisteredANM(); - - database.beginTransaction(); - for (String id : ids) { - ContentValues values = new ContentValues(); - values.put(OPENMRS_ID_COLUMN, id); - values.put(STATUS_COLUMN, STATUS_NOT_USED); - values.put(SYNCED_BY_COLUMN, userName); - values.put(CREATED_AT_COLUMN, dateFormat.format(new Date())); - database.insert(UniqueIds_TABLE_NAME, null, values); - } - database.setTransactionSuccessful(); - } catch (SQLException e) { - Log.e(TAG, e.getMessage(), e); - } finally { - database.endTransaction(); - } - } - - public Long countUnUsedIds() { - long count = 0; - Cursor cursor = null; - try { - cursor = getWritableDatabase().rawQuery("SELECT COUNT (*) FROM " + UniqueIds_TABLE_NAME + " WHERE " + STATUS_COLUMN + "=?", - new String[]{String.valueOf(STATUS_NOT_USED)}); - if (null != cursor && cursor.getCount() > 0) { - cursor.moveToFirst(); - count = cursor.getInt(0); - } - - } catch (SQLException e) { - Log.e(TAG, e.getMessage(), e); - } finally { - if (cursor != null) - cursor.close(); - } - return count; - } - - /** - * get next available unique id - * - * @return - */ - public UniqueId getNextUniqueId() { - UniqueId uniqueId = null; - Cursor cursor = null; - try { - cursor = getReadableDatabase().query(UniqueIds_TABLE_NAME, UniqueIds_TABLE_COLUMNS, STATUS_COLUMN + " = ?", new String[]{STATUS_NOT_USED}, null, null, CREATED_AT_COLUMN + " ASC", "1"); - List ids = readAll(cursor); - uniqueId = ids.isEmpty() ? null : ids.get(0); - } catch (Exception e) { - Log.e(TAG, e.getMessage(), e); - } finally { - if (cursor != null) { - cursor.close(); - } - } - return uniqueId; - } - - /** - * mark and openmrsid as used - * - * @param openmrsId - */ - public void close(String openmrsId) { - try { - String id; - String userName = BidanApplication.getInstance().context().allSharedPreferences().fetchRegisteredANM(); - if (!openmrsId.contains("-")) { - id = formatId(openmrsId); - } else { - id = openmrsId; - } - ContentValues values = new ContentValues(); - values.put(STATUS_COLUMN, STATUS_USED); - values.put(USED_BY_COLUMN, userName); - getWritableDatabase().update(UniqueIds_TABLE_NAME, values, OPENMRS_ID_COLUMN + " = ?", new String[]{id}); - } catch (Exception e) { - Log.e(TAG, e.getMessage(), e); - } - } - - /** - * mark and openmrsid as NOT used - * - * @param openmrsId - */ - public void open(String openmrsId) { - try { - if (!openmrsId.contains("-")) { - openmrsId = formatId(openmrsId); - } - ContentValues values = new ContentValues(); - values.put(STATUS_COLUMN, STATUS_NOT_USED); - values.put(USED_BY_COLUMN, ""); - getWritableDatabase().update(UniqueIds_TABLE_NAME, values, OPENMRS_ID_COLUMN + " = ?", new String[]{openmrsId}); - } catch (Exception e) { - Log.e(TAG, e.getMessage(), e); - } - } - - private String formatId(String openmrsId) { - int lastIndex = openmrsId.length() - 1; - String tail = openmrsId.substring(lastIndex); - return openmrsId.substring(0, lastIndex) + "-" + tail; - } - - private ContentValues createValuesFor(UniqueId uniqueId) { - ContentValues values = new ContentValues(); - values.put(ID_COLUMN, uniqueId.getId()); - values.put(OPENMRS_ID_COLUMN, uniqueId.getOpenmrsId()); - values.put(STATUS_COLUMN, uniqueId.getStatus()); - values.put(USED_BY_COLUMN, uniqueId.getUsedBy()); - values.put(CREATED_AT_COLUMN, dateFormat.format(uniqueId.getCreatedAt())); - return values; - } - - private List readAll(Cursor cursor) { - List UniqueIds = new ArrayList<>(); - if (cursor != null && cursor.getCount() > 0 && cursor.moveToFirst()) { - cursor.moveToFirst(); - while (cursor.getCount() > 0 && !cursor.isAfterLast()) { - - UniqueIds.add(new UniqueId(cursor.getString(0), cursor.getString(1), cursor.getString(2), cursor.getString(3), new Date(cursor.getLong(4)))); - - cursor.moveToNext(); - } - } - return UniqueIds; - } - - // TODO: By Marwan - public List getAllUniqueId() { -// android.database.sqlite.SQLiteDatabase database = this.getReadableDatabase(); -// Cursor cursor = database.rawQuery("SELECT id, " + ID_COLUMN + -// " FROM " + UniqueIds_TABLE_NAME, new String[]{}); -// cursor.moveToFirst(); - List uids = new ArrayList<>(); -// while(!cursor.isAfterLast()) { -// uids.add(cursor.getLong(1)); -// cursor.moveToNext(); -// } -// cursor.close(); - return uids; - } - - public List getAllUniqueIdString() { -// Cursor cursor = database.rawQuery("SELECT id, " + ID_COLUMN + -// " FROM " + UniqueIds_TABLE_NAME, new String[]{}); -// cursor.moveToFirst(); - List uids = new ArrayList<>(); -// while(!cursor.isAfterLast()) { -// uids.add(cursor.getString(1)); -// cursor.moveToNext(); -// } -// cursor.close(); - return uids; - } - - public void saveUniqueId(String uniqueId) { -// System.out.println("uniqueId on saveUniqueId method = "+uniqueId); -// if(Long.parseLong(uniqueId.substring(0,8))>Long.parseLong("20000000")) -// uniqueId = "10000000"; -// android.database.sqlite.SQLiteDatabase database = this.getWritableDatabase(); -// ContentValues values = new ContentValues(); -// values.put(ID_COLUMN, uniqueId); -// database.insert(UniqueIds_TABLE_NAME, null, values); - } - - - -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/util/BidanConstants.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/util/BidanConstants.java deleted file mode 100644 index 670b429..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/util/BidanConstants.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.smartregister.bidan.util; - -import org.smartregister.AllConstants; - -/** - * Created by sid on 10/12/17. - */ - -public class BidanConstants extends AllConstants { - - public static final String CHILD_TABLE_NAME = "ec_child"; - public static final String MOTHER_TABLE_NAME = "ec_mother"; - public static final String CURRENT_LOCATION_ID = "CURRENT_LOCATION_ID"; - - public static final boolean TIME_CHECK = true; -} diff --git a/opensrp-bidan/src/main/java/org/smartregister/bidan/view/LocationPickerView.java b/opensrp-bidan/src/main/java/org/smartregister/bidan/view/LocationPickerView.java deleted file mode 100644 index bf75504..0000000 --- a/opensrp-bidan/src/main/java/org/smartregister/bidan/view/LocationPickerView.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.smartregister.bidan.view; - -/** - * Created by sid on 10/15/17. - */ - -public class LocationPickerView { -} diff --git a/opensrp-bidan/src/main/java/util/uniqueIdGenerator/AllSettingsINA.java b/opensrp-bidan/src/main/java/util/uniqueIdGenerator/AllSettingsINA.java deleted file mode 100644 index 9c35717..0000000 --- a/opensrp-bidan/src/main/java/util/uniqueIdGenerator/AllSettingsINA.java +++ /dev/null @@ -1,35 +0,0 @@ -package util.uniqueIdGenerator; - -import org.smartregister.repository.AllSettings; -import org.smartregister.repository.AllSharedPreferences; -import org.smartregister.repository.SettingsRepository; - -/** - * Created by Dimas on 9/17/2015. - */ -public class AllSettingsINA extends AllSettings { - - private static final String LAST_USED_UNIQUE_ID = "lastUsedId"; - private static final String CURRENT_UNIQUE_ID = "currentUniqueId"; - - public AllSettingsINA(AllSharedPreferences preferences, SettingsRepository settingsRepository) { - super(preferences, settingsRepository); - } - - public void saveLastUsedId(String lastUsedId) { - settingsRepository.updateSetting(LAST_USED_UNIQUE_ID, lastUsedId); - } - - public String fetchLastUsedId() { - return settingsRepository.querySetting(LAST_USED_UNIQUE_ID, "0"); - } - - public void saveCurrentId(String currentId) { - settingsRepository.updateSetting(CURRENT_UNIQUE_ID, currentId); - } - - public String fetchCurrentId() { - return settingsRepository.querySetting(CURRENT_UNIQUE_ID, "0"); - } - -} \ No newline at end of file diff --git a/opensrp-bidan/src/main/java/util/uniqueIdGenerator/Generator.java b/opensrp-bidan/src/main/java/util/uniqueIdGenerator/Generator.java deleted file mode 100644 index a1ce400..0000000 --- a/opensrp-bidan/src/main/java/util/uniqueIdGenerator/Generator.java +++ /dev/null @@ -1,158 +0,0 @@ -package util.uniqueIdGenerator; - -import android.os.AsyncTask; -import android.util.Log; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.StatusLine; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.impl.client.DefaultHttpClient; -import org.smartregister.Context; -import org.smartregister.bidan.activity.LoginActivity; -import org.smartregister.bidan.application.BidanApplication; -import org.smartregister.bidan.repository.BidanRepository; -import org.smartregister.bidan.repository.UniqueIdRepository; -import org.smartregister.repository.SettingsRepository; -import org.smartregister.util.Cache; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.List; - -/** - * Created by Null on 2016-10-13. - */ -public class Generator { - private static final String TAG = Generator.class.getSimpleName(); - private UniqueIdRepository uniqueIdRepository; - private Cache> uIdsCache; - private AllSettingsINA allSettingsINA; - private UniqueIdController uniqueIdController; - private UniqueIdService uniqueIdService; - private Context context; - BidanApplication bidanApplication; - - private String url; - private String result; - public static final int UNIQUE_ID_LIMIT = 5; - public static final int UNIQUE_ID_LENGTH_REQUEST = 15; - - - public Generator(Context context, String username, String password){ - this.context = context; - // TODO - String DRISTHI_BASE_URL = context.configuration().dristhiBaseURL().replaceFirst("[^/]*$", "openmrs"); - url = DRISTHI_BASE_URL+ - "/module/idgen/exportIdentifiers.form?source=1"+ - "&numberToGenerate="+Integer.toString(UNIQUE_ID_LENGTH_REQUEST)+ - "&username="+username+ - "&password="+password; - } - public AllSettingsINA allSettingsINA() { - context.initRepository(); - if(allSettingsINA == null) - // TODO: check getSettingsRepository - allSettingsINA = new AllSettingsINA(context.allSharedPreferences(), new SettingsRepository()); - - return allSettingsINA; - } - public Cache> uIdsCache() { - if (uIdsCache == null) - uIdsCache = new Cache<>(); - return uIdsCache; - } - public UniqueIdRepository uniqueIdRepository() { - if(uniqueIdRepository==null) - uniqueIdRepository = new UniqueIdRepository((BidanRepository) bidanApplication.getRepository()); - return uniqueIdRepository; - } - public UniqueIdController uniqueIdController() { - if(uniqueIdController == null) - uniqueIdController = new UniqueIdController(uniqueIdRepository(), allSettingsINA(), uIdsCache()); - return uniqueIdController; - } - public UniqueIdService uniqueIdService() { - if (uniqueIdService == null) - uniqueIdService = new UniqueIdService(context.getHttpAgent(), context.configuration(), uniqueIdController(), allSettingsINA(), context.allSharedPreferences()); - return uniqueIdService; - } - - public void requestUniqueId(){ - try { - IdgenModuleAccessor module = new IdgenModuleAccessor(); - module.execute(); -// return new Response<>(module.getResult().equals("")?ResponseStatus.failure:ResponseStatus.success,module.getResult()); - }catch(Exception ex){ - ex.printStackTrace(); -// return new Response<>(ResponseStatus.failure,""); - } - } - - private String connectToOpenMRS() { - try { - StringBuilder builder = new StringBuilder(); - HttpClient client = new DefaultHttpClient(); - HttpGet httpGet = new HttpGet(url); - - httpGet.setHeader("Content-Type", "application/json"); - try { - HttpResponse response = client.execute(httpGet); - StatusLine statusLine = response.getStatusLine(); - int statusCode = statusLine.getStatusCode(); - if (statusCode == 200) { - HttpEntity entity = response.getEntity(); - InputStream content = entity.getContent(); - BufferedReader reader = new BufferedReader(new InputStreamReader(content)); - String line; - while ((line = reader.readLine()) != null) { - builder.append(line); - } - System.out.println("builder string = "+builder.toString()); - return builder.toString(); - } else { - Log.e("", "Failed to download file"); - } - } catch (ClientProtocolException e) { - System.out.println("failed !!! ClientProtocolException "); - e.printStackTrace(); - } catch (IOException e) { - System.out.println("Failed !!! IOException"); - e.printStackTrace(); - } - } catch (Exception e) { - Log.e("", e.getMessage()); - System.out.println("Failed !!!, Exception"); - } - return ""; - } - - private class IdgenModuleAccessor extends AsyncTask { - - @Override - protected String doInBackground(String... params) { - result = connectToOpenMRS(); - if(result.length()>1) - LoginActivity.generator.uniqueIdService().saveJsonResponseToUniqueId(result); - - return "Executed"; - } - - @Override - protected void onPostExecute(String result) { - - // might want to change "executed" for the returned string passed - // into onPostExecute() but that is upto you - } - - @Override - protected void onPreExecute() {} - - @Override - protected void onProgressUpdate(Void... values) {} - } -} diff --git a/opensrp-bidan/src/main/java/util/uniqueIdGenerator/UniqueIdController.java b/opensrp-bidan/src/main/java/util/uniqueIdGenerator/UniqueIdController.java deleted file mode 100644 index 2fa1cb5..0000000 --- a/opensrp-bidan/src/main/java/util/uniqueIdGenerator/UniqueIdController.java +++ /dev/null @@ -1,129 +0,0 @@ -package util.uniqueIdGenerator; - -import android.support.annotation.Nullable; - -import org.json.JSONException; -import org.json.JSONObject; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.smartregister.bidan.repository.UniqueIdRepository; -import org.smartregister.util.Cache; -import org.json.JSONException; -import org.json.JSONObject; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -/** - + * Created by Dimas on 9/8/2015. modified by Marwan on 23/11/2016 - + */ -public class UniqueIdController { - - private AllSettingsINA allSettings; - private UniqueIdRepository uniqueIdRepository; - private Cache> cache; - - public UniqueIdController(UniqueIdRepository uniqueIdRepository, AllSettingsINA allSettings, Cache> cache) { - this.uniqueIdRepository = uniqueIdRepository; - this.allSettings = allSettings; - this.cache = cache; - } - - public String getUniqueId() { - List uids = getAllUniqueId(); - List uidstring = getAllUniqueIdString(); - return processLatestUniqueId(uids,uidstring); - } - - public String getUniqueIdJson() { - String uniqueId = getUniqueId(); - if(uniqueId == null || uniqueId.isEmpty()) { - return null; - } - JSONObject obj = new JSONObject(); - try { - obj.put("unique_id", uniqueId); - } catch (JSONException e) { - e.printStackTrace(); - } - return obj.toString(); - } - - public void updateCurrentUniqueId(String id) { - Long ids = Long.parseLong(allSettings.fetchCurrentId()); - id = id.length()>8? id.substring(0,8) : id; - if((ids > 20000000) || (ids < Long.parseLong(id))) { - allSettings.saveCurrentId(id); - } - } - - public List getAllUniqueId() { - return uniqueIdRepository.getAllUniqueId(); - } - - public List getAllUniqueIdString() { - return uniqueIdRepository.getAllUniqueIdString(); - } - - public void saveUniqueId(String uniqueId) { - uniqueIdRepository.saveUniqueId(uniqueId); - } - - public boolean needToRefillUniqueId() { - List uids = getAllUniqueId(); - int currentId = Integer.parseInt(allSettings.fetchCurrentId()); - return uids==null || uids.isEmpty() || uids.get(uids.size()-15) < currentId; - } - - public boolean needToRefillUniqueId(int limit) { - List uids = getAllUniqueId(); - int currentId = Integer.parseInt(allSettings.fetchCurrentId()); - return uids==null || uids.isEmpty() || (uids.get(uids.size()-(limit+1) < 0 ? 0 : uids.size()-(limit+1)) <= currentId); - } - - public int countRemainingUniqueId(){ - List uids = getAllUniqueId(); - int currentId = Integer.parseInt(allSettings.fetchCurrentId())>200000000 - ? 10000000 : Integer.parseInt(allSettings.fetchCurrentId()); - return (uids.size()-1)- Collections.binarySearch(uids,new Long(currentId)); - } - - // Class for testing - public boolean needToRefillUniqueIdTest() { - List uids = uniqueIdRepository.getAllUniqueId(); - long currentId = Long.parseLong(allSettings.fetchCurrentId()); - return (uids.get(uids.size()-1)/10) - currentId <= uids.size()/4; - } - - public String getUniqueIdTest() { - List uids = uniqueIdRepository.getAllUniqueId(); - return processLatestUniqueId(uids); - } - - @Nullable - private String processLatestUniqueId(List uids) { - Long currentId = Long.parseLong(allSettings.fetchCurrentId()) > 20000000 ? 10000000 : Long.parseLong(allSettings.fetchCurrentId()); - if(uids == null || uids.isEmpty() || currentId > uids.get(uids.size()-1)) { - return null; - } - int index = Arrays.binarySearch(uids.toArray(), currentId); - if(index<-1) index = -1; - return index >= uids.size()-1 ? null : "" + String.valueOf(uids.get(index+1)); - } - - @Nullable - private String processLatestUniqueId(List uids,Listuidstring) { - Long currentId = Long.parseLong(allSettings.fetchCurrentId()) > 20000000 ? 10000000 : Long.parseLong(allSettings.fetchCurrentId()); - if(uids == null || uids.isEmpty() || currentId > uids.get(uids.size() - 1)) - return null; - int index = Arrays.binarySearch(uids.toArray(), currentId); - if(index<-1) index = -1; - return index >= uidstring.size()-1 ? null : "" + String.valueOf(uidstring.get(index+1)); - } - -} - diff --git a/opensrp-bidan/src/main/java/util/uniqueIdGenerator/UniqueIdService.java b/opensrp-bidan/src/main/java/util/uniqueIdGenerator/UniqueIdService.java deleted file mode 100644 index c82512b..0000000 --- a/opensrp-bidan/src/main/java/util/uniqueIdGenerator/UniqueIdService.java +++ /dev/null @@ -1,212 +0,0 @@ -package util.uniqueIdGenerator; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import static java.text.MessageFormat.format; -import org.smartregister.DristhiConfiguration; -import org.smartregister.domain.FetchStatus; -import org.smartregister.domain.Response; -import org.smartregister.domain.ResponseStatus; -import org.smartregister.bidan.activity.LoginActivity; -import org.smartregister.repository.AllSharedPreferences; -import org.smartregister.service.HTTPAgent; -import org.smartregister.sync.AdditionalSyncService; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import static java.text.MessageFormat.format; -import static org.smartregister.domain.FetchStatus.fetched; -import static org.smartregister.domain.FetchStatus.fetchedFailed; -import static org.smartregister.domain.FetchStatus.nothingFetched; -import static org.smartregister.domain.ResponseStatus.failure; -import static org.smartregister.util.Log.logDebug; -import static org.smartregister.util.Log.logError; -import static org.smartregister.util.Log.logInfo; -/** - * Created by sid on 10/16/17. - */ - - - -/** - * Created by Dimas on 9/7/2015. - */ -public class UniqueIdService implements AdditionalSyncService { - - public static final String UNIQUE_ID_PATH = "unique-id"; - public static final String LAST_USED_ID_PATH = "last-used-id"; - public static final String REFILL_UNIQUE_ID = "refill-unique-id"; - private final HTTPAgent httpAgent; - private DristhiConfiguration configuration; - private UniqueIdController uniqueIdController; - private AllSettingsINA allSettings; - private AllSharedPreferences allSharedPreferences; - - public UniqueIdService(HTTPAgent httpAgent, DristhiConfiguration configuration, - UniqueIdController uniqueIdController, AllSettingsINA allSettings, - AllSharedPreferences allSharedPreferences) { - this.httpAgent = httpAgent; - this.configuration = configuration; - this.uniqueIdController = uniqueIdController; - this.allSettings = allSettings; - this.allSharedPreferences = allSharedPreferences; - } - - public FetchStatus sync() { - FetchStatus dataStatus = nothingFetched; - int lastUsedId = Integer.parseInt(allSettings.fetchLastUsedId()); - int currentId = Integer.parseInt(allSettings.fetchCurrentId()); - - if (currentId > lastUsedId) { - lastUsedId = currentId; - pushLastUsedIdToServer(lastUsedId+ ""); - allSettings.saveLastUsedId(lastUsedId+ ""); - } else if (lastUsedId > currentId) { - currentId = lastUsedId; - allSettings.saveCurrentId(currentId+ ""); - } - - if (currentId == 0) { - ResponseStatus status = getLastUsedId(allSharedPreferences.fetchRegisteredANM(), allSettings.fetchANMPassword()); - if (status == ResponseStatus.success) { - dataStatus = fetched; - } - } - - if (uniqueIdController.needToRefillUniqueId()) { - dataStatus = refillUniqueId(); - } - - return dataStatus; - } - - public Response pullUniqueIdFromServer(String username, String password) { -// String baseURL = configuration.dristhiBaseURL(); - while (true) { - String uri = "http://118.91.130.18:8080/openmrs/module/idgen/exportIdentifiers.form?source=1&numberToGenerate="+Integer.toString(LoginActivity.generator.UNIQUE_ID_LENGTH_REQUEST)+"&username="+username+"&password="+password; - Response response = httpAgent.fetchWithCredentials(uri, username, password); - if (response.isFailure()) { - logError(format("Unique id pull failed")); - return new Response<>(failure, ""); - } - logDebug(format("Unique id fetched")); - return new Response<>(response.status(), response.payload() == null ? "" : response.payload()); - } - } - - public ResponseStatus getLastUsedId(String username, String password) { - String baseURL = configuration.dristhiBaseURL(); - while (true) { - String uri = format("{0}/{1}", - baseURL, - LAST_USED_ID_PATH); - Response response = httpAgent.fetchWithCredentials(uri, username, password); - if (response.isFailure()) { - logError(format("Last used id pull failed")); - return ResponseStatus.failure; - } else if (response.payload().isEmpty()) { - logError(format("Last used Id empty")); - return ResponseStatus.failure; - } - logDebug(format("Unique id fetched")); - - try { - JSONObject jsonObject = new JSONObject(response.payload()); - String lastUsedId = jsonObject.getString("lastUsedId"); - allSettings.saveLastUsedId(lastUsedId); - allSettings.saveCurrentId(lastUsedId); - } catch (JSONException e) { - e.printStackTrace(); - } - return ResponseStatus.success; - } - } - - public void pushLastUsedIdToServer(String lastUsedId) { - JSONObject json = new JSONObject(); - try { - json.put("lastUsedId", lastUsedId); - } catch (JSONException e) { - e.printStackTrace(); - return; - } - String jsonPayload = json.toString(); - Response response = httpAgent.post( - format("{0}/{1}", - configuration.dristhiBaseURL(), - LAST_USED_ID_PATH), - jsonPayload); - if (response.isFailure()) { - logError(format("Last used id sync failed. Unique Id: {0}", lastUsedId)); - return; - } - logInfo(format("Last used id sync successfully. Unique Id: {0}", lastUsedId)); - } - - public FetchStatus refillUniqueId() { - Response response = httpAgent.post( - format("{0}/{1}", - configuration.dristhiBaseURL(), - REFILL_UNIQUE_ID), ""); - if (response.isFailure()) { - logError(format("Refill unique id sync failed")); - return fetchedFailed; - } else { - String baseURL = configuration.dristhiBaseURL(); - while (true) { - String uri = format("{0}/{1}", - baseURL, - UNIQUE_ID_PATH); - Response refillResponse = httpAgent.fetch(uri); - System.out.println(refillResponse.toString()); - if (refillResponse.isFailure()) { - logError(format("Unique id pull failed")); - return fetchedFailed; - } - logDebug(format("Unique id fetched")); - saveJsonResponseToUniqueId(refillResponse.payload()); - return fetched; - } - } - - } - -// public void refillUniqueId(String username, String password){ -// this.syncUniqueIdFromServer(username,password); -// } -// -// public boolean uniqueIdReachLimit(int limit){ -// return uniqueIdController.needToRefillUniqueId(); -// } - - public void saveJsonResponseToUniqueId(String payload) { - if (payload != null) { - try { - JSONObject ids = new JSONObject(payload); - JSONArray uniqueId = ids.getJSONArray("identifiers"); - for (int i = 0; i < uniqueId.length(); i++) { - System.out.println("unique id "+i+", : "+uniqueId.getString(i)); - } - for (int i = 0; i < uniqueId.length(); i++) { - uniqueIdController.saveUniqueId(uniqueId.getString(i)); - } - } catch (JSONException e) { - e.printStackTrace(); - } - } - } - - public FetchStatus syncUniqueIdFromServer(String username, String password) { - Response uniqueIds = pullUniqueIdFromServer(username, password); - if (uniqueIds.isFailure()) { - return fetchedFailed; - } - if (uniqueIds.payload().isEmpty()) { - return nothingFetched; - } - saveJsonResponseToUniqueId(uniqueIds.payload()); - return fetched; - } - -} \ No newline at end of file diff --git a/opensrp-bidan/src/main/res/drawable/bg_texture_blue.png b/opensrp-bidan/src/main/res/drawable/bg_texture_blue.png deleted file mode 100644 index 39ab381..0000000 Binary files a/opensrp-bidan/src/main/res/drawable/bg_texture_blue.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/drawable/bidan_logo.png b/opensrp-bidan/src/main/res/drawable/bidan_logo.png deleted file mode 100644 index dcea566..0000000 Binary files a/opensrp-bidan/src/main/res/drawable/bidan_logo.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/drawable/login_logo_bidan.png b/opensrp-bidan/src/main/res/drawable/login_logo_bidan.png deleted file mode 100644 index 8b2319b..0000000 Binary files a/opensrp-bidan/src/main/res/drawable/login_logo_bidan.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/drawable/logo_bidan.png b/opensrp-bidan/src/main/res/drawable/logo_bidan.png deleted file mode 100644 index 5c8ba16..0000000 Binary files a/opensrp-bidan/src/main/res/drawable/logo_bidan.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/drawable/message_box.png b/opensrp-bidan/src/main/res/drawable/message_box.png deleted file mode 100644 index 434121a..0000000 Binary files a/opensrp-bidan/src/main/res/drawable/message_box.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/menu/menu_main.xml b/opensrp-bidan/src/main/res/menu/menu_main.xml deleted file mode 100644 index 25fb8ec..0000000 --- a/opensrp-bidan/src/main/res/menu/menu_main.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/opensrp-bidan/src/main/res/mipmap-hdpi/ic_launcher.png b/opensrp-bidan/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index cde69bc..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-hdpi/ic_launcher_round.png b/opensrp-bidan/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 9a078e3..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-hdpi/logo.png b/opensrp-bidan/src/main/res/mipmap-hdpi/logo.png deleted file mode 100644 index ac362e9..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-hdpi/logo.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/child_boy.png b/opensrp-bidan/src/main/res/mipmap-mdpi/child_boy.png deleted file mode 100644 index 7366434..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/child_boy.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/cross.png b/opensrp-bidan/src/main/res/mipmap-mdpi/cross.png deleted file mode 100644 index d85b845..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/cross.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/doneintime.png b/opensrp-bidan/src/main/res/mipmap-mdpi/doneintime.png deleted file mode 100644 index 9f85dda..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/doneintime.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/extended_is_child_of.png b/opensrp-bidan/src/main/res/mipmap-mdpi/extended_is_child_of.png deleted file mode 100644 index f7c5fb4..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/extended_is_child_of.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/flag_hrp.png b/opensrp-bidan/src/main/res/mipmap-mdpi/flag_hrp.png deleted file mode 100644 index b012895..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/flag_hrp.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/flag_vg.png b/opensrp-bidan/src/main/res/mipmap-mdpi/flag_vg.png deleted file mode 100644 index d5180ba..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/flag_vg.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/hhreg.png b/opensrp-bidan/src/main/res/mipmap-mdpi/hhreg.png deleted file mode 100644 index ceaf707..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/hhreg.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/household_profile.png b/opensrp-bidan/src/main/res/mipmap-mdpi/household_profile.png deleted file mode 100644 index 002ce0d..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/household_profile.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/household_profile_thumb.png b/opensrp-bidan/src/main/res/mipmap-mdpi/household_profile_thumb.png deleted file mode 100644 index f920b38..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/household_profile_thumb.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/householdload.png b/opensrp-bidan/src/main/res/mipmap-mdpi/householdload.png deleted file mode 100644 index c273652..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/householdload.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/ic_launcher.png b/opensrp-bidan/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index c133a0c..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/ic_launcher_round.png b/opensrp-bidan/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index efc028a..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_anc.png b/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_anc.png deleted file mode 100644 index 025516c..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_anc.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_child.png b/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_child.png deleted file mode 100644 index d962500..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_child.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_edd.png b/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_edd.png deleted file mode 100644 index b4618f2..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_edd.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_pnc.png b/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_pnc.png deleted file mode 100644 index 2a4acf1..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/icon_event_pnc.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/ischildof.png b/opensrp-bidan/src/main/res/mipmap-mdpi/ischildof.png deleted file mode 100644 index 9b03e9c..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/ischildof.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/login_header_logo.png b/opensrp-bidan/src/main/res/mipmap-mdpi/login_header_logo.png deleted file mode 100644 index 10bb18d..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/login_header_logo.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/login_logo.png b/opensrp-bidan/src/main/res/mipmap-mdpi/login_logo.png deleted file mode 100644 index 8e3de02..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/login_logo.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/logo.png b/opensrp-bidan/src/main/res/mipmap-mdpi/logo.png deleted file mode 100644 index ac362e9..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/logo.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/notdoneintime.png b/opensrp-bidan/src/main/res/mipmap-mdpi/notdoneintime.png deleted file mode 100644 index 494ae47..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/notdoneintime.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/register_hh.png b/opensrp-bidan/src/main/res/mipmap-mdpi/register_hh.png deleted file mode 100644 index 3396346..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/register_hh.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/station_icon.png b/opensrp-bidan/src/main/res/mipmap-mdpi/station_icon.png deleted file mode 100644 index a4b2856..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/station_icon.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/thermometer.png b/opensrp-bidan/src/main/res/mipmap-mdpi/thermometer.png deleted file mode 100644 index 7705204..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/thermometer.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/tutoria1.png b/opensrp-bidan/src/main/res/mipmap-mdpi/tutoria1.png deleted file mode 100644 index 7c4e015..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/tutoria1.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial1bangla.png b/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial1bangla.png deleted file mode 100644 index 2dcd94a..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial1bangla.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial2.png b/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial2.png deleted file mode 100644 index 99de387..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial2.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial2bangla.png b/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial2bangla.png deleted file mode 100644 index 4d567e6..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial2bangla.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial3.png b/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial3.png deleted file mode 100644 index d35972f..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/tutorial3.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/tutorialbangla3.png b/opensrp-bidan/src/main/res/mipmap-mdpi/tutorialbangla3.png deleted file mode 100644 index 3e549f6..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/tutorialbangla3.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/warning.png b/opensrp-bidan/src/main/res/mipmap-mdpi/warning.png deleted file mode 100644 index cca5db8..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/warning.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/warningdetailcapture.png b/opensrp-bidan/src/main/res/mipmap-mdpi/warningdetailcapture.png deleted file mode 100644 index 0707944..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/warningdetailcapture.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/woman_placeholder.png b/opensrp-bidan/src/main/res/mipmap-mdpi/woman_placeholder.png deleted file mode 100644 index 9b47b5a..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/woman_placeholder.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-mdpi/womanimageload.png b/opensrp-bidan/src/main/res/mipmap-mdpi/womanimageload.png deleted file mode 100644 index 0a6d9d7..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-mdpi/womanimageload.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-xhdpi/ic_launcher.png b/opensrp-bidan/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index bfa42f0..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/opensrp-bidan/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 3af2608..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-xhdpi/info.png b/opensrp-bidan/src/main/res/mipmap-xhdpi/info.png deleted file mode 100644 index d683829..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-xhdpi/info.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-xhdpi/logo.png b/opensrp-bidan/src/main/res/mipmap-xhdpi/logo.png deleted file mode 100644 index ac362e9..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-xhdpi/logo.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-xxhdpi/ic_launcher.png b/opensrp-bidan/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 324e72c..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/opensrp-bidan/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 9bec2e6..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-xxhdpi/logo.png b/opensrp-bidan/src/main/res/mipmap-xxhdpi/logo.png deleted file mode 100644 index ac362e9..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-xxhdpi/logo.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-xxxhdpi/child_girl.png b/opensrp-bidan/src/main/res/mipmap-xxxhdpi/child_girl.png deleted file mode 100644 index 75ed5a7..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-xxxhdpi/child_girl.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/opensrp-bidan/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index aee44e1..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/opensrp-bidan/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 34947cd..0000000 Binary files a/opensrp-bidan/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/opensrp-bidan/src/main/res/values-in/strings.xml b/opensrp-bidan/src/main/res/values-in/strings.xml deleted file mode 100644 index 58dc740..0000000 --- a/opensrp-bidan/src/main/res/values-in/strings.xml +++ /dev/null @@ -1,485 +0,0 @@ - - - - Masukan user name - Masukan kata kunci - Log Masuk - logo - spacer - Memuat… - Tolong tunggu - Log masuk gagal - Tolong cek masukan, apa sudah benar - - Apa kamu yakin untuk kembali? Semua data yang telah dimasukan di form ini akan di hapus. - - Konfirmasi penutupan form - Iya - Tidak - ANC Ke:  - PNC Visit - Nama (Z ke A) - Umur - EC Number - Tanggal Persalinan - SC - ST - Prioritas Tinggi (PT) - HRP - BPL - Dusun - Nama (A ke Z) - Resiko Tinggi (RT) - No Ibu - Hari Tafsiran Persalinan (HTP) - Keluarga Berencana (KB) - - Nama - No Ec. - GPLSA - Metode FP - Anak - Status - - - ANAK - Nama - Tgl Periksa - HTP - Kunjungan - No Ibu - STATUS - OBSETRI - - Kartu Ibu - KB - Cari - - Semua Eligible Couples - Cari EC Register - Cari FP Register - Cari PNC Register - Cari Child Register - Diurutkan Berdasar: - , Dusun: - ({0}) - - Laki\n{0} - Perempuan\n{0} - Tidak ada FP - - Kelahiran: - LMP: - EDD: - ANC - PNC - FP - No. strips: - No. Given: - G - P - L - S - A - - Semua - O/A - L/P - EC: - KI - KB - - Daftar ANC - Daftar KB - Dokumentasi Persalinan - Rencana Persalinan - - Daftar PNC - Register KB - Register Child - FP Change - Change FP - Record ECP - Edit EC - Close EC - 26/03 - 25/04 - Ubah Bahasa - Edit Kartu Ibu - Tutup Kartu Ibu - Update KB - Edit KB - Tutup KB - - - Register Anak - Tutup Anak - Imunisasi Bayi - Edit Anak - Kunjungan Bayi - Kunjungan Balita - Kunjungan Neonatal - KUNJ NEONATAL - Kunjungan - Edit ANC - Edit PNC - PNC Visit - Postpartum KB - Tanggal Lahir : - - - Resiko - Trimester - Imunisasi - Usia Klinis - Komplikasi - Kondisi - Dok Persalinan - Tanda Vital - Pemeriksaan - - Riwayat Kunjungan - Persalinan Di - Tidak bisa memutar video. - Tidak bisa memutar video dikarenakan kesalahan teknis. - Mohon pasang aplikasi IEC untuk memutar video. - Efek Samping - Tutup PNC - "HTP: " - - Kontrasepsi - Pelayanan - Metode - Faktor Risk - Tanggal Lahir - Tgl Lahir - Dok Prsalinan - - Bidan - - Eligible Couple - FP - ANC - PNC - Child - Reporting - Register - Videos - - Confirm Log out - Are you sure you want to log out? All the data will be - cleared. - - forms unsynced - - "Next >>" - "<< Previous" - Page {0} of {1} - - Gravida - Parity - Abortus - Alive - - (O/A) - - Kunjungan ANC - Hb Test - IFA - TT - Delivery Plan - PNC Registration - ANC Investigations - Kartu Partograf - Tutup ANC - - Reporting - Videos - - Anak - Overview - Imunisasi - Imunisasi 0-9 - Imunisasi 9+ - ID NO - SICK STATUS - BCG - HEP B BIRTH - OPV - PENTAVALENT - MEASLES - OPV BOOSTER - DPT BOOSTER - VITAMIN A - Thayi: - Mother EC: - Age - HR - Child Immunizations - Child Illness - Child Close - Vitamin A - PNC - Pentavalent 2 - BCG - Pentavalent 3 - Pentavalent 1 - OPV 0 - OPV 1 - OPV 2 - OPV 3 - DPT Boost. 1 - DPT Boost. 2 - OPV Boost - Measles - Measles Booster - Measles B - Hep B - JE - MMR - Vitamin A - Illness Visit - - Sick Visit - Illness Report: %s - Date: - BCG - Pada - Hep B - OPV - TT - IFA - Pentavalent - Measles - OPV Booster - DPT Booster - Vitamin A - Pentav 1 - Pentav 2 - Pentav 3 - DPT B1 - DPT B2 - Pentav - STATUS - - FP - PNC - SIDE EFFECTS - FOLLOW UP/REFILL - RISKS - Condom - DMPA/Injectable - IUCD - OCP - Female Sterilization - Male Sterilization - Others - - ECP - Traditional Methods - LAM - Centchroman - None - PS - None - SS - - All EC - High Priority (HP) - 2+ Children - 1 Child - Anak - "Due " - Jenis:  - FP Prioritization - Add FP - FP Videos - - THAYI NO. - DELIVERY INFO - COMPLICATIONS - PP FP - Anak -   Hari Lagi - FIRST 7 DAYS - PNC VISITS - Overview - PNC Visits - PNC Visit - Postpartum family planning - Referred - referral - follow-up - refill - Update - ANC: - Hb Test - day (s) past due - LMP: -  Minggu - ANC - BP - Berat - Search ANC Register - Overview - ANC Visits - TT - Hb/IFA - Delivery Plan - " g/dl - " Tablets - ID - ANC STATUS - PLAN - UPDATE REFILL - ANC1 - ANC2 - ANC3 - ANC4 - Other - VISITS - TT - TT 1 - TT 2 - TT Booster - IFA - HB - DELIVERY PLAN - Transport: - Has companion: - Asha: - Contact: - Risks reviewed: - Tgl: - Place: - Type: - PP FP - Wt: %1$s kg - PNC - expected - actual - done - missed - yellow - green - red - ari - sam - PNC Visit - Hb - BCG/Pol1 - DPT/HB1/Pol2 - DPT/HB2/Pol3 - DPT/HB3/Pol4 - Campak - "Pilih nama lagi" - "Bidan" - Daftar resiko yang dimiliki - Daftar resiko yang dimiliki - Resiko - - Lihat lebih... - Sembunyikan . . . - Ibu sudah terdaftar di ANC - Ibu sudah terdaftar di PNC - Kunjungan ANC Integrasi - Kunjungan ANC Tes Lab - bulan lagi - bulan ini - sudah melahirkan - Berat Badan: - LILA: - - HTP: - Tempat: - Tipe: - Ibu - Anak - Tgl Lahir: - Tmpt: - B.Lahir: - Tgl Kunj.: - ANAK - KOHORT IBU - KOHORT KB - - Nama Ibu:  - Nama Ayah:  - Status Pelayanan: ANC - Status Pelayanan: PNC - Kunjungan Ke:  - Tgl Kunj:  - NAMA:   - NIK:  - Nama Suami:  - Tanggal Lahir:   - No HP:  - - - Informasi Dasar - Resiko - DesaDusun - Dusun - Umur - Alamat Domisili - Pendidikan - Agama - Pekerjaan - Gakin - Asuransi - Golongan Darah - - - Ibu Terlalu Muda:   - Ibu Terlalu Tua:   - Kekurangan Energi Kronis:   - Riwayat Abortus:   - Riwayat Cesar:   - Ringkasan Resiko: - Resiko TInggi HIV/AIDS - Resiko Tinggi STIBBVs - Resiko TInggi Ectopic Kehamilan - Penyakit jantung Rekam - Gangguan ginjal - Gangguan jantung - Asthma - Tuberculosis - Resiko Tinggi Malaria - Resiko Tinggi Kehamilan PIH - Resiko Tinggi Kehamilan Diabetes - Resiko Tinggi Kehamilan Anemia - Resiko Tinggi persalinan Malpresentasi Janin - Resiko Tinggi persalinan Besar Janin - Resiko Tinggi persalinan Jumlah Janin - Resiko Tinggi persalinan TB - Resiko Tinggi persalinan Banyak Anak - Resiko Tinggi Post Partum Forceps - Resiko Tinggi PostPartum Vacum - Resiko Tinggi PostPartum PreEclampsia/ Eclampsia - Resiko Tinggi PostPartum Maternal Sepsis - Resiko Tinggi Infeksi PostPartum - Resiko Tinggi PostPartum Hemorrhage - Resiko Tinggi PostPartum PIH - Resiko Tinggi PostPartum Distosia - Resiko Tinggi PostPartum Sectio Caesaria - Resiko Tinggi PostPartum Sectio Caesaria - Jenis Kontrasepsi - Systolic - Diastolic - ALKI /HB - ALKI / LILA - ALKI / Penyakit Kronis - ALKI /Ims - Keterangan tentang peserta KB - Keterangan Ganti Cara - Ringkasan - Usia Klinis: - STATUS KLINIS - Tinggi: - Bln - Status Pelayanan: KB - Tgl Persalinan: - HTP sudah lewat - FE: - - Status Gizi: - Mother already registered - kia-report.sid-indonesia.org/login/auth - diff --git a/opensrp-bidan/src/main/res/values/colors.xml b/opensrp-bidan/src/main/res/values/colors.xml deleted file mode 100644 index 6a09f52..0000000 --- a/opensrp-bidan/src/main/res/values/colors.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - #3F51B5 - #303F9F - #FF4081 - - #FFF - - #1a93d2 - - #d9d9d9 - #494949 - #f5f5f5 - #333333 - #389cc8 - #e6e6e6 - #389cc8 - #004C99 - #EEB4B4 - #44ffffff - #44389cc8 - #bb389cc8 - #1a1a1a - #494949 - - #cae2ed - #F04646 - #389cc8 - #25aa4a - #FFBB04 - - #f5f5f5 - - #EDCA00 - #d13f3f - #25aa4a - - #43ae23 - #d13f3f - #edca00 - - #2b475e - - #4fb45b - diff --git a/opensrp-bidan/src/main/res/values/dimens.xml b/opensrp-bidan/src/main/res/values/dimens.xml deleted file mode 100644 index 7f22123..0000000 --- a/opensrp-bidan/src/main/res/values/dimens.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 16dp - 16dp - 16dp - - 2dp - 3dp - 14sp - 10dp - - diff --git a/opensrp-bidan/src/main/res/values/strings.xml b/opensrp-bidan/src/main/res/values/strings.xml deleted file mode 100644 index c6dd422..0000000 --- a/opensrp-bidan/src/main/res/values/strings.xml +++ /dev/null @@ -1,648 +0,0 @@ - - - Bidan OpenSRP OS - Enter user name - Enter password - Log In - logo - spacer - Logging in… - Please wait - Log in failed - Please check the credentials - Are you sure you want to go back? - Confirm form close - Yes - No - Household - ELCO - FP - ANC - PNC - Child - Reporting - Register - Videos - CHILD - Name - Check Date - EDD - VISIT - No Ibu - STATUS - OBSETRI - Weight: - EXAMINATION - Risk - Cannot play video. - Please install IEC application to play the videos. - - - Age - Unable to play video due to technical error. - Confirm Log out - Are you sure you want to log out? All the data will be - cleared. - - forms unsynced - Kunjungan ANC Integrasi - Kunjungan ANC Tes Lab - Rencana Persalinan - Daftar PNC - Edit ANC - Edit PNC - PNC Visit - Postpartum KB - "Next >>" - "<< Previous" - Page {0} of {1} - - - Mother already registered in ANC - Mother already registered in PNC - VISIT HISTORY - NAME - EC NO. - GPLSA - FP METHOD - CHILDREN - STATUS - - - All Eligible Couples - Search - Search FP Register - Search PNC Register - Search - Sorted By: - , Filtered By: - ({0}) - KI - Male\n{0} - Female\n{0} - No FP - - Delivery: - LMP: - EDD: - ANC - PNC - FP - No. strips: - No. Given: - G - P - L - S - A - - (O/A) - - Name (A to Z) - EC Number - Date of Delivery - SC - ST - HighPriority (HP) - HRP - HighRisk (HR) - BPL - - All - O/A - L/P - ELCO - - Register ANC - Register FP - Register Child - FP Change - Change FP - Record ECP - Edit EC - Close EC - 26/03 - 25/04 - Switch Language - - ANC Visit - Hb Test - IFA - TT - Delivery Plan - PNC Registration - ANC Investigations - ANC Close - - Reporting - Videos - - Child - Overview - Immunization 0-9 - Immunization 9+ - ID NO - DOB - SICK STATUS - LAST SERVICE - BCG - HEP B BIRTH - OPV - PENTAVALENT - MEASLES - OPV BOOSTER - DPT BOOSTER - VITAMIN A - Thayi: - Mother EC: - Age - HR - Child Immunizations - Child Illness - Child Close - Vitamin A - PNC - Pentavalent 2 - BCG - Pentavalent 3 - Pentavalent 1 - OPV 0 - OPV 1 - OPV 2 - OPV 3 - DPT Boost. 1 - DPT Boost. 2 - OPV Boost - Measles - Measles Booster - Measles B - Hep B - JE - MMR - Vitamin A - Illness Visit - - Sick Visit - Illness Report: %s - Date: - BCG - On - Hep B - OPV - TT - IFA - Pentavalent - Measles - OPV Booster - DPT Booster - Vitamin A - Pentav 1 - Pentav 2 - Pentav 3 - DPT B1 - DPT B2 - Pentav - - FP - PNC - METHOD - SIDE EFFECTS - FOLLOW UP/REFILL - RISKS - All Methods - Condom - DMPA/Injectable - IUCD - OCP - Female Sterilization - Male Sterilization - Others - - ECP - Traditional Methods - LAM - Centchroman - None - PS - None - SS - - All EC - HighPriority (HP) - 2+ Children - 1 Child - Child - "Due " - FP Methods: - FP Prioritization - Add FP - FP Videos - UPDATE REFILL - THAYI NO. - DELIVERY INFO - COMPLICATIONS - PP FP - CHILD -   DAYS - FIRST 7 DAYS - PNC VISITS - CONTRACEPTION - Overview - PNC Visits - KB - PNC Visit - Postpartum family planning - PNC Close - - Referred - referral - follow-up - refill - Update - Side Effects - - ANC - Hb Test - "EDD: " - day (s) past due - LMP: -  weeks - ANC - BP - Wt. - Search ANC Register - Overview - ANC Visits - TT - Hb/IFA - Delivery Plan - " g/dl - " Tablets - ID - ANC STATUS - RISK FACTORS - ANC1 - ANC2 - ANC3 - ANC4 - Other - VISITS - TT - TT 1 - TT 2 - TT Booster - IFA - HB - DELIVERY PLAN - Delivery At - Transport: - Has companion: - Asha: - Contact: - Risks reviewed: - EDD - - Mother Number - Date: - Place: - Type: - PP FP - Wt: %1$s kg - DOB: - - PNC - expected - actual - done - missed - yellow - green - red - ari - sam - PNC Visit - - - - - - - - - PROFILE - NO. OF ELCO - Last Visit:  - HH VISIT DUE DATE - OTHER INHABITANTS - HH Details - All Household Entries - HH - - PROFILE - UNIQUE ID - LMP - PSRF DUE DATE - Filtered By: - Alphabetical (HoH Name) - HHID - Government - HHID - JiVitA - Due - Search - No ELCO - Has one or more ELCO - Search - ELCO Details - Summary - Registration Date - Last PSF Date - All Eligible Couples - HHID - Government: - HHID - JiVitA: - BRID: - Husband Name: - Age: - HHID-JiVitA: - HHID-Government: - Mauza: - Alphabetical (Woman name) - BNF DUE - ANC STATUS - EDD & GA - ANC DUE - Take Picture \n NID/BRID - Census New Woman Registration Form - Pregnancy Surveillance And Registration Form - All Pregnant Women - History - ANC Details - NBNF FORM - ANC visit 4 form - ANC visit 3 Form - ANC Visit 2 Form - ANC Visit 1 Form - ANC - Please check the credentials - login failed. Try later - No internet connection. Please ensure data connectivity - Please check the form for any error/missing input marked in Red box - ok - OUTCOME - DATE of OUTCOME - Date of Outcome - PNC STATUS - PNC DUE - PNC - Live Birth - Still Birth - Postnatal Women - PNC visit 3 form - PNC visit 2 form - PNC visit 1 form - DOB - ENCC STATUS - ENCC DUE - MOTHER\'S UNIQUE ID - Child - ENCC Visit Form 3 - ENCC Visit Form 2 - ENCC Visit Form 1 - NID: - LMP - ANCRV-1 - ANCRV-2 - ANCRV-3 - ANCRV-4 - PNCRV-1 - PNCRV-2 - PNCRV-3 - ENCC-1 - ENCC-2 - ENCC-3 - PNC Details - Father\'s name:  - Normal Birth - Caeserian Section - Don\'t Know - Child Details - MIS ELCO form - MIS ELCO DUE - MIS Census Form - MIS Census - Pregnancy Outcome - Type of Delivery - Date of Birth : - Mother\'s Name:  - Date of Outcome - Gravida - Parity - Abortus - Alive - Update KB - Edit KB - Tutup KB - KB - Tanggal: - ANC Ke: - Kunjungan Ke: - PLAN - - COMPLICATION - - CONTRACEPTION - VITAL SIGN - Place: - Type: - Mother - CHILD - DOB: - DELIVERY DOCUMENTATION - STATUS - B.Place: - Visit Date: - B.Weight: - KF: - Neonatal Visit - NEONATAL VISIT - Edit Child - Baby Visit - Toddler Visit - Height: - Service Status: ANC - Service Status: PNC - ANC Number:  - Visit Number:  - NAME:  - NIK:  - Husband Name:   - DOB:  - Phone Number:   - - - Basic Information - Risk - Village - Sub Village - Address - Education - Religion - Job - Poor Household - Insurance - Blood Type - Show More Risks . . . - - Pregnancy Young Maternal Age:   - Pregnancy Young Maternal Age:   - Pregnancy Protein Energy Malnutrition:   - Pregnancy Abortus:   - Labour Section Cesarea Record:   - - Risk Summary: - - HighRisk HIV/AIDS - HighRisk STIBBVs - HighRisk Ectopic Pregnancy - Cardiovascular Disease Record - Kidney Disorder - Heart Disorder - Asthma - Tuberculosis - HighRisk Malaria - HighRisk Pregnancy PIH - HighRisk Pregnancy Diabetes - HighRisk Pregnancy Anemia - HighRisk Labour Fetus Malpresentation - HighRisk Labour Fetus Size - HighRisk Labour Fetus Number - High Risk Labour TB - High Risk Pregnancy Too Many Children - high Risk Post Partum Forceps - High Risk PostPartum Vacum - High Risk PostPartum PreEclampsia/ Eclampsia - High Risk PostPartum Maternal Sepsis - High Risk PostPartum Infection - high Risk PostPartum Hemorrhage - High Risk PostPartum PIH - High Risk PostPartum Distosia - High Risk PostPartum Sectio Caesaria - Show Less . . . - highRisk PostPartum Sectio Caesaria - Contraception - Systolic - Diastolic - ALKI /HB - ALKI / LILA - ALKI / Cronical Disease - ALKI /Ims - FP Note - Change FP - Clinical Status - Clinical Age:  - CLINCAL STATUS - Date Of Birth - months away - this month - delivered - Month - Service Status: FP - Delivery Date:  - EDD Passed - FE: - Nutrition Status: - MUAC: - Mother already registered - PNC Visit - - - Photo Confirmation - Approval Desc - Trash Description - - yrs - mth - hrs - Kg - Cm - Month - CHILD GROWTH CHART - Length for Age - Height for Age - - - - M 50,50 - m -48,0 - a 48,48 0 1,0 96,0 - a 48,48 0 1,0 -96,0 - - - - - M 35,40 - m -7,0 - a 7,7 0 1,0 14,0 - a 7,7 0 1,0 -14,0 - - - M 65,40 - m -7,0 - a 7,7 0 1,0 14,0 - a 7,7 0 1,0 -14,0 - - - M 30,75 - Q 50,55 70,75 - - - M 30,65 - Q 50,85 70,65 - - Check Cross - Reset Album - Settings - No. HP : - kia-report.sid-indonesia.org/login/auth - - Sistole - Diastole - - ABI - AM3 - AM3S - AM4 - BG1 - BG5 - BP3L - BP3M - BP5 - BP7 - BP7S - BP550BT - HS3 - HS4 - HS4S - HS5BT - HS5WIFI - HS6 - PO3 - SSID: - Type: - Password: - DeviceKey: - set Wi-Fi - ok - cancel - BTM - KD926 - KD723 - BG5L - PBActivity - Done - SYS - DIA - Stop - Start - Enable BT - Discovering... - Discovering end - Start Discovery - Stop Discovery - PULSE - diff --git a/opensrp-bidan/src/main/res/values/styles.xml b/opensrp-bidan/src/main/res/values/styles.xml deleted file mode 100644 index cc8414c..0000000 --- a/opensrp-bidan/src/main/res/values/styles.xml +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/opensrp-bidan/src/test/java/org/smartregister/facialrecognition/sample/ExampleUnitTest.java b/opensrp-bidan/src/test/java/org/smartregister/facialrecognition/sample/ExampleUnitTest.java deleted file mode 100644 index d77cc35..0000000 --- a/opensrp-bidan/src/test/java/org/smartregister/facialrecognition/sample/ExampleUnitTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.smartregister.facialrecognition.sample; - -import org.junit.Test; - -import static org.junit.Assert.*; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() throws Exception { - assertEquals(4, 2 + 2); - } -} \ No newline at end of file