cqframework / clinical-reasoning

CQF Clinical Reasoning on FHIR for Java
https://www.cqframework.org/clinical-reasoning/
Apache License 2.0
35 stars 29 forks source link

Implement Id SearchParameter for InMemoryRepository #351

Closed JPercival closed 1 year ago

JPercival commented 1 year ago

The InMemoryRepository located here indexes resources by Id, but does not take advantage of that when an _id parameter is passed. Instead, it scans through the list of resources and uses the ResourceMatcher to do the matching.

https://github.com/cqframework/clinical-reasoning/blob/master/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/InMemoryFhirRepository.java

We should change this to first look-up by Id if requested, and then apply any additional filters.

Sample CQL:

[Condition : id in {`123`}]

Acceptance criteria:

JPercival commented 1 year ago

Resolved by #353