Added CodeSystemRef and updated CodeSystem type - #346
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #346 +/- ##
==========================================
- Coverage 87.47% 87.46% -0.01%
==========================================
Files 52 52
Lines 4550 4555 +5
Branches 1284 1285 +1
==========================================
+ Hits 3980 3984 +4
Misses 361 361
- Partials 209 210 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cmoesel
left a comment
There was a problem hiding this comment.
This is looking pretty good. I've left a few comments:
- one about the CodeSystem constructor and backwards-compatibility
- and a couple about one of the tests
Looking for feedback on the constructor and backwards compatibility.
hossenlopp
left a comment
There was a problem hiding this comment.
CodeSystemRef should be able to reference a CodeSystem in another library. If CQL-to-ELM can't translate that right then maybe either not implement it or just not test it.
| } | ||
| } | ||
|
|
||
| export class CodeSystemRef extends Expression { |
There was a problem hiding this comment.
ELM specification says this could reference CodeSystems in other libraries. The optional libraryName should be pulled out of the json and used when getting the code system from the context. Which will require changes to the Context (and Library) getCodeSystem function to support the library parameter. ValueSetRef and getValueSet can be used as a good reference for this.
http://cql.hl7.org/04-logicalspecification.html#codesystemref
There was a problem hiding this comment.
Ooooh. Good call, @hossenlopp. I just tested this and confirmed that the translator does support referencing CodeSystems from another library.
- Add libraryName to CodeSystemRef - Update Library to resolve CodeSystems in other libraries - Fix bug that put included library codesystems into the main library
- Fix bug that returned wrong value set when main library and included library had value sets with same name - Add tests for resolving value sets from included libraries
3bcff99 to
7d967de
Compare
|
I've updated this branch to add support for code systems from other libraries. Along the way I noticed a couple of related things that needed to be fixed:
|
|
Reviewed @cmoesel's updates and they all look good to me! Approved! |
hossenlopp
left a comment
There was a problem hiding this comment.
Additional changes and tests look good.
Summary
This PR addresses #259 to add capability for
CodeSystemRef. It also addsnameto theCodeSystemtype, something that was introduced in CQL 1.5.Pull requests into cql-execution require the following.
Submitter and reviewer should ✔ when done.
For items that are not-applicable, mark "N/A" and ✔.
Submitter:
npm run test:plusto run tests, lint, and prettier)cql4browsers.jsbuilt withnpm run build:browserifyif source changed.Reviewer:
Name: