API Introduction
|
Purpose |
Connect third-party .NET applications to CAREWare through the public business-tier interface. |
|
Who should do this |
Developers and IT staff with authorized CAREWare access. |
|
Use this guide when |
Building or testing a CAREWare 6 API integration. |
|
Main warning |
Use a test environment and authorized credentials. Never use the sample credentials in production. |
Quick path
Verify CAREWare browser login > download sample > open or create .NET project > reference CW6ApiClient and ezjson > configure session > log in > test > log out.
Before you begin
• Confirm the CAREWare Business Tier and HTTP Server services are running and identify the correct server name or IP address, port, and provider.
• Verify that you can sign in to CAREWare through a browser before troubleshooting application code.
• Obtain an authorized account and test data; confirm the account has the permissions needed for the intended API functions.
Overview
CAREWare 6 uses a four-tier architecture. Third-party tools should access CAREWare data through the public business-tier interface exposed by the HTTP Server, rather than writing directly to the SQL Server database. The Business Tier is a Windows service that processes requests and communicates with the data tier.
A CAREWare installation has one Business Tier and one HTTP Server. The CW6ApiClient and ezjson projects or DLLs allow .NET applications to connect, authenticate, and call supported functions.
Getting started
Step 1. Download and unzip the sample application here.
Step 2. In your .NET development environment, either open Cw6ApiDemo.sln from the sample or choose File > New Project and create a .NET application.
Step 3. If creating a project, add references to the CW6ApiClient and ezjson projects or DLLs from the sample.
Step 4. Identify the CAREWare server address, connection settings, and target provider. Confirm that the browser login works.
Step 5. Create a CWApiSession and authenticate with a valid CAREWare user account.
Step 6. Run a simple test against non-production data; inspect the response and log out when finished.
Connection example (VB.NET)
The original sample uses the following connection pattern. Replace its demonstration credentials and settings with authorized values before running it.
Dim useTLS As Boolean = False
Dim serverName As String = "localhost"
Dim providerName As String = "default"
Dim sess As New CWApiSession(useTLS, serverName)
CWApi.Session.Login(sess, "<username>", "<password>", providerName)
' Call an authorized API function here
CWApi.Session.Logout(sess)
|
Important: The original source example sets useTLS to False and contains sample login credentials. These are demonstration values only. Use secure transport and organization-approved credential handling for real integrations. |
What the sample demonstrates
The sample application adds a fictional client, records a CD4 count, retrieves laboratory history, inspects a returned object, deletes the laboratory entry and test client, then logs out. The CWApiSession class is provided in the CW6ApiClient project.
Helpful tips
• Test create, read, and delete operations only in a non-production environment or with approved disposable records.
• Use the CAREWare application and user permissions to validate access before debugging API calls.
• Review API Client Functions for available classes and method examples; not every standard CAREWare function is exposed by the API.
• Avoid embedding passwords in source code or logs; protect all client and clinical data.
Troubleshooting
|
Issue |
What to check |
|
Connection fails |
Verify the server name, port, HTTP Server service, Business Tier service, and TLS settings. |
|
Login fails |
Confirm browser login, provider name, account credentials, and access rights. |
|
Function unavailable |
Check the API Client Functions reference; the public interface does not expose every CAREWare function. |
Related CAREWare guides and resources
|
Resource |
How it helps |
|
Supported API classes and code examples. |
|
|
Install and verify Business Tier and HTTP Server. |
|
|
HTTP Server service management. |
For requests for additional API functions, contact the CAREWare Help Desk at [email protected].
