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

define backend query building insert function #89

Closed fzhao99 closed 1 month ago

fzhao99 commented 1 month ago

PULL REQUEST

Backend insertion function needed for query building.

Summary

You can visit and see the below changes at {basePath}/queryBuilding on this test branch

https://github.com/user-attachments/assets/6f9890de-8db1-41df-83ce-11da857a1634

Related Issue

Fixes #70 and begins implementation of #72

Acceptance Criteria

Builds out a test page at /queryBuilding that just accepts the query name and then inserts a custom query with a hardcoded group of valuesets to make sure the insertion flow works. Will build off this UI as we iteratively build it out to match the designs.

Will hide this from the UI navigation until it's ready

linear[bot] commented 1 month ago

QUE-29 Define backend query creation spec and functions

fzhao99 commented 1 month ago

Also, how should we approach testing this work? Unless I'm missing something we don't have much by the way of tests written.

Good question! Ideally we'd have an integration test that does an insert / validates the database state that it did the query insert / cascading joins correctly. Since we don't have the integration test setup currently though, I elected to at least have the manual route with the test branch to show that the happy path works. Once we get the integration tests working again, happy to write a test that validate the query gets created correctly when fed the right frontend input.

In the meantime, once we get enough of the frontend built to warrant an e2e, would also be happy to write one of those to cover a more interesting chunk of the feature.

If we have a thought for how to test thing as is, however, I'm all ears.