Skip to content

Commit

Permalink
docs, research question, reorg
Browse files Browse the repository at this point in the history
documentation on accessing postgres data, research question, slight reorg
ref #13
ref #10
  • Loading branch information
hjwilli committed Jan 27, 2022
1 parent 1e1b560 commit 125edd9
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 6 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,11 @@ Run tests with the following:
docker-compose -f docker-compose-test.yml up
```
This will run the unit tests. The test results will be printed in the docker log. An exit code of 0 will be returned if the tests pass, otherwise a non-zero code will be returned.

## Viewing source data in Postgres

Once docker has been started using `docker-compose up`, the database can be browsed using database GUI tool like DBeaver with the credentials:
* Host: localhost
* Database: EHR
* Username: postgres
* Password: postgres
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions data/survey/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Self-reported survey spreadsheets will go here
53 changes: 49 additions & 4 deletions docs/walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,58 @@ This example will cover:
> *Note: This demonstration is set up as Docker multi-container project, with one container holds the Carnival application and other containers that contain example databases. This walkthrough focuses excusively on the Carnival application. See [Running the Project](https://github.com/carnival-data/carnival-micronaut/blob/master/README.md#running-the-project) for instrucitons on running the entire project.*

## Creating a new Carnival project
# Research Problem
For this example the researcher is looking for a case and control cohort of patients that meet certian criteria:

*IN PROGRESS, pending info on EHR data*

>Cases
>* Age - between 18 and 55
>* At least two healthcare encounters with indications of *DISEASE* via *CRITERIA*
>* Has been perscribed medication *XXX*
>* Self-reported social history of drinking or smoking
>
>Controls
>* Age - between 18 and 55
>* No indications of *DISEASE* via *CRITERIA*
>* Has not been perscribes medication *XXX*
>* Self-reported social history of drinking or smoking

## Examining the Source Data
There are two synthetic relational datasources:

* **Electronic Heath Records(EHR) data** is stored in a Postgres database. The data is in **XXX** format.
* **Self-reported patient survey data** is stored in csv spreadsheets

## Defining the graph model

## Connecting the data
### EHR Data in Postgres
### CSV file data

The EHR data is represented by synthetically-generated **XXX** formated dataset that contains information about patients and heathcare encounters. This data was generated using **XXX** (synthea?)


For this example, we set up a Postgres database in a docker container using the default [Postgres docker image](https://hub.docker.com/_/postgres/). The raw data is located in `data/db`, and the image has been configured to automatically load the data when docker is started.


Once docker has been started using `docker-compose up`, the database can be browsed using database GUI tool like DBeaver with the credentials:
* Host: localhost
* Database: EHR
* Username: postgres
* Password: postgres


### Self-reported survey data in CSV file data

CSV files that contain the results of self-reported surveys are located in `data/survey`.

# Carnival
This demonstration been set up as a Docker multi-container project, with a container that holds the Carnival/Micronaut server applications and other containers that have databases with test data. The source data for the carnival server is located in `/src`


## Creating a new Carnival Project

## Defining the graph model
Now that we have examined the data and created an initial carnival project, we want to create a data model that harmonizes patient and encounter data and the survey data.

## Doing graph operations
### Drawing conclusions
Expand Down
4 changes: 2 additions & 2 deletions postgres.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres

COPY db/setup.sql /docker-entrypoint-initdb.d/setup.sql
COPY db/*.csv /db/
COPY data/db/setup.sql /docker-entrypoint-initdb.d/setup.sql
COPY data/db/*.csv /db/

0 comments on commit 125edd9

Please sign in to comment.