CAD Partner Interoperability
This guide describes the secure web service interface that Juvare provides to enhance solution interoperability for its EMResource clients and partners.
With this web service, data is communicated using either SOAP/XML or REST/JSON. The specialized application programming interfaces (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 a CAD system 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 enroute to each facility.
-
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.
-
JSON
To send a message using JSON, the following information must be specified in the message.
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_id": "your EMS ID",
"ems_name": "your agency name",
"vehicles": [
{
"vehicle_id": "1234",
"facility_id": "your facility ID",
"facility_name": "your facility name",
"status": "at_facility",
"arrival_time": "2022-05-04T17:00:10Z"
},
{
"vehicle_id": "1235",
"facility_id": "your facility ID",
"facility_name": "your facility name",
"status": "en_route",
"arrival_time": "2021-11-04T18:01:10Z",
"lat": "40.13221143",
"long": " -74.00898606"
},
{
"vehicle_id": "1236",
"status": "available",
"arrival_time": "2021-11-04T18:02:10Z",
"lat": "40.13221143",
"long": " -74.00898606"
},
{
"vehicle_id": "1237",
"status": "unavailable",
"arrival_time": "2021-11-04T18:03:10Z",
"lat": "40.13221143",
"long": " -74.00898606"
},
{
"vehicle_id": "1238",
"status": "retired",
"arrival_time": "2021-11-04T18:04:10Z",
"lat": "40.13221143",
"long": " -74.00898606"
}
]
}
Values
| Attribute | Format | Comment | Validation |
|---|---|---|---|
| Facility ID | GUID |
Unique identifier for each facility (provided by Juvare). This is required for ambulances with statuses EN_ROUTE and AT_ FACILITY. |
|
| Facility Name | String | Max 500 Characters | |
| Status |
Valid Values:
|
|
|
| Arrival Time | Datetime (in UTC) | 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.
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 resource. |
| Name | Text | Descriptive resource name. |
| 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 | 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.
Response includes Status Failures
In the example below, it states there were 744 status failures even though it is likely everything was sent successfully.
<p><resourceFailures>0</resourceFailures></p>
<p><resourceSuccesses>9</resourceSuccesses></p>
<p><statusFailures>744</statusFailures></p>
<p><statusSuccesses>363</statusSuccesses></p>
This typically happens when numeric status types are updated through the API but the updated value is the same as the previous value. In this case, EMResource displays the new timestamp from your message and the value remains as it was before.
Typically, there is not an issue unless a true error message is received. These can be found in the error tag of the response message.
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.