npm provides modules

    pathling-client
    TypeScript icon, indicating that this package has built-in type declarations

    2.1.1 • Public • Published

    pathling-client

    This is a client library for the Pathling FHIR API, for use with JavaScript and TypeScript.

    Example usage

    import PathlingClient from 'pathling-client';
    
    const client = new PathlingClient("https://demo.pathling.app/fhir");
    
    // Invoke the import operation.
    client.import({
      sources: [
        { resourceType: "Patient", url: "s3://somebucket/Patient.ndjson" },
        { resourceType: "Condition", url: "s3://somebucket/Condition.ndjson" },
      ]
    }).then(result => console.log(result));
    
    // Invoke the aggregate operation.
    client.aggregate({
      subjectResource: "Patient",
      aggregations: ["count()"],
      groupings: [
        "reverseResolve(Condition.subject).code.coding" +
        ".where(subsumedBy(http://snomed.info/sct|73211009))"
      ]
    }).then(result => console.log(result));
    
    // Invoke the search operation.
    client.search({
      subjectResource: "Patient",
      filters: [
        "(reverseResolve(Condition.subject).code.coding" +
        ".where($this.subsumedBy(http://snomed.info/sct|73211009))) " +
        "contains http://snomed.info/sct|427089005||'Diabetes from Cystic Fibrosis'"
      ],
    }).then(result => console.log(result));
    
    // Invoke the extract operation.
    client.extract({
      subjectResource: "Patient",
      columns: [
        "id", 
        "reverseResolve(Condition.subject).code.coding"
      ],
      filters: [
        "reverseResolve(Condition.subject).code" +
        ".subsumedBy(http://snomed.info/sct|73211009).anyTrue"
      ]
    }).then(result => console.log(result));

    Pathling and "pathling-client" are copyright © 2023, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230. Licensed under the Apache License, version 2.0.

    Install

    npm i pathling-client

    DownloadsWeekly Downloads

    43

    Version

    2.1.1

    License

    Apache-2.0

    Unpacked Size

    141 kB

    Total Files

    64

    Last publish

    Collaborators

    • johngrimes