@asushares/cli

1.0.0 • Public • Published

ASU SHARES CLI

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.

Commands

1. convert <filePath> [outputPath]

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.

2. create-fhir-bundle <filePath> <outputPath> <description> [ipUrl]

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 is http://localhost:8080/fhir/Library/).
  • Usage:

    ts-node index.ts create-fhir-bundle myfile.cql bundle.json "Description of the CQL library"

3. post-fhir <filePath> <url>

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

4. create-and-post <filePath> <outputPath> <description> <url>

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

Dependencies

  • commander: Command-line argument parsing.
  • fs: File system operations.
  • axios: Making HTTP requests.

Attribution

Authors:

  • Abhishek Dhadwal
  • Preston Lee

Released under the Apache 2.0 license.

Package Sidebar

Install

npm i @asushares/cli

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

56 kB

Total Files

17

Last publish

Collaborators

  • preston.lee