WSO2 Open Healthcare Sandbox


This step-by-step guide walks you through the WSO2 Open Healthcare solution.

Note: The Sandbox Environment provides a limited set of functions. If you want to experience the full solution, contact us.

1. Signing Up

Sign up by creating a new account to access the sandbox.

1.1. Visit the Open Healthcare website, and click TRY IT OUT to open the sign-up page.

Signing Up

1.2. If you are a first-time user, create a new account to access the sandbox developer environment.

  • Provide the required information as shown below, and click Sign Up.
  • Add a valid business email address to obtain an email with your credentials.
create a new account

1.3. In the email you receive with the credentials that are required to sign in, click Proceed to sign in.

click Proceed

2. Signing In

2.1. Sign in with the received credentials.

click Proceed

2.2. Update the password, and click Submit to reset your password at your first login before accessing the sandbox.

click Proceed

2.3. Enter the new username and password, and click Continue to sign in again with the new password.

click Proceed

3. WSO2 Open Healthcare Sandbox Environment

Once you have logged in, you view the homepage of the WSO2 Open Healthcare Sandbox Environment as shown below.

click Proceed

In the Sandbox Environment, you can deploy pre-built FHIR® APIs, create third-party applications, and invoke FHIR® APIs, etc.

3.1. You can access the API Publisher Portal and the API Developer Portal from the top navigation bar.

click Proceed

4. Deploying Pre-built FHIR® APIs

4.1. Click Open to start selecting FHIR® APIs.

click Proceed

4.2. Select the required FHIR® APIs from the given list.

Note: There is a limited number of APIs available in the Sandbox Environment.

  • The selected APIs are shown on the right side as Selected FHIR® APIs.
  • Click Next after selecting the APIs.
click Proceed

4.3. Configure the deployment options for the APIs.

click Proceed

4.4. Click Deploy.

click Proceed

4.5. Click Yes to confirm the deployment.

click Proceed

After the deployment, a summary of the deployment will be displayed as shown below.

click Proceed

You view the resources for each of the published APIs.

click Proceed

Note: Follow the below steps if you encounter any errors/failures when deploying your APIs.

  • Sign in to the API Publisher portal and try to publish your APIs via the Publisher portal.
  • Contact us for further assistance.

4.6. Click Download Integration Project to download the integration project file.

click Proceed

Info: Click the Learn more... to learn more about the integration project and how to import projects into WSO2 Enterprise Integrator.

click Proceed

4.7. When you are all set, click Finish.

click Proceed

4.8. Click Yes on the warning pop-up.

click Proceed

5. Registering a SMART on FHIR® Application

5.1. Sign in to the developer portal and click ​Applications​.

click Proceed

The applications owned or shared with you are listed in the view below.

click Proceed

WSO2 Open Healthcare sandbox comes with a pre-created DefaultHealthcareApp application, which allows 10 requests per minute by default.

click Proceed

You can also register your own SMART on FHIR® applications.

5.2. Click Applications and click Add New Application.

click Proceed

5.3. Enter the required application details, and click Save.

Note: There is only one throttling policy (10PerMin) enabled in the sandbox.

click Proceed

Once you successfully create the application, you will be redirected to the application Overview page of the application.

click Proceed

5.4. Click Applications to navigate to the Applications listing page.

You view your new application listed with the other applications. The application owner can edit or delete the application.

click Proceed

6. Invoking APIs

When you sign in to the API Developer Portal as an application owner/developer, you view the published APIs on the Developer Portal. It allows you to discover and invoke the required APIs.

6.1. Sign in to the Developer Portal and click on an API you wish to invoke.

click Proceed

6.2. Scroll down the Overview page of the API and click Subscribe to subscribe to the API using an application and an available throttling policy.

click Proceed

6.3. Select an application and an available throttling policy, and click Subscribe.

click Proceed

You view all the subscriptions under the Subscriptions tab.

click Proceed click Proceed

6.4. Click Applications

  • Click on the application that you used to subscribe to the API.
  • Click Production Keys.
  • Click Generate Keys to generate a production key.
click Proceed

The sandbox supports the two options below to invoke APIs.

  • Invoking an API using the Integrated API Console.
  • Invoking an API using an API Client.

Option 1: Invoking an API Using the Integrated API Console

6.5. Click APIs, and click on the API that you need to invoke.

6.6. Click Test under the resources section of the API.

click Proceed

6.7. On the API Console, click Get Test Key to add the access token in the Authorization field to test your API.

click Proceed click Proceed

6.8. Expand the resource method (e.g., GET method), click Try it out, and then click Execute.

