From 266e7aba7f4d65a9fa65ac58b6d0ba1f14ad727b Mon Sep 17 00:00:00 2001 From: Sean McIlvenna Date: Thu, 1 Aug 2019 20:45:04 -0700 Subject: [PATCH 01/16] Building app in docker. Easier to override config file from /hapi-config/hapi.properties --- Dockerfile | 21 ++++++++++++++++++++- build-docker-image.bat | 1 + build-docker-image.sh | 3 +-- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 build-docker-image.bat diff --git a/Dockerfile b/Dockerfile index 8a84f1e..e1b399f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,23 @@ +# Using maven with JDK 8 +FROM maven:3.6.1-jdk-8 AS build + +# Copy pom and download dependencies. This is done here +# so that docker caches the dependencies and they don't have to be +# re-downloaded on the next run, unless the pom file changes. +COPY pom.xml . +RUN /usr/local/bin/mvn-entrypoint.sh mvn verify clean --fail-never + +# Copy all of the source code to the image and build it +COPY . . +RUN mvn package + FROM jetty:9-jre8-alpine + +COPY --from=build ./target/hapi-fhir-jpaserver.war /var/lib/jetty/webapps/hapi-fhir-jpaserver.war + +# Copy the default config file to the config directory location. It might be overridden by the docker host. +COPY --from=build ./src/main/resources/hapi.properties /hapi-config/hapi.properties + USER jetty:jetty -ADD ./target/hapi-fhir-jpaserver.war /var/lib/jetty/webapps/hapi-fhir-jpaserver.war EXPOSE 8080 +CMD ["java","-Dhapi.properties=/hapi-config/hapi.properties","-jar","/usr/local/jetty/start.jar"] \ No newline at end of file diff --git a/build-docker-image.bat b/build-docker-image.bat new file mode 100644 index 0000000..40c87e0 --- /dev/null +++ b/build-docker-image.bat @@ -0,0 +1 @@ +docker build -t hapi-fhir/hapi-fhir-jpaserver-starter . \ No newline at end of file diff --git a/build-docker-image.sh b/build-docker-image.sh index d58de22..8acade5 100755 --- a/build-docker-image.sh +++ b/build-docker-image.sh @@ -1,5 +1,4 @@ #!/bin/sh -mvn package && \ - docker build -t hapi-fhir/hapi-fhir-jpaserver-starter . +docker build -t hapi-fhir/hapi-fhir-jpaserver-starter . From b1e77303d5106d300cffcac278ceaa841394591b Mon Sep 17 00:00:00 2001 From: patrick-werner Date: Thu, 12 Sep 2019 13:22:23 -0400 Subject: [PATCH 02/16] added support for allowedBundleTypes in properties --- .../uhn/fhir/jpa/starter/HapiProperties.java | 5 + .../fhir/jpa/starter/JpaRestfulServer.java | 526 +++++++++--------- src/main/resources/hapi.properties | 5 + 3 files changed, 286 insertions(+), 250 deletions(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java index 3dac8f4..6d620df 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java @@ -45,6 +45,7 @@ public class HapiProperties { static final String SUBSCRIPTION_EMAIL_ENABLED = "subscription.email.enabled"; static final String SUBSCRIPTION_RESTHOOK_ENABLED = "subscription.resthook.enabled"; static final String SUBSCRIPTION_WEBSOCKET_ENABLED = "subscription.websocket.enabled"; + static final String ALLOWED_BUNDLE_TYPES = "allowedBundleTypes"; static final String TEST_PORT = "test.port"; static final String TESTER_CONFIG_REFUSE_TO_FETCH_THIRD_PARTY_URLS = "tester.config.refuse_to_fetch_third_party_urls"; static final String CORS_ENABLED = "cors.enabled"; @@ -286,6 +287,10 @@ public class HapiProperties { return HapiProperties.getProperty(CORS_ALLOWED_ORIGIN, "*"); } + public static String getAllowedBundleTypes() { + return HapiProperties.getProperty(ALLOWED_BUNDLE_TYPES, ""); + } + public static Set getSupportedResourceTypes() { String[] types = defaultString(getProperty("supported_resource_types")).split(","); return Arrays.stream(types) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/JpaRestfulServer.java b/src/main/java/ca/uhn/fhir/jpa/starter/JpaRestfulServer.java index a640740..7cad07c 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/JpaRestfulServer.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/JpaRestfulServer.java @@ -27,7 +27,10 @@ import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.interceptor.*; import ca.uhn.fhir.validation.IValidatorModule; import ca.uhn.fhir.validation.ResultSeverityEnum; +import java.util.HashSet; +import java.util.TreeSet; import org.hl7.fhir.dstu3.model.Bundle; +import org.hl7.fhir.r4.model.Bundle.BundleType; import org.hl7.fhir.dstu3.model.Meta; import org.springframework.context.ApplicationContext; import org.springframework.http.HttpHeaders; @@ -40,258 +43,281 @@ import java.util.Set; public class JpaRestfulServer extends RestfulServer { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @SuppressWarnings("unchecked") - @Override - protected void initialize() throws ServletException { - super.initialize(); - - /* - * Create a FhirContext object that uses the version of FHIR - * specified in the properties file. - */ - ApplicationContext appCtx = (ApplicationContext) getServletContext().getAttribute("org.springframework.web.context.WebApplicationContext.ROOT"); - // Customize supported resource types - Set supportedResourceTypes = HapiProperties.getSupportedResourceTypes(); - if (!supportedResourceTypes.isEmpty()) { - DaoRegistry daoRegistry = appCtx.getBean(DaoRegistry.class); - daoRegistry.setSupportedResourceTypes(supportedResourceTypes); - } - - /* - * ResourceProviders are fetched from the Spring context - */ - FhirVersionEnum fhirVersion = HapiProperties.getFhirVersion(); - ResourceProviderFactory resourceProviders; - Object systemProvider; - if (fhirVersion == FhirVersionEnum.DSTU2) { - resourceProviders = appCtx.getBean("myResourceProvidersDstu2", ResourceProviderFactory.class); - systemProvider = appCtx.getBean("mySystemProviderDstu2", JpaSystemProviderDstu2.class); - } else if (fhirVersion == FhirVersionEnum.DSTU3) { - resourceProviders = appCtx.getBean("myResourceProvidersDstu3", ResourceProviderFactory.class); - systemProvider = appCtx.getBean("mySystemProviderDstu3", JpaSystemProviderDstu3.class); - } else if (fhirVersion == FhirVersionEnum.R4) { - resourceProviders = appCtx.getBean("myResourceProvidersR4", ResourceProviderFactory.class); - systemProvider = appCtx.getBean("mySystemProviderR4", JpaSystemProviderR4.class); - } else if (fhirVersion == FhirVersionEnum.R5) { - resourceProviders = appCtx.getBean("myResourceProvidersR5", ResourceProviderFactory.class); - systemProvider = appCtx.getBean("mySystemProviderR5", JpaSystemProviderR5.class); - } else { - throw new IllegalStateException(); - } - - setFhirContext(appCtx.getBean(FhirContext.class)); - - registerProviders(resourceProviders.createProviders()); - registerProvider(systemProvider); - - /* - * The conformance provider exports the supported resources, search parameters, etc for - * this server. The JPA version adds resourceProviders counts to the exported statement, so it - * is a nice addition. - * - * You can also create your own subclass of the conformance provider if you need to - * provide further customization of your server's CapabilityStatement - */ - if (fhirVersion == FhirVersionEnum.DSTU2) { - IFhirSystemDao systemDao = appCtx.getBean("mySystemDaoDstu2", IFhirSystemDao.class); - JpaConformanceProviderDstu2 confProvider = new JpaConformanceProviderDstu2(this, systemDao, appCtx.getBean(DaoConfig.class)); - confProvider.setImplementationDescription("HAPI FHIR DSTU2 Server"); - setServerConformanceProvider(confProvider); - } else if (fhirVersion == FhirVersionEnum.DSTU3) { - IFhirSystemDao systemDao = appCtx.getBean("mySystemDaoDstu3", IFhirSystemDao.class); - JpaConformanceProviderDstu3 confProvider = new JpaConformanceProviderDstu3(this, systemDao, appCtx.getBean(DaoConfig.class)); - confProvider.setImplementationDescription("HAPI FHIR DSTU3 Server"); - setServerConformanceProvider(confProvider); - } else if (fhirVersion == FhirVersionEnum.R4) { - IFhirSystemDao systemDao = appCtx.getBean("mySystemDaoR4", IFhirSystemDao.class); - JpaConformanceProviderR4 confProvider = new JpaConformanceProviderR4(this, systemDao, appCtx.getBean(DaoConfig.class)); - confProvider.setImplementationDescription("HAPI FHIR R4 Server"); - setServerConformanceProvider(confProvider); - } else if (fhirVersion == FhirVersionEnum.R5) { - IFhirSystemDao systemDao = appCtx.getBean("mySystemDaoR5", IFhirSystemDao.class); - JpaConformanceProviderR5 confProvider = new JpaConformanceProviderR5(this, systemDao, appCtx.getBean(DaoConfig.class)); - confProvider.setImplementationDescription("HAPI FHIR R5 Server"); - setServerConformanceProvider(confProvider); - } else { - throw new IllegalStateException(); - } - - /* - * ETag Support - */ - setETagSupport(HapiProperties.getEtagSupport()); - - /* - * This server tries to dynamically generate narratives - */ - FhirContext ctx = getFhirContext(); - ctx.setNarrativeGenerator(new DefaultThymeleafNarrativeGenerator()); - - /* - * Default to JSON and pretty printing - */ - setDefaultPrettyPrint(HapiProperties.getDefaultPrettyPrint()); - - /* - * Default encoding - */ - setDefaultResponseEncoding(HapiProperties.getDefaultEncoding()); - - /* - * This configures the server to page search results to and from - * the database, instead of only paging them to memory. This may mean - * a performance hit when performing searches that return lots of results, - * but makes the server much more scalable. - */ - setPagingProvider(appCtx.getBean(DatabaseBackedPagingProvider.class)); - - /* - * This interceptor formats the output using nice colourful - * HTML output when the request is detected to come from a - * browser. - */ - ResponseHighlighterInterceptor responseHighlighterInterceptor = new ResponseHighlighterInterceptor(); - ; - this.registerInterceptor(responseHighlighterInterceptor); - - /* - * Add some logging for each request - */ - LoggingInterceptor loggingInterceptor = new LoggingInterceptor(); - loggingInterceptor.setLoggerName(HapiProperties.getLoggerName()); - loggingInterceptor.setMessageFormat(HapiProperties.getLoggerFormat()); - loggingInterceptor.setErrorMessageFormat(HapiProperties.getLoggerErrorFormat()); - loggingInterceptor.setLogExceptions(HapiProperties.getLoggerLogExceptions()); - this.registerInterceptor(loggingInterceptor); - - /* - * If you are hosting this server at a specific DNS name, the server will try to - * figure out the FHIR base URL based on what the web container tells it, but - * this doesn't always work. If you are setting links in your search bundles that - * just refer to "localhost", you might want to use a server address strategy: - */ - String serverAddress = HapiProperties.getServerAddress(); - if (serverAddress != null && serverAddress.length() > 0) { - setServerAddressStrategy(new HardcodedServerAddressStrategy(serverAddress)); - } - - /* - * If you are using DSTU3+, you may want to add a terminology uploader, which allows - * uploading of external terminologies such as Snomed CT. Note that this uploader - * does not have any security attached (any anonymous user may use it by default) - * so it is a potential security vulnerability. Consider using an AuthorizationInterceptor - * with this feature. - */ - if (false) { // <-- DISABLED RIGHT NOW - registerProvider(appCtx.getBean(TerminologyUploaderProvider.class)); - } - - // If you want to enable the $trigger-subscription operation to allow - // manual triggering of a subscription delivery, enable this provider - if (false) { // <-- DISABLED RIGHT NOW - SubscriptionTriggeringProvider retriggeringProvider = appCtx.getBean(SubscriptionTriggeringProvider.class); - registerProvider(retriggeringProvider); - } - - // Define your CORS configuration. This is an example - // showing a typical setup. You should customize this - // to your specific needs - if (HapiProperties.getCorsEnabled()) { - CorsConfiguration config = new CorsConfiguration(); - config.addAllowedHeader(HttpHeaders.ORIGIN); - config.addAllowedHeader(HttpHeaders.ACCEPT); - config.addAllowedHeader(HttpHeaders.CONTENT_TYPE); - config.addAllowedHeader(HttpHeaders.AUTHORIZATION); - config.addAllowedHeader(HttpHeaders.CACHE_CONTROL); - config.addAllowedHeader("x-fhir-starter"); - config.addAllowedHeader("X-Requested-With"); - config.addAllowedHeader("Prefer"); - String allAllowedCORSOrigins = HapiProperties.getCorsAllowedOrigin(); - Arrays.stream(allAllowedCORSOrigins.split(",")).forEach(o -> { - config.addAllowedOrigin(o); - }); - config.addAllowedOrigin(HapiProperties.getCorsAllowedOrigin()); - - config.addExposedHeader("Location"); - config.addExposedHeader("Content-Location"); - config.setAllowedMethods( - Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH", "HEAD")); - config.setAllowCredentials(HapiProperties.getCorsAllowedCredentials()); - - // Create the interceptor and register it - CorsInterceptor interceptor = new CorsInterceptor(config); - registerInterceptor(interceptor); - } - - // If subscriptions are enabled, we want to register the interceptor that - // will activate them and match results against them - if (HapiProperties.getSubscriptionWebsocketEnabled() || - HapiProperties.getSubscriptionEmailEnabled() || - HapiProperties.getSubscriptionRestHookEnabled()) { - // Loads subscription interceptors (SubscriptionActivatingInterceptor, SubscriptionMatcherInterceptor) - // with activation of scheduled subscription - SubscriptionInterceptorLoader subscriptionInterceptorLoader = appCtx.getBean(SubscriptionInterceptorLoader.class); - subscriptionInterceptorLoader.registerInterceptors(); - - // Subscription debug logging - IInterceptorService interceptorService = appCtx.getBean(IInterceptorService.class); - interceptorService.registerInterceptor(new SubscriptionDebugLogInterceptor()); - } - - // Cascading deletes - DaoRegistry daoRegistry = appCtx.getBean(DaoRegistry.class); - IInterceptorBroadcaster interceptorBroadcaster = appCtx.getBean(IInterceptorBroadcaster.class); - if (HapiProperties.getAllowCascadingDeletes()) { - CascadingDeleteInterceptor cascadingDeleteInterceptor = new CascadingDeleteInterceptor(daoRegistry, interceptorBroadcaster); - getInterceptorService().registerInterceptor(cascadingDeleteInterceptor); - } - - // Binary Storage - if (HapiProperties.isBinaryStorageEnabled()) { - BinaryStorageInterceptor binaryStorageInterceptor = appCtx.getBean(BinaryStorageInterceptor.class); - getInterceptorService().registerInterceptor(binaryStorageInterceptor); - } - - // Validation - IValidatorModule validatorModule; - switch (fhirVersion) { - case DSTU3: - validatorModule = appCtx.getBean("myInstanceValidatorDstu3", IValidatorModule.class); - break; - case R4: - validatorModule = appCtx.getBean("myInstanceValidatorR4", IValidatorModule.class); - break; - case R5: - validatorModule = appCtx.getBean("myInstanceValidatorR5", IValidatorModule.class); - break; - default: - validatorModule = null; - break; - } - if (validatorModule != null) { - if (HapiProperties.getValidateRequestsEnabled()) { - RequestValidatingInterceptor interceptor = new RequestValidatingInterceptor(); - interceptor.setFailOnSeverity(ResultSeverityEnum.ERROR); - interceptor.setValidatorModules(Collections.singletonList(validatorModule)); - registerInterceptor(interceptor); - } - if (HapiProperties.getValidateResponsesEnabled()) { - ResponseValidatingInterceptor interceptor = new ResponseValidatingInterceptor(); - interceptor.setFailOnSeverity(ResultSeverityEnum.ERROR); - interceptor.setValidatorModules(Collections.singletonList(validatorModule)); - registerInterceptor(interceptor); - } - } - - // GraphQL - if (HapiProperties.getGraphqlEnabled()) { - if (fhirVersion.isEqualOrNewerThan(FhirVersionEnum.DSTU3)) { - registerProvider(appCtx.getBean(GraphQLProvider.class)); - } - } + @SuppressWarnings("unchecked") + @Override + protected void initialize() throws ServletException { + super.initialize(); + /* + * Create a FhirContext object that uses the version of FHIR + * specified in the properties file. + */ + ApplicationContext appCtx = (ApplicationContext) getServletContext() + .getAttribute("org.springframework.web.context.WebApplicationContext.ROOT"); + // Customize supported resource types + Set supportedResourceTypes = HapiProperties.getSupportedResourceTypes(); + if (!supportedResourceTypes.isEmpty()) { + DaoRegistry daoRegistry = appCtx.getBean(DaoRegistry.class); + daoRegistry.setSupportedResourceTypes(supportedResourceTypes); } + /* + * ResourceProviders are fetched from the Spring context + */ + FhirVersionEnum fhirVersion = HapiProperties.getFhirVersion(); + ResourceProviderFactory resourceProviders; + Object systemProvider; + if (fhirVersion == FhirVersionEnum.DSTU2) { + resourceProviders = appCtx.getBean("myResourceProvidersDstu2", ResourceProviderFactory.class); + systemProvider = appCtx.getBean("mySystemProviderDstu2", JpaSystemProviderDstu2.class); + } else if (fhirVersion == FhirVersionEnum.DSTU3) { + resourceProviders = appCtx.getBean("myResourceProvidersDstu3", ResourceProviderFactory.class); + systemProvider = appCtx.getBean("mySystemProviderDstu3", JpaSystemProviderDstu3.class); + } else if (fhirVersion == FhirVersionEnum.R4) { + resourceProviders = appCtx.getBean("myResourceProvidersR4", ResourceProviderFactory.class); + systemProvider = appCtx.getBean("mySystemProviderR4", JpaSystemProviderR4.class); + } else if (fhirVersion == FhirVersionEnum.R5) { + resourceProviders = appCtx.getBean("myResourceProvidersR5", ResourceProviderFactory.class); + systemProvider = appCtx.getBean("mySystemProviderR5", JpaSystemProviderR5.class); + } else { + throw new IllegalStateException(); + } + + setFhirContext(appCtx.getBean(FhirContext.class)); + + registerProviders(resourceProviders.createProviders()); + registerProvider(systemProvider); + + /* + * The conformance provider exports the supported resources, search parameters, etc for + * this server. The JPA version adds resourceProviders counts to the exported statement, so it + * is a nice addition. + * + * You can also create your own subclass of the conformance provider if you need to + * provide further customization of your server's CapabilityStatement + */ + if (fhirVersion == FhirVersionEnum.DSTU2) { + IFhirSystemDao systemDao = appCtx + .getBean("mySystemDaoDstu2", IFhirSystemDao.class); + JpaConformanceProviderDstu2 confProvider = new JpaConformanceProviderDstu2(this, systemDao, + appCtx.getBean(DaoConfig.class)); + confProvider.setImplementationDescription("HAPI FHIR DSTU2 Server"); + setServerConformanceProvider(confProvider); + } else if (fhirVersion == FhirVersionEnum.DSTU3) { + IFhirSystemDao systemDao = appCtx + .getBean("mySystemDaoDstu3", IFhirSystemDao.class); + JpaConformanceProviderDstu3 confProvider = new JpaConformanceProviderDstu3(this, systemDao, + appCtx.getBean(DaoConfig.class)); + confProvider.setImplementationDescription("HAPI FHIR DSTU3 Server"); + setServerConformanceProvider(confProvider); + } else if (fhirVersion == FhirVersionEnum.R4) { + IFhirSystemDao systemDao = appCtx + .getBean("mySystemDaoR4", IFhirSystemDao.class); + JpaConformanceProviderR4 confProvider = new JpaConformanceProviderR4(this, systemDao, + appCtx.getBean(DaoConfig.class)); + confProvider.setImplementationDescription("HAPI FHIR R4 Server"); + setServerConformanceProvider(confProvider); + } else if (fhirVersion == FhirVersionEnum.R5) { + IFhirSystemDao systemDao = appCtx + .getBean("mySystemDaoR5", IFhirSystemDao.class); + JpaConformanceProviderR5 confProvider = new JpaConformanceProviderR5(this, systemDao, + appCtx.getBean(DaoConfig.class)); + confProvider.setImplementationDescription("HAPI FHIR R5 Server"); + setServerConformanceProvider(confProvider); + } else { + throw new IllegalStateException(); + } + + /* + * ETag Support + */ + setETagSupport(HapiProperties.getEtagSupport()); + + /* + * This server tries to dynamically generate narratives + */ + FhirContext ctx = getFhirContext(); + ctx.setNarrativeGenerator(new DefaultThymeleafNarrativeGenerator()); + + /* + * Default to JSON and pretty printing + */ + setDefaultPrettyPrint(HapiProperties.getDefaultPrettyPrint()); + + /* + * Default encoding + */ + setDefaultResponseEncoding(HapiProperties.getDefaultEncoding()); + + /* + * This configures the server to page search results to and from + * the database, instead of only paging them to memory. This may mean + * a performance hit when performing searches that return lots of results, + * but makes the server much more scalable. + */ + setPagingProvider(appCtx.getBean(DatabaseBackedPagingProvider.class)); + + /* + * This interceptor formats the output using nice colourful + * HTML output when the request is detected to come from a + * browser. + */ + ResponseHighlighterInterceptor responseHighlighterInterceptor = new ResponseHighlighterInterceptor(); + ; + this.registerInterceptor(responseHighlighterInterceptor); + + /* + * Add some logging for each request + */ + LoggingInterceptor loggingInterceptor = new LoggingInterceptor(); + loggingInterceptor.setLoggerName(HapiProperties.getLoggerName()); + loggingInterceptor.setMessageFormat(HapiProperties.getLoggerFormat()); + loggingInterceptor.setErrorMessageFormat(HapiProperties.getLoggerErrorFormat()); + loggingInterceptor.setLogExceptions(HapiProperties.getLoggerLogExceptions()); + this.registerInterceptor(loggingInterceptor); + + /* + * If you are hosting this server at a specific DNS name, the server will try to + * figure out the FHIR base URL based on what the web container tells it, but + * this doesn't always work. If you are setting links in your search bundles that + * just refer to "localhost", you might want to use a server address strategy: + */ + String serverAddress = HapiProperties.getServerAddress(); + if (serverAddress != null && serverAddress.length() > 0) { + setServerAddressStrategy(new HardcodedServerAddressStrategy(serverAddress)); + } + + /* + * If you are using DSTU3+, you may want to add a terminology uploader, which allows + * uploading of external terminologies such as Snomed CT. Note that this uploader + * does not have any security attached (any anonymous user may use it by default) + * so it is a potential security vulnerability. Consider using an AuthorizationInterceptor + * with this feature. + */ + if (false) { // <-- DISABLED RIGHT NOW + registerProvider(appCtx.getBean(TerminologyUploaderProvider.class)); + } + + // If you want to enable the $trigger-subscription operation to allow + // manual triggering of a subscription delivery, enable this provider + if (false) { // <-- DISABLED RIGHT NOW + SubscriptionTriggeringProvider retriggeringProvider = appCtx + .getBean(SubscriptionTriggeringProvider.class); + registerProvider(retriggeringProvider); + } + + // Define your CORS configuration. This is an example + // showing a typical setup. You should customize this + // to your specific needs + if (HapiProperties.getCorsEnabled()) { + CorsConfiguration config = new CorsConfiguration(); + config.addAllowedHeader(HttpHeaders.ORIGIN); + config.addAllowedHeader(HttpHeaders.ACCEPT); + config.addAllowedHeader(HttpHeaders.CONTENT_TYPE); + config.addAllowedHeader(HttpHeaders.AUTHORIZATION); + config.addAllowedHeader(HttpHeaders.CACHE_CONTROL); + config.addAllowedHeader("x-fhir-starter"); + config.addAllowedHeader("X-Requested-With"); + config.addAllowedHeader("Prefer"); + String allAllowedCORSOrigins = HapiProperties.getCorsAllowedOrigin(); + Arrays.stream(allAllowedCORSOrigins.split(",")).forEach(o -> { + config.addAllowedOrigin(o); + }); + config.addAllowedOrigin(HapiProperties.getCorsAllowedOrigin()); + + config.addExposedHeader("Location"); + config.addExposedHeader("Content-Location"); + config.setAllowedMethods( + Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH", "HEAD")); + config.setAllowCredentials(HapiProperties.getCorsAllowedCredentials()); + + // Create the interceptor and register it + CorsInterceptor interceptor = new CorsInterceptor(config); + registerInterceptor(interceptor); + } + + // If subscriptions are enabled, we want to register the interceptor that + // will activate them and match results against them + if (HapiProperties.getSubscriptionWebsocketEnabled() || + HapiProperties.getSubscriptionEmailEnabled() || + HapiProperties.getSubscriptionRestHookEnabled()) { + // Loads subscription interceptors (SubscriptionActivatingInterceptor, SubscriptionMatcherInterceptor) + // with activation of scheduled subscription + SubscriptionInterceptorLoader subscriptionInterceptorLoader = appCtx + .getBean(SubscriptionInterceptorLoader.class); + subscriptionInterceptorLoader.registerInterceptors(); + + // Subscription debug logging + IInterceptorService interceptorService = appCtx.getBean(IInterceptorService.class); + interceptorService.registerInterceptor(new SubscriptionDebugLogInterceptor()); + } + + // Cascading deletes + DaoRegistry daoRegistry = appCtx.getBean(DaoRegistry.class); + IInterceptorBroadcaster interceptorBroadcaster = appCtx.getBean(IInterceptorBroadcaster.class); + if (HapiProperties.getAllowCascadingDeletes()) { + CascadingDeleteInterceptor cascadingDeleteInterceptor = new CascadingDeleteInterceptor( + daoRegistry, interceptorBroadcaster); + getInterceptorService().registerInterceptor(cascadingDeleteInterceptor); + } + + // Binary Storage + if (HapiProperties.isBinaryStorageEnabled()) { + BinaryStorageInterceptor binaryStorageInterceptor = appCtx + .getBean(BinaryStorageInterceptor.class); + getInterceptorService().registerInterceptor(binaryStorageInterceptor); + } + + // Validation + IValidatorModule validatorModule; + switch (fhirVersion) { + case DSTU3: + validatorModule = appCtx.getBean("myInstanceValidatorDstu3", IValidatorModule.class); + break; + case R4: + validatorModule = appCtx.getBean("myInstanceValidatorR4", IValidatorModule.class); + break; + case R5: + validatorModule = appCtx.getBean("myInstanceValidatorR5", IValidatorModule.class); + break; + default: + validatorModule = null; + break; + } + if (validatorModule != null) { + if (HapiProperties.getValidateRequestsEnabled()) { + RequestValidatingInterceptor interceptor = new RequestValidatingInterceptor(); + interceptor.setFailOnSeverity(ResultSeverityEnum.ERROR); + interceptor.setValidatorModules(Collections.singletonList(validatorModule)); + registerInterceptor(interceptor); + } + if (HapiProperties.getValidateResponsesEnabled()) { + ResponseValidatingInterceptor interceptor = new ResponseValidatingInterceptor(); + interceptor.setFailOnSeverity(ResultSeverityEnum.ERROR); + interceptor.setValidatorModules(Collections.singletonList(validatorModule)); + registerInterceptor(interceptor); + } + } + + // GraphQL + if (HapiProperties.getGraphqlEnabled()) { + if (fhirVersion.isEqualOrNewerThan(FhirVersionEnum.DSTU3)) { + registerProvider(appCtx.getBean(GraphQLProvider.class)); + } + } + + if (!HapiProperties.getAllowedBundleTypes().isEmpty()) { + String allowedBundleTypesString = HapiProperties.getAllowedBundleTypes(); + Set allowedBundleTypes = new HashSet<>(); + Arrays.stream(allowedBundleTypesString.split(",")).forEach(o -> { + BundleType type = BundleType.valueOf(o); + allowedBundleTypes.add(type.toCode()); + }); + DaoConfig config = appCtx.getBean(DaoConfig.class); + config.setBundleTypesAllowedForStorage( + Collections.unmodifiableSet(new TreeSet<>(allowedBundleTypes))); + } + } } diff --git a/src/main/resources/hapi.properties b/src/main/resources/hapi.properties index 0f9bd81..deac1b4 100644 --- a/src/main/resources/hapi.properties +++ b/src/main/resources/hapi.properties @@ -92,6 +92,11 @@ cors.allowCredentials=true # cors.allowed_origin=http://localhost:8080,https://localhost:8080,https://fhirtest.uhn.ca cors.allow_origin=* +################################################## +# Allowed Bundle Types for persistence (defaults are: COLLECTION,DOCUMENT,MESSAGE) +################################################## +#allowedBundleTypes=COLLECTION,DOCUMENT,MESSAGE,TRANSACTION,TRANSACTIONRESPONSE,BATCH,BATCHRESPONSE,HISTORY,SEARCHSET + ################################################## # Subscriptions ################################################## From e12c4c1d794e8b8c9ed7328f806408cc45a7f629 Mon Sep 17 00:00:00 2001 From: patrick-werner Date: Thu, 12 Sep 2019 13:22:55 -0400 Subject: [PATCH 03/16] extended .gitignore added google codestyle in .idea --- .gitignore | 194 ++++++- .../hapi_fhir_jpaserver_starter_war.xml | 14 + ...pi_fhir_jpaserver_starter_war_exploded.xml | 174 ++++++ .idea/artifacts/vitu_hapi_war.xml | 14 + .idea/artifacts/vitu_hapi_war_exploded.xml | 168 ++++++ .idea/codeStyles/Project.xml | 511 ++++++++++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 + .idea/compiler.xml | 19 + .idea/encodings.xml | 6 + .idea/misc.xml | 20 + .idea/modules.xml | 9 + .idea/vcs.xml | 6 + 12 files changed, 1139 insertions(+), 1 deletion(-) create mode 100644 .idea/artifacts/hapi_fhir_jpaserver_starter_war.xml create mode 100644 .idea/artifacts/hapi_fhir_jpaserver_starter_war_exploded.xml create mode 100644 .idea/artifacts/vitu_hapi_war.xml create mode 100644 .idea/artifacts/vitu_hapi_war_exploded.xml create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/compiler.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.gitignore b/.gitignore index 212c851..a1af720 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ target/ -.idea/ *.iml *.orig @@ -26,3 +25,196 @@ target/ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +### Windows template +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Eclipse template +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Java template +# Compiled class file + +# Log file + +# BlueJ files + +# Mobile Tools for Java (J2ME) + +# Package Files # + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml diff --git a/.idea/artifacts/hapi_fhir_jpaserver_starter_war.xml b/.idea/artifacts/hapi_fhir_jpaserver_starter_war.xml new file mode 100644 index 0000000..b74c832 --- /dev/null +++ b/.idea/artifacts/hapi_fhir_jpaserver_starter_war.xml @@ -0,0 +1,14 @@ + + + $PROJECT_DIR$/target + + + hapi-fhir-jpaserver-starter + war + + + + + + + \ No newline at end of file diff --git a/.idea/artifacts/hapi_fhir_jpaserver_starter_war_exploded.xml b/.idea/artifacts/hapi_fhir_jpaserver_starter_war_exploded.xml new file mode 100644 index 0000000..936e34e --- /dev/null +++ b/.idea/artifacts/hapi_fhir_jpaserver_starter_war_exploded.xml @@ -0,0 +1,174 @@ + + + $PROJECT_DIR$/target/hapi-fhir-jpaserver + + + true + hapi-fhir-jpaserver-starter + war + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/artifacts/vitu_hapi_war.xml b/.idea/artifacts/vitu_hapi_war.xml new file mode 100644 index 0000000..8ac9f6e --- /dev/null +++ b/.idea/artifacts/vitu_hapi_war.xml @@ -0,0 +1,14 @@ + + + $PROJECT_DIR$/target + + + vitu-hapi + war + + + + + + + \ No newline at end of file diff --git a/.idea/artifacts/vitu_hapi_war_exploded.xml b/.idea/artifacts/vitu_hapi_war_exploded.xml new file mode 100644 index 0000000..86c20e0 --- /dev/null +++ b/.idea/artifacts/vitu_hapi_war_exploded.xml @@ -0,0 +1,168 @@ + + + $PROJECT_DIR$/target/vitu-hapi + + + true + vitu-hapi + war + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..e9feb9d --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,511 @@ + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..956f943 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..e79da7e --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..f0c2686 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..0adeb36 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 979fb22b33b4705e2323423d1e799345d7d7f6f5 Mon Sep 17 00:00:00 2001 From: patrick-werner Date: Thu, 12 Sep 2019 13:26:06 -0400 Subject: [PATCH 04/16] updated .gitignore --- .gitignore | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a1af720..68d555c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -target/ -*.iml *.orig # Compiled class file @@ -218,3 +216,100 @@ Temporary Items # Package Files # # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +### Windows template +# Windows thumbnail cache files + +# Dump file + +# Folder config file + +# Recycle Bin used on file shares + +# Windows Installer files + +# Windows shortcuts + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff + +# Generated files + +# Sensitive or high-churn files + +# Gradle + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake + +# Mongo Explorer plugin + +# File-based project format + +# IntelliJ + +# mpeltonen/sbt-idea plugin + +# JIRA plugin + +# Cursive Clojure plugin + +# Crashlytics plugin (for Android Studio and IntelliJ) + +# Editor-based Rest Client + +# Android studio 3.1+ serialized cache file + +### Eclipse template + +# External tool builders + +# Locally stored "Eclipse launch configurations" + +# PyDev specific (Python IDE for Eclipse) + +# CDT-specific (C/C++ Development Tooling) + +# CDT- autotools + +# Java annotation processor (APT) + +# PDT-specific (PHP Development Tools) + +# sbteclipse plugin + +# Tern plugin + +# TeXlipse plugin + +# STS (Spring Tool Suite) + +# Code Recommenders + +# Annotation Processing + +# Scala IDE specific (Scala & Java development for Eclipse) + +### Java template +# Compiled class file + +# Log file + +# BlueJ files + +# Mobile Tools for Java (J2ME) + +# Package Files # + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml From 38de2cb2293ca56c25008e381f7c80e0678a5871 Mon Sep 17 00:00:00 2001 From: patrick-werner Date: Thu, 12 Sep 2019 13:48:22 -0400 Subject: [PATCH 05/16] clean up ignored files --- .gitignore | 124 +---- .../hapi_fhir_jpaserver_starter_war.xml | 14 - ...pi_fhir_jpaserver_starter_war_exploded.xml | 174 ------ .idea/artifacts/vitu_hapi_war.xml | 14 - .idea/artifacts/vitu_hapi_war_exploded.xml | 168 ------ .idea/codeStyles/Project.xml | 511 ------------------ .idea/codeStyles/codeStyleConfig.xml | 5 - .idea/compiler.xml | 19 - .idea/encodings.xml | 6 - .idea/misc.xml | 20 - .idea/modules.xml | 9 - .idea/vcs.xml | 6 - 12 files changed, 8 insertions(+), 1062 deletions(-) delete mode 100644 .idea/artifacts/hapi_fhir_jpaserver_starter_war.xml delete mode 100644 .idea/artifacts/hapi_fhir_jpaserver_starter_war_exploded.xml delete mode 100644 .idea/artifacts/vitu_hapi_war.xml delete mode 100644 .idea/artifacts/vitu_hapi_war_exploded.xml delete mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/codeStyles/codeStyleConfig.xml delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/encodings.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.gitignore b/.gitignore index 68d555c..db30ca5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.orig +target/ # Compiled class file *.class @@ -59,6 +60,7 @@ $RECYCLE.BIN/ .idea/**/usage.statistics.xml .idea/**/dictionaries .idea/**/shelf +.idea/artifacts/** # Generated files .idea/**/contentModel.xml @@ -80,11 +82,11 @@ $RECYCLE.BIN/ # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. -# .idea/modules.xml -# .idea/*.iml -# .idea/modules -# *.iml -# *.ipr + .idea/modules.xml + .idea/*.iml + .idea/modules + *.iml + *.ipr # CMake cmake-build-*/ @@ -202,114 +204,4 @@ Icon .AppleDesktop Network Trash Folder Temporary Items -.apdisk - -### Java template -# Compiled class file - -# Log file - -# BlueJ files - -# Mobile Tools for Java (J2ME) - -# Package Files # - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -### Windows template -# Windows thumbnail cache files - -# Dump file - -# Folder config file - -# Recycle Bin used on file shares - -# Windows Installer files - -# Windows shortcuts - -### JetBrains template -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff - -# Generated files - -# Sensitive or high-churn files - -# Gradle - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/modules.xml -# .idea/*.iml -# .idea/modules -# *.iml -# *.ipr - -# CMake - -# Mongo Explorer plugin - -# File-based project format - -# IntelliJ - -# mpeltonen/sbt-idea plugin - -# JIRA plugin - -# Cursive Clojure plugin - -# Crashlytics plugin (for Android Studio and IntelliJ) - -# Editor-based Rest Client - -# Android studio 3.1+ serialized cache file - -### Eclipse template - -# External tool builders - -# Locally stored "Eclipse launch configurations" - -# PyDev specific (Python IDE for Eclipse) - -# CDT-specific (C/C++ Development Tooling) - -# CDT- autotools - -# Java annotation processor (APT) - -# PDT-specific (PHP Development Tools) - -# sbteclipse plugin - -# Tern plugin - -# TeXlipse plugin - -# STS (Spring Tool Suite) - -# Code Recommenders - -# Annotation Processing - -# Scala IDE specific (Scala & Java development for Eclipse) - -### Java template -# Compiled class file - -# Log file - -# BlueJ files - -# Mobile Tools for Java (J2ME) - -# Package Files # - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +.apdisk \ No newline at end of file diff --git a/.idea/artifacts/hapi_fhir_jpaserver_starter_war.xml b/.idea/artifacts/hapi_fhir_jpaserver_starter_war.xml deleted file mode 100644 index b74c832..0000000 --- a/.idea/artifacts/hapi_fhir_jpaserver_starter_war.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - $PROJECT_DIR$/target - - - hapi-fhir-jpaserver-starter - war - - - - - - - \ No newline at end of file diff --git a/.idea/artifacts/hapi_fhir_jpaserver_starter_war_exploded.xml b/.idea/artifacts/hapi_fhir_jpaserver_starter_war_exploded.xml deleted file mode 100644 index 936e34e..0000000 --- a/.idea/artifacts/hapi_fhir_jpaserver_starter_war_exploded.xml +++ /dev/null @@ -1,174 +0,0 @@ - - - $PROJECT_DIR$/target/hapi-fhir-jpaserver - - - true - hapi-fhir-jpaserver-starter - war - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/artifacts/vitu_hapi_war.xml b/.idea/artifacts/vitu_hapi_war.xml deleted file mode 100644 index 8ac9f6e..0000000 --- a/.idea/artifacts/vitu_hapi_war.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - $PROJECT_DIR$/target - - - vitu-hapi - war - - - - - - - \ No newline at end of file diff --git a/.idea/artifacts/vitu_hapi_war_exploded.xml b/.idea/artifacts/vitu_hapi_war_exploded.xml deleted file mode 100644 index 86c20e0..0000000 --- a/.idea/artifacts/vitu_hapi_war_exploded.xml +++ /dev/null @@ -1,168 +0,0 @@ - - - $PROJECT_DIR$/target/vitu-hapi - - - true - vitu-hapi - war - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index e9feb9d..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,511 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 956f943..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index e79da7e..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index f0c2686..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 0adeb36..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 03e183bdd790c5edc5d4812d0bac259957dc9c1c Mon Sep 17 00:00:00 2001 From: patrick-werner Date: Thu, 12 Sep 2019 14:01:43 -0400 Subject: [PATCH 06/16] clean up ignored files, re-added google codestyle --- .gitignore | 1 + .idea/codeStyles/Project.xml | 511 +++++++++++++++++++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 + 3 files changed, 517 insertions(+) create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml diff --git a/.gitignore b/.gitignore index db30ca5..89599d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.orig target/ +*.iml # Compiled class file *.class diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..e9feb9d --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,511 @@ + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file From c58bde0e65788fcaf6ba2c293e1faf50af97c6d1 Mon Sep 17 00:00:00 2001 From: patrick-werner Date: Thu, 12 Sep 2019 14:32:32 -0400 Subject: [PATCH 07/16] replaced .idea codestyle with .editorconfig from core --- .editorconfig | 5 + .gitignore | 50 +-- .idea/codeStyles/Project.xml | 511 --------------------------- .idea/codeStyles/codeStyleConfig.xml | 5 - 4 files changed, 6 insertions(+), 565 deletions(-) create mode 100644 .editorconfig delete mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/codeStyles/codeStyleConfig.xml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..cd68918 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,5 @@ +[*.java] +charset = utf-8 +indent_style = space +indent_size = 2 + diff --git a/.gitignore b/.gitignore index 89599d9..18c430d 100644 --- a/.gitignore +++ b/.gitignore @@ -54,74 +54,26 @@ $RECYCLE.BIN/ ### JetBrains template # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf -.idea/artifacts/** - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. - .idea/modules.xml - .idea/*.iml - .idea/modules - *.iml - *.ipr +.idea/ # CMake cmake-build-*/ -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - # File-based project format *.iws # IntelliJ out/ -# mpeltonen/sbt-idea plugin -.idea_modules/ - # JIRA plugin atlassian-ide-plugin.xml -# Cursive Clojure plugin -.idea/replstate.xml - # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - ### Eclipse template .metadata bin/ diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index e9feb9d..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,511 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file From 3e7728441627c559f1ef6d3d011f02273c11f4d0 Mon Sep 17 00:00:00 2001 From: patrick-werner Date: Thu, 12 Sep 2019 15:02:33 -0400 Subject: [PATCH 08/16] renamed to allowed_bundle_types to be consistent with other lowercase properties --- src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java | 2 +- src/main/resources/hapi.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java index 6d620df..81fd2e0 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java @@ -45,7 +45,7 @@ public class HapiProperties { static final String SUBSCRIPTION_EMAIL_ENABLED = "subscription.email.enabled"; static final String SUBSCRIPTION_RESTHOOK_ENABLED = "subscription.resthook.enabled"; static final String SUBSCRIPTION_WEBSOCKET_ENABLED = "subscription.websocket.enabled"; - static final String ALLOWED_BUNDLE_TYPES = "allowedBundleTypes"; + static final String ALLOWED_BUNDLE_TYPES = "allowed_bundle_types"; static final String TEST_PORT = "test.port"; static final String TESTER_CONFIG_REFUSE_TO_FETCH_THIRD_PARTY_URLS = "tester.config.refuse_to_fetch_third_party_urls"; static final String CORS_ENABLED = "cors.enabled"; diff --git a/src/main/resources/hapi.properties b/src/main/resources/hapi.properties index deac1b4..a29ca68 100644 --- a/src/main/resources/hapi.properties +++ b/src/main/resources/hapi.properties @@ -95,7 +95,7 @@ cors.allow_origin=* ################################################## # Allowed Bundle Types for persistence (defaults are: COLLECTION,DOCUMENT,MESSAGE) ################################################## -#allowedBundleTypes=COLLECTION,DOCUMENT,MESSAGE,TRANSACTION,TRANSACTIONRESPONSE,BATCH,BATCHRESPONSE,HISTORY,SEARCHSET +#allowed_bundle_types=COLLECTION,DOCUMENT,MESSAGE,TRANSACTION,TRANSACTIONRESPONSE,BATCH,BATCHRESPONSE,HISTORY,SEARCHSET ################################################## # Subscriptions From 2fcad90e937a808b37222ca7b969fddfb26813a9 Mon Sep 17 00:00:00 2001 From: Sean McIlvenna Date: Tue, 1 Oct 2019 11:12:32 -0700 Subject: [PATCH 09/16] Adding properties: - enforce referential integrity on delete - enforce referential integrity on write - auto create reference targets --- .../jpa/starter/FhirServerConfigCommon.java | 6 ++++++ .../uhn/fhir/jpa/starter/HapiProperties.java | 18 ++++++++++++++++-- src/main/resources/hapi.properties | 3 +++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java b/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java index a396ee4..f347915 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java @@ -28,6 +28,9 @@ public class FhirServerConfigCommon { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirServerConfigCommon.class); + private Boolean autoCreatePlaceholderReferenceTargets = HapiProperties.getAutoCreatePlaceholderReferenceTargets(); + private Boolean enforceReferentialIntegrityOnWrite = HapiProperties.getEnforceReferentialIntegrityOnWrite(); + private Boolean enforceReferentialIntegrityOnDelete = HapiProperties.getEnforceReferentialIntegrityOnDelete(); private Boolean allowContainsSearches = HapiProperties.getAllowContainsSearches(); private Boolean allowMultipleDelete = HapiProperties.getAllowMultipleDelete(); private Boolean allowExternalReferences = HapiProperties.getAllowExternalReferences(); @@ -82,6 +85,9 @@ public class FhirServerConfigCommon { public DaoConfig daoConfig() { DaoConfig retVal = new DaoConfig(); + retVal.setAutoCreatePlaceholderReferenceTargets(this.autoCreatePlaceholderReferenceTargets); + retVal.setEnforceReferentialIntegrityOnWrite(this.enforceReferentialIntegrityOnWrite); + retVal.setEnforceReferentialIntegrityOnDelete(this.enforceReferentialIntegrityOnDelete); retVal.setAllowContainsSearches(this.allowContainsSearches); retVal.setAllowMultipleDelete(this.allowMultipleDelete); retVal.setAllowExternalReferences(this.allowExternalReferences); diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java index 81fd2e0..8b3bfeb 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java @@ -16,7 +16,10 @@ import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.*; public class HapiProperties { - public static final String BINARY_STORAGE_ENABLED = "binary_storage.enabled"; + static final String AUTO_CREATE_PLACEHOLDER_REFERENCE_TARGETS = "auto_create_placeholder_reference_targets"; + static final String ENFORCE_REFERENTIAL_INTEGRITY_ON_WRITE = "enforce_referential_integrity_on_write"; + static final String ENFORCE_REFERENTIAL_INTEGRITY_ON_DELETE = "enforce_referential_integrity_on_delete"; + static final String BINARY_STORAGE_ENABLED = "binary_storage.enabled"; static final String ALLOW_EXTERNAL_REFERENCES = "allow_external_references"; static final String ALLOW_MULTIPLE_DELETE = "allow_multiple_delete"; static final String ALLOW_PLACEHOLDER_REFERENCES = "allow_placeholder_references"; @@ -377,8 +380,19 @@ public class HapiProperties { } public static boolean getGraphqlEnabled() { - return HapiProperties.getBooleanProperty(GRAPHQL_ENABLED, true); + return HapiProperties.getBooleanProperty(GRAPHQL_ENABLED, true); } + public static boolean getEnforceReferentialIntegrityOnDelete() { + return HapiProperties.getBooleanProperty(ENFORCE_REFERENTIAL_INTEGRITY_ON_DELETE, true); + } + + public static boolean getEnforceReferentialIntegrityOnWrite() { + return HapiProperties.getBooleanProperty(ENFORCE_REFERENTIAL_INTEGRITY_ON_WRITE, true); + } + + public static boolean getAutoCreatePlaceholderReferenceTargets() { + return HapiProperties.getBooleanProperty(AUTO_CREATE_PLACEHOLDER_REFERENCE_TARGETS, true); + } } diff --git a/src/main/resources/hapi.properties b/src/main/resources/hapi.properties index a29ca68..0b92af1 100644 --- a/src/main/resources/hapi.properties +++ b/src/main/resources/hapi.properties @@ -13,6 +13,9 @@ fhir_version=R4 # accessible from the server itself. server_address=http://localhost:8080/hapi-fhir-jpaserver/fhir/ +auto_create_placeholder_reference_targets=true +enforce_referential_integrity_on_write=true +enforce_referential_integrity_on_delete=true default_encoding=JSON etag_support=ENABLED reuse_cached_search_results_millis=-1 From d314cdcfb9918c079b88f6927f3f1dcf76193af5 Mon Sep 17 00:00:00 2001 From: Sean McIlvenna Date: Tue, 1 Oct 2019 11:17:45 -0700 Subject: [PATCH 10/16] Adding properties: - enable indexing missing properties --- .../ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java | 2 ++ src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java | 5 +++++ src/main/resources/hapi.properties | 7 ++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java b/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java index f347915..6a0c818 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java @@ -28,6 +28,7 @@ public class FhirServerConfigCommon { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirServerConfigCommon.class); + private Boolean enableIndexMissingFields = HapiProperties.getEnableIndexMissingFields(); private Boolean autoCreatePlaceholderReferenceTargets = HapiProperties.getAutoCreatePlaceholderReferenceTargets(); private Boolean enforceReferentialIntegrityOnWrite = HapiProperties.getEnforceReferentialIntegrityOnWrite(); private Boolean enforceReferentialIntegrityOnDelete = HapiProperties.getEnforceReferentialIntegrityOnDelete(); @@ -85,6 +86,7 @@ public class FhirServerConfigCommon { public DaoConfig daoConfig() { DaoConfig retVal = new DaoConfig(); + retVal.setIndexMissingFields(this.enableIndexMissingFields ? DaoConfig.IndexEnabledEnum.ENABLED : DaoConfig.IndexEnabledEnum.DISABLED); retVal.setAutoCreatePlaceholderReferenceTargets(this.autoCreatePlaceholderReferenceTargets); retVal.setEnforceReferentialIntegrityOnWrite(this.enforceReferentialIntegrityOnWrite); retVal.setEnforceReferentialIntegrityOnDelete(this.enforceReferentialIntegrityOnDelete); diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java index 8b3bfeb..02f6581 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java @@ -16,6 +16,7 @@ import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.*; public class HapiProperties { + static final String ENABLE_INDEX_MISSING_FIELDS = "enable_index_missing_fields"; static final String AUTO_CREATE_PLACEHOLDER_REFERENCE_TARGETS = "auto_create_placeholder_reference_targets"; static final String ENFORCE_REFERENTIAL_INTEGRITY_ON_WRITE = "enforce_referential_integrity_on_write"; static final String ENFORCE_REFERENTIAL_INTEGRITY_ON_DELETE = "enforce_referential_integrity_on_delete"; @@ -394,5 +395,9 @@ public class HapiProperties { public static boolean getAutoCreatePlaceholderReferenceTargets() { return HapiProperties.getBooleanProperty(AUTO_CREATE_PLACEHOLDER_REFERENCE_TARGETS, true); } + + public static boolean getEnableIndexMissingFields() { + return HapiProperties.getBooleanProperty(ENABLE_INDEX_MISSING_FIELDS, false); + } } diff --git a/src/main/resources/hapi.properties b/src/main/resources/hapi.properties index 0b92af1..9f51ca4 100644 --- a/src/main/resources/hapi.properties +++ b/src/main/resources/hapi.properties @@ -13,9 +13,10 @@ fhir_version=R4 # accessible from the server itself. server_address=http://localhost:8080/hapi-fhir-jpaserver/fhir/ -auto_create_placeholder_reference_targets=true -enforce_referential_integrity_on_write=true -enforce_referential_integrity_on_delete=true +enable_index_missing_fields=false +auto_create_placeholder_reference_targets=false +enforce_referential_integrity_on_write=false +enforce_referential_integrity_on_delete=false default_encoding=JSON etag_support=ENABLED reuse_cached_search_results_millis=-1 From a909823e37b3220b2ef7c3c2af0cb18f17f0bfb4 Mon Sep 17 00:00:00 2001 From: Long Nguyen Date: Tue, 1 Oct 2019 21:09:37 +0200 Subject: [PATCH 11/16] Added docker-compose set and update readme --- README.md | 20 ++++++++++++++++++++ docker-compose.yml | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 60bc4ae..ed88edf 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ To configure the starter app to use MySQL, instead of the default Derby, update * datasource.driver=com.mysql.jdbc.Driver * datasource.url=jdbc:mysql://localhost:3306/hapi_dstu3 * hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect +* datasource.username=admin +* datasource.password=admin Because the integration tests within the project rely on the default Derby database configuration, it is important to either explicity skip the integration tests during the build process, i.e., `mvn install -DskipTests`, or delete the tests altogether. Failure to skip or delete the tests once you've configured MySQL for the datasource.driver, datasource.url, and hibernate.dialect as outlined above will result in build errors and compilation failure. @@ -72,6 +74,24 @@ Again, browse to the following link to use the server (note that the port 8080 m [http://localhost:8080/hapi-fhir-jpaserver/](http://localhost:8080/hapi-fhir-jpaserver/) +# Deploy with docker compose + +Docker compose is a simple option to build and deploy container. To deploy with docker compose, you should build the project +with ```mvn clean install``` and then bring up the container with ```docker-compose up -d --build```. The container can be +reached at http://localhost:8080/hapi-fhir-jpaserver/. + +In order to use another port, change the `ports` parameter +inside ``docker-compose.yml`` to ```8888:8080```, where 8888 is a port of your choice. + +The docker compose set also includes my MySQL database, if you choose to use MySQL instead of derby, change the following +properties in hapi.properties: + +* datasource.driver=com.mysql.jdbc.Driver +* datasource.url=jdbc:mysql://hapi-fhir-mysql:3306/hapi +* hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect +* datasource.username=admin +* datasource.password=admin + # Running hapi-fhir-jpaserver-example in Tomcat from IntelliJ Install Tomcat. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cd25605 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: "3" +services: + hapi-fhir-jpaserver-start: + build: . + container_name: hapi-fhir-jpaserver-start + restart: on-failure + ports: + - "8080:8080" + hapi-fhir-mysql: + image: mysql:latest + container_name: hapi-fhir-mysql + restart: always + environment: + MYSQL_DATABASE: 'hapi' + MYSQL_USER: 'admin' + MYSQL_PASSWORD: 'admin' + MYSQL_ROOT_PASSWORD: 'admin' + volumes: + - hapi-fhir-mysql:/var/lib/mysql +volumes: + hapi-fhir-mysql: \ No newline at end of file From 3bbf5e91d7d4596ebcdd18aaeda8896e17201fb0 Mon Sep 17 00:00:00 2001 From: Long Nguyen Date: Tue, 1 Oct 2019 21:10:51 +0200 Subject: [PATCH 12/16] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ed88edf..fc2491f 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Again, browse to the following link to use the server (note that the port 8080 m # Deploy with docker compose Docker compose is a simple option to build and deploy container. To deploy with docker compose, you should build the project -with ```mvn clean install``` and then bring up the container with ```docker-compose up -d --build```. The container can be +with ```mvn clean install``` and then bring up the containers with ```docker-compose up -d --build```. The server can be reached at http://localhost:8080/hapi-fhir-jpaserver/. In order to use another port, change the `ports` parameter From 18f886f139d0f0bd30e4d757a1dea87f9fb3b601 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Mon, 7 Oct 2019 08:57:50 -0500 Subject: [PATCH 13/16] Fix #56 - Compile error due to snapshot --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6816519..6ba92a1 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-fhir - 4.0.0 + 4.0.3 ca.uhn.hapi.fhir From 7af73f6ba88438bb2060c75d8517da2853d2522b Mon Sep 17 00:00:00 2001 From: James Agnew Date: Tue, 8 Oct 2019 08:30:18 -0500 Subject: [PATCH 14/16] Add note to readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fc2491f..694f1ce 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This project is a complete starter project you can use to deploy a FHIR server using HAPI FHIR JPA. +Note that this project is specifically intended for end users of the HAPI FHIR JPA server module (in other words, it helps you implement HAPI FHIR, it is not the source of the library itself). If you are looking for the main HAPI FHIR project, see here: https://github.com/jamesagnew/hapi-fhir + # Prerequisites In order to use this sample, you should have: From 72c622a479b7b5916953245e1b8f0abeed816a4e Mon Sep 17 00:00:00 2001 From: James Agnew Date: Tue, 8 Oct 2019 15:52:43 -0500 Subject: [PATCH 15/16] Fix #57 - Require Maven 3.5 --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 6ba92a1..296e2ce 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,11 @@ ca.uhn.hapi.fhir hapi-fhir-jpaserver-starter + + + 3.5.0 + + org.eclipse.jetty.websocket From 32679b582c7b78abe1712cb2d319641f349e74c7 Mon Sep 17 00:00:00 2001 From: Florian Auer Date: Thu, 24 Oct 2019 15:40:01 +0200 Subject: [PATCH 16/16] changed maven depencency of mysql to version 8.0.11 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 296e2ce..7362f60 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ mysql mysql-connector-java - 6.0.5 + 8.0.11