Skip to content

Commit

Permalink
S5 already stabilized and deployed, L1 starting the deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ifoche committed Oct 14, 2016
2 parents fe034e0 + de90cdf commit b664d6c
Show file tree
Hide file tree
Showing 378 changed files with 12,736 additions and 2,219 deletions.
2 changes: 1 addition & 1 deletion DBFlowORM
39 changes: 28 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
mavenLocal()
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
//classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4'
}
}
apply plugin: 'com.android.application'
Expand All @@ -24,16 +24,18 @@ android {
config {}
}

compileSdkVersion 21
buildToolsVersion "21.0.1"
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
applicationId 'org.eyeseetea.surveillance_kh'
minSdkVersion 15
targetSdkVersion 21
versionCode 5
versionName "1.0.0"
targetSdkVersion 23
versionCode 11
multiDexEnabled true
dexOptions {
javaMaxHeapSize "6g"
}

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.config
Expand All @@ -59,6 +61,21 @@ android {
exclude 'META-INF/LICENSE'
}
productFlavors {
cambodia {
applicationId 'org.eyeseetea.surveillance_kh'
versionName "1.2.7"
buildConfigField "boolean", "reviewScreen", "false"
}
laos {
applicationId 'org.eyeseetea.surveillance_la'
versionName "1.0.5"
buildConfigField "boolean","reviewScreen", "true"
}
myanmar {
applicationId 'org.eyeseetea.surveillance_mm'
versionName "1.0.0"
buildConfigField "boolean","reviewScreen", "true"
}
}

