Access Thousands of Medical Algorithms via APIs

Direct Interface with Standard Data Definitions

We provide access to all our calculators and models by API - Application Programming Interface. You can fully integrate our analytics into your healthcare platforms and applications with our APIs. We use standard data definitions to improve interoperability, reliability, productivity and ease of data integration.

Access Options

You can run our calculators within your web platforms and mobile apps with our APIs. The data entered in your app is sent via a specific API for each calculator and the results are returned for display in your application.

  • Integrate with your EMR/EHR systems to automatically evaluate a condition based on the data in a patient’s electronic health record. Only anonymized data is transferred to us assuring that no identifiable patient health information is exchanged.
  • Integrate with mobile applications. Access the largest collection of medical algorithms available worldwide to enhance your healthcare application with peer-reviewed, evidence-based algorithms covering nearly every medical speciality area and condition.

Our tech-support team will assist you with data integration. We use standard data definitions for all our input values. We can help you match your data items to the model input data items in our calculator formulas, and provide you with a data mapping structure. Contact us to discuss your requirements and data mapping formats (HL7, LOINC, SNOMED). We can also assist with SMART on FIHR integrations.

Evidence-Based Documentation via API connection

Consult Reports are also available via API for any of the data sets you process. They can be added directly to patient records as evidence-based documentation to support your patient evaluations. Our consult reports are effective tools used by healthcare providers aiming to cut the cost and time required to obtain prior authorizations from payers.

Free API Sign Up

Sign Up for an Free API Key to access and use analytics available on the Medal API Center.
With the help of a Free API Access, you can do testing and integrate with your application in record time.

API Technical Specifications

Refer to our technical specs for API implementation information.

Access via iFrame

Embed our calculators into your existing website using iFrame.The < iframe > tag specifies an inline frame. An inline frame enables you to embed our calculators and algorithms within your current HTML site. Please contact us for more information.

Introduction

The Medal API allows you to perform all the operations that are available on our web client. Medal API is built using REST principles which ensures predictable URLs so writing your applications is easy. This API follows HTTP rules, so a wide range of HTTP clients can be used to interact with the API. Every resource is exposed as a URL. The URL of each resource can be obtained by accessing the API Root Endpoint.

Api URL

https://www.medicalalgorithms.com/api/v1/process_algo

HTTP Request method and Authentication

The API supports HTTP POST & authentication using the combination of a user specific API-key and an algorithm key. This allows you to protect your API URLs on your web server so that only you can access them. You may provide an API-key and an algorithm key by setting headers as shown below.

curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
  array(
	"Content-type: application/json","x-api-key:API-KEY",
	"x-algo-key:ALGORITHM-KEY",
  ));

API using PHP cURL - Example

$url = "http://medicalalgorithms.com/api/v1/process_algo";
$input_variables = array(
  "ivar1"=>"value","ivar2"=>"value",
  "ivar3"=>"value","ivar4"=>"value",
  ....
);
$content = json_encode($input_variables);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
  array(
   "Content-type: application/json", "x-api-key:API-KEY",
   "x-algo-key:",
  )
);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
$response = json_decode($json_response, true);

API Response

The API provides results in JSON object containing the algorithm's basic Information, provided inputs, generated output variables & error messages if applicable.

A sample API response is shown as follows:

{
"algorithm_info": {
	"title": "Guidelines for When to Call Pediatrician About Febrile 
	Child"
},
"inputs": {
  "ivar1": "yes","ivar2": 1,"ivar3": "no","ivar4": 38,
  ...
  "ivar17": "mild"
 },
  "results": {
  "status": "success",
  "errors": null,
  "outputs": { "ovar1": "yes","ovar2": "yes","ovar3": "3","ovar4": "yes"
 }}
}

As shown in the above sample output, the API will provide the algorithm’s basic info, provided inputs and the algorithm’s output details will be found under the results section, depending upon the status property, i.e. if the status property returns 'success' then its outputs will be given under its 'outputs' property else error messages will be returned through its 'errors' property.

HTTP response codes
Status CodeDescription
200OK
400Bad Request. Possibly missing API-key or algorithm key
401Unauthorized/Invalid API-key
500Internal Server Error