FHIR Sink
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
Forward data to a Fhir endpoint.
Configuration Options
The following table summarizes the configuration options available for the fhir-sink
Kamelet:
Property | Name | Description | Type | Default | Example |
---|---|---|---|---|---|
Method Name | Required What sub operation to use for the selected operation. | string | |||
Server URL | Required The FHIR server base URL. | string | |||
Access Token | OAuth access token. | string | |||
API Name | What kind of operation to perform. Enum values: * CAPABILITIES * CREATE * DELETE * HISTORY * LOAD_PAGE * META * OPERATION * PATCH * READ * SEARCH * TRANSACTION * UPDATE * VALIDATE | string | |||
Encoding | Encoding to use for all request. One of: [JSON] [XML]. | string | JSON | ||
Fhir Version | The FHIR Version to use. Enum values: * DSTU2 * DSTU2_HL7ORG * DSTU2_1 * DSTU3 * R4 * R5 | string | R4 | ||
Lazy Start Producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | boolean | false | ||
Log | Will log every requests and responses. | boolean | false | ||
Password | Password to use for basic authentication. | string | |||
Pretty Print | Pretty print all request. | boolean | false | ||
Proxy Host | The proxy host. | string | |||
Proxy Password | The proxy password. | string | |||
Proxy Port | The proxy port. | integer | |||
Proxy User | The proxy username. | string | |||
Username | Username to use for basic authentication. | string |
Dependencies
At runtime, the fhir-sink
Kamelet relies upon the presence of the following dependencies:
-
camel:fhir
-
camel:core
-
camel:kamelet
Camel JBang usage
Prerequisites
-
You’ve installed JBang.
-
You have executed the following command:
jbang app install camel@apache/camel
Supposing you have a file named route.yaml with this content:
- route:
from:
uri: "kamelet:timer-source"
parameters:
period: 10000
message: 'test'
steps:
- to:
uri: "kamelet:log-sink"
You can now run it directly through the following command
camel run route.yaml
Camel K Environment Usage
This section describes how you can use the fhir-sink
.
Knative sink
You can use the fhir-sink
Kamelet as a Knative sink by binding it to a Knative object.
apiVersion: camel.apache.org/v1
kind: KameletBinding
metadata:
name: fhir-sink-binding
spec:
source:
ref:
kind: Channel
apiVersion: messaging.knative.dev/v1
name: mychannel
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: fhir-sink
properties:
methodName: The Method Name
serverUrl: The Server URL
Prerequisite
You have Camel K installed on the cluster.
Kafka sink
You can use the fhir-sink
Kamelet as a Kafka sink by binding it to a Kafka topic.
apiVersion: camel.apache.org/v1
kind: KameletBinding
metadata:
name: fhir-sink-binding
spec:
source:
ref:
kind: KafkaTopic
apiVersion: kafka.strimzi.io/v1beta1
name: my-topic
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1
name: fhir-sink
properties:
methodName: The Method Name
serverUrl: The Server URL
Prerequisites
-
You’ve installed Strimzi.
-
You’ve created a topic named
my-topic
in the current namespace. -
You have Camel K installed on the cluster.
Procedure for using the cluster CLI
-
Save the
fhir-sink-binding.yaml
file to your local drive, and then edit it as needed for your configuration. -
Run the sink by using the following command:
kubectl apply -f fhir-sink-binding.yaml
Procedure for using the Kamel CLI
Configure and run the sink by using the following command:
kamel bind kafka.strimzi.io/v1beta1:KafkaTopic:my-topic -p "sink.methodName=The Method Name" -p "sink.serverUrl=The Server URL" fhir-sink
This command creates the KameletBinding in the current namespace on the cluster.