opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://opensrp.io
Apache License 2.0
56 stars 58 forks source link

FHIR data from Big Querry to Superset dashboards #1154

Closed AnnieMungai closed 2 years ago

AnnieMungai commented 2 years ago

Is your feature request related to a problem? Please describe. With OpenSRP moving to a FHIR based product, the data model will change. The data will now be pulled from the HAPI server to the Big Query and from the Big Query to Superset.

Describe the solution you'd like

Could be linked to the completion of this issue: https://github.com/onaio/canopy/issues/2637

alepietrobon commented 2 years ago

thanks. i think we need to break this down because this is not a single ticket but more of an entire epic.

AnnieMungai commented 2 years ago

@alepietrobon

muneneg commented 2 years ago

@AnnieMungai I have been able to figure out part 3, the sample query can be found here

This query creates the table that can be used to calculated the sample indicators you had shared

For part 2 I think that is still work in progress.

For part 1, we are still learning, for now we used only 1 table.

cc @alepietrobon

Gental-Giant commented 2 years ago

For part 2 : Pulling from bigquery to akuko

@AnnieMungai @alepietrobon @mberg

pld commented 2 years ago

I've updated this issue title and description to be about Superset, hopefully we can use the same or only slightly varied BigQuery queries in another other viz platform we use

dubdabasoduba commented 2 years ago

@muneneg For the representation of the indicators in this list here are the list of resources to fetch.

Household/family -- We are representing this on the Group Resource. Here is a sample of the Group.

How to structure the Query.

Household/Family members -- We are now referencing this on the member attribute on the Group resource.

This reflects the latest changes on how to represent a household on FHIR. Documented here

Please feel free to reach out for more information.

cc: @AnnieMungai @alepietrobon

alepietrobon commented 2 years ago

hi @dubdabasoduba , thanks for this. I remember the discussion on the family implementation as group, glad that's already done.

Just confirming, we don't expect any big changes to the data model for these indicators going forward, right?

dubdabasoduba commented 2 years ago

hi @dubdabasoduba , thanks for this. I remember the discussion on the family implementation as group, glad that's already done.

Just confirming, we don't expect any big changes to the data model for these indicators going forward, right?

Yes, I don't think we will be changing how households are represented anymore.

pld commented 2 years ago

I agree it's unlikely we'll change the family representation, we presented this to the WHO FHIR working group as it's implemented here, so we're reasonably committed.

One thing I expect we'll add, but it's not relevant yet is a way to query the Group resource that filters only those that represent families, we don't need that now because we don't use groups for anything else

On Apr 27, 2022, at 10:06, Benjamin Mwalimu @.***> wrote:

 hi @dubdabasoduba , thanks for this. I remember the discussion on the family implementation as group, glad that's already done.

Just confirming, we don't expect any big changes to the data model for these indicators going forward, right?

Yes, I don't think we will be changing how households are represented anymore.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

AnnieMungai commented 2 years ago

@muneneg The family resources have been pushed to the BQ (see this issue). cc @dubdabasoduba @pld

pld commented 2 years ago

I'm closing this issue b/c we now have Big Query data in Superset dashboards, we can open a more specific issue about these other tasks