MEDrecord API
MEDrecord REST API logo

developers

Welcome

Welcome to the MEDrecord API documentation. Here you can find technical information on how the MEDrecord API works and how you can use it to develop your own “medical grade” applications.
The overview picture below shows how we have setup our API structure, divided into separated APIs:

MEDrecord API

Getting Started

Our API is based on a Parse back-end, which relies on Mongo DB for objects storage. Most of its features (such as URL patterns, authentication flow, data filtering, data types…) are also valid in our API. If you don’t find the feature you need in our documentation, you may find useful taking a look at the Parse REST API guide.

Note: The API available on https://api.medrecord.io/1 is an open test environment. You can try it by setting our keys :
Application ID: iMoc7Xu1tO9S2k6XpaGLMUlNTPsPFHdQ4PdhbqUD
REST API key: eLHTBDlqjjphZwYA6olMp10UCd6PdbDTDhP4qHWN

Setting Request Headers

In order to consume the API, every request should include information about the Application ID and the REST API key of your MEDrecord installation:

  • X-Parse-Application-Id: your Application ID
  • X-Parse-REST-API-Key: your REST API key

In the code examples you’ll see through this document we don’t set the headers in every request. We do this to let developers focus on request-specific information rather than in other configuration parameters.

Depending on your http client, you may have the possibility to set the headers globally. This is a best practice to make your application include them in every request. Here are some examples:

import { Injectable } from '@angular/core';
import { 
  HTTP_INTERCEPTORS, 
  HttpHandler, 
  HttpHeaders, 
  HttpInterceptor, 
  HttpRequest 
} from '@angular/common/http';

// in Angular 4+ create a class like this
@Injectable()
export class MedRecordClientInterceptor implements HttpInterceptor {
  intercept(req: HttpRequest<any>, next: HttpHandler) {
  
    let headers = new HttpHeaders();
    headers = headers.append('X-Parse-Application-Id', 'yourApplicationId');
    headers = headers.append('X-Parse-REST-API-Key', 'yourRestApiKey');

    req = req.clone({headers});
    return next.handle(req);
  }
}

// and include it in your module providers      
@NgModule({
  providers: [
    {
      provide: HTTP_INTERCEPTORS,
      useClass: MedRecordClientInterceptor,
      multi: true
    } 
  ]
})
export class YourModule { }
$.ajaxSetup({
  beforeSend: function (xhr) {
    xhr.setRequestHeader('X-Parse-Application-Id', 'yourApplicationId');
    xhr.setRequestHeader('X-Parse-REST-API-Key', 'yourRestApiKey');        
  }
});

Authentication

A user account is required in order to use any of our APIs. Authentication is token-based, so our API will throw an error if your request doesn’t contain a valid session token.
Use the /Login API to get a sessionToken and include it in the X-Parse-Session-Token header of every request.

No authentication is required in the test environment

For more detailed information about REST API Authentication and Users management, see also the Parse documentation.

Errors

Depending on how you build your request, you may get errors coming from Parse or from our Data Validation layer.

No validation is performed in the test environment

Read more about Parse errors.

{
  "code": 141,
  "error": "Missing required properties: systolicUnit"
}

API Structure

Our API is composed by Data and Functions layers, to separate between operations to deal with objects and business logic.

Data

The endpoint of the Data layer, which is responsible of CRUD operations (Create, Read, Update, Delete) for our supported objects is ${API_HOST}/1/classes/ClassName.

There you can use the common REST patterns to:

Operation Method URL pattern
Get a list of objects GET /1/classes/ClassName
Get an object by ID GET /1/classes/ClassName/objectId
Add an object POST /1/classes/ClassName
Update an object by ID PUT /1/classes/ClassName/objectId
Delete an object by ID DELETE /1/classes/ClassName/objectId

Every newly added object will be enriched by some properties:

  • objectId: the unique ID of that object
  • createdAt: when the object has been added
  • updatedAt: when the object has been updated the last time

createdAt and updatedAt dates use the ISO 8601 format.

Read more about objects in the Parse documentation.


Functions

The endpoint of the Functions APIs is ${API_HOST}/functions/FunctionName.

The functions layer exposes logic to perform common calculations such as:

  • Calculate the BMI value, given weight and height as input
  • Calculate the ACQ score
  • Calculate the Blood Pressure condition based on provided thresholds

Documentation on the Functions will be available soon.

Queries

Querying on API results is done through GET parameters.

Here are some common query parameters you may want to use to retrieve your data:

  • where: filter results based on a condition (use JSON)
  • order: sort data by single or multiple properties
  • limit: limit the number of objects returned
  • skip: use to paginate through results
  • distinct: find unique values for a specific field
  • count: get a count of the objects returned

By default, results arrays returned by the API are limited to 100 items.
You can extend this limit up to 1000 items by adding ?limit=1000 in the end of your GET request. If you need to get more results please consider using the skip parameter to take advantage of pagination.

Read more about queries in the Parse documentation.

Let’s see some common querying use cases.

/*
 * Get Blood Pressure measurements registered for a careplan in a specific time-frame
 */
const start = '2018-01-01';
const end = '2018-12-31';

const params = {
  where: JSON.stringify({
    carePlanId: 'yourCarePlanId',
    timestamp: {
      $gte: { __type: 'Date', iso: start },
      $lte: { __type: 'Date', iso: end }
    }
  })
};
    
http.get(`https://api.medrecord.io/1/classes/BloodPressure`, { params }).subscribe(
  res => console.log(res),
  err => console.error(err)
); 

