FHIR Chat · Sushi using aliases in expression · shorthand

Stream: shorthand

Topic: Sushi using aliases in expression


view this post on Zulip Emmanuel Borey (Mar 28 2022 at 13:31):

Hi, I am trying to figure out how to use alias in an xPath expression, for instance in a search parameter definition.
For example :

Alias: $my-extension = http://example.com/fhir/StructureDefinition/my-extension

Instance: mySearchParameter
InstanceOf: SearchParameter
Usage: #definition
* description = "Use Alias in expression"
* url = "http://example.com/fhir/SearchParameter/my-search-parameter"
* name = "MySearchParameter"
* status = #active
* code = #has-extention
* base = #Basic
* type = #token
* expression = "Basic.extension('$my-extension').exists()"

How should the expression string be written so that $my-extension be replaced with its value?

view this post on Zulip Chris Moesel (Mar 28 2022 at 15:19):

Hi @Emmanuel Borey -- what you're trying to do here is _clever_, but unfortunately not supported by SUSHI. SUSHI doesn't analyze FHIRPath for alias replacements. Perhaps it should (and it is something we can consider), but currently it does not. Sorry for the trouble, but for now you will need to put the full URL into the FHIRPath expression.


Last updated: Apr 12 2022 at 19:14 UTC