API Reference
NEDOCS API is a rest interface which allows you to submit or get data via an HTTPS endpoint.Base URL
https://nedocs.org/api
The NEDOCS REST API is served over HTTPS only.
Key
51eb8253f9b9458f9af8e3cdfc08bfe4
Your hospital's API key is a long string code which identifies your hospital. It is available in your hospital's Settings menu.
Submit a score:POST
https://nedocs.org/api/submitscore
To add a new score, submit an https POST request containing the contents the NEDOCS object. The POST calls can be made by any device connected to the internet.
POST values.
All values are whole numbers, or integers sent as string.totalpat - Value for total patients in the ED. totaladmits - Value for total admits waiting in the ED. edbeds - Value for total ED beds. ipbeds - Value for total inpatient beds. longestadmit - Value in minutes for the longest admit. lastbedtime - Value for the last bed time in minutes. ventilators - Value for the total number of 1:1/ventilator patients. id - Your hospital's API key provided in the settings panel. Can also be sent in the URL string like this: https://www.nedocs.org/api/submitscore/85958eec-d647-4e80-880b-b8aaba1f9d0d.The score will be saved, a timeline broadcast will be generated, and all alerts will be executed.
Response.
Ok - If the score calculates, and notifications are sent. Error - Issues with either calculating or notifying the score.
Examples.
c# using System.Net; using (var client = new WebClient()) { var values = new NameValueCollection(); values["totalpat"] = "81"; values["totaladmits"] = "12"; values["edbeds"] = "75"; values["ipbeds"] = "511"; values["longestadmit"] = "360"; values["lastbedtime"] = "40"; values["ventilators"] = "1"; var response = client.UploadValues("https://www.nedocs.org/api/submitscore/(id)" , values); }
Get latest score:GET
https://nedocs.org/api/GetCurrentNEDOCS
Get latest score with all variable values, levels, and timestamp.
GET
Get latest score using complete uri with your API key like this: https://www.nedocs.org/api/GetCurrentNEDOCS/51eb8253f9b9458f9af8e3cdfc08bfe4.
aThe hospital's latest score will be returned as JSON.
aThe hospital's latest score will be returned as JSON.
Response.
A successful response will return the following variables.
string ScoreId
This is the local score ID in our database.
string HospitalId
This is your hospital identifier.
int Score
This is the numeric score.
int Level
This is the level of the score. For example: 1, 2, 3, 4, or 5. For Green this will be 1, Yellow 2, Orange 3, Red 4, Black 5.
string ScaleColor
The color of the level in english. The values will be Green, Yellow, Orange, Red, or Black.
string ScaleDescription
This is the display description of the scale. For example: Busy, or Overcrowded.
string ScaleDescriptionColor
The color of the description. This can be used to format your display. This color is contrast to ScaleColor.
int TotalPatients
The number of total ED patients.
int TotalAdmits
Total admits.
int TotalEDBeds
Total ED beds.
int TotalIPBeds
Total inpatient beds.
int TotalVentilators
Total ventilators or 1:1 patients. double TotalLongestAdmitHours
Total value of the longest admit time in hours. For example 2 hours and 30 minutes will be represented as 2.5 hours.
double TotalLongestAdmitMinutes
Total value of longest admit time in minutes. For example 2 hours and 30 minutes will be 150 minutes.
double TotalLastBedTimeHours
Total value of last bed time in hours.
double TotalLastBedTimeMinutes
Total value of last bed time in minutes.
double LongestAdmitHours
Longest admit value hours only. For example 2 hours and 30 minutes will be 2 hours.
double LongestAdmitMinutes
Longest admit value in remaining minutes. For example 2 hours and 30 minutes will be 30 minutes.
double LastBedTimeHours
Last bed time value in remaining minutes. For example 2 hours and 30 minutes will be 30 minutes.
double LastBedTimeMinutes
Last bed time value in remaining minutes. For example 2 hours and 30 minutes will be 30 minutes.
DateTime EventTimeLocal
Local timestamp.
DateTime EventTimeUTC
Universal timestamp.
Errors will be returned with the following fields.
string Score
string Message
Score will be returned as Error.
Message will contain the description of the error.
string ScoreId
This is the local score ID in our database.
string HospitalId
This is your hospital identifier.
int Score
This is the numeric score.
int Level
This is the level of the score. For example: 1, 2, 3, 4, or 5. For Green this will be 1, Yellow 2, Orange 3, Red 4, Black 5.
string ScaleColor
The color of the level in english. The values will be Green, Yellow, Orange, Red, or Black.
string ScaleDescription
This is the display description of the scale. For example: Busy, or Overcrowded.
string ScaleDescriptionColor
The color of the description. This can be used to format your display. This color is contrast to ScaleColor.
int TotalPatients
The number of total ED patients.
int TotalAdmits
Total admits.
int TotalEDBeds
Total ED beds.
int TotalIPBeds
Total inpatient beds.
int TotalVentilators
Total ventilators or 1:1 patients. double TotalLongestAdmitHours
Total value of the longest admit time in hours. For example 2 hours and 30 minutes will be represented as 2.5 hours.
double TotalLongestAdmitMinutes
Total value of longest admit time in minutes. For example 2 hours and 30 minutes will be 150 minutes.
double TotalLastBedTimeHours
Total value of last bed time in hours.
double TotalLastBedTimeMinutes
Total value of last bed time in minutes.
double LongestAdmitHours
Longest admit value hours only. For example 2 hours and 30 minutes will be 2 hours.
double LongestAdmitMinutes
Longest admit value in remaining minutes. For example 2 hours and 30 minutes will be 30 minutes.
double LastBedTimeHours
Last bed time value in remaining minutes. For example 2 hours and 30 minutes will be 30 minutes.
double LastBedTimeMinutes
Last bed time value in remaining minutes. For example 2 hours and 30 minutes will be 30 minutes.
DateTime EventTimeLocal
Local timestamp.
DateTime EventTimeUTC
Universal timestamp.
Errors will be returned with the following fields.
string Score
string Message
Score will be returned as Error.
Message will contain the description of the error.
Example.
"{\"ScoreId\":\"614100ae0d5d2c167c3b1374\",\"HospitalId\":\"5118e66e000bfa06e8bc41b9\",\"Score\":125,\"Level\":3,\"ScaleColor\":\"Orange\",\"ScaleDescription\":\"Overcrowded\",\"ScaleDescriptionColor\":\"White\",\"TotalPatients\":30,\"TotalAdmits\":4,\"TotalEDBeds\":20,\"TotalIPBeds\":200,\"TotalVentilators\":0,\"TotalLongestAdmitHours\":2.3833333333333333,\"TotalLongestAdmitMinutes\":143.0,\"TotalLastBedTimeHours\":0.5,\"TotalLastBedTimeMinutes\":30.0,\"LongestAdmitHours\":2.0,\"LongestAdmitMinutes\":23.0,\"LastBedTimeHours\":0.0,\"LastBedTimeMinutes\":30.0,\"EventTimeLocal\":\"2021-09-14T16:06:06.42Z\",\"EventTimeUTC\":\"2021-09-14T20:06:06.42Z\"}"
Widgets
Widgets help your hospital display readymade NEDOCS interfaces onto your own web pages. Please see the widgets page for details on widgets.