Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Table of Contents

Fetch All Permissions

This operation is used to fetch list of permissions available in the database except special permissions. 

Parameters

Base URL: /getPermissions

Request Type: GET

...

Name

...

Type

...

Mandatory

...

 

Table of Contents


Fetch All Permissions

This operation is used to fetch list of permissions available in the database except special permissions. 

Parameters

Base URL: /getPermissions

Request Type: GET

Name
Type
Mandatory
Description
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
    

 

Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://192.168.1.161:8080/PresentationServices/getPermissions?userId=QA_1&token=d38bad16-e48a-4580-b5b6-993124ce638c

Expand
titleResult
{ - data[1]
- 0:  {
name"access_forms"
  }
  -statusFact
  {
successtrue
  }
 }

 

 

Create Role

This operation is used to add Roles into database as per selected organization.

Parameters

Base URL: /organizations/{organization}/role/createRole

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
roleNameStringYesRole Name which needs to be created. 


Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/QA_Organization_A/role/deleteRole?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Expand
titleResult
{ - data
  { id54
name"MyRole1"
organizationId"QA_Organization_A"
  }
  -statusFact
  {
successtrue
  }
 }

Not enough Permissions

In the case userId doesn't have 'modify_role' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

Edit Role

This operation is used to edit Role into database as per selected organization. 

Parameters

Base URL: /organizations/{organization}/role/editRole

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
roleNameStringYesRole Name of the role. 
roleIdStringYesRole Id of the role to edit. 

 

Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/QA_Organization_A/role/deleteRole?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod11

Expand
titleResult
{ - data
  { id54
name"MyRole1"
organizationId"QA_Organization_A"
  }
  -statusFact
  {
successtrue
  }
 }

Not enough Permissions

In the case userId doesn't have 'modify_role' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

Delete Role

This operation is used to delete Role into database as per selected organization.

Parameters

Base URL: /organizations/{organization}/role/deleteRole

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.

...

roleName

...

String

...

YesRole Name which needs to be created. 


Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://

...

...

Expand
titleResult
{ - data[1]
- 0:  {
name"access_forms"
  }
  -statusFact
  {
successtrue
  }
 }

 

 

Create Role

This operation is used to add Roles into database as per selected organization.organizations/QA_Organization_A/role/deleteRole?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'delete_role' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

Roles With Permissions 

 

role/createRole

rolesWithPermissions

Request Type:

POST

GET

Name
Type
Mandatory
Description
{organizationId} StringYes
The id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
roleName
{organizationId}
StringRole Name which needs to be created.
 String
Yes
localhostQA_Organization_A/role/deleteRolea578dbf418004a82be24b212ba43b278Apod1

1

Expand
titleResult
{
- data
  { id54
name"MyRole1"
organizationId"QA_Organization_A"
 
- data:[1]
  -0: {
id"2"
name"pod"
 -permissions[1]
0:  
{
name"read_user"
}
}
  -statusFact
  {
successtrue
  }
 }

 

Not enough Permissions

In the case userId doesn't have 'modify_role' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

Edit Role


 

Edit Roles With Permissions 

 

 

 

This operation is used to

edit Role

 update selected Privileges into database

as per selected organization

.

 

Parameters

Base URL: /organizations/{organization}/

role

rolePermission/

editRole

editRolesPermissions

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} 
permissionsStringYesThe
id of the Organization
permission list to update.
token
roleIdStringYes
Security Token obtained before.
The role id to update
userIdStringYesThe id of the logged in user.
roleName
tokenStringYes
Role Name of the role
Security Token obtained before
roleId
organizationStringYes
Role Id
The id of the
role to edit
organization.
 
 

Note
that
: 1 .ALL the parameters of the specified template must be present in the request.
2. Exception throws if tries to update with 'special' permission.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/

QA_Organization_A/role/deleteRolea578dbf418004a82be24b212ba43b278&userId=A_pod11 Expand
titleResult
{ - data
  { id54
name"MyRole1"
organizationId"QA_Organization_A"
  }
  -statusFact
  {
successtrue
  }
 }

993124ce638c&userId=QA_1

Expand
titleResult
{"statusFact":{"success":true}}

 

Not enough Permissions

In the case userId doesn't have 'modify_role_permission' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

Delete Role


Create Location(Room) 

This operation is used

to delete Role

to add Locations into database

as per selected organization

..

Parameters

Base URL: /organizations/workspaces/{

organization

workspace}/

role/deleteRole

