Mediloop
EXAMPLE SETUPPopular

Patient Data Synchronization – Setup

Install the SDK and configure your environment to run this example.

Language
TypeScript
Use case
Patient data
Complexity
Intermediate
Updated
May 12, 2024
Overview
Code
Setup
Run
Output
Error handling

Setup steps

1
Install dependencies
Install the Connector SDK and peer dependencies.
2
Configure environment
Set up your API credentials and environment variables.
3
Initialize the client
Create and configure the Mediloop client instance.
4
Verify connection
Test the connection to ensure everything is configured correctly.
5
Ready to run
Proceed to run the example.

Configure environment

Create a .env file in the root directory of the project and add your Mediloop API credentials.

.envCopy
MEDILOOP_BASE_URL=https://api.mediloop.com
MEDILOOP_API_KEY=mlp_xxxxxxxxxxxxxxxxxx
MEDILOOP_CLIENT_ID=your_client_id
MEDILOOP_CLIENT_SECRET=your_client_secret
MEDILOOP_TENANT_ID=your_tenant_id
MEDILOOP_TIMEOUT=30000
MEDILOOP_LOG_LEVEL=info
MEDILOOP_RETRY_ATTEMPTS=3
Tip
Never commit your .env file to version control. Add it to .gitignore instead.
Where to get your credentials
You can find your API credentials in the Mediloop Developer Console under Settings > API Keys.

Setup checklist

Node.js 18+ installedInstalled
Mediloop Connector SDKInstalled
Environment variablesIn progress
Initialize clientPending
Verify connectionPending
Stuck on setup?
Check our troubleshooting guide for common setup issues.