Comments (7)
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.
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.
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.
I'll take a look at the other issue where the ValueSet isn't being correctly located.
from clinical-reasoning.
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.
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.
Thank you, JP. As far as I'm concerned, you can close out this issue.
from clinical-reasoning.
Related Issues (20)
- Partially specified codes and/or valuesets cause null pointer exceptions in the RepositoryTermionlogyProvider HOT 1
- Extension to capture denominator-exception HOT 1
- Searches by Canonical do not work if a version is present HOT 1
- "In modifier is unsupported" is being thrown HOT 1
- Add the ability to generate $apply results with unique IDs HOT 2
- subjectProvider not getting paged links
- CDS Compatibility Fixes for Plan Definition
- Migrate $Collect-Data and $Data-Requirements operations
- [Bug] DSTU3 $apply error due to the way HAPI handles PlanDefinition library properties
- Exception propagates out of `R4MeasureService.ensureSupplementalDataElementSearchParameter`
- Summary Report stratification is not measure specific nor including all patients
- Feature Request: Multi-Measure Processing for MeasureService
- Multi Measure with Reporter Parameter
- Is there an upgrade guide from 2.6.0 to 3.5.0?
- Care-Gaps Concurrent modification exception
- $package operations should be using the new KnowledgeArtifact visitor
- Abstract dependency tracing from PackageVisitor and create a DataRequirementsVisitor
- SDC Observation Extract Category extension is not supported by the $extract operation
- Replace animal-sniffer plugin with Javac "--release" flag
- Missing support for externalized content when using HAPI FHIR
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clinical-reasoning.