createOrUpdateRoom

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} 
roomName StringYesThe room name to create.
roomIdStringYesThe room id to create
userIdStringYesThe id of
the Organization
the logged in user.
tokenStringYesSecurity Token obtained before. 
userId
workspaceStringYesThe id of the
logged in user.roleNameStringYesRole Name which needs to be created
workspace

Note

that

: 1) ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/

QA_Organization_A/role/deleteRole

workspaces/UNC/createOrUpdateRoom?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":{"workspaceId":"unc_nursery","id":"test_room","name":"Test New Room"},"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have '

delete

modify_

role

room' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

Roles With Permissions

 

 

Edit Location(Room)  

This operation is used to  fetch all roles associated with a particular organization along with their associated privileges. to update room into database for a particular facility.

Parameters

Base URL: /organizations/workspaces/{organizationworkspace}/rolesWithPermissionscreateOrUpdateRoom

Request Type: GETPOST

Name
Type
Mandatory
Description
tokenroomName StringYesSecurity Token obtained before.The room name to create.
roomIdStringYesThe room id to create
userIdStringYesThe id of the logged in user.{organizationId} String Yes
tokenStringYesSecurity Token obtained before. 
workspaceStringYesThe id of the Organizationworkspace. 

Note

that

: 1) ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://192.168.1.161localhost:8080/PresentationServices/organizations/workspaces/UNC/rolesWithPermissionscreateOrUpdateRoom?token=d38bad16a578dbf4-e48a1800-45804a82-b5b6be24-993124ce638cb212ba43b278&userId=QAA_1pod1

Expand
titleResult

{

- data:[1]
  -0: {
id"2"
name"pod"
 -permissions[1]
0:  
{
name"read_user"
}
}
  -statusFact
  {
successtrue
  }
 }
 

"data":{"workspaceId":"unc_nursery","id":"test_room","name":"Test New Room"},"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'modify_rolefacilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

Edit Roles With Permissions

 

Delete Location(Room) 

 

 

This operation is used

to  update selected Privileges into database

to delete locations from the database for a particular workspace.

Parameters

Base URL: /organizations/workspaces/{

organization

workspace}/

rolePermission/editRolesPermissions

deleteRoom

Request Type: POST

Name
Type
Mandatory
Description
permissions
workspaceStringYesThe
permission list to update
id of the workspace.
roleId
roomIdStringYesThe
role
room id to
update
create
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before. 
organization
 
String
 
YesThe id of the organization.
  

Note : 1

.

) ALL the parameters of the specified template must be present in the request.

2

. Exception throws if tries to update with 'special' permission

) Delete will not be allowed If the requested room is associated with any Patients.

3) Delete will not be allowed If the requested room is associated with any Devices.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/workspaces/UNC/

rolePermission/editRolesPermissions

deleteRoom?token=

d38bad16

a578dbf4-

e48a

1800-

4580

4a82-

b5b6

be24-

993124ce638c

b212ba43b278&userId=

QA

A_

1

pod1

Expand
titleResult
{"statusFact":{"success":true}}

 

Not enough Permissions

In the case userId doesn't have '

modify

delete_

role_permission

room' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

Create Location

 

 

Fetch Locations(Room) 

This operation is used to add to fetch Locations into from database..

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/workspaces/{workspace}/createOrUpdateRoomrooms

Request Type: POSTGET

The room id to createSecurity Token obtained beforeworkspace
Name
Type
Mandatory
Description
roomName {organizationId} StringYesThe room name to createid of the Organization.roomId
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.token
{facilityId} StringYesThe id of the Facility
{workspaceId}StringYesThe id of the workspace.

 

Note : 1) ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices//organizations/UNC/facilities/UNC/workspaces/UNC/createOrUpdateRoomunc_nursery}/rooms?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":[{"workspaceId":"unc_nursery","id":"poda","name":"Pod A"},{"workspaceId":"unc_nursery","id":"test_roompodb","name":"Test New RoomPod B"},{"statusFactworkspaceId":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'modify_room' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Edit Location(Room)  

This operation is used to update room into database for a particular facility.

Parameters

Base URL: /organizations/workspaces/{workspace}/createOrUpdateRoom

Request Type: POST

Name
Type
Mandatory
Description
roomName StringYesThe room name to create.
roomIdStringYesThe room id to create
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before. 
workspaceStringYesThe id of the workspace. 

