Mercurial > hg > orthanc-java
view Samples/FHIR/NOTES.txt @ 73:037a2b0d06ca OrthancJava-2.0
OrthancJava-2.0
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 22 Aug 2025 10:24:13 +0200 |
parents | ff6e57d0d474 |
children |
line wrap: on
line source
This sample Java plugin runs a FHIR server based on the HAPI library. Note that contrarily to the "Basic" and "Dcm4Che" samples that can run using Java 1.8, this Java plugin requires Java 11. (1) Make sure to build the C++ plugin: # cd ../../Plugin/ # mkdir Build # cd Build # cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_ORTHANC_SDK=OFF # make -j4 (2) Make sure to build the Java wrapper: # cd ../../JavaSDK/ # mkdir Build # cd Build # cmake .. -DUSE_SYSTEM_ORTHANC_SDK=OFF -DCMAKE_INSTALL_PREFIX=.. # make -j4 install (3) Compile the Java plugin using Maven: # cd ../../Samples/FHIR # mvn compile package (4) Start Orthanc: On Ubuntu 20.04 or 22.04 (replace "mainline" with the version of the Java plugin for Orthanc, cf. "../global.properties"): # LD_LIBRARY_PATH=/usr/lib/jvm/java-11-openjdk-amd64/lib/server/ \ ORTHANC_JAVA_VERSION=mainline \ Orthanc ./configuration.json IMPORTANT: The DICOMweb plugin must be installed in the current directory to support the "ImagingStudy" FHIR resource that makes use of DICOMweb. (5) Access the FHIR server. For instance, using the FHIRPACK command-line client (https://gitlab.com/fhirpack/main): On Ubuntu 20.04: $ python3.9 -m pip install --user --upgrade pip $ python3.9 -m pip install --user --upgrade cffi fhirpack $ fp -s http://localhost:8042/fhir -o "getPatients" -p all -o "gatherSimplePaths id name.family name.given birthDate" $ fp -s http://localhost:8042/fhir -o "getEndpoints" -p all -o "gatherSimplePaths id address" $ fp -s http://localhost:8042/fhir -o "getImagingStudies" -p all -o "gatherSimplePaths identifier.value endpoint.reference subject.reference"