Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Table of Contents

List Messages

Current Implementation

Retrieves the messages of a particular User. Messages can be retrieved from different sources. Currently supported sources are: Email, Alert , ParameterizedAlert, or Document.

To get a better understanding on how Parameterized Alerts are retrieved, take a look at the following document: Alerts and Notifications#AlertRetrieval

Parameters

Base URL: /getMessages

Parameters:

NameTypeMandatoryDescription
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
typeENUMNo

Possible values: ['ALL', 'ALERT', 'EMAIL', 'DOCUMENT',"PARAMETERIZEDALERT' ].

Default value: "ALL".

The source of the messages.

locationENUMNo

Possible values: ['INBOX', 'SENT', 'ARCHIVE'].

Default value: "INBOX".

patientIdStringNoUsed if we want to retrieve only those messages related to a specific patient.

API Sample

curl 'http://192.168.2.102:8080/PresentationServices/getMessages?type=Alert&location=INBOX&userId=poda&token=d2360c39-637b-41da-988d-f031db5affbb&_=1395133673255' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'User-Agent: Mozilla/5.0 (Linux; Android 4.4.2; Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36' --compressed

Result
{

"messagesFact": {

"statusFact": {

"success": true

}

,"messageObjects": [

{

  "messageId": "ff80818147e7ee6c0147e7f14d000005",
  "type": "ParameterizedAlert",
  "podId": "Pod A",
  "location": "INBOX",
  "labels": [],
  "messageDate": "8/18/14",
  "messageTime": "09:07",
  "description": "Skin To Skin Alert",
  "title": "            peggy 500##split##33wks 999g",
  "payload": "This patient has not had skin to skin contact for at least 7 consecutive days.",
  "status": "Unread",
  "priority": "HIGH",
  "tasksCount": 0,
  "tasksComplete": 0
},{
  "messageId": "22",
  ...
  }
 ]}}
  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.