Enable HFQL - fhir-jpaserver-starter

84 views
Skip to first unread message

Frank McDam

unread,
Jul 7, 2024, 1:06:23 PM7/7/24
to HAPI FHIR
Hi

I'd like to enable the HFQL module, is it possible to do that on the jpaserver starter project?

" When HFQL is enabled on the server"

There's no reference in the application.yaml file, only on the Smile CDR website...

Quite new to this, so appreciate it any help.

Cheers
Frank







Frank

unread,
Jul 7, 2024, 4:47:32 PM7/7/24
to HAPI FHIR
I'll reply to myself just because I don't see any other topics on this and may be of use in future
The setting on the Smile CDR website does indeed work when added to the Application.yaml file

    hfql.endpoint.enabled: true

Now there is a different issue.
Download HFQL driver hapi-fhir-hfql-jdbc-7.2.1.jar
Configure in DBeaver:

URL: jdbc:hapifhirql://localhost:8080/fhir
When I connect I receive this connection message.
HAPI FHIR
7.2.1
HAPI FHIR FQL JDBC
7.2.1

Attempting to run a basic query
SELECT
id as id name[0].family as family, name[0].given[0] as given, birthDate, FROM Patient

This error:
SQL Error: HAPI-2400: null
org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error: HAPI-2400: null
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:133)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:615)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$2(SQLQueryJob.java:506)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:192)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:525)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:977)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:4176)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:123)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:192)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:121)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$ResultSetDataPumpJob.run(ResultSetViewer.java:5154)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:117)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.sql.SQLException: HAPI-2400: null
at ca.uhn.fhir.jpa.fql.jdbc.RemoteHfqlExecutionResult.<init>(RemoteHfqlExecutionResult.java:110)
at ca.uhn.fhir.jpa.fql.jdbc.HfqlRestClient.execute(HfqlRestClient.java:94)
at ca.uhn.fhir.jpa.fql.jdbc.JdbcStatement.execute(JdbcStatement.java:125)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:330)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
... 12 more
Caused by: org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:187)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at ca.uhn.fhir.jpa.fql.jdbc.RemoteHfqlExecutionResult.<init>(RemoteHfqlExecutionResult.java:103)
... 16 more
Caused by: org.apache.http.ProtocolException: Target host is not specified
at org.apache.http.impl.conn.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:71)
at org.apache.http.impl.client.InternalHttpClient.determineRoute(InternalHttpClient.java:125)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
... 19 more


I've tried jdbc:hapifhirql://localhost:8080 - same error

I've tried in DB Visualizer and it work exactly like above.

Any other ideas?
Reply all
Reply to author
Forward
0 new messages