/*
 * Get all Blood Pressure measurements with a systolic value greater than 130 mmHg, sorted by systolic value
 */
const params = {
  where: JSON.stringify({
    systolic: { $gt: 130 }
  }),
  order: 'systolic'
};
    
http.get(`https://api.medrecord.io/1/classes/BloodPressure`, { params }).subscribe(
  res => console.log(res),
  err => console.error(err)
); 
/*
 * Get Blood Pressure measurements registered for a careplan in a specific time-frame
 */
var start = '2018-01-01';
var end = '2018-12-31';

var params = {
  where: JSON.stringify({
    carePlanId: 'yourCarePlanId',
    timestamp: {
      $gte: { __type: 'Date', iso: start },
      $lte: { __type: 'Date', iso: end }
    }
  })
};

$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/BloodPressure",
  data: params,
  success: function (res) {
    console.log(res.results);
  },
  error: function (err) {
    console.error(err);
  }
});

/*
 * Get all Blood Pressure measurements with a systolic value greater than 130 mmHg, sorted by systolic value
 */
var params = {
  where: JSON.stringify({
    systolic: { $gt: 130 }
  }),
  order: 'systolic'
};

$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/BloodPressure",
  data: params,
  success: function (res) {
    console.log(res.results);
  },
  error: function (err) {
    console.error(err);
  }
});
# Get Blood Pressure measurements registered for a careplan in a specific time-frame
curl -X GET -G --data-urlencode 'where={"carePlanId":"yourCarePlanId","timestamp":{"$gte":{"__type":"Date","iso":"2018-01-01"},"$lte":{"__type":"Date","iso":"2018-12-31"}}}' https://api.medrecord.io/1/classes/BloodPressure

# Get all Blood Pressure measurements with a systolic value greater than 130 mmHg, sorted by systolic value
curl -X GET -G --data-urlencode 'where={"systolic":{"$gt":130}}&order=systolic' https://api.medrecord.io/1/classes/BloodPressure

Storing Custom Data

If the object you want to store isn’t supported by our API yet, or you just want to store data based on your own model, we provide a very easy-to-use API to cover this scenario as well.

All you need is to POST a JSON containing the following properties to the endpoint ${API_HOST}/1/classes/Custom:

  • ehrId: objectId of the EHR where your data belongs to
  • carePlanId: objectId of the care plan you want to link your data to
  • modelClassName: name for your model class (it’s preferable to use Pascal Case for class names)
  • payload: your data (optional)

Demo: check out a demo implementation of this feature

/*
 * Add an object of type MyOwnModel with some random properties
 */
$.ajax({
  type: "POST",
  url: "https://api.medrecord.io/1/classes/Custom",
  data: {
    ehrId: "testEhrId",
    carePlanId: "testCarePlanId",
    modelClassName: "MyOwnModel",
    payload: {
      customProp: "HelloWorld",
      anotherKey: "just-another-value",
      iAmNumeric: 123,
      exampleBoolean: true
    }
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
/*
 * Get a list of objects of type MyOwnModel
 * filtering also by that model's property "customProp" with a value of "HelloWorld"
 */
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Custom",
  data: {
    where: JSON.stringify({ 
      'modelClassName': 'MyOwnModel',
      'payload.customProp': 'HelloWorld'
    })
  },
  success: function (res) {
    console.log(res.results);
  },
  error: function (err) {
    console.error(err);
  }
});

EHR Introduction

As each user will have a User ID, the user also needs an EHR ID. In principle these EHR ID’s are standalone, so they could exist without user ID, or a single user could have multiple EHR IDs (not preferable).

Next to the User ID and the EHR ID, the user also needs a CarePlan ID in order to start registering “something”.

/Ehr

List all EHRs

Return a list of available EHRs.

http
  .get("https://api.medrecord.io/1/classes/Ehr")
  .pipe(map((res: {results: any[]}) => res.results))
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Ehr",
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "results": [
    {
      "objectId": "w1lDhnYabt",
      "createdAt": "2018-04-11T14:51:32.971Z",
      "updatedAt": "2018-04-11T14:51:32.971Z"
    },
    {
      "objectId": "wn8vDTCC3O",
      "createdAt": "2018-04-11T14:51:32.973Z",
      "updatedAt": "2018-04-11T14:51:32.973Z"
    }
  ]
}

/Ehr

Create EHR

Body parameters
Name Type Description
subjectId required String

User ID (or other person reference) to relate to the EHR.

Create a new EHR resource. Normally calling this API is not needed because a EHR is automatically created along with a new user sign up.
In the response, objectId refers to the created EHR ID.

const data = {
  subjectId: 'REF_USER_ID'
};

http.post("https://api.medrecord.io/1/classes/Ehr", data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "POST",
  url: "https://api.medrecord.io/1/classes/Ehr",
  data: {
    subjectId: "REF_USER_ID"
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "subjectId": "REF_USER_ID"
}

/Ehr/:id

Delete EHR

Path parameters
id

objectId of the EHR to delete

Delete a EHR resource.

http.delete(`https://api.medrecord.io/1/classes/Ehr/${id}`).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "DELETE",
  url: "https://api.medrecord.io/1/classes/Ehr/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});

Careplan Introduction

Data should always be registered in the context of a CarePlan. The goal of MEDrecord is not to store all raw data from sensors (although you can do this..:-)), but clinical relevant data, so an event telling that this piece of data was too high or too low.

