Create Hospitalization Rooms
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/rooms
Method: POST
URL parameters:
- healthcareservice-id (str) - A uuid of a healthcare service object representing a ward
- serenity_user_provider_id (str) - Id of an organization object representing the Healthcare service provider
[
{
"name": "room1",
"ward_uuid": "value"
},
{
"name": "room2",
"ward_uuid": "value"
},
{
"name": "room3",
"ward_uuid": "value"
}
]
{
"success": true,
"message": "The rooms were successfully created!",
"data": [
{
"id": 23,
"uuid": "a1401bb9-880f-44e2-b7a5-f9db3f6e355a",
"created_at": "2023-01-13T00:05:12.107354Z",
"is_deleted": false,
"modified_at": "2023-01-13T00:05:12.107368Z",
"name": "room1",
"ward_name": "Ward A",
"total_beds": 0,
"available_beds": null,
"ward": "5856196f-4fb6-455b-a690-b483b5091d1e"
},
{
"id": 24,
"uuid": "6bad45b7-e096-4b91-afc1-e366e7fbc0be",
"created_at": "2023-01-13T00:05:12.107433Z",
"is_deleted": false,
"modified_at": "2023-01-13T00:05:12.107440Z",
"name": "room2",
"ward_name": "Ward A",
"total_beds": 0,
"available_beds": null,
"ward": "5856196f-4fb6-455b-a690-b483b5091d1e"
},
{
"id": 25,
"uuid": "d6efc7f0-f74c-4d66-a5d3-9412ccbc85f9",
"created_at": "2023-01-13T00:05:12.107474Z",
"is_deleted": false,
"modified_at": "2023-01-13T00:05:12.107479Z",
"name": "room3",
"ward_name": "Ward A",
"total_beds": 0,
"available_beds": null,
"ward": "5856196f-4fb6-455b-a690-b483b5091d1e"
}
],
"errors": null
}
Get Hospitalization Rooms
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/rooms?ward_uuid=value
Method: GET
search query parameter's value options:
- name
- healthcare_service__name (ward-name)
{
"success": true,
"message": "Operation successful",
"meta": {
"current": 1,
"page_size_query": "page_size",
"next": null,
"previous": null,
"page_size": 50,
"total": 3
},
"results": [
{
"id": 23,
"uuid": "a1401bb9-880f-44e2-b7a5-f9db3f6e355a",
"created_at": "2023-01-13T00:05:12.107354Z",
"is_deleted": false,
"modified_at": "2023-01-13T00:05:12.107368Z",
"name": "room1",
"ward_name": "Ward A",
"total_beds": 0,
"available_beds": null,
"ward": "5856196f-4fb6-455b-a690-b483b5091d1e"
},
{
"id": 24,
"uuid": "6bad45b7-e096-4b91-afc1-e366e7fbc0be",
"created_at": "2023-01-13T00:05:12.107433Z",
"is_deleted": false,
"modified_at": "2023-01-13T00:05:12.107440Z",
"name": "room2",
"ward_name": "Ward A",
"total_beds": 0,
"available_beds": null,
"ward": "5856196f-4fb6-455b-a690-b483b5091d1e"
},
{
"id": 25,
"uuid": "d6efc7f0-f74c-4d66-a5d3-9412ccbc85f9",
"created_at": "2023-01-13T00:05:12.107474Z",
"is_deleted": false,
"modified_at": "2023-01-13T00:05:12.107479Z",
"name": "room3",
"ward_name": "Ward A",
"total_beds": 0,
"available_beds": null,
"ward": "5856196f-4fb6-455b-a690-b483b5091d1e"
}
]
}
Create Hospitalization Beds
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/beds
Method: POST
[
{
"name": "bed1",
"room_uuid": "uuid_value",
},
{
"name": "bed2",
"room_uuid": "uuid_value",
}
]
{
"success": true,
"message": "The beds were successfully created!",
"data": [
{
"id": 7,
"uuid": "39ba2a76-92ca-4c62-8f49-b714c63e3399",
"created_at": "2023-01-13T00:52:54.790716Z",
"is_deleted": false,
"modified_at": "2023-01-13T00:52:54.790725Z",
"room_name": "room1",
"name": "bed1",
"is_available": true,
"room": 1
},
{
"id": 8,
"uuid": "29489d19-9e2e-47ae-a8d6-694714159109",
"created_at": "2023-01-13T00:52:54.790760Z",
"is_deleted": false,
"modified_at": "2023-01-13T00:52:54.790764Z",
"room_name": "room1",
"name": "bed2",
"is_available": true,
"room": 1
}
],
"errors": null
}
Get Hospitalization Beds
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/beds?room_uuid=value
Method: GET
search query parameter's value options:
- name
Other filter query parameters:
- is_available (boolean) - True means bed is available while False means, the bed is unavailable
- ward_uuid (string) - The uuid of the ward where the beds are located
- room_uuid (string) - The uuid of the room where the beds are located
Example URL with query params:
{{base_url}}/providers/{{serenity_user_provider_id}}/rooms/1d090b62-69da-4274-a8bf-978bde907ec7/beds?is_available=true&search=bed1
{
"success": true,
"message": "Operation successful",
"meta": {
"current": 1,
"page_size_query": "page_size",
"next": null,
"previous": null,
"page_size": 50,
"total": 1
},
"results": [
{
"id": 7,
"uuid": "39ba2a76-92ca-4c62-8f49-b714c63e3399",
"created_at": "2023-01-13T00:52:54.790716Z",
"is_deleted": false,
"modified_at": "2023-01-13T00:52:54.790725Z",
"room_name": "room1",
"name": "bed1",
"is_available": true,
"room": 1
}
]
}