Skip to content

Commit

Permalink
Fixes Measure Reporting functionality 🐛
Browse files Browse the repository at this point in the history
- Upgrade dependencies ⬆️
- Release version 1.1.0 Canary 🔖
  • Loading branch information
ndegwamartin committed Feb 12, 2024
1 parent 8183ab7 commit 57ef275
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
21 changes: 10 additions & 11 deletions android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ android-x-test= "1.5.2"
core-testing = "2.2.0"
coverallsGradlePlugin = "2.12.0"
cqfFhirCr = "3.0.0-PRE9"
data-capture = "1.1.0-preview4-SNAPSHOT"
data-capture = "1.1.0-preview5-SNAPSHOT"
datastore = "1.0.0"
desugar-jdk-libs = "2.0.4"
dokkaBase = "1.8.20"
easy-rules-jexl = "4.1.0"
espresso-core = "3.5.1"
fhir-common-utils = "1.0.0-SNAPSHOT"
fhir-engine = "1.0.0-preview2-SNAPSHOT"
foundation = "1.6.0"
foundation = "1.6.1"
fragment-ktx = "1.6.2"
glide = "4.16.0"
gradle = "8.2.2"
Expand All @@ -41,17 +41,17 @@ kotlin = "1.9.22"
kotlinx-coroutines = "1.7.2"
kotlinx-serialization-json = "1.6.0"
kujaku-library = "0.9.0"
ktlint = "0.49.1"
ktlint = "0.50.0"
leakcanary-android = "2.10"
lifecycle= "2.7.0"
mapbox-sdk-turf = "4.8.0"
material = "1.11.0"
compose-material-icons = "1.6.0"
material3 = "1.1.2"
compose-material-icons = "1.6.1"
material3 = "1.2.0"
mockk = "1.13.8"
mockk-android = "1.13.8"
msg-simple = "1.2"
navigation = "2.7.6"
navigation = "2.7.7"
okhttp = "4.12.0"
okhttp-logging-interceptor = "4.11.0"
orchestrator = "1.4.2"
Expand All @@ -68,17 +68,16 @@ slf4j-nop = "1.7.36"
spotlessPluginGradle = "6.25.0"
stax-api = "1.0-2"
timber = "5.0.1"
ui = "1.6.0"
ui = "1.6.1"
work = "2.9.0"
workflow = "0.1.0-alpha04-preview4.1-SNAPSHOT"
workflow = "0.1.0-alpha04-preview6-SNAPSHOT"
xercesImpl = "2.12.2"
jetbrains = "1.8.20"
owasp = "8.2.1"
kotlin-serialization = "1.8.10"
dagger-hilt = "2.50"
navigation-safeargs = "2.7.6"
accompanist = "0.23.1"
jetbrains-kotlin-jvm="1.8.10"
jetbrains-kotlin-jvm="1.9.22"
kt3k-coveralls-ver="2.12.0"

[libraries]
Expand Down Expand Up @@ -197,7 +196,7 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi
org-owasp-dependencycheck = { id = "org.owasp.dependencycheck", version.ref = "owasp" }
dagger-hilt-android= { id = "com.google.dagger.hilt.android", version.ref = "dagger-hilt" }
com-diffplug-spotless = { id = "com.diffplug.spotless", version.ref = "spotlessPluginGradle" }
androidx-navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin", version.ref = "navigation-safeargs" }
androidx-navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin", version.ref = "navigation" }
kt3k-coveralls = { id = "com.github.kt3k.coveralls", version.ref = "kt3k-coveralls-ver" }
android-junit5 = {id="de.mannodermaus.android-junit5", version.ref="androidJunit5"}

Expand Down
4 changes: 2 additions & 2 deletions android/quest/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ android {
defaultConfig {
applicationId = "org.smartregister.opensrp"
minSdk = 26
versionCode = 7
versionName = "1.0.1"
versionCode = 10
versionName = "1.1.0"
multiDexEnabled = true

buildConfigField("boolean", "SKIP_AUTH_CHECK", "false")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import javax.inject.Inject
import kotlinx.coroutines.withContext
import org.hl7.fhir.exceptions.FHIRException
import org.hl7.fhir.r4.model.Group
import org.hl7.fhir.r4.model.Measure
import org.hl7.fhir.r4.model.MeasureReport
import org.hl7.fhir.r4.model.ResourceType
import org.smartregister.fhircore.engine.configuration.ConfigurationRegistry
import org.smartregister.fhircore.engine.configuration.app.ConfigService
import org.smartregister.fhircore.engine.configuration.report.measure.ReportConfiguration
Expand Down Expand Up @@ -140,7 +142,7 @@ constructor(
* @param endDateFormatted end date of measure period with format yyyy-MM-dd
* @param subject the individual subject reference (ResourceType/id) to run report for
*/
private fun runMeasureReport(
private suspend fun runMeasureReport(
measureUrl: String,
reportType: String,
startDateFormatted: String,
Expand All @@ -149,7 +151,10 @@ constructor(
practitionerId: String?,
): MeasureReport {
return fhirOperator.evaluateMeasure(
measureUrl = measureUrl,
measure =
knowledgeManager
.loadResources(ResourceType.Measure.name, measureUrl, null, null, null)
.firstOrNull() as Measure,
start = startDateFormatted,
end = endDateFormatted,
reportType = reportType,
Expand Down

0 comments on commit 57ef275

Please sign in to comment.