Stream: hapi
Topic: hapi-fhir: issue 278: The hapi-fhir-jpaserver-example pro...
Zulip HAPI Bot (Jan 07 2016 at 14:59):
karlmdavis opened issue 278
This class has a number of
if ... elseblocks that cope with the differences between DSTU1 and DSTU2, but does not yet include any logic for DSTU2.1.Not a big deal, but would be nice.
Zulip HAPI Bot (Jan 07 2016 at 15:11):
karlmdavis commented on issue 278
I've created Pull Request #279 to address the
JpaServerDemochanges needed. In addition, the following patch can be applied manually to address the other files that need to be updated to switch things to DSTU2.1:diff --git a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java index 9186ebd..4f6e6b1 100644 --- a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java +++ b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java @@ -15,16 +15,16 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import org.springframework.transaction.annotation.EnableTransactionManagement; -import ca.uhn.fhir.jpa.config.BaseJavaConfigDstu2; +import ca.uhn.fhir.jpa.config.BaseJavaConfigDstu21; import ca.uhn.fhir.jpa.dao.DaoConfig; -import ca.uhn.fhir.jpa.util.SubscriptionsRequireManualActivationInterceptorDstu2; +import ca.uhn.fhir.jpa.util.SubscriptionsRequireManualActivationInterceptorDstu21; import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor; import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor; @Configuration @EnableTransactionManagement() -public class FhirServerConfig extends BaseJavaConfigDstu2 { +public class FhirServerConfig extends BaseJavaConfigDstu21 { /** * Configure FHIR properties around the the JPA server via this bean @@ -108,7 +108,7 @@ @Bean(autowire = Autowire.BY_TYPE) public IServerInterceptor subscriptionSecurityInterceptor() { - SubscriptionsRequireManualActivationInterceptorDstu2 retVal = new SubscriptionsRequireManualActivationInterceptorDstu2(); + SubscriptionsRequireManualActivationInterceptorDstu21 retVal = new SubscriptionsRequireManualActivationInterceptorDstu21(); return retVal; } diff --git a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml b/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml index c81a6f6..ad7ebb5 100644 --- a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml +++ b/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml @@ -42,7 +42,7 @@ </init-param> <init-param> <param-name>FhirVersion</param-name> - <param-value>DSTU2</param-value> + <param-value>DSTU2_1</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> diff --git a/hapi-fhir-jpaserver-example/src/test/java/ca/uhn/fhir/jpa/demo/ExampleServerIT.java b/hapi-fhir-jpaserver-example/src/test/java/ca/uhn/fhir/jpa/demo/ExampleServerIT.java index f4efde6..13463e4 100644 --- a/hapi-fhir-jpaserver-example/src/test/java/ca/uhn/fhir/jpa/demo/ExampleServerIT.java +++ b/hapi-fhir-jpaserver-example/src/test/java/ca/uhn/fhir/jpa/demo/ExampleServerIT.java @@ -7,13 +7,13 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.webapp.WebAppContext; +import org.hl7.fhir.dstu21.model.Patient; import org.hl7.fhir.instance.model.api.IIdType; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.model.dstu2.resource.Patient; import ca.uhn.fhir.rest.client.IGenericClient; import ca.uhn.fhir.rest.client.ServerValidationModeEnum; import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
Zulip HAPI Bot (Jan 08 2016 at 02:25):
jamesagnew closed issue 278
Last updated: Apr 12 2022 at 19:14 UTC