Command-line utilities aimed at supporting FHIR Consent management and CQL (Clinical Quality Language) operations on FHIR servers. Written and maintained in TypeScript using the Commander library.
Converts a .cql
file to a base64 encoded string.
-
Arguments:
-
<filePath>
: Path to the.cql
file. -
[outputPath]
(optional): Path to save the base64 encoded output.
-
-
Usage:
ts-node index.ts convert myfile.cql output.txt
- If
outputPath
is omitted, it outputs the base64 string to the console.
- If
Creates a FHIR bundle from a .cql
file and saves it as a JSON file.
-
Arguments:
-
<filePath>
: Path to the.cql
file. -
<outputPath>
: Path to save the generated FHIR bundle JSON file. -
<description>
: Description of the library. -
[ipUrl]
(optional): Base URL for the FHIR Library (default ishttp://localhost:8080/fhir/Library/
).
-
-
Usage:
ts-node index.ts create-fhir-bundle myfile.cql bundle.json "Description of the CQL library"
Posts a FHIR bundle JSON file to a specified FHIR server.
-
Arguments:
-
<filePath>
: Path to the JSON file containing the FHIR bundle. -
<url>
: Base URL of the FHIR server.
-
-
Usage:
ts-node index.ts post-fhir bundle.json http://localhost:8080/fhir
Creates a FHIR bundle from a .cql
file, saves it as a JSON file, and posts it to a specified URL.
-
Arguments:
-
<filePath>
: Path to the.cql
file. -
<outputPath>
: Path to save the generated FHIR bundle JSON file. -
<description>
: Description of the library. -
<url>
: URL of the server to post the FHIR bundle.
-
-
Usage:
ts-node index.ts create-and-post myfile.cql bundle.json "Description of the CQL library" http://localhost:8080/fhir
- commander: Command-line argument parsing.
- fs: File system operations.
- axios: Making HTTP requests.
Authors:
- Abhishek Dhadwal
- Preston Lee
Released under the Apache 2.0 license.