Giter Club home page Giter Club logo

Comments (7)

frankadrian314159 avatar frankadrian314159 commented on June 15, 2024

I've read through the code and I've found something that seems odd to me. In the BundleTerminologyProvider.initialize() method, in the valueSetIndex HashTable, the collection of expanded Codes are stored under the value set's url as the key. However, in the .expand() method, the expanded codes are being looked up in the valueSetIndex under the value set's id as the key. This will only work if the value set's getId() and getUrl() methods return the same values, something that seems unlikely. In fact, if the getUrl method depends on the existence of a url property on the ValueSet resource, it may fail because the url is an optional property.

from clinical-reasoning.

frankadrian314159 avatar frankadrian314159 commented on June 15, 2024

The reason why the tests are not failing is that with all of the tests, the value of id is set up using a .withId call, but instead of passing in the value set's id, you pass in the url. This ensures the id (which is then set to the url) matches the url.

from clinical-reasoning.

JPercival avatar JPercival commented on June 15, 2024

Hi @frankadrian314159!

CQL and FHIR represent the version-independent identifiers of the ValueSets differently. The VersionedIdentifier (A CQL concept, not a FHIR concept - it doesn't even have a url property) calls that the "id", while FHIR calls it the "url". That's why the tests map one to the other. The indexing happens in terms of the VersionedIdentifier id, because that's how the CQL engine sees and requests that. Does that make sense?

from clinical-reasoning.

JPercival avatar JPercival commented on June 15, 2024

I'll take a look at the other issue where the ValueSet isn't being correctly located.

from clinical-reasoning.

frankadrian314159 avatar frankadrian314159 commented on June 15, 2024

Hi JP. Your explanation makes sense.

I will say, however, that in this case ValueSetUtil.getUrl (which is what the ValueSet's expansion is stored under in the initialize method) returns a String of the form com:zzz:valueset:20785a* (the FHIR url for the ValueSet), while the String that I am using as the identifier (and the expand method tries to use for lookup) is 20785a (the FHIR id for the ValueSet) This mismatch is the cause of the failure to locate the value set expansion.

Am I using the wrong identifier for the value set? Is one supposed to use the FHIR url as the identifier for the versioned identifier or should it be the FHIR id? What happens if the ValueSet's FHIR url does not exist (it is optional)?

*the 💤 emoji is supposed to be zzz. Stupid emojis.

from clinical-reasoning.

JPercival avatar JPercival commented on June 15, 2024

Yes, for FHIR-based CQL you'd generally use the URL. Here's some example CQL to show how it's done:
https://github.com/cqframework/ecqm-content-r4-2022/blob/master/input/cql/DischargedonAntithromboticTherapyFHIR4.cql#L10-L13

And here's the relevant specification for CQL used in Quality Measures:
https://build.fhir.org/ig/HL7/cqf-measures/using-cql.html#conformance-requirement-4-7

from clinical-reasoning.

frankadrian314159 avatar frankadrian314159 commented on June 15, 2024

Thank you, JP. As far as I'm concerned, you can close out this issue.

from clinical-reasoning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.