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

Missing resource error response when resource isn't needed #14

Open
alexisc0le opened this issue Mar 7, 2024 · 0 comments
Open

Missing resource error response when resource isn't needed #14

alexisc0le opened this issue Mar 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@alexisc0le
Copy link
Contributor

Describe the bug
When I populate a Questionnaire on Postman with a test patient that does not have a resource associated with a CQL Statement I get the following response - "Error encountered evaluating expression (Allergies) for item (patient-info|drug-allergies): Cannot invoke "java.util.List.stream()" because the return value of "org.opencds.cqf.fhir.cql.LibraryEngine.resolveExpression(String, org.opencds.cqf.fhir.cql.CqfExpression, org.hl7.fhir.instance.model.api.IBaseParameters, org.hl7.fhir.instance.model.api.IBaseBundle)" is null".

To Reproduce
(I have been having the issue on this branch- https://github.com/cqframework/cqf-us/tree/2024-Updates-Debugging)

  1. Post the MBODAQuestionnaire Bundle to Postman (/cqf-us/bundles/questionnaire/MBODAQuestionnaire/MBODAQuestionnaire-bundle.json)
  2. Post USCorePatient-2 Bundle to Postman
  3. Populate the Questionnaire with USCorePatient-2 (GET {{server}}/Questionnaire/MBODAQuestionnaire/$populate?subject=USCorePatient-2)
  4. OPTIONAL/TO COMPARE: Post USCorePatient-1 bundle to Postman and populate the Questionnaire with USCorePatient-1

Expected Behaviour
It is expected that we don’t get that error message, and that question just be skipped/left empty.

@brynrhodes brynrhodes added the bug Something isn't working label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants