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 for Vocabulary Type #281

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

Support for Vocabulary Type #281

cmoesel opened this issue Oct 18, 2022 · 0 comments

Comments

@cmoesel
Copy link
Member

cmoesel commented Oct 18, 2022

The CQL Vocabulary type represents a reference to a code system or value set, allowing either one to be passed into CQL functions.

To demonstrate how this might work, consider the following example:

library MyLibrary version '0.0.1'
valueset MyVS: 'http://example.org/vs/myvs'
codesystem MyCS: 'http://example.org/cs/mycs'
code Foo: 'Foo' from "MyCS" display 'Foo'

define function FooInVocabulary(CSorVS Vocabulary):
  if CSorVS is CodeSystem
    then Foo in (CSorVS as CodeSystem)
  else
    Foo in (CSorVS as ValueSet)

define IsFooInMyVS:
  FooInVocabulary(MyVS)

define IsFooInMyCVS:
  FooInVocabulary(MyCS)

Much like the case for ValueSet (#226) and CodeSystem (#259), the ELM representation of a function that takes a Vocabulary argument would be invoked with a ValueSetRef or CodeSystemRef.

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