FHIR Chat · HAPI 1.6 FHIR JPA Server - Terminology Upload · hapi

Stream: hapi

Topic: HAPI 1.6 FHIR JPA Server - Terminology Upload


view this post on Zulip Kevin Mayfield (Jul 13 2016 at 12:46):

I've tried running the cli tool against my JPA Server. Using the following

hapi-fhir-cli upload-terminology -d SNOMED/SnomedCT_RF2Release_INT_20150731.zip -f dstu3 -t http://localhost:8080/hapi-fhir-jpaserver/baseStu3 -u http://snomed.info/sct

When it starts it gives the following error:


? HAPI FHIR 1.6 - Command Line Tool


Max configured JVM memory (Xmx): 3.6GB
Detected Java version: 1.8.0_91


13:39:59 INFO ca.uhn.fhir.context.FhirContext - Creating new FHIR context for F
HIR version [DSTU3]
13:40:00 INFO c.u.f.cli.UploadTerminologyCommand - Beginning upload - This may
take a while...
13:40:01 INFO ca.uhn.fhir.util.XmlUtil - FHIR XML procesing will use StAX imple
mentation 'null' version 'null'
13:40:01 ERROR ca.uhn.fhir.cli.App - Error during execution:
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException: HTTP 400 Bad Request
: Invalid request: The FHIR endpoint on this server does not know how to handle
POST operation[$upload-external-code-system] with parameters [[]]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou

rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newIns
tance(BaseServerResponseException.java:272)
at ca.uhn.fhir.rest.client.BaseClient.invokeClient(BaseClient.java:306)
at ca.uhn.fhir.rest.client.GenericClient$BaseClientExecutable.invoke(Gen
ericClient.java:717)
at ca.uhn.fhir.rest.client.GenericClient$OperationInternal.execute(Gener
icClient.java:1524)
at ca.uhn.fhir.cli.UploadTerminologyCommand.run(UploadTerminologyCommand
.java:157)
at ca.uhn.fhir.cli.App.main(App.java:186)

Do I need to configure my server to support this command?

thanks

view this post on Zulip James Agnew (Jul 13 2016 at 13:43):

Hi Kevin- You need to add a specific provider to your server in order to enable terminology uploading. It occurred to me that this wasn't shown anywhere, so I've added an example at the bottom here: https://github.com/jamesagnew/hapi-fhir/blob/f6601cc347730e57ff8e91c7a04601b5d3fc40af/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java

I'd love to hear how this goes for you- you're possibly the first person to try this feature out!

view this post on Zulip Kevin Mayfield (Jul 13 2016 at 13:52):

Thanks. Will do.

view this post on Zulip Kevin Mayfield (Jul 13 2016 at 14:23):

Processed ok. I'll need to dig a little more to confirm it's worked ok

15:16:02 INFO c.u.f.cli.UploadTerminologyCommand - Response:
<Parameters xmlns="http://hl7.org/fhir">
<parameter>
<name value="conceptCount"/>
<valueInteger value="317057"/>
</parameter>
</Parameters>


Last updated: Apr 12 2022 at 19:14 UTC