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

Migrate some calls to FHIR and GraphQL #86

Merged
merged 24 commits into from Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
18e2969
Finish release/v2.0.0
dragos-dobre Nov 28, 2019
63d4a2f
Finish release/v2.0.1
dragos-dobre Apr 24, 2020
e772b24
Finish Release/v2.0.1
dragos-dobre Apr 24, 2020
05fd9da
Github Action: manual build
edarchis Oct 7, 2021
d1bedac
Merge pull request #50 from openimis/manual-build-action
dragos-dobre Oct 15, 2021
5be00ee
Finish release/v2.1.0
dragos-dobre Nov 24, 2021
a993a46
Update activity_about.xml
dragos-dobre Nov 24, 2021
ff292a4
Updated java version in github actions
malinowskikam Dec 3, 2021
2ac6a91
Finish feature/github_action_update
dragos-dobre Dec 3, 2021
38221be
github actions: Changes cache from maven to gradle
malinowskikam Dec 3, 2021
71ffbe1
Finish feature/github_actions_fix
dragos-dobre Dec 3, 2021
0352400
Merge pull request #80 from openimis/develop
dragos-dobre Nov 15, 2022
72f5f35
Finish release/2.2.0
dragos-dobre Nov 15, 2022
a7bdaf9
Finish feature/OTC-745
dragos-dobre Jan 25, 2023
d60c254
Revert "OTC-745 Implemented claim 2-way sync"
malinowskikam Jan 31, 2023
98ed387
Merge pull request #85 from openimis/revert-83-feature/OTC-745
delcroip Mar 22, 2023
1726fa8
Migrate some calls to FHIR and GraphQL (WIP)
bmonjoie Jun 21, 2023
53be603
Moving the claim creation to FHIR (WIP)
bmonjoie Jun 26, 2023
53a20b1
Moving GetControls to GraphQL
bmonjoie Jun 26, 2023
d3412c2
Improve "Add claim" UI
bmonjoie Jun 26, 2023
2dcd53c
PR comments
bmonjoie Jun 30, 2023
27aaf5a
Fix issues after first review
bmonjoie Jul 25, 2023
8230867
Detect "REJECTED" status
bmonjoie Jul 26, 2023
a196bad
Fix error message when Insuree is not found
bmonjoie Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle
Expand Up @@ -8,6 +8,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.apollographql.apollo:apollo-gradle-plugin:2.5.14'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
60 changes: 39 additions & 21 deletions claimManagement/build.gradle
Expand Up @@ -2,6 +2,7 @@ import java.time.LocalDateTime
import java.time.format.DateTimeFormatter

apply plugin: 'com.android.application'
apply plugin: 'com.apollographql.apollo'