lintOptions {
Expand All @@ -71,13 +88,13 @@ dependencies {
apply plugin: 'com.github.dcendents.android-maven'


compile 'com.android.support:support-v4:21.2.1'
compile 'com.android.support:appcompat-v7:21.2.1'
compile 'com.android.support:support-annotations:21.2.1'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-annotations:23.4.0'

// App dependencies
compile 'com.opencsv:opencsv:3.3'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.google.guava:guava:18.0'
compile 'com.squareup.okhttp:okhttp:2.2.0'
compile 'com.googlecode.libphonenumber:libphonenumber:7.0.9'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;

import static com.google.android.apps.common.testing.deps.guava.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkNotNull;

/**
* Created by arrizabalaga on 25/05/15.
Expand Down
12 changes: 12 additions & 0 deletions app/src/cambodia/assets/Answers.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
1;'RDT'
2;'Reason'
3;'Gender'
4;'Age'
5;'Specie'
6;'Treatment'
7;'Euartesim'
8;'AS/MQ'
9;'Referral'
10;'Classification'
11;'Occupation'
12;'Phone'
File renamed without changes.
11 changes: 11 additions & 0 deletions app/src/cambodia/assets/Matches.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
1;1
2;2
3;3
4;4
5;5
6;6
7;7
8;8
9;9
10;10
11;11
31 changes: 31 additions & 0 deletions app/src/cambodia/assets/OptionAttributes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
1;'f38b00';'question_images/rdt_positive.png'
2;'00b3e3';'question_images/rdt_negative.png'
3;'003745';'question_images/rdt_no_tested.png'
4;'edce00';'question_images/ntr_refuse.png'
5;'139f82';'question_images/ntr_danger.png'
6;'003745';'question_images/ntr_stock_out.png'
7;'edce00';'question_images/sex_male.png'
8;'799900';'question_images/sex_female.png'
9;'139f82';'question_images/specie_pf.png'
10;'edce00';'question_images/specie_pv.png'
11;'f38b00';'question_images/specie_mix.png'
12;'f38b00';'question_images/t_euartesim.png'
13;'139f82';'question_images/t_asmq.png'
14;'003745';'question_images/t_referral.png'
15;'00b3e3';'question_images/e_age_five.png'
16;'139f82';'question_images/e_age_ten.png'
17;'f38b00';'question_images/e_age_fifteen.png'
18;'edce00';'question_images/e_age_fifteen_sixty.png'
19;'00b3e3';'question_images/asmq_age_five.png'
20;'f38b00';'question_images/asmq_age_seven.png'
21;'edce00';'question_images/asmq_age_thirteen.png'
22;'799900';'question_images/asmq_r_children.png'
23;'edce00';'question_images/asmq_r_pregnant.png'
24;'003745';'question_images/asmq_r_act_stock_out.png'
25;'00b3e3';'question_images/asmq_cc_yes.png'
26;'edce00';'question_images/asmq_cc_no.png'
27;'edce00';'question_images/asmq_o_plantation.png'
28;'f38b00';'question_images/asmq_o_construction.png'
29;'799900';'question_images/asmq_o_forest.png'
30;'00b3e3';'question_images/asmq_o_security.png'
31;'003745';'question_images/asmq_o_other.png'
31 changes: 31 additions & 0 deletions app/src/cambodia/assets/Options.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
1;'វិជ្ជមាន';'Positive';0;1;1
2;'អវិជ្ជមាន';'Negative';0;1;2
3;'មិនបានធ្វើតេស្តឈាម';'Not Tested';0;1;3
4;'អ្នកជំងឺបដិសេធ';'Patient Refused';0;2;4
5;'សញ្ញាគ្រោះថ្នាក់';'Danger Signs';0;2;5
6;'ឧបករណ៏ RDT មិនមាននៅក្នុងស្តុក';'RDT Stock Out';0;2;6
7;'ប្រុស';'Male';0;3;7
8;'ស្រី';'Female';0;3;8
9;'ផ្លាស្មូដ្យូម ហ្វាល់ស៊ីប៉ារ៉ូម(Pf)';'Pf';0;5;9
10;'ផ្លាស្មូដ្យូម វីវ៉ាក់(Pv)';'Pv';0;5;10
11;'ចំរុះ(Mixed)';'Mixed';0;5;11
12;'អឺរ៉ាតេស៊ីម';'DHA-PIP';0;6;12
13;'អាតេស៊ុយណាត ម៉េហ្លូគីន';'AS/MQ';0;6;13
14;'ធ្វើកាបេញ្ជូន';'Referral';0;6;14
15;'អាយុ ៥ - ១០ ឆ្នាំ\nទម្ងន់ ១៩ - ៣០ គីឡូ';'4.5 Pills';0;7;15
16;'អាយុ ១០ - ១៥ ឆ្នាំ\nទម្ងន់ ៣០ - ៤០ គីឡូ';'6 Pills';0;7;16
17;'អាយុ >១៥ ឆ្នាំ\nទម្ងន់ ៤០ - ៦០ គីឡូ';'9 Pills';0;7;17
18;'អាយុ >១៥ ឆ្នាំ\nទម្ងន់ >៦០ គីឡូ';'12 Pills';0;7;18
19;'អាយុ ៥ - ៦ ឆ្នាំ\nទម្ងន់ ៩ - ១៧ គីឡូ';'1.5 Pills';0;8;19
20;'អាយុ ៧ - ១២ ឆ្នាំ\nទម្ងន់ ១៨ - ២៩ គីឡូ';'3 Pills';0;8;20
21;'អាយុ >១៣ ឆ្នាំ\nទម្ងន់ >៣០ គីឡូ';'6 Pills';0;8;21
22;'កុមារអាយុក្រោម ៥ឆ្នាំ';'Child Under 5';0;9;22
23;'ស្រី្តមានផ្ទៃពោះ';'Pregnancy';0;9;23
24;'ឱសថ ACT មិនមាននៅក្នុងស្តុក';'ACT Stock Out';0;9;24
25;'បាទ / ចា៎';'Yes';0;10;25
26;'អត់ទេ';'No';0;10;26
27;'កម្មករតាមចំការ';'Plantation Worker';0;11;27
28;'កម្្មករសំណង់ ឬកម្មកររ៉ែ';'Construction/Mine Worker';0;11;28
29;'អ្នកធ្វើការក្នុងព្រៃ';'Forest Worker';0;11;29
30;'សន្តិសុខ';'Security Personnel';0;11;30
31;'ផ្សេងៗ';'Other';0;11;31
File renamed without changes.
11 changes: 11 additions & 0 deletions app/src/cambodia/assets/QuestionOptions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
1;1;1;1
2;1;1;2
3;1;1;3
4;1;1;4
5;1;1;5
6;1;1;6
7;1;1;7
8;1;3;8
9;6;12;9
10;6;13;10
11;6;14;11
11 changes: 11 additions & 0 deletions app/src/cambodia/assets/QuestionRelations.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
1;1;3
2;1;4
3;1;5
4;1;6
5;1;10
6;1;11
7;1;12
8;1;2
9;1;7
10;1;8
11;1;9
Empty file.
12 changes: 12 additions & 0 deletions app/src/cambodia/assets/Questions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
1;'RDT';'What is your patient\'s RDT result?';;'តើលទ្ធផលតេស្តឈាមរបស់អ្នកជំងឺដោយប្រើ​ ឧបករណ៏ RDT បង្ហាញថាជាអ្វី?';'OEdLEjF6Z8p';1;0;0;1;1;0;14;1;0
2;'Reason';'Why was the patient not tested for malaria?';;'ហេតុអ្វីបានជាអ្នកជំងឺមិនត្រូវបានធ្វើតេស្តឈាម?';'fkBDnkiQbWY';1;0;0;1;2;0;14;2;1
3;'Gender';'Male or Female?';;'ប្រុស ឬ ស្រី?';'uuudizosfpU';1;0;0;1;3;0;10;9;1
4;'Age';'How old is your patient (years)?';;'តើអ្នកជំងឺរបស់អ្នកមានអាយុប៉ុន្មាន (ឆ្នាំ)?';'JMM92njKuSc';2;0;0;1;4;0;6;9;1
5;'Specie';'What type of malaria does your patient have?';;'តើអ្នកជំងឺរបស់អ្នកមានមេរោគគ្រុនចាញ់ប្រភេទអ្វី?';'X6RFHreAu0L';3;0;0;1;5;0;14;9;1
6;'Treatment';'What type of treatment did you provide?';;'តើការព្យាបាលបែបណាដែលអ្នកផ្តល់ជូនអ្នកជំងឺ?';'fNpYtVaL7OV';4;0;0;1;6;0;14;9;1
7;'DHA-PIP';'How much Euratesim did you provide?';;'តើអ្នកផ្តល់អឺរ៉ាតេស៊ីមប៉ុន្មានគ្រាប់ឲ្យអ្នកជំងឺ?';'LRzOBn2rZA3';1;0;0;1;7;0;11;9;0
8;'AS/MQ';'How much AS/MQ did you provide?';;'តើអ្នកផ្តល់អាតេស៊ុយណាត ម៉េហ្លូគីនប៉ុន្មានគ្រាប់ឲ្យអ្នកជំងឺ?';'mCSYUwYXnnj';1;0;0;1;8;0;14;9;0
9;'Referral';'Why was the patient referred?';;'ហេតុុអ្វីបានជាអ្នកជំងឺត្រូវបានបញ្ជូន?';'Bi2NfBG8LGJ';1;0;0;1;9;0;14;9;0
10;'Classification';'Has the patient slept overnight outside of the village in the past two weeks?';;'តើអ្នកជំងឺធ្លាប់គេង ពេលយប់នៅខាងក្រៅភូមិដែលគាត់រស់នៅដែរ ឬ ទេ កាលពី ២សប្តាហ៍មុន?';'ff3lAAW1VLh';5;0;0;1;10;0;10;9;0
11;'Occupation';'What is the patient\'s occupation?';;'តើអ្នកជំងឺប្រកបមុខរបរអ្វី?';'Zf8O1uzl3JJ';6;0;0;1;11;0;15;9;0
12;'Phone';'Please enter your patient\'s phone number.';;'សូមវាយបញ្ចូលលេខទូរស័ព្ទអ្នកជំងឺ';'rDubghVv1L8';7;0;0;1;12;0;13;9;0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.eyeseetea.malariacare.database;

import org.eyeseetea.malariacare.database.migrations.Migration13ModifyValuesLastMigration;
import org.eyeseetea.malariacare.database.migrations.Migration2Database;

/**
* Created by idelcano on 29/09/2016.
*/

public class PostMigration {

public static void launchPostMigration() {
Migration2Database.postMigrate();
Migration13ModifyValuesLastMigration.postMigrate();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.eyeseetea.malariacare.layout;

import android.content.Context;

import org.eyeseetea.malariacare.R;
import org.eyeseetea.malariacare.database.model.Survey;

/**
* Created by idelcano on 01/09/2016.
*/
public class SurveyInfoUtils {

public static String getRDTSymbol(Context context, Survey survey) {
String rdtValueFromDB = survey.getRDTName();
String rdtValue = (rdtValueFromDB.equals("")) ? context.getResources().getString(R.string.unrecognized_option) : rdtValueFromDB;
String rdtSymbol = rdtValue;
if(rdtValue.equals(context.getResources().getString(R.string.rdtPositive))){
rdtSymbol = context.getResources().getString(R.string.symbolPlus);
}else if(rdtValue.equals(context.getResources().getString(R.string.rdtNegative))){
rdtSymbol = context.getResources().getString(R.string.symbolMinus);
}else if(rdtValue.equals(context.getResources().getString(R.string.rdtNotTested))){
rdtSymbol = context.getResources().getString(R.string.symbolCross);
}
return rdtSymbol;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.eyeseetea.malariacare.monitor.rows;

import android.content.Context;

import org.eyeseetea.malariacare.R;
import org.eyeseetea.malariacare.monitor.utils.SurveyMonitor;

/**
* Created by idelcano on 07/06/2016.
*/
public class ASMQRowBuilder extends CounterRowBuilder {

public ASMQRowBuilder(Context context){
super(context, context.getString(R.string.monitor_row_title_asmq));
}

@Override
protected Integer incrementCount(SurveyMonitor surveyMonitor) {
return (surveyMonitor.isASMQ())?1:0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.eyeseetea.malariacare.monitor.rows;

import android.content.Context;

import org.eyeseetea.malariacare.R;
import org.eyeseetea.malariacare.monitor.utils.SurveyMonitor;

/**
* Created by idelcano on 07/06/2016.
*/
public class DHAPIPRowBuilder extends CounterRowBuilder {

public DHAPIPRowBuilder(Context context){
super(context, context.getString(R.string.monitor_row_title_dhapip));
}

@Override
protected Integer incrementCount(SurveyMonitor surveyMonitor) {
return (surveyMonitor.isDHAPIP())?1:0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public NotTestedRowBuilder(Context context){
}

@Override
protected boolean hasToIncrement(SurveyMonitor surveyMonitor) {
return surveyMonitor.isNotTested();
protected Integer incrementCount(SurveyMonitor surveyMonitor) {
return (surveyMonitor.isNotTested())?1:0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public RDTRowBuilder(Context context){
}

@Override
protected boolean hasToIncrement(SurveyMonitor surveyMonitor) {
return surveyMonitor.isRDT();
protected Integer incrementCount(SurveyMonitor surveyMonitor) {
return (surveyMonitor.isRDT())?1:0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package org.eyeseetea.malariacare.monitor.tables;

import android.content.Context;

import org.eyeseetea.malariacare.monitor.MonitorRowBuilder;
import org.eyeseetea.malariacare.monitor.MonitorTableBuilder;
import org.eyeseetea.malariacare.monitor.rows.ASMQRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.DHAPIPRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.NegativeRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.NotTestedRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.PeriodRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.PfPvRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.PfRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.PositiveRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.PositivityRateRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.PvRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.RDTRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.ReferralRowBuilder;
import org.eyeseetea.malariacare.monitor.rows.SuspectedRowBuilder;

import java.util.ArrayList;
import java.util.List;

/**
* Created by idelcano on 21/07/2016.
*/
public class MonitorUtils extends AMonitorUtils {
public MonitorUtils(Context context) {
super(context);
}

public List<MonitorRowBuilder> defineRows(){
List<MonitorRowBuilder> rowBuilders = new ArrayList<>();
rowBuilders.add(new PeriodRowBuilder(context));
rowBuilders.add(new ASMQRowBuilder(context));
rowBuilders.add(new DHAPIPRowBuilder(context));
rowBuilders.add(new RDTRowBuilder(context));
return rowBuilders;
}

public List<MonitorRowBuilder> defineSuspectedRows() {
List<MonitorRowBuilder> rowBuilders = new ArrayList<>();
rowBuilders.add(new PeriodRowBuilder(context));
rowBuilders.add(new SuspectedRowBuilder(context));
rowBuilders.add(new PositiveRowBuilder(context));
rowBuilders.add(new PfRowBuilder(context));
rowBuilders.add(new PvRowBuilder(context));
rowBuilders.add(new PfPvRowBuilder(context));
rowBuilders.add(new ReferralRowBuilder(context));
rowBuilders.add(new NegativeRowBuilder(context));
rowBuilders.add(new NotTestedRowBuilder(context));
rowBuilders.add(new PositivityRateRowBuilder(context));
return rowBuilders;
}
}
Loading

0 comments on commit b664d6c

Please sign in to comment.