Overview
The Clinical API is used for managing patients, prescriptions and orders.
Functionality is currently split across two domains. Please reference the sandbox for which endpoints are available under each domain.
| Env | Domain 1 | Domain 2 |
|---|---|---|
| neutron (staging) | api.neutron.health/graphql | clinical-api.neutron.health/graphql |
| photon (production) | api.photon.health/graphql | clinical-api.photon.health/graphql |
Sandbox
Use the sandbox to interact with the latest version of our clinical API:
Example
The easiest way to query the API is to use a library that supports graphql. The below example is using the GraphQL Request library
const graphQLClient = new GraphQLClient('https://api.photon.health/graphql', {
headers: {
authorization: 'AUTH TOKEN HERE',
},
});
const query = gql`
{
patients {
id
externalId
name {
full
}
}
}
`;
const results = await graphQLClient.request(query);If you wanted to just use raw http requests, you could do something like the following
const axios = require('axios').default;
const data = JSON.stringify({
query: `query {
patients {
id
externalId
name {
full
}
}
}`,
variables: {}
});
const config = {
headers: {
'authorization': 'AUTH TOKEN HERE',
'content-type': 'application/json'
},
};
const results = await axios.post('https://api.photon.health/graphql', data, config);The above example is using Axios to make the https request.
