Introduction
Welcome to the ezyVet Standard PACS Integration Beta Reference Page!
The ezyVet Standard Diagnostic Integration is designed around a RESTful interface and utilizes OAuth 2.0 Client Credentials grant. The webhooks accepts and returns messages in JSON-format.
Partner Endpoints
Access Token
An endpoint which must be implemented by an API Partner. This endpoint will allow ezyVet to authenticate and use the Partner's web services (if authentication is required).
Fetch an Access Token
Sample Request: Get an
Access Token
.
var settings = {
"url": "(Access Token Endpoint)",
"method": "POST",
"headers": {
"content-type": "application/json"
},
"data": {
"client_id": "abc",
"client_secret": "def",
"grant_type": "client_credentials"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"access_token": "CnKAVqSqp6UBq3Ei17e1UIj2U39UuOQI1i9Db3QT",
"token_type": "Bearer"
}
HTTP Request
POST (Access Token Endpoint)
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
client_id | string | - | The client ID. |
client_secret | string | - | The client secret. |
grant_type | string | - | The grant type. |
Response Parameters
Parameter | Type | Default | Description |
---|---|---|---|
access_token | string | - | The access token. |
token_type | string | Bearer | The type of the access token. (Default of Bearer) |
Modality
An endpoint which must be implemented by an API Partner.
This endpoint will allow ezyVet to fetch a list of Modalities
.
Fetch Modalities
Sample Request: Get a list of
Modalities
.
var settings = {
"url": "(Fetch Modality List Endpoint)",
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer token12345 (only if access token required)"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"modalities" : [
{
"name" : "Autorefraction",
"code" : "AR"
}
]
}
HTTP Request
GET (Fetch Modality List Endpoint)
Response Parameters
Parameter | Type | Default | Parent | Description |
---|---|---|---|---|
modalities* | list | - | - | A list of Modalities. |
name* | string | - | modalities | The name of the Modality . |
code* | string | - | modalities | The code of the Modality . |
Animal Breeds & Species
An endpoint which must be implemented by an API Partner.
This endpoint will allow ezyVet to fetch a list of Animal Species
.
Fetch Animal Breeds & Species
Sample Request: Get a list of
Animal Breeds & Species
.
var settings = {
"url": "(Fetch Species List Endpoint)",
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer token12345 (only if access token required)"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"species": [
{
"code": "CANINE",
"name": "Canine",
"breeds": [
{
"code": "LABRADOR_RETRIEVER",
"name": "Labrador Retriever"
},
{
"code": "PUG",
"name": "Pug"
}
]
},
{
"code": "EQUINE",
"name": "Equine",
"breeds": [
{
"code": "BELGIAN_HORSE",
"name": "Belgian Horse"
},
{
"code": "THOROUGHBRED",
"name": "Thoroughbred"
}
]
}
]
}
HTTP Request
GET (Fetch Breeds & Species List Endpoint)
Response Parameters
Parameter | Type | Default | Parent | Description |
---|---|---|---|---|
species | list | - | - | A List of species. |
code | string | - | species | The code of the species. |
name | string | - | species | The name of the species. |
breeds | list | - | species | A List of breeds related to the species. |
code | string | - | breeds | The code of the breed. |
name | string | - | breeds | The name of the breed. |
Diagnostic Request
An endpoint which must be implemented by an API Partner (wishing to receive
Diagnostic Requests
).
This endpoint will allow ezyVet to push a list of Diagnostic Requests
.
Push Diagnostic Request
ezyVet will push Diagnostic Requests
as they are made/updated/disabled
to the (Diagnostic Request Endpoint)
. The partner must acknowledge the POST
request with a
HTTP 200 OK
once they have received the Diagnostic Requests
successfully
AND have been able to parse the information correctly.
Sample Request : Push a
Diagnostic Request
(JSON) to partner's endpoint.
var settings = {
"url": "(Diagnostic Request Endpoint)",
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer token12345 (only if access token required)"
},
"data": {
"id": 595,
"active": true,
"created_at": 1529901719,
"modified_at": 1529901719,
"timestamp": 1529897843,
"contact": {
"id": 76,
"active": true,
"created_at": 1527011450,
"modified_at": 1527011450,
"ownership_id": 1,
"code": "WendyTest",
"first_name": "Wendy",
"last_name": "Ww",
"business_name": "",
"is_business": false,
"is_customer": true,
"is_supplier": false,
"is_vet": false,
"is_syndicate": false,
"is_staff_member": false,
"stop_credit": "OK"
},
"animal": {
"id": 2,
"name": "XiaoGouABC",
"code": "XGABC",
"sex": {
"id": 1,
"active": true,
"created_at": 1467543440,
"modified_at": 1467543440,
"name": "Male",
"abbreviation": "M",
"is_desexed": false
},
"is_dead": false,
"is_hostile": "",
"animalcolour_id": 34,
"integrated_species": {
"id": 293,
"active": true,
"created_at": 1528986101,
"modified_at": 1528986101,
"code": "1",
"name": "Canine"
},
"integrated_breed": {
"id": 5055,
"active": true,
"created_at": 1528986101,
"modified_at": 1528986101,
"code": "1",
"name": "AFFENPINSCHER"
},
"rabies_number": "",
"date_of_rabies_vaccination": 0,
"microchip_number": "",
"date_of_birth": 1438524000,
"is_estimated_date_of_birth": false,
"date_of_death": 0,
"death_reason": "",
"date_of_desex": 0,
"referring_clinic_id": 0,
"referring_vet_id": 0,
"residence_contact_id": 0,
"weight_unit":"kg",
"weight": 3.499,
"resuscitate": "Unspecified",
"notes": "Some notes."
},
"consult_id": 55,
"vet": {
"id": 31,
"active": true,
"created_at": 1494879128,
"modified_at": 1522194348,
"name": "Dr Vet",
"is_vet": true,
"is_salesperson": true
},
"reference_number": "AU10674-DR595",
"specifics": "",
"modality": "DX",
"status": "",
"supplier_id": 67,
"ownership_id": 2,
"diagnostic_list": [
{
"id": 958,
"active": true,
"created_at": 1529901719,
"modified_at": 1529901719,
"diagnostic_id": 190,
"name": "Cardio Ultrasound",
"code": "CardioUS",
"diagnostic_class": "Diagnostic"
},
{
"id": 959,
"active": true,
"created_at": 1529901719,
"modified_at": 1529901719,
"diagnostic_id": 70,
"name": "Necropsy",
"code": "Necropsy",
"diagnostic_class": "Diagnostic"
}
]
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
200 OK
Unsuccessful Response (text/html)
Error message. e.g. ("Cannot process this lab request.")
HTTP 4xx e.g. 400
Optional Response (JSON)
{
"external_link": "(valid URL)",
"status": "(The status given by the Partner)"
}
200 OK
HTTP Request
POST / PUT (Diagnostic Request Endpoint)
Post / Patch Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | int | - | The ID number used by the system to uniquely identify a DiagnosticRequest . |
active | bool | - | If true, the DiagnosticRequest is active and usable in ezyVet. |
created_at | int | - | The epoch time when the DiagnosticRequest was created. |
modified_at | int | - | The epoch time when the DiagnosticRequest was last modified. |
timestamp | int | - | The epoch creation date of the DiagnosticRequest . |
contact | json | - | See Contact for schema information. |
animal | json | - | See Animal for schema information. |
vet | json | - | See User for schema information. |
specifics | string | - | A field where the request specifics / History of the DiagnosticRequest can be entered and visible within ezyVet. |
status | string | - | A field where the status of the DiagnosticRequest can be visible within ezyVet |
reference_number | string | - | The lab request reference ID. |
consult_id | int | - | The unique identifier for the Consult . |
modality | string | - | The modality code. |
supplier_id | int | - | The unique identifier for the Supplier the request is sent to. |
ownership_id | int | - | The unique identifier for the ownership that the DiagnosticRequest is part of. |
diagnostic_list | list | [] | A list containing DiagnosticRequestItems |
Diagnostic List Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | int | - | The ID number used by the system to uniquely identify a DiagnosticRequestItem . |
active | int | - | If true, the DiagnosticRequestItem is active and usable in ezyVet. |
created_at | int | - | The epoch time when the DiagnosticRequestItem was created. |
modified_at | int | - | The epoch time when the DiagnosticRequestItem was last modified. |
diagnostic_id | int | - | The ID number used by the system to uniquely identify the Diagnostic that the DiagnosticRequestItem represents. |
name | string | - | The name of the Diagnostic . |
diagnostic_class | string | - | The type of the Diagnostic |
code | string | - | The code of the Diagnostic . |
Response Parameters
Parameter | Type | Default | Description |
---|---|---|---|
external_link (optional) | string, URL | - | An optional field. Can be provided if the partner wishes the ezyVet user to be redirected to their site in order to fill out any additional information that may be required by them. Must be a valid URL if provided. NOTE: If the partner does not include this in the response, then the user will not be redirected anywhere. If an external_link has been provided in the past, then the user can still access that link at anytime if the setting Company Logo has been populated in the Integration Setting in ezyVet. |
status (optional) | string | - | An optional field. Partner may return this field if they wish to provide the current status of the DiagnosticRequest in their system to ezyVet. |