click Proceed click Proceed click Proceed

Now, you view the success response for the API invocation on the console.

click Proceed

Option 2: Invoking an API Using an API Client

Follow the [steps 6.1 - 6.4] to successfully subscribe to an application and generate production keys for the same.

6.9. Copy the access token to the [clipboard you generated].

click Proceed

6.10. Click APIs and then click the API you want to invoke.

6.11. Click the “Overview tab and under the ​Gateway Environments section​, and expand ​Production and Sandbox​ to retrieve the API’s base URL.

click Proceed

6.12. Use your preferred API client and invoke the API.

For example, if you use Postman, you can do it as shown below.

click Proceed

7. Invoking the Capability Statement and Well-Known Uniform Resource Identifiers

Capability statements are auto-generated based on the deployed FHIR® APIs.

The below are the open URLs (no authentication is required) for the statements. The following URL format has to be used to generate the capability statement.

  • Well-Known Uniform Resource Identifiers -<tenant>/.well-known/smart-configuration
  • Capability Statement -<tenant>/metadata

Your tenant name is the part that comes after the `@` character in your username.

click Proceed

Example Statements:

click Proceed

click Proceed

For learning more, see HL7 FHIR® Capability Statements.

8. Sample Integration Project

Info: Sample Integration project includes an application which will connect to a back-end database, which contains the sample health data. It will transform that data from the database into FHIR® format and expose the same as FHIR® APIs accordingly.

Importing Projects into the WSO2 Integration Studio

You can import the downloaded project with the WSO2 integration Studio.

Configuring Integration Studio

8.1. Download WSO2 Integration Studio.

8.2. Navigate to the <microesb> folder.

8.3. For example, if you are using Linux, your <microesb> folder would be /IntegrationStudio/runtime/microesb.

8.4. Download the provided files and copy them into the required folder as shown below.

Note: Make sure to copy these files before starting the Integration Studio.

Importing the Downloaded Integration Project to the Integration Studio

Now, you can run the Integration Studio and import the previously-downloaded project file into it.

8.5. Open the Integration Studio application.

click Proceed

8.6. To import the project, click Open Project.

click Proceed

8.7. Select the root directory of the downloaded Integration Project file.

click Proceed click Proceed

8.8. Click Finish to complete importing the project.

click Proceed

You have successfully imported the project into the Integration Studio.

click Proceed

8.9. Double click the project files to view the visual integration flow.

click Proceed click Proceed

Info: The following advanced step-by-step instructions will explain how to export the APIs, invoke APIs and run the integration project.

Invoking APIS in Integration Studio

Executing the database scripts on MySQL

Note: You need to set up MySQL before going through the following steps.

8.10. Open a terminal

8.10.1. Start the MySQL service and log in as the root user. If you are using Linux, you can use the following commands.

sudo /etc/init.d/mysql start

mysql -u root -p

8.10.2. Execute the command below to create a database named ‘Insurance1DB’.

create database Insurance1DB;

8.10.3. Execute the command below to change the working database to the created database.

use Insurance1DB;

8.10.4. Execute the database script Insurance1DB_SelfContained.sql

This script is in the WSO2OHSampleIntegrationProjects/WSO2OHSampleHospitalDataService/dbscripts folder.

Use the below command to execute the script.


Setting up the MySQL configurations

8.11. Click Server Configuration.

click Proceed

This is the deployment.toml file for the Micro Integrator.

click Proceed

8.12. Add following configurations to the file.

id = "Insurance1DB"
url = "jdbc:mysql://localhost:3306/Insurance1DB"
username = "root"
password = "root"
driver = "com.mysql.jdbc.Driver"

Click Save.

click Proceed

Configuring Environment Variables in Micro Integrator

8.13. Right click on the WSO2OHSampleIntegrationProject and select Run As -> Run Configurations

click Proceed

8.14. In the Run configurations window, Click Generic Server.

click Proceed

8.15. Click Environment tab.

click Proceed

8.16. Click Add to add a new environment variable.

click Proceed

8.17. Add a new variable as given below and click OK.

Name = wso2_oh_sample_baseUrl
Value = https://localhost:8290/services/odata

click Proceed

8.18. Click Apply and close the window.

click Proceed

Running the Integration Project

8.19. Right click on the WSO2OHSampleIntegrationProject and select Run As -> Run on Micro Integrator.

click Proceed

8.20. Click Finish.

click Proceed

8.21. Invoke APIs using Postman as shown below.

GET url - https://localhost:8290/r4/Patient

click Proceed