So for registering data one should need an EHR ID and a CarePlan ID.

/CarePlan

List all care plans

Return a list of available care plans.

http
  .get("https://api.medrecord.io/1/classes/CarePlan")
  .pipe(map((res: {results: any[]}) => res.results))
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/CarePlan",
  success: function (res) {
    console.log(res.results);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "results": [
    {
      "objectId": "drKiHDDc87",
      "ehrId": "w1lDhnYabt",
      "name": "Asthma",
      "description": "Care plan to monitor my asthma",
      "actualStartDate": {
        "__type": "Date",
        "iso": "2018-04-16T00:00:00.000Z"
      },
      "createdAt": "2018-04-16T10:48:45.681Z",
      "updatedAt": "2018-04-16T10:48:45.681Z"
    },
    {
      "objectId": "qRURUcekSE",
      "ehrId": "w1lDhnYabt",
      "name": "Test care plan",
      "description": "This is a test care plan",
      "notes": "Some notes...",
      "actualStartDate": {
        "__type": "Date",
        "iso": "2018-04-16T00:00:00.000Z"
      },
      "createdAt": "2018-04-16T10:52:23.250Z",
      "updatedAt": "2018-04-16T10:52:23.250Z"
    }
  ]
}

/CarePlan/:id

Get a care plan

Path parameters
id

objectId of the CarePlan resource

Get information about a care plan.

http
  .get(`https://api.medrecord.io/1/classes/CarePlan/${id}`)
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/CarePlan/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "objectId": "drKiHDDc87",
  "ehrId": "w1lDhnYabt",
  "name": "Asthma",
  "description": "Care plan to monitor my asthma",
  "actualStartDate": {
    "__type": "Date",
    "iso": "2018-04-16T00:00:00.000Z"
  },
  "createdAt": "2018-04-16T10:48:45.681Z",
  "updatedAt": "2018-04-16T12:18:10.376Z",
  "status": "COMPLETED",
  "achievementDate": {
    "__type": "Date",
    "iso": "2018-10-10T00:00:00.000Z"
  }
}

/CarePlan

Create a care plan

Body parameters
Name Type Description
ehrId required String

EHR ID

name required String

Name of the care plan

language String

The language used when creating the care plan (preferable ISO 639-1)

description String

Description of the care plan

anonymous Boolean

Set whether the care plan has to be anonymous or not (default false)

proposedStartDate Date

Date on which the care plan should start

actualStartDate Date

Actual start date of the care plan

dueDate Date

Date on which the care plan should expire

notes String

Notes related to this care plan

Create a new care plan. Once created, its status will be ACTIVE.

const data = {
  ehrId: 'MY_EHR_ID',
  name: 'Asthma',
  description: 'Care plan to monitor my asthma',
  actualStartDate: {
    __type: 'Date',
    iso: '2018-04-16'
  },
};

http.post("https://api.medrecord.io/1/classes/CarePlan", data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "POST",
  url: "https://api.medrecord.io/1/classes/CarePlan",
  data: {
    ehrId: 'MY_EHR_ID',
    name: 'Asthma',
    description: 'Care plan to monitor my asthma',
    actualStartDate: {
      __type: 'Date',
      iso: '2018-04-16'
    }
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "ehrId": "MY_EHR_ID",
  "name": "Asthma",
  "description": "Care plan to monitor my asthma",
  "actualStartDate": {
    "__type": "Date",
    "iso": "2018-04-16"
  }
}

/CarePlan/:id

Update care plan information

Path parameters
id

objectId of the care plan to update

Body parameters
Name Type Description
anonymous Boolean

Set whether the care plan has to be anonymous or not

proposedStartDate Date

Date on which the care plan should start

actualStartDate Date

Actual start date of the care plan

dueDate Date

Date on which the care plan should expire

achievementDate Date

Actual end date of the care plan

name String

Name of the care plan

description String

Description of the care plan

status String

Set to COMPLETED to mark the care plan as completed, or CANCELLED to cancel the care plan

outcome String

Outcome of the care plan.

notes String

Notes related to this care plan

You can use this API to:

  • Update the care plan information
  • Close the care plan, setting its status to COMPLETED or CANCELLED
const data = {
  achievementDate: {
    __type: 'Date',
    iso: '2018-07-16'
  },
  status: 'COMPLETED',
  outcome: 'Good!'
};

http.put(`https://api.medrecord.io/1/classes/CarePlan/${id}`, data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "PUT",
  url: "https://api.medrecord.io/1/classes/CarePlan/" + id,
  data: {
    achievementDate: {
      __type: 'Date',
      iso: '2018-07-16'
    },
    status: 'COMPLETED',
    outcome: 'Good!'
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "achievementDate": {
    "__type": "Date",
    "iso": "2018-07-16"
  },
  "status": "COMPLETED",
  "outcome": "Good!"
}

/CarePlan/:id

Delete a care plan

Path parameters
id

objectId of the care plan to delete

Delete a CarePlan resource.

http.delete(`https://api.medrecord.io/1/classes/CarePlan/${id}`).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "DELETE",
  url: "https://api.medrecord.io/1/classes/CarePlan/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});

Goal Introduction

Within the care plan the user or doctor is able to set a goal like “loose weight” or “take medication”.
A goal can be used to group multiple tasks. Tasks are, in fact, directly related to goals.

/Goal

Get a list of goals

Return a list of goals.

http
  .get("https://api.medrecord.io/1/classes/Goal")
  .pipe(map((res: {results: any[]}) => res.results))
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Goal",
  success: function (res) {
    console.log(res.results);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "results": [
    {
      "objectId": "LSXdDRrLNu",
      "ehrId": "tRmsj4B3c6",
      "carePlanId": "drKiHDDc87",
      "name": "Lose weight",
      "description": "All you should do to lose weight",
      "createdAt": "2018-04-16T13:48:54.885Z",
      "updatedAt": "2018-04-16T13:48:54.885Z",
      "status": "ACTIVE"
    },
    {
      "objectId": "gCelNfIdOv",
      "ehrId": "tRmsj4B3c6",
      "carePlanId": "drKiHDDc87",
      "name": "Test goal",
      "description": "This is a test goal",
      "createdAt": "2018-04-16T13:49:28.526Z",
      "updatedAt": "2018-04-16T13:49:28.526Z",
      "status": "ACTIVE"
    }
  ]
}

/Goal/:id

Get a goal

Path parameters
id

objectId of the Goal resource

Get information about a goal.

http
  .get(`https://api.medrecord.io/1/classes/Goal/${id}`)
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Goal/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "objectId": "LSXdDRrLNu",
  "ehrId": "tRmsj4B3c6",
  "carePlanId": "drKiHDDc87",
  "name": "Lose weight",
  "description": "All you should do to lose weight",
  "createdAt": "2018-04-16T13:48:54.885Z",
  "updatedAt": "2018-04-16T13:48:54.885Z",
  "status": "ACTIVE"
}

/Goal

Add a new goal

Body parameters
Name Type Description
ehrId required String

objectId of the EHR related to this goal

carePlanId required String

objectId of the care plan which involves the goal

name required String

Name of the goal

dueDate Date

Date on which the goal should expire

description String

Goal description

notes String

Notes related to the goal

Create a new goal. Once created, its status will be ACTIVE.

const data = {
  ehrId: 'MY_EHR_ID',
  carePlanId: 'MY_CARE_PLAN_ID',
  name: 'Lose weight',
  description: 'All you should do to lose weight'
};

http.post("https://api.medrecord.io/1/classes/Goal", data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "POST",
  url: "https://api.medrecord.io/1/classes/Goal",
  data: {
    ehrId: 'MY_EHR_ID',
    carePlanId: 'MY_CARE_PLAN_ID',
    name: 'Lose weight',
    description: 'All you should do to lose weight'
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "ehrId": "MY_EHR_ID",
  "carePlanId": "MY_CARE_PLAN_ID",
  "name": "Lose weight",
  "description": "All you should do to lose weight"
}

/Goal/:id

Update goal information

Path parameters
id

objectId of the goal to update

Body parameters
Name Type Description
name String

Name of the goal

description String

Goal description

dueDate Date

Date on which the goal should expire

achievementDate Date

Goal actual end date

status String

Set to COMPLETED to mark the goal as completed, or CANCELLED to cancel the goal

outcome String

Outcome of the goal

notes String

Notes related to the goal

You can use this API to:

  • Update the goal information
  • Close the goal, setting its status to COMPLETED or CANCELLED.
const data = {
  achievementDate: {
    __type: 'Date',
    iso: '2018-07-16'
  },
  status: 'COMPLETED',
  outcome: 'Great! Goal achieved'
};

http.put(`https://api.medrecord.io/1/classes/Goal/${id}`, data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "PUT",
  url: "https://api.medrecord.io/1/classes/Goal/" + id,
  data: {
    achievementDate: {
      __type: 'Date',
      iso: '2018-07-16'
    },
    status: 'COMPLETED',
    outcome: 'Great! Goal achieved'
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "achievementDate": {
    "__type": "Date",
    "iso": "2018-07-16"
  },
  "status": "COMPLETED",
  "outcome": "Great! Goal achieved"
}

/Goal/:id

Delete a goal

Path parameters
id

objectId of the goal to delete

Delete a Goal resource.

http.delete(`https://api.medrecord.io/1/classes/Goal/${id}`).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "DELETE",
  url: "https://api.medrecord.io/1/classes/Goal/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});

Task Introduction

Within each Goal the user or doctor is able to set tasks.
Additionally there can also be participants that need to do that task, or that are involved. So you could “loose weight” yourself, or “take medication” done by the nurse. Also the user can set a time schedule on the task, or even set it on every day at 10pm for the next 2 weeks.

/Task

Get a list of tasks

Return a list of tasks.

http
  .get("https://api.medrecord.io/1/classes/Task")
  .pipe(map((res: {results: any[]}) => res.results))
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Task",
  success: function (res) {
    console.log(res.results);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "results": [
    {
      "objectId": "SKd0GsjWKp",
      "ehrId": "tRmsj4B3c6",
      "carePlanId": "drKiHDDc87",
      "goalId": "xrYiHCDc36",
      "description": "Run for 10 km",
      "startDate": {
        "__type": "Date",
        "iso": "2018-04-17T00:00:00.000Z"
      },
      "createdAt": "2018-04-17T08:47:23.882Z",
      "updatedAt": "2018-04-17T08:48:43.843Z",
      "status": "ACTIVE"
    },
    {
      "objectId": "oGhcvycD57",
      "ehrId": "tRmsj4B3c6",
      "carePlanId": "drKiHDDc87",
      "goalId": "xrYiHCDc36",
      "description": "Run for 15 km",
      "startDate": {
        "__type": "Date",
        "iso": "2018-04-18T00:00:00.000Z"
      },
      "createdAt": "2018-04-17T08:48:01.248Z",
      "updatedAt": "2018-04-17T08:49:01.283Z",
      "status": "ACTIVE"
    }
  ]
}

/Task/:id

Get a task

Path parameters
id

objectId of the Task resource

Get information about a task.

http
  .get(`https://api.medrecord.io/1/classes/Task/${id}`)
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Task/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "objectId": "oGhcvycD57",
  "ehrId": "tRmsj4B3c6",
  "carePlanId": "drKiHDDc87",
  "goalId": "xrYiHCDc36",
  "description": "Run for 15 km",
  "startDate": {
    "__type": "Date",
    "iso": "2018-04-18T00:00:00.000Z"
  },
  "createdAt": "2018-04-17T08:48:01.248Z",
  "updatedAt": "2018-04-17T08:49:01.283Z",
  "status": "ACTIVE"
}

/Task

Add a new task

Body parameters
Name Type Description
ehrId required String

objectId of the EHR related to this task

carePlanId required String

objectId of the care plan which involves the task

goalId required String

objectId of the goal which the task belongs to

description required String

Description for the task

startDate Date

Date on which the task starts

endDate Date

Date on which the task ends

Create a new task. Once created, its status will be ACTIVE.

const data = {
  ehrId: 'MY_EHR_ID',
  carePlanId: 'MY_CARE_PLAN_ID',
  goalId: 'MY_GOAL_ID',
  description: 'Run for 10 km',
  startDate: {
    __type: 'Date',
    iso: '2018-04-17'
  }
};

http.post("https://api.medrecord.io/1/classes/Task", data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "POST",
  url: "https://api.medrecord.io/1/classes/Task",
  data: {
    ehrId: 'MY_EHR_ID',
    carePlanId: 'MY_CARE_PLAN_ID',
    goalId: 'MY_GOAL_ID',
    description: 'Run for 10 km',
    startDate: {
      __type: 'Date',
      iso: '2018-04-17'
    }
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "ehrId": "MY_EHR_ID",
  "carePlanId": "MY_CARE_PLAN_ID",
  "goalId": "MY_GOAL_ID",
  "description": "Run for 10 km",
  "startDate": {
    "__type": "Date",
    "iso": "2018-04-17"
  }
}

/Task/:id

Update task information

Path parameters
id

objectId of the task to update

Body parameters
Name Type Description
description String

Description for the task

startDate Date

Date on which the task starts

endDate Date

Date on which the task ends

status String

Set to COMPLETED to mark the task as done, or CANCELLED to cancel the task

You can use this API to:

  • Update the task information
  • Close the task, setting its status to COMPLETED or CANCELLED.
const data = {
  endDate: {
    __type: 'Date',
    iso: '2018-04-18'
  },
  status: 'COMPLETED'
};

http.put(`https://api.medrecord.io/1/classes/Task/${id}`, data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "PUT",
  url: "https://api.medrecord.io/1/classes/Task/" + id,
  data: {
    endDate: {
      __type: 'Date',
      iso: '2018-04-18'
    },
    status: 'COMPLETED'
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "endDate": {
    "__type": "Date",
    "iso": "2018-04-18"
  },
  "status": "COMPLETED"
}

/Task/:id

Delete a task

Path parameters
id

objectId of the task to delete

Delete a Task resource.

http.delete(`https://api.medrecord.io/1/classes/Task/${id}`).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "DELETE",
  url: "https://api.medrecord.io/1/classes/Task/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});

Event Introduction

An event could be an appointment with your doctor or even the housekeeper, you can use it for everything that is not noted in Goals or Tasks.

/Event

Get a list of events

Return a list of events.

http
  .get("https://api.medrecord.io/1/classes/Event")
  .pipe(map((res: {results: any[]}) => res.results))
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Event",
  success: function (res) {
    console.log(res.results);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "results": [
    {
      "objectId": "nXZmPkbu2j",
      "ehrId": "MY_EHR_ID",
      "carePlanId": "MY_CARE_PLAN_ID",
      "startDate": {
        "__type": "Date",
        "iso": "2018-04-17T10:00:00.000Z"
      },
      "name": "Meeting with the doctor",
      "createdAt": "2018-04-18T10:08:57.215Z",
      "updatedAt": "2018-04-18T10:08:57.215Z"
    },
    {
      "objectId": "KQqr04EcKR",
      "ehrId": "MY_EHR_ID",
      "carePlanId": "MY_CARE_PLAN_ID",
      "startDate": {
        "__type": "Date",
        "iso": "2018-04-16T16:15:00.000Z"
      },
      "name": "Appointment with the oculist",
      "createdAt": "2018-04-18T10:10:27.409Z",
      "updatedAt": "2018-04-18T10:10:27.409Z"
    }
  ]
}

/Event/:id

Get an event

Path parameters
id

objectId of the Event resource

Get information about an event.

http
  .get(`https://api.medrecord.io/1/classes/Event/${id}`)
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Event/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "objectId": "nXZmPkbu2j",
  "ehrId": "MY_EHR_ID",
  "carePlanId": "MY_CARE_PLAN_ID",
  "startDate": {
    "__type": "Date",
    "iso": "2018-04-17T10:00:00.000Z"
  },
  "name": "Meeting with the doctor",
  "createdAt": "2018-04-18T10:08:57.215Z",
  "updatedAt": "2018-04-18T10:08:57.215Z"
}

/Event

Add a new event

Body parameters
Name Type Description
ehrId required String

objectId of the EHR related to the event

carePlanId required String

objectId of the CarePlan related to the event

startDate required Date

Date on which the event starts

endDate Date

Date on which the event ends

name required String

Event name

description String

Description of the event

Create a new event. To create a single-day event, use the field startDate, which an endDate of null.

const data = {
  ehrId: 'MY_EHR_ID',
  carePlanId: 'MY_CARE_PLAN_ID',
  startDate: {
    __type: 'Date',
    iso: '2018-04-17T10:00:00Z'
  },
  name: 'Meeting with the doctor'
};

http.post("https://api.medrecord.io/1/classes/Event", data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "POST",
  url: "https://api.medrecord.io/1/classes/Event",
  data: {
    ehrId: 'MY_EHR_ID',
    carePlanId: 'MY_CARE_PLAN_ID',
    startDate: {
      __type: 'Date',
      iso: '2018-04-17T10:00:00Z'
    },
    name: 'Meeting with the doctor'
  }
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "ehrId": "MY_EHR_ID",
  "carePlanId": "MY_CARE_PLAN_ID",
  "startDate": {
    "__type": "Date",
    "iso": "2018-04-17T10:00:00Z"
  },
  "name": "Meeting with the doctor"
}

/Event/:id

Update event information

Path parameters
id

objectId of the event to update

Body parameters
Name Type Description
startDate Date

Date on which the event starts

endDate Date

Date on which the event ends

name String

Event name

description String

Description of the event

Use this API to update an Event resource.

const data = {
  startDate: {
    __type: 'Date',
    iso: '2018-05-20T10:00:00Z'
  }
};

http.put(`https://api.medrecord.io/1/classes/Event/${id}`, data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "PUT",
  url: "https://api.medrecord.io/1/classes/Event/" + id,
  data: {
    startDate: {
      __type: 'Date',
      iso: '2018-05-20T10:00:00Z'
    }
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "startDate": {
    "__type": "Date",
    "iso": "2018-05-20T10:00:00Z"
  }
}

/Event/:id

Delete an event

Path parameters
id

objectId of the event to delete

Delete an Event resource.

http.delete(`https://api.medrecord.io/1/classes/Event/${id}`).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "DELETE",
  url: "https://api.medrecord.io/1/classes/Event/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});

Participation Introduction

The Participation represents the involvement of a User in a CarePlan, in a Task or in a Goal.

/Participation

List all Participation resources

Return a list of Participation resources

http
  .get("https://api.medrecord.io/1/classes/Participation")
  .pipe(map((res: {results: any[]}) => res.results))
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Participation",
  success: function (res) {
    console.log(res.results);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "results": [
    {
      "objectId": "XAvp26on0m",
      "userId": "some_user_id",
      "entityType": "CARE_PLAN",
      "entityId": "testCarePlanId",
      "createdAt": "2018-04-20T13:27:45.873Z",
      "updatedAt": "2018-04-20T13:27:45.873Z"
    },
    {
      "objectId": "BDV7Yotsbu",
      "userId": "some_other_user_id",
      "entityType": "CARE_PLAN",
      "entityId": "testCarePlanId",
      "createdAt": "2018-04-20T13:27:59.393Z",
      "updatedAt": "2018-04-20T13:27:59.393Z"
    }
  ]
}

/Participation/:id

Get a Participation resource

Path parameters
id

objectId of the Participation resource

Get a Participation by objectId.

http
  .get(`https://api.medrecord.io/1/classes/Participation/${id}`)
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Participation/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "objectId": "XAvp26on0m",
  "userId": "some_user_id",
  "entityType": "CARE_PLAN",
  "entityId": "testCarePlanId",
  "createdAt": "2018-04-20T13:27:45.873Z",
  "updatedAt": "2018-04-20T13:27:45.873Z"
}

/Participation

Add a Participation resource

Body parameters
Name Type Description
userId required String

ID of the User you want to participate to a CarePlan, Goal or Task

entityType required String

Specify the type of object in which the user should be involved in. Allowed values are:

  • CARE_PLAN
  • GOAL
  • TASK
entityId required String

ID of the CarePlan, Goal or Task (according to the entityType)

Let a specific User be involved in a CarePlan, Task or Goal

const data = {
  userId: 'some_user_id',
  entityType: 'CARE_PLAN',
  entityId: 'testCarePlanId'
};

http.post("https://api.medrecord.io/1/classes/Participation", data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "POST",
  url: "https://api.medrecord.io/1/classes/Participation",
  data: {
    userId: 'some_user_id',
    entityType: 'CARE_PLAN',
    entityId: 'testCarePlanId'
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
	"userId": "some_user_id",
	"entityType": "CARE_PLAN",
	"entityId": "testCarePlanId"
}

/Participation/:id

Delete a Participation resource

Path parameters
id

objectId of the Participation resource to delete

Delete a Participation resource.

http.delete(`https://api.medrecord.io/1/classes/Participation/${id}`).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "DELETE",
  url: "https://api.medrecord.io/1/classes/Participation/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});

Blood Pressure Introduction

/BloodPressure

List all blood pressure measurements

Return a list of blood pressure measurements

http
  .get("https://api.medrecord.io/1/classes/BloodPressure")
  .pipe(map((res: {results: any[]}) => res.results))
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/BloodPressure",
  success: function (res) {
    console.log(res.results);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "results": [
    {
      "objectId": "UdEwBADyI7",
      "timestamp": {
        "__type": "Date",
        "iso": "2018-05-11T09:02:34.000Z"
      },
      "appName": "My Health App",
      "appVersion": "1.0.0",
      "ehrId": "MY_EHR_ID",
      "carePlanId": "MY_CARE_PLAN_ID",
      "territory": "uk",
      "systolic": 105,
      "diastolic": 70,
      "systolicUnit": "mmHg",
      "diastolicUnit": "mmHg",
      "createdAt": "2018-04-18T13:38:19.805Z",
      "updatedAt": "2018-04-18T13:38:19.805Z"
    },
    {
      "objectId": "1VSuYnsr06",
      "timestamp": {
        "__type": "Date",
        "iso": "2018-05-11T09:36:31.000Z"
      },
      "appName": "My Health App",
      "appVersion": "1.0.0",
      "ehrId": "MY_EHR_ID",
      "carePlanId": "MY_CARE_PLAN_ID",
      "territory": "nl",
      "systolic": 108,
      "diastolic": 68,
      "systolicUnit": "mmHg",
      "diastolicUnit": "mmHg",
      "createdAt": "2018-04-18T13:39:17.258Z",
      "updatedAt": "2018-04-18T13:39:17.258Z"
    }
  ]
}

/BloodPressure/:id

Get a blood pressure measurement

Path parameters
id

objectId of the BloodPressure resource

Get a blood pressure measurement by objectId.

http
  .get(`https://api.medrecord.io/1/classes/BloodPressure/${id}`)
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/BloodPressure/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "objectId": "UdEwBADyI7",
  "timestamp": {
      "__type": "Date",
      "iso": "2018-05-11T09:02:34.000Z"
  },
  "appName": "My Health App",
  "appVersion": "1.0.0",
  "ehrId": "MY_EHR_ID",
  "carePlanId": "MY_CARE_PLAN_ID",
  "territory": "uk",
  "systolic": 105,
  "diastolic": 70,
  "systolicUnit": "mmHg",
  "diastolicUnit": "mmHg",
  "createdAt": "2018-04-18T13:38:19.805Z",
  "updatedAt": "2018-04-18T13:38:19.805Z"
}

/BloodPressure

Add a blood pressure measurement

Body parameters
Name Type Description
appName String

Name of the application used to register the measurement

appVersion String

Version of the application used to register the measurement

ehrId required String

objectId of the EHR related to the measurement

composerId String

Generic ID field related to the person who is primarily responsible for the measurement. It can be used to store a User ID, a patient ID, a doctor/nurse ID or other entity’s ID

carePlanId required String

objectId of the care plan where the measurement belongs to

location String

Name of the physical location where the measurement is taken

territory String

Name of the geographic territory where the measurement is taken

timestamp required Date

Timestamp referred to the moment in which the measurement is taken

systolic required Number

Peak systemic arterial blood pressure, measured in systolic or contraction phase of the heart cycle

diastolic required Number

Minimum systemic arterial blood pressure, measured in the diastolic or relaxation phase of the heart cycle

systolicUnit required String

Unit of the systolic value. The only allowed value is mmHg

diastolicUnit required String

Unit of the diastolic value. The only allowed value is mmHg

Add a blood pressure measurement.

const data = {
  appName: 'My Health App',
  appVersion: '1.0.0',
  ehrId: 'MY_EHR_ID',
  carePlanId: 'MY_CARE_PLAN_ID',
  territory: 'uk',
  timestamp: {
    __type: 'Date',
    iso: '2018-05-11T09:36:31.000Z'
  },
  systolic: 105,
  diastolic: 70,
  systolicUnit: 'mmHg',
  diastolicUnit: 'mmHg'
};

http.post("https://api.medrecord.io/1/classes/BloodPressure", data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "POST",
  url: "https://api.medrecord.io/1/classes/BloodPressure",
  data: {
    appName: 'My Health App',
    appVersion: '1.0.0',
    ehrId: 'MY_EHR_ID',
    carePlanId: 'MY_CARE_PLAN_ID',
    territory: 'uk',
    timestamp: {
      __type: 'Date',
      iso: '2018-05-11T09:36:31.000Z'
    },
    systolic: 105,
    diastolic: 70,
    systolicUnit: 'mmHg',
    diastolicUnit: 'mmHg'
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "appName": "My Health App",
  "appVersion": "1.0.0",
  "ehrId": "MY_EHR_ID",
  "carePlanId": "MY_CARE_PLAN_ID",
  "territory": "nl",
  "timestamp": {
    "__type": "Date",
    "iso": "2018-05-11T09:36:31.000Z"
  },
  "systolic": 108,
  "diastolic": 68,
  "systolicUnit": "mmHg",
  "diastolicUnit": "mmHg"
}

/BloodPressure/:id

Delete a blood pressure measurement

Path parameters
id

objectId of the BloodPressure resource to delete

Delete a BloodPressure resource.

http.delete(`https://api.medrecord.io/1/classes/BloodPressure/${id}`).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "DELETE",
  url: "https://api.medrecord.io/1/classes/BloodPressure/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});

BMI Introduction

/Bmi

List all BMI measurements

Return a list of BMI measurements

http
  .get("https://api.medrecord.io/1/classes/Bmi")
  .pipe(map((res: {results: any[]}) => res.results))
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Bmi",
  success: function (res) {
    console.log(res.results);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "results": [
    {
      "objectId": "xn01LvNyLB",
      "appName": "My Health App",
      "appVersion": "1.0.0",
      "ehrId": "MY_EHR_ID",
      "carePlanId": "MY_CARE_PLAN_ID",
      "territory": "it",
      "timestamp": {
        "__type": "Date",
        "iso": "2018-05-12T09:36:31.000Z"
      },
      "weight": 75,
      "weightUnit": "kg",
      "height": 178,
      "heightUnit": "m",
      "bmi": 23.7,
      "bmiUnit": "kg/m2",
      "createdAt": "2018-04-18T15:21:46.818Z",
      "updatedAt": "2018-04-18T15:21:46.818Z"
    },
    {
      "objectId": "Bt9kG6fSdY",
      "appName": "My Health App",
      "appVersion": "1.0.0",
      "ehrId": "MY_EHR_ID",
      "carePlanId": "MY_CARE_PLAN_ID",
      "territory": "it",
      "timestamp": {
        "__type": "Date",
        "iso": "2018-05-12T09:36:31.000Z"
      },
      "weight": 80,
      "weightUnit": "kg",
      "height": 174,
      "heightUnit": "m",
      "bmi": 26.4,
      "bmiUnit": "kg/m2",
      "createdAt": "2018-04-18T15:22:16.570Z",
      "updatedAt": "2018-04-18T15:22:16.570Z"
    }
  ]
}

/Bmi/:id

Get a BMI measurement

Path parameters
id

objectId of the Bmi resource

Get a blood pressure measurement by objectId.

http
  .get(`https://api.medrecord.io/1/classes/Bmi/${id}`)
  .subscribe(
    (res) => console.log(res),
    (err) => console.error(err);
  );
$.ajax({
  type: "GET",
  url: "https://api.medrecord.io/1/classes/Bmi/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "objectId": "Bt9kG6fSdY",
  "appName": "My Health App",
  "appVersion": "1.0.0",
  "ehrId": "MY_EHR_ID",
  "carePlanId": "MY_CARE_PLAN_ID",
  "territory": "it",
  "timestamp": {
      "__type": "Date",
      "iso": "2018-05-12T09:36:31.000Z"
  },
  "weight": 80,
  "weightUnit": "kg",
  "height": 174,
  "heightUnit": "m",
  "bmi": 26.4,
  "bmiUnit": "kg/m2",
  "createdAt": "2018-04-18T15:22:16.570Z",
  "updatedAt": "2018-04-18T15:22:16.570Z"
}

/Bmi

Add a BMI measurement

Body parameters
Name Type Description
appName String

Name of the application used to register the measurement

appVersion String

Version of the application used to register the measurement

ehrId required String

objectId of the EHR related to the measurement

composerId String

Generic ID field related to the person who is primarily responsible for the measurement. It can be used to store a User ID, a patient ID, a doctor/nurse ID or other entity’s ID

carePlanId required String

objectId of the care plan where the measurement belongs to

location String

Name of the physical location where the measurement is taken

territory String

Name of the geographic territory where the measurement is taken

timestamp required Date

Timestamp referred to the moment in which the measurement is taken

weight required Number

Measured body weight

height required Number

Measured body height

weightUnit required String

Unit of the weight value. The only allowed value is kg (kilogram)

heightUnit required String

Unit of the height value. The only allowed value is m (meter)

bmi required Number

Bmi (Body Mass Index) value

bmiUnit required String

Unit of the BMI value. The only allowed value is kg/m2

Add a body weight, height or BMI measurement.

const data = {
  appName: 'My Health App',
  appVersion: '1.0.0',
  ehrId: 'MY_EHR_ID',
  carePlanId: 'MY_CARE_PLAN_ID',
  territory: 'it',
  timestamp: {
    __type: 'Date',
    iso: '2018-05-12T09:36:31.000Z'
  },
  weight: 75,
  weightUnit: 'kg',
  height: 178,
  heightUnit: 'm',
  bmi: 23.7,
  bmiUnit: 'kg/m2'
};

http.post("https://api.medrecord.io/1/classes/Bmi", data).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "POST",
  url: "https://api.medrecord.io/1/classes/Bmi",
  data: {
    appName: 'My Health App',
    appVersion: '1.0.0',
    ehrId: 'MY_EHR_ID',
    carePlanId: 'MY_CARE_PLAN_ID',
    territory: 'it',
    timestamp: {
      __type: 'Date',
      iso: '2018-05-12T09:36:31.000Z'
    },
    weight: 75,
    weightUnit: 'kg',
    height: 178,
    heightUnit: 'm',
    bmi: 23.7,
    bmiUnit: 'kg/m2'
  },
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});
{
  "appName": "My Health App",
  "appVersion": "1.0.0",
  "ehrId": "MY_EHR_ID",
  "carePlanId": "MY_CARE_PLAN_ID",
  "territory": "it",
  "timestamp": {
    "__type": "Date",
    "iso": "2018-05-12T09:36:31.000Z"
  },
  "weight": 75,
  "weightUnit": "kg",
  "height": 178,
  "heightUnit": "m",
  "bmi": 23.7,
  "bmiUnit": "kg/m2"
}

/Bmi/:id

Delete a BMI measurement

Path parameters
id

objectId of the Bmi resource to delete

Delete a Bmi resource.

http.delete(`https://api.medrecord.io/1/classes/Bmi/${id}`).subscribe(
  (res) => console.log(res),
  (err) => console.error(err);
);
$.ajax({
  type: "DELETE",
  url: "https://api.medrecord.io/1/classes/Bmi/" + id,
  success: function (res) {
    console.log(res);
  },
  error: function (err) {
    console.error(err);
  }
});