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

resolve function in FHIRPATH expression #2296

Closed
dipanjanmukherjeeibm opened this issue Apr 28, 2021 · 2 comments
Closed

resolve function in FHIRPATH expression #2296

dipanjanmukherjeeibm opened this issue Apr 28, 2021 · 2 comments
Assignees
Labels
configuration enhancement New feature or request showcase Used to Identify End-of-Sprint Demos

Comments

@dipanjanmukherjeeibm
Copy link

dipanjanmukherjeeibm commented Apr 28, 2021

Is your feature request related to a problem? Please describe.
resolve() function is a function in FHIR that allows to reference elements across FHIR resources. The resolve() function currently doesn't work in IBM FHIR server.

Describe the solution you'd like
resolve() function is a function in FHIR that allows to reference elements across FHIR resources. The resolve() function is integral to build business rules for FHIR validation requireing cross-resource validation. The documentation for resolve () function in FHIR server states:

/**
    * For each item in the collection, if it is a string that is a uri (or canonical or url), locate the target of the
    * reference, and add it to the resulting collection. If the item does not resolve to a resource, the item is ignored
    * and nothing is added to the output collection. The items in the collection may also represent a Reference, in which
    * case the Reference.reference is resolved.
    *
    * <p>This method creates a resource node that is a placeholder for the actual resource, thus allowing for the FHIRPath
    * evaluator to perform type checking on the result of the resolve function. For example:
    *
    * <pre>Observation.subject.where(resolve() is Patient)</pre>
    *
    * <p>If the resource type cannot be inferred from the reference URL or type, then {@code FHIR_UNKNOWN_RESOURCE_TYPE} is used
    * so that we index these references by default.
    *
    * @param evaluationContext
    *     the evaluation environment
    * @param context
    *     the current evaluation context
    * @param arguments
    *     the arguments for this function
    * @return
    *     the result of the function applied to the context and arguments
    */

Describe alternatives you've considered
example of a FHIR path expression with resolve function that would work in the IBM FHIR Server on coverage profile
period.end <= beneficiary.resolve().deceased as deceasedDateTime

Acceptance Criteria
Any FHIR PATH expression with resolve() function should work when the profile on the IG is invoked by IBM FHIR Server during validation.

Additional context
Add any other context or screenshots about the feature request here.

@prb112 prb112 added the enhancement New feature or request label Apr 28, 2021
JohnTimm added a commit that referenced this issue May 17, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 17, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 17, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 18, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 18, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 18, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 18, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 18, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 18, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 19, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 19, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 19, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 19, 2021
* Issue #2296 - implement server resolve function

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - fix resolveInternalFragmentReference

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - updates

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2269 - updates

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2269 - updates

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - updates

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - updates

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - updates

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - unit tests with mock persistence layer

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - updates per PR review comments

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - changed ServerResolveFunction method visibility

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - updated FHIRServerUsersGuide.md

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - added matchesServiceBaseUrl method

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - added tests for versioned and absolute references

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
@lmsurpre lmsurpre added this to the Sprint 2021-07 milestone May 19, 2021
JohnTimm added a commit that referenced this issue May 19, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 19, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 19, 2021
* Issue #2296 - miscellaneous updates

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2296 - changed visibility of cache config

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 24, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 24, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
@lmsurpre
Copy link
Member

lmsurpre commented Jun 2, 2021

@dipanjanmukherjeeibm this feature was added and released in IBM FHIR Server 4.8.1.

To enable it, you must set fhirServer/core/serverResolveFunctionEnabled to true in your fhir-server-config.json

Please give it a try and confirm that this addresses your request. If we don't hear back in a day or so, I will plan to close this one out.

@dipanjanmukherjeeibm
Copy link
Author

I have tried to add the above in the config file and the problem is now resolved. I am happy for the dev team to close this request as resolved

@lmsurpre lmsurpre closed this as completed Jun 3, 2021
@JohnTimm JohnTimm added the showcase Used to Identify End-of-Sprint Demos label Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration enhancement New feature or request showcase Used to Identify End-of-Sprint Demos
Projects
None yet
Development

No branches or pull requests

4 participants