This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
308 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.hl7.gravity.refimpl.sdohexchange.cbo</groupId> | ||
<artifactId>cbo</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>app</artifactId> | ||
<name>CBO App</name> | ||
<packaging>jar</packaging> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-dependencies</artifactId> | ||
<version>${spring_boot_version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.h2database</groupId> | ||
<artifactId>h2</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.springfox</groupId> | ||
<artifactId>springfox-boot-starter</artifactId> | ||
<version>3.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.springfox</groupId> | ||
<artifactId>springfox-swagger-ui</artifactId> | ||
<version>3.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ca.uhn.hapi.fhir</groupId> | ||
<artifactId>hapi-fhir-structures-r4</artifactId> | ||
<version>${hapi_version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ca.uhn.hapi.fhir</groupId> | ||
<artifactId>hapi-fhir-client</artifactId> | ||
<version>${hapi_version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ca.uhn.hapi.fhir</groupId> | ||
<artifactId>hapi-fhir-validation-resources-r4</artifactId> | ||
<version>${hapi_version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ca.uhn.hapi.fhir</groupId> | ||
<artifactId>hapi-fhir-utilities</artifactId> | ||
<version>3.8.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hl7.gravity.refimpl.sdohexchange.components</groupId> | ||
<artifactId>fhir-common</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hl7.gravity.refimpl.sdohexchange.components</groupId> | ||
<artifactId>spring-boot-starter-exception-handler</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>1.18.12</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>ca.uhn.hapi.fhir</groupId> | ||
<artifactId>hapi-fhir-validation</artifactId> | ||
<version>${hapi_version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<version>${spring_boot_version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>repackage</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>3.2.0</version> | ||
<executions> | ||
<execution> | ||
<id>Copy index.html</id> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>src/main/resources/public</outputDirectory> | ||
<overwrite>true</overwrite> | ||
<resources> | ||
<resource> | ||
<directory>${project.parent.basedir}/ui/dist</directory> | ||
<includes> | ||
<include>index.html</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>Copy Vue.js frontend content</id> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>src/main/resources/static</outputDirectory> | ||
<overwrite>true</overwrite> | ||
<resources> | ||
<resource> | ||
<directory>${project.parent.basedir}/ui/dist</directory> | ||
<includes> | ||
<include>favicon.*</include> | ||
<include>fonts/</include> | ||
<include>js/</include> | ||
<include>img/</include> | ||
<include>css/</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
12 changes: 12 additions & 0 deletions
12
cbo/app/src/main/java/org/hl7/gravity/refimpl/sdohexchange/CBOApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.hl7.gravity.refimpl.sdohexchange; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class CBOApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(CBOApplication.class, args); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
cbo/app/src/main/java/org/hl7/gravity/refimpl/sdohexchange/config/FhirConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.hl7.gravity.refimpl.sdohexchange.config; | ||
|
||
import ca.uhn.fhir.context.FhirContext; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class FhirConfig { | ||
|
||
@Bean | ||
public FhirContext fhirContext() { | ||
return FhirContext.forR4(); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
cbo/app/src/main/java/org/hl7/gravity/refimpl/sdohexchange/config/SpringFoxConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.hl7.gravity.refimpl.sdohexchange.config; | ||
|
||
import com.google.common.collect.Sets; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.http.MediaType; | ||
import springfox.documentation.builders.ApiInfoBuilder; | ||
import springfox.documentation.builders.PathSelectors; | ||
import springfox.documentation.builders.RequestHandlerSelectors; | ||
import springfox.documentation.service.ApiInfo; | ||
import springfox.documentation.service.Contact; | ||
import springfox.documentation.spi.DocumentationType; | ||
import springfox.documentation.spring.web.plugins.Docket; | ||
|
||
@Configuration | ||
public class SpringFoxConfig { | ||
|
||
@Bean | ||
public Docket api(ApiInfo apiInfo) { | ||
return new Docket(DocumentationType.SWAGGER_2).consumes(Sets.newHashSet(MediaType.APPLICATION_JSON_VALUE)) | ||
.produces(Sets.newHashSet(MediaType.APPLICATION_JSON_VALUE)) | ||
.select() | ||
.apis(RequestHandlerSelectors.basePackage("org.hl7.gravity.refimpl.sdohexchange")) | ||
.paths(PathSelectors.any()) | ||
.build() | ||
.apiInfo(apiInfo) | ||
.useDefaultResponseMessages(false); | ||
} | ||
|
||
@Bean | ||
public ApiInfo apiInfo(@Value("${swagger.title}") String title, Contact contact) { | ||
return new ApiInfoBuilder().title(title) | ||
.contact(contact) | ||
.build(); | ||
} | ||
|
||
@Bean | ||
public Contact swaggerContact(@Value("${swagger.contact.name}") String name, | ||
@Value("${swagger.contact.url}") String url) { | ||
return new Contact(name, url, null); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
cbo/app/src/main/java/org/hl7/gravity/refimpl/sdohexchange/config/WebConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.hl7.gravity.refimpl.sdohexchange.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class WebConfig implements WebMvcConfigurer {} |
15 changes: 15 additions & 0 deletions
15
cbo/app/src/main/java/org/hl7/gravity/refimpl/sdohexchange/controller/LaunchController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.hl7.gravity.refimpl.sdohexchange.controller; | ||
|
||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import springfox.documentation.annotations.ApiIgnore; | ||
|
||
@Controller | ||
@ApiIgnore | ||
public class LaunchController { | ||
|
||
@GetMapping("/") | ||
public String index() { | ||
return "index.html"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
spring: | ||
h2: | ||
console: | ||
enabled: true | ||
path: /h2 | ||
settings: | ||
web-allow-others: false | ||
datasource: | ||
#url: jdbc:h2:mem:cbodb | ||
#This will crete database files in the RI root /data folder | ||
url: jdbc:h2:file:./data/cbodb | ||
username: sa | ||
password: | ||
driverClassName: org.h2.Driver | ||
|
||
swagger: | ||
title: SDOH Exchange CBO App API | ||
contact: | ||
name: Gravity Project | ||
url: https://www.hl7.org/gravity/ | ||
|
||
server: | ||
port: 8084 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.detail=#{ex.getMessage()} | ||
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.status=404 | ||
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.title=Not Found | ||
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.type=http://httpstatus.es/404 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.hl7.gravity.refimpl.sdohexchange</groupId> | ||
<artifactId>sdoh-exchange</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<groupId>org.hl7.gravity.refimpl.sdohexchange.cbo</groupId> | ||
<artifactId>cbo</artifactId> | ||
<name>CBO</name> | ||
<description>Non-FHIR-Enabled CBO App RI.</description> | ||
<packaging>pom</packaging> | ||
|
||
<modules> | ||
<module>ui</module> | ||
<module>app</module> | ||
</modules> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
<module>components</module> | ||
<module>ehr</module> | ||
<module>cp</module> | ||
<module>cbo</module> | ||
</modules> | ||
|
||
</project> |