hapifhir / org.hl7.fhir.core

Apache License 2.0
156 stars 162 forks source link
fhir

HAPI FHIR - HL7 FHIR Core Artifacts

CI Status (master)
Build Status

This is the java core object handling code, with utilities (including validator), for the FHIR specification. included in this repo:

This code is used in all HAPI servers and clients, and also is the HL7 maintained FHIR Validator. In addition, this is the core code for the HL7 maintained IG publisher and FHIR main build publisher. As such, this code is considered an authoritatively correct implementation of the core FHIR specification that it implements.

Building this Project

Prerequisites

This project uses Java (minumum version 11), Apache Maven, and Lombok to build. You can find detailed instructions on setting up this project in your IDE here.

Build Commands

To build and add artifacts to your local Maven repository:

mvn install

To skip unit tests:

mvn -Dmaven.test.skip install

Note: If you're on Windows and use PowerShell, The - needs to be escaped with a backtick (`)

mvn `-Dmaven.test.skip install

To clean and rebuild the terminology server caches:

clean

mvn clean -Dfhir.txcache.clean=true   

rebuild

mvn test -Dfhir.txcache.rebuild=true

The source contains cached terminology server responses for testing. If the expected responses have changed in any way, this cache should be cleaned and rebuilt with the above so that subsequent mvn test calls will have the most current responses cached.

To build only the validator_cli jar locally:

mvn clean package -Dmaven.test.skip=true --projects org.hl7.fhir.validation.cli --no-transfer-progress
cp org.hl7.fhir.validation.cli/target/org.hl7.fhir.validation.cli*-SNAPSHOT.jar ./validator_cli.jar

_This will produce ./validator_cli.jar in the project root directory._

Releases

The built binary for the FHIR command-line validator is released through GitHub releases and can be downloaded directly here. For instructions on using this validator visit the FHIR Validator Confluence page.

All build artifacts are published on OSS Sonatype.

Current Versions

Project Current Release Latest SNAPSHOT
org.hl7.fhir.validation.cli Release Artifacts Snapshot Artifact
org.hl7.fhir.validation Release Artifacts Snapshot Artifact
org.hl7.fhir.dstu2 Release Artifacts Snapshot Artifact
org.hl7.fhir.dstu2016may Release Artifacts Snapshot Artifact
org.hl7.fhir.dstu3 Release Artifacts Snapshot Artifact
org.hl7.fhir.r4 Release Artifacts Snapshot Artifact
org.hl7.fhir.r5 Release Artifacts Snapshot Artifact

To use these artifacts in your project will need to add the proper dependency to your pom.xml file, or your build.gradle.kts file.

pom.xml
<repositories>
    <repository>
        <id>oss-snapshot</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
    <repository>
        <id>oss-releases</id>
        <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
</repositories> 
build.gradle.kts
repositories {
    maven {
        url = uri("https://oss.sonatype.org/content/repositories/snapshots")
    }
    maven {
        url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
    }
}

After adding the necessary repositories, you can include the libraries as follows:

org.hl7.fhir.validation.cli
Maven
<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>org.hl7.fhir.validation.cli</artifactId>
    <version>(latest version)</version>
</dependency>
Gradle
compile group: 'ca.uhn.hapi.fhir', name: 'org.hl7.fhir.validation.cli', version: '(latest version)'
org.hl7.fhir.dstu2
Maven
<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>hapi-fhir-structures-dstu2</artifactId>
    <version>(latest version)</version>
</dependency>
Gradle
compile group: 'ca.uhn.hapi.fhir', name: 'hapi-fhir-structures-dstu2', version: '(latest version)'
org.hl7.fhir.dstu3
Maven
<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>hapi-fhir-structures-dstu3</artifactId>
    <version>(latest version)</version>
</dependency>
Gradle
compile group: 'ca.uhn.hapi.fhir', name: 'hapi-fhir-structures-dstu3', version: '(latest version)'
org.hl7.fhir.r4
Maven
<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>hapi-fhir-structures-r4</artifactId>
    <version>(latest version)</version>
</dependency>
Gradle
compile group: 'ca.uhn.hapi.fhir', name: 'hapi-fhir-structures-r4', version: '(latest version)'
org.hl7.fhir.r5
Maven
<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>hapi-fhir-structures-r5</artifactId>
    <version>(latest version)</version>
</dependency>
Gradle
compile group: 'ca.uhn.hapi.fhir', name: 'hapi-fhir-structures-r5', version: '(latest version)'

Internationalization

This project implements internationalization for its user tools and utilities for several locales using a combination of GNU PO and Java Properties files.

Translation from the core library's original English locale to other supported locales is an ongoing process. The current level of coverage is calculated by the number of translated phrases, and can be viewed in the following figure:

Table of Internationalization Coverage

CI/CD

All integration and delivery done on Azure pipelines. Azure project can be viewed here.

A brief overview of our publishing process is here.

For more detailed instructions on cutting a release, please read the wiki

Maintenance

Have you found an issue? Do you have a feature request? Great! Submit it here and we'll try to fix it as soon as possible.

This project is maintained by Grahame Grieve, James Agnew, David Otasek and Mark Iantorno on behalf of the FHIR community.