This is an example application of the camel-fhir
component. We’ll be using camel-spring-boot
as well for an easy setup.
The Camel route is located in the MyCamelRouter
class.
This example will read HL7V2 patients from a directory and convert them to FHIR dtsu3 patients and upload them to a configured FHIR server.
The example assumes you have a running FHIR server at your disposal. You may use hapi-fhir-jpa-server-example.
By default, the example uses http://localhost:8080/baseDstu3
as the FHIR server URL, DSTU3 as the FHIR version and target/work/fhir/input
as the directory to look for HL7V2 patients.
However, you can edit the application.properties
file to override the defaults and provide your own configuration.
There is an example of a test in the MyCamelApplicationTest
class, which mocks out the FHIR server, thus can be run without the FHIR server.
You can run this example using:
$ mvn spring-boot:run
When the Camel application runs, you should see a folder created under target/work/fhir/input
. Copy the file hl7v2.patient
located in the src/main/data
folder into it. You should see the following output:
2018-07-24 11:52:51.615 INFO 30666 --- [work/fhir/input] fhir-example: Converting hl7v2.patient
2018-07-24 11:52:52.700 INFO 30666 --- [work/fhir/input] fhir-example: Inserting Patient: {"resourceType":"Patient","id":"100005056","name":[{"family":"Freeman","given":["Vincent"]}]}
2018-07-24 11:52:56.995 INFO 30666 --- [ #2 - CamelFhir] fhir-example: Patient created successfully: ca.uhn.fhir.rest.api.MethodOutcome@270f03f1
The Camel application can be stopped pressing kbd:[Ctrl+c] in the shell.
To show a summary of spring boot health check
curl -XGET -s http://localhost:8080/actuator/health
If you hit any problem using Camel or have some feedback, then please let us know.
We also love contributors, so get involved :-)
The Camel riders!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。