Skip to content
Snippets Groups Projects
Commit 1ec8769d authored by hra23's avatar hra23
Browse files

Merge branch 'setting-up-in-memory-db' into 'master'

Fixed up the get patient history and added the demo

See merge request !7
parents 87e7db82 5c87c19e
No related branches found
No related tags found
1 merge request!7Fixed up the get patient history and added the demo
......@@ -166,7 +166,11 @@ class InMemoryDatabase():
"""
query = """
SELECT
*
patients.mrn,
patients.age,
patients.sex,
test_results.date,
test_results.result
FROM
patients
JOIN
......
%% Cell type:code id: tags:
``` python
from memory_db import InMemoryDatabase
from utils import populate_test_results_table
import csv
import constants
import datetime
```
%% Cell type:code id: tags:
``` python
db = InMemoryDatabase()
```
%% Cell type:code id: tags:
``` python
populate_test_results_table(db, 'history.csv')
```
%% Cell type:code id: tags:
``` python
db.persist_db()
```
%% Cell type:code id: tags:
``` python
db.close()
```
%% Cell type:code id: tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment