CAD API Implementation Guide
This is an implementation guide for developers to use to integrate a CAD system with EMResource.
With this web service, data is communicated using either SOAP/XML or REST/JSON. The APIs to update ambulance and aeromedical status are documented below.
It is assumed that a business agreement between Juvare and the business partner is in effect and the specifics of the data to be shared are understood by all parties.
The Post API for Ambulance CAD Data is used to update ambulance data in EMResource. This data is communicated using a JSON for REST web service.
With this API, EMResource receives ambulance data from CAD systems and aggregates the data to display the following information in EMResource.
-
Facility Information.
-
Number of ambulances that have arrived at each facility.
-
Number of ambulances en route to each facility.
-
Number of ambulances at each hospital that have been waiting more than 30 minutes to offload their patient.
-
Average wait time of ambulances that have arrived at the facility to offload patients.
-
Maximum wait time of an ambulance that has arrived at the facility to offload patients
-
-
EMS Agency Information.
-
Number of ambulances that have arrived at facilities.
-
Number of ambulances en route to facilities.
-
Number of available ambulances.
-
Geolocation of each ambulance.
-
JSON
To send a message, the following information must be specified in the HTTP request.
Request
Authorization
Basic Auth: Username and Password (to be provided in a separate document).
Headers
Content-Type: application/json
Accept: application/json
Address
https://emresource.juvare.com/partnergateway/serviceendpoint/UpdateAmbulanceStatus/{Division}
Your Division will be provided in a separate document.
HTTP Method: POST
Body (Example)
{
"ems_agency_id": "your EMS ID",
"ems_agency_name": "First Responders",
"vehicles": [
{
"vehicle_id": "b0417e04-02db-4e94-97f3-06eb1876610d",
"vehicle_name": "Med 7",
"facility_id": "your facility ID1f7e91e9-3f0b-498d-ac0f-07d22af50ef9",
"facility_name": "Memorial Hospital",
"status": "at_facility",
"arrival_time": "2022-05-04T17:00:10Z"
},
{
"vehicle_id": "0dcf6c00-792d-42fd-8bf4-42ccf7dd4c4a",
"vehicle_name": "Med 8",
"facility_id": "279dffba-9546-40c6-89e4-854382285253",
"facility_name": "Community Hospital",
"status": "en_route",
"arrival_time": "2021-11-04T18:01:10Z",
"lat": "40.13221143",
"long": " -74.00898606"
},
{
"vehicle_id": "60575b2a-7fff-4072-a016-0a59db003bb1",
"vehicle_name": "Engine 1",
"status": "available",
"arrival_time": "2021-11-04T18:02:10Z",
"lat": "40.13221143",
"long": " -74.00898606"
},
]
}
Response
Values
| Attribute | Format | Comment | Validation |
|---|---|---|---|
| EMS Agency ID | String | Unique identifier for the EMS agency. | |
| EMS Agency Name | Free Text |
The name of the agency. |
|
| Vehicle ID | GUID |
Unique identifier for each ambulance or other EMS vehicle. Optional. |
|
| Vehicle Name | Free Text |
The name of the vehicle. The EMS unit number is often used in the name. Required. |
|
| Facility ID | GUID |
Unique identifier for each facility (provided by Juvare). This is required for ambulances with statuses EN_ROUTE and AT_ FACILITY. Required if Status = AT_FACILITY. |
|
| Facility Name | String |
Max 500 Characters (optional). This field is not used by EMResource. It is optional and intended for human readability when reviewing or troubleshooting the API. |
|
| Status |
Valid Values:
|
|
|
| Arrival Time | ISO-8601 Datetime (in UTC) |
The time when the vehicle arrived at the current facility. format: YYYY-MMDDThh:mm:ssZ |
|
| Lat | Latitude | Must be between -180 and 180 (optional) | WARNING - If not valid a warning is issued, and the value is set to null. |
| Long | Longitude | Must be between -90 and 90 (optional) | WARNING - If not valid a warning is issued, and the value is set to null. |
Example
The example below describes the various messages that are sent to EMResource.
| 1:10pm | Unit 123 is currently at its home base | Status: Available |
| 1:12pm | Unit 123 leaves their home base and drives to a patient | Status: Unavailable |
| 1:40pm | Unit 123 begins transporting the patient to the hospital | Status: En Route |
| 1:48pm | Unit 123 arrives at the hospital | Status: At Facility |
| 2:19pm | Unit 123 leaves the hospital | Status: Available |
For an example Postman file, contact Juvare.
Response (sample)
{
"details": [
"Vehicle 1 - Id: West Essex Ambulance. ADDED"
],
"summary": [
"Vehicles ADDED: 1",
"Vehicles ADDED WITH WARNINGS: 0",
"Vehicles UPDATED: 0",
"Vehicles UPDATED WITH WARNINGS: 0",
"Vehicles REMOVED: 0",
"Vehicles REMOVED WITH WARNINGS: 0",
"Vehicles WITH ERROR(S) - NOT MODIFIED: 0"
]
}
The Helicopter CAD Interface is available for Juvare’s clients that want to manage helicopter and other emergency vehicle statuses in EMResource. The interface uses a web service to communicate with the client’s CAD system, sending and receiving messages in XML format.
XML
To send a message using XML, the following information must be specified in your message.
Authorization
Basic Auth: Username and Password to be provided in a separate document
Headers
Content-Type: text/xml
Address
https://emresource.juvare.com/partnergateway/PartnerEndpoint
HTTP Method: POST
Header (Example)
<?xml version="1.0" encoding="utf-8"?>
<requestDefinition actionName='your action name' systemName='EMRESOURCE'
divisionName='your division name'>
</requestDefinition>
Body (Example)
<resourceStatus>
<resource>
<resourceId>your resource ID</resourceId>
<name>your resource name</name>
<location>
<latitude>33.177238</latitude>
<longitude>-96.596908</longitude>
</location>
<availability>
<code>3001000</code>
<label>Available</label>
<commentText>testing</commentText>
</availability>
<lastUpdateTime>2022-04-15T14:47:00</lastUpdateTime>
</resource>
</resourceStatus>
Values
| Attribute | Format | Comment |
|---|---|---|
| Action Name | Text | Uniquely identifies the web service and its scope. |
| Division Name | Text | |
| Username | Text | Username for authentication. |
| Password | Text | Password for authentication. |
| Resource ID | GUID | Unique identifier for each aeromedical unit (provided by Juvare). |
| Name | Text | Descriptive name of aeromedical unit. |
| Availability Code | Numeric |
A unique code describing the availability status. Valid Values: 3001000 = Available 3001001 = Unavailable 3001003 = Delay |
| Availability Label | Multi | A descriptive status label, based on the availability code. This is included for human readability and is not used by the API. |
| Latitude | Numeric | Latitude must be in the range -90 to +90 (optional). |
| Longitude | Numeric | Longitude must be in the range -180 to +180 (optional). |
| Comment | Text | Freeform comments that supplement the status value (optional). |
| Last Update Time | ISO-8601 Datetime (in UTC) | The timestamp of when this data was last updated in the source system. |
Example
For an example Postman file, contact Juvare.
When sending data through a POST API, you can log into EMResource to verify the information was received. To do this:
-
Request a UI username and password from Juvare.
-
Go to EMResource and log in with the UI credentials.
-
Verify that the information is displaying correctly.
If you receive a message when you submit the API, locate it in the examples below and attempt to resolve the issue. If you need assistance, contact Juvare.
Error Message: SOAP-ENV:ServerEMSystem is unable to process this request
There are two possible reasons for this error:
-
The web service username and password contains a forbidden special character.
-
More than one of the same Standard Status Type is used in the region.
If you receive this message, contact Juvare.
Error Message: SOAP-ENV:ServerUser is not authorized for the target
This message likely appears because the web service user is not listed in the interface. If you receive this message, contact Juvare.
Error Message: Please specify a username and password following the HTTP Basic Authentication
The URL listed in your message is likely pointing to the wrong address. If you receive this message, contact Juvare to verify the URL.
Error Message: User May Not Update Status
There are two possible reasons for this error:
-
The status type is not currently being queried by the region (for example, it is an event only status type).
-
The status type is being queried by the region, but the event does not include that resource.
If you receive this message, contact Juvare.
Your web service username and password can be used to access the EMResource Interface Summary, which includes the following information:
-
Action Name
-
Division Name (also known as the Interface Key)
-
Address or URL
-
Participating Resources and corresponding IDs
-
Status Names
-
Multiple choice options for multichoice statuses
To access the Interface Summary
Go to EMResource and log in using the web service username and password provided by Juvare.
-
On the upper left, in the main menu, select Setup then select Interface Dashboard.
-
For interface, select Summary.
-
Review the interface information on this page and as needed, update the details.
For more information, contact the Juvare Support Center at support@juvare.com or 877-771-0911.