static def getDate() {
LocalDateTime date = LocalDateTime.now()
Expand All @@ -27,7 +28,7 @@ android {
targetSdkVersion 32
versionCode 4
versionName "2.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
Expand Down Expand Up @@ -56,7 +57,8 @@ android {
productFlavors.all {
resValue "string", "app_name_claims", "openIMIS Claims"
resValue "string", "ReleaseDateValue", getDate()
buildConfigField "String", "API_BASE_URL", '"http://demo.openimis.org/rest/"'
buildConfigField "String", "API_BASE_URL", '"http://demo.openimis.org/"'
buildConfigField "String", "REST_API_PREFIX", '"rest"'
buildConfigField "String", "RAR_PASSWORD", '")(#$1HsD"'
buildConfigField "String", "API_VERSION", '"3"'
}
Expand All @@ -65,50 +67,51 @@ android {
demoProd {
applicationIdSuffix ".demoProd"
resValue "string", "app_name_claims", "Claims Demo"
buildConfigField "String", "API_BASE_URL", '"http://demo.openimis.org/rest/"'
buildConfigField "String", "API_BASE_URL", '"http://demo.openimis.org/"'
dimension 'std'
}

demoRelease {
applicationIdSuffix ".demoRelease"
resValue "string", "app_name_claims", "Claims Release"
buildConfigField "String", "API_BASE_URL", '"https://release.openimis.org/rest/"'
buildConfigField "String", "API_BASE_URL", '"https://release.openimis.org/"'
dimension 'std'
}

chfDev {
applicationIdSuffix ".chfDev"
resValue "string", "app_name_claims", "Claims CHF"
buildConfigField "String", "API_BASE_URL", '"http://chf-dev.swisstph-mis.ch/rest/"'
buildConfigField "String", "API_BASE_URL", '"http://chf-dev.swisstph-mis.ch/"'
dimension 'std'
}

chfProd {
applicationIdSuffix ".chfProd"
resValue "string", "app_name_claims", "Claims CHF"
buildConfigField "String", "API_BASE_URL", '"http://chf-imis.or.tz/restapi/"'
buildConfigField "String", "API_BASE_URL", '"http://chf-imis.or.tz/"'
buildConfigField "String", "REST_API_PREFIX", '"restapi"'
dimension 'std'
}
mvDev {
applicationIdSuffix ".mvDev"
resValue "string", "app_name_claims", "Claims MV"
buildConfigField "String", "API_BASE_URL", '"http://imis-mv.swisstph-mis.ch/rest/"'
buildConfigField "String", "API_BASE_URL", '"http://imis-mv.swisstph-mis.ch/"'
dimension 'std'
}
bephaDev {
applicationIdSuffix ".bephaDev"
resValue "string", "app_name_claims", "Claims BEPHA"
buildConfigField "String", "API_BASE_URL", '"http://149.210.235.40/devupgrade/rest/"'
buildConfigField "String", "API_BASE_URL", '"http://149.210.235.40/devupgrade/"'
dimension 'std'
}
niger {
applicationIdSuffix ".niger"
resValue "string", "app_name_claims", "Claims Niger"
buildConfigField "String", "API_BASE_URL", '"http://oiniger.bluesquare.org/rest/"'
buildConfigField "String", "API_BASE_URL", '"http://oiniger.bluesquare.org/"'
}
tchadDev {
applicationIdSuffix ".tchadDev"
buildConfigField "String", "API_BASE_URL", '"https://imis-tchad-dev.swisstph-mis.ch/rest/"'
buildConfigField "String", "API_BASE_URL", '"https://imis-tchad-dev.swisstph-mis.ch/"'
resValue "string", "app_name_claims", "Claims TCHAD DEV"
dimension 'std'
}
Expand All @@ -126,10 +129,11 @@ android {
}
mauritaniaTrain {
applicationIdSuffix ".mauritaniaTrain"
buildConfigField "String", "API_BASE_URL", '"https://formation.cnass-mauritanie.swisstph-mis.ch/rest/"'
buildConfigField "String", "API_BASE_URL", '"https://formation.cnass-mauritanie.swisstph-mis.ch/"'
resValue "string", "app_name_claims", "Claims CNASS TRAIN"
dimension = 'std'
}

}

sourceSets {
Expand Down Expand Up @@ -177,27 +181,41 @@ android {
}
}

apollo {
service("service") {
packageName.set("org.openimis.imisclaims")
}
customTypeMapping = [
"Date" : "java.util.Date",
"DateTime" : "java.util.Date",
"Decimal": "java.lang.Double",
]
}


// Apply custom flavours
if(file('custom-flavours.gradle').exists()){
apply from: 'custom-flavours.gradle'
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.zxing:core:3.3.0'
implementation 'com.embarkmobile:zxing-android-minimal:1.2.1@aar'
implementation 'commons-io:commons-io:2.11.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'android.arch.lifecycle:livedata:1.1.1'
implementation 'android.arch.lifecycle:viewmodel:1.1.1'
implementation 'org.apache.httpcomponents:httpclient:4.5.9'
implementation 'org.apache.httpcomponents:httpcore:4.4.11'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.11.0'
implementation('com.apollographql.apollo:apollo-runtime:2.5.14')
implementation ('com.apollographql.apollo:apollo-android-support:2.5.14'){
because("Apollo 3+ only works with Kotlin coroutines")
}
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation group: 'com.squareup.picasso', name: 'picasso', version: '2.71828'
implementation group: 'net.lingala.zip4j', name: 'zip4j', version: '1.2.7'

Expand Down
Expand Up @@ -2,7 +2,7 @@

import android.content.Context;
import android.net.Uri;
import android.support.v4.content.FileProvider;
import androidx.core.content.FileProvider;

import org.openimis.imisclaims.AppInformation;
import org.openimis.imisclaims.BuildConfig;
Expand Down
2 changes: 1 addition & 1 deletion claimManagement/src/main/AndroidManifest.xml
Expand Up @@ -49,7 +49,7 @@
android:permission="android.permission.BIND_JOB_SERVICE" />

<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
Expand Down
@@ -0,0 +1,80 @@
query GetClaims($claim_administrator_code: String, $status_claim: Int, $visit_date_from: Date, $visit_date_to: Date, $processed_date_from: Date, $processed_date_to: Date) {
claims(
admin_Code: $claim_administrator_code
status: $status_claim
dateClaimed_Gte: $visit_date_from
dateClaimed_Lte: $visit_date_to
dateProcessed_Lte: $processed_date_to
dateProcessed_Gte: $processed_date_from
) {
totalCount
edges {
node {
uuid
code
healthFacility {
code
name
}
insuree {
chfId
lastName
otherNames
}
icd {
name
}
icd1 {
name
}
icd2 {
name
}
icd3 {
name
}
icd4 {
name
}
dateClaimed
dateFrom
dateTo
validityFrom
validityTo
visitType
status
claimed
approved
adjustment
explanation
guaranteeId
services {
qtyProvided
qtyApproved
priceAdjusted
priceValuated
explanation
justification
service {
code
name
price
}
}
items {
qtyProvided
qtyApproved
priceAdjusted
priceValuated
explanation
justification
item {
code
name
price
}
}
}
}
}
}
@@ -0,0 +1,11 @@
query GetControls {
control{
edges{
node{
name
usage
adjustability
}
}
}
}
@@ -0,0 +1,63 @@
query GetInsureeInquire($chfId: String) {
insurees(
chfId: $chfId
) {
edges {
node {
chfId
lastName
otherNames
dob
gender {
gender
}
photos {
folder
filename
photo
}
insureePolicies {
edges {
node {
policy {
product {
name
code
ceiling
ceilingIp
ceilingOp
deductible
deductibleIp
deductibleOp
maxNoAntenatal
maxAmountAntenatal
maxNoSurgery
maxAmountSurgery
maxNoConsultation
maxAmountConsultation
maxNoDelivery
maxAmountDelivery
maxNoHospitalization
maxAmountHospitalization
maxMembers
maxNoVisits
maxInstallments
maxCeilingPolicy
maxCeilingPolicyIp
maxCeilingPolicyOp
maxPolicyExtraMember
maxPolicyExtraMemberIp
maxPolicyExtraMemberOp
}
enrollDate
expiryDate
status
value
}
}
}
}
}
}
}
}
@@ -0,0 +1,38 @@
query GetPaymentList($claim_administrator_code: String) {
claimAdmins(code: $claim_administrator_code) {
edges {
node {
code
healthFacility {
code
servicesPricelist {
details {
edges {
node {
service {
code
name
price
}
}
}
}
}
itemsPricelist {
details {
edges {
node {
item {
code
name
price
}
}
}
}
}
}
}
}
}
}