Skip to content

Commit

Permalink
Updated README.md with information for postgreSQL configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scrimshire committed May 25, 2015
1 parent a2ab3bf commit 065c34e
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 10 deletions.
58 changes: 52 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@ Healthcare Interoperability using HL7's FHIR standards over HTTPS transport (RES

WHAT
----
HAPI based FHIR server with Blue Button 2.0 capabilities. Able to download the files in FHIR JSON or FHIR XML for untethered PHR. Imagine this Blue Button functionality is implemented in every patient portal to free the data to patient and have them empower and take control of their health. Also provides dynamic API access to patient health info for 3rd party applications.
HAPI based FHIR server with Blue Button 2.0 capabilities. Able to download the files in FHIR JSON or FHIR XML for untethered PHR.
Imagine this Blue Button functionality is implemented in every patient portal to free the data to patient and have them
empower and take control of their health. Also provides dynamic API access to patient health info for 3rd party applications.

### Blue Button 2.0 capabilities => Download everything for a patient as a FHIR Bundle
Download the healthcare data as FHIR JSON or FHIR XML format.

![alt tag](https://github.com/gajen0981/FHIR-Server/blob/master/screenshots/BB2Download.png)

### Blue Button 2.0 capabilities
Untethered PHR and patient download and share the data with heatlhcare providers.
Untethered PHR and patient download and share the data with healthcare providers.

![alt tag](https://github.com/gajen0981/FHIR-Server/blob/master/screenshots/BB2DownloadedFiles.png)

### Example Personal Healh Record Use Case
### Example Personal Health Record Use Case
Untethered Personal Health Repository - Patient imports FHIR files from multiple health systems.
Rich Health Meaningful Info - With visually appealing mobile app, patients able to take control of their health and empower it.
Share and Proxy Access - Share the data with other heatlhcare providers and give and authorize 3rd party applications to get access to their data.
Expand Down Expand Up @@ -63,11 +65,12 @@ Include the MySQL (or any RDBMS)
### Database Configuration
DB Connection configuration with DB credentials and create a database name "fhir".

hapi-fhir-jpaserver-uhnfhirtest -> src -> main -> webapp -> WEB-INF -> hapi-fhir-tester-config.xml
hapi-fhir-jpaserver-uhnfhirtest -> src -> main -> webapp -> WEB-INF -> hapi-fhir-server-database-config.xml
![alt tag](https://github.com/gajen0981/FHIR-Server/blob/master/screenshots/dbConnectionConfig.png)

Configuration XML
Configuration XML - MySQL


```xml
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -106,18 +109,61 @@ http://www.springframework.org/schema/context http://www.springframework.org/sch
</beans>
```

Configuration XML - PostgreSQL

```
<bean id="myPersistenceDataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="org.postgresql.Driver"/>
<property name="url" value="jdbc:postgresql://localhost:5432/fhir"/>
<property name="username" value="postgres"/>
<property name="password" value="password"/>
<property name="validationQuery" value="SELECT 1"/>
</bean>
<!--<bean depends-on="dbServer" id="myEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">-->
<bean id="myEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="myPersistenceDataSource" />
<property name="persistenceXmlLocation" value="classpath:META-INF/fhirtest_persistence.xml" />
<property name="persistenceUnitName" value="FHIR_UT" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<!-- switching showSql from false -->
<property name="showSql" value="true" />
<property name="generateDdl" value="true" />
<!-- replace with PostgreSQLDialect -->
<property name="databasePlatform" value="org.hibernate.dialect.PostgreSQLDialect" />
</bean>
</property>
</bean>
```

### Modify SpringMVC persistence configuration
To choose the database type and version dialect.

hapi-fhir-jpaserver-uhnfhirtest -> src -> main -> resources -> META-INF -> fhirtest-persistence.xml
![alt tag](https://github.com/gajen0981/FHIR-Server/blob/master/screenshots/persistence.png)

Configuration XML
Configuration XML - MySQL
```xml
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect" />
```

Configuration XML - PostgreSQL
'''
<property name="hibernate.dialect" value="org.hibernate.dialect.postgreSQLDialect" />

'''

Make sure Username and Password match the settings in hapi-fhir-server-database-config.xml
'''
<!-- change user and password from root/root-->
<property name="hibernate.connection.username" value="postgres" />
<property name="hibernate.connection.password" value="fh1rSQL" />
'''

### Add JBoss application server system properties for the local server base URL
Important if you want to connect the FHIR server to its local DB

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">

<!--
<bbon_fhir_server_description>BlueButton on FHIR Server</bbon_fhir_server_description>
<bbon_fhir_root_name>fhir-p</bbon_fhir_root_name>
<bbon_fhir_server_name>BBonfhir</bbon_fhir_server_name>
<bbon_fhir_http_prefix>http://</bbon_fhir_http_prefix>
<bbon_fhir_url>test.bbonfhir.com:8080/</bbon_fhir_url>
-->

<bean class="ca.uhn.fhir.to.TesterConfig">
<property name="servers">
<list>
<value>local , DSTU1 , Local Gaj's Server (DSTU1 FHIR) , http://localhost:8080/fhir/baseDstu1</value>
<value>local , DSTU2 , Local Gaj's Server (DSTU2 FHIR) , http://localhost:8080/fhir/baseDstu2</value>
<value>bbonfhir , DSTU1 , AWS BBonFHIR Server (DSTU1 FHIR) , http://test.bbonfhir.com:8080/fhir/baseDstu1</value>
<value>bbonfhir_dev , DSTU2 , AWS BBonFHIR Server (DSTU2 FHIR) , http://test.bbonfhir.com:8080/fhir/baseDstu2</value>
<value>local , DSTU1 , Local BlueButton on FHIR Server (fhir-p/DSTU1 FHIR) , http://localhost:8080/fhir-p/baseDstu1</value>
<value>local , DSTU2 , Local BlueButton on FHIR Server (fhir-p/DSTU2 FHIR) , http://localhost:8080/fhir-p/baseDstu2</value>
<value>bbonfhir , DSTU1 , AWS BlueButton on FHIR Server (fhir-p/DSTU1 FHIR) , http://test.bbonfhir.com:8080/fhir-p/baseDstu1</value>
<value>bbonfhir_dev , DSTU2 , AWS BlueButton on FHIR Server (fhir-p/DSTU2 FHIR) , http://test.bbonfhir.com:8080/fhir-p/baseDstu2</value>
<value>home , DSTU1 , UHN/HAPI Server (DSTU1 FHIR) , http://fhirtest.uhn.ca/baseDstu1</value>
<value>home_dev , DSTU2 , UHN/HAPI Server (DSTU2 FHIR) , http://fhirtest.uhn.ca/baseDstu2</value>
<value>home , DSTU1 , UHN/HAPI Server (DSTU1 FHIR) , http://fhirtest.uhn.ca/baseDstu1</value>
Expand Down
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@
-->
<hapi_stable_version>0.9</hapi_stable_version>

<bbon_fhir_server_description>BlueButton on FHIR Server</bbon_fhir_server_description>
<bbon_fhir_root_name>fhir-p</bbon_fhir_root_name>
<bbon_fhir_server_name>BBonfhir</bbon_fhir_server_name>
<bbon_fhir_http_prefix>http://</bbon_fhir_http_prefix>
<bbon_fhir_url>test.bbonfhir.com:8080/</bbon_fhir_url>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- For site-deploy -->
Expand Down

0 comments on commit 065c34e

Please sign in to comment.