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.
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.
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.