
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
cql-exec-fhir
Advanced tools
This project establishes a FHIR-based data source module for use with the CQL Execution Engine. Currently, FHIR 1.0.2 (DSTU2), FHIR 3.0.0 (STU3), FHIR 4.0.0 ,and FHIR 4.0.1 (R4) are supported.
To use this project, you should perform the following steps:
The FHIR Data Source expects each patient to be represented as a single FHIR Bundle containing all of the patient's relevant data. The FHIR Data Source does not query FHIR servers, but rather, expects the Bundles to be passed to it.
The following is a simple example of how it would be used to execute over two patients:
const cqlfhir = require('cql-exec-fhir');
// Code setting up the CQL library, executor, etc, and getting the patient data as a bundle
// ...
const patientSource = cqlfhir.PatientSource.FHIRv401(); // or .FHIRv102() or .FHIRv300() or .FHIRv400()
patientSource.loadBundles([patient01, patient02]);
const results = executor.exec(patientSource);
NOTE: This feature will only work with cql-execution
version 2.4.1 or higher.
If desired, the FHIR Data Source can be configured to use the meta.profile
list on FHIR resources as a source of truth for whether or not that resource should be included when looking through the Bundle of data.
const cqlfhir = require('cql-exec-fhir');
// Including "requireProfileTagging: true" in an object passed in to the constructor enables the trusted environment
const patientSource = cqlfhir.PatientSource.FHIRv401({
requireProfileTagging: true,
}); // or .FHIRv102() or .FHIRv300() or .FHIRv400()
As an example, if an ELM Retrieve expression asks for a FHIR Condition Resource with profile http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-encounter-diagnosis
, the default behavior of the FHIR Data Source is to find any FHIR Condition resource.
With the trusted environment enabled however, the FHIR Data Source will only find resources with the string 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-encounter-diagnosis'
included in their meta.profile
lists.
If you are passing in individual FHIR resources to the execution engine as parameters, you can use FHIRWrapper to convert the raw json FHIR resources into FHIRObjects that work with the execution engine.
Example:
const cqlfhir = require('cql-exec-fhir');
const fhirWrapper = cqlfhir.FHIRWrapper.FHIRv401(); // or .FHIRv102() or .FHIRv300() or .FHIRv400()
const conditionRawResource = { "resourceType": "Condition", "id": "f201", "clinicalStatus": "active", ... }
const conditionFhirObject = fhirWrapper.wrap(conditionResource)
// Now conditionFhirObject can be passed into the cql execution engine
To encourage quality and consistency within the code base, all code should pass eslint without any warnings. Many text editors can be configured to automatically flag eslint violations. We also provide an npm script for running eslint on the project. To run eslint, execute the following command:
$ yarn lint
FAQs
Provides a FHIR-based data source for use w/ CQL
The npm package cql-exec-fhir receives a total of 206 weekly downloads. As such, cql-exec-fhir popularity was classified as not popular.
We found that cql-exec-fhir demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.