SDKs overview
LAPIS provides software development kits (SDKs) to facilitate interaction with its healthcare data interoperability platform. These SDKs are designed to abstract the complexities of direct API calls, offering language-specific methods and data structures. The primary goal of these SDKs is to streamline the development of applications that integrate with Electronic Health Records (EHRs), standardize healthcare data formats, and automate various clinical workflows. By using an SDK, developers can reduce the boilerplate code required for authentication, request formatting, and response parsing when working with the LAPIS Bridge API and other services.
The SDKs are developed to support common programming paradigms and environments, enabling developers to integrate LAPIS functionalities into their existing technology stacks efficiently. They typically include modules for connecting to LAPIS services, managing patient and clinical data, and accessing insights generated by the platform. The design prioritizes ease of use and adherence to healthcare data standards, aiding in the development of compliant and secure health applications. LAPIS maintains detailed documentation for each SDK, providing guidance on installation, configuration, and practical usage examples.
Official SDKs by language
LAPIS offers official SDKs for two widely used programming languages: Python and Node.js. These SDKs are maintained by LAPIS and are intended to provide the most reliable and up-to-date integration experience with the platform. Each SDK is tailored to the conventions of its respective language, offering an idiomatic interface for developers.
Python SDK
The Python SDK is designed for developers working in data science, backend services, and automation scripts. It provides straightforward methods for interacting with LAPIS APIs, allowing for data retrieval, submission, and processing. The SDK handles aspects like authentication, request serialization (e.g., converting Python objects to JSON), and response deserialization, simplifying data operations within a Python environment. Developers frequently use the Python SDK for tasks such as extracting patient demographics, updating clinical notes, or integrating with data analytics pipelines.
Node.js SDK
The Node.js SDK targets developers building web applications, serverless functions, and real-time data processing services. It leverages JavaScript's asynchronous capabilities and is well-suited for environments where non-blocking I/O is crucial. The Node.js SDK provides a JavaScript/TypeScript-friendly interface, supporting promises and async/await syntax for managing API calls. This SDK is particularly useful for frontend-driven applications that need direct backend integration with LAPIS, or for microservices orchestrating healthcare data flows.
The following table summarizes the key details for the official LAPIS SDKs:
| Language | Package Name | Install Command | Maturity |
|---|---|---|---|
| Python | lapis-sdk-python |
pip install lapis-sdk-python |
Stable |
| Node.js | @lapishealth/sdk |
npm install @lapishealth/sdk |
Stable |
Installation
Installing the LAPIS SDKs involves using the standard package managers for Python and Node.js. Before installation, developers should ensure they have the correct runtime environment set up, including Python 3.8+ and Node.js 16+ or newer versions. It is also recommended to use virtual environments (venv for Python, or local node_modules for Node.js projects) to manage dependencies effectively and avoid conflicts.
Python SDK Installation
To install the LAPIS Python SDK, open your terminal or command prompt and execute the following command. It is good practice to first create and activate a virtual environment:
# Create a virtual environment
python -m venv lapis_env
# Activate the virtual environment
# On macOS/Linux:
source lapis_env/bin/activate
# On Windows:
lapis_env\Scripts\activate
# Install the SDK
pip install lapis-sdk-python
After installation, you can verify it by attempting to import the lapis_sdk module in a Python interpreter.
Node.js SDK Installation
For the Node.js SDK, navigate to your project directory in the terminal and use npm (Node Package Manager) to install the package. If you are starting a new project, you might initialize a package.json file first:
# Initialize a new Node.js project (if not already done)
npm init -y
# Install the SDK
npm install @lapishealth/sdk
The SDK and its dependencies will be added to your node_modules directory and listed in your package.json file. You can then import it into your JavaScript or TypeScript files using require or import statements.
Quickstart example
This quickstart demonstrates how to initialize the LAPIS SDK and make a basic API call to retrieve patient data. For both examples, you will need an API key, which can be obtained after signing up for a LAPIS Developer Sandbox account. Replace YOUR_LAPIS_API_KEY with your actual key.
Python Quickstart
This Python example initializes the client and fetches a list of patients. It assumes you have activated your virtual environment and installed the lapis-sdk-python package.
import os
from lapis_sdk import LapisClient
from lapis_sdk.models import PatientSearchRequest
# Configure your API key. It's recommended to use environment variables.
LAPIS_API_KEY = os.environ.get("LAPIS_API_KEY", "YOUR_LAPIS_API_KEY")
try:
# Initialize the Lapis client
client = LapisClient(api_key=LAPIS_API_KEY)
# Define a patient search request (e.g., search by name fragment)
search_request = PatientSearchRequest(first_name="John")
# Search for patients
print("Searching for patients...")
patients = client.patients.search(search_request)
if patients.items:
print(f"Found {len(patients.items)} patients:")
for patient in patients.items:
print(f" - ID: {patient.id}, Name: {patient.first_name} {patient.last_name}")
else:
print("No patients found matching the criteria.")
except Exception as e:
print(f"An error occurred: {e}")
To run this, save it as quickstart.py and execute python quickstart.py. Ensure your LAPIS_API_KEY environment variable is set or replace the placeholder.
Node.js Quickstart (TypeScript/JavaScript)
This Node.js example performs a similar operation, fetching patient data. It is compatible with both JavaScript and TypeScript environments (with appropriate type annotations for TypeScript). Save this as quickstart.js or quickstart.ts.
import { LapisClient, PatientSearchRequest } from '@lapishealth/sdk';
// Configure your API key. Using environment variables is recommended.
const LAPIS_API_KEY = process.env.LAPIS_API_KEY || 'YOUR_LAPIS_API_KEY';
async function runQuickstart() {
try {
// Initialize the Lapis client
const client = new LapisClient({ apiKey: LAPIS_API_KEY });
// Define a patient search request
const searchRequest: PatientSearchRequest = {
firstName: 'Jane',
};
// Search for patients
console.log('Searching for patients...');
const patientsPage = await client.patients.search(searchRequest);
if (patientsPage.items && patientsPage.items.length > 0) {
console.log(`Found ${patientsPage.items.length} patients:`);
patientsPage.items.forEach(patient => {
console.log(` - ID: ${patient.id}, Name: ${patient.firstName} ${patient.lastName}`);
});
} else {
console.log('No patients found matching the criteria.');
}
} catch (error) {
if (error instanceof Error) {
console.error(`An error occurred: ${error.message}`);
} else {
console.error('An unknown error occurred', error);
}
}
}
runQuickstart();
To execute, run node quickstart.js (or compile and run if using TypeScript). Ensure your LAPIS_API_KEY environment variable is configured or replace the placeholder.
Community libraries
As of late 2026, the primary integration methods for LAPIS are through its official SDKs and direct API calls. While LAPIS provides foundational tools, the open-source community often contributes supplementary libraries, utility functions, and example projects that extend functionality or offer alternative interfaces. These community-driven projects can range from wrappers in other programming languages to specialized connectors for specific EHR systems or data visualization tools.
Developers looking for community contributions should typically explore platforms like GitHub, searching for repositories tagged with "lapis-health" or "lapis-api". Such projects might include:
- Client libraries in other languages: Unofficial SDKs for languages like Go, Ruby, or Java, built by developers who need to integrate LAPIS into those environments. These may not offer the same level of support or feature parity as official SDKs but can be valuable for specific use cases.
- Data transformation utilities: Tools that help convert data between LAPIS's standardized formats and other healthcare data standards, such as FHIR resources or HL7v2 messages.
- Integration examples: Boilerplate code, sample applications, or tutorials demonstrating how to integrate LAPIS with popular healthcare IT systems or cloud platforms.
- Monitoring and logging extensions: Libraries that integrate LAPIS API usage with popular application performance monitoring (APM) tools or centralized logging solutions.
When considering community-developed libraries, it is important to evaluate their maintenance status, community support, and adherence to security best practices, particularly in a HIPAA-compliant environment. Always refer to the official LAPIS documentation for the most accurate and supported methods of integration, and use community libraries with appropriate due diligence.