Skip to content

Commit

Permalink
WD|Initial Bidan Cloudant #4
Browse files Browse the repository at this point in the history
  • Loading branch information
baksosapi committed Nov 15, 2017
2 parents de4719f + c3d4cd7 commit 7d4a949
Show file tree
Hide file tree
Showing 332 changed files with 51,266 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ tmp/
project.properties
.DS_Store
.settings
/opensrp-bidan/src/main/assets/config.properties
/**/config.properties
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# opensrp-client-sid
SID Client Application
# opensrp-client-sid Vaksinator Application
SID Vaksinator Client Application
[![Build Status](https://travis-ci.org/OpenSRP/opensrp-client-sid.svg?branch=master)](https://travis-ci.org/OpenSRP/opensrp-client-sid) [![Coverage Status](https://coveralls.io/repos/github/OpenSRP/opensrp-client-sid/badge.svg?branch=master)](https://coveralls.io/github/OpenSRP/opensrp-client-sid?branch=master)

[![Dristhi](https://raw.githubusercontent.com/OpenSRP/opensrp-client/master/opensrp-app/res/drawable-mdpi/login_logo.png)](https://smartregister.atlassian.net/wiki/dashboard.action)
File renamed without changes.
144 changes: 144 additions & 0 deletions bidan-cloudant/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
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.smartregister.bidan_cloudant"
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://192.168.1.253:8080/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 false
javaMaxHeapSize "4g"
}
}

dependencies {
compile('org.smartregister:opensrp-client-core:1.1.1-SNAPSHOT@aar') {
transitive = true
exclude group: 'com.github.bmelnychuk', module: 'atv'
exclude group: 'com.google.guava', module: 'guava'
}
compile('org.smartregister:opensrp-client-enketo: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"
}
Binary file added bidan-cloudant/libs/FlurryAnalytics-6.0.0.jar
Binary file not shown.
Binary file added bidan-cloudant/libs/sd-sdk-facial-processing.jar
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.smartregister.vaksinator;

import android.app.Application;
import android.test.ApplicationTestCase;

public class ApplicationTest extends ApplicationTestCase<Application>{

public ApplicationTest() {
super(Application.class);
}
}
78 changes: 78 additions & 0 deletions bidan-cloudant/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.smartregister.bidan_cloudant">

<application
android:name=".application.BidanApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
>
<activity
android:name=".activity.LoginActivity"
android:label="@string/app_name"
android:theme="@style/BidanAppTheme"
android:screenOrientation="landscape"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activity.BidanHomeActivity"
android:theme="@style/BidanAppTheme"
android:screenOrientation="landscape" />
<activity android:name=".activity.KMotherSmartRegisterActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".activity.KFPSmartRegisterActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".activity.KANCSmartRegisterActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".activity.KPNCSmartRegisterActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".activity.KChildSmartRegisterActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".activity.BidanDetailActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".activity.BidanRecapitulationActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity
android:name=".activity.SettingsActivity"
android:theme="@style/BidanAppTheme"
android:screenOrientation="landscape" />
<!-- local key -->
<!--<meta-data-->
<!--android:name="io.fabric.ApiKey"-->
<!--android:value="b74c58c94d8965151212e8ecf1f4fdfbf5b7f4e4" />-->
<!-- sid key -->
<meta-data
android:name="io.fabric.ApiKey"
android:value="b74c58c94d8965151212e8ecf1f4fdfbf5b7f4e4" />

</application>

<uses-permission android:name="android.permission.INTERNET" />
</manifest>
28 changes: 28 additions & 0 deletions bidan-cloudant/src/main/assets/bindtypes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"bindobjects": [
{
"name": "bidan",
"columns": [
{"name":"bidanId"}
]
},
{
"name": "kartu_ibu",
"columns": [
{"name":"namalengkap"},{"name":"isOutOfArea"},{"name":"umur"},{"name":"namaSuami"},{"name":"noIbu"},{"name":"htp"}
]
},
{
"name": "ibu",
"columns": [
{"name":"kartuIbuId"},{"name":"type"},{"name":"ancDate"},{"name":"ancKe"},{"name":"hariKeKF"}
]
},
{
"name": "anak",
"columns": [
{"name":"ibuCaseId"},{"name":"namaBayi"},{"name":"tanggalLahirAnak"}
]
}
]
}
65 changes: 65 additions & 0 deletions bidan-cloudant/src/main/assets/bpm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[{
"_id": "e6c823f4d2bc4c9caca1193fe0084cf2",
"_rev": "2-1400d8faaf26794bc69e8415d8b7e795",
"type": "Event",
"dateCreated": "2017-05-10T11:20:35.690Z",
"serverVersion": 1494415292031,
"identifiers": {
},
"baseEntityId": "fc9d5c18-253f-440b-8507-1c34f9ac4168",
"locationId": "null",
"eventDate": "2017-05-07T16:00:00.000Z",
"eventType": "Blood Test",
"formSubmissionId": "26a7a266-e6b3-4b2b-b26d-5813f42e764c",
"providerId": "user28",
"duration": 0,
"obs": [
{
"fieldType": "concept",
"fieldDataType": "integer",
"fieldCode": "5085AAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"values": [
"97"
],
"formSubmissionField": "tandaVitalTDSistolik",
"humanReadableValues": [
]
},
{
"fieldType": "concept",
"fieldDataType": "integer",
"fieldCode": "5086AAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"values": [
"79"
],
"formSubmissionField": "tandaVitalTDDiastolik",
"humanReadableValues": [
]
},
{
"fieldType": "concept",
"fieldDataType": "integer",
"fieldCode": "5087AAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"values": [
"74"
],
"formSubmissionField": "pulse",
"humanReadableValues": [
]
},
{
"fieldType": "concept",
"fieldDataType": "integer",
"fieldCode": "160632AAAAAAAAAAAAAAAAAAAAAAAAAA",
"parentCode": "5087AAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"values": [
"false"
],
"formSubmissionField": "ahr",
"humanReadableValues": [
]
}
],
"entityType": "ibu",
"version": 1494415235690
}]
34 changes: 34 additions & 0 deletions bidan-cloudant/src/main/assets/ec_client_alerts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "alerts",
"columns": [{
"column_name": "caseID",
"json_mapping": {
"field": "baseEntityId"
}
}, {
"column_name": "scheduleName",
"json_mapping": {
"field": "data.scheduleName"
}
}, {
"column_name": "visitCode",
"json_mapping": {
"field": "data.visitCode"
}
}, {
"column_name": "status",
"json_mapping": {
"field": "data.alertStatus"
}
}, {
"column_name": "startDate",
"json_mapping": {
"field": "data.startDate"
}
}, {
"column_name": "expiryDate",
"json_mapping": {
"field": "data.expiryDate"
}
}]
}
Loading

0 comments on commit 7d4a949

Please sign in to comment.