Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
148 changes: 148 additions & 0 deletions en/docs/assets/img/learn/smart-on-fhir/smart_on_fhir.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions en/docs/install-and-setup/configure-km.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
sidebar_position: 5
title: "Configure IS 7.x as Key Manager"
description: This guide provides step-by-step instructions to configure WSO2 Identity Server 7.x as a Key Manager for WSO2 API Manager, enabling secure API access and management.
---

This guide provides step-by-step instructions to configure WSO2 Identity Server 7.x as a Key Manager for WSO2 API Manager, enabling secure API access and management.

1. Sign in to the Admin Portal of API Manager at https://localhost:9443/admin.
2. Go to **Key Managers** on the left main menu.
![add-key-manager.png](../assets/img/get-started/add-key-manager.png)
3. Configure [WSO2 IS 7.x as a keymanager](https://apim.docs.wso2.com/en/latest/api-security/key-management/third-party-key-managers/configure-wso2is7-connector/). Enable role creation in WSO2 Identity Server 7.
:::tip
You can configure well-known URL (`https://<WSO2_APIM_BASE>:9453/oauth2/token/.well-known/openid-configuration`) and import Key manager endpoints.
:::


:::note
Use the introspection endpoint in the iam-service-extension service to enable healthcare specific introspection response. `https://<IAM_SERVICE_EXTENSION_BASE>:<PORT>/introspect`.
:::
4. Go to the list of Key Managers and select **Resident Key Manager**.
5. Disable the Resident Key Manager.
103 changes: 103 additions & 0 deletions en/docs/install-and-setup/deploy-fhir-apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
sidebar_position: 6
title: "Deploy FHIR APIs"
description: This guide provides step-by-step instructions to deploy FHIR APIs in WSO2 API Manager, enabling healthcare organizations to securely expose and manage their FHIR-based services.
---

# Deploy FHIR APIs

This guide walks through the steps to generate an OpenAPI specification from a FHIR Implementation Guide using the Ballerina Health Tool, and then deploy it as a managed API in WSO2 API Manager using the FHIR Repository as the backend.

## Prerequisites

1. Install and setup [WSO2 Open Healthcare](./manual.md).
2. Install [Ballerina](./manual.md#ballerina-installation-steps) (Swan Lake or later).
3. A FHIR Implementation Guide (IG) to generate the API.

## Step 1 - Generate OpenAPI Specification from a FHIR Implementation Guide
Comment thread
RivinduM marked this conversation as resolved.

The [Ballerina Health Tool](https://ballerina.io/learn/health-tool/#fhir-template-generation) can generate an OpenAPI specification and a Ballerina project template directly from a FHIR Implementation Guide.

1. Pull the Ballerina Health Tool:

```bash
bal tool pull health
```

2. Run the FHIR template generation command, pointing to your Implementation Guide package:

```bash
bal health gen fhir -m template --org-name [ORG_NAME] [IG_PACKAGE_NAME]
```

Replace the placeholders with:
- `[ORG_NAME]`: Your Ballerina organization name (e.g., `healthcare`)
- `[IG_PACKAGE_NAME]`: The Ballerina package name of the FHIR IG (e.g., `ballerinax/health.fhir.r4.uscore501`)

Example:

```bash
bal health gen fhir -m template --org-name healthcare ballerinax/health.fhir.r4.uscore501
```

3. The tool generates a Ballerina project with:
- An OpenAPI specification (OAS) file for each FHIR resource in the IG.
- A Ballerina service template with boilerplate FHIR resource handlers.

4. Locate the generated OAS file(s) in the output directory. These will be used to create the API in WSO2 API Manager.

## Step 2 - Create and Deploy the API in WSO2 API Manager

1. Log in to the WSO2 APIM Publisher Portal at `https://localhost:9443/publisher`.

![WSO2 Publisher Portal](../assets/img/guildes/exposing-an-api/oh-publisher-portal.png)

2. Click **Create API** and select **Import Open API**.

3. Upload the OAS file generated in Step 1 and click **Next**.

4. Fill in the API details:
- **Name**: e.g., `USCorePatientAPI`
- **Context**: e.g., `/fhir/r4`
- **Version**: e.g., `1.0.0`
- **Endpoint URL**: The URL of the running Ballerina FHIR service (e.g., `http://localhost:9090/r4`)

5. Click **Create** to create the API.

6. In the API overview, go to **Deployments** and click **Deploy**:
- Select the target **Gateway** (e.g., Default).
- Click **Deploy**.

7. Go to **Lifecycle** and click **Publish** to make the API available in the Developer Portal.

:::note
Ensure the WSO2 APIM gateway can reach the Ballerina FHIR service endpoint. If running locally, use `host.docker.internal` instead of `localhost` when APIM runs in Docker.
:::

## Step 4 - Verify the Deployment
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

1. Navigate to the Developer Portal at `https://localhost:9443/devportal`.

![WSO2 Developer Portal](../assets/img/guildes/exposing-an-api/oh-developer-portal.png)

2. Find the published FHIR API and confirm it appears in the portal.
3. Invoke the well-known endpoint to verify the FHIR gateway is responding:

```bash
curl https://localhost:8243/r4/.well-known/smart-configuration
```

4. Test a FHIR resource endpoint:

```bash
curl https://localhost:8243/r4/metadata
```

A valid FHIR CapabilityStatement response confirms the API is deployed and the FHIR backend is reachable.

## See Also

- [Manual Installation Guide](./manual.md)
- [Expose FHIR APIs](../fhir/guides/expose-fhir-apis.md)
- [SMART on FHIR — Deploy On Premise](../secure-health-apis/guides/configure-smart-on-fhir.md)
- [Ballerina Health Tool](https://ballerina.io/learn/health-tool/#fhir-template-generation)
168 changes: 127 additions & 41 deletions en/docs/install-and-setup/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,106 @@
sidebar_position: 4
title: "Manual Installation Guide"
description: Provide your wso2 credentials and update the tool.
pagination_next: install-and-setup/configure-km
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Manual Installation Guide

## Setting Up WSO2 API Manager for Healthcare
## Prerequisites
1. Download supported base distribution of [WSO2 API Manager](https://wso2.com/api-platform/api-manager/), [WSO2 Identity Server](https://wso2.com/identity-platform/identity-server/) and [WSO2 Open Healthcare Accelerator](https://github.com/wso2/healthcare-accelerator/releases). Refer to the [Product Compatibilities](#product-compatibilities).

### Prerequisites
1. Download supported base distribution of [WSO2 API Manager](https://wso2.com/api-management/previous-releases/) and [WSO2 Open Healthcare APIM Accelerator](https://github.com/wso2/healthcare-accelerator/releases). Refer to the [Product Compatibilities](#product-compatibilities).
## Product Compatibilities

### Installation Steps
1. Extract WSO2 APIM product. Let's call it `<WSO2_APIM_HOME>`.
2. Navigate to `<WSO2_APIM_HOME>/bin` directory and execute the update command based on the operating system to bring WSO2 API Manager up to date by running the [Update Tool](https://updates.docs.wso2.com/en/latest/updates/update-tool/).
3. You can try the following commands based on your Operating system to update the WSO2 API Manager. As an example, if you are Mac user, we need to execute the following commands.
| WSO2 Healthcare Accelerator | Compatible Base Product |
|:-----------------------------------------------------------------------------------------------:|:-----------------------:|
| [APIM HC Accelerator 1.0.0](https://github.com/wso2/healthcare-accelerator/releases/tag/v1.0.0) | APIM 4.2.0 |
| [APIM HC Accelerator 2.0.0](https://github.com/wso2/healthcare-accelerator/releases/tag/v2.0.0) | APIM 4.3.0 |
| [APIM HC Accelerator 2.1.0](https://github.com/wso2/healthcare-accelerator/releases/tag/v2.1.0) | APIM 4.6.0 |
| [IS HC Accelerator 2.1.0](https://github.com/wso2/healthcare-accelerator/releases/tag/v2.1.0) | IS 7.3.0 |

Provide your wso2 credentials and update the tool.
```bash
./wso2update_darwin
```

Check the latest update level for the product.
```bash
./wso2update_darwin check
```
## Getting Started
1. Extract the base products.
2. Extract the downloaded WSO2 Open Healthcare Accelerator zip files.
3. This document uses the following placeholders to refer to the following products:

Update the product to the latest update level.
```bash
./wso2update_darwin --level 4.2.0.<LATEST_UPDATE_LEVEL>
```
| Product | Placeholder |
-----------------------|----------------------------|
|WSO2 Identity Server | `<WSO2_IS_HOME>` |
|WSO2 API Manager | `<WSO2_APIM_HOME>` |
|WSO2 Open Healthcare Identity Server Accelerator | `<WSO2_OH_IS_ACC_HOME>` |
|WSO2 Open Healthcare API Manager Accelerator | `<WSO2_OH_APIM_ACC_HOME>` |

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
Check the current state of your product.
```bash
./wso2update_darwin current-state
```

4. Extract WSO2 OH APIM Accelerator to `<WSO2_APIM_HOME>`. Let's call it `<WSO2_OH_APIM_ACC_HOME>`.
5. [Optional] Check the accelerator configurations in `<WSO2_HC_APIM_ACC_HOME>`/conf/config.toml file to enable or disable features.
## Getting WSO2 Updates¶
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
The WSO2 Update tool delivers hotfixes and updates seamlessly on top of products as WSO2 Updates. They include improvements that are released by WSO2. You need to update the base products and accelerators using the relevant script.

1. Go to <PRODUCT_HOME>/bin and run the WSO2 Update tool:

- Repeat this step for the WSO2 Identity Server and API Manager products.

<Tabs>
<TabItem value="mac" label="MacOS" default>

```bash
$ ./update_tool_setup.sh
$ ./wso2update_darwin
```

</TabItem>
<TabItem value="linux" label="Linux">

```bash
$ ./update_tool_setup.sh
$ ./wso2update_linux
```

</TabItem>
<TabItem value="windows" label="Windows">

```bash
$ ./update_tool_setup.ps1
$ ./wso2update_windows.exe
```

</TabItem>
</Tabs>

For more information, see the [WSO2 Updates documentation](https://updates.docs.wso2.com/en/latest/updates/overview/).

## Setting up Accelerators

This section guides you to set up and prepare your server to run WSO2 Open Healthcare Accelerator.

### Setting Up WSO2 API Manager for Healthcare

1. Install WSO2 Open Healthcare AM Accelerator¶
- Copy the extracted WSO2 OH APIM Accelerator to `<WSO2_APIM_HOME>`. Let's call it `<WSO2_OH_APIM_ACC_HOME>`.
- [Optional] Check the accelerator configurations in <WSO2_HC_APIM_ACC_HOME>/conf/config.toml file to enable or disable features.

2. Run the merge script in <WSO2_APIM_HOME>/<WSO2_HC_APIM_ACC_HOME>/bin:
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

```bash
./merge.sh
```

### Setting Up WSO2 Identity Server for Healthcare

1. Install WSO2 Open Healthcare IS Accelerator¶
- Copy the extracted WSO2 OH IS Accelerator to `<WSO2_IS_HOME>`. Let's call it `<WSO2_OH_IS_ACC_HOME>`.
- [Optional] Check the accelerator configurations in <WSO2_HC_IS_ACC_HOME>/conf/config.toml file to enable or disable features.

2. Run the merge script in <WSO2_IS_HOME>/<WSO2_HC_IS_ACC_HOME>/bin:

```sh
./merge.sh
```

:::note
Accelerator configs looks like below;

| Setting Description | Configuration Option | Default Value |
|-------------------------------------------------------------|--------------------------------------|---------------|
| Enable or disable auto-generation of the FHIR capability statement | `enable_fhir_metadata_endpoint` | `true` |
Expand All @@ -51,15 +111,6 @@ Accelerator configs looks like below;
| Enable or disable the healthcare theme | `enable_healthcare_theme` | `true` |

:::
6. Navigate to `<WSO2_OH_APIM_ACC_HOME/bin>` directory and execute the following command. This will copy the artifacts to the WSO2 APIM and add the required configurations.
```sh
./merge.sh
```

6. Navigate to `<WSO2_APIM_HOME>` directory and execute following command to start the APIM server with WSO2 OH Accelerators.
```sh
./bin/api-manager.sh
```

:::note
Running `./bin/merge.sh` script creates a audit log folder in the product home. Structure of it looks like below;
Expand All @@ -81,11 +132,6 @@ Mon May 31 22:01:55 +0530 2021 - john - WSO2 Open Healthcare API Manager 1.0.0 A
- `backup` folder contains the files that were originally there in the APIM product before running the accelerator. Please note that only the last state will be there.

:::
### Product Compatibilities

| Product | Compatible Healthcare Accelerator |
|---------------------------|-----------------------------------------|
|<center>APIM 4.2.0</center>|<center>[APIM HC Accelerator 1.0.0](https://github.com/wso2/healthcare-accelerator/releases/tag/v1.0.0)</center> |

## Setting Up Integration Layer for Healthcare

Expand All @@ -97,10 +143,50 @@ These guides use [Ballerina](https://ballerina.io/), a language designed for int
### Ballerina

<a id="ballerina-installation-steps"></a>

### Installation Steps

Go through the following steps to setup the Ballerina.

1. Follow the instructions in the <a href="https://ballerina.io/downloads/installation-options/" target="_blank">Ballerina Installation Options</a> to install Ballerina runtime.

2. Setup the Ballerina VSCode extension by following the instructions in the <a href="https://ballerina.io/learn/get-started/#set-up-the-editor/" target="_blank">Ballerina VSCode Extension</a> guide.

## Exchanging the certificates

In order to enable secure communication, we need to install the certificates of each component in others. This will facilitate a Secure Socket Layer (SSL). Follow the steps below to implement this:

:::note
Here Server A can be either IS, APIM or any other product.
:::

1. Generate a key against the keystore of a particular server. For example, server A with an alias and common name that is equal to the hostname.

```sh
keytool -genkey -alias <keystore_alias> -keyalg RSA -keysize 2048 -validity 3650 -keystore <keystore_path> -storepass <keystore_password> -keypass <key password> -noprompt
```
2. Export the public certificate of the newly generated key pair.

```sh
keytool -export -alias <cert_alias> -file <certificate_path> -keystore <keystore path>>
```

3. Import the public cert of Server A to the client truststores of all the servers including Server A.

```sh
keytool -import -trustcacerts -alias <cert_alias> -file <certificate_path> -keystore <trustore_path> -storepass <keystore_password> -noprompt
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
```

4. Repeat above steps for all the servers.

## Start servers

1. Run the following command in <WSO2_IS_HOME>/bin:
```bash
./wso2server.sh
```
2. Run the following command in <WSO2_APIM_HOME>/bin:

```bash
./api-manager.sh
```
Loading
Loading