Skip to main content

Tooling to execute CQL-like Python against FHIR resources.

Project description

CQLpy

CQLpy is a Python implementation of the Clinical Quality Language (CQL). It is intended to be a complete implementation of the CQL specification and is currently in development.

See CONTRIBUTING.md for information on contributing to this project.

Installation

pip install cqlpy

Usage

from cqlpy.context import Context
from cqlpy.providers import RosettaValuesetProvider

rosetta = RosettaValuesetProvider("<api-key>")
context = Context(rosetta, bundle_file_name="./fhir-bundle.json")

office_visit_valueset = ValueSet("http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001")
office_visits = context["Encounter", office_visit_valueset, "type"]

See cqlpy_syntax_basics for more examples.

Specification Implementation

1. Types

2. Logical Operators

3. Type Operators

4. Nullological Operators

5. Comparison Operators

6. Arithmetic Operators

7. String Operators

8. Date and Time Operators

9. Interval Operators

10. List Operators

11. Aggregate Functions

12. Clinical Operators

13. Errors and Messaging

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cqlpy-0.3.0.tar.gz (80.5 kB view hashes)

Uploaded Source

Built Distribution

cqlpy-0.3.0-py3-none-any.whl (115.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page