FHIR Chat · help · fhirbase

Stream: fhirbase

Topic: help


view this post on Zulip Zoltan Simon (Feb 23 2019 at 19:10):

Is it possible to pass a connection string directly (heroku) to fhirbase or I have to split it up into the variables?

view this post on Zulip nicola (RIO/SS) (Feb 25 2019 at 08:18):

@Mikhail Lapshin ?

view this post on Zulip Mikhail Lapshin (Feb 25 2019 at 09:45):

@Zoltan Simon Now you need to split it into discrete parts.

view this post on Zulip Zoltan Simon (Feb 25 2019 at 10:37):

thx, done it. I was just lazy and asked here first :)

view this post on Zulip Zoltan Simon (Feb 25 2019 at 10:38):

Yet another question. I have tried to combined fhirbase + hasura.io to achieve a GraphQL enabled fhir implementation with zero effort. I have a working PoC but I've realized that fhirbase not really modeling FHIR with fields but Jsonb, so hasura.io cannot pick up the schema. The queuing is not so convenient (compliant) this way. Have you done such an experiment?

view this post on Zulip nicola (RIO/SS) (Feb 25 2019 at 13:01):

I wrote to hasura.io guys about jsonb support - let see :)

view this post on Zulip Zoltan Simon (Feb 25 2019 at 13:46):

They support it... I can query the db , It is just not convinient... because the jsonb is "schemeless" ... you cannot write query like this:

{
  patient {
    resource {
      name
    }
  }
}

you get an error like this:

{
  "errors": [
    {
      "extensions": {
        "path": "$.selectionSet.patient.selectionSet.resource",
        "code": "validation-failed"
      },
      "message": "field \"resource\" must not have a selection since type jsonb! has no subfields"
    }
  ]
}

view this post on Zulip Grahame Grieve (Feb 26 2019 at 01:50):

have you looked at the published graphql schema?

view this post on Zulip Zoltan Simon (Feb 26 2019 at 08:07):

You mean from hasura? Or, is there a graphql schema on the hl7 site?

view this post on Zulip nicola (RIO/SS) (Feb 26 2019 at 08:08):

It's not schemaless, but the schema is outside database - is there the way to provide a schema to hasura engine?

view this post on Zulip Zoltan Simon (Feb 26 2019 at 08:12):

hmm, I think hasura's promise is to autogenerate the schema from the DB. They have schema stitching, but I think that is something else. I will look into it if I can inject schemas. Are the schemas in the fhirbase/fhirbase repo?

view this post on Zulip nicola (RIO/SS) (Feb 26 2019 at 08:13):

there is official json schema and some custom metadata in fhirbase

view this post on Zulip nicola (RIO/SS) (Feb 26 2019 at 08:13):

in which format hasura expect schema?

view this post on Zulip Zoltan Simon (Feb 26 2019 at 08:16):

No idea yet... :) I need to do a little research first... (I am on it) from @Grahame Grieve it sounds fhir already have GraphQL schemas documented. I found one here : https://github.com/Asymmetrik/graphql-fhir but there might be more official versions too.

view this post on Zulip nicola (RIO/SS) (Feb 26 2019 at 08:20):

http://hl7.org/fhir/graphql.html

view this post on Zulip Zoltan Simon (Feb 26 2019 at 08:24):

I see this is a spec...how to implement a server ...

view this post on Zulip Zoltan Simon (Feb 26 2019 at 10:16):

So Hasura has an open request on this topic...https://github.com/hasura/graphql-engine/issues/1598 I will test it when it is available.

view this post on Zulip nicola (RIO/SS) (Feb 28 2019 at 09:19):

I've started a discussion with Hasura - let see

view this post on Zulip Andy Sanchez (Mar 25 2019 at 18:37):

HI. In the db console of an Aidbox box, is it possible to use the public Api functions of FHIRbase?. For example, I'm trying the query
"SELECT fhir_search ('{" resourceType ":" Patient "," queryString ":" name = smith "}');"
but it throws the following error "ERROR: function fhir_search (unknown) does not exist Hint: No function matches the given name and argument types You might need to add explicit type casts". Can someone tell me what this error is about?

view this post on Zulip nicola (RIO/SS) (Mar 25 2019 at 20:04):

No aidbox is built on top of next version of aidbox, which do this on application level

view this post on Zulip nicola (RIO/SS) (Mar 25 2019 at 20:05):

If you look at bundle in REST console after search - you will see the sql query, which was generated

view this post on Zulip Andy Sanchez (Mar 25 2019 at 20:42):

is it possible to connect directly to the PostgresSQL database that Aidbox provides you from some client (e.g pgAdmin) or an external app, I mean without using the REST API? Sorry if this question does not belong to this stream, I did not know where to put it exactly

view this post on Zulip nicola (RIO/SS) (Mar 25 2019 at 20:51):

We do not yet provide direct connection to Aidbox.Cloud - with Aidbox.One or Enterprise you will have the complete controll on it. If you want to reverse engeenier little bit - install Aidbox.Dev :) https://docs.aidbox.app/installation/setup-aidbox.dev

view this post on Zulip Andy Sanchez (Apr 22 2019 at 20:13):

Hi. I'm looking for denormalize some data that is store in FHIR standar in order to create a relational model for a Data Warehouse and then doing some analytics. My data source is a database with fhirbase schema. Do you know some articles or something that could point me in the rigth direction? I've been searching about this a lot, but I've couldn't find anything useful yet. Thanks

view this post on Zulip Lloyd McKenzie (Apr 22 2019 at 21:56):

I don't know that there's anything FHIR-specific about the problem. How you denormalize is going to be dependent on the types of queries you want to run in your warehouse...

view this post on Zulip nicola (RIO/SS) (Apr 23 2019 at 05:05):

Hello @Andy Sanchez , first of all you can create flat materialized view.

view this post on Zulip nicola (RIO/SS) (Apr 23 2019 at 05:07):

if you want to move your data to another database, you can use ‘copy to csv’.

view this post on Zulip nicola (RIO/SS) (Apr 23 2019 at 05:09):

or you can use logical replication to stream changes to analytical database.

view this post on Zulip nicola (RIO/SS) (Apr 23 2019 at 05:09):

Which is your case?

view this post on Zulip nicola (RIO/SS) (Apr 23 2019 at 05:11):

In aidbox we are working to make flattening process as declarative as possible.

view this post on Zulip nicola (RIO/SS) (Apr 23 2019 at 05:13):

https://docs.aidbox.app/api/bulk-api#usddump-sql

view this post on Zulip nicola (RIO/SS) (Apr 23 2019 at 05:15):

If you describe what kind of ‘denormalization’ you need - i will add it to example section

view this post on Zulip Andy Sanchez (Apr 23 2019 at 14:36):

Hello, thanks for the reply. Actually, my case is more related to the mapping between the different FHIR resources and the relational tables, not the tool that I would use to load the data. Something like a specification to perform this mapping. According to Lloyd, there does not seem to be anything like this, it seems that it depends on the specific information that one wants to have in the DW. Anyway thanks guys again.

view this post on Zulip nicola (RIO/SS) (Apr 23 2019 at 16:46):

Yes FHIR resources could not be flattened without your data nature knowledge. A simple example is a Patient.name - if you know you only have one official name you can flatten SELECT resource#>>{name,0,family} as last, resource#>>{name,0,given,0} as first , but FHIR model is richer - so to 1x1 map it to relations you will get patient_name table and probably patient_name_given :)


Last updated: Apr 12 2022 at 19:14 UTC