Module health.fhir.templates.r4.metadata
ballerinax/health.fhir.templates.r4.metadata Ballerina library
FHIR Capability Statement API Template
Usage
This section focuses on how to use this template to implement, configure and deploy FHIR Metadata API of a FHIR server:
Prerequisites
- Install Ballerina 2201.6.0 (Swan Lake Update 6) or later
Setup and run in VM or Developer Machine
-
Create an API project from this template
bal new -t ballerinax/health.fhir.templates.r4.metadata <PROJECT_NAME>
-
Update deployed FHIR resource data in
/resources/resources.json
-
Perform necessary updates in configurations.
-
Run by executing command:
bal run
in your terminal to run this package. -
Invoke
<BASE_URL>/fhir/r4/metadata/
- Invoke from localhost :
http://localhost:9090/fhir/r4/metadata/
- Invoke from localhost :
Setup and deploy on Choreo
-
Create an API project from this template
bal new -t ballerinax/health.fhir.templates.r4.metadata <PROJECT_NAME>
-
Update deployed FHIR resource data in
/resources/resources.json
-
Perform necessary updates in configurations.
-
Create GitHub repository and push created source to relevant branch
-
Follow instructions to connect project repository to Choreo
-
Deploy API by following instructions to deploy and test
-
Invoke
<BASE_URL>/fhir/r4/metadata/
https://<HOSTNAME>/<TENANT_CONTEXT>/fhir/r4/metadata/
Configurations
Following configurations can be configured in Config.toml
or Choreo configurable editor
Configuration | Description |
---|---|
version | Business version of the capability statement eg: 0.1.7 |
name | Name for this capability statement (computer friendly) eg: WSO2 Open Healthcare FHIR |
title | Name for this capability statement (human friendly) eg: FHIR Server |
status | draft / active / retired / unknown eg: active |
experimental | For testing purposes, not real usage eg: true |
date | Date last changed eg: 26-01-2023 |
kind | instance / capability / requirements eg: instance |
fhir_version | FHIR Version the system supports eg: 4.0.1 |
format | formats supported (json ) eg: [json] |
patch_format | Patch formats supported eg: [application/json-patch+json] |
implementation_url | Base URL for the installation eg: https://choreoapis/dev/fhir_server/0.1.5 |
implementation_description | Describes this specific instance eg: WSO2 Open Healthcare FHIR |
interactions | The that operations are supported eg: [search-system, history-system] |
security_cors | CORS Headers availability eg: true |
token_url | OAUTH2 access token url eg: https://sts.choreo.dev/oauth2/token |
revoke_url | OAUTH2 access revoke url eg: https://sts.choreo.dev/oauth2/revoke |
authorize_url | OAUTH2 access authorize url eg: https://sts.choreo.dev/oauth2/authorize |
Sample Configurables in Config.toml
## server related configurables [server_info] version = "0.1.5" name = "WSO2 Open Healthcare FHIR" title = "FHIR Server" status = "active" experimental = true date = "2023-01-08" kind = "instance" fhir_version = "4.0.1" format = ["json", "xml"] patch_format = ["application/json-patch+json"] implementation_url = "https://d52c48b3-b62e-4a9c-966b-585f22b4711d-dev.e1-us-east-azure.choreoapis.dev/d7k7/fhir_server/0.1.5" implementation_description = "WSO2 Open Healthcare FHIR" interactions = ["search-system"] ## server security related configurables [security] security_cors = true token_url = "https://sts.choreo.dev/oauth2/token" revoke_url = "https://sts.choreo.dev/oauth2/revoke" authorize_url = "https://sts.choreo.dev/oauth2/authorize"