Skip to content

Commit

Permalink
EA-1227 Updated to 1.3.1 and added getFHIR example (#62)
Browse files Browse the repository at this point in the history
* EA-1227 getFhir Example

* use nexus over local

* EA-1227 Updated to 1.3.1

---------

Co-authored-by: Carter Wooten <[email protected]>
  • Loading branch information
katekolchier and wootencl authored Aug 7, 2024
1 parent 7abd89c commit 35bc731
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bwell-kotlin-android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ android {
dependencies {

// BWell SDK Usage
implementation("com.bwell:bwell-sdk-kotlin:1.2.6")
implementation("com.bwell:bwell-sdk-kotlin:1.3.1")

implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ import androidx.navigation.fragment.findNavController
import com.bwell.common.models.domain.consent.enums.ConsentCategoryCode
import com.bwell.common.models.domain.consent.enums.ConsentProvisionType
import com.bwell.common.models.domain.consent.enums.ConsentStatus
import com.bwell.common.models.requests.searchtoken.SearchDate
import com.bwell.core.config.types.BWellConfig
import com.bwell.core.config.types.KeyStoreConfig
import com.bwell.core.config.types.LogLevel
import com.bwell.core.config.types.RetryPolicy
import com.bwell.core.network.auth.Credentials
import com.bwell.device.requests.deviceToken.DevicePlatform
import com.bwell.device.requests.deviceToken.RegisterDeviceTokenRequest
import com.bwell.healthdata.requests.fhir.FhirRequest
import com.bwell.healthdata.requests.fhir.GetFhirSearchDate
import com.bwell.healthdata.requests.fhir.enums.ResourceType
import com.bwell.sampleapp.BWellSampleApplication
import com.bwell.sampleapp.R
import com.bwell.sampleapp.singletons.BWellSdk
Expand All @@ -31,6 +35,8 @@ import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.launch
import java.io.IOException
import java.io.InputStream
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Properties


Expand Down Expand Up @@ -192,6 +198,28 @@ class LoginFragment : Fragment() {
.build()
createConsent(createConsentRequest)

val dateFormat = SimpleDateFormat("yyyy")
val request = FhirRequest.Builder()
.resourceType(ResourceType.OBSERVATION)
.lastUpdated(
GetFhirSearchDate.Builder()
.greaterThan(dateFormat.parse("2024"))
.build()
)
.ids(listOf(
"5884a0f8-3d08-4077-a7fc-1817e5b8ce35",
"aab81d50-e53d-45e8-a881-fc22eb2f253f",
"3310e4f4-4a97-47fe-b0ed-7805421aa322",
"fd3fb48c-3565-40fb-be32-9ae014ad2860",
"875ff908-2ebe-46bf-8fe4-72644d7d039f",
"dfd1d287-2b84-45e0-bd5f-39c8c5efca2a"
))
.page(0)
.pageSize(20)
.build()
val result = BWellSdk.health.getFhir(request)
println(result.toString())

Log.i(TAG, "Finished initializing SDK")

findNavController().navigate(R.id.nav_home)
Expand Down
2 changes: 1 addition & 1 deletion bwell-kotlin-android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ dependencyResolutionManagement {
}

rootProject.name = "MyTestApp"
include(":app")
include(":app")
2 changes: 1 addition & 1 deletion bwell-typescript-react/src/store/connectionSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const getMemberConnections = createAsyncThunk(
);

const INITIAL_STATE = {
memberConnections: null as null,
memberConnections: null,
dataSource: null,
loading: false,
error: null as string | null,
Expand Down

0 comments on commit 35bc731

Please sign in to comment.