Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes for CQL-related functions #3093

Merged
merged 3 commits into from
Dec 14, 2021
Merged

Bug fixes for CQL-related functions #3093

merged 3 commits into from
Dec 14, 2021

Conversation

csandersdev
Copy link
Contributor

This PR addresses a number of issues related to the CQL / clinical reasoning module.

#3061 - Added more robust reference resolution and better error handling
#2618 - Added error handling for the unsupported features. Keeping that issue open for future implementation of the feature.
#3064 - Clearing the meta.versionId on posted resources now. After discussing with the team, it is a known limitation that users will not be able to post the same resource twice as input to this operation. It will fail during the bundle processing.
#3084 - Switched the parameter resolution from SearchParameter.name to SearchParameter.code to deal with the fact that us-core parameter names do not match the code value like they do in the core parameter definitions.

references both by resource ID and canonical URL (previously only
canonical URL) and then to also to provide error handling for when the
measure does not properly resolve.

This PR also relates to the missing feature support documented in #2618
not by implementing those features, but by adding error handling that
clearly states to the user those features are not supported at this
time.

Signed-off-by: Corey Sanders <corey.thecolonel@gmail.com>
* The primary change here is to remove the meta.versionId from any
resources that are posted with the meta section intact. This provides
some improvement to the function.
* The next thing I did was to improve the error handling such that a
FHIROperationException from the underlying bundle persistence is bubbled
up to the end user vs. being wrapped and obscured.
* Lastly, I added additional unit and server tests to prove behavior
including with the real-world example provided by QA.

Signed-off-by: Corey Sanders <corey.thecolonel@gmail.com>
In the base parameter definitions, the parameter name and parameter code
values match. The parameter resolver code used the name for comparisons
and lookup and that functions just fine. The us-core parameter
definition name and code do not match up and the name value isn't useful
from a comparison and lookup point of view. I switched everything over
to use the code value and that works better both with and without
us-core installed.

Signed-off-by: Corey Sanders <corey.thecolonel@gmail.com>

String expression = "[Encounter] e where e.status = 'finished'";

Parameter pSubject = Parameter.builder().name(fhirstring(CqlOperation.PARAM_IN_SUBJECT)).value(fhirstring("Patient/" + patient.getId())).build();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't need to use fhirstring any more, you can pass your java string directly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is consistent with the rest of the code in this class. I think it is probably good to leave it as-is unless we want to go through and update all the tests to use the new model methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants