...
Table of Contents |
---|
maxLevel | 1 |
---|
exclude | Table of Contents |
---|
|
List Patients
Current Implementation
When the user logs in, a list of all the patients the user can 'see' is retrieved from PS. The idea is to have a local cache so we don't need to retrieve patient information from PS any more. Latest changes in the way patients and users are assigned to each others made the creation of this cache obsolete. A similar cache is being used now containing only the associated patients of the user that is logged in into the device.
This cache is going to be removed in the future.
API Sample
curl 'http://192.168.2.102:8080/PresentationServices/getPatients?userId=poda&token=d2360c39-637b-41da-988d-f031db5affbb&_=1395133673254' -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
Code Block |
---|
language | js |
---|
title | Result |
---|
collapse | true |
---|
|
{
"patientsFact": {
"statusFact": {
"success": true
},
"patients": [
{
"patientId": "000000003f59c2aa013f688d0fee002f",
"chartId": "peggy ncabsi",
"age": "40",
"ageUnit": "wks",
"weight": "750",
"weightUnit": "g",
"roomId": "poda",
"roomName": "Pod A",
"length": "60",
"headCircumference": "30.0",
"admissionDate": "2014-03-01",
"deliveryType": "Inborn"
},
{
"patientId": "000000003f59c2aa013f68922c520035",
...
}
]}} |
Register Device
Current Implementation
A device is registered to a user depending on the type of usage the user decided at login time: Normal usage or Guest usage. In the case of Normal usage, the device-user relation is always registered in the server.
API Sample
curl 'http://192.168.2.102:8080/PresentationServices/registerDevice?deviceId=596a1d880a22eb32&userId=poda&token=d2360c39-637b-41da-988d-f031db5affbb&_=1395133673256' -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
Code Block |
---|
language | js |
---|
title | Result |
---|
collapse | true |
---|
|
{
"statusFact":{
"success":true
}
} |
Inbox
Current Implementation
Retrieves the messages from user's Inbox.
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
Code Block |
---|
language | js |
---|
title | Result |
---|
collapse | true |
---|
|
{
"messagesFact": {
"statusFact": {
"success": true
}
,"messageObjects": [
{
"messageId": "25",
"type": "Alert",
"podId": "Pod C",
"location": "INBOX",
"labels": [],
"messageDate": "3/07/14",
"messageTime": "13:26",
"description": "No Skin To Skin Contact In 7 Days",
"from": "[S4-ALERT] No skin to skin contact in 7 days",
"title": " peggy 501##split##33wks 998g",
"payload": "This patient has not had skin to skin contact for at least 7 consecutive days.",
"status": "Unread",
"priority": "HIGH",
"tasksCount": 1,
"tasksComplete": 0
},{
"messageId": "22",
...
}
]}} |
Patients Assignment
Current Implementation
A patient can be currently assigned to a user by selecting it from the drop down present in Patients Assignment view, or via NFC or bar code scanning. The association between a patient and a user is used to determine the potential receivers of an alert that is generated for a patient.
Forms can only be submitted for currently assigned patients. This restriction is not enforced in PS but in the client application.
API Sample
curl 'http://192.168.2.102:8080/PresentationServices/associatePatientToProvider?patientId=000000003f59c2aa013f6898a5470043&userId=poda&token=d2360c39-637b-41da-988d-f031db5affbb&_=1395133673258' -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
Code Block |
---|
language | js |
---|
title | Result |
---|
collapse | true |
---|
|
{
"statusFact":{
"success":true
}
} |