CDCgov / dibbs-query-connector

A FHIR client allowing public health agencies to query health care organizations directly or via a TEFCA QHIN
Creative Commons Zero v1.0 Universal
4 stars 0 forks source link

Add loading page for inserting eRSD data into the DB #123

Closed m-goggins closed 1 week ago

m-goggins commented 2 weeks ago

PULL REQUEST

Summary

This PR adds a simple button to the "My Queries" page that when triggered (and Brandon's work on QUE-40 is complete) will allow users to insert data into the DB.

Context: We decided to move the data insertion to be triggered by an admin user after the service has been spun up. This will drastically simplify the data insertion process and potentially make the data in the DB more transparent to users (as they will now have to click to make it available). We are imagining that this button will live on the admin page in the future, but recognize that the designs for this page haven't yet been drawn up so I added the button as temporary placeholder on the "My Queries" page.

Related Issue

Fixes #121

Additional Information

image

Checklist

mikang commented 1 week ago

What is this?

m-goggins commented 1 week ago

What is this?

@mikang Pretty much what the summary + context say. We need a way to insert data to make the valuesets available and after trying to do it automatically during start up, we came to the conclusion that we need users to execute the task after start up. Since various leads are have been out this week, we opted to have a temporary placeholder and discuss designs + research during planning next week.

mikang commented 1 week ago

What is this?

@mikang Pretty much what the summary + context say. We need a way to insert data to make the valuesets available and after trying to do it automatically during start up, we came to the conclusion that we need users to execute the task after start up. Since various leads are have been out this week, we opted to have a temporary placeholder and discuss designs + research during planning next week.

I guess I'm wondering who the "user" is. Is this for us internally, or for the end user? Do all end users for this page know what "Add eRSD data" means? How/why is this related to "My queries"?

m-goggins commented 1 week ago

Ah, I don't think the research and design have been scoped out for this since the engineers came to the conclusion for this feature on Wednesday afternoon so I think your questions are all fair. In my mind, the "user" is someone at the admin level who is helping to initially set up the query connector at a jurisdiction. The button only needs to be pressed once after set up to make all of the eRSD valueset data available for all users. The language is totally up for debate; I think you're right that eRSD may not be intuitive to users right now. It could be something like "Add Valusets" if that is clearer.

The button I added here is just a placeholder (and everything can be changed) but it was blocking Brandon's work to not have it included.

mikang commented 1 week ago

I see. Would it be strange to have "Activate eRSD value sets (Advanced)" under the Admin settings gear icon on the top right side? Is this something that only we need (so we don't block Brandon's work) until we have a Settings page?

mikang commented 1 week ago

Also, do all jurisdictions need this? Wondering if we just default populate with eRSD value sets, so users don't have to click a button. I'm not as familiar with this action!

m-goggins commented 1 week ago

We tried to do it automatically, but it was pushing the limits of what our current tech stack can do in a way that is robust, i.e., we couldn't be confident that we could do this automatically on start up in a non-hacky way. I'm not 100% certain that all jurisdictions would want to automatically load the data, but we definitely want to work it into the set-up/admin flow so that it's very obvious to users that they can automatically add the valuesets to their database if they want to. While a button is maybe not the ideal, one potential benefit to it is that we can have some language around what the valuesets are and where they come from to potentially give users more confidence in using them.

m-goggins commented 1 week ago

@mikang Added it to the gear icon and removed from My Queries, knowing that we will eventually move it to the Settings page

image

mikang commented 1 week ago

I like the idea of being able to explain value sets. What value sets do we currently use? I'm wondering about a page like this (I'm still fuzzy on this feature, so you'll need to fill in the copy 😊)

image
mikang commented 1 week ago

@mikang Added it to the gear icon and removed from My Queries, knowing that we will eventually move it to the Settings page

image

Oh! Perfect! Could you please make the width of the menu larger? So that "Add eRSD value sets (Advanced)" is on one line

m-goggins commented 1 week ago

I'd be happy to sync quickly to bring you up to speed on what the button would do behind the scenes.

mikang commented 1 week ago

synced with @m-goggins IRL on slack huddle.

  1. Marcelle is going to look into an automatic eRSD load when the user clicks on "Create query" for the first time. In that case, it may take a few min to set up, so we'd have a loading screen
  2. Other option is to add a screen that says to load the value set (one time deal)

TBD on update depending on what Marcelle finds for number 1!

mikang commented 1 week ago

loading screen @m-goggins

is it true that they can navigate away?

image
m-goggins commented 1 week ago

@mikang I was able to get a loading page up whilethe data base creation (getting and inserting valuesets) runs in the background. I'm not sure why I can't get the actual database function to run, but that is beyond the scope of this ticket, and I just put in a 5s pause to display the loading page and then return to the My Queries page.

image

Now the flow will look like Click on Create Query -> put up loading screen & load eRSD data -> redirect to the query building page.

@fzhao99 and @robertandremitchell I asked for a re-review to make sure this new flow doesn't impact the work you are doing and to make sure it complies with the setup you've started under /queryBuilding.

mikang commented 1 week ago

Yay! Looks great