Learn how to use the Orchestrate SDK in your project.
Contents
You can download the latest Orchestrate SDK from popular package managers: NPM (for TypeScript and JavaScript) and PIP for Python.
npm install @careevolution/orchestrate --save
npm install @careevolution/orchestrate --save
pip install orchestrate-api
pip install orchestrate-api
Once installed, you can then import the SDK in your code for easy reference:
import { OrchestrateApi } from '@careevolution/orchestrate';
import { OrchestrateApi } from '@careevolution/orchestrate';
from orchestrate import OrchestrateApi
from orchestrate import OrchestrateApi
If you wish to see the underlying code, you can find it in GitHub.
Before you can use the Orchestrate SDK, you need to create an account in the Developer Portal and get your personal API key.
Just paste your API key into the string in the examples below and give it a try.
import { OrchestrateApi } from '@careevolution/orchestrate';
const orchestrate = new OrchestrateApi({apiKey: "your-api-key"});
const result = await orchestrate.classifyCondition({
code: "119981000146107",
system: "SNOMED",
});
console.log(result);
import { OrchestrateApi } from '@careevolution/orchestrate';
const orchestrate = new OrchestrateApi({apiKey: "your-api-key"});
const result = await orchestrate.classifyCondition({
code: "119981000146107",
system: "SNOMED",
});
console.log(result);
{
behavioral: false,
substance: false,
socialDeterminant: false,
covid19Condition: 'Confirmed',
...
}
{
behavioral: false,
substance: false,
socialDeterminant: false,
covid19Condition: 'Confirmed',
...
}
from orchestrate import OrchestrateApi
api = OrchestrateApi(api_key="your-api-key")
print(api.classify_condition(code="119981000146107", system="SNOMED"));
from orchestrate import OrchestrateApi
api = OrchestrateApi(api_key="your-api-key")
print(api.classify_condition(code="119981000146107", system="SNOMED"));
{
'behavioral': False,
'substance': False,
'socialDeterminant': False,
'covid19Condition':
'Confirmed',
...
}
{
'behavioral': False,
'substance': False,
'socialDeterminant': False,
'covid19Condition':
'Confirmed',
...
}
The SDK contains methods corresponding to individual API operations. For details, see SDK Methods