cqframework / clinical-reasoning

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

FHIR Repository API (in-memory) #312

Closed c-schuler closed 1 year ago

c-schuler commented 1 year ago

Added an in-memory repository with search functionality and tests.

Question for reviewer: Is the search functionality needed for the Bundle repository? (It is an easy add if it is needed)

c-schuler commented 1 year ago

@barhodes I appreciate the contributions to this PR. However, I would like to know why these changes are necessary. It would have been nice to have you review the code and request changes that I could apply. One change I added that you rolled back was ignoring the provided resource ID for the create operation (as the spec outlines). What is the reasoning to not ignore the ID? How does create differ from the update operation?

barhodes commented 1 year ago

@barhodes I appreciate the contributions to this PR. However, I would like to know why these changes are necessary. It would have been nice to have you review the code and request changes that I could apply. One change I added that you rolled back was ignoring the provided resource ID for the create operation (as the spec outlines). What is the reasoning to not ignore the ID? How does create differ from the update operation?

I ran into issues using the IdDt type when matching that were resolved by using the Ids helper like we did in the TestRepository. Looks like I got a little overzealous in merging those on the create and missed the random id getting created. I'll correct that. The rest of the changes were all done to ensure compatibility with hapi-fhir so the search parameters work correctly when using the Clinical Reasoning module against Smile CDR.

c-schuler commented 1 year ago

Thanks for the info! So this PR is kind of in a weird state as you are both a contributor and a reviewer. Should I review your code or will someone else be providing that review?

barhodes commented 1 year ago

Yeah, I've asked JP to review. You are more than welcome to review as well.