Note : 1) ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/workspaces/UNC/createOrUpdateRoom?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":
"unc_nursery","id":"podc","name":"Pod C"},{"workspaceId":"unc_nursery","id":"podd","name":"Pod D"},{"workspaceId":"unc_nursery","id":"pode","name":"Pod E"},{"workspaceId":"unc_nursery","id":"podf","name":"Pod F"},{"workspaceId":"unc_nursery","id":"podg","name":"Pod G"},{"workspaceId":"unc_nursery","id":"test_room","name":"Test
New
Room"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'modifylist_facilitiesrooms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Delete Location(Room)

Create Shift Durations 

This operation is used to delete locations from the to add Shift Durations into database for a particular workspacefacility.

Parameters

Base URL: /organizations/{organization}/workspacesfacilities/{workspacefacility}/deleteRoomcreateOrUpdateShiftDurations

Request Type: POST

Name
Type
Mandatory
Description
workspace{organizationId} StringYesThe id of the workspaceOrganization.
roomId{facilityId} StringYesThe room id to createid of the Facility.
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before 
shiftDurations String YesShift Durations of Facility to create. 

Note : 1) ALL the parameters of the specified template must be present in the request.

2) Delete will not be allowed If the requested room is associated with any Patients.

3) Delete will not be allowed If the requested room is associated with any Devices          2) Shift Durations should contain only whole numbers. e.g. 6,12.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNC/workspacesfacilities/UNC/deleteRoomcreateOrUpdateShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"statusFactdata":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'delete_room' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Fetch Locations(Room) 

This operation is used to fetch Locations from database.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/workspaces/{workspace}/rooms

Request Type: GET

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{facilityId} StringYesThe id of the Facility. 
{workspaceId}StringYesThe id of the workspace.

 

API Sample

Happy Scenario

http://localhost:8080/PresentationServices//organizations/UNC/facilities/UNC/workspaces/unc_nursery}/rooms?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":[{"workspaceId":"unc_nursery","id":"poda","name":"Pod A"},{"workspaceId":"unc_nursery","id":"podb","name":"Pod B"},{"workspaceId":"unc_nursery","id":"podc","name":"Pod C"},{"workspaceId":"unc_nursery","id":"podd","name":"Pod D"},{"workspaceId":"unc_nursery","id":"pode","name":"Pod E"},{"workspaceId":"unc_nursery","id":"podf","name":"Pod F"},{"workspaceId":"unc_nursery","id":"podg","name":"Pod G"},{"workspaceId":"unc_nursery","id":"test_room","name":"Test Room"}]"id":"UNC","nfcEnabled":true,"shifts":["9","12"],"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":true,"organizationId":"UNC"},"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'modify_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Edit Shift Durations 

This operation is used to update Shift Durations into database for a particular facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/createOrUpdateShiftDurations

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
{facilityId} StringYesThe id of the Facility.
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before. 
shiftDurationsStringYesShift Durations of Facility to update. 

Note : 1) ALL the parameters of the specified template must be present in the request.

          2) Shift Durations should contain only whole numbers. e.g. 6,12.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC/createOrUpdateShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":{"id":"UNC","nfcEnabled":true,"shifts":["9","12"],"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":true,"organizationId":"UNC"},"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'listmodify_roomsfacilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Create

Delete Shift Durations

 

This operation is used to add to delete Shift Durations into database for a particular facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/createOrUpdateShiftDurationsdeleteShiftDurations

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
{facilityId} StringYesThe id of the Facility.
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before
shiftDurationsStringYesShift Durations of Facility to createdelete

Note : 1) ALL the parameters of the specified template must be present in the request.

          2) Shift Durations should contain only whole numbers. e.g. 6,12.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC/createOrUpdateShiftDurationsdeleteShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":{"id":"UNC","nfcEnabled":true,"shifts":["9","12"],"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":true,"organizationId":"UNC"},"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'modifydelete_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Edit

Fetch Shift Durations

 

This operation is used to update to fetch all Shift Durations into database from database or fetch shift durations for a particular given facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/createOrUpdateShiftDurations

Request Type: POSTGET

The id of the FacilityshiftDurations
Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.{facilityId} 
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before. 
{facilityId} StringYesShift Durations of Facility to update. 

Note : 1) ALL the parameters of the specified template must be present in the request.

          2) Shift Durations should contain only whole numbers. e.g. 6,12.
