Skip to content

Commit

Permalink
Downgrade data-capture to include suspend fhirpath PR
Browse files Browse the repository at this point in the history
  • Loading branch information
LZRS committed Oct 4, 2024
1 parent d79ba3a commit be6354f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 64 deletions.
4 changes: 1 addition & 3 deletions android/engine/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ dependencies {
implementation("androidx.cardview:cardview:1.0.0")
implementation("joda-time:joda-time:2.10.14")
implementation("androidx.paging:paging-runtime-ktx:3.3.0")
api("com.github.bumptech.glide:glide:4.16.0")
kapt("com.github.bumptech.glide:compiler:4.16.0")
implementation("id.zelory:compressor:3.0.1")

implementation(group = "javax.xml.stream", name = "stax-api", version = "1.0-2")
Expand Down Expand Up @@ -186,7 +184,7 @@ dependencies {
exclude(group = "com.google.android.fhir", module = "common")
exclude(group = "com.google.android.fhir", module = "engine")
}
api("org.smartregister:data-capture:1.1.0-preview14-rc2-SNAPSHOT") {
api("org.smartregister:data-capture:1.1.0-preview11-MWCore2-SNAPSHOT") {
isTransitive = true
exclude(group = "ca.uhn.hapi.fhir")
exclude(group = "com.google.android.fhir", module = "engine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ import org.smartregister.fhircore.engine.util.extension.assertSubject
import org.smartregister.fhircore.engine.util.extension.deleteRelatedResources
import org.smartregister.fhircore.engine.util.extension.extractId
import org.smartregister.fhircore.engine.util.extension.extractLogicalIdUuid
import org.smartregister.fhircore.engine.util.extension.filterByResourceTypeId
import org.smartregister.fhircore.engine.util.extension.find
import org.smartregister.fhircore.engine.util.extension.isExtractionCandidate
import org.smartregister.fhircore.engine.util.extension.isIn
Expand Down Expand Up @@ -583,23 +582,6 @@ constructor(
}
}

private suspend fun getLastActiveCarePlan(patientId: String): CarePlan? {
val carePlans =
withContext(dispatcherProvider.io()) {
fhirEngine
.search<CarePlan> {
filterByResourceTypeId(CarePlan.SUBJECT, ResourceType.Patient, patientId)
filter(
CarePlan.STATUS,
{ value = of(CarePlan.CarePlanStatus.COMPLETED.toCoding()) },
operation = Operation.OR,
)
}
.map { it.resource }
}
return carePlans.sortedByDescending { it.meta.lastUpdated }.firstOrNull()
}

private suspend fun getActiveListResource(patient: String): ListResource? {
val list =
withContext(dispatcherProvider.io()) {
Expand Down Expand Up @@ -637,47 +619,6 @@ constructor(
}
}

suspend fun loadTracing(patientId: String): List<Task> {
val tasks =
withContext(dispatcherProvider.io()) {
fhirEngine
.search<Task> {
filter(Task.SUBJECT, { value = "Patient/$patientId" })
filter(
TokenClientParam("code"),
{
value =
of(
CodeableConcept()
.addCoding(
Coding(
"http://snomed.info/sct",
"225368008",
null,
),
),
)
},
)
filter(
Task.STATUS,
{ value = of(Task.TaskStatus.READY.toCode()) },
{ value = of(Task.TaskStatus.INPROGRESS.toCode()) },
operation = Operation.OR,
)
filter(
Task.PERIOD,
{
value = of(DateTimeType.now())
prefix = ParamPrefixEnum.GREATERTHAN
},
)
}
.map { it.resource }
}
return tasks.filter { it.status in arrayOf(TaskStatus.READY, TaskStatus.INPROGRESS) }
}

fun saveResource(resource: Resource) {
viewModelScope.launch { defaultRepository.save(resource = resource) }
}
Expand Down
3 changes: 3 additions & 0 deletions android/quest/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ dependencies {
kapt("androidx.room:room-compiler:2.6.1")
implementation("androidx.room:room-ktx:2.6.1")

implementation("com.github.bumptech.glide:glide:4.16.0")
kapt("com.github.bumptech.glide:compiler:4.16.0")

androidTestImplementation(Deps.atsl.ext_junit)
androidTestImplementation(Deps.atsl.espresso)
debugImplementation("androidx.compose.ui:ui-test-manifest")
Expand Down
2 changes: 0 additions & 2 deletions android/quest/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:networkSecurityConfig="@xml/network_security_config"
android:supportsRtl="true"

android:theme="@style/AppTheme.NoActionBar"
tools:ignore="UnusedAttribute">

Expand Down

0 comments on commit be6354f

Please sign in to comment.