Site updates for 2.3

This commit is contained in:
James Agnew 2017-03-17 21:48:39 -04:00
parent e18ab206d7
commit db58926ce6
4 changed files with 115 additions and 0 deletions

View File

@ -25,6 +25,11 @@
<artifactId>hapi-fhir-structures-dstu2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu2.1</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu3</artifactId>

View File

@ -3,10 +3,12 @@ package example;
import org.hl7.fhir.convertors.NullVersionConverterAdvisor;
import org.hl7.fhir.convertors.VersionConvertorAdvisor;
import org.hl7.fhir.convertors.VersionConvertor_10_20;
import org.hl7.fhir.convertors.VersionConvertor_14_20;
import org.hl7.fhir.exceptions.FHIRException;
public class ConverterExamples {
@SuppressWarnings("unused")
public void c1020() throws FHIRException {
//START SNIPPET: 1020
// Create a converter
@ -22,4 +24,18 @@ public class ConverterExamples {
String context = output.getContext().getReference();
//END SNIPPET: 1020
}
@SuppressWarnings("unused")
public void c1420() throws FHIRException {
//START SNIPPET: 1420
// Create a resource to convert
org.hl7.fhir.dstu2016may.model.Questionnaire input = new org.hl7.fhir.dstu2016may.model.Questionnaire();
input.setTitle("My title");
// Convert the resource
org.hl7.fhir.dstu3.model.Questionnaire output = VersionConvertor_14_20.convertQuestionnaire(input);
String context = output.getTitle();
//END SNIPPET: 1420
}
}

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>HL7 FHIR Converter</title>
<author email="jamesagnew@users.sourceforge.net">James Agnew</author>
</properties>
<body>
<section name="HL7 FHIR Converter">
<macro name="toc">
</macro>
<p>
Beginning in HAPI FHIR 2.3, a new experimental feature called
<code>hapi-fhir-converter</code> has been added to the project. This
is an <b>experimental feature</b> so use it with caution!
</p>
<p>
This feature allows automated conversion from earlier versions
of the FHIR structures to a later version.
</p>
<p>
The following page shows some basic examples. Please get in touch
if you are able to contribute better examples!
</p>
<subsection name="Importing the Module">
<p>
To use the <code>hapi-fhir-converter</code> module, import the following
dependency into your project pom.xml (or equivalent)
</p>
<source><![CDATA[<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-converter</artifactId>
<version>${project.version}</version>
</dependency>]]></source>
</subsection>
<subsection name="Converting from DSTU2 to DSTU3">
<p>
The following example shows a conversion from a
<code>hapi-fhir-structures-hl7org-dstu2</code>
structure to a
<code>hapi-fhir-structures-dstu3</code> structure.
</p>
<macro name="snippet">
<param name="id" value="1020"/>
<param name="file" value="examples/src/main/java/example/ConverterExample.java"/>
</macro>
</subsection>
<subsection name="Converting from DSTU2.1 to DSTU3">
<p>
The following example shows a conversion from a
<code>hapi-fhir-structures-dstu2.1</code>
structure to a
<code>hapi-fhir-structures-dstu3</code> structure.
</p>
<macro name="snippet">
<param name="id" value="1420"/>
<param name="file" value="examples/src/main/java/example/ConverterExample.java"/>
</macro>
</subsection>
</section>
</body>
</document>

View File

@ -69,6 +69,26 @@
</section>
<section name="Announcements">
<p>
<b>March 17, 2017 - HAPI FHIR 2.3 Released</b> -
The next release of HAPI has now been uploaded to the Maven repos and
GitHub's releases section.
</p>
<p>
This release brings the STU3 definitions up to the
latest definitions (FHIR 1.9.0 - SVN 11501). It also brings
in the latest validator fixes, as well as a number of other
useful enhancements and fixes.
</p>
<p>
As always, the <a href="./changes-report.html">changelog</a> has the full list
of changes in this release.
</p>
<p>
- <a href="https://github.com/jamesagnew/">James Agnew</a>
</p>
<br/><br/>
<p>
<b>December 20, 2016 - HAPI FHIR 2.2 Released</b> -
The next release of HAPI has now been uploaded to the Maven repos and