NoThe id of the Facility. 

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC/createOrUpdateShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":[{"id":"UNCNorthEastern","nfcEnabled":true,"shifts":["3","6","9"],"nfcSelfModificationEnabled":true,"12"]"name":"North Eastern","barCodeEnabled":true,"organizationId":"UNC"},{"id":"UNC","nfcEnabled":true,"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":true,"organizationId":"UNC"},{"id":"Vidant","nfcEnabled":false,"organizationIdshifts":["UNC6"},"statusFact9":{],"success":true}}

Not enough Permissions

In the case userId doesn't have 'modify_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

 

Delete Shift Durations

This operation is used to delete Shift Durations into database for a particular facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/deleteShiftDurations

Request Type: POST

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
{facilityId} StringYesThe id of the Facility.
userIdStringYesThe id of the logged in user.
tokenStringYesSecurity Token obtained before. 
shiftDurationsStringYesShift Durations of Facility to delete. 

Note : 1) ALL the parameters of the specified template must be present in the request.

          2) Shift Durations should contain only whole numbers. e.g. 6,12.

API Sample

Happy Scenario

nfcSelfModificationEnabled":false,"name":"Vidant","barCodeEnabled":false,"organizationId":"UNC"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC/deleteShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":{"id":"UNC","nfcEnabled":false,"shifts":["6","9"],"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":false,"organizationId":"UNC"},"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'deleteread_facilitiesfacility' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.". 

Fetch All Programs

 

Fetch Shift Durations

This operation is used to

fetch all Shift Durations from database or fetch shift durations for a given facility

 fetch all available survey programs from database.

Parameters

Base URL: /organizations/{organization}/

facilities/{facility}

programs

Request Type: GET

Name
Type
Mandatory
Description
{organizationId} StringYes
The id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{
facilityId
organizationId}
 
String
 String
No
 YesThe id of the
Facility
Organization.

 

Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/

