RWE Box REST API
Getting started with examples.
- Before executing the examples, make sure that resources corresponding to the UUID's used in the examples are present on the demo server.
- Before executing the examples, append the base server url before the examples for e.g. change
/rwe-web/ws/rest/v1/concept
ashttps://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/concept
or any other base server URL.
// Before executing the examples, get the okttp dependency jar and import it the project.
// These code stubs will be elided from all the java examples for clarity
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import java.io.IOException;
public class Main {
public static void main(String[] args) {
try {
// the examples go here
} catch (IOException exception) {
// handle exception here
}
}
}
Welcome to the RWE Box REST API documentation! RWE Box is an Easy-to-Use EDC and ePRO system.
This document provides High level documentation of RWE Box APIs with code samples which are in the dark area to the right.
This documentation serves as a reference to the bespoke REST API for RWE Box.
Getting Started
If you are new to RWE Box checkout the Home page
Current version
- By default, all requests to
/rwe-web/ws/rest
receive the v1 version of the REST API.
Purpose
The purpose of this documentation is to provide a brief and good taste and experience of the APIs that are used in RWE Box and RWE Box iData to the new developers so that they can onboard in the projects easily.
The documentation also aims to assist the existing developers in getting to know the APIs' conceptual context and how they help the consumers during the interaction in the real world.
Schema
Fetching concepts
curl -X GET "/rwe-web/ws/rest/v1/concept"
connection: keep-alive
content-length: 9731
content-type: application/json;charset=UTF-8
date: Wed, 20 Nov 2019 14:13:54 GMT
etag: "04c83ff0cf2cc35cf05a2075ad117df83"
server: nginx/1.10.3 (Ubuntu)
strict-transport-security: max-age=15768000
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=6D8DA35A3C57ECF332AFACC843609A23")
.build();
Response response = client.newCall(request).execute();
All API access is over HTTPS, and can be accessed from /rwe-web/ws/rest/v1
. All data is sent and received as JSON.
Resources
RWE Box objects (persons, patients, encounters, observations, etc.) are exposed by the REST Web Services modules as a REST resource, as documented here.
Resources have a default representation, which returns key properties. Most resources can be fetched using a full representation (using the parameter
v=full
) that includes a more comprehensive list of properties.
Subresources
Some resources are not defined or do not make sense apart from their parent object. We refer to these as subresources.
Examples of subresources are PersonNames, PersonAddresses, ConceptNames, etc.
You can act on subresources under the parent's URL
Examples
Adding a person name.
Adding a person's name
POST /rwe-web/ws/rest/v1/person/:target_person_uuid/name
{
"givenName": "John",
"familyName": "Smith"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"givenName\": \"John\",\r\n \"familyName\": \"Smith\"\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/person/070f0120-0283-4858-885d-a20d967729cf/name
")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=6D8DA35A3C57ECF332AFACC843609A23")
.build();
Response response = client.newCall(request).execute();
Editing a person's name.
Editing a person's name
POST /rwe-web/ws/rest/v1/person/:target_person_uuid/name/:target_name_uuid
{
"givenName": "Johnny"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"givenName\": \"Johnny\"\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/person/070f0120-0283-4858-885d-a20d967729cf/name/c280a829-7a86-47a5-b876-df8f53e89dac
")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=6D8DA35A3C57ECF332AFACC843609A23")
.build();
Response response = client.newCall(request).execute();
A subresource can have only one parent.
If it seems like a resource has two or more parents, then it is most likely a top-level resource.
For example, "encounters" should not be a subresource of "patient" and "location" resources (answering questions of "all encounters of a patient" and "all encounters at a location").
Instead, these should be queries on the encounter resource:
Get an encounter list for a specific patient.
Get an encounter list for a specific patient
GET /encounter?patient=:target_patient_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/encounter?patient=7379bf1c-b64f-4958-b27f-2a769d8d291c")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=6D8DA35A3C57ECF332AFACC843609A23")
.build();
Response response = client.newCall(request).execute();
Get an encounter list for a specific location.
Get an encounter list for a specific location
GET /encounter?location=:target_location_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/encounter?location=aff27d58-a15c-49a6-9beb-d30dcfc0c66e")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=6D8DA35A3C57ECF332AFACC843609A23")
.build();
Response response = client.newCall(request).execute();
Resources with subtypes
Some resources can have subtypes. For example, the Order resource contains DrugOrder and TestOrder subtypes
When creating a resource that has subtypes via a
POST
, you must specify which subtype of the resource you are creating, with a special t property of the resource.
Examples
POST examples on order resource
POST /rwe-web/ws/rest/v1/order
{
"type":"testorder",
"encounter": "69f83020-caf2-4c9e-bca7-89b8e62b52e1",
"action": "new",
"urgency": "ROUTINE",
"dateActivated": "2018-10-16 12:08:43"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"type\":\"testorder\",\r\n \"encounter\": \"69f83020-caf2-4c9e-bca7-89b8e62b52e1\",\r\n \"action\": \"new\",\r\n \"urgency\": \"ROUTINE\",\r\n \"dateActivated\": \"2018-10-16 12:08:43\"\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/order")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=6D8DA35A3C57ECF332AFACC843609A23")
.build();
Response response = client.newCall(request).execute();
If you GET a resource that has subtypes, each result will be one of those subtypes, which you can see by looking at the special property of each result.
You may query for only a certain subtype of a resource by providing a t query parameter.
Get encounter orders of drug order subtype.
Get encounter orders of drug order subtype
GET /rwe-web/ws/rest/v1/order?type=drugorder&v=full'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/order?type=drugorder")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=6D8DA35A3C57ECF332AFACC843609A23")
.build();
Response response = client.newCall(request).execute();
Authentication
Almost every API endpoint(other than the
/session
endpoint) in rwe-web API requires authentication in order to interact.Currently, only BASIC authentication is supported. Along with the HTTP request, a request header of
Authorization: Basic <base64 of username:password>
needs to be sent.Alternatively, a session token can be used to interact with the API endpoints.
For example the base64 encoding of
admin:Admin123
isYWRtaW46QWRtaW4xMjM=
Retrieve session token
Retrieve session token
GET /rwe-web/ws/rest/v1/session
-H 'Authorization: Basic Auth <base64 encoded username:password'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/session")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=2D158E83ACFB788998C7DB495F07C1B9");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/session", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"sessionId": "2D158E83ACFB788998C7DB495F07C1B9",
"authenticated": true,
"user": {
"uuid": "afc642a0-624f-4cb9-9768-dfaab47b552d",
"display": "hcp",
"username": "hcp",
"userProperties": {
"loginAttempts": "0"
},
"person": {
"uuid": "cc6fe179-fbd2-4562-9d9f-36fc2345d214"
},
"privileges": [],
"roles": [
{
"uuid": "1c4ac9bb-198c-4550-bac7-db52f8bd78f0",
"name": "HCP"
}
]
},
"locale": "en_GB",
"allowedLocales": [
"en",
"en_GB",
"es",
"fr",
"it",
"pt"
]
}
The session token is retrieved using Basic authentication on the
/session
endpoint. The response will include aJSESSIONID
in the header. This session ID is also included in the response objectThe session token is retrieved using Basic authentication on the
/session
endpoint. The response will include aJSESSIONID
in the header. This session ID is also included in the response objectThe
sessionId
token should be passed with all subsequent calls as a cookie namedJSESSIONID
.
Logout User/End session
Logout User/End session
DELETE /rwe-web/ws/rest/v1/session -H 'Accept: application/json'
-H 'Authorization: Basic Auth' (required to identify the user)
OkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/session")
.method("DELETE", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=2D158E83ACFB788998C7DB495F07C1B9");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/session", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Changing Password
Password change By Admin
POST /rwe-web/ws/rest/v1/password/:target_user_uuid
{
"newPassword" : "newPassword"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
//password should contain atleast 1 integer
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"newPassword\" : \"password1\"\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/password/45ce6c2e-dd5a-11e6-9d9c-0242ac150002")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
}
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=2D158E83ACFB788998C7DB495F07C1B9");
var raw = JSON.stringify({"newPassword":"newPassword1"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/password/45ce6c2e-dd5a-11e6-9d9c-0242ac150002", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Since version 2.17 of the webservices.rest module:
- An administrator (with the
EDIT_USER_PASSWORDS
privilege) can change the password for other users by posting a new password to/password/:target_user_uuid
. - The examples returns a
500 Internal server Error
status if we try to change the password associated with the admin user.so we should use a suitable user's UUID. - The new password must contain atleast one integer.
Password change By Users
POST /rwe-web/ws/rest/v1/password
{
"oldPassword" : "oldPassword",
"newPassword" : "newPassword"
}
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"oldPassword\" : \"Admin123\",\r\n \"newPassword\" : \"newPassword1\"\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/password")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=2D158E83ACFB788998C7DB495F07C1B9");
var raw = JSON.stringify({"oldPassword":"Admin123","newPassword":"newPassword1"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/password \n", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- After authenticating user can change their own password, by posting to
/password
. - The new password must contain atleast one integer.
Getting all location without authentication
Getting all location without authentication
GET /rwe-web/ws/rest/v1/location?tag=Login+Location'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/location?tag=Login+Location")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=2D158E83ACFB788998C7DB495F07C1B9");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/location?tag=Login+Location'\n", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- While fetching individual locations requires authentication, you can get a list of available locations by passing
the special
tag
"Login Location" as a query parameter.
System Setting
System Setting Overview
System Settings are used to store module and system-wide settings. They primarily consist of a property name and a value and a description explaining how this property is being used.
System Settings are configuration variables that can be modified without restarting or recompiling the application. They're useful when module code needs to refer to a value that's unique to a particular installation, such as a concept ID number or a file path.
some examples :
- system-wide setting:
Default Location
which specifies the name of the location to use as a system default. - module-specific system setting:
Require Email as Username
is a system setting under the user module which accepts boolean type as a valid value.
- system-wide setting:
Available operations for systemsetting type.
List System Settings
List system settings
GET /systemsetting?limit=1&v=full
Success Response
{
"results": [
{
"uuid": "7ada585f-e2cc-456f-8fb2-67af52389293",
"property": "addresshierarchy.addressToEntryMapUpdaterLastStartTime",
"value": null,
"description": "The module uses this field to store when the AddressToEntryMapUpdater task was last started; DO NOT MODIFY",
"display": "Addresshierarchy - Address To Entry Map Updater Last Start Time = null",
"datatypeClassname": null,
"datatypeConfig": null,
"preferredHandlerClassname": null,
"handlerConfig": null,
"links": [
{
"rel": "self",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/systemsetting/7ada585f-e2cc-456f-8fb2-67af52389293"
}
],
"resourceVersion": "1.9"
}
],
"links": [
{
"rel": "next",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/systemsetting?limit=1&v=full&startIndex=1"
}
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/systemsetting?limit=1&v=full")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/systemsetting?limit=1&v=full", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Fetch all non-retired System Settings that match any specified parameters otherwise fetch all non-retired System Settings.
If not authenticated or authenticated user does not have sufficient privileges, a
401 Unauthorized
status is returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
limit | integer |
use this parameter to limit the number of results to be returned |
startIndex | integer |
the offset where to start the query |
v | String |
the required representation to return (i.e., ref, default, full or custom ) |
q | String |
the search query |
Get a particular System Setting
Get a particular system setting
GET /systemsetting/:target_systemsetting_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/systemsetting/7ada585f-e2cc-456f-8fb2-67af52389293")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/systemsetting/7ada585f-e2cc-456f-8fb2-67af52389293", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a particular System Setting. If not authenticated or authenticated user does not have sufficient privileges, a
401 Unauthorized
status is returned.
Create a System Setting
Create a system setting
POST /systemsetting
{
"property": "property name",
"description": "dummy description",
"datatypeClassname": "org.rwe-web.customdatatype.datatype.FreeTextDatatype",
"datatypeConfig": "default",
"preferredHandlerClassname":"org.rwe-web.web.attribute.handler.FreeTextTextareaHandler",
"handlerConfig": null,
"value": "dummy value"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"property\": \"property name\",\r\n \"description\": \"dummy description\",\r\n \"datatypeClassname\": \"org.rwe-web.customdatatype.datatype.FreeTextDatatype\",\r\n \"datatypeConfig\": \"default\",\r\n \"preferredHandlerClassname\":\"org.rwe-web.web.attribute.handler.FreeTextTextareaHandler\",\r\n \"handlerConfig\": null,\r\n \"value\": \"dummy value\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/systemsetting/")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710");
var raw = JSON.stringify({"property":"property name","description":"dummy description","datatypeClassname":"org.rwe-web.customdatatype.datatype.FreeTextDatatype","datatypeConfig":"default","preferredHandlerClassname":"org.rwe-web.web.attribute.handler.FreeTextTextareaHandler","handlerConfig":null,"value":"dummy value"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/systemsetting/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To create a System Setting, you need to specify below attributes in the request body. If not authenticated or authenticated user does not have sufficient privileges, a
401 Unauthorized
status is returned.
Attributes
Parameter | Type | Description |
---|---|---|
property | String |
the property name for this System Setting, names can be up to 255 chars, must be unique, and follow a convention of module ID followed by category & name lower camelCase separated by periods for e.g., addresshierarchy.allowFreetext. |
description | String |
a description for the usage of this property. |
datatypeClassname | String |
Data type for this System Setting.RWE Box provides Custom data type resource, which gives flexibility to select the data type accordingly. |
datatypeConfig | String |
An optional identifier from the fulfiller e.g., lab |
preferredHandlerClassname | String |
Handler subresource for the Custom Data Type used. Can optionally define a specific handler class wants to use (otherwise, the framework will choose the best handler for the chosen DataType). |
handlerConfig | String |
Allow the handler have any name and config it wants/needs. This will help to identify the data type unambiguously which has been contained and will allow introspecting. |
value | String |
the value assigned to this system setting. |
Update a System Setting
Updating system setting
POST /systemsetting/:target_systemsetting_uuid
{
"property": "property name",
"description": "dummy description",
"datatypeClassname": "org.rwe-web.customdatatype.datatype.FreeTextDatatype",
"datatypeConfig": "default",
"preferredHandlerClassname":"org.rwe-web.web.attribute.handler.FreeTextTextareaHandler",
"handlerConfig": null,
"value": "dummy value"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"property\": \"property name\",\r\n \"description\": \"dummy description\",\r\n \"datatypeClassname\": \"org.rwe-web.customdatatype.datatype.FreeTextDatatype\",\r\n \"datatypeConfig\": \"default\",\r\n \"preferredHandlerClassname\":\"org.rwe-web.web.attribute.handler.FreeTextTextareaHandler\",\r\n \"handlerConfig\": null,\r\n \"value\": \"dummy value\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/systemsetting/443b909a-82d7-4842-bf6a-f4e773ddcad8")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710");
var raw = JSON.stringify({"property":"property name","description":"dummy description","datatypeClassname":"org.rwe-web.customdatatype.datatype.FreeTextDatatype","datatypeConfig":"default","preferredHandlerClassname":"org.rwe-web.web.attribute.handler.FreeTextTextareaHandler","handlerConfig":null,"value":"dummy value"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/systemsetting/443b909a-82d7-4842-bf6a-f4e773ddcad8", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Update a System Setting with given UUID, this method only modifies properties in the request. If the user not logged in to perform this action, a
401 Unauthorized
status returned. - in order to use the examples we should first create a custom system setting and then try and modify it since some of the system settings are read only and might return an error
400 bad request
.
Attributes
Parameter | Type | Description |
---|---|---|
property | String |
the property name for this System Setting, names can be up to 255 chars, must be unique, and follow a convention of module ID followed by category & name lower camelCase separated by periods for e.g., addresshierarchy.allowFreetext. |
description | String |
a description for the usage of this property. |
datatypeClassname | String |
Data type for this System Setting.RWE Box provides Custom data type resource, which gives flexibility to select the data type accordingly. |
datatypeConfig | String |
An optional identifier from the fulfiller e.g., lab |
preferredHandlerClassname | String |
Handler subresource for the Custom Data Type used. Can optionally define a specific handler class wants to use (otherwise, the framework will choose the best handler for the chosen DataType). |
handlerConfig | String |
Allow the handler have any name and config it wants/needs. This will help to identify the data type unambiguously which has been contained and will allow introspecting. |
value | String |
the value assigned to this system setting. |
Delete a System Setting
Delete a system setting
DELETE /systemsetting/:target_systemsetting_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/systemsetting/7ada585f-e2cc-456f-8fb2-67af52389293?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/systemsetting/7ada585f-e2cc-456f-8fb2-67af52389293?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or void a System Setting by its UUID. If not authenticated or authenticated user does not have sufficient privileges, a
401 Unauthorized
status is returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
purge | Boolean |
The resource will be voided unless purge = ‘true’.Purging will attempt to remove the attribute type from the system irreversibly. Attribute types that have been used (i.e., are referenced from existing data) cannot be purged. |
System Information
System Information Overview
- System Information directly fetches the system information from AdministrationService and displays it by splitting it into name value pairs across 4 headers.
Header | Brief Description |
---|---|
1. RWE Box Information | This section holds information like RWE Box Version Snapshot and other system wide informations like System Date and Time. |
2. Java Runtime Environment Information | This section has the relevant Java parameters along with the the operating system and its architecture information.For e.g. Operating System : Ubuntu |
3. Memory Information | This section holds the total , free and the maximum heap Size memory information of the system. |
4. Database Information | This section has the relevant information about the database. For e.g. Database Schema name : rwebox |
Available operations for systeminformation type.
List System Inforamation
List system information
GET /systeminformation
Success Response
{
"systemInfo": {
"SystemInfo.title.rwe-webInformation": {
"SystemInfo.Installation.systemDate": "2020-01-01",
"SystemInfo.Installation.systemTime": "20:00:00",
"SystemInfo.Installation.Version": "1.11.0 Build 12016",
"SystemInfo.hostname": "hostname"
},
"SystemInfo.title.javaRuntimeEnvironmentInformation": {
"SystemInfo.JavaRuntimeEnv.operatingSystem": "Ubuntu",
"SystemInfo.JavaRuntimeEnv.operatingSystemArch": "amd64",
"SystemInfo.JavaRuntimeEnv.operatingSystemVersion": "4.15.0-52-generic",
"SystemInfo.JavaRuntimeEnv.javaVersion": "1.8.0_212",
"SystemInfo.JavaRuntimeEnv.javaVendor": "Oracle Corporation",
"SystemInfo.JavaRuntimeEnv.jvmVersion": "25.212-b01",
"SystemInfo.JavaRuntimeEnv.jvmVendor": "Oracle Corporation",
"SystemInfo.JavaRuntimeEnv.javaRuntimeName": "OpenJDK Runtime Environment",
"SystemInfo.JavaRuntimeEnv.javaRuntimeVersion": "1.8.0_212-8u212-b01-1~deb9u1-b01",
"SystemInfo.JavaRuntimeEnv.userName": "rwebox",
"SystemInfo.JavaRuntimeEnv.systemLanguage": "en",
"SystemInfo.JavaRuntimeEnv.systemTimezone": "UTC+8",
"SystemInfo.JavaRuntimeEnv.fileSystemEncoding": "UTF-8",
"SystemInfo.JavaRuntimeEnv.userDirectory": "/usr/local/tomcat",
"SystemInfo.JavaRuntimeEnv.tempDirectory": "/usr/local/tomcat/temp"
},
"SystemInfo.title.memoryInformation": {
"SystemInfo.Memory.totalMemory": "607 MB",
"SystemInfo.Memory.freeMemory": "350 MB",
"SystemInfo.Memory.maximumHeapSize": "683 MB"
},
"SystemInfo.title.dataBaseInformation": {
"SystemInfo.Database.name": "\"rwe-web-db\"",
"SystemInfo.Database.connectionURL": "jdbc:mysql://link",
"SystemInfo.Database.userName": "\"rwebox\"",
"SystemInfo.Database.driver": null,
"SystemInfo.Database.dialect": null
}
}
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/systeminformation")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=ACC5AAAB3FE29B0A1A2C239EC00B8710");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/systeminformation", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Fetch all System Information that match any specified parameters otherwise fetch all the System Information if no query parameters specified.
- If not authenticated or authenticated user does not have sufficient privileges, a
401 Unauthorized
status is returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
limit | integer |
use this parameter to limit the number of results to be returned |
startIndex | integer |
the offset where to start the query |
v | String |
the required representation to return (i.e., ref, default, full or custom ) |
User
User Overview
A User in RWE Box is an account that a person may use to log into the system.
The real-life person is represented by a Person record in RWE Box, and a person may have more than one user account. If you want a patient to be able to view her record in RWE Box, then you need to create a user account and link it to the patient's person record.
Available operations for User
List all non-retired users.
Get all non-retired Users
GET user?q=admin&v=default&limit=1
Success Response
{
"results": [
{
"uuid": "45ce6c2e-dd5a-11e6-9d9c-0242ac150002",
"display": "admin",
"username": "admin",
"systemId": "admin",
"userProperties": {
"loginAttempts": "0",
"emrapi.lastViewedPatientIds": "508,507,311,509,510,511"
},
"person": {
"uuid": "24252571-dd5a-11e6-9d9c-0242ac150002",
"display": "Super User",
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/person/24252571-dd5a-11e6-9d9c-0242ac150002"
}
]
},
"privileges": [],
"roles": [
{
"uuid": "8d94f852-c2cc-11de-8d13-0010c6dffd0f",
"display": "System Developer",
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/role/8d94f852-c2cc-11de-8d13-0010c6dffd0f"
}
]
},
{
"uuid": "8d94f280-c2cc-11de-8d13-0010c6dffd0f",
"display": "Provider",
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/role/8d94f280-c2cc-11de-8d13-0010c6dffd0f"
}
]
}
],
"retired": false,
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/user/45ce6c2e-dd5a-11e6-9d9c-0242ac150002"
},
{
"rel": "full",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/user/45ce6c2e-dd5a-11e6-9d9c-0242ac150002?v=full"
}
],
"resourceVersion": "1.8"
}
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/user?q=admin&limit=1
&v=default")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=A2AF09658C73E1ECEC5D3C8C7C249A2D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=A2AF09658C73E1ECEC5D3C8C7C249A2D");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/user?q=admin&limit=1\n&v=default", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Quickly filter users with given query parameters. Returns a 404 Not Found
status if the user does not exist.
If not logged in to perform this action, a 401 Unauthorized
status is returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
q | Search Query |
Filter users by username or system ID |
Get user by UUID.
Get User by UUID
GET /user/:target_user_uuid
1. Here the target UUID used is of the admin user.
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/user/45ce6c2e-dd5a-11e6-9d9c-0242ac150002")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=A2AF09658C73E1ECEC5D3C8C7C249A2D")
.build();
Response response = client.newCall(request).execute();
1. Here the target UUID used is of the admin user.
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=A2AF09658C73E1ECEC5D3C8C7C249A2D");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/user/45ce6c2e-dd5a-11e6-9d9c-0242ac150002", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a user by its UUID. Returns a
404 Not Found
status if the user does not exist. If not logged in to perform this action, a401 Unauthorized
status is returned.
Create a user
Create a new User using person object
{
"username": "demoUser",
"password": "Password123",
"person": {
"names": [
{
"givenName": "Demo",
"familyName": "User"
}
],
"gender": "M",
"birthdate": "1997-09-02",
"addresses": [
{
"address1": "30, Vivekananda Layout, Munnekolal,Marathahalli",
"cityVillage": "Bengaluru",
"country": "India",
"postalCode": "560037"
}
]
},
"roles": [
{
"name": "Configures Forms",
"description": "Manages forms and attaches them to the UI"
}
],
"systemId": "systemId"
}
Create a new User using person UUID
POST /user
{
"username": "demoUser",
"password": "Password123",
"person": "90f7f0b4-06a8-4a97-9678-e7a977f4b518",
"systemId": "systemId",
"roles": [
"774b2af3-6437-4e5a-a310-547554c7c65c"
]
}
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"username\": \"demoUser\",\r\n \"password\": \"Password123\",\r\n \"person\": {\r\n \"names\": [\r\n {\r\n \"givenName\": \"Demo\",\r\n \"familyName\": \"User\"\r\n }\r\n ],\r\n \"gender\": \"M\",\r\n \"birthdate\": \"1997-09-02\",\r\n \"addresses\": [\r\n {\r\n \"address1\": \"30, Vivekananda Layout, Munnekolal,Marathahalli\",\r\n \"cityVillage\": \"Bengaluru\",\r\n \"country\": \"India\",\r\n \"postalCode\": \"560037\"\r\n }\r\n ]\r\n },\r\n \"roles\": [\r\n {\r\n \"name\": \"Configures Forms\",\r\n \"description\": \"Manages forms and attaches them to the UI\"\r\n }\r\n ],\r\n \"systemId\": \"systemId\"\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/user")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA");
var raw = JSON.stringify({"username":"demoUser","password":"Password123","person":{"names":[{"givenName":"Demo","familyName":"User"}],"gender":"M","birthdate":"1997-09-02","addresses":[{"address1":"30, Vivekananda Layout, Munnekolal,Marathahalli","cityVillage":"Bengaluru","country":"India","postalCode":"560037"}]},"roles":[{"name":"Configures Forms","description":"Manages forms and attaches them to the UI"}],"systemId":"systemId"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
- For convenience, the person's information can be included in order to create the corresponding person record at the same time as their user record. When creating a user record for an existing person, the existing person must only be referenced by UUID. If you are not logged in to perform this action,
a
401 Unauthorized
status is returned. - The password should be minimum 8 chars long with atleast one lower and upper character alphabet along with a numeral.
- Some properties are not allowed to be set including name and description therefore arent included in the API usage examples.
Attributes
Parameter | Type | Description |
---|---|---|
name | String |
Name of the user |
description | `String | Description of the user |
username | `String | username of the user |
password | `String | password of the user |
person | String |
person resource associated with the user |
systemId | String |
a unique identifier assigned to each user |
roles | Array[] : role |
a list of roles attributed to the user |
userProperties | JSON Object |
A set of key value pairs. Used to store user specific data |
secretQuestion | String |
A secret question chosen by the user |
Update a user
Update a user using its UUID
POST /user/:target_user_uuid
{
"username": "demoUser",
"password": "Password123",
"person": {
"names": [
{
"givenName": "Demo",
"familyName": "User"
}
],
"gender": "M",
"birthdate": "1997-09-02",
"addresses": [
{
"address1": "30, Vivekananda Layout, Munnekolal,Marathahalli",
"cityVillage": "Bengaluru",
"country": "India",
"postalCode": "560037"
}
]
},
"roles": [
{
"name": "Configures Forms",
"description": "Manages forms and attaches them to the UI"
}
],
"systemId": "systemId"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"username\": \"demoUser\",\r\n \"password\": \"Password123\",\r\n \"person\": {\r\n \"names\": [\r\n {\r\n \"givenName\": \"Demo\",\r\n \"familyName\": \"User\"\r\n }\r\n ],\r\n \"gender\": \"M\",\r\n \"birthdate\": \"1997-09-02\",\r\n \"addresses\": [\r\n {\r\n \"address1\": \"30, Vivekananda Layout, Munnekolal,Marathahalli\",\r\n \"cityVillage\": \"Bengaluru\",\r\n \"country\": \"India\",\r\n \"postalCode\": \"560037\"\r\n }\r\n ]\r\n },\r\n \"roles\": [\r\n {\r\n \"name\": \"Configures Forms\",\r\n \"description\": \"Manages forms and attaches them to the UI\"\r\n }\r\n ],\r\n \"systemId\": \"systemId\"\r\n}\r\n");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/user/0dc65b52-b5ef-4640-b5ff-f305c84a8a22")
.url("/rwe-web/ws/rest/v1/user/564b2790-0508-11e3-8ffd-0800200c9a66
")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA");
var raw = JSON.stringify({"username":"demoUser","password":"Password123","person":{"names":[{"givenName":"Demo","familyName":"User"}],"gender":"M","birthdate":"1997-09-02","addresses":[{"address1":"30, Vivekananda Layout, Munnekolal,Marathahalli","cityVillage":"Bengaluru","country":"India","postalCode":"560037"}]},"roles":[{"name":"Configures Forms","description":"Manages forms and attaches them to the UI"}],"systemId":"systemId"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/user/0dc65b52-b5ef-4640-b5ff-f305c84a8a22", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Update a target user with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if the user does not exist. If not logged in to perform this action, a401 Unauthorized
status is returned.
Attributes
Parameter | Type | Description |
---|---|---|
name | String |
Name of the user |
description | `String | Description of the user |
username | `String | username of the user |
password | `String | password of the user |
person | String |
person resource associated with the user |
systemId | String |
a unique identifier assigned to each user |
roles | Array[] : role |
a list of roles attributed to the user |
userProperties | JSON Object |
A set of key value pairs. Used to store user specific data |
secretQuestion | String |
A secret question chosen by the user |
Delete a user
Delete a user using its UUID
DELETE /user/:target_user_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/user/b953d87d-7e67-47b9-ad1e-fa8b7cdaea4d?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=154692F02BBBC664825F3C4C224A474B")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA");
var requestOptions = {
method: 'DELETE',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/user/b953d87d-7e67-47b9-ad1e-fa8b7cdaea4d?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or retire a target user by its UUID. Returns a
404 Not Found
status if the user does not exist. If not logged in to perform this action, a401 Unauthorized
status is returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
purge | Boolean |
The resource will be voided unless purge = ‘true’ |
Role
Role Overview
A Role represents a group of privileges in the system. Roles may inherit privileges from other roles, and users may have one or more roles.
Available operations for Role.
List roles
List roles
GET /role?v=default&limit=1
Success Response
{
"results": [
{
"uuid": "774b2af3-6437-4e5a-a310-547554c7c65c",
"display": "Anonymous",
"name": "Anonymous",
"description": "Privileges for non-authenticated users.",
"retired": false,
"privileges": [],
"inheritedRoles": [],
"links": [
{
"rel": "self",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role/774b2af3-6437-4e5a-a310-547554c7c65c"
},
{
"rel": "full",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role/774b2af3-6437-4e5a-a310-547554c7c65c?v=full"
}
],
"resourceVersion": "1.8"
}
],
"links": [
{
"rel": "next",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role?limit=1&v=default&startIndex=1"
}
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role?limit=1&v=default")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role?limit=1&v=default", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Fetch all the roles that match any specified parameters otherwise fetch all roles. Returns a
200 OK
status with the role response. If the user is not logged in to perform this action, a401 Unauthorized
status is returned.
Get a role by UUID.
Get a role by UUID
GET /role/:target_role_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role/774b2af3-6437-4e5a-a310-547554c7c65c")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role/774b2af3-6437-4e5a-a310-547554c7c65c", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
*Retrieve a role by its UUID. Returns a 404 Not Found
status if the role does not exist. If the user is not logged in to perform this action, a 401 Unauthorized
status is returned.
Create a role
Create a role
POST /role
{
"name": "Clinician",
"description": "A provider assisting the Lead Surgeon.",
"privileges": [
{
"name": "Delete Patients",
"description": "Able to delete patients"
}
],
"inheritedRoles": [
"774b2af3-6437-4e5a-a310-547554c7c65c"
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Clinician\",\r\n \"description\": \"A provider assisting the Lead Surgeon.\",\r\n \"privileges\": [\r\n {\r\n \"name\": \"Delete Patients\",\r\n \"description\": \"Able to delete patients\"\r\n }\r\n ],\r\n \"inheritedRoles\": [\r\n \"774b2af3-6437-4e5a-a310-547554c7c65c\"\r\n ]\r\n}");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA");
var raw = JSON.stringify({"name":"Clinician","description":"A provider assisting the Lead Surgeon.","privileges":[{"name":"Delete Patients","description":"Able to delete patients"}],"inheritedRoles":["774b2af3-6437-4e5a-a310-547554c7c65c"]});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To create a role, you need to specify below attributes in the request body. If the user is not logged in to perform this action, a
401 Unauthorized
status is returned.
Attributes
Parameter | Type | Description |
---|---|---|
name | String |
Name of the role (Required) |
description | String |
Description of the role (Required) |
privileges | Array[] : privileges |
An array of the privilege resource |
inheritedRoles | Array[] : inheritedRoles |
An array of the inheritedRoles type or UUIDs |
Update a role
POST /role/:target_role_uuid
{
"description": "Manages forms and attaches them to the UI"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"description\": \"Manages forms and attaches them to the UI\"\r\n}\r\n");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role/86f043da-1019-4caf-8db6-d5a472334f58")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA");
var raw = JSON.stringify({"description":"Manages forms and attaches them to the UI"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role/86f043da-1019-4caf-8db6-d5a472334f58", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
- Update a role with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if the role does not exist. If the user is not logged in to perform this action, a401 Unauthorized
status is returned.
Attributes
Parameter | Type | Description |
---|---|---|
name | String |
Name of the role (Required) |
description | String |
Description of the role (Required) |
privileges | Array[] : privileges |
An array of the privilege resource |
inheritedRoles | Array[] : inheritedRoles |
An array of the inheritedRoles type or UUIDs |
Delete a role
Delete a role
DELETE /role/:target_role_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role/86f043da-1019-4caf-8db6-d5a472334f58?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=955E778A4F700C5AA9651DAF6FC9DDDA");
var requestOptions = {
method: 'DELETE',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/role/86f043da-1019-4caf-8db6-d5a472334f58?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Delete a role by its UUID. Returns a
404 Not Found
status if the role does not exist. If the user is not logged in to perform this action, a401 Unauthorized
status is returned.Query Parameters
Parameter Type Description purge Boolean
must be true
to delete the role from the system; iffalse
, the request will have no effect
Privilege
Overview
A Privilege is an authorization to perform a particular action in the system. The list of available privileges are defined by the core system and by add-on modules (for example, Delete Patients and Manage Encounter Types), but you need to configure which roles have which privileges while you are configuring your system.
Available operations.
List privilege
List privilege
GET /privilege?v=full&limit=1
Success Response
{
"results": [
{
"uuid": "24635eec-dd5a-11e6-9d9c-0242ac150002",
"display": "Add Concept Proposals",
"name": "Add Concept Proposals",
"description": "Able to add concept proposals to the system",
"retired": false,
"auditInfo": {
"creator": null,
"dateCreated": null,
"changedBy": null,
"dateChanged": null
},
"links": [
{
"rel": "self",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/privilege/24635eec-dd5a-11e6-9d9c-0242ac150002"
}
],
"resourceVersion": "1.8"
}
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/privilege?v=full&limit=1")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=A2AF09658C73E1ECEC5D3C8C7C249A2D")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=A2AF09658C73E1ECEC5D3C8C7C249A2D");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/privilege?v=full&limit=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Fetch all privileges that match any specified parameters otherwise fetch all privileges. Returns a
200 OK
status with the privilege response. If not authenticated or authenticated user does not have sufficient privileges, a401 Unauthorized
status is returned.
Get privilege by UUID
Get privilege by UUID
GET /privilege/:target_privilege_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/privilege/fd40ed09-b499-405a-8b98-8154a6465e1a")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=A2AF09658C73E1ECEC5D3C8C7C249A2D")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=A2AF09658C73E1ECEC5D3C8C7C249A2D");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/privilege/fd40ed09-b499-405a-8b98-8154a6465e1a", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a privilege by its UUID. Returns a
404 Not Found
status if the privilege not exists. If not authenticated or authenticated user does not have sufficient privileges, a401 Unauthorized
status is returned.
Create a privilege
Create a privilege
POST /privilege
{
"name": "Delete Patients",
"description": "A privilege or permission to delete patients"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Delete Patients\",\r\n \"description\": \"A privilege or permission to delete patients\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/privilege")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83");
var raw = JSON.stringify({"name":"Delete Patients","description":"A privilege or permission to delete patients"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/privilege", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To create a privilege, you need to specify below attributes in the request body. If not authenticated or authenticated user does not have sufficient privileges, a
401 Unauthorized
status is returned. If the name has already been used for some other privilege in use then a
500 Internal Server Error
status is returned.Attributes
Parameter Type Description name String
Name of the privilege(Required) description String
Description of the privilege
Update a privilege
Update a privilege
POST /privilege/:target_privilege_uuid
{
"description": "A user who can delete all the encounter types"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"description\": \"A user who can delete all the encounter types\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/privilege/246364a0-dd5a-11e6-9d9c-0242ac150002")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83");
var raw = JSON.stringify({"description":"A user who can delete all the encounter types"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/privilege/246364a0-dd5a-11e6-9d9c-0242ac150002", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Update a privilege with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status, if the privilege does not exists. - If not authenticated or authenticated user does not have sufficient privileges, a
401 Unauthorized
status is returned. Attempting to update a privilege's name will fail with the error code
400 Bad Request
.Attributes
Parameter Type Description name String
Name of the privilege(Required) description String
Description of the privilege
Delete a privilege
Delete a privilege
DELETE /privilege/:target_privilege_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/privilege/24636447-dd5a-11e6-9d9c-0242ac150002?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/privilege/24636447-dd5a-11e6-9d9c-0242ac150002?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete a privilege by its UUID. Returns a
404 Not Found
status if the privilege not exists. If not authenticated or authenticated user does not have sufficient privileges, a401 Unauthorized
status is returned. A
500 Internal server error
status is returned if user is trying to delete any currently used privilege.Query Parameters
Parameter Type Description purge Boolean
true
to delete the privilege from the system; iffalse
, the request will have no effect
Person
Person Overview
Every individual who is referred to in a patient record in RWE Box is stored in the system as a Person. These include Patients, any patient relative or caretaker, Providers, and Users.
All Persons have these characteristics.
Subresource types
Names
- A person can have one or more names, one of which must be marked as the preferred name. The preferred name will be displayed in search results and patient screens.
Addresses
- A person may have zero or more contact addresses. You may configure the format of these addresses for your particular locale.
Person Attributes
To support your local needs, you can define additional information about the people in your system, on top of those that are natively supported by RWE Box. You can define the datatype of a Person Attribute, as well as any constraints on the possible values, using metadata. This metadata is called a Person Attribute Type.
Person Attributes are suitable for storing other information. But historical values of person attributes are not retained. For example, you should use a person attribute to record a patient's contact telephone number. This information may change, but if it does so, the system need only store the most recent value, and need not retain previous values. It is not appropriate to use a person attribute to store something like the patient's height, which is recorded at a given point in time, but can be expected to change and should be tracked as it does so.
Available Operations for Person type
- Search Persons
- Create Persons
- Update Persons
- Delete Persons
- List person name
- Create person name
- Update person name
- Delete person name
- List person addresses
- Create person address
- Update person address
- Delete person address
- List person attributes
- Create person attribute
- Update person attribute
- Delete person attribute
Search Persons
Search Persons
GET /person?q=john
Fetch all non-voided persons that match the search query parameter. Returns a 200 OK
status with the Person response.
Parameters
Parameter | Type | Description |
---|---|---|
q | string | search by name |
List person by UUID
GET /person/:target_person_uuid
Retrieve a person by their UUID. Returns a 404 Not Found
status if the person does not exist in the system. If the user is not logged in to perform this action, a 401 Unauthorized
status is returned.
Create a person
POST /person
{
"names": [
{
"givenName": "Mohit",
"familyName": "Kumar"
}
],
"gender": "M",
"birthdate": "1997-09-02",
"addresses": [
{
"address1": "30, Vivekananda Layout, Munnekolal,Marathahalli",
"cityVillage": "Bengaluru",
"country": "India",
"postalCode": "560037"
}
]
}
To create a person you need to specify the below properties in the request.
401 Unauthorized
is returned if the request is not authenticated or if the authenticated user does not have appropriate permissions.Attributes
Parameter Type Description names Array[] : names
List of names gender String The patient's gender ("M" for male, "F" for female, or "U" for unknown) age Integer The estimated age in years. Used when birthdate is unknown. birthDate String Date of birth of a person birthDateEstimated Boolean True if the birthdate is estimated; false if birthdate is accurate. birthTime String The time of birth of the person dead Boolean True if the patient is dead. deathDate String Date of death of the person causeOfDeath Concept UUID
Reason for the death of the person deathdateEstimated Boolean true
if deathDate is estimate;false
if deathDate is accurateaddresses Array[] : addresses
The address details aggregated in an array attributes Array[] : attributes
The attribute details aggregated in an array
Update a person
POST /person/:target_person_uuid
{
"gender": "M",
"birthdate": "1997-01-13",
}
Update a person. This method only modifies properties specified in the request. Returns a
404 Not found
. If not authenticated or authenticated user does not have sufficient privileges,401 Unauthorized
status is returned.An example of the request is as follows :
Delete a person
DELETE /person/:target_person_uuid?purge=true
Delete or Void a target person. Returns a
404 Not Found
status if person not exists. If not authenticated or authenticated user does not have sufficient privileges,401 Unauthorized
status is returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided unless purge = ‘true’
List person name subresource
List person name subresource
GET /person/:target_person_uuid/name
Success Response
{
"results": [
{
"display": "John Taylor",
"uuid": "4b68f067-6f4d-451a-bd80-342fc21ea486",
"givenName": "John",
"middleName": null,
"familyName": "Taylor",
"familyName2": null,
"voided": false,
"links": [
{
"rel": "self",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name/4b68f067-6f4d-451a-bd80-342fc21ea486",
"resourceAlias": "name"
},
{
"rel": "full",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name/4b68f067-6f4d-451a-bd80-342fc21ea486?v=full",
"resourceAlias": "name"
}
],
"resourceVersion": "1.8"
}
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
List person name subresource by UUID
List person name subresource by UUID
- List all the person name subresource corresponding to a
target_person_uuid
. Returns404 Not Found
status if the person does not exist. If not authenticated or authenticated user does not have sufficient privileges, a401 Unauthorized
status is returned.
GET /person/:target_person_uuid/name/:target_name_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name/4b68f067-6f4d-451a-bd80-342fc21ea486")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name/4b68f067-6f4d-451a-bd80-342fc21ea486", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- List the person name by its
UUID
and corresponding to atarget_person_uuid
. Returns404 Not Found
status if the person does not exist. If not authenticated or authenticated user does not have sufficient privileges, a401 Unauthorized
status is returned.
Create person name subresource
Create person name subresource
POST person/:target_person_uuid/name
{
"givenName": "Mohit",
"familyName": "Kumar",
"preferred": true,
"prefix": "Mr."
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"givenName\": \"Mohit\",\r\n \"familyName\": \"Kumar\",\r\n \"preferred\": true,\r\n \"prefix\": \"Mr.\"\r\n}\r\n");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name/")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var raw = JSON.stringify({"givenName":"Mohit","familyName":"Kumar","preferred":true,"prefix":"Mr."});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
To create a person name subresource for a specific person resource you need to specify below properties in your request body. If user not logged in to perform this action, a
401 Unauthorized
status is returned.Attributes
Parameter Type Description givenName String
name of the person middleName String
middle name of the person familyName String
family name/surname of the person familyName2 String
second family name/surname of the person preferred Boolean
true if this is the person's preferred name. When a person has only one name, it should be marked as preferred. When a person has multiple names, only one name can be marked preferred. prefix String
prefix for the name familyNamePrefix String
prefix if any for the family name familyNameSuffix String
Suffix if any for the family name degree String
degree attained by the person
Update person name subresource
Update person name subresource
POST person/:target_person_uuid/name/:target_name_uuid
{
"givenName": "Mohit",
"familyName": "Verma",
"preferred": true,
"prefix": "Dr."
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"givenName\": \"Mohit\",\r\n \"familyName\": \"Verma\",\r\n \"preferred\": true,\r\n \"prefix\": \"Dr.\"\r\n}\r\n");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name/4e5c5c75-323e-43f4-afad-c5970209d0f9")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var raw = JSON.stringify({"givenName":"Mohit","familyName":"Verma","preferred":true,"prefix":"Dr."});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name/4e5c5c75-323e-43f4-afad-c5970209d0f9", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
To update a person name with given UUID value for a specific person resource, you need to specify below properties in your request body. If user not logged in to perform this action, a
401 Unauthorized
status is returned.Attributes
Parameter Type Description givenName String
name of the person middleName String
middle name of the person familyName String
family name/surname of the person familyName2 String
second family name/surname of the person preferred Boolean
true if this is the person's preferred name. When a person has only one name, it should be marked as preferred; when a person has multiple names, only one name can be preferred. prefix String
prefix for the name familyNamePrefix String
prefix if any for the family name familyNameSuffix String
Suffix if any for the family name degree String
degree attained by the person
Delete person name subresource
Delete person name subresource
DELETE /person/:target_person_uuid/person/:target_name_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name/4e5c5c75-323e-43f4-afad-c5970209d0f9?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var requestOptions = {
method: 'DELETE',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/name/4e5c5c75-323e-43f4-afad-c5970209d0f9?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or void a target name subresource. Returns a
404 Not Found
status if an attribute does not exist. If the user is not logged in to perform this action, a401 Unauthorized
status is returned.
List person address subresource
List person address subresource
GET /person/:target_person_uuid/address
Success Response
{
"results": [
{
"display": "Address15501",
"uuid": "e350d53f-0252-4259-8d87-d97a2d58166e",
"preferred": true,
"address1": "Address15501",
"address2": null,
"cityVillage": "City5501",
"stateProvince": "State5501",
"country": "Country5501",
"postalCode": "55501",
"countyDistrict": null,
"startDate": null,
"endDate": null,
"latitude": null,
"longitude": null,
"voided": false,
"links": [
{
"rel": "self",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address/e350d53f-0252-4259-8d87-d97a2d58166e",
"resourceAlias": "address"
},
{
"rel": "full",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address/e350d53f-0252-4259-8d87-d97a2d58166e?v=full",
"resourceAlias": "address"
}
],
"resourceVersion": "2.0"
}
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- List all the person addresses corresponding to a
target_person_uuid
. Returns a404 Not Found
status if person address does not exist. If the user is not logged in to perform this action, a401 unauthorized
status is returned.
List person address subresource by UUID
List person address subresource by UUID
GET /person/:target_person_uuid/address/:target_address_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address/e350d53f-0252-4259-8d87-d97a2d58166e")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address/e350d53f-0252-4259-8d87-d97a2d58166e", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- List all the person addresses by its
target_address_uuid
and corresponding to atarget_person_uuid
. Returns a404 Not Found
status if person address does not exist. If user not logged in to perform this action, a401 unauthorized
status is returned.
Create person address subresource
Create person address subresource
POST person/:target_person_uuid/address
{
"address1": "30, Vivekananda Layout, Munnekolal,Marathahalli",
"cityVillage": "Bengaluru",
"stateProvince": "Karnataka",
"postalCode": "560037",
"latitude": "28.65033",
"longitude": "77.304255"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"address1\": \"30, Vivekananda Layout, Munnekolal,Marathahalli\",\r\n \"cityVillage\": \"Bengaluru\",\r\n \"stateProvince\": \"Karnataka\",\r\n \"postalCode\": \"560037\",\r\n \"latitude\": \"28.65033\",\r\n \"longitude\": \"77.304255\"\r\n}\r\n");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var raw = JSON.stringify({"address1":"30, Vivekananda Layout, Munnekolal,Marathahalli","cityVillage":"Bengaluru","stateProvince":"Karnataka","postalCode":"560037","latitude":"28.65033","longitude":"77.304255"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address", requestOptions)
To create a person address subresource for a specific person resource you need to specify below properties in your request body. If user not logged in to perform this action, a
401 Unauthorized
status is returned.Attributes
Parameter Type Description preferred Boolean
true if this is the person's preferred address. If a person has multiple addresses, only one can be preferred address1 String
address of the person address2 String
second address of the person cityVillage String
city/village of the person stateProvince String
name of the state of the person country String
country of the person postalCode String
pin code of the person countyDistrict String
county district of the person address3 String
third address of the person address4 String
fourth address of the person address5 String
fifth address of the person address6 String
sixth address of the person startDate String
date when the person began living at this address endDate String
date when the person stopped living at this address latitude String
latitude of the address longitude String
longitude of the address
Update person address subresource
Update person address subresource
POST person/:target_person_uuid/address/:target_address_uuid
{
"address1": "30, Vivekananda Layout, Munnekolal,Marathahalli",
"cityVillage": "Bengaluru",
"stateProvince": "Karnataka",
"postalCode": "560037",
"latitude": "28.65033",
"longitude": "77.304255"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"address1\": \"30, Vivekananda Layout, Munnekolal,Marathahalli\",\r\n \"cityVillage\": \"Bengaluru\",\r\n \"stateProvince\": \"Karnataka\",\r\n \"postalCode\": \"560037\",\r\n \"latitude\": \"28.65033\",\r\n \"longitude\": \"77.304255\"\r\n}\r\n");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address/62fc41dd-e120-40c5-8a66-b651b0a5fecc")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var raw = JSON.stringify({"address1":"30, Vivekananda Layout, Munnekolal,Marathahalli","cityVillage":"Bengaluru","stateProvince":"Karnataka","postalCode":"560037","latitude":"28.65033","longitude":"77.304255"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address/62fc41dd-e120-40c5-8a66-b651b0a5fecc", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To update a person address with given UUID value for a specific person resource you need to specify below properties in your request body.
If user not logged in to perform this action, a
401 Unauthorized
status is returned.
Attributes
Parameter | Type | Description |
---|---|---|
preferred | Boolean |
true if this is the person's preferred address. If a person has multiple addresses, only one can be preferred. |
address1 | String |
address of the person |
address2 | String |
second address of the person |
cityVillage | String |
city/village of the person |
stateProvince | String |
name of the state of the person |
country | String |
country of the person |
postalCode | String |
pin code of the person |
countyDistrict | String |
county district of the person |
address3 | String |
third address of the person |
address4 | String |
fourth address of the person |
address5 | String |
fifth address of the person |
address6 | String |
sixth address of the person |
startDate | String |
date when the person began living at this address |
endDate | String |
date when the person stopped living at this address |
latitude | String |
latitude of the address |
longitude | String |
longitude of the address |
Delete a person address subresource
Delete a person address subresource
DELETE /person/:target_person_uuid/person/:target_address_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address/62fc41dd-e120-40c5-8a66-b651b0a5fecc")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var requestOptions = {
method: 'DELETE',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/address/62fc41dd-e120-40c5-8a66-b651b0a5fecc", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or void a target address subresource. Returns
404 Not Found
status if the person does not exist. If not authenticated or authenticated user does not have sufficient privileges, a401 Unauthorized
status is returned.
List person attribute subresource
List person attribute subresource
GET /person/:target_person_uuid/attribute
Success Response
{
"results": [
{
"display": "Birthplace = Birthplace",
"uuid": "2c7a8991-2435-47df-b7a4-83ca5c341dcd",
"value": "Birthplace",
"attributeType": {
"uuid": "8d8718c2-c2cc-11de-8d13-0010c6dffd0f",
"display": "Birthplace",
"links": [
{
"rel": "self",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/personattributetype/8d8718c2-c2cc-11de-8d13-0010c6dffd0f",
"resourceAlias": "personattributetype"
}
]
},
"voided": false,
"links": [
{
"rel": "self",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute/2c7a8991-2435-47df-b7a4-83ca5c341dcd",
"resourceAlias": "attribute"
},
{
"rel": "full",
"uri": "http://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute/2c7a8991-2435-47df-b7a4-83ca5c341dcd?v=full",
"resourceAlias": "attribute"
}
],
"resourceVersion": "1.8"
}
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
List person attribute subresource by UUID
List person attribute subresource by UUID
- List all person attributes for a given person. Returns a
404 Not Found
if the person doesn't exist. If not authenticated or the authenticated user does not have sufficient privileges, a401 Unauthorized
status is returned.
GET /person/:target_person_uuid/attribute/:target_attribute_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute/2c7a8991-2435-47df-b7a4-83ca5c341dcd")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute/2c7a8991-2435-47df-b7a4-83ca5c341dcd", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- List all the person attributes by its
UUID
and corresponding to atarget_person_uuid
. Returns a404 Not Found
status if person attribute does not exist. If user not logged in to perform this action, a401 unauthorized
status is returned.
Create person attribute subresource
Create person attribute subresource
POST person/:target_person_uuid/attribute
{
"attributeType": "8d8718c2-c2cc-11de-8d13-0010c6dffd0f",
"value": "Birthplace",
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"attributeType\": \"8d8718c2-c2cc-11de-8d13-0010c6dffd0f\",\r\n \"value\": \"Birthplace\"\r\n}\r\n");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var raw = JSON.stringify({"attributeType":"8d8718c2-c2cc-11de-8d13-0010c6dffd0f","value":"Birthplace"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute", requestOptions)
.then(response => response.text())
- To create a person attribute subresource for a specific person resource you need to specify below properties in your request body.
If not authenticated or authenticated user does not have sufficient privileges, a
401 Unauthorized
status is returned.
Attributes
Parameter | Type | Description |
---|---|---|
attributeType | UUID |
UUID of the attributeType (Required) |
value | String |
value associated with the attribute (Required) |
Update person attribute subresource
Update person attribute subresource
POST person/:target_person_uuid/attribute/:target_attribute_uuid
{
"attributeType": "8d8718c2-c2cc-11de-8d13-0010c6dffd0f",
"value": "Birthplace"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"attributeType\": \"8d8718c2-c2cc-11de-8d13-0010c6dffd0f\",\r\n \"value\": \"Birthplace\"\r\n}\r\n");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute/2c7a8991-2435-47df-b7a4-83ca5c341dcd")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var raw = JSON.stringify({"attributeType":"8d8718c2-c2cc-11de-8d13-0010c6dffd0f","value":"Birthplace"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute/2c7a8991-2435-47df-b7a4-83ca5c341dcd", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To update a person attribute with given UUID value for a specific person resource you need to specify below properties in your request body.
If not authenticated or authenticated user does not have sufficient privileges, a
401 Unauthorized
status is returned.
Attributes
Parameter | Type | Description |
---|---|---|
attributeType | UUID |
UUID of the attributeType (Required) |
value | String |
value associated with the attribute (Required) |
Delete person attribute subresource
Delete person attribute subresource
DELETE /person/:target_person_uuid/person/:target_attribute_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute/2c7a8991-2435-47df-b7a4-83ca5c341dcd?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var requestOptions = {
method: 'DELETE',
headers: requestHeaders,
redirect: 'follow'
};
fetch("https://dev-rwe.rwebox.com/rwe-web/ws/rest/v1/person/90f7f0b4-06a8-4a97-9678-e7a977f4b518/attribute/2c7a8991-2435-47df-b7a4-83ca5c341dcd?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or void a target attribute. Returns
404 Not Found
status if the person does not exist. If not authenticated or authenticated user does not have sufficient privileges, a401 Unauthorized
status is returned.
Person Attribute Type
Person Attribute Type Overview
Person attributes provide a mechanism for implementations to add custom attributes to their person records. A Person Attribute Type defines one of these custom attributes, including its data type and search behavior.
For example, creating a Person Attribute Type for civil status (whether or not someone is single or married) would allow an implementation to record this information for each person in their system.
Available operations.
- List person attribute types
- Create a person attribute type
- Update a person attribute type
- Delete a person attribute type
List all non-retired person attribute types.
List all non-retired person attribute types
GET /personattributetype?q=race&v=default
Success Response
{
"results": [
{
"uuid": "8d871386-c2cc-11de-8d13-0010c6dffd0f",
"display": "Race",
"name": "Race",
"description": "Group of persons related by common descent or heredity",
"format": "java.lang.String",
"foreignKey": 0,
"sortWeight": 6.0,
"searchable": false,
"editPrivilege": null,
"retired": false,
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/personattributetype/8d871386-c2cc-11de-8d13-0010c6dffd0f"
},
{
"rel": "full",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/personattributetype/8d871386-c2cc-11de-8d13-0010c6dffd0f?v=full"
}
],
"resourceVersion": "1.8"
}
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/personattributetype?q=race&v=default")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/personattributetype?q=race&v=default", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Quickly filter person attribute types with a given search query. If the request is not authenticated or the authenticated user does not have appropriate permissions, a
401 Unauthorized
status is returned.Query Parameters
Parameter Type Description q Search Query
Query to filter person attributes by its name(partial search is not supported)
Get person attribute type by UUID.
Get person attribute type by UUID
GET /personattributetype/:target_person_attribute_type_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/personattributetype/8d871386-c2cc-11de-8d13-0010c6dffd0f")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/personattributetype/8d871386-c2cc-11de-8d13-0010c6dffd0f", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a person attribute type by its UUID. Returns a
404 Not Found
status if the person attribute type does not exist. If the user not logged in to perform this action, a401 Unauthorized
status is returned.
Create a person attribute type
Create a person attribute type
POST /personattributetype
{
"name": "Edit Civil Status",
"description": "Able to manage the civil status of persons",
"format": "org.rwe-web.Concept",
"foreignKey": 1054,
"searchable": false,
"editPrivilege": "24635eec-dd5a-11e6-9d9c-0242ac150002"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Edit Civil Status\",\r\n \"description\": \"Able to manage the civil status of persons\",\r\n \"format\": \"org.rwe-web.Concept\",\r\n \"foreignKey\": 1054,\r\n \"searchable\": false,\r\n \"editPrivilege\": \"24635eec-dd5a-11e6-9d9c-0242ac150002\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/personattributetype")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=F8F836D691AB75C7845C6B658D0018E2")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=F8F836D691AB75C7845C6B658D0018E2");
var raw = JSON.stringify({"name":"Edit Civil Status","description":"Able to manage the civil status of persons","format":"org.rwe-web.Concept","foreignKey":1054,"searchable":false,"editPrivilege":"24635eec-dd5a-11e6-9d9c-0242ac150002"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/personattributetype", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
To Create a person attribute type you need to specify below attributes in the request body. If the user is not logged in to perform this action, a
401 Unauthorized
status is returned.Attributes
Parameter Type Description name String
Name of the person attribute type (Required) description String
Description (Required) format Java Class
The Java class the PersonAttributeType foreignKey Number
The internal identifier (foreign key) to a Concept that defines the possible values for this attribute sortWeight Number
The order this PersonAttributeType will appear in when searched searchable Boolean
True if this person attributes should be used to find patients. The default value is false. editPrivilege Privilege
The privilege required to make changes to this type,we can pass in UUID
of an existing privilege or pass in whole new privilege object.
Update a person attribute type
Update a person attribute type
POST /personattributetype
{
"name": "Manage Civil Status"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Manage Civil Status\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/personattributetype/aa7569c5-f81f-4e63-ab1f-810103f297ba")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=F8F836D691AB75C7845C6B658D0018E2")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=F8F836D691AB75C7845C6B658D0018E2");
var raw = JSON.stringify({"name":"Manage Civil Status"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/personattributetype/aa7569c5-f81f-4e63-ab1f-810103f297ba", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
Update a target person attribute type with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if the person attribute does not exist. If the user is not logged in to perform this action, a401 Unauthorized
status is returned.Attributes
Parameter Type Description name String
Name of the person attribute type (Required) description String
Description (Required) format Java Class
The Java class the PersonAttributeType foreignKey Number
The internal identifier (foreign key) to a Concept that defines the possible values for this attribute sortWeight Number
The order this PersonAttributeType will appear in when searched searchable Boolean
True if this person attributes should be used to find patients. The default value is false. editPrivilege Privilege
The privilege required to make changes to this type,we can pass in UUID
of an existing privilege or pass in whole new privilege object.
Delete a person attribute type
Delete a person attribute type
DELETE /personattributetype/:target_person_attribute_type_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/personattributetype/8d8718c2-c2cc-11de-8d13-0010c6dffd0f?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=1A5193DBE052C38DC303BAD947A05A83");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/personattributetype/8d8718c2-c2cc-11de-8d13-0010c6dffd0f?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Delete or Retire a person attribute type by its UUID. Returns a
404 Not Found
status if the person attribute type does not exist. If the user is not logged in to perform this action, a401 Unauthorized
status is returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be retired unless purge = ‘true’.Purging will attempt to remove the attribute type from the system irreversibly. Attribute types that have been used (i.e., are referenced from existing data) cannot be purged.
Patients
Patients Overview
Anyone who receives care in RWE Box must be a Patient.
Every Patient must have at least one Identifier, which is explained below. (for example, Anyone who has an Encounter or who is enrolled in a Program is a Patient.)
A Patient is also a Person, meaning they must have at least one name, and they may have addresses.
Subresource types of Patient
PatientIdentifier (Identifier)
- A PatientIdentifier is a medical record number assigned by your facility, used to identify and re-identify the patient on subsequent visits.
Allergy
- RWE Box lets you manually maintain an Allergy List for a patient, including the allergen, reaction, severity, etc.
Available operations for Patients
- List Patients
- Create a patient record
- Update a patient record
- Delete a patient record
- List patientIdentifier sub resource
- Create patientIdentifier sub resource with properties
- Update patientIdentifier sub resource
- Delete patientIdentifier sub resource
- List allergy sub resource
- Create allergy sub resource with properties
- Update allergy sub resource
- Delete allergy sub resource
Search patients
Search patients
GET /patient?
country=india
&gender=M
Fetch all non-retired patients that match any specified parameters otherwise fetch all non-retired patients. Returns a 200 OK
status with the patient response.
Query Parameters
Parameter | Description |
---|---|
matchSimilar | use this parameter to enter anything to match |
country | Country where the patient is registered |
birthDate | must be used with matchSimilar |
Gender | Gender of the patient |
city | City where the patient is registered |
address | Address of the patients |
familyName | must be used with matchSimilar |
middleName | must be used with matchSimilar |
postalCode | must be used with matchSimilar |
givenname | must be used with matchSimilar |
state | must be used with matchSimilar |
List patient by UUID.
GET /patient/:target_patient_uuid
Retrieve a patient by its UUID. Returns a 404 Not Found
status if patient does not exist in the system. If the user is not logged in to perform this action, a 401 Unauthorized
status is returned.
Create a patient
POST /patient
{
"person": "uuid",
"identifiers": [
{
"identifier": "string",
"identifierType": "uuid",
"location": "uuid",
"preferred": true
}
]
}
To create a patient you need to specify the below properties in the request. If you are not logged in to perform this action, a
401 Unauthorized
status is returned.Properties
Parameter Type Description person PERSON_UUID
Person resource UUID identifiers Array[]: Identifiers
List of patientIdentifiers
Update a patient
POST /patient/:target_patient_uuid
-d modified_patient_object
Update a target patient with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if patient not exists. If the user is not logged in to perform this action, a401 Unauthorized status returned
.Query Parameters
Parameter Type Description uuid target_patient_uuid
Target patient resource UUID Properties
Parameter Type Description resource Patient
Patient resource with updated properties
Delete a patient
DELETE /patient/:target_patient_uuid?purge=true
Delete or retire a target patient by its UUID. Returns a
404 Not Found
status if patient not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description uuid String
uuid to delete purge Boolean
The resource will be voided/retired unless purge = 'true'
List patientIdentifier sub resources
List patientIdentifier sub resources
GET /patient/:target_patient_uuid/identifier
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/patient/e739808f-f166-42ae-aaf3-8b3e8fa13fda/identifier")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/patient/e739808f-f166-42ae-aaf3-8b3e8fa13fda/identifier", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"display": "RWE Box ID = 1001W2",
"uuid": "a122f3ce-4039-4f8c-9d6f-3faf64c7cb69",
"identifier": "1001W2",
"identifierType": {
"uuid": "05a29f94-c0ed-11e2-94be-8c13b969e334",
"display": "RWE Box ID",
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/patientidentifiertype/05a29f94-c0ed-11e2-94be-8c13b969e334",
"resourceAlias": "patientidentifiertype"
}
]
},
"location": {
"uuid": "8d6c993e-c2cc-11de-8d13-0010c6dffd0f",
"display": "Unknown Location",
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/location/8d6c993e-c2cc-11de-8d13-0010c6dffd0f",
"resourceAlias": "location"
}
]
},
"preferred": true,
"voided": false,
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/patient/e739808f-f166-42ae-aaf3-8b3e8fa13fda/identifier/a122f3ce-4039-4f8c-9d6f-3faf64c7cb69",
"resourceAlias": "identifier"
},
{
"rel": "full",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/patient/e739808f-f166-42ae-aaf3-8b3e8fa13fda/identifier/a122f3ce-4039-4f8c-9d6f-3faf64c7cb69?v=full",
"resourceAlias": "identifier"
}
],
"resourceVersion": "1.8"
}
]
}
- Retrieve all identifier sub resources of a patient resource by
target_patient_uuid
.Returns a404 Not Found
status if patientIdentifier not exists. If user not logged in to perform this action, a401 unauthorized
status returned.
List patientIdentifier sub resource by it's UUID and parent patient UUID.
List patientIdentifier sub resource by it's UUID
GET /patient/:target_patient_uuid/identifier/:target_identifier_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/patient/e739808f-f166-42ae-aaf3-8b3e8fa13fda/identifier/a122f3ce-4039-4f8c-9d6f-3faf64c7cb69")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/patient/e739808f-f166-42ae-aaf3-8b3e8fa13fda/identifier/a122f3ce-4039-4f8c-9d6f-3faf64c7cb69", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a patientIdentifier sub resources of a patient resource. Returns a
404 Not Found
status if patientIdentifier not exists. If you are not logged in to perform this action, a401 Unauthorized
status returned.
Create a patientIdentifier sub resource with properties
Create a patientIdentifier sub resource
POST patient/:target_patient_uuid/identifier
{
"identifier" : "111:CLINIC1",
"identifierType" : "a5d38e09-efcb-4d91-a526-50ce1ba5011a",
"location" : "8d6c993e-c2cc-11de-8d13-0010c6dffd0f",
"preferred" : true
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"identifier\" : \"111:CLINIC1\",\r\n \"identifierType\" : \"a5d38e09-efcb-4d91-a526-50ce1ba5011a\",\r\n \"location\" : \"8d6c993e-c2cc-11de-8d13-0010c6dffd0f\",\r\n \"preferred\" : true\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/patient/e739808f-f166-42ae-aaf3-8b3e8fa13fda/identifier/")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010");
var raw = JSON.stringify({"identifier":"111:CLINIC1","identifierType":"a5d38e09-efcb-4d91-a526-50ce1ba5011a","location":"8d6c993e-c2cc-11de-8d13-0010c6dffd0f","preferred":true});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/patient/e739808f-f166-42ae-aaf3-8b3e8fa13fda/identifier/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To create a patientIdentifier subresource for a specific patient resource you need to specify below properties in your request body.
If the user is not logged in to perform this action, a
401 Unauthorized
status returned.
Properties
Parameter | type | Description |
---|---|---|
identifier | String |
value of the identifier (Required) |
identifierType | Identifier_Type_UUID |
Create identifier from this Identifier_type (Required) |
location | Location UUID |
Get patients for this location |
preferred | boolean |
preferred/not preferred identifier |
Update patientIdentifier sub resource with properties
Update patientIdentifier sub resource
POST patient/:target_patient_uuid/identifier/:target_identifier_uuid
{
"identifier" : "111:CLINIC2",
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"identifier\" : \"111:CLINIC2\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/patient/e739808f-f166-42ae-aaf3-8b3e8fa13fda/identifier/beb6be1f-07a3-484c-a4ff-92fcb566ddde")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010");
var raw = JSON.stringify({"identifier":"111:CLINIC2"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/patient/e739808f-f166-42ae-aaf3-8b3e8fa13fda/identifier/beb6be1f-07a3-484c-a4ff-92fcb566ddde", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Updates an patientIdentifier subresource value with given UUID, this method will only modify value of the subresource. Returns a
404 Not Found
status if attribute not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.
Properties
Parameter | Type | Description |
---|---|---|
identifier | String |
updated value of the identifier |
identifierType | Identifier_Type_UUID |
Create identifier from this Identifier_type |
location | Location UUID |
updated location |
preferred | boolean |
updated status of preferred/not preferred identifier |
Delete patientIdentifier sub resource with properties
Delete patientIdentifier sub resource
DELETE /patient/:target_patient_uuid/identifier/:target_identifier_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/patient/c7ea5ea9-bec7-4ad0-a803-0ef2dee8fca5/identifier/e5ce3659-9118-4912-8c2f-6d470c2c7940?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010");
var requestOptions = {
method: 'DELETE',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/patient/c7ea5ea9-bec7-4ad0-a803-0ef2dee8fca5/identifier/e5ce3659-9118-4912-8c2f-6d470c2c7940?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Delete or retire a target identifier subresource by its UUID. Returns a
404 Not Found
status if attribute not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’
List allergy subresources
GET /patient/:target_patient_uuid/allergy/:target_allergy_uuid
List allergy subresource by its UUID and parent patient UUID.
Retrieve a allergy sub resources of a patient resource. Returns a
404 Not Found
status if allergy not exists. If you are not logged in to perform this action, a401 Unauthorized
status returned.
Create a allergy sub resource with properties
POST patient/:target_patient_uuid/allergy
{
"allergen": {},
"severity": {
"uuid": "string"
},
"comment": "string",
"reactions": [
{
"allergy": {
"uuid": "string"
},
"reaction": {
"uuid": "string"
}
}
]
}
To create an allergy subresource for a specific patient resource, you need to specify below properties in your request body. If the user is not logged in to perform this action, a
401 Unauthorized
status returned.Query parameter
Parameter Description target_patient_uuid
patient resource uuid Properties for resource
Parameter type Description allergen String
value of the allergen severity Severity_UUID
Severity uuid comment String
comment for the allergy allergy allergy_UUID
allergy uuid reaction reaction_UUID
reaction uuid
Update allergy sub resource with properties
POST patient/:target_patient_uuid/allergy/:target_allergy_uuid
{
"allergen": {},
"severity": {
"uuid": "string"
},
"comment": "string",
"reactions": [
{
"allergy": {
"uuid": "string"
},
"reaction": {
"uuid": "string"
}
}
]
}
Updates an allergy subresource value with given UUID, this method will only modify value of the subresource. Returns a
404 Not Found
status if property not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.Query parameter
Parameter Description target_patient_uuid
patient resource uuid target_allergy_uuid
allergy resource uuid Properties for resource
Parameter type Description allergen String
value of the allergen severity Severity_UUID
Severity uuid comment String
comment for the allergy allergy allergy_UUID
allergy uuid reaction reaction_UUID
reaction uuid
Delete allergy sub resource with properties
DELETE /patient/:target_patient_uuid/allergy/:target_allergy_uuid
Delete or retire a target allergy subresource by its UUID. Returns a
404 Not Found
status if attribute not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’
Patient Identifier Type
Patient Identifier Type Overview
Administrators define what types of identifiers they will collect. These range from National ID numbers, to driver's license numbers, to per-hospital medical record numbers.
Available operations for PatientIdentifierType
- List PatientIdentifierType resources
- Create a patientIdentifierType record
- Update a patientIdentifierType record
- Delete a patientIdentifierType record
List PatientIdentifierType resource
List PatientIdentifierType resource
GET /patientidentifiertype?v=default&limit=1
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/patientidentifiertype?v=default&limit=1")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/patientidentifiertype?v=default&limit=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"uuid": "05a29f94-c0ed-11e2-94be-8c13b969e334",
"display": "RWE Box ID",
"name": "RWE Box ID",
"description": "RWE Box patient identifier, with check-digit",
"format": null,
"formatDescription": null,
"required": true,
"validator": "org.rwe-web.module.idgen.validator.LuhnMod30IdentifierValidator",
"locationBehavior": null,
"uniquenessBehavior": null,
"retired": false,
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/patientidentifiertype/05a29f94-c0ed-11e2-94be-8c13b969e334",
"resourceAlias": "patientidentifiertype"
},
{
"rel": "full",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/patientidentifiertype/05a29f94-c0ed-11e2-94be-8c13b969e334?v=full",
"resourceAlias": "patientidentifiertype"
}
],
"resourceVersion": "2.0"
}
],
"links": [
{
"rel": "next",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/patientidentifiertype?limit=1&v=default&startIndex=1",
"resourceAlias": null
}
]
}
- Fetch all non-retired patientIdentifierTypes resources that match any specified parameters otherwise fetch all non-retired patients. Returns a
200 OK
status with the patientIdentifierType response. If the user is not logged in a401 Unauthorized
status is returned.
Get patientIdentifierType by UUID.
Get patientIdentifierType by UUID
GET /patientidentifiertype/:target_patientIdentifierType_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/patientidentifiertype/05a29f94-c0ed-11e2-94be-8c13b969e334")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=ED9DBD5CFD355A973EFFECD642D8331D");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/patientidentifiertype/05a29f94-c0ed-11e2-94be-8c13b969e334", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a patientIdentifierType by its UUID. Returns a
404 Not Found
status if patientIdentifierType does not exist in the system. If the user is not logged in to perform this action, a401 Unauthorized
status is returned.
Create a patientIdentifierType
Create a patientIdentifierType
POST /patientidentifiertype
{
"name": "Wilson Hosp MRN",
"description": "Wilson Hospital Medical Record Number",
"format": "\\d{1,10}-\\d",
"formatDescription": "Up to ten digts followed by a hyphen and another digit",
"required": false,
"validator": "org.rwe-web.patient.impl.LuhnIdentifierValidator",
"locationBehavior": "NOT_USED",
"uniquenessBehavior": null
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Wilson Hosp MRN\",\r\n \"description\": \"Wilson Hospital Medical Record Number\",\r\n \"format\": \"\\\\d{1,10}-\\\\d\",\r\n \"formatDescription\": \"Up to ten digts followed by a hyphen and another digit\",\r\n \"required\": false,\r\n \"validator\": \"org.rwe-web.patient.impl.LuhnIdentifierValidator\",\r\n \"locationBehavior\": \"NOT_USED\",\r\n \"uniquenessBehavior\": null\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/patientidentifiertype")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010")
.build();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010");
var raw = JSON.stringify({"name":"Wilson Hosp MRN","description":"Wilson Hospital Medical Record Number","format":"\\d{1,10}-\\d","formatDescription":"Up to ten digts followed by a hyphen and another digit","required":false,"validator":"org.rwe-web.patient.impl.LuhnIdentifierValidator","locationBehavior":"NOT_USED","uniquenessBehavior":null});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/patientidentifiertype", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To create a patientIdentifierType you need to specify the below properties in the request. If you are not logged in to perform this action, a
401 Unauthorized
status is returned.
Properties
Parameter | Type | Description |
---|---|---|
name | string | label for the identifier (Required) |
description | string | a small description about the patientIdentifier |
format | string | a regular expression defining what the identifier text should contain |
formatDescription | string | an optional description of the regular expression,(used to explain the requirements of the regular expression in terms a user would understand). For example, a regular expression like \d{4,8} could have a description like "Must be a number between 4 and 8 digits in length." |
required | boolean | a true/false whether every patient must have this type |
validator | string | full class name of an IdentifierValidator (e.g., org.rwe-web.patient.impl.LuhnIdentifierValidator ) |
locationBehavior | "REQUIRED" or "NOT USED" | behavior of the location with respect to the identifier,"REQUIRED" if a location must be associated with the identifier; "NOT_USED" if the identifier does require a location
uniquenessBehavior | string | specify the uniqueness of the behaviour, it can be either Unique, Non Unique or Location.
Update a patientIdentifierType
Update a patientIdentifierType
POST /patientidentifertype/:target_patientidentifiertype_uuid
{
"format": "\\d{1,10}-",
"formatDescription": "Up to ten digts followed by a hyphen"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"format\": \"\\\\d{1,10}-\",\r\n \"formatDescription\": \"Up to ten digts followed by a hyphen\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/patientidentifiertype/05a29f94-c0ed-11e2-94be-8c13b969e334")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010");
var raw = JSON.stringify({"format":"\\d{1,10}-","formatDescription":"Up to ten digts followed by a hyphen"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/patientidentifiertype/05a29f94-c0ed-11e2-94be-8c13b969e334", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Update a target patientIdentifierType with given UUID, this method only modifies properties in the request.
Returns a
404 Not Found
status if patientIdentifierType not exists. If user not logged in to perform this action, a401 Unauthorized status returned
.
Delete a patientIdentifierType
Delete a patientIdentifierType
DELETE /patientidentifiertype/:target_patientidentifiertype_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/patientidentifiertype/05a29f94-c0ed-11e2-94be-8c13b969e334?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=33B84B3BEA8E81E9D22D5A722815E010");
var requestOptions = {
method: 'DELETE',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/patientidentifiertype/05a29f94-c0ed-11e2-94be-8c13b969e334?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Delete or retire a target patientIdentifierType by its UUID. Returns a
404 Not Found
status if patientIdentifierType not exists. If user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be retired unless purge = 'true'
Patient Activity
Patient Activity Overview
A Patient Activity is a person who provides care or services to patients. A patientActivity may be a clinician like a doctor or a nurse, a social worker, or a lab tech. Generally speaking, any healthcare worker that a patient can have an encounter with is a patientActivity.
Patient Activity may have full records in RWE Box as persons, or they may just be a simple name and ID number.
Available operations for Patient Activity.
List patientActivitys
List all non-retired patientActivitys.
Quickly filter patientActivitys with given query parameters. Returns a
404 Not Found
status if patientActivity not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description lastDaysStr String
Last days data. beginDateCreatedStr String
Begin date created yyyy-MM-dd 00:00:00. endDateCreatedStr String
End date created yyyy-MM-dd 23:59:59.
POST /ws/rest/v1/patientActivity
{
"beginDateCreatedStr": '2018-10-01 00:00:00',
"endDateCreatedStr": '2018-10-21 23:59:59'
}
Query patientActivity by UUID.
Retrieve a patientActivity by its UUID. Returns a
404 Not Found
status if patientActivity not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.
GET /ws/rest/v1/patientActivity/{uuid}
Update patientActivities
Update a patientActivity using its UUID
Update a target patientActivity with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if the patientActivity does not exist. If not logged in to perform this action, a401 Unauthorized
status is returned.Attributes
Parameter Type Description sourceStr Int
Step data source, android: 0, IOS: 1. activityList Collection<Activity>
Step activity list.
POST /ws/rest/v1/patientActivity/{uuid}
{
"sourceStr": 1,
"food":[
{
"date": '2018-10-22',
"steps": 232,
"isForceUpdate": true
},
{
"date": '2018-10-23',
"steps": 666,
"isForceUpdate": false
}
]
}
Visits
Visits Overview
A Visit in RWE Box represents precisely what it sounds like: a time when a patient is actively interacting with the the healthcare system, typically at a location.
The metadata differentiating different types of visits is a Visit Type. Visit Types displayed in the user interface, also can be searched against.
A visit contains encounters, which store more granular data about treatments or services.
Let's look at an example of Visits
At the Amani Clinic, a patient might typically check-in at registration, be seen by a doctor, and receives medication dispensed in the pharmacy. This would be recorded as one visit of visit type of Outpatient , and contain three encounters (Registration, Consultation, and Dispensing) .
Visits Sub Resource types
Visits Attribute
If you wish to record extra information about visits, you can create Visit Attributes and assign them to Visit Types.
Visit attributes exists specifically to allow implementations to extend the data model.
Available operations for Visits
- List visits
- Create visit
- Update visit
- Delete visit
- List attribute subresource
- Create attribute subresource with properties
- Update attribute subresource
- Delete attribute subresource
List visits
GET /visit?
includeInactive=true
&fromStartDate=2016-10-08T04:09:23.000Z
&patient=target_patient_uuid
&location=target_location_uuid
List all non-retired visits.
Quickly filter visits with given query parameters. Returns a
404 Not Found
status if visit not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
patient | Patient UUID |
Get visits for this patient |
location | Location UUID |
Get visits for this location |
includeInactive | Boolean |
Active/Inactive status of visit |
fromStartDate | Date (ISO8601 Long) |
Start date of the visit |
GET /visit/:target_visit_uuid
List visit by UUID.
Retrieve a visit by its UUID. Returns a
404 Not Found
status if visit not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.
Create visit
POST /visit
{
"patient": "target_patient_uuid",
"visitType": "target_visitType_uuid",
"startDatetime": "2016-10-08T04:09:25.000Z",
"location": "target_location_uuid",
"indication": null,
"encounters": [
"target_encounter_uuid"
],
"attributes": [
{
"attributeType": "target_attributeType_uuid",
"value": "value_for_attribute"
}
]
}
To Create a visit you need to specify below attributes in the request body. If you are not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description patient Patient UUID
Patient resource UUID visitType Patient UUID
Visit type resource UUID startDatetime Date (ISO8601 Long)
Start date of the visit location Location UUID
Location resource UUID indication string
Any indication of the visit stopDatetime Date (ISO8601 Long)
End date of the vist encounters Array[]: Encounter UUID
Encounter resources UUID attributes Array[]: Attribute
List of visit attributes
Update visit
POST /visit/:target_visit_uuid
-d modified_visit_object
Update a target visit with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if visit not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description uuid target_visit_uuid
Target visit resource UUID Attributes
Parameter Type Description resource Visit
Visit resource with updated properties.
Delete visit
DELETE /visit/:target_visit_uuid?purge=true
Delete or Retire a target visit by its UUID. Returns a
404 Not Found
status if visit not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’
List attribute subresources
GET /visit/:target_visit_uuid/attribute
List all attribute subresources for a visit.
Retrieve all attribute sub resources of a visit resource by target_visit_uuid.Returns a
404 Not Found
status if attribute not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.console GET /visit/:target_visit_uuid/attribute/:target_attribute_uuid
List attribute subresources by it's UUID and parent visit UUID.
Retrieve an attribute sub resources of a visit resource.Returns a
404 Not Found
status if attribute not exists. If you are not logged in to perform this action, a401 Unauthorized
status returned.
Create an attribute subresource with properties
POST visit/:target_visit_uuid/attribute
{
"attributeType": "target_attribute_type_uuid",
"value": "value_for_the_attriute"
}
To Create an attribute subresource for a specific visit resource, you need to specify below attributes in the request body. If the user is not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description attributeType Attribute_Type UUID
Create Attribute from this Attribute_Type value Depends on Attribute_Type Selected
Value for the attribute
Update attribute subresource
POST visit/:target_visit_uuid/attribute/:target_attribute_uuid
{
"attributeType": "target_attribute_type_uuid",
"value": "modified_attriute_value"
}
Updates an attribute subresource value with given UUID, this method will only modify the value of the subresource. Returns a
404 Not Found
status if attribute not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.Attributes
Parameter Type Description attributeType Attribute_Type UUID
Attribute_Type resource UUID updated value Depends on Attribute_Type Selected
Updated value for the attribute
Delete attribute subresource
DELETE /visit/:target_visit_uuid/attribute/:target_attribute_uuid
Delete or Retire a target attribute subresource by its UUID. Returns a
404 Not Found
status if attribute not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’
Visits Type
Visits Type Overview
A Visit Type is a name and description of a kind of visit.
Every visit has a type. You should create visit types that match how your health site classifies visits, such as "Outpatient," "Hospitalization," "Dental," "Patient Education," or "TB Clinic.".
It is mandatory to set up at least one visit type.
Visit types will be shown as dropdown options when creating or editing a patient in Registration.
Visit types can be added via the RWE Box admin screen(Administration > Visits > Manage Visit Types) or via SQL scripts.
Available operations for Visits Type
list visits types
list visits types
GET /visittype?q=Facility&v=full
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/visittype?q=Facility&v=full")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/visittype?q=Facility&v=full", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"uuid": "7b0f5697-27e3-40c4-8bae-f4049abfb4ed",
"display": "Facility Visit",
"name": "Facility Visit",
"description": "Patient visits the clinic/hospital (as opposed to a home visit, or telephone contact)",
"retired": false,
"auditInfo": {
"creator": {
"uuid": "A4F30A1B-5EB9-11DF-A648-37A07F9C90FB",
"display": "daemon",
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/user/A4F30A1B-5EB9-11DF-A648-37A07F9C90FB",
"resourceAlias": "user"
}
]
},
"dateCreated": "2013-08-02T00:39:43.000+0000",
"changedBy": {
"uuid": "A4F30A1B-5EB9-11DF-A648-37A07F9C90FB",
"display": "daemon",
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/user/A4F30A1B-5EB9-11DF-A648-37A07F9C90FB",
"resourceAlias": "user"
}
]
},
"dateChanged": "2017-01-18T08:53:57.000+0000"
},
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/visittype/7b0f5697-27e3-40c4-8bae-f4049abfb4ed",
"resourceAlias": "visittype"
}
],
"resourceVersion": "1.9"
}
]
}
- Quickly filter visit types with a given search query. Returns a
404 Not Found
status if visit type not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
q | Search Query |
Display Name of Visit Type. |
List visit type by UUID.
List visit type by UUID
GET /visittype/:target_visit_type_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/visittype/7b0f5697-27e3-40c4-8bae-f4049abfb4ed")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/visittype/7b0f5697-27e3-40c4-8bae-f4049abfb4ed", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a visit type by its UUID. Returns a
404 Not Found
status if visit type not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.
Create a visit type
Create a visit type
POST /visittype
{
"name": "Facility Visit",
"description": "Patient visits the clinic/hospital (as opposed to a home visit, or telephone contact)"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Facility Visit\",\r\n \"description\": \"Patient visits the clinic/hospital (as opposed to a home visit, or telephone contact)\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/visittype")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C");
var raw = JSON.stringify({"name":"Facility Visit","description":"Patient visits the clinic/hospital (as opposed to a home visit, or telephone contact)"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/visittype", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
To Create a visit type, you need to specify below attributes in the request body. If you are not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description name String
Name of the visit type (Required) description String
Description of the visit type
Update a visit type
Update a visit type
POST /type/:target_visit_type_uuid
{
"name": "Facility Visit",
"description": "Modified description"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Facility Visit\",\r\n \"description\": \"Modified description\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/visittype/62e364c3-8eb0-46e9-b420-9463a4efdcc9")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C");
var raw = JSON.stringify({"name":"Facility Visit","description":"Modified description"});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/visittype/62e364c3-8eb0-46e9-b420-9463a4efdcc9", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Update a target visit type with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if visit not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.
Attributes
Parameter | Type | Description |
---|---|---|
name | String |
Name of the visit type |
description | Patient UUID |
Visit type resource UUID |
Delete a visit type
Delete a visit type
DELETE /visittype/:target_visit_type_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/visittype/62e364c3-8eb0-46e9-b420-9463a4efdcc9?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C");
var requestOptions = {
method: 'DELETE',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/visittype/62e364c3-8eb0-46e9-b420-9463a4efdcc9?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Delete or Retire a target visit type by its UUID. Returns a
404 Not Found
status if visit not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’
Visits Attribute Type
Visits Attribute Type Overview
If you wish to record extra information about visits, you can create Visit Attributes and assign them to Visit Types.
For example, you might create attributes for "Followup Visit," or "Distance Patient Traveled."
Available operations for Visits Attribute Type
- List visits attribute types
- Create a visit attribute type
- Update a visit attribute type
- Delete a visit attribute type
List visits attribute types
List visits attribute types
GET /visitattributetype?q=Patient&v=full
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/visitattributetype?q=Patient&v=full")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/visitattributetype?q=Patient&v=full", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"uuid": "19a9de73-4d0f-48e4-be7b-b35fe0f8586d",
"display": "Patient condition",
"name": "Patient condition",
"description": "This attribute type will record the health conditon of the patient",
"minOccurs": 0,
"maxOccurs": 1,
"datatypeClassname": "org.rwe-web.customdatatype.datatype.LongFreeTextDatatype",
"datatypeConfig": "default",
"preferredHandlerClassname": "org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler",
"handlerConfig": null,
"retired": false,
"auditInfo": {
"creator": {
"uuid": "45ce6c2e-dd5a-11e6-9d9c-0242ac150002",
"display": "admin",
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/user/45ce6c2e-dd5a-11e6-9d9c-0242ac150002",
"resourceAlias": "user"
}
]
},
"dateCreated": "2020-10-31T19:25:30.000+0000",
"changedBy": null,
"dateChanged": null
},
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/visitattributetype/19a9de73-4d0f-48e4-be7b-b35fe0f8586d",
"resourceAlias": "visitattributetype"
}
],
"resourceVersion": "1.9"
}
]
}
- Quickly filter visit attribute types with a given search query. Returns a
404 Not Found
status if the visit attribute type not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
q | Search Query |
Display Name of Visit attribute type. |
List visit attribute type by UUID
List visit attribute type by UUID
GET /visitattributetype/:target_visit_attribute_type_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/visitattributetype/19a9de73-4d0f-48e4-be7b-b35fe0f8586d")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C");
var requestOptions = {
method: 'GET',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/visitattributetype/19a9de73-4d0f-48e4-be7b-b35fe0f8586d", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a visit attribute type by its UUID. Returns a
404 Not Found
status if the visit attribute type not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.
Create a visit attribute type
Create a visit attribute type
POST /visitattributetype
{
"name": "Patient condition",
"description": "This attribute type will record the health conditon of the patient",
"datatypeClassname": "org.rwe-web.customdatatype.datatype.LongFreeTextDatatype",
"minOccurs": 0,
"maxOccurs": 1,
"datatypeConfig": "default",
"preferredHandlerClassname": "org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler",
"handlerConfig": null
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Patient condition\",\r\n \"description\": \"This attribute type will record the health conditon of the patient\",\r\n \"datatypeClassname\": \"org.rwe-web.customdatatype.datatype.LongFreeTextDatatype\",\r\n \"minOccurs\": 0,\r\n \"maxOccurs\": 1,\r\n \"datatypeConfig\": \"default\",\r\n \"preferredHandlerClassname\": \"org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler\",\r\n \"handlerConfig\": null\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/visitattributetype")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C");
var raw = JSON.stringify({"name":"Patient condition","description":"This attribute type will record the health conditon of the patient","datatypeClassname":"org.rwe-web.customdatatype.datatype.LongFreeTextDatatype","minOccurs":0,"maxOccurs":1,"datatypeConfig":"default","preferredHandlerClassname":"org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler","handlerConfig":null});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/visitattributetype", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
To Create a visit attribute type, you need to specify below attributes in the request body. If the user not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description name String
Name of the visit attribute type (Required) description String
Description (Required) datatypeClassname CustomDataType Resource
Data type for the attribute type resource.RWE Box provides Custom data type resource which gives flexibility to select the data type accordingly (Required) minOccurs Number
Minimum number of times this value can be specified for a single visit. Use 0
or1
as the default value (Required)maxOccurs Number
Maximum number of times this value can be specified for a single visit (e.g., use 1 to prevent an attribute from being added to a visit multiple times) preferredHandlerClassname Handler
Handler subresource for the Custom Data Type used. Can optionally define a specific handler class wants to use (otherwise the framework will choose the best handler for the chosen DataType).To find which handlers to use for the Custom DataType, please refer here datatypeConfig String
Allow the data type have any name and config it wants/needs. handlerConfig String
Allow the handler have any name and config it wants/needs. This will help to identify the data type unambiguously which has been contained and will allow introspecting
Update a visit attribute type
Update a visit attribute type
POST /visitattributetype/:target_visit_attribute_type_uuid
{
"name": "Patient condition modified",
"description": "This attribute type will keep a record the health conditon of the patient",
"minOccurs": 0,
"maxOccurs": 2
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Patient condition modified\",\r\n \"description\": \"This attribute type will keep a record the health conditon of the patient\",\r\n \"minOccurs\": 0,\r\n \"maxOccurs\": 2\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/visitattributetype/44bacae8-9563-40da-869d-35fcdd652a21")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Content-Type", "application/json");
requestHeaders.append("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C");
var raw = JSON.stringify({"name":"Patient condition modified","description":"This attribute type will keep a record the health conditon of the patient","minOccurs":0,"maxOccurs":2});
var requestOptions = {
method: 'POST',
headers: requestHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/visitattributetype/44bacae8-9563-40da-869d-35fcdd652a21", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Update a target visit attribute type with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if the visit attribute not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.
Attributes
Parameter | Type | Description |
---|---|---|
name | String |
Name of the visit attribute type |
description | String |
Description |
datatypeClassname | CustomDataType Resource |
Data type for the attribute type resource.RWE Box provides Custom data type resource which gives flexibility to select the data type accordingly |
minOccurs | Number |
Minimum number of times this value can be specified for a single visit. Use 0 or 1 as the default value |
maxOccurs | Number |
Maximum number of times this value can be specified for a single visit (e.g., use 1 to prevent an attribute from being added to a visit multiple times) |
preferredHandlerClassname | Handler |
Handler subresource for the Custom Data Type used. Can optionally define a specific handler class wants to use (otherwise the framework will choose the best handler for the chosen DataType ).To find which handlers to use for the Custom DataType, please refer here |
datatypeConfig | String |
Allow the data type have any name and config it wants/needs. |
handlerConfig | String |
Allow the handler have any name and config it wants/needs. This will help to identify the data type unambiguously which has been contained and will allow introspecting |
Delete a visit attribute type
Delete a visit attribute type
DELETE /visitattributetype/:target_visit_attribute_type_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/visitattributetype/44bacae8-9563-40da-869d-35fcdd652a21?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C")
.build();
Response response = client.newCall(request).execute();
var requestHeaders = new Headers();
requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
requestHeaders.append("Cookie", "JSESSIONID=1B06650EB0428F51EC119C909F58327C");
var requestOptions = {
method: 'DELETE',
headers: requestHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/visitattributetype/44bacae8-9563-40da-869d-35fcdd652a21?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or Retire a target visit attribute type by its UUID. Returns a
404 Not Found
status if the visit attribute type not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
purge | Boolean |
The resource will be voided/retired unless purge = ‘true’.Purging will attempt to remove the attribute type from the system irreversibly. Attribute types that have been used (i.e., are referenced from existing data) cannot be purged. |
Location
Location Overview
A Location is a physical place where a patient may be seen, such as a hospital, a room, a clinic, or a district.
Locations may have a hierarchy, such that each location may have one parent location.
Also a Location can have one or more Children location example Children's Ward might be a location within the location Amani Clinic.
You might also store physical areas (for example, Eastern Province, or California) as Locations.
You should not use locations to represent logical ideas like All-District Hospitals. They should be modeled using LocationTags.
Location Sub Resource types
Location Attribute.
If you wish to record extra information about location, you can create Location Attributes and assign them to Location Types.
Location attributes exists specifically to allow implementations to extend the data model.
Available operations for location
- List location
- Create a location
- Update a location
- Delete a location
- List location attribute subresource
- Create location attribute subresource with properties
- Update location attribute subresource
- Delete location attribute subresource
List location
GET /location?
q="amani"
List all non-retired locations`.
Quickly filter location with given query parameters. Returns a 404 Not Found
status if the location not exists. If the
user not logged in to perform this action, a 401 Unauthorized
status returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
q | Search Query |
Display Name of Location object. |
List location by UUID.
GET /location/:target_location_uuid
Retrieve a location by its UUID. Returns a 404 Not Found
status if the location not exists. If the user not logged
in to perform this action, a 401 Unauthorized
status returned.
Create a location
POST /location
{
"name": "Salzburg Hospital",
"description": "Salzburg hospital location",
"address1": "Mullner House 48",
"address2": "",
"cityVillage": "salzburg",
"stateProvince": "salzburg",
"country": "Austria",
"postalCode": "5020",
"latitude": "",
"longitude": "",
"countyDistrict": "salzburg",
"tags": [
"target_location_tag_uuid"
],
"parentLocation": "target_parent_location_uuid",
"childLocations": [
"target_child_location_uuid"
],
"attributes": [
{
"attributeType": "target_attributeType_uuid",
"value": "value_for_attribute"
}
]
}
To Create a location you need to specify below attributes in the request body. If the user not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description name String
Name of the location (Required) address1 String
Address of the location (Required) description String
Description cityVillage String
City/village stateProvince String
State and province country String
Country postalCode String
Postal code of the location latitude String
Latitude longitude String
Longitude countyDistrict String
District or Country tags Array[]: LocationTag UUID
UUID's of the location tags parentLocation Parent Location UUID
UUID of the target parent location childLocations Array[]: Child Location UUID
UUID's of the target child locations attributes Array[]: Attribute UUID
UUID's of location attributes
Update a location
POST /location/:target_location_uuid
{
"name": "Salzburg Hospital",
"description": "Modified location of Salzburg hospital location",
"address1": "Mullner House 48",
"address2": "",
"cityVillage": "salzburg",
"stateProvince": "salzburg",
"country": "Austria",
"postalCode": "5020",
"latitude": "47.811195",
"longitude": "13.03322",
"countyDistrict": "salzburg",
"tags": [
"target_location_tag_uuid"
],
"parentLocation": "target_parent_location_uuid",
"childLocations": [
"target_child_location_uuid"
],
"attributes": [
{
"attributeType": "target_attributeType_uuid",
"value": "value_for_attribute"
}
]
}
Update a target location with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if the location not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description uuid target_location_uuid
Target location resource UUID Attributes
Parameter Type Description name String
Name of the location (Required) address1 String
Address of the location (Required) description String
Description cityVillage String
City/village stateProvince String
State and province country String
Country postalCode String
Postal code of the location latitude String
Latitude longitude String
Longitude countyDistrict String
District or Country tags Array[]: LocationTag UUID
UUID's of the location tags parentLocation Parent Location UUID
UUID of the target parent location childLocations Array[]: Child Location UUID
UUID's of the target child locations attributes Array[]: Attribute UUID
UUID's of location attributes
Delete a location
DELETE /location/:target_location_uuid?purge=true
Delete or Retire a target location by its UUID. Returns a
404 Not Found
status if the location not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’
List location attribute subresources
List all location attribute subresources for a location.
GET /location/:target_location_uuid/attribute
Retrieve all attribute sub resources of a location resource by target_location_uuid.Returns a
404 Not Found
status if the attribute not exists. If the user not logged in to perform this action, a 401 Unauthorized
status
returned.
List location attribute subresources by own UUID and parent location UUID.
GET /location/:target_location_uuid/attribute/:target_attribute_uuid
Retrieve an attribute sub resources of a location resource.Returns a
404 Not Found
status if the attribute not exists. If the user are not logged in to perform this action, a 401 Unauthorized
status
returned.
Create a location attribute subresource with properties
POST location/:target_location_uuid/attribute
{
"attributeType": "target_location_attribute_type_uuid",
"value": "value_for_the_attriute"
}
To Create an attribute subresource for a specific location resource, you need to specify below attributes in the request body. If the user not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description attributeType Attribute_Type UUID
Create Attribute from this Location Attribute_Type value Depends on Attribute_Type Selected
Value for the attribute
Update a location attribute subresource
POST location/:target_location_uuid/attribute/:target_location_attribute_uuid
{
"attributeType": "target_attribute_type_uuid",
"value": "modified_attriute_value"
}
Updates a location attribute sub resource value with given UUID, this method will only modify the value of the subresource. Returns a
404 Not Found
status if the attribute not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.Attributes
Parameter Type Description attributeType Attribute_Type UUID
Location Attribute_Type resource UUID updated value Depends on Attribute_Type Selected
Updated value for the attribute
Delete a location attribute subresource
DELETE /location/:target_location_uuid/attribute/:target_location_attribute_uuid
Delete or Retire a target location attribute subresource by its UUID. Returns a
404 Not Found
status if the attribute not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’
Location Tag Type
Location Tag Overview
Tags are strings attached to an entity (like tagging of blog entries) to form a folksonomy and/or to categorize data.
Location Tags are being used to tag locations, which enables the system to act based on the presence of tags on specific locations.
You should not use locations to represent logical ideas like
All-District Hospitals
. They should be modeled using LocationTags.For example, location tags may be used to control which locations are included in a choice list or to define which locations included in a report.
Available operations for Location Tag
List location tags
List all non-retired location tags.
GET /locationtag?q="visit"
Quickly filter location tags with a given search query. Returns a 404 Not Found
status if the location tag not exists.
If the user not logged in to perform this action, a 401 Unauthorized
status returned.
### Query Parameters
Parameter | Type | Description |
---|---|---|
q | Search Query |
Display Name of Location location tag type. |
List location tag by UUID.
GET /locationtag/:target_location_tag_uuid
Retrieve a location tag by its UUID. Returns a 404 Not Found
status if the location tag type not exists. If the
user not logged in to perform this action, a 401 Unauthorized
status returned.
Create a location tag
POST /locationtag
{
"name": "Visit Location",
"description": "Visits are only allowed to happen at locations tagged with this location tag.",
"retired": false
}
To Create a location tag, you need to specify below attributes in the request body. If the user not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description name String
Name of the location tag (Required) description String
Description (Required) retired Boolean
Retired status of the location tag retiredReason String
For location tags that are retired, this may contain an explanation of why the location tag was retired.
Update a location tag
POST /locationtag/:target_location_tag_uuid
{
"name": "Visit Location",
"description": "Visits are only allowed to happen at locations tagged with this location tag.",
"retired": true,
"retiredReason": "Not valid anymore"
}
Update a target location tag with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if the location tag not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description uuid target_location_tag_uuid
Target location tag resource UUID Attributes
Parameter Type Description name String
Name of the location tag type (Required) description String
Description (Required) retired Boolean
Retired status of the location tag retiredReason String
For location tags that are retired, this may contain an explanation of why the location tag was retired.
Delete a location tag
DELETE /locationtag/:target_location_tag_uuid?purge=true
Delete or Retire a target location tag type by its UUID. Returns a
404 Not Found
status if the location tag not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’. Purging will attempt to remove the tag from the system irreversibly. Location tags types that have been used (i.e., are referenced from existing data) cannot be purged.
Location Attribute Type
Location Attribute Overview
- If you wish to record extra information about locations, you can create Location Attributes and assign them to Location Types.
Available operations for Location Attribute
- List location attribute types
- Create a location attribute type
- Update a location attribute type
- Delete a location attribute type
List location attribute types
List all non-retired location attribute types.
GET /locationattributetype?q="humidity"
Quickly filter location attribute types with a given search query. Returns a 404 Not Found
status if the location attribute type not exists.
If the user not logged in to perform this action, a 401 Unauthorized
status returned.
### Query Parameters
Parameter | Type | Description |
---|---|---|
q | Search Query |
Display Name of Location attribute type. |
List location attribute type by UUID.
GET /locationattributetype/:target_location_attribute_type_uuid
Retrieve a location attribute type by its UUID. Returns a 404 Not Found
status if the location attribute type not exists. If the
user not logged in to perform this action, a 401 Unauthorized
status returned.
Create a location attribute type
POST /locationattributetype
{
"name": "humidity",
"description": "This attribute type will record the humidity of the location",
"datatypeClassname": "org.rwe-web.customdatatype.datatype.LongFreeTextDatatype",
"minOccurs": 0,
"maxOccurs": 1,
"datatypeConfig": "default",
"preferredHandlerClassname": "org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler",
"handlerConfig": "dafault"
}
To Create a location attribute type, you need to specify below attributes in the request body. If the user not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description name String
Name of the location attribute type (Required) description String
Description (Required) datatypeClassname CustomDataType Resource
Data type for the attribute type resource. RWE Box provides Custom data type resource which gives flexibility to select the data type accordingly (Required) minOccurs Number
Minimum number of times this value can be specified for a single location. Use 0
or1
as the default value (Required)maxOccurs Number
Maximum number of times this value can be specified for a single location (e.g., use 1 to prevent an attribute from being added to a location multiple times) preferredHandlerClassname Handler
Handler subresource for the Custom Data Type used. Can optionally define a specific handler class wants to use (otherwise the framework will choose the best handler for the chosen DataType,). To find which handlers to use for the Custom DataType, please refer here datatypeConfig String
Allow the data type have any name and config it wants/needs. handlerConfig String
Allow the handler have any name and config it wants/needs. This will help to identify the data type unambiguously which has been contained and will allow introspecting
Update a location attribute type
POST /locationattributetype/:target_location_attribute_type_uuid
{
"name": "humidity",
"description": "This attribute type will record the humidity of the location"",
"datatypeClassname": "org.rwe-web.customdatatype.datatype.LongFreeTextDatatype",
"minOccurs": 0,
"maxOccurs": 2,
"datatypeConfig": "default",
"preferredHandlerClassname": "org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler",
"handlerConfig": "dafault"
}
Update a target location attribute type with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if the location attribute not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description uuid target_location_attribute_type_uuid
Target location attribute type resource UUID Attributes
Parameter Type Description name String
Name of the location attribute type (Required) description String
Description (Required) datatypeClassname CustomDataType Resource
Data type for the attribute type resource. RWE Box provides Custom data type resource which gives flexibility to select the data type accordingly (Required) minOccurs Number
Minimum number of times this value can be specified for a single location. Use 0
or1
as the default value (Required)maxOccurs Number
Maximum number of times this value can be specified for a single location (e.g., use 1 to prevent an attribute from being added to a location multiple times) preferredHandlerClassname Handler
Handler subresource for the Custom Data Type used. Can optionally define a specific handler class want to use (otherwise the framework will choose the best handler for the chosen DataType). To find which handlers to use for the Custom DataType, please refer here datatypeConfig String
Allow the data type have any name and config it wants/needs. handlerConfig String
Allow the handler have any name and config it wants/needs. This will help to identify the data type unambiguously which has been contained and will allow introspecting
Delete a location attribute type
DELETE /locationattributetype/:target_location_attribute_type_uuid?purge=true
Delete or Retire a target location attribute type by its UUID. Returns a
404 Not Found
status if the location attribute type not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’. Purging will attempt to irreversibly remove the attribute type from the system. Attribute types that have been used (i.e., are referenced from existing data) cannot be purged.
Encounters
Encounter Overview
An encounter represents an interaction between a patient and the healthcare system at a single point in time. Common examples would be a patient seeing a doctor during a clinic visit, a patient going to the lab to have blood drawn for testing, or telephone call between a provider and the patient).
Each Encounter has an encounter type, date/time, location, and provider.
Encounters are classified into Encounter Types, which describe the type of interaction the Encounter represents – e.g., "HIV Initial", "Pediatric Follow Up", "Lab"). Implementations can define their own types of encounters.
One or more encounters may be grouped within a Visit (e.g., an outpatient clinic visit or a hospitalization).
Every Encounter can have 0 to n Observations associated with it.
Every Encounter can have 0 to n Orders associated with it.
Let's look at an example of Encounter
During a typical Amani Clinic Outpatient Visit, a patient checks in at registration is seen by a doctor and receives medicine dispensed in the pharmacy. This would be recorded as one visit containing three encounters, whose types are Registration, Consultation and Dispensing.
Sub Resource types of Encounter
Encounter Provider
A Provider is a person who provides care or services to patients.
A provider may be a clinician like a doctor or a nurse, a social worker, or a lab tech.
Any healthcare worker that a patient can have an encounter with is a provider.
Available operations for Encounter
- List encounters
- Create an encounter
- Update an encounter
- Delete an encounter
- List encounter provider sub resource
- Create encounter provider sub resource with properties
- Update encounter provider sub resource
- Delete encounter provider sub resource
List encounters
List all non-voided encounters.
GET /encounter?
patient=96be32d2-9367-4d1d-a285-79a5e5db12b8
&fromdate=2016-10-08
Quickly filter encounters with given query parameters. Returns a 404 Not Found
status if Encounter not exists. If the user is not logged in to perform this action, a 401 Unauthorized
status returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
q | Search Query |
Get encounter by Encounter UUID, Patient Identifier or name |
patient | Patient UUID |
Get encounter(s) for a patient |
encounterType | Encounter_Type UUID |
Filter by encounter type (must be used with patient) |
order | Order UUID |
Filter to encounter(s) containing the specified order (must be used with patient) |
obsConcept | Concept UUID |
Filter to encounter(s) containing observation(s) for the given concept (must be used with patient) |
obsValues | String |
Filter to encounter(s) containing an observations with the given value (must be used with patient & obsConcept) |
fromdate | Date or Timestamp (ISO 8601) |
Start date of the encounter (must be used with patient) |
todate | Date or Timestamp (ISO 8601) |
End date of the encounter (must be used with patient) |
List encounter by UUID.
GET /encounter/:target_encounter_uuid
Retrieve an encounter by its UUID. Returns a 404 Not Found
status if Encounter not exists. If user not logged
in to perform this action, a 401 Unauthorized
status returned.
Create an encounter
POST /Encounter
{
"encounterDatetime": "2019-10-16 12:08:43",
"patient": "070f0120-0283-4858-885d-a20d967729cf",
"encounterType": "e22e39fd-7db2-45e7-80f1-60fa0d5a4378",
"location": "aff27d58-a15c-49a6-9beb-d30dcfc0c66e",
"encounterProviders": [
{
"provider": "bb1a7781-7896-40be-aaca-7d1b41d843a6",
"encounterRole": "240b26f9-dd88-4172-823d-4a8bfeb7841f"
}
]
}
- To Create an encounter you need to specify below attributes in the request body. If you are not logged in to perform this action,
a
401 Unauthorized
status returned.
Attributes
Parameter | Type | Description |
---|---|---|
encounterDatetime | Date (ISO8601 Long) |
The date and time the encounter was created (required) |
patient | Patient UUID |
The patient to whom the encounter applies |
encounterType | EncounterType UUID |
The type of encounter – e.g., Initial visit, Return visit, etc. (required) |
location | Location UUID |
The location at which the encounter occurred (required) |
encounterProviders | Array of Provider UUID and associated Encounter Role UUID |
An array of providers and their role within the encounter. At least one provider is required |
obs | Array[]: Obs |
Array of observations and values for the encounter |
orders | Array[]: Order UUID |
List of orders created during the encounter |
form | Form UUID |
Target Form UUID to be filled for the encounter |
visit | Visit UUID |
When creating an encounter for an existing visit, this specifies the visit |
Update an encounter
POST /encounter/:target_encounter_uuid
{
"encounterDatetime": "2019-10-16 12:08:43",
"patient": "070f0120-0283-4858-885d-a20d967729cf",
"encounterType": "e22e39fd-7db2-45e7-80f1-60fa0d5a4378",
"location": "aff27d58-a15c-49a6-9beb-d30dcfc0c66e",
"encounterProviders": [
{
"provider": "bb1a7781-7896-40be-aaca-7d1b41d843a6",
"encounterRole": "240b26f9-dd88-4172-823d-4a8bfeb7841f"
}
]
}
- Update a target encounter with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if Encounter not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Attributes
Parameter | Type | Description |
---|---|---|
encounterDatetime | Date (ISO8601 Long) |
The date and time the encounter was created |
patient | Patient UUID |
The patient to whom the encounter applies |
encounterType | EncounterType UUID |
The type of encounter – e.g., Initial visit, Return visit, etc. |
location | Location UUID |
The location at which the encounter occurred |
encounterProviders | Array of Provider UUID and associated Encounter Role UUID |
An array of providers and their role within the encounter. At least one provider is required |
obs | Array[]: Obs |
Array of observations and values for the encounter |
orders | Array[]: Order UUID |
List of orders created during the encounter |
form | Form UUID |
Target Form UUID to be filled for the encounter |
visit | Visit UUID |
When creating an encounter for an existing visit, this specifies the visit |
Delete an encounter
DELETE /encounter/:target_encounter_uuid?purge=true
Delete or Void a target encounter by its UUID. Returns a
404 Not Found
status if Encounter not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided unless purge = ‘true’
List encounter provider subresources
List all encounter provider subresources for a visit.
GET /encounter/:target_encounter_uuid/encounterprovider
Retrieve all encounter provider sub resources of an encounter resource by target_encounter_uuid. Returns a
404 Not Found
status if encounter provider not exists. If user not logged in to perform this action, a 401 Unauthorized
status
returned.
List encounter provider subresources by it's UUID and parent encounter UUID.
GET /encounter/:target_encounter_uuid/encounterprovider/:target_encounter_provider_uuid
Retrieve an encounter provider sub resources of a encounter resource. Returns a
404 Not Found
status if encounter provider not exists. If you are not logged in to perform this action, a 401 Unauthorized
status
returned.
Create an encounter provider sub resource with properties
POST encounter/:target_encounter_uuid/encounterprovider
{
"provider": "bb1a7781-7896-40be-aaca-7d1b41d843a6",
"encounterRole": "240b26f9-dd88-4172-823d-4a8bfeb7841f"
}
To Create an attribute subresource for a specific visit resource, you need to specify below attributes in the request body. If the user is not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description provider Provider_Type UUID
UUID of a provider currently registered in RWE Box (required) encounterRole Encounter_Role UUID
UUID of encounter role. This is the role provider will participate during this encounter (required)
Update encounter provider subresource
POST encounter/:target_encounter_uuid/encounterprovider/:target_encounter_provider_uuid
{
"provider": "bb1a7781-7896-40be-aaca-7d1b41d843a6",
"encounterRole": "240b26f9-dd88-4172-823d-4a8bfeb7841f"
}
Updates an encounter provider subresource value with given UUID, this method will only modify value of the subresource. Returns a
404 Not Found
status if encounter provider not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description parent_uuid Encounter UUID
Target encounter resource UUID uuid Encounter_Provider UUID
Target encounter provider resource UUID Attributes
Parameter Type Description provider Provider UUID
UUID of a provider currently registered in RWE Box (required) encounterRole Encounter_Role UUID
UUID of encounter role. This is the role provider will participate during this encounter (required)
Delete encounter provider subresource
DELETE /encounter/:target_encounter_uuid/encounterprovider/:target_encounter_provider_uuid
Delete or Voided a target encounter provider subresource by its UUID. Returns a
404 Not Found
status if attribute not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided unless purge = 'true'. Purging will attempt to remove the encounter provider type from the system irreversibly. Encounter provider types that have been used (i.e., are referenced from existing data) cannot be purged.
Encounter Type
Encounter Type Overview
Encounters represent an interaction between the patient and the healthcare system. Since there are a wide variety of ways in which these interactions may occur, RWE Box allows you to categorize them by defining different types of encounter. For example, "Adult Primary Care Initial Visit" and "In-Between Visit Documentation" could be different types of encounters.
You could define encounter type for locations such as Pharmacy, Lab, Consultation room, or for actions such as admission or discharge.
Available operations for Encounter Type
List encounter types
List all not-retired encounter types.
GET /encountertype?
q=Admission
Quickly filter encounter types with given query parameters. Returns a 404 Not Found
status if encounter types not exist.
If the user not logged in to perform this action, a 401 Unauthorized
status returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
q | Search Query |
Query to filter encounter type by its name |
Get encounter type by UUID.
GET /encountertype/:target_encounter_type_uuid
Retrieve an encounter type by its UUID. Returns a 404 Not Found
status if encounter type not exists. If the user is not logged
in to perform this action, a 401 Unauthorized
status returned.
Create an encounter type
POST /encountertype
{
"name": "Discharge",
"description": "Attach encounters related to hospital dischargers"
}
To create an encounter type, you need to specify below attributes in the request body. If you are not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description name String
Name for the encounter type (required) description String
Description for the encounter type (required)
Update an encounter type
POST /encountertype/:target_encounter_type_uuid
{
"name": "Discharge",
"description": "Encounters related to hospital dischargers"
}
Update a target encounter type with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if encounter type not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Attributes
Parameter Type Description name String
Name for the encounter type description String
Description for the encounter type
Delete an encounter type
DELETE /encountertype/:target_encounter_type_uuid?purge=true
Delete or retire a target encounter type by its UUID. Returns a
404 Not Found
status if encounter type not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be retired unless purge = ‘true’
Concepts
Concepts Overview
The concept is the basic element of flexibility in RWE Box. Concepts are the individual data points collected from a population of patients. Concepts include both questions and answers.
For example, blood type data is collected for a patient. The question is, "What is the blood type for the patient?", with a set of discrete answers of "A, B, AB or O." We use concepts in RWE Box to implement this. The question is a concept ("blood type") and each response ("A," "B," "AB" and "O") is also a concept. For this one question, a total of 5 concepts are required.
What about a question where the answer is not a discrete answer? If the question is "What is the name of your first pet?", the answer would be expressed in a text box. It would not be possible to provide a complete list of every possible name for your pet. In this example, there would be one concept -- "name of first pet."
The bottom-line is that if you need a medical word within your electronic records system, it needs to be defined within the concept dictionary, more details about all the possible concepts will be given in a later section.
Sub Resource types of Concepts
Concept Attribute
If you wish to record extra information about concept, you can create Concept Attributes and assign them to Concept Types.
Concept attributes exists specifically to allow implementations to extend the data model.
Concept Name
- ConceptNames are the words or phrases used to express the idea of a Concept within a particular locale since there can be many names for any concept.
Concept Mapping
Concept Mappings are added to facilitate managing concept dictionaries and point to other concepts that have the same meaning. Mappings are useful when you need to receive or send information to external systems, letting you define how your system's concepts relate to external concepts such as standardized medical vocabularies (e.g., ICD, LOINC, SNOMED).
For example, add a mapping to a concept in the MCL dictionary. You can save the concept now and create some answers.
Concept Description.
- A clear and concise description of the concept, as agreed upon by the organization's members or the most commonly
referenced source.
Available operations for Concepts
- List concepts
- Create a concept
- Update a concept
- Delete a concept
- List concept mapping
- Create concept mapping with properties
- Update concept mapping
- Delete concept mapping
- List concept name
- Create concept name with properties
- Update concept name
- Delete concept name
- List concept attribute
- Create concept attribute with properties
- Update concept attribute
- Delete concept attribute
- List concept description
- Create concept description with properties
- Update concept description
- [Delete concept description](#delete-concept-description
List all concepts.
List all concepts
GET /concept?term=38341003&source=SNOMED%20CT&limit=1
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept?term=38341003&source=SNOMED%20CT&limit=1")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=6E54C8D18F81C34555DBBB8585951625")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=6E54C8D18F81C34555DBBB8585951625");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept?term=38341003&source=SNOMED%20CT&limit=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"uuid": "18316c68-b5f9-4986-b76d-9975cd0ebe31",
"display": "True",
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/concept/18316c68-b5f9-4986-b76d-9975cd0ebe31"
}
]
}
],
"links": [
{
"rel": "next",
"uri": "/rwe-web/ws/rest/v1/concept?term=38341003&source=SNOMED+CT&limit=1&startIndex=1"
}
]
}
- Quickly filter concepts with given query parameters. Returns a
404 Not Found
status if concepts not exist. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
q | Search Query |
Display Name of concept object |
code | String |
Represents a name from a standard medical code |
name | String |
ConceptNames are the words or phrases used to express the idea of a Concept within a particular locale |
term | String |
Medical coding term or RWE Box concept dictionary term that could be mapped to a concept |
source | String |
A concept can have any number of mappings to any number of other vocabularies. Other vocabularies are called "concept sources" in RWE Box (ie. LOINC, SNOMED, ICD-9, ICD10, RxNORM, etc), but the concept source can also be a custom (ie. org.rwe-web.module.mdrtb, PIH, AMPATH, MVP, etc.). Every concept can define a string for its mapping in any "concept source" defined in the database |
class | String |
The concept's class provides a useful way to narrow down the scope of the information that the concept is intended to capture. In this way, the class is helpful for data extraction. This classification elaborates how a concept will be represented (i.e. as a question or an answer) when the information is stored. RWE Box contains several default classes to use when defining concepts, but implementation sites may also create additional custom concept classes. |
List concept by UUID.
List concept by UUID
GET /concept/:target_concept_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/108AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ECE2890ED6EC0C39AB31295B5C17E254")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=ECE2890ED6EC0C39AB31295B5C17E254");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/108AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept by its UUID. Returns a
404 Not Found
status if concepts not exist. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Create a concept
Create a concept
POST /concept
{
"names": [
{
"name": "What is the blood type for the sick patient?",
"locale": "en",
"localePreferred": true,
"conceptNameType": "FULLY_SPECIFIED"
}
],
"datatype": "8d4a4c94-c2cc-11de-8d13-0010c6dffd0f",
"version": "1.2.2",
"conceptClass": "8d492774-c2cc-11de-8d13-0010c6dffd0f",
"mappings": [
{
"conceptReferenceTerm": "21fb14d7-5cd9-3621-ac30-c9e57320e233",
"conceptMapType": "35543629-7d8c-11e1-909d-c80aa9edcf4e"
}
],
"descriptions": [
{
"description": "Records blood type of sick patients",
"locale": "en"
}
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"names\": [\r\n {\r\n \"name\": \"What is the blood type for the sick patient?\",\r\n \"locale\": \"en\",\r\n \"localePreferred\": true,\r\n \"conceptNameType\": \"FULLY_SPECIFIED\"\r\n }\r\n ],\r\n \"datatype\": \"8d4a4c94-c2cc-11de-8d13-0010c6dffd0f\",\r\n \"version\": \"1.2.2\",\r\n \"conceptClass\": \"8d492774-c2cc-11de-8d13-0010c6dffd0f\",\r\n \"mappings\": [\r\n {\r\n \"conceptReferenceTerm\": \"21fb14d7-5cd9-3621-ac30-c9e57320e233\",\r\n \"conceptMapType\": \"35543629-7d8c-11e1-909d-c80aa9edcf4e\"\r\n }\r\n ],\r\n \"descriptions\": [\r\n {\r\n \"description\": \"Records blood type of sick patients\",\r\n \"locale\": \"en\"\r\n }\r\n ]\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=FC3F8F0D4A55542536ABB6F2672F727E")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=FC3F8F0D4A55542536ABB6F2672F727E");
var raw = JSON.stringify({"names":[{"name":"What is the blood type for the sick patient?","locale":"en","localePreferred":true,"conceptNameType":"FULLY_SPECIFIED"}],"datatype":"8d4a4c94-c2cc-11de-8d13-0010c6dffd0f","version":"1.2.2","conceptClass":"8d492774-c2cc-11de-8d13-0010c6dffd0f","mappings":[{"conceptReferenceTerm":"21fb14d7-5cd9-3621-ac30-c9e57320e233","conceptMapType":"35543629-7d8c-11e1-909d-c80aa9edcf4e"}],"descriptions":[{"description":"Records blood type of sick patients","locale":"en"}]});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To Create a concept, you need to specify below attributes in the request body. If you are not logged in to perform this action, a
401 Unauthorized
status returned.
Attributes
Parameter | Type | Description |
---|---|---|
names | String |
ConceptNames are the words or phrases used to express the idea of a Concept within a particular locale (required) |
datatype | target_concept_datatype_uuid |
A concept datatype prescribes the structured format by which you desire the data to be represented. In simple terms, the datatype defines the type of data that the concept is intended to collect (required) |
version | String |
A method to keep track of the number of updates applied to a specific concept (required) |
answers | Array of Child Concepts |
An array of concepts which are answers for the current concept |
setMembers | Array of Child Concepts |
Describes the questions contained by a concept set. Each set member is a question concept in and of itself |
units | String |
Standard unit used to measure the concept |
allowDecimal | String |
Allow to use decimals |
conceptClass | target_concept_class_uuid |
concept class is the classification of a concept This classification details how a concept will be represented (i.e. as a question or an answer) (required) |
descriptions | Array[] concept-description |
concept descriptions are clear and concise description of the concept, as agreed upon by the organization's members or the most commonly referenced source |
mappings | Array[] concept-mapping |
A concept map connects a concept reference term to a concept |
Update a concept
Update a concept
POST /concept/:target_concept_uuid
{
"names": [
{
"name": "What is the blood type for the sick patient?",
"locale": "en",
"localePreferred": true,
"conceptNameType": "FULLY_SPECIFIED"
}
],
"datatype": "8d4a4c94-c2cc-11de-8d13-0010c6dffd0f",
"version": "1.2.2",
"conceptClass": "8d492774-c2cc-11de-8d13-0010c6dffd0f",
"mappings": [
{
"conceptReferenceTerm": "21fb14d7-5cd9-3621-ac30-c9e57320e233",
"conceptMapType": "35543629-7d8c-11e1-909d-c80aa9edcf4e"
}
],
"descriptions": [
{
"description": "Dummy description update for this concept",
"locale": "en"
}
]
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"names\": [\r\n {\r\n \"name\": \"What is the blood type for the sick patient?\",\r\n \"locale\": \"en\",\r\n \"localePreferred\": true,\r\n \"conceptNameType\": \"FULLY_SPECIFIED\"\r\n }\r\n ],\r\n \"datatype\": \"8d4a4c94-c2cc-11de-8d13-0010c6dffd0f\",\r\n \"version\": \"1.2.2\",\r\n \"conceptClass\": \"8d492774-c2cc-11de-8d13-0010c6dffd0f\",\r\n \"mappings\": [\r\n {\r\n \"conceptReferenceTerm\": \"21fb14d7-5cd9-3621-ac30-c9e57320e233\",\r\n \"conceptMapType\": \"35543629-7d8c-11e1-909d-c80aa9edcf4e\"\r\n }\r\n ],\r\n \"descriptions\": [\r\n {\r\n \"description\": \"Dummy description update for this concept\",\r\n \"locale\": \"en\"\r\n }\r\n ]\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/49b4cf3b-7dbd-4332-b8bb-a328df04611f")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=FC3F8F0D4A55542536ABB6F2672F727E")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=FC3F8F0D4A55542536ABB6F2672F727E");
var raw = JSON.stringify({"names":[{"name":"What is the blood type for the sick patient?","locale":"en","localePreferred":true,"conceptNameType":"FULLY_SPECIFIED"}],"datatype":"8d4a4c94-c2cc-11de-8d13-0010c6dffd0f","version":"1.2.2","conceptClass":"8d492774-c2cc-11de-8d13-0010c6dffd0f","mappings":[{"conceptReferenceTerm":"21fb14d7-5cd9-3621-ac30-c9e57320e233","conceptMapType":"35543629-7d8c-11e1-909d-c80aa9edcf4e"}],"descriptions":[{"description":"Dummy description update for this concept","locale":"en"}]});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/49b4cf3b-7dbd-4332-b8bb-a328df04611f", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Update a target concept with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if concept not exists. If the user is not logged in to perform this action, a401 Unauthorized
status is returned.
Attributes
Parameter | Type | Description |
---|---|---|
names | String |
ConceptNames are the words or phrases used to express the idea of a Concept within a particular locale |
datatype | target_concept_datatype_uuid |
A concept datatype prescribes the structured format by which you desire the data to be represented. In simple terms, the datatype defines the type of data that the concept is intended to collect |
version | String |
A method to keep track of the number of updates applied to a specific concept |
answers | Array of Child Concepts |
An array of concepts which are answers for the current concept |
setMembers | Array of Child Concepts |
Describes the questions contained by a concept set. Each set member is a question concept in and of itself |
units | String |
Standard unit used to measure the concept |
allowDecimal | String |
Allow to use decimals |
conceptClass | target_concept_class_uuid |
concept class is the classification of a concept This classification details how a concept will be represented (i.e. as a question or an answer) |
descriptions | Array[] concept-description |
concept descriptions are clear and concise description of the concept, as agreed upon by the organization's members or the most commonly referenced source |
mappings | Array[] concept-mapping |
A concept map connects a concept reference term to a concept |
Delete a concept
Delete a concept
DELETE /concept/:target_concept_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/108AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ECE2890ED6EC0C39AB31295B5C17E254")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=ECE2890ED6EC0C39AB31295B5C17E254");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/108AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Delete or retire a target concept by its UUID. Returns a
404 Not Found
status if concept not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be retired unless purge = ‘true’
List all concept mappings for a concept.
List all concept mappings for a concept
GET /concept/:target_concept_uuid/mapping?limit=1
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping?limit=1")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ECE2890ED6EC0C39AB31295B5C17E254")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=ECE2890ED6EC0C39AB31295B5C17E254");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping?limit=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"display": "ICD-10-WHO: O03.9",
"uuid": "145917ABBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
"conceptReferenceTerm": {
"uuid": "0a0933ab-e97e-3f93-b319-8bb20ed50f64",
"display": "ICD-10-WHO: O03.9",
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/conceptreferenceterm/0a0933ab-e97e-3f93-b319-8bb20ed50f64"
}
]
},
"conceptMapType": {
"uuid": "43ac5109-7d8c-11e1-909d-c80aa9edcf4e",
"display": "NARROWER-THAN",
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/conceptmaptype/43ac5109-7d8c-11e1-909d-c80aa9edcf4e"
}
]
},
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping/145917ABBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
},
{
"rel": "full",
"uri": "/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping/145917ABBBBBBBBBBBBBBBBBBBBBBBBBBBBB?v=full"
}
],
"resourceVersion": "1.9"
}
],
"links": [
{
"rel": "next",
"uri": "/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping?limit=1&startIndex=1"
}
]
}
- Retrieve all concept mapping subresources of a concept resource by target_concept_uuid. Returns a
404 Not Found
status if concept mapping not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
List concept mapping by its UUID and parent concept UUID.
List concept mapping by its UUID and parent concept UUID
GET /concept/:target_concept_uuid/mapping/:target_concept_mapping_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping/133911ABBBBBBBBBBBBBBBBBBBBBBBBBBBBB")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ECE2890ED6EC0C39AB31295B5C17E254")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=ECE2890ED6EC0C39AB31295B5C17E254");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping/133911ABBBBBBBBBBBBBBBBBBBBBBBBBBBBB", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept mapping subresources of a concept resource. Returns a
404 Not Found
status if concept mapping not exists. If you are not logged in to perform this action, a401 Unauthorized
status returned.
Create a concept mapping with properties
Create a concept mapping with properties
POST concept/:target_concept_uuid/mapping
{
"conceptReferenceTerm": "21fb14d7-5cd9-3621-ac30-c9e57320e233",
"conceptMapType": "35543629-7d8c-11e1-909d-c80aa9edcf4e"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"conceptReferenceTerm\": \"21fb14d7-5cd9-3621-ac30-c9e57320e233\",\r\n \"conceptMapType\": \"35543629-7d8c-11e1-909d-c80aa9edcf4e\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/140AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=E84B91CD41B12C89101E366386887CF4")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=E84B91CD41B12C89101E366386887CF4");
var raw = JSON.stringify({"conceptReferenceTerm":"21fb14d7-5cd9-3621-ac30-c9e57320e233","conceptMapType":"35543629-7d8c-11e1-909d-c80aa9edcf4e"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/140AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To Create a concept mapping subresource for a specific concept resource, you need to specify below attributes in the request body.If the user is not logged in to perform this action, a
401 Unauthorized
status returned.
Attributes
Parameter | Type | Description |
---|---|---|
conceptReferenceTerm | target_concept_reference_term_type_uuid |
A concept reference term defines a medical coding term or RWE Box concept dictionary term that could be mapped to a concept (required) |
conceptMapType | target_concept_map_type_uuid |
A concept map connects a concept term to a concept (required) |
Update a concept mapping
Update a concept mapping
POST concept/:target_concept_uuid/mapping
{
"conceptReferenceTerm": "21fb14d7-5cd9-3621-ac30-c9e57320e233",
"conceptMapType": "35543629-7d8c-11e1-909d-c80aa9edcf4e"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"conceptReferenceTerm\": \"21fb14d7-5cd9-3621-ac30-c9e57320e233\",\r\n \"conceptMapType\": \"35543629-7d8c-11e1-909d-c80aa9edcf4e\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/140AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping/101fea18-161e-4f86-9bd6-35300046c2b4")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=E84B91CD41B12C89101E366386887CF4")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=E84B91CD41B12C89101E366386887CF4");
var raw = JSON.stringify({"conceptReferenceTerm":"21fb14d7-5cd9-3621-ac30-c9e57320e233","conceptMapType":"35543629-7d8c-11e1-909d-c80aa9edcf4e"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/140AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping/101fea18-161e-4f86-9bd6-35300046c2b4", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Updates a concept mapping subresource value with given UUID, this method will only modify the value of the subresource. Returns a
404 Not Found
status if concept mapping not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Attributes
Parameter | Type | Description |
---|---|---|
conceptReferenceTerm | target_concept_reference_term_type_uuid |
A concept reference term defines a medical coding term or RWE Box concept dictionary term that could be mapped to a concept |
conceptMapType | target_concept_map_type_uuid |
A concept map connects a concept term to a concept |
Delete a concept mapping
Delete a concept mapping
DELETE concept/:target_concept_uuid/mapping/:target_concept_mapping_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping/133911ABBBBBBBBBBBBBBBBBBBBBBBBBBBBB")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=ECE2890ED6EC0C39AB31295B5C17E254")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=ECE2890ED6EC0C39AB31295B5C17E254");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/mapping/133911ABBBBBBBBBBBBBBBBBBBBBBBBBBBBB", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or Voided a target concept mapping subresource by its UUID. Returns a
404 Not Found
status if concept mapping not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned. - A
400 Bad Request
status is returned if the resource dosent support purging.
Query Parameters
Parameter | Type | Description |
---|---|---|
purge | Boolean |
The resource will be voided unless purge = ‘true’. Purging will attempt to remove the concept mapping type from the system irreversibly. Concept mapping types that have been used (i.e., are referenced from existing data) cannot be purged. |
List all concept names for a concept
List all concept names for a concept
GET /concept/:target_concept_uuid/name?limit=1
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name?limit=1")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=E04858F0DEC146C10FA42532E3CD9A77")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=E04858F0DEC146C10FA42532E3CD9A77");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name?limit=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"display": "GROSSESSE, FAUSSE COUCHE",
"uuid": "106383BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
"name": "GROSSESSE, FAUSSE COUCHE",
"locale": "fr",
"localePreferred": true,
"conceptNameType": "FULLY_SPECIFIED",
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name/106383BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
},
{
"rel": "full",
"uri": "/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name/106383BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB?v=full"
}
],
"resourceVersion": "1.9"
}
],
"links": [
{
"rel": "next",
"uri": "/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name?limit=1&startIndex=1"
}
]
}
- Retrieve all concept name subresources of a concept resource by target_concept_uuid. Returns a
404 Not Found
status if concept name not exists. If the user isnot logged in to perform this action, a401 Unauthorized
status returned.
List concept name it's UUID and parent concept UUID.
List concept name it's UUID and parent concept UUID
GET /concept/:target_concept_uuid/name/:target_concept_name_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name/106383BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=E04858F0DEC146C10FA42532E3CD9A77")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=E04858F0DEC146C10FA42532E3CD9A77");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name/106383BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept name subresources of a concept resource. Returns a
404 Not Found
status if concept name not exists. If you are not logged in to perform this action, a401 Unauthorized
status returned.
Create a concept name with properties
Create a concept name with properties
POST concept/:target_concept_uuid/name
{
"name": "scabies",
"locale": "en",
"localePreferred": true,
"conceptNameType": null
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"scabies\",\r\n \"locale\": \"en\",\r\n \"localePreferred\": true,\r\n \"conceptNameType\": null\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/140AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=E84B91CD41B12C89101E366386887CF4")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=E84B91CD41B12C89101E366386887CF4");
var raw = JSON.stringify({"name":"scabies","locale":"en","localePreferred":true,"conceptNameType":null});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/140AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To Create a concept name subresource for a specific concept resource, you need to specify below attributes in the request body.If the user is not logged in to perform this action, a
401 Unauthorized
status returned. A
500 Internal Server Error
status is returned if the name is being currently used in a concept name.Attributes
Parameter Type Description name String
Name for the concept (Required) locale String
Language to record concept name (Required) localePreferred String
This is the preferred name to use within a locale. By default, this is the fully-specified name; however, full-specified names are sometimes long and more detailed than necessary for day-to-day use. In those cases, a synonym can be defined to be the locale-preferred name. There can only be one preferred name within a locale. The primary term should be the word(s) used by those who will have access to the records to prevent duplication of concept creation. conceptNameType String
Type of the name to be specified.
Update concept name
Update concept name
POST concept/:target_concept_uuid/name/:target_concept_name_uuid
{
"name": "dummyName",
"locale": "fr",
"localePreferred": true,
"conceptNameType": "FULLY_SPECIFIED"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"dummyName\",\r\n \"locale\": \"fr\",\r\n \"localePreferred\": true,\r\n \"conceptNameType\": \"FULLY_SPECIFIED\"\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/140AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name/107925BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=5CF7CD95A415309B0C3E5B583B1CBADF")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=5CF7CD95A415309B0C3E5B583B1CBADF");
var raw = JSON.stringify({"name":"dummyName","locale":"fr","localePreferred":true,"conceptNameType":"FULLY_SPECIFIED"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/140AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name/107925BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", requestOptions)
.then(response => response.text())
Updates a concept name subresource value with given UUID, this method will only modify value of the subresource. Returns a
404 Not Found
status if concept name not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Attributes
Parameter Type Description name String
Name for the concept locale String
Language to record concept name localePreferred String
This is the preferred name to use within a locale. By default, this is the fully-specified name; however, full-specified names are sometimes long and more detailed than necessary for day-to-day use. In those cases, a synonym can be defined to be the locale-preferred name. There can only be one preferred name within a locale. The primary term should be the word(s) used most often by those who will have access to the records to prevent duplicate concept creation. conceptNameType String
Type of the name to be specified.
Delete concept name
Delete concept name
DELETE concept/:target_concept_uuid/name/:target_concept_name_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name/106383BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=E04858F0DEC146C10FA42532E3CD9A77")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=E04858F0DEC146C10FA42532E3CD9A77");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/name/106383BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Delete or retire a target concept name subresource by its UUID. Returns a
404 Not Found
status if concept name not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided unless purge = ‘true’. Purging will attempt to remove the concept name type from the system irreversibly. Concept name types that have been used (i.e., are referenced from existing data) cannot be purged.
List all concept attributes for a concept.
List all concept attributes for a concept
GET /concept/:target_concept_uuid/attribute
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=E39DD93D9C64E5FD6F6CD3C512762368")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=E39DD93D9C64E5FD6F6CD3C512762368");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"display": "boolean: true",
"uuid": "3edce4be-513d-46df-a038-a559a6e71423",
"attributeType": {
"uuid": "94bbaf10-e43c-4383-a0a9-69927121ab2e",
"display": "boolean",
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/conceptattributetype/94bbaf10-e43c-4383-a0a9-69927121ab2e"
}
]
},
"value": true,
"voided": false,
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute/3edce4be-513d-46df-a038-a559a6e71423"
},
{
"rel": "full",
"uri": "/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute/3edce4be-513d-46df-a038-a559a6e71423?v=full"
}
],
"resourceVersion": "2.0"
}
]
}
- Retrieve all concept attribute subresources of a concept resource by target_concept_uuid. Returns a
404 Not Found
status if a concept attribute not exists. If the user isnot logged in to perform this action, a401 Unauthorized
status returned.
List concept attribute by its UUID and parent concept UUID.
List concept attribute by its UUID and parent concept UUID
GET /concept/:target_concept_uuid/attribute/:target_concept_attribute_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute/3edce4be-513d-46df-a038-a559a6e71423")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=E39DD93D9C64E5FD6F6CD3C512762368")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=E39DD93D9C64E5FD6F6CD3C512762368");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute/3edce4be-513d-46df-a038-a559a6e71423", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept attribute subresources of a concept resource. Returns a
404 Not Found
status if a concept attribute not exists. If you are not logged in to perform this action, a401 Unauthorized
status returned.
Create a concept attribute with properties
Create a concept attribute with properties
POST concept/:target_concept_uuid/attribute
{
"attributeType": "target_concept_attribute_type_uuid",
"value": "value_for_the_attriute"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"attributeType\": \"94bbaf10-e43c-4383-a0a9-69927121ab2e\",\r\n \"value\": \"true\" \r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=E39DD93D9C64E5FD6F6CD3C512762368")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=E39DD93D9C64E5FD6F6CD3C512762368");
var raw = JSON.stringify({"attributeType":"94bbaf10-e43c-4383-a0a9-69927121ab2e","value":"true"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To Create a concept attribute subresource for a specific concept resource, you need to specify below attributes in the request body.
If the user is not logged in to perform this action, a
401 Unauthorized
status returned.
Attributes
Parameter | Type | Description |
---|---|---|
attributeType | Attribute_Type UUID |
Create Attribute from this Concept Attribute Type (required) |
value | Depends on Attribute_Type Selected |
Value for the attribute (required) |
Update concept attribute
Update concept attribute
POST concept/:target_concept_uuid/attribute
{
"attributeType": "target_concept_attribute_type_uuid",
"value": "value_for_the_attriute"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \r\n \"attributeType\": \"94bbaf10-e43c-4383-a0a9-69927121ab2e\",\r\n \"value\": \"false\" \r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute/3edce4be-513d-46df-a038-a559a6e71423")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=E39DD93D9C64E5FD6F6CD3C512762368")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=E39DD93D9C64E5FD6F6CD3C512762368");
var raw = JSON.stringify({"attributeType":"94bbaf10-e43c-4383-a0a9-69927121ab2e","value":"false"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute/3edce4be-513d-46df-a038-a559a6e71423", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Updates a concept attribute subresource value with given UUID, this method will only modify the value of the subresource. Returns a
404 Not Found
status if the concept attribute not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Attributes
Parameter Type Description attributeType Attribute_Type UUID
Create Attribute from this Concept Attribute Type value Depends on Attribute_Type Selected
Value for the attribute
Delete concept attribute
Delete concept attribute
DELETE concept/:target_concept_uuid/attribute/:target_concept_attribute_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute/3edce4be-513d-46df-a038-a559a6e71423?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=E39DD93D9C64E5FD6F6CD3C512762368")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=E39DD93D9C64E5FD6F6CD3C512762368");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/attribute/3edce4be-513d-46df-a038-a559a6e71423?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or retire a target concept attribute subresource by its UUID. Returns a
404 Not Found
status if concept attribute not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned. A
500 Internal Server Error
status is thrown if the concept attribute does not support purging.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided unless purge = ‘true’. Purging will attempt to remove the concept name type from the system irreversibly. Concept name types that have been used (i.e., are referenced from existing data) cannot be purged.
List concept descriptions
List all concept descriptions for a concept
GET /concept/:target_concept_uuid/description
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=8D3CE9C8E6854B5B218C4B09ABA9402C")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=8D3CE9C8E6854B5B218C4B09ABA9402C");
var raw = "";
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"display": "Pregnancy terminated by a spontaneous abortion.",
"uuid": "49FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
"description": "Pregnancy terminated by a spontaneous abortion.",
"locale": "en",
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description/49FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
},
{
"rel": "full",
"uri": "/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description/49FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF?v=full"
}
],
"resourceVersion": "1.9"
}
]
}
- Retrieve all concept description subresources of a concept resource by target_concept_uuid. Returns a
404 Not Found
status if concept description not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
List concept description by its UUID and parent concept UUID.
List concept description by its UUID and parent concept UUID
GET /concept/:target_concept_uuid/description/:target_concept_description_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description/49FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=8D3CE9C8E6854B5B218C4B09ABA9402C")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=8D3CE9C8E6854B5B218C4B09ABA9402C");
var raw = "";
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description/49FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept description subresources of a concept resource. Returns a
404 Not Found
status if concept description not exists. If you are not logged in to perform this action, a401 Unauthorized
status returned.
Create a concept description with properties
Create a concept description with properties
POST concept/:target_concept_uuid/description
{
"description": "Pregnancy terminated by spontaneous abortion.",
"locale": "en"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"description\": \"Pregnancy terminated by spontaneous abortion.\",\r\n \"locale\": \"en\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=8D3CE9C8E6854B5B218C4B09ABA9402C")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=8D3CE9C8E6854B5B218C4B09ABA9402C");
var raw = JSON.stringify({"description":"Pregnancy terminated by spontaneous abortion.","locale":"en"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
To Create a concept description subresource for a specific concept resource you need to specify below attributes in the request body. If the user is not logged in to perform this action, a
401 Unauthorized
status returned.Attributes
Parameter Type Description description String
Description text to e provided for the concept (required) locale String
Language description provided by (required)
Update concept description
Update concept description
POST concept/:target_concept_uuid/description/:target_concept_description_uuid
{
"description": "Pregnancy terminated by spontaneous abortion/miscarriage",
"locale": "en"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"description\": \"Pregnancy terminated by spontaneous abortion/miscarriage\",\r\n \"locale\": \"en\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description/7d6b3a32-aa93-4ae5-b222-7fe42e9b052f")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=8D3CE9C8E6854B5B218C4B09ABA9402C")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=8D3CE9C8E6854B5B218C4B09ABA9402C");
var raw = JSON.stringify({"description":"Pregnancy terminated by spontaneous abortion/miscarriage","locale":"en"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description/7d6b3a32-aa93-4ae5-b222-7fe42e9b052f", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Updates a concept description subresource value with given UUID, this method will only modify the value of the subresource. Returns a
404 Not Found
status if concept description not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Attributes
Parameter Type Description description String
Description text to e provided for the concept locale String
Language description provided by
Delete concept description
Delete concept description
DELETE concept/:target_concept_uuid/description/:target_concept_description_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description/7d6b3a32-aa93-4ae5-b222-7fe42e9b052f")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=8D3CE9C8E6854B5B218C4B09ABA9402C")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=8D3CE9C8E6854B5B218C4B09ABA9402C");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/concept/48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/description/7d6b3a32-aa93-4ae5-b222-7fe42e9b052f", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Delete or retire a target concept description subresource by its UUID. Returns a
404 Not Found
status if concept description not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided unless purge = ‘true’. Purging will attempt to remove the concept description from the system irreversibly. Concept descriptions that have been used (i.e., are referenced from existing data) cannot be purged.
Concept Source
Concept Source Overview
- Concepts are often managed within a dictionary (as a collection of concepts). While RWE Box has, it's own dictionary of concepts, other dictionaries may exist in other systems or as standardized reference terminologies (like LOINC or ICD). The authorities who manage these other concept dictionaries represent "Concept Sources."
- For eg
PIH Malawi
:Partners in Health Malawi concept dictionary
,SNOMED CT
:SNOMED Preferred mapping
etc.
Available operations for Concept Source.
- List concept_source types
- Create a concept_source
- Update a concept_source type
- Delete a concept_source type
List concept source
List all non-retired concept source
GET /conceptsource?q=pih&limit=1
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptsource?q=pih&limit=1")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=BB426C696078A92639710E2B54C97C4D")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=BB426C696078A92639710E2B54C97C4D");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptsource?q=pih&limit=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"uuid": "fb9aaaf1-65e2-4c18-b53c-16b575f2f385",
"display": "PIH",
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/conceptsource/fb9aaaf1-65e2-4c18-b53c-16b575f2f385"
}
]
}
],
"links": [
{
"rel": "next",
"uri": "/rwe-web/ws/rest/v1/conceptsource?q=pih&limit=1&startIndex=1"
}
]
}
- Quickly filter concept source types with a given search query. Returns a
404 Not Found
status if concept source type not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
q | String |
Full or partial match to concept source name. Search is case-insensitive for eg. PIH |
Query concept source by UUID
Query concept source by UUID
GET /conceptsource/:target_concept_source_type_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptsource/1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=BB426C696078A92639710E2B54C97C4D")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=BB426C696078A92639710E2B54C97C4D");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptsource/1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept source type by its UUID. Returns a
404 Not Found
status if concept source type not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.
Create a concept source
Create a concept source
POST /conceptsource
{
"name": "SNOMED CT",
"description": "SNOMED Preferred mapping",
"hl7Code": "SCT",
"uniqueId":"2.16.840.1.113883.6.96"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"SNOMED CT\",\r\n \"description\": \"SNOMED Preferred mapping\",\r\n \"hl7Code\": \"SCT\",\r\n \"uniqueId\":\"2.16.840.1.113883.6.96\"\t\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptsource/")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=3359211CFE448283F1CDCE925E43545E")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=3359211CFE448283F1CDCE925E43545E");
var raw = JSON.stringify({"name":"SNOMED CT","description":"SNOMED Preferred mapping","hl7Code":"SCT","uniqueId":"2.16.840.1.113883.6.96"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptsource/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To Create a concept source type you need to specify below attributes in the request body. If you are not logged in to perform this action,a
401 Unauthorized
status returned. A
500 Internal Server Error
status is returned if the new concept source class name, description or Hl7Code is already used for some other concept source class.Attributes
Parameter Type Description name String
Name of the concept source type (Required) description String
Description for the concept source type resource (Required) hl7Code String
A short code defined by governing bodies like HL7 (as in Vocabulary Table 0396). Alternatively, this could be the "Implementation Id" code used by another RWE Box installation to define its concepts and forms uniqueId String
A globally unique id to for the concept source
Update a concept source
Update a concept source
POST /conceptsource/:target_concept_source_type_uuid
{
"name": "SNOMED CTS",
"description": "SNOMED Preferred mapping",
"hl7Code": "SCT"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"SNOMED CTS\",\r\n \"description\": \"SNOMED Preferred mapping\",\r\n \"hl7Code\": \"SCT\"\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptsource/1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=BB426C696078A92639710E2B54C97C4D")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=BB426C696078A92639710E2B54C97C4D");
var raw = JSON.stringify({"name":"SNOMED CTS","description":"SNOMED Preferred mapping","hl7Code":"SCT"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptsource/1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Update a target concept source type with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if concept source not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Attributes
Parameter Type Description name String
Name of the concept source type description String
Description for the concept source type resource hl7Code String
The 5-20 character code defined for this source by governing bodies. Alternatively, this could be the "Implementation Id" code used by another RWE Box installation to define its concepts and forms uniqueId String
A globally unique id to for the concept source
Delete a concept source
Delete a concept source
DELETE /conceptsource/:target_concept_source_type_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptsource/9ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=BB426C696078A92639710E2B54C97C4D")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=BB426C696078A92639710E2B54C97C4D");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptsource/9ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or Retire a target concept source type by its UUID. Returns a
404 Not Found
status if concept source not exists. If user not logged in to perform this action, a401 Unauthorized
status returned. - If the target concept source is referenced somewhere else in the database a
500 Internal Server Error
status is returned.
### Query Parameters
Parameter | Type | Description |
---|---|---|
purge | Boolean |
The resource will be voided/retired unless purge = ‘true’ |
Concept Attribute Type
Concept Attribute Type Overview
- If you wish to record extra information about concept, you can create Concept Attributes and assign them to Concept Attribute Types.
Available operations for Concept Attribute Type.
- List concept_attribute types
- Create a concept_attribute_type
- Update a concept_attribute type
- Delete a concept_attribute type
List concept attribute types
List all non-retired concept attribute types
GET /conceptattributetype?q=time&limit=1
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptattributetype?q=time&limit=1")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=66002746B1A29A6E9CA461CD6309BCC2")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=66002746B1A29A6E9CA461CD6309BCC2");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptattributetype?q=time&limit=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"uuid": "ecc8e1af-3465-4840-85b8-ec5a2298bdcf",
"display": "Time Span",
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/conceptattributetype/ecc8e1af-3465-4840-85b8-ec5a2298bdcf"
}
]
}
],
"links": [
{
"rel": "next",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/conceptattributetype?q=time&limit=1&startIndex=1"
}
]
}
Quickly filter concept attribute types with a given search query. Returns a
404 Not Found
status if concept attribute type not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description q String
Full or partial display name of concept source
List concept attribute type by UUID.
List concept attribute type by UUID
GET /conceptattributetype/:target_concept_attribute_type_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptattributetype?ecc8e1af-3465-4840-85b8-ec5a2298bdcf")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=66002746B1A29A6E9CA461CD6309BCC2")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=66002746B1A29A6E9CA461CD6309BCC2");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptattributetype?ecc8e1af-3465-4840-85b8-ec5a2298bdcf", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept attribute type by its UUID. Returns a
404 Not Found
status if concept attribute type not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Create a concept attribute type
Create a concept attribute type
POST /conceptattributetype
{
"name": "Time Span",
"description": "This attribute type will record the time span for the concept",
"datatypeClassname": "org.rwe-web.customdatatype.datatype.LongFreeTextDatatype",
"minOccurs": 0,
"maxOccurs": 1,
"datatypeConfig": "default",
"preferredHandlerClassname": "org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler",
"handlerConfig": null
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Time Span\",\r\n \"description\": \"This attribute type will record the time span for the concept\",\r\n \"datatypeClassname\": \"org.rwe-web.customdatatype.datatype.LongFreeTextDatatype\",\r\n \"minOccurs\": 0,\r\n \"maxOccurs\": 1,\r\n \"datatypeConfig\": \"default\",\r\n \"preferredHandlerClassname\": \"org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler\",\r\n \"handlerConfig\": null\r\n}");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptattributetype")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=7F21B551667D3B99C226980B29262DAF")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=7F21B551667D3B99C226980B29262DAF");
var raw = JSON.stringify({"name":"Time Span","description":"This attribute type will record the time span for the concept","datatypeClassname":"org.rwe-web.customdatatype.datatype.LongFreeTextDatatype","minOccurs":0,"maxOccurs":1,"datatypeConfig":"default","preferredHandlerClassname":"org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler","handlerConfig":null});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptattributetype", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To Create a concept attribute type, you need to specify below attributes in the request body. If you are not logged in to perform this action,a
401 Unauthorized
status returned.
Attributes
Parameter | Type | Description |
---|---|---|
name | String |
Name of the concept attribute type (Required) |
description | String |
Description (Required) |
datatypeClassname | CustomDataType Resource |
Data type for the attribute type resource. RWE Box provides Custom data type resource which gives flexibility to select the data type accordingly (Required) |
minOccurs | Number |
Minimum number of times this value can be specified for a single concept. Use 0 or 1 as the default value (Required) |
maxOccurs | Number |
Maximum number of times this value can be specified for a single concept (e.g., use 1 to prevent an attribute from being added to a concept multiple times) |
preferredHandlerClassname | Handler |
Specifies the Java class to be used when handling this concept attribute type. The java class must implement [CustomDataTypeHandler (https://docs.rwe-web.org/doc/org/rwe-web/customdatatype/CustomDatatypeHandler.html). If not specified, the system will try to choose the best handler for the chosen datatype |
datatypeConfig | String |
Provides ability to define custom data types configuration for RWE Box |
handlerConfig | String |
Allow handler to be used for more than one attribute type. The actual configuration depends on the needs of the specified handler. For example, a "Pre-defined List" handler could be made to implement a simple selection list, and this configuration would tell the handler the possible choices in the list for this specific attribute type |
Update a concept attribute type
Update a concept attribute type
POST /conceptattributetype/:target_concept_attribute_type_uuid
{
"name": "Time Span",
"description": "Dummy description update",
"datatypeClassname": "org.rwe-web.customdatatype.datatype.LongFreeTextDatatype",
"minOccurs": 0,
"maxOccurs": 1,
"datatypeConfig": "default",
"preferredHandlerClassname": "org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler",
"handlerConfig": null
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Time Span\",\r\n \"description\": \"Dummy description update\",\r\n \"datatypeClassname\": \"org.rwe-web.customdatatype.datatype.LongFreeTextDatatype\",\r\n \"minOccurs\": 0,\r\n \"maxOccurs\": 1,\r\n \"datatypeConfig\": \"default\",\r\n \"preferredHandlerClassname\": \"org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler\",\r\n \"handlerConfig\": null\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptattributetype/b5d56fd4-9add-4c00-a227-eb69d70669dd")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=7F21B551667D3B99C226980B29262DAF")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=7F21B551667D3B99C226980B29262DAF");
var raw = JSON.stringify({"name":"Time Span","description":"Dummy description update","datatypeClassname":"org.rwe-web.customdatatype.datatype.LongFreeTextDatatype","minOccurs":0,"maxOccurs":1,"datatypeConfig":"default","preferredHandlerClassname":"org.rwe-web.web.attribute.handler.LongFreeTextTextareaHandler","handlerConfig":null});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptattributetype/b5d56fd4-9add-4c00-a227-eb69d70669dd", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Update a target concept attribute type with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if concept attribute not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Attributes
Parameter | Type | Description |
---|---|---|
name | String |
Name of the concept attribute type |
description | String |
Description |
datatypeClassname | CustomDataType Resource |
Data type for the attribute type resource. RWE Box provides Custom data type resource which gives flexibility to select the data type accordingly |
minOccurs | Number |
Minimum number of times this value can be specified for a single concept. Use 0 or 1 as the default value |
maxOccurs | Number |
Maximum number of times this value can be specified for a single concept (e.g., use 1 to prevent an attribute from being added to a concept multiple times) |
preferredHandlerClassname | Handler |
Specifies the Java class to be used when handling this concept attribute type. The java class must implement [CustomDataTypeHandler (https://docs.rwe-web.org/doc/org/rwe-web/customdatatype/CustomDatatypeHandler.html). If not specified, the system will try to choose the best handler for the chosen datatype |
datatypeConfig | String |
Provides ability to define custom data types configuration for RWE Box |
handlerConfig | String |
Allow handler to be used for more than one attribute type. The actual configuration depends on the needs of the specified handler. For example, a "Pre-defined List" handler could be made to implement a simple selection list, and this configuration would tell the handler the possible choices in the list for this specific attribute type |
Delete a concept attribute type
Delete a concept attribute type
DELETE /conceptattributetype/:target_concept_attribute_type_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptattributetype/ecc8e1af-3465-4840-85b8-ec5a2298bdcf?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=66002746B1A29A6E9CA461CD6309BCC2")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=66002746B1A29A6E9CA461CD6309BCC2");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptattributetype/ecc8e1af-3465-4840-85b8-ec5a2298bdcf?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Delete or retire a target concept attribute type by its UUID. Returns
404 Not Found
status if concept attribute does not exist. If not authenticated or user does not have sufficient privilege, a401 Unauthorized
status is returned.Query Parameters
Parameter Type Description purge Boolean
The resource will be retired unless purge = "true"
Concept Data Type
Concept Data Type Overview
- Concept Data type defines the structured format you desired the data to be represented.
Current types are as follows:
1. Numeric
Any data represented numerically, also allows you to classify critical values and units, e.g., age, height, and liters consumed per day.
2. Coded
Allows answers to be only those provided, since value determined by term dictionary lookup (i.e., term identifier) e.g., blood type can only be “A,” “B,” "AB," or “O.”
.
3. Text
Open-ended responses.
4. N/A
The standard datatype for any non-query-like concepts (answers or things), e.g., symptoms, diagnoses, findings, anatomy, misc.
5. Document
Pointer to a binary or text-based document (e.g., clinical document, RTF, XML, EKG, image, etc.) stored in complex_obs table.
6. Date
Structured day, month, and year.
7. Time
Structured time response.
8. DateTime
Structured response including both the date and the time
9. Boolean
Checkbox response, e.g., yes or no queries
10. Rule
Value derived from other data
11. Structured Numeric
Complex numeric values possible (ie, <5, 1-10, etc.).
12. Complex
Complex value, analogous to HL7 Embedded Datatype.
Available operations for Concept Data Type.
List concept data types
List all non-retired concept data types.
List all non-retired concept data types
GET /conceptdatatype"
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptdatatype?limit=1")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=66002746B1A29A6E9CA461CD6309BCC2")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=66002746B1A29A6E9CA461CD6309BCC2");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptdatatype?limit=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success response
{
"results": [
{
"uuid": "8d4a4488-c2cc-11de-8d13-0010c6dffd0f",
"display": "Numeric",
"links": [
{
"rel": "self",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/conceptdatatype/8d4a4488-c2cc-11de-8d13-0010c6dffd0f"
}
]
}
],
"links": [
{
"rel": "next",
"uri": "https://link-to-rwebox/rwe-web/ws/rest/v1/conceptdatatype?limit=1&startIndex=1"
}
]
}
- Get concept data types. Returns a
404 Not Found
status if concept data type not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Get concept data type by UUID.
Get concept data type by UUID
GET /conceptdatatype/:target_concept_data_type_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptdatatype/8d4a4488-c2cc-11de-8d13-0010c6dffd0f")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=C40164E7FA407F9E872B0BBDBB4582B0")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=C40164E7FA407F9E872B0BBDBB4582B0");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptdatatype/8d4a4488-c2cc-11de-8d13-0010c6dffd0f", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept data type by its UUID. Returns a
404 Not Found
status if concept data type not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Delete a concept data type
Delete a concept data type
DELETE /conceptdatatype/:target_concept_data_type_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptdatatype/8d4a4488-c2cc-11de-8d13-0010c6dffd0f?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=C40164E7FA407F9E872B0BBDBB4582B0")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=C40164E7FA407F9E872B0BBDBB4582B0");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptdatatype/8d4a4488-c2cc-11de-8d13-0010c6dffd0f?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or retire a target concept data type by its UUID. Returns a
404 Not Found
status if concept data not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned. A
400 Bad Request
status is returned when the resource dosent support deletion.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’
Concept Map Type
Overview
- Concept mappings are generally used to map between a local concept and an external concept, most often a reference (standard) terminology but sometimes concepts from other systems with which you need to Inter operate (i.e., transform data moving between systems).
Mappings are useful when you need to receive or send information to external systems, letting you define how your system's concepts relate to external concepts such as standardized medical vocabularies (e.g., ICD, LOINC, SNOMED).
For example, add a mapping to a concept in the MCL dictionary. You can save the concept now and create some answers.
Repeat the steps and create the concepts PLANNING PREGNANCY and CURRENTLY PREGNANT of Class Finding and Datatype Boolean. The last possible answer will be the OTHER of Class Misc and Datatype N/A. After creating three new concepts, you can edit ANTENATAL VISIT REASON and add them as answers.
Available operations.
- List concept mapping types
- Create a concept mapping type
- Update a concept mapping typee
- Delete a concept mapping type
List concept map types
List all non-retired concept map types.
List all non-retired concept map types
GET /conceptmaptype?q=associated
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptmaptype?q=associated&limit=1")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=C40164E7FA407F9E872B0BBDBB4582B0")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=C40164E7FA407F9E872B0BBDBB4582B0");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptmaptype?q=associated&limit=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"uuid": "55e02065-7d8c-11e1-909d-c80aa9edcf4e",
"display": "Associated finding",
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/conceptmaptype/55e02065-7d8c-11e1-909d-c80aa9edcf4e"
}
]
}
],
"links": [
{
"rel": "next",
"uri": "/rwe-web/ws/rest/v1/conceptmaptype?q=associated&limit=1&startIndex=1"
}
]
}
Quickly filter concept map types with a given search query. Returns a
404 Not Found
status if concept map type not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Query Parameters
Parameter Type Description q String
Full or partial name search term. Search is case insensitive.
List concept map type by UUID.
List concept map type by UUID
GET /conceptmaptype/:target_concept_map_type_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptmaptype/55e02065-7d8c-11e1-909d-c80aa9edcf4e")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=CDA2E6D4A724D5E5DC294136C185284C")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=CDA2E6D4A724D5E5DC294136C185284C");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptmaptype/55e02065-7d8c-11e1-909d-c80aa9edcf4e", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept map type by its UUID. Returns a
404 Not Found
status if concept map type not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.
Create a concept map type
Create a concept map type
POST /conceptmaptype
{
"name": "SAME-AS",
"description": "used to map concepts which are Identical",
"isHidden": false
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n\t\"name\": \"SAME-AS\",\r\n\t\"description\":\"used to map concepts which are Identical\",\r\n\t\"isHidden\": false\r\n}\r\n{\r\n\t\"name\": \"SAME-AS\",\r\n\t\"description\":\"used to map concepts which are Identical\"\r\n\t\"isHidden\": false\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1//conceptmaptype")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=77AE436C4972FB63FC69B7836445489F")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=77AE436C4972FB63FC69B7836445489F");
var raw = "{\n \"name\": \"SAME-AS\",\n \"description\":\"used to map concepts which are Identical\",\n \"isHidden\": false\n}\n{\n \"name\": \"SAME-AS\",\n \"description\":\"used to map concepts which are Identical\"\n \"isHidden\": false\n}\n";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1//conceptmaptype", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To Create a concept map type, you need to specify below attributes in the request body. If you are not logged in to perform this action,
a
401 Unauthorized
status returned. - A
400 Bad request
status is returned if the name is already being used by some concept map type.
Attributes
Parameter | Type | Description |
---|---|---|
name | String |
Name of the concept mapping type (Required) |
description | String |
A brief description of the concept mapping type |
isHidden | Boolean |
State to record concept map is hidden or not |
Update a concept map type
Update a concept map type
POST /conceptmaptype/:target_concept_map_type_uuid
{
"name": "SAME-AS",
"description": "dummy update",
"isHidden": true
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n\t\"name\": \"SAME-AS\",\r\n\t\"description\": \"dummy update\",\r\n\t\"isHidden\": false\r\n}\r\n{\r\n\t\"name\": \"SAME-AS\",\r\n\t\"description\":\"used to map concepts which are Identical\"\r\n\t\"isHidden\": false\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1//conceptmaptype/35543629-7d8c-11e1-909d-c80aa9edcf4e")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=77AE436C4972FB63FC69B7836445489F")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=77AE436C4972FB63FC69B7836445489F");
var raw = "{\n \"name\": \"SAME-AS\",\n \"description\": \"dummy update\",\n \"isHidden\": false\n}\n{\n \"name\": \"SAME-AS\",\n \"description\":\"used to map concepts which are Identical\"\n \"isHidden\": false\n}\n";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1//conceptmaptype/35543629-7d8c-11e1-909d-c80aa9edcf4e", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Update a target concept map type with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if concept map not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Attributes
Parameter Type Description name String
Name of the concept mapping type description String
A brief description of the concept mapping type isHidden Boolean
State to record concept map is hidden or not
Delete a concept map type
Delete a concept map type
DELETE /conceptmaptype/:target_concept_map_type_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptmaptype/55e02065-7d8c-11e1-909d-c80aa9edcf4e?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=CDA2E6D4A724D5E5DC294136C185284C")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=CDA2E6D4A724D5E5DC294136C185284C");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptmaptype/55e02065-7d8c-11e1-909d-c80aa9edcf4e?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or Retire a target concept map type by its UUID. Returns a
404 Not Found
status if concept map not exists. If user not logged in to perform this action, a401 Unauthorized
status returned. A
500 Internal Server Error
status is returned if the concept map is currently in use.Query Parameters
Parameter Type Description purge Boolean
The resource will be voided/retired unless purge = ‘true’
Concept Reference Term
Overview
Concept reference terms represent terms within external vocabularies (typically standardized terminologies like SNOMED, ICD, LOINC, etc.). RWE Box concept can be mapped to these reference terms through concept mappings.
For example, the concept
left Lung
can be mapped to an external conceptlower lobe of Lung
using a concept mappingBROADER-THAN
.
Available operations.
- List concept reference terms
- Create a concept reference term
- Update a concept reference term
- Delete a concept reference term
List concept reference terms
List all concepts reference terms
GET /conceptreferenceterm?codeOrName=274663001
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptreferenceterm?codeOrName=274663001")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=4F55735593751E224686B006CD388234")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=4F55735593751E224686B006CD388234");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptreferenceterm?codeOrName=274663001", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"uuid": "c4091da9-3d7c-37c8-906d-51183e750629",
"display": "SNOMED CT: 274663001",
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/conceptreferenceterm/c4091da9-3d7c-37c8-906d-51183e750629"
}
]
}
]
}
- Quickly filter concept reference term with given query parameters. Returns a
404 Not Found
status if concept reference term type not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Query Parameters
Parameter | Type | Description |
---|---|---|
codeOrName | String |
Represents a code or name from a standard medical code |
source | String |
A concept can have any number of mappings to any number of other vocabularies. Other vocabularies are called "concept sources" in RWE Box (i.e., LOINC, SNOMED, ICD-9, ICD10, RxNORM, etc.), but the concept source can also be a custom (i.e., org.rwe-web.module.mdrtb, PIH, AMPATH, MVP, etc.). Every concept can define a string for its mapping in any "concept source" defined in the database |
Query concept reference term by UUID.
Query concept reference term by UUID
GET /conceptreferenceterm/:target_concept_reference_term_type_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptreferenceterm/c4091da9-3d7c-37c8-906d-51183e750629")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=4F55735593751E224686B006CD388234")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=4F55735593751E224686B006CD388234");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptreferenceterm/c4091da9-3d7c-37c8-906d-51183e750629", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept reference term by its UUID. Returns a
404 Not Found
status if concept reference term not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
Create a concept reference term
Create a concept reference term
POST /conceptreferenceterm
{
"name": "Acute Pain",
"code": "274663001",
"description": "description for the concept reference term"
"conceptSource": "1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD",
"version": "1.0.0"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Acute Pain\",\t\r\n \"code\": \"274663001\", \r\n \"description\": \"description for the concept reference term\",\t\r\n \"conceptSource\": \"1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\",\r\n \"version\": \"1.0.0\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptreferenceterm")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=B369B31B00020CC1488C42325A76272B")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=B369B31B00020CC1488C42325A76272B");
var raw = JSON.stringify({"name":"Acute Pain","code":"274663001","description":"description for the concept reference term","conceptSource":"1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD","version":"1.0.0"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptreferenceterm", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- To Create an concept reference term, you need to specify below attributes in the request body. If you are not logged in to perform this action, a
401 Unauthorized
status returned. - A
400 Bad Request
status is returned if the code used is already being used by some other concept reference term with the same concept source
Attributes
Parameter | Type | Description |
---|---|---|
names | String |
Name for the concept reference term |
description | String |
A brief description of the concept reference term |
code | String |
Represents a name from a standard medical code (required) |
conceptSource | target_concept_source_UUID |
A concept can have any number of mappings to any number of other vocabularies. Other vocabularies are called "concept sources" in RWE Box (i.e., LOINC, SNOMED, ICD-9, ICD10, RxNORM, etc.), but the concept source can also be a custom (i.e., org.rwe-web.module.mdrtb, PIH, AMPATH, MVP, etc.). Every concept can define a string for its mapping in any "concept source" defined in the database (required) |
version | String |
A method to keep track of the number of updates applied to a specific concept reference term type |
Update a concept reference term
Update a concept reference term
POST /conceptreferenceterm/:target_concept_reference_term_type_uuid
{
"name": "Acute Pain",
"code": "274663001",
"description": "Modified description for the concept reference term"
"conceptSource": "1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD",
"version": "1.0.0"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Acute Pain\",\t\r\n \"code\": \"274663001\", \r\n \"description\": \"description for the concept reference term\",\t\r\n \"conceptSource\": \"1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\",\r\n \"version\": \"1.0.0\"\r\n}\r\n");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptreferenceterm/c4091da9-3d7c-37c8-906d-51183e750629")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=B369B31B00020CC1488C42325A76272B")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=B369B31B00020CC1488C42325A76272B");
var raw = JSON.stringify({"name":"Acute Pain","code":"274663001","description":"description for the concept reference term","conceptSource":"1ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD","version":"1.0.0"});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptreferenceterm/c4091da9-3d7c-37c8-906d-51183e750629", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Update a target concept reference term with given UUID, this method only modifies properties in the request. Returns a
404 Not Found
status if concept reference term not exists. If the user is not logged in to perform this action, a401 Unauthorized
status returned.Attributes
Parameter Type Description names String
Name for the concept reference term description String
A brief description of the concept reference term code String
Represents a name from a standard medical code conceptSource target_concept_source_UUID
A concept can have any number of mappings to any number of other vocabularies. Other vocabularies are called "concept sources" in RWE Box (i.e., LOINC, SNOMED, ICD-9, ICD10, RxNORM, etc.), but the concept source can also be a custom (i.e., org.rwe-web.module.mdrtb, PIH, AMPATH, MVP, etc.). Every concept can define a string for its mapping in any "concept source" defined in the database version String
A method to keep track of the number of updates applied to a specific concept reference term type
Delete a concept reference term
Delete a concept reference term
DELETE /conceptreferenceterm/:target_concept_reference_term_type_uuid?purge=true
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptreferenceterm/c4091da9-3d7c-37c8-906d-51183e750629?purge=true")
.method("DELETE", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=B369B31B00020CC1488C42325A76272B")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=B369B31B00020CC1488C42325A76272B");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptreferenceterm/c4091da9-3d7c-37c8-906d-51183e750629?purge=true", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Delete or retire a target concept reference term by its UUID. Returns a
404 Not Found
status if concept reference term not exists. If the user not logged in to perform this action, a401 Unauthorized
status returned. A
500 Internal Server Error
status is returned if the concept reference term to be deleted is currently in use.Query Parameters
Parameter Type Description purge Boolean
The resource will be retired unless purge = ‘true’
Concept Class
Overview
- The concept's class provides a useful way to narrow down the scope of the information that the concept is intended to capture.
- In this way, the class is helpful for data extraction. This classification details how a concept will be represented (i.e. as a question or an answer) when the information is stored.
- RWE Box contains several default classes to use when defining concepts, but implementation sites may also create additional custom concept classes for use.
- examples of some concept classes are
Procedure
:describes a clinical procedure
,diagnosis
:conclusion drawn through findings
e.t.c
Available operations.
List concept classes
List all non-retired concept classes
GET /conceptclass?limit=1
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptclass?limit=1")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=4C92FA7F3401680513E023F3832D82FF")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=4C92FA7F3401680513E023F3832D82FF");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptclass?limit=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Success Response
{
"results": [
{
"uuid": "8d4907b2-c2cc-11de-8d13-0010c6dffd0f",
"display": "Test",
"links": [
{
"rel": "self",
"uri": "/rwe-web/ws/rest/v1/conceptclass/8d4907b2-c2cc-11de-8d13-0010c6dffd0f"
}
]
}
],
"links": [
{
"rel": "next",
"uri": "/rwe-web/ws/rest/v1/conceptclass?limit=1&startIndex=1"
}
]
}
- List all concept classes with a given search query. Returns a
404 Not Found
status if concept classes not exist. If the user is not logged in to perform this action, a401 Unauthorized
status returned.
List concept class type by UUID.
List concept class type by UUID
GET /conceptclass/:target_concept_class_uuid
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptclass/8d4907b2-c2cc-11de-8d13-0010c6dffd0f")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Cookie", "JSESSIONID=FD046011463ABEF58A36F3C87DADC88B")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Cookie", "JSESSIONID=FD046011463ABEF58A36F3C87DADC88B");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/rwe-web/ws/rest/v1/conceptclass/8d4907b2-c2cc-11de-8d13-0010c6dffd0f", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Retrieve a concept class by its UUID. Returns a
404 Not Found
status if concept class type not exists. If user not logged in to perform this action, a401 Unauthorized
status returned.
Create a concept class
Create a concept class
POST /conceptclass
{
"name": "Procedure",
"description": "Describes a clinical procedure"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"name\": \"Procedure\",\r\n \"description\": \"Describes a clinical procedure\"\r\n }");
Request request = new Request.Builder()
.url("/rwe-web/ws/rest/v1/conceptclass/")
.method("POST", body)
.addHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "JSESSIONID=FD046011463ABEF58A36F3C87DADC88B")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Cookie", "JSESSIONID=FD046011463ABEF58A36F3C87DADC88B");
var raw = JSON.stringify({"name":"Procedure","description":"Describes a