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

Support External Functions #286

Open
cmoesel opened this issue Oct 27, 2022 · 0 comments
Open

Support External Functions #286

cmoesel opened this issue Oct 27, 2022 · 0 comments

Comments

@cmoesel
Copy link
Member

cmoesel commented Oct 27, 2022

External functions allow CQL to call custom functions that are defined natively rather than in CQL. See: https://cql.hl7.org/03-developersguide.html#external-functions

In the CQL Execution framework, this could potentially be supported by allowing integrators to pass in a map (or hash) of supported functions, for which the name of the function is the key. For example:

const externalFunctions = {
  "reverse": (list: any[]) => list.reverse(),
  "consoleLog": (message: string) => console.log(string)
}

External functions are generally discouraged since they impede interoperability. As such, implementation of this feature is low priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant