NAV Navbar
shell java javascript

RWE Box REST API

Getting started with examples.

  1. Before executing the examples, make sure that resources corresponding to the UUID's used in the examples are present on the demo server.
  2. Before executing the examples, append the base server url before the examples for e.g. change /rwe-web/ws/rest/v1/concept as https://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

Purpose

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

Subresources

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();

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

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();

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

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"
    ]
}

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:

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));

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));

System Setting

System Setting Overview

Available operations for systemsetting type.

  1. List System Settings
  2. Create a System Setting
  3. Update a System Setting
  4. Delete a System Setting

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));

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));

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));

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));

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));

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

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));

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

  1. List users
  2. Create a user
  3. Update a user
  4. Delete a 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));

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'


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));

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));

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.

  1. List roles
  2. Create a role
  3. Update a role
  4. Delete a 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));

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));

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))


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));

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.

  1. List privilege
  2. Create a privilege
  3. Update a privilege
  4. Delete a privilege

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));

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));

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));

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));

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));

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

Addresses

Person Attributes

Available Operations for Person type

  1. Search Persons
  2. Create Persons
  3. Update Persons
  4. Delete Persons
  5. List person name
  6. Create person name
  7. Update person name
  8. Delete person name
  9. List person addresses
  10. Create person address
  11. Update person address
  12. Delete person address
  13. List person attributes
  14. Create person attribute
  15. Update person attribute
  16. 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"
        }
    ]
}

Update a person

POST /person/:target_person_uuid
{
    "gender": "M",
    "birthdate": "1997-01-13",
}

Delete a person

DELETE /person/:target_person_uuid?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

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));

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));

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));

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));


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 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));

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)


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));

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));

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

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));

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())


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));

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));


Person Attribute Type

Person Attribute Type Overview

Available operations.

  1. List person attribute types
  2. Create a person attribute type
  3. Update a person attribute type
  4. 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));

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));

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));

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))


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));

Patients

Patients Overview

Subresource types of Patient

PatientIdentifier (Identifier)

Allergy

Available operations for Patients

  1. List Patients
  2. Create a patient record
  3. Update a patient record
  4. Delete a patient record
  5. List patientIdentifier sub resource
  6. Create patientIdentifier sub resource with properties
  7. Update patientIdentifier sub resource
  8. Delete patientIdentifier sub resource
  9. List allergy sub resource
  10. Create allergy sub resource with properties
  11. Update allergy sub resource
  12. 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
    }
    ]
}

Update a patient

    POST /patient/:target_patient_uuid
    -d modified_patient_object

Delete a patient

DELETE /patient/:target_patient_uuid?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"
        }
    ]
}

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));

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));

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));

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));

List allergy subresources

GET /patient/:target_patient_uuid/allergy/:target_allergy_uuid

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"
        }
    }
]
}

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"
    }
}
]
}

Delete allergy sub resource with properties

DELETE /patient/:target_patient_uuid/allergy/:target_allergy_uuid

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

  1. List PatientIdentifierType resources
  2. Create a patientIdentifierType record
  3. Update a patientIdentifierType record
  4. 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
        }
    ]
}

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));

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));

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));

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));

Patient Activity

Patient Activity Overview

Available operations for Patient Activity.

  1. List patientActivitys
  2. Update patientActivities

List patientActivitys

POST /ws/rest/v1/patientActivity
{
  "beginDateCreatedStr": '2018-10-01 00:00:00',
  "endDateCreatedStr": '2018-10-21 23:59:59'
}
GET /ws/rest/v1/patientActivity/{uuid}

Update patientActivities

Update a patientActivity using its UUID

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

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

Available operations for Visits

  1. List visits
  2. Create visit
  3. Update visit
  4. Delete visit
  5. List attribute subresource
  6. Create attribute subresource with properties
  7. Update attribute subresource
  8. Delete attribute subresource

List visits

GET /visit?
includeInactive=true
&fromStartDate=2016-10-08T04:09:23.000Z
&patient=target_patient_uuid
&location=target_location_uuid

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

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"
    }
    ]
}

Update visit

POST /visit/:target_visit_uuid
-d  modified_visit_object

Delete visit

DELETE /visit/:target_visit_uuid?purge=true

List attribute subresources

GET /visit/:target_visit_uuid/attribute 

Create an attribute subresource with properties

POST visit/:target_visit_uuid/attribute 
{
    "attributeType": "target_attribute_type_uuid",
    "value": "value_for_the_attriute"
}

Update attribute subresource

POST visit/:target_visit_uuid/attribute/:target_attribute_uuid
{
    "attributeType": "target_attribute_type_uuid",
    "value": "modified_attriute_value"
} 

Delete attribute subresource

DELETE /visit/:target_visit_uuid/attribute/:target_attribute_uuid

Visits Type

Visits Type Overview

Available operations for Visits Type

  1. List visits types
  2. Create a visit type
  3. Update a visit type
  4. Delete a visit 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"
        }
    ]
}

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));

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));

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));

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));

Visits Attribute Type

Visits Attribute Type Overview

Available operations for Visits Attribute Type

  1. List visits attribute types
  2. Create a visit attribute type
  3. Update a visit attribute type
  4. 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"
        }
    ]
}

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));

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));

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));

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));

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

Location Sub Resource types

Location Attribute.

Available operations for location

  1. List location
  2. Create a location
  3. Update a location
  4. Delete a location
  5. List location attribute subresource
  6. Create location attribute subresource with properties
  7. Update location attribute subresource
  8. 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"
        }
    ]
}

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"
        }
    ]
}       

Delete a location

DELETE /location/:target_location_uuid?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"
}

Update a location attribute subresource

POST location/:target_location_uuid/attribute/:target_location_attribute_uuid
{
    "attributeType": "target_attribute_type_uuid",
    "value": "modified_attriute_value"
} 

Delete a location attribute subresource

DELETE /location/:target_location_uuid/attribute/:target_location_attribute_uuid

Location Tag Type

Location Tag Overview

Available operations for Location Tag

  1. List location tags
  2. Create a location tag
  3. Update a location tag
  4. Delete a 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
}

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"
}

Delete a location tag

DELETE /locationtag/:target_location_tag_uuid?purge=true

Location Attribute Type

Location Attribute Overview

Available operations for Location Attribute

  1. List location attribute types
  2. Create a location attribute type
  3. Update a location attribute type
  4. 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"
}

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"
}

Delete a location attribute type

DELETE /locationattributetype/:target_location_attribute_type_uuid?purge=true

Encounters

Encounter Overview

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

Available operations for Encounter

  1. List encounters
  2. Create an encounter
  3. Update an encounter
  4. Delete an encounter
  5. List encounter provider sub resource
  6. Create encounter provider sub resource with properties
  7. Update encounter provider sub resource
  8. 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"
    }
  ]
}

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"
    }
  ]
}

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

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"
}

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"
}

Delete encounter provider subresource

DELETE /encounter/:target_encounter_uuid/encounterprovider/:target_encounter_provider_uuid

Encounter Type

Encounter Type Overview

Available operations for Encounter Type

  1. List encounter types
  2. Create an encounter type
  3. Update an encounter type
  4. Delete an 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"
}

Update an encounter type

POST /encountertype/:target_encounter_type_uuid
{
    "name": "Discharge",
    "description": "Encounters related to hospital dischargers"
}

Delete an encounter type

DELETE /encountertype/:target_encounter_type_uuid?purge=true

Concepts

Concepts Overview

Sub Resource types of Concepts

Concept Attribute

Concept Name

Concept Mapping

Concept Description.

Available operations for Concepts

  1. List concepts
  2. Create a concept
  3. Update a concept
  4. Delete a concept
  5. List concept mapping
  6. Create concept mapping with properties
  7. Update concept mapping
  8. Delete concept mapping
  9. List concept name
  10. Create concept name with properties
  11. Update concept name
  12. Delete concept name
  13. List concept attribute
  14. Create concept attribute with properties
  15. Update concept attribute
  16. Delete concept attribute
  17. List concept description
  18. Create concept description with properties
  19. Update concept description
  20. [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"
        }
    ]
}

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));

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));

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));

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));

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"
        }
    ]
}

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));

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));

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));

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));

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"
        }
    ]
}

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));

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));

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())


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));

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"
        }
    ]
}

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));

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));

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));

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));

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"
        }
    ]
}

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));

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))


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));

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));

Concept Source

Concept Source Overview

Available operations for Concept Source.

  1. List concept_source types
  2. Create a concept_source
  3. Update a concept_source type
  4. 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"
        }
    ]
}

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));

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));

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));

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));

### Query Parameters

Parameter Type Description
purge Boolean The resource will be voided/retired unless purge = ‘true’

Concept Attribute Type

Concept Attribute Type Overview

Available operations for Concept Attribute Type.

  1. List concept_attribute types
  2. Create a concept_attribute_type
  3. Update a concept_attribute type
  4. 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"
        }
    ]
}

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));

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));

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));

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));

Concept Data Type

Concept Data Type Overview

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.

  1. List concept_data types
  2. Delete a 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 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));

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));

Concept Map Type

Overview

Available operations.

  1. List concept mapping types
  2. Create a concept mapping type
  3. Update a concept mapping typee
  4. 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"
        }
    ]
}

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));

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));

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));

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));

Concept Reference Term

Overview

Available operations.

  1. List concept reference terms
  2. Create a concept reference term
  3. Update a concept reference term
  4. 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"
                }
            ]
        }
    ]
}

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));

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));

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));

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));

Concept Class

Overview

Available operations.

  1. List concept classes
  2. Create a concept class
  3. Update a concept class
  4. Delete a concept class

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 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));

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 clinical procedure"});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("/rwe-web/ws/rest/v1/conceptclass/", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error',