WSO2+PING logo

Open Healthcare Sandbox

Overview

This step-by-step guide walks you through the WSO2 + Ping Open Healthcare sandbox.

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. 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 to access the sandbox developer environment

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

In the email you receive with the credentials

2. Signing In

2.1. Sign in with the received credentials.

Sign in with the received credentials

3. Open Healthcare Sandbox Environment

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

Open Healthcare Sandbox Environment

In the Sandbox Environment, you can view the API’s configurations and invoke pre-deployed FHIR® APIs.

3.1. Click on an API and you can see the overview page.

Open Healthcare Sandbox Environment

3.2. You can access the API Developer Portal from the top navigation bar.

Click on an API and you can see the overview page

4. Invoking APIs

When you sign in to the API Developer Portal as a user, you view the published APIs on the Developer Portal. It allows you to discover and invoke the required APIs.

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

Click on an API and you can see the overview page

4.2. Scroll down the Overview page of the API and you can see that the User is already subscribed to an Application.

Click on an API and you can see the overview page

You can view all the subscriptions under the Subscriptions tab.

Click on an API and you can see the overview page Click on an API and you can see the overview page

4.3. Click Applications

  • Click the application that you used to subscribe to the API (SampleApplication).
  • Click Production Keys
  • Click Generate Access Token to generate an access token.
Click on an API and you can see the overview page

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

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

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

Click on an API and you can see the overview page

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

Click on an API and you can see the overview page Click on an API and you can see the overview page

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

Click on an API and you can see the overview page Click on an API and you can see the overview page Click on an API and you can see the overview page

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 4.1 - 4.3] to successfully subscribe to an application and generate production keys for the same.

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

click Proceed

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

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

click Proceed

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

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

click Proceed

5. 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 - https://fhir.sandbox-healthcare.wso2.com/gw/t/wso2-ping.org/.well-known/smart-configuration
  • Capability Statement - https://fhir.sandbox-healthcare.wso2.com/gw/t/wso2-ping.org/metadata

Example Statements:

https://fhir.sandbox-healthcare.wso2.com/gw/t/wso2-ping.org/.well-known/smart-configuration

click Proceed

https://fhir.sandbox-healthcare.wso2.com/gw/t/wso2-ping.org/metadata

click Proceed

For learning more, see HL7 FHIR® Capability Statements.

6. PingIntelligence for APIs Dashboard

The PingIntelligence for APIs Dashboard delivers visibility into API activity and abnormal behavior from clients accessing FHIR® APIs.

Note: In the email you receive with the link and the credentials that are required to sign on the PingIntelligence for APIs Dashboard.

6.1. Click the given link to access the PingIntelligence for APIs Dashboard.

6.2. Enter the given username and password.

6.3. Click Sign On.

You will login to the main Dashboard which shows the aggregate API activity.

6.4. To get more detail on the Patient API, click on the link under per API activity to access the API details page

click Proceed

6.5. The API Dashboard shows activity and indicators of attack on the API. It also shows the most active users. Click on a user to get details on the user activity.

click Proceed

6.6. This screen shows the API activity, Indicators of Attack, and other information for this user. You can also look at the individual tokens or IP addresses used. When you are done exploring the activity, click on Home.

click Proceed

6.7. From the Home page, you can review indicators of attack on the APIs. Click on the user blacklist to see a list of users which were flagged for abnormal activity.

click Proceed

6.8. Select a user from the blacklist, such as [email protected]

click Proceed

6.9. Select an indicator of attack to get more insight on the abnormal behavior

click Proceed

6.10. Review the attack description and click on forensics to see activity detail.

click Proceed

6.11. Review the API activity, URLs accessed, and Indicators of Attack. Click on Home to look at additional information

click Proceed

7. Sample Integration Project

7.1. Click here to download the 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

7.2. Download WSO2 Integration Studio.

7.3. Navigate to the <microesb> folder.

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

7.5. 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.

7.6. Open the Integration Studio application.

click Proceed

7.7. To import the project, click Open Project.

click Proceed

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

click Proceed click Proceed

7.9. Click Finish to complete importing the project.

click Proceed

You have successfully imported the project into the Integration Studio.

click Proceed

7.10. 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.

7.11. Open a terminal

7.11.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

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

create database Insurance1DB;

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

use Insurance1DB;

7.11.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.

source
WSO2OHSampleIntegrationProjects/WSO2OHSampleHospitalDataService/
dbscripts/Insurance1DB_SelfContained.sql;

Setting up the MySQL configurations

7.12. Click Server Configuration.

click Proceed

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

click Proceed

7.13. Add following configurations to the file.

[[datasource]]
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

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

click Proceed

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

click Proceed

7.16. Click Environment tab.

click Proceed

7.17. Click Add to add a new environment variable.

click Proceed

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

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

click Proceed

7.19. Click Apply and close the window.

click Proceed

Running the Integration Project

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

click Proceed

7.21. Select the three artifacts WSO2OHSampleIntegrationProjectConfigs, WSO2OHSampleIntegrationProjectConnectorExporter & SampleHospitalDataService.
Click Finish.

click Proceed

7.22. Invoke APIs using Postman as shown below.

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

click Proceed