Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
doc: update readMe
Browse files Browse the repository at this point in the history
  • Loading branch information
BPierrick committed Jan 3, 2022
1 parent 2fad00c commit 7a937f3
Showing 1 changed file with 33 additions and 10 deletions.
43 changes: 33 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,50 @@
# Timeline-Patient

## Setup environnement variables

First of all, environnement variables need to be set.
Start by creating a `.env` file located at the root of the project. Copy in it the content of `.env.template` file.

Set each of the constant values.


## Setup Python virtual env

From the `/python` project folder.

```sh
python3 -m venv ./.venv

source ./.venv/bin/activate

pip install -r requirements.txt
```

## Start MinIO server

From the project root folder.

```docker-compose up```

## Setup `documents` Buckets
NB: The MinIO server will have the credentials set in the `.env` file (ie `MINIO_ACCESS_KEY` & `MINIO_SECRET_KEY`)

Once MinIO server is launched, go to `http://localhost:9001` and login with the credentials
## Launch script to setup fake documents

```
Username: minio
Password: minio123
```sh
python3 python/main.sh
```

Then, go to `Buckets -> Create Bucket` and set your bucket name as `documents` or whatever you want.
## Setup `DocumentReference` resource

Go to the `manage` menu of your freshly created bucket and set its access policy to `Public`
All there is to do now is to set a new mapping `DocumentReference` (for instance in River).

You can then populate your bucket with any kind of PDF.
- Set its source table to `timeline_documents`.
- Plug the `content[0].attachment.url` attirbute to `timeline_documents.doc_url`
- Plug the `subject.identifier.value` attribute to `timeline_documents.patient_id`

## Setup `DocumentReference` resource
You can check on the preview if everything is alright.

In order to make PDF viewing available from `DocumentReference` resources, you'll have to set a value for `content[0].attachment.url` attribute. This url should respect this pattern : `http://localhost:9000/[yourBucketName]/[yourPDFName]`. Do not forget the `.pdf` extension.
Once it is, just launch a batch for this `DocumentReference` resource.

## Install App dependencies

Expand Down

0 comments on commit 7a937f3

Please sign in to comment.