The Context Engine Studio is now open source.  View on GitHub →
Clinia
Graph

Query narrative_passage nodes

Technical preview

Returns a paginated, filtered, and sorted page of narrative_passage nodes from the patient context graph — the structured counterpart to list-nodes, for conditions that don't fit query-string params. filter and sort narrow to the fields this type declares; see the request body schema for its vocabulary.

Usage

import { ContextEngineClient } from "@clinia/context-engine-js";

// Initialize the client
const client = new ContextEngineClient({
  baseUrl: process.env.CLINIA_WORKSPACE,
  auth: {
    clientId: process.env.CLINIA_CLIENT_ID,
    clientSecret: process.env.CLINIA_CLIENT_SECRET,
  },
});

// Call the API, with the request body the API reference documents
const { data, error } = await client.graph.queryNarrativePassageNodes("<patient-id>", body);

// Print the response
console.log(data ?? error);

The environment variables are set in Install and authenticate, for JavaScript or Python.

API reference

POST /v1/patients/{patientId}/graph/nodes/narrative_passage/query documents the parameters, the request body and the responses.

On this page