From db58926ce6d22f94e8fb4931add59fb33106a559 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Fri, 17 Mar 2017 21:48:39 -0400 Subject: [PATCH] Site updates for 2.3 --- examples/pom.xml | 5 ++ .../main/java/example/ConverterExamples.java | 16 ++++ src/site/xdoc/doc_converter.xml.vm | 74 +++++++++++++++++++ src/site/xdoc/index.xml | 20 +++++ 4 files changed, 115 insertions(+) create mode 100644 src/site/xdoc/doc_converter.xml.vm diff --git a/examples/pom.xml b/examples/pom.xml index 343fa7ef637..fb295bea0ed 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -25,6 +25,11 @@ hapi-fhir-structures-dstu2 ${project.version} + + ca.uhn.hapi.fhir + hapi-fhir-structures-dstu2.1 + ${project.version} + ca.uhn.hapi.fhir hapi-fhir-structures-dstu3 diff --git a/examples/src/main/java/example/ConverterExamples.java b/examples/src/main/java/example/ConverterExamples.java index 513ef01f188..8f1c2577d99 100644 --- a/examples/src/main/java/example/ConverterExamples.java +++ b/examples/src/main/java/example/ConverterExamples.java @@ -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 + } + } diff --git a/src/site/xdoc/doc_converter.xml.vm b/src/site/xdoc/doc_converter.xml.vm new file mode 100644 index 00000000000..519c44d97ee --- /dev/null +++ b/src/site/xdoc/doc_converter.xml.vm @@ -0,0 +1,74 @@ + + + + + HL7 FHIR Converter + James Agnew + + + + +
+ + + + +

+ Beginning in HAPI FHIR 2.3, a new experimental feature called + hapi-fhir-converter has been added to the project. This + is an experimental feature so use it with caution! +

+ +

+ This feature allows automated conversion from earlier versions + of the FHIR structures to a later version. +

+ +

+ The following page shows some basic examples. Please get in touch + if you are able to contribute better examples! +

+ + +

+ To use the hapi-fhir-converter module, import the following + dependency into your project pom.xml (or equivalent) +

+ + ca.uhn.hapi.fhir + hapi-fhir-converter + ${project.version} +]]> +
+ + +

+ The following example shows a conversion from a + hapi-fhir-structures-hl7org-dstu2 + structure to a + hapi-fhir-structures-dstu3 structure. +

+ + + + +
+ + +

+ The following example shows a conversion from a + hapi-fhir-structures-dstu2.1 + structure to a + hapi-fhir-structures-dstu3 structure. +

+ + + + +
+ +
+ + + +
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index c2df19fc577..52bbf4df8ec 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -69,6 +69,26 @@
+

+ March 17, 2017 - HAPI FHIR 2.3 Released - + The next release of HAPI has now been uploaded to the Maven repos and + GitHub's releases section. +

+

+ 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. +

+

+ As always, the changelog has the full list + of changes in this release. +

+

+ - James Agnew +

+

+

December 20, 2016 - HAPI FHIR 2.2 Released - The next release of HAPI has now been uploaded to the Maven repos and