Giter VIP home page Giter VIP logo

hapi-fhir-android-integration-test's People

Contributors

botunge avatar jamesagnew avatar jpventura avatar thomasandersenatsse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hapi-fhir-android-integration-test's Issues

XMLParser error & PipeParser for Android.

  IParser parser = FhirContext.forDstu2().newJsonParser();
                parser.setPrettyPrint(true);
                String jsonDump = parser.encodeResourceToString(patient);

This prints proper Patient JSON but while using newXMLParser I am getting this error

detailMessage = "Unable to initialize StAX - XML processing is disabled"
cause = {FactoryConfigurationError@13489} "javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.XMLOutputFactoryBase not found"

I have added following gradle dependencies :

{
    implementation "javax.xml.stream:stax-api:1.0-2" // for fhir xml parsing
    implementation "ca.uhn.hapi.fhir:hapi-fhir-android:5.1.0"
    implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:5.1.0"

}

configurations {
    all*.exclude group: 'org.codehaus.woodstox'
    all*.exclude group: 'org.apache.httpcomponents'
}

Q1: How to resolve this XML parser error ?

Q2: I can convert the Patient data in HL7 Pipes/Segments data in Android ?
In java we can use this link and this as reference. I want to achieve similar behavior in Android without using ADT_A01 object- hapi-base-2.2.jar

Not working with okhttp3

using okhttp3 version :

 implementation(platform("com.squareup.okhttp3:okhttp-bom:4.9.1"))
    implementation("com.squareup.okhttp3:okhttp")
    implementation("com.squareup.okhttp3:logging-interceptor")

and fhir version:

  implementation ('ca.uhn.hapi.fhir:hapi-fhir-android:5.4.0')
    implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-r4:5.4.0"

but getting error on:
client!!.search().forResource(Patient::class.java)
.where(ReferenceClientParam("organization").hasId(managingOrgRefId))
.prettyPrint()
.returnBundle(Bundle::class.java)
.execute()

error:
Process: com.ehr.myairmed, PID: 18952 java.lang.NoClassDefFoundError: Failed resolution of: **Lokhttp3/internal/Version;** at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.addUserAgentHeader(OkHttpRestfulClient.java:130) at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.addHeadersToRequest(OkHttpRestfulClient.java:123) at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.initBaseRequest(OkHttpRestfulClient.java:76) at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.createGetRequest(OkHttpRestfulClient.java:112) at ca.uhn.fhir.rest.client.impl.BaseHttpClientInvocation.createHttpRequest(BaseHttpClientInvocation.java:77) at ca.uhn.fhir.rest.client.method.HttpGetClientInvocation.asHttpRequest(HttpGetClientInvocation.java:106) at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:266) at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:540) at ca.uhn.fhir.rest.client.impl.GenericClient$FetchConformanceInternal.execute(GenericClient.java:832) at ca.uhn.fhir.rest.client.impl.RestfulClientFactory.validateServerBase(RestfulClientFactory.java:300) at ca.uhn.fhir.rest.client.impl.RestfulClientFactory.validateServerBaseIfConfiguredToDoSo(RestfulClientFactory.java:264) at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:227) at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:540) at ca.uhn.fhir.rest.client.impl.GenericClient$SearchInternal.execute(GenericClient.java:1994) at com.ehr.myairmed.hl7.Hl7FhirHelper$getPatientList$1.invokeSuspend(Hl7FhirHelper.kt:71) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.internal.Version" on path: DexPathList[[zip file "/data/app/com.ehr.myairmed-PmBruunO0gzf42vs1DzCoA==/base.apk"],nativeLibraryDirectories=[/data/app/com.ehr.myairmed-PmBruunO0gzf42vs1DzCoA==/lib/arm64, /data/app/com.ehr.myairmed-PmBruunO0gzf42vs1DzCoA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.addUserAgentHeader(OkHttpRestfulClient.java:130)  at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.addHeadersToRequest(OkHttpRestfulClient.java:123)  at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.initBaseRequest(OkHttpRestfulClient.java:76)  at ca.uhn.fhir.okhttp.client.OkHttpRestfulClient.createGetRequest(OkHttpRestfulClient.java:112)  at ca.uhn.fhir.rest.client.impl.BaseHttpClientInvocation.createHttpRequest(BaseHttpClientInvocation.java:77)  at ca.uhn.fhir.rest.client.method.HttpGetClientInvocation.asHttpRequest(HttpGetClientInvocation.java:106)  at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:266)  at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:540)  at ca.uhn.fhir.rest.client.impl.GenericClient$FetchConformanceInternal.execute(GenericClient.java:832)  at ca.uhn.fhir.rest.client.impl.RestfulClientFactory.validateServerBase(RestfulClientFactory.java:300)  at ca.uhn.fhir.rest.client.impl.RestfulClientFactory.validateServerBaseIfConfiguredToDoSo(RestfulClientFactory.java:264)  at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:227)  at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:540)  at ca.uhn.fhir.rest.client.impl.GenericClient$SearchInternal.execute(GenericClient.java:1994)  at com.ehr.myairmed.hl7.Hl7FhirHelper$getPatientList$1.invokeSuspend(Hl7FhirHelper.kt:71)  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)  I/Process: Sending signal. PID: 18952 SIG: 9
Ques 1:
How to resolve this ??

Ques 2:
How to parse getPatientsList response using Retrofit.
I am using Call getPatients, I am getting correct response Retrofit isn't mapping the response.

Update to Android 11 (API Level 29)

A long time has passed since this project was updated to the latest version of Android.

It would be nice to migrate it to the latest stable version of Android Jetpack.

Hapi FHIR Android with Kotlin

About

Since 2019, Kotlin is Google preferred language for Android development.

The migrations is quite simple, the only required is the SDK update to its latest version (see issue #3).

Requires

  • #4 Update to Android 11 (API 29)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.