Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hapi-fhir-cli for upload of custom terminology #1168

Open
ozhyrenkov opened this issue Jun 1, 2023 · 1 comment
Open

hapi-fhir-cli for upload of custom terminology #1168

ozhyrenkov opened this issue Jun 1, 2023 · 1 comment
Assignees
Labels

Comments

@ozhyrenkov
Copy link

Hello,
Recently I set up a new fresh installation of Snowowl and trying to upload few basic terminologies using popular hapi-fhir-cli tool:

hapi-fhir-cli upload-terminology  -b PROMPT -l -s 1GB -d Loinc_2.72.zip -v r4 -u http://loinc.org -t http://myserver:8080/snowowl/fhir 

However this gives me an error which makes me think fhir/CodeSystem/$upload-external-code-system is not implemented in SnowOwl or I might be doing something totally wrong.

Could anyone please advise me whether I am doing something wrong or what is the way to upload e.g. official Loinc terminology package?

Stacktrace:

hapi-fhir-cli upload-terminology  -b PROMPT -l -s 1GB -d Loinc_2.72.zip -v r4 -u http://loinc.org -t http://myserver:8080/snowowl/fhir
------------------------------------------------------------
🔥  HAPI FHIR 6.4.4 - Command Line Tool
------------------------------------------------------------
Max configured JVM memory (Xmx) : 4.0GB
Detected Java version           : 20.0.1
------------------------------------------------------------
2023-06-02 00:05:49.88 [main] INFO  c.u.f.c.LogbackUtil Logging configuration set from file /logback-cli-on.xml
Enter Basic Auth Credentials (format is "username:password"):
2023-06-02 00:05:57.95 [main] INFO  c.u.f.c.UploadTerminologyCommand Reading /Users/$me/Downloads/Loinc_2.72.zip
2023-06-02 00:05:57.95 [main] INFO  c.u.f.c.UploadTerminologyCommand Adding ZIP file: Loinc_2.72.zip
2023-06-02 00:05:59.33 [main] INFO  c.u.f.c.UploadTerminologyCommand Beginning upload - This may take a while...
2023-06-02 00:06:02.08 [main] ERROR ca.uhn.fhir.cli.App Error during execution:
ca.uhn.fhir.rest.client.exceptions.FhirClientConnectionException: HAPI-1361: Failed to parse response from server when performing POST to URL http://myserver:8080/snowowl/fhir/CodeSystem/$upload-external-code-system - java.net.SocketException: Broken pipe
	at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:419)
	at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:541)
	at ca.uhn.fhir.rest.client.impl.GenericClient$OperationInternal.execute(GenericClient.java:1320)
	at ca.uhn.fhir.cli.UploadTerminologyCommand.invokeOperation(UploadTerminologyCommand.java:230)
	at ca.uhn.fhir.cli.UploadTerminologyCommand.run(UploadTerminologyCommand.java:134)
	at ca.uhn.fhir.cli.BaseApp.run(BaseApp.java:266)
	at ca.uhn.fhir.cli.App.main(App.java:43)
Caused by: java.net.SocketException: Broken pipe
	at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:413)
	at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:433)
	at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:812)
	at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1120)
	at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:124)
	at org.apache.http.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:160)
	at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:113)
	at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:112)
	at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:156)
	at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:152)
	at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238)
	at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
	at ca.uhn.fhir.rest.client.apache.ApacheHttpRequest.execute(ApacheHttpRequest.java:70)
	at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:322)
	... 6 common frames omitted
2023-06-02 00:06:02.09 [Thread-0] INFO  ca.uhn.fhir.cli.App HAPI FHIR is shutting down...
@cmark
Copy link
Member

cmark commented Jun 2, 2023

Hi @ozhyrenkov,

The open-source version of Snow Owl does not support write operations from the FHIR API specification. That requires additional modules and a license of our Snow Owl Pro version. Please contact us here if you'd like to know more.

Best,
Mark

@cmark cmark self-assigned this Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants