Conversation
perform_multiple_or_search_test built its request from params_list.first but collected the values it expected back from every scratch resource for the patient. For a fixed value search with several values, such as the Simple Observation category search, the first value may have no data. The request is then constrained to that value while the expected values come from resources of other values, so the test fails against any conformant server. Against the example bundle the request was category=sdoh with every status OR'd, and the test expected final and cancelled from the activity Observations. No example Observation has category sdoh. Use the first params that the patient's scratch resources match, ignoring the multiple-or params that get replaced, and only expect values from those resources. Fixes inferno-framework#43
Author
CI resultsRun in the Helios FHIR Server CI: the server is loaded with
The one failure on No other test changed result. The remaining skip is the ADI documentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes inferno-framework#43.
SearchTest#perform_multiple_or_search_testbuilds its request fromparams_list.first, but collects the values it expects back from every scratch resource for the patient. For a fixed value search with several values, the first value may have no data. The request is then constrained to that value while the expected values come from resources of other values, so the test fails against any conformant server.With the example bundle, the Simple Observation
patient + category + statustest sends:and expects
finalandcancelled, which it gathered from theactivityObservations. No example Observation has categorysdoh, so the correct response is an empty Bundle and the test fails with:Change
params_listthat the patient's scratch resources actually match, ignoring the multiple-or params (they are replaced by the OR'd values) and the patient param.With the example bundle the request becomes
category=functional-status&patient=usqualitycore-patient&status=<all eight codes>, becausefunctional-statusis the first fixed category value the example patient has data for. The expected valuefinalcomes fromObservation/usqualitycore-simple-observation, the one resource with that category, so the multiple-or search is still exercised.cancelledis no longer expected from it, because the cancelled example Observation isactivityonly.Matching uses the existing
resource_matches_param?, the same checkcheck_resource_against_paramsapplies to every search result.Testing
Run in the Helios FHIR Server CI, which loads
client-example-resources/us_quality_core_bundle_patient.jsonand runs theus_quality_core_v100_ballotsuite withpatient_ids = usqualitycore-patient. Results to follow in a comment.