UNCfacilities Expand
titleResult
{"data":[{"id":"NorthEastern","nfcEnabled":true,"shifts":["3","6","9"],"nfcSelfModificationEnabled":true,"name":"North Eastern","barCodeEnabled":true,"organizationId":"UNC

Expand
titleResult
{"data":[{"programId":1,"programLabel":"Catheter Associated Bloodstream Infections","programName":"Catheter Associated Bloodstream Infections"},{"
id
programId":
"UNC"
2,"
nfcEnabled
programLabel":
true,"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":true,"organizationId":"UNC"},{"id":"Vidant","nfcEnabled":false,"shifts":["6","9"],"nfcSelfModificationEnabled":false,"name":"Vidant","barCodeEnabled":false,"organizationId":"UNC"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_facilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
"Human Breast Milk in NICU","programName":"Human Breast Milk in NICU"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_progarms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

Fetch Active Programs

 

This operation is used to  fetch active survey programs from database for a given facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/programs

Request Type: GET

Name
Type
Mandatory
Description
{organization} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{facility}StringYesThe id of the Facility.


Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/

UNCUNCid
programId":1,"
UNC
programLabel"
,"nfcEnabled":false
:"Catheter Associated Bloodstream Infections","
shifts
programName":
[
"
6
Catheter Associated Bloodstream Infections"},
"9"],"nfcSelfModificationEnabled
{"programId":
false
2,"
name
programLabel":"
UNC
Human Breast Milk in NICU","
barCodeEnabled
programName":
false,"organizationId":"UNC"}
"Human Breast Milk in NICU"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have '

read

list_

facility

progarms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

Fetch All

Programs

Forms

 

This operation is used to  fetch all

available

survey

programs

forms from database.

Parameters

Base URL: /organizations/{organization}/

programs

Request Type: GET

Name
Type
Mandatory
Description
tokenStringYesSecurity Token obtained before.userIdStringYesThe id of the logged in user.{organizationId} String Yes

getForms

Request Type: GET

Name
Type
Mandatory
Description
{organization} StringYesThe id of the Organization.

 

Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/Another1/programs?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":[{"programId":1,"programLabel":"Catheter Associated Bloodstream Infections","programName":"Catheter Associated Bloodstream Infections"},{"programId":2,"programLabel":"Human Breast Milk in NICU","programName":"Human Breast Milk in NICU"}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_progarms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

Fetch Active Programs

 

This operation is used to  fetch active survey programs from database for a given facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/programs

Request Type: GET

Name
Type
Mandatory
Description
{organization} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{facility}StringYesThe id of the Facility.
Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/Another1/facilities/TestFacility/programs?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":[{"programId":1,"programLabel":"Catheter Associated Bloodstream Infections","programName":"Catheter Associated Bloodstream Infections"},{"programId":2,"programLabel":"Human Breast Milk in NICU","programName":"Human Breast Milk in NICU"
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
    


Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/Another1/getForms?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data":[{"formName":"New Line Report","surveyId":1},{"formName":"Maintenance Report","surveyId":2},{"formName":"Infection Report","surveyId":3},{"formName":"Breast Milk Report","surveyId":4},{"formName":"Patient Demographics","surveyId":5},{"formName":"Patient Discharge","surveyId":6},{"formName":"Patient Open Lines","surveyId":7},{"formName":"Form Open Lines","surveyId":8},{"formName":"Admission Questions","surveyId":9},{"formName":"Patient Final Discharge","surveyId":10},{"formName":"AUDIT","surveyId":11},{"formName":"MDQ","surveyId":12}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_

progarms

programs' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".


 

Fetch

All Forms 

Active Forms 


This operation is used to  fetch

all

active survey forms from database for a given facility.

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/getForms

Request Type: GET

Name
Type
Mandatory
Description
{organization} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
 
{facility}
 
String
  
YesThe id of the Facility.


Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/Another1/facilities/TestFacility/getForms?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1

Expand
titleResult
{"data
":[{"formName":"New Line Report","surveyId":1},{"formName":"Maintenance Report","surveyId":2},{"formName":"Infection Report","surveyId":3},
":[{"formName":"Breast Milk Report","surveyId":4},{"formName":"Patient Demographics","surveyId":5
},{"formName":"Patient Discharge","surveyId":6},{"formName":"Patient Open Lines","surveyId":7},{"formName":"Form Open Lines","surveyId":8},{"formName":"Admission Questions","surveyId":9},{"formName":"Patient Final Discharge","surveyId":10
},{"formName":"
AUDIT
Patient Discharge","surveyId":
11
6},{"formName":"
MDQ
Patient Final Discharge","surveyId":
12
10}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_programs' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".


 

Fetch Active Forms 

Programs With Forms

 

 

 

This operation is used to  fetch active survey forms from database for a given facility.all Programs with their associated forms. 

Parameters

Base URL: /organizations/{organization}/facilities/{facility}/getFormsprogramWithForms

Request Type: GET

facilityStringYes Facility
Name
Type
Mandatory
Description
{organization} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{organizationId} String YesThe id of the Organization.

 

Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost192.168.1.161:8080/PresentationServices/organizations/Another1/facilities/TestFacility/getFormsUNC/programWithForms?token=a578dbf4d38bad16-1800e48a-4a824580-be24b5b6-b212ba43b278993124ce638c&userId=AQA_pod11

Expand
titleResult
{"data":[{"formNameprogramId":"Breast Milk Report3","surveyId"forms":[{"formName":4"5"},{"formName":"11"}],"programName":"Patient DemographicsInformation"},{"surveyIdprogramId":5},"2","forms":[{"formName":"Patient Discharge2"},{"surveyIdformName":"6"},{"formName":"Patient Final Discharge12"}],"surveyIdprogramName":10}],"statusFact":{"success":true}}

Not enough Permissions

In the case userId doesn't have 'list_programs' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".

 

Programs With Forms

 

 

 

This operation is used to  fetch all Programs with their associated forms. 

Parameters

Base URL: /organizations/{organization}/rolesWithPermissions

Request Type: GET

Name
Type
Mandatory
Description
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{organizationId} String YesThe id of the Organization.

 

Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://192.168.1.161:8080/PresentationServices/organizations/UNC/rolesWithPermissions?token=d38bad16-e48a-4580-b5b6-993124ce638c&userId=QA_1

Expand
titleResult
{
- data:[1]
  -0: {
id"2"
name"pod"
 -permissions[1]
0:  
{
name"read_user"
}
}
  -statusFact
  {
successtrue
  }
 
"Human Breast Milk in NICU"},{"programId":"1","forms":[{"formName":"1"},{"formName":"3"},{"formName":"9"},{"formName":"10"}],"programName":"Catheter Associated Bloodstream Infections"},{"programId":"5","forms":[{"formName":"4"}],"programName":"Open Lines"},{"programId":"4","forms":[{"formName":"7"},{"formName":"8"}],"programName":"Discharge"}],"statusFact":{"success":true}}

 

Not enough Permissions

In the case userId doesn't have 'modifylist_programs_roleforms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".