SDKs overview
Lexigram provides Software Development Kits (SDKs) to streamline the integration of its medical natural language processing (NLP) and data harmonization services into various applications. These SDKs are designed to abstract the complexities of direct API calls, offering developers language-specific interfaces for common tasks such as sending clinical text for analysis or retrieving structured medical concepts. The goal of these SDKs is to reduce development time and potential errors by providing pre-packaged functions and object models that align with the Lexigram API's capabilities.
Beyond the official offerings, the open-source nature of many development communities often leads to the creation of community-maintained libraries. These can extend functionality, provide wrappers for less common languages, or offer specialized utilities not included in official SDKs. However, when using community libraries, it is important to verify their maintenance status and compatibility with the latest API versions, as they may not always keep pace with official updates or adhere to the same security standards as officially supported tools. Lexigram's focus on healthcare data processing means that robust and well-maintained SDKs are critical for ensuring data integrity and compliance with standards like HIPAA regulations for health information.
Official SDKs by language
Lexigram offers official SDKs for several popular programming languages, designed to facilitate interaction with its Clinical NLP API, FHIR API, and Data Harmonization services. These SDKs are maintained by Lexigram and are the recommended method for integrating their services. Each SDK provides idiomatic interfaces for its respective language, allowing developers to work with Lexigram's capabilities using familiar programming constructs.
The official SDKs typically handle aspects such as authentication, request formatting, and response parsing, reducing the boilerplate code required by developers. For example, the Python SDK might allow a developer to call a method like lexigram_client.analyze_clinical_text("patient has fever and cough"), which then handles the underlying HTTP POST request to the Lexigram API endpoint, including proper authorization headers and JSON payload construction, as detailed in the Lexigram API reference documentation.
The following table outlines the officially supported SDKs:
| Language | Package Name | Maturity |
|---|---|---|
| Python | lexigram-python |
Stable |
| Java | lexigram-java |
Stable |
| Node.js | lexigram-node |
Stable |
Installation
Installing Lexigram's official SDKs involves using the standard package managers for each respective language. Before installation, developers should ensure they have the correct runtime environment set up (e.g., Python interpreter, Java Development Kit, Node.js runtime). Access to a Lexigram API key is also required for authentication, which can be obtained through the Lexigram developer portal, often associated with a developer sandbox account.
Python SDK Installation
The Python SDK can be installed using pip, the standard package installer for Python. It is recommended to use a virtual environment to manage dependencies.
pip install lexigram-python
After installation, the package can be imported into your Python scripts. The Python package adheres to standard Python packaging conventions, making it compatible with most Python development workflows. For detailed setup instructions and dependency requirements, consult the Lexigram Python SDK documentation.
Java SDK Installation
For Java projects, the Lexigram SDK is typically managed through build automation tools like Maven or Gradle. The package is usually hosted on a public repository like Maven Central.
Maven
Add the following dependency to your pom.xml file:
<dependency>
<groupId>io.lexigram</groupId>
<artifactId>lexigram-java</artifactId>
<version>1.0.0</version> <!-- Replace with the latest version -->
</dependency>
Gradle
Add the following to your build.gradle file:
implementation 'io.lexigram:lexigram-java:1.0.0' // Replace with the latest version
Ensure your project is configured to resolve dependencies from Maven Central or the appropriate repository. The Lexigram Java SDK setup guide provides specific version numbers and additional configuration details.
Node.js SDK Installation
The Node.js SDK is installed using npm, the Node.js package manager.
npm install lexigram-node
Once installed, the package can be required or imported into your Node.js applications. This SDK is designed to work within both CommonJS and ES module environments. For advanced usage, including TypeScript definitions and specific runtime requirements, refer to the Lexigram Node.js SDK reference.
Quickstart example
This quickstart example demonstrates how to use the Lexigram Python SDK to analyze a piece of clinical text. This snippet connects to the Lexigram API using an API key and then sends a sample sentence for processing, which might involve identifying medical concepts, diseases, or treatments. Before running this code, ensure you have installed the Python SDK and replaced YOUR_API_KEY with your actual Lexigram API key.
import os
from lexigram_python import LexigramClient
# Retrieve API key from environment variable for security
# Alternatively, you can pass it directly: api_key="YOUR_API_KEY"
api_key = os.environ.get("LEXIGRAM_API_KEY")
if not api_key:
raise ValueError("LEXIGRAM_API_KEY environment variable not set.")
client = LexigramClient(api_key=api_key)
clinical_text = "The patient presented with a severe headache, photosensitivity, and neck stiffness. Meningitis is suspected."
try:
# Analyze the clinical text
response = client.nlp.analyze_text(text=clinical_text)
print("Clinical NLP Analysis Results:")
for entity in response.entities:
print(f" Concept ID: {entity.concept_id}")
print(f" Text: {entity.text}")
print(f" Type: {entity.type}")
print(f" Score: {entity.score}")
if entity.matched_terms:
print(f" Matched Terms: {', '.join([term.text for term in entity.matched_terms])}")
print("---------------------")
# Example of accessing additional response data, if available
# if response.metadata:
# print(f"Metadata: {response.metadata}")
except Exception as e:
print(f"An error occurred: {e}")
# More specific error handling can be implemented based on API error codes
# For example, checking for authentication errors or rate limits.
This example initializes the LexigramClient with the API key. It then calls the analyze_text method, passing the clinical text as an argument. The response object typically contains a list of identified entities, each with properties like concept ID, original text, entity type (e.g., condition, symptom), and a confidence score. This structured output is crucial for downstream applications that need to process medical information programmatically. For further details on the NLP capabilities and response structures, consult the Lexigram Clinical NLP API documentation.
Community libraries
While Lexigram provides official SDKs for Python, Java, and Node.js, the developer community often contributes additional libraries and tools. These community-driven projects can offer several benefits, such as support for less common programming languages, specialized integrations with other platforms, or utility functions that simplify specific Lexigram API workflows. For instance, a community library might provide a wrapper for a language like Go or Ruby, or offer a pre-built connector for a popular data visualization tool.
However, it is important to exercise caution when using community libraries. Unlike official SDKs, they may not be actively maintained by Lexigram, which means they might not receive timely updates for new API features, bug fixes, or security patches. Developers should evaluate the maintainer's reputation, the project's activity on platforms like GitHub, and the quality of its documentation. Checking the last commit date, the number of open issues, and the community engagement can provide insights into a library's reliability. Official Lexigram documentation should always be the primary source of truth for API specifications and best practices, even when using third-party tools.
As of late 2026, there are no widely adopted or officially recognized community-maintained libraries for Lexigram beyond the official SDKs. Developers looking to contribute or find specialized tools are encouraged to explore platforms like GitHub using keywords such as "Lexigram API" or "medical NLP SDK" to discover any emerging projects. When considering such libraries, it is prudent to review their source code for adherence to security best practices, particularly given the sensitive nature of healthcare data and compliance requirements like those outlined by NIST's HIPAA security standards.