Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧 Start on the MOH510 Report #9

Open
wants to merge 19 commits into
base: ft-stock
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,34 @@ buildscript {
repositories {
google()
jcenter()
// maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}

// dependencies {
// classpath 'com.android.tools.build:gradle:4.0.1'
// classpath 'org.smartregister:gradle-jarjar-plugin:1.0.0-SNAPSHOT'
// }
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'org.smartregister:gradle-jarjar-plugin:1.0.0-SNAPSHOT'
}
}


allprojects {
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
google()
jcenter()
mavenLocal()
mavenCentral()
maven { url 'https://maven.google.com' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://jitpack.io' }
maven { url "https://acra.googlecode.com/svn/repository/releases" }
maven { url "https://repo.maven.apache.org/maven2" }
maven { url "https://cloudant.github.io/cloudant-sync-eap/repository" }
maven { url 'https://maven.fabric.io/public' }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
google()
jcenter()
//aven { url "https://dl.bintray.com/ona/rdt-capture" }
//maven { url "http://dl.bintray.com/ona/kujaku" }
//maven { url 'https://dl.bintray.com/ibm-watson-health/ibm-fhir-server-releases' }
maven { url 'https://repo1.maven.org/maven2/com/ibm/fhir' }
}
}

Expand All @@ -38,7 +44,7 @@ subprojects {

ext.androidToolsBuildGradle = '4.0.1'
ext.androidBuildToolsVersion = '29.0.3'
ext.androidMinSdkVersion = 18
ext.androidMinSdkVersion = 27
ext.androidCompileSdkVersion = 29
ext.androidTargetSdkVersion = 29

Expand Down
2 changes: 2 additions & 0 deletions local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
# header note.
#Tue Jun 08 19:44:42 EAT 2021
sdk.dir=/home/stephen/Android/Sdk
oauth.client.id="opensrp-trusted-client"
oauth.client.secret="O@aTHS#cr3t"
66 changes: 50 additions & 16 deletions opensrp-kip/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,34 @@ android {
buildConfigField "long", "EVENT_VERSION", System.currentTimeMillis() + "L"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

if (project.rootProject.file("local.properties").exists()) {

Properties properties = new Properties()
properties.load(project.rootProject.file("local.properties").newDataInputStream())

if (properties != null && properties.containsKey("oauth.client.id")) {

buildConfigField "String", "OAUTH_CLIENT_ID", properties["oauth.client.id"]

} else {
project.logger.error("oauth.client.id variable is not set in your local.properties")
buildConfigField "String", "OAUTH_CLIENT_ID", "\"sample_client_id\""
}


if (properties != null && properties.containsKey("oauth.client.secret")) {

buildConfigField "String", "OAUTH_CLIENT_SECRET", properties["oauth.client.secret"]

} else {
project.logger.error("oauth.client.secret variable is not set in your local.properties")
buildConfigField "String", "OAUTH_CLIENT_SECRET", "\"sample_client_secret\""
}
} else {
buildConfigField "String", "OAUTH_CLIENT_ID", '""'
buildConfigField "String", "OAUTH_CLIENT_SECRET", '""'
}

javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
Expand Down Expand Up @@ -112,18 +140,21 @@ android {
}

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.txt'
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'

//exclude 'META-INF/LICENSE.txt'
//exclude 'META-INF/NOTICE.txt'
//exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.md'
//exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.md'
exclude 'META-INF/INDEX.LIST'
//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 {
Expand All @@ -145,15 +176,15 @@ dependencies {
implementation 'com.evrencoskun.library:tableview:0.8.8'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15'

implementation('org.smartregister:opensrp-client-opd:0.0.16-SNAPSHOT@aar') {
implementation('org.smartregister:opensrp-client-opd:0.0.18-SNAPSHOT@aar') {
transitive = true
exclude group: 'org.smartregister', module: 'opensrp-client-core'
exclude group: 'org.smartregister', module: 'opensrp-client-native-form'
exclude group: 'org.smartregister', module: 'opensrp-client-configurable-views'
exclude group: 'com.android.support', module: 'appcompat-v7'
}

implementation('org.smartregister:opensrp-client-child:0.3.4-00-SNAPSHOT@aar') {
implementation('org.smartregister:opensrp-client-child:0.5.0-SNAPSHOT@aar') {
transitive = true
exclude group: 'id.zelory', module: 'compressor'
exclude group: 'org.smartregister', module: 'opensrp-client-core'
Expand All @@ -164,7 +195,7 @@ dependencies {
}


api('org.smartregister:opensrp-client-core:1.12.0-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-core:3.3.1-SNAPSHOT@aar') {
transitive = true
exclude group: 'id.zelory', module: 'compressor'
exclude group: 'com.github.bmelnychuk', module: 'atv'
Expand All @@ -176,9 +207,10 @@ dependencies {
exclude group: 'com.android.support', module: 'cardview-v7'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.ibm.fhir', module: 'fhir-model'
}

api('org.smartregister:opensrp-client-native-form:2.0.2-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-native-form:1.14.5.3-SNAPSHOT@aar') {
transitive = true
exclude group: 'id.zelory', module: 'compressor'
exclude group: 'com.android.support', module: 'recyclerview-v7'
Expand Down Expand Up @@ -276,7 +308,9 @@ dependencies {
transitive = true
}
implementation group: 'io.fabric.sdk.android', name: 'fabric', version: '1.4.8'

implementation 'org.apache.poi:poi:3.17'
implementation "com.ibm.fhir:fhir-model:4.7.1"
implementation "com.ibm.fhir:fhir-path:4.7.1"

def robolectricVersion = '4.1'
testImplementation("org.robolectric:robolectric:$robolectricVersion") {
Expand Down
5 changes: 5 additions & 0 deletions opensrp-kip/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@
android:screenOrientation="fullSensor"
android:theme="@style/ChildTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<activity
android:name="org.smartregister.kip.activity.Moh510ReportActivity"
android:screenOrientation="portrait"
android:theme="@style/ChildTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />

<provider
android:name="androidx.core.content.FileProvider"
Expand Down
19 changes: 13 additions & 6 deletions opensrp-kip/src/main/assets/covid19_vaccine_stock.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,25 @@
"key": "sinovac_vials_amount"
},
{
"description": "978676-001:2022-02-01",
"description": "978679-001:2022-02-01",
"label": "Pfizer Stock Details",
"type": "SettingConfiguration",
"value": "110",
"key": "pfizer_vials_amount"
},
{
"description": "978677-001:2022-02-01",
"label": "Moderna Stock Details",
"type": "SettingConfiguration",
"value": "100",
"value": "120",
"key": "moderna_vials_amount"
},
{
"description": "978676-001:2022-02-01",
"label": "Pfizer Stock Details",
"description": "978678-001:2022-02-01",
"label": "Johnson and Johnson Stock Details",
"type": "SettingConfiguration",
"value": "100",
"key": "pfizer_vials_amount"
"value": "140",
"key": "johnson_and_johnson_vials_amount"
}
],
"type": "SettingConfiguration",
Expand Down
42 changes: 42 additions & 0 deletions opensrp-kip/src/main/assets/ec_client_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,20 @@
"field": "attributes.phone_number"
}
},
{
"column_name": "first_name",
"type": "Client",
"json_mapping": {
"field": "firstName"
}
},
{
"column_name": "last_name",
"type": "Client",
"json_mapping": {
"field": "lastName"
}
},
{
"column_name": "alt_name",
"type": "Client",
Expand Down Expand Up @@ -614,6 +628,20 @@
"field": "attributes.lost_to_follow_up"
}
},
{
"column_name": "first_name",
"type": "Client",
"json_mapping": {
"field": "firstName"
}
},
{
"column_name": "last_name",
"type": "Client",
"json_mapping": {
"field": "lastName"
}
},
{
"column_name": "dob",
"type": "Client",
Expand Down Expand Up @@ -728,6 +756,20 @@
"field": "baseEntityId"
}
},
{
"column_name": "first_name",
"type": "Client",
"json_mapping": {
"field": "firstName"
}
},
{
"column_name": "last_name",
"type": "Client",
"json_mapping": {
"field": "lastName"
}
},
{
"column_name": "father_phone",
"type": "Client",
Expand Down
62 changes: 58 additions & 4 deletions opensrp-kip/src/main/assets/json.form/opd_adverse_event.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"count": "1",
"encounter_type": "Covid AEFI",
"encounter_type": "Covid 19 AEFI",
"entity_id": "",
"metadata": {
"start": {
Expand Down Expand Up @@ -47,7 +47,7 @@
"encounter_location": ""
},
"step1": {
"title": "Covid Adverse Event Reporting",
"title": "Covid 19 Adverse Event Reporting",
"fields": [
{
"key": "Reaction_Vaccine",
Expand All @@ -62,14 +62,16 @@
"Sinopharm",
"Sinovac",
"Morderna",
"Pfizer"
"Pfizer",
"Johnson and Johnson"
],
"openmrs_choice_ids": {
"AZ Oxford": "",
"Sinopharm": "",
"Sinovac": "",
"Morderna": "",
"Pfizer": ""
"Pfizer": "",
"Johnson and Johnson": ""
},
"v_required": {
"value": true,
Expand Down Expand Up @@ -233,6 +235,58 @@
]
}
}
},
{
"key": "covid_19_client_referred",
"openmrs_entity_parent": "",
"openmrs_entity": "concept",
"openmrs_entity_id": "163340AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"openmrs_data_type": "select one",
"type": "native_radio",
"label": "Covid 19 Client Referred?",
"label_text_style": "bold",
"options": [
{
"key": "Yes",
"text": "Yes",
"openmrs_entity_parent": "",
"openmrs_entity": "concept",
"openmrs_entity_id": "163340AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
{
"key": "No",
"text": "No",
"openmrs_entity_parent": "",
"openmrs_entity": "concept",
"openmrs_entity_id": "163340AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}
]
},
{
"key": "covid_19_aefi_form",
"openmrs_entity_parent": "",
"openmrs_entity": "concept",
"openmrs_entity_id": "163340AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"openmrs_data_type": "select one",
"type": "native_radio",
"label": "Was the AEFI form completed?",
"label_text_style": "bold",
"options": [
{
"key": "Yes",
"text": "Yes",
"openmrs_entity_parent": "",
"openmrs_entity": "concept",
"openmrs_entity_id": "163340AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
{
"key": "No",
"text": "No",
"openmrs_entity_parent": "",
"openmrs_entity": "concept",
"openmrs_entity_id": "163340AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}
]
}
]
}
Expand Down
Loading