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
...
...
...
...
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 |
---|---|---|---|
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
API Sample
Happy Scenario
Expand | ||
---|---|---|
| ||
{ - data: [1] - 0: { name: "access_forms" } -statusFact: { success: true } } |
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} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
roleName | String | Yes | Role 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_pod1Expand | ||
---|---|---|
| ||
{ - data: { id: 54 name: "MyRole1" organizationId: "QA_Organization_A" } -statusFact: { success: true } } |
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} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
roleName | String | Yes | Role Name of the role. |
roleId | String | Yes | Role 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 | ||
---|---|---|
| ||
{ - data: { id: 54 name: "MyRole1" organizationId: "QA_Organization_A" } -statusFact: { success: true } } |
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} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
...
roleName |
...
String |
...
Yes | Role 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
...
...
Expand | ||
---|---|---|
| ||
{ - data: [1] - 0: { name: "access_forms" } -statusFact: { success: true } } |
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 | ||
---|---|---|
| ||
{"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
This operation is used to fetch all roles associated with a particular organization along with their associated privileges.
Parameters
Base URL: /organizations/{organization}/
rolesWithPermissions
Request Type:
GET
Name | Type | Mandatory | Description |
---|
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{organizationId} |
String |
Yes | The id of the Organization. |
API Sample
Happy Scenario
Expand | ||
---|---|---|
|
{ - data:[1] -0: { id: "2" name: "pod" -permissions: [1] 0: { name: "read_user" } } -statusFact: { success: true } } |
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 Roles With Permissions
This operation is used to
update selected Privileges into database
.
Parameters
Base URL: /organizations/{organization}/
rolePermission/
editRolesPermissions
Request Type: POST
Name | Type | Mandatory | Description |
---|
permissions | String | Yes | The |
permission list to update. |
roleId | String | Yes |
The role id to update | |||
userId | String | Yes | The id of the logged in user. |
token | String | Yes |
Security Token obtained before. |
organization | String | Yes |
The id of the |
organization. |
API Sample
Happy Scenario
Expand | ||
---|---|---|
|
{"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 add Locations into database
..
Parameters
Base URL: /organizations/workspaces/{
workspace}/
createOrUpdateRoom
Request Type: POST
Name | Type | Mandatory | Description |
---|
roomName | String | Yes | The |
room name to create. |
roomId | String | Yes |
The room id to create | |||
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
workspace | String | Yes |
The id of the workspace. |
Note
: 1) ALL the parameters of the specified template must be present in the request.
API Sample
Happy Scenario
workspaces/UNC/createOrUpdateRoom?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Expand | ||
---|---|---|
| ||
{"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_
room' permission, the operation returns a 403 (Forbidden) error with the body "Not enough 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 | String | YesSecurity | Token obtained before.The room name to create. | |||
roomId | String | Yes | The room id to create | |||
userId | String | Yes | The id of the logged in user. | {organizationId} | String | Yes |
token | String | Yes | Security Token obtained before. | |||
workspace | String | Yes | The 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 | ||
---|---|---|
| ||
{ - data:[1] -0: { id: "2" name: "pod" -permissions: [1] 0: { name: "read_user" } } -statusFact: { success: true } } |
{"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 databaseto delete locations from the database for a particular workspace.
Parameters
Base URL: /organizations/workspaces/{
organizationworkspace}/
rolePermission/editRolesPermissionsdeleteRoom
Request Type: POST
Name | Type | Mandatory | Description |
---|
workspace | String | Yes | The |
id of the workspace. |
roomId | String | Yes | The |
room id to |
create | |||
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
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/editRolesPermissionsd38bad16e48a4580b5b6993124ce638cQA1Expand | ||
---|---|---|
| ||
{"statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have '
modifydelete_
role_permissionroom' 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
Name | Type | Mandatory | Description |
---|---|---|---|
roomName {organizationId} | String | Yes | The room name to createid of the Organization.roomId |
token | String | Yes | The room id to createSecurity Token obtained before. |
userId | String | Yes | The id of the logged in user.token |
{facilityId} | String | Yes | Security Token obtained beforeThe id of the Facility. |
{workspaceId} | String | Yes | The id of the workspace. |
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 | ||
---|---|---|
| ||
{"data":{"data":[{"workspaceId":"unc_nursery","id":"poda","name":"Pod A"},{"workspaceId":"unc_nursery","id":"podb","name":"Pod B"},{"workspaceId":"unc_nursery","id":"test_roompodc","name":"Test New RoomPod C"},"statusFact":{"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 | String | Yes | The room name to create. |
roomId | String | Yes | The room id to create |
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
workspace | String | Yes | The 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 | ||
---|---|---|
| ||
{"data": {"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.".
Create Shift Durations
Delete Location(Room)
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} | String | Yes | The id of the workspaceOrganization. | |
roomId{facilityId} | String | Yes | The room id to createid of the Facility. | |
userId | String | Yes | The id of the logged in user. | |
token | String | Yes | Security Token obtained before. | |
shiftDurations | String | Yes | Shift 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 | ||
---|---|---|
| ||
{"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 'deletemodify_roomfacilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Fetch Locations(Room)
Edit Shift Durations
This operation is used to fetch Locations from databaseto update Shift Durations into database for a particular facility.
Parameters
Base URL: /organizations/{organization}/facilities/{facility}/workspaces/{workspace}/roomscreateOrUpdateShiftDurations
Request Type: GETPOST
Name | Type | Mandatory | Description | |
---|---|---|---|---|
{organizationId} | String | Yes | The id of the Organization. | |
{facilityId} | String | Yes | Security Token obtained beforeThe id of the Facility. | |
userId | String | Yes | The id of the logged in user. | {facilityId}|
token | String | Yes | Security Token obtained before. | |
shiftDurations | String | Yes | The idShift Durations of | theFacility to update. |
{workspaceId} | String | Yes | The id of the workspace. |
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/workspaces/unc_nursery}/roomscreateOrUpdateShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Expand | ||
---|---|---|
| ||
{"data":[{"workspaceIdid":"unc_nurseryUNC","idnfcEnabled":"poda"true,"nameshifts":["Pod A9"},{"workspaceId":"unc_nursery"12"],"idnfcSelfModificationEnabled":"podb"false,"name":"Pod BUNC"},{"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"}],""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.".
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} | String | Yes | The id of the Organization. |
{facilityId} | String | Yes | The id of the Facility. |
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
shiftDurations | String | Yes | Shift 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
http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC/deleteShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Expand | ||
---|---|---|
| ||
{"statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have 'listdelete_roomsfacilities' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Create
Fetch Shift Durations
This operation is used to add to fetch all Shift Durations into from database or fetch shift durations for a particular given facility.
Parameters
Base URL: /organizations/{organization}/facilities/{facility}/createOrUpdateShiftDurations
Request Type: POSTGET
Name | Type | Mandatory | Description | |
---|---|---|---|---|
{organizationId} | String | Yes | The id of the Organization. | |
{facilityId} | String | Yes | The id of the Facility. | |
userId | String | Yes | The id of the logged in user. | |
token | String | Yes | Security Token obtained before. | |
shiftDurationsuserId | String | Yes | Shift Durations of Facility to create. |
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.The id of the logged in user. | |||
{facilityId} | String | No | The 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 | ||
---|---|---|
| ||
{"data":{"id":"UNC","nfcEnabled":[{"id":"NorthEastern","nfcEnabled":true,"shifts":["3","6","9"],"nfcSelfModificationEnabled":true,"name":"North Eastern","barCodeEnabled":true,"shifts"organizationId":"UNC"},{"id":["9UNC","12nfcEnabled"]:true,"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":true,"organizationId":"UNC"},"statusFact{"id":"Vidant","nfcEnabled":{false,"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} | String | Yes | The id of the Organization. |
{facilityId} | String | Yes | The id of the Facility. |
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
shiftDurations | String | Yes | Shift 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 Scenarioshifts":["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.".
http://localhost:8080/PresentationServices/organizations/UNC/facilities/UNC/createOrUpdateShiftDurations?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Expand | ||
---|---|---|
| ||
{"data":{"id":"UNC","nfcEnabled":truefalse,"shifts":["96","129"],"nfcSelfModificationEnabled":false,"name":"UNC","barCodeEnabled":truefalse,"organizationId":"UNC"},"statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have 'modifyread_facilitiesfacility' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Fetch All Programs
Delete Shift Durations
This operation is used
to fetch all available survey programs from database.
Parameters
Base URL: /organizations/{organization
}/
programs
Request Type:
GET
Name | Type | Mandatory | Description |
---|
token | String | Yes |
Security Token obtained before. |
userId | String | Yes | The id of the |
logged in user. |
{organizationId} |
String |
Yes | The id of the |
Organization. |
API Sample
Happy Scenario
title | Result |
---|
Expand | ||
---|---|---|
| ||
{"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
Fetch Shift Durations
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} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{ |
facility} |
String |
Yes | The id of the |
API Sample
Happy Scenario
http://localhost:8080/PresentationServices/organizations/UNC/facilities?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Expand | ||
---|---|---|
| ||
{"data":[{"id":"NorthEastern","nfcEnabled":true,"shifts":["3","6","9"],"nfcSelfModificationEnabled":true,"name":"North Eastern","barCodeEnabled":true,"organizationId":"UNC"},{"id":"UNC","nfcEnabled":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.".Facility. |
Note that ALL the parameters of the specified template must be present in the request.
API Sample
Happy Scenario
Expand | ||
---|---|---|
| ||
{"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 All Forms
This operation is used to fetch all survey forms from database.
Parameters
Base URL: /organizations/{organization}/getForms
Request Type: GET
Name | Type | Mandatory | Description |
---|---|---|---|
{organization} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The 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
Not enough Permissions
In the case userId doesn't have 'read_facility' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Fetch All Programs
This operation is used to fetch all available survey programs from database.
Parameters
Base URL: /organizations/{organization}/programs
Request Type: GET
Name | Type | Mandatory | Description |
---|---|---|---|
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{organizationId} | String | Yes | The id of the Organization. |
API Sample
Happy Scenario
title | Result |
---|
getForms?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Expand | ||
---|---|---|
|
{"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_
programs' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Fetch Active
ProgramsForms
This operation is used to fetch active survey
programsforms from database for a given facility.
Parameters
Base URL: /organizations/{organization}/facilities/{facility}/
programsgetForms
Request Type: GET
Name | Type | Mandatory | Description |
---|---|---|---|
{organization} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{facility} | String | Yes | The 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/
programsgetForms?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Expand | ||
---|---|---|
| ||
{"data":[{ |
"formName":"Breast Milk Report","surveyId": |
4},{" |
formName":" |
Patient Demographics","surveyId":5},{"formName":"Patient Discharge","surveyId":6},{"formName":"Patient Final Discharge","surveyId":10}],"statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have 'list_
progarmsforms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Fetch All Forms
Programs With Forms
This operation is used to fetch all
survey forms from database.Programs with their associated forms.
Parameters
Base URL: /organizations/{organization}/
getFormsprogramWithForms
Request Type: GET
Name | Type | Mandatory | Description |
---|
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{organizationId} |
String |
Yes | The id of the Organization. |
API Sample
Happy Scenario
localhost192.168.1.161:8080/PresentationServices/organizations/
Another1getFormsa578dbf418004a82be24b212ba43b278Apod1Expand | ||
---|---|---|
|
{" |
data": |
[{" |
programId": |
" |
3 |
" |
," |
forms": |
[{"formName":"Patient Demographics","surveyId":5},{"formName":" |
AUDIT","surveyId": |
11}], |
" |
programName":"Patient |
Information"},{" |
programId":" |
2"," |
forms": |
[{"formName":" |
Maintenance Report","surveyId": |
2},{"formName":" |
Patient Discharge","surveyId": |
6},{"formName":"MDQ","surveyId":12}]," |
programName":"Human Breast Milk in NICU"},{" |
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
This operation is used to fetch 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} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{facility} | String | Yes | The id of the Facility. |
API Sample
Happy Scenario
Expand | ||
---|---|---|
| ||
{"data programId":"1","forms":[{"formName":"New Line Report","surveyId":1},{"formName":"Infection Report","surveyId":3},{"formName":"Admission Questions","surveyId":9},{"formName":"Patient Final Discharge","surveyId":10}],"programName":"Catheter Associated Bloodstream Infections"},{"programId":"5","forms":[{"formName":"Breast Milk Report","surveyId":4}],"programName":"Open Lines"},{"programId":"4","forms":[{"formName":"Patient DemographicsOpen Lines","surveyId": 57},{"formName":" Patient DischargeForm Open Lines","surveyId": 68}], {" formNameprogramName":" Patient FinalDischarge ","surveyId" :10}],"statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have 'list_programs_forms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Programs With
Edit Forms
This operation is used to fetch all Programs with their associated forms. update selected forms into database for a given facility.
Parameters
Base URL: /organizations/{organization}/rolesWithPermissionsfacilities/{facility}/editForms
Request Type: GETPOST
Name | Type | Mandatory | Description | token|||
---|---|---|---|---|---|---|
surveyIds | String | Yes | The survey id list to update. | |||
facilityId | String | YesSecurity | Token obtained beforeThe id of the facility. | |||
userId | String | Yes | The id of the logged in user. | {organizationId} | String | Yes |
token | String | Yes | Security Token obtained before. | |||
organization | String | Yes | The id of the Organizationorganization. |
API Sample
Happy Scenario
Expand | ||||
---|---|---|---|---|
| ||||
-0: { id: "2" name: "pod" -permissions: [1] 0: { name: "read_user" } } -statusFact: { success: true } "statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have 'modify_roleforms' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".