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

Vs insertion check #108

Closed bamader closed 3 weeks ago

bamader commented 3 weeks ago

Sanity Check Value Set Insertion

Summary

This PR introduces a function that verifies that a value set has been successfully inserted into our Postgres DB. Given a FHIR-formatted value set, the function checks that the value set itself has been inserted, all related concepts have been inserted, and all foreign key associations between the two are stored in the relevant tables. This PR also corrects a bug that was introduced when trying to add external IDs, namely that ValueSet IDs were having the version appended twice, which was causing cascading failures when inserting.

Related Issue

Fixes https://github.com/CDCgov/dibbs-query-connector/issues/84

Additional Information

As usual, I've built a test branch with a button that allows you to check the integrity of the insertion and sanity counting code. It's accessible here: https://github.com/CDCgov/dibbs-query-connector/tree/test-vs-count . Start the app, open the console, then click the button to see some tests happen.