├── static ├── media │ ├── loading.gif │ └── mimic-III.png ├── bootstrap │ ├── css │ │ ├── footer.css │ │ ├── carousel.css │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ └── bootstrap-theme.css │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ └── npm.js ├── fonts │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── js │ ├── analytics.js │ ├── sb-admin-2.js │ ├── custom.js │ ├── custom_dashboard.js │ ├── FileSaver.js │ ├── jquery.twbsPagination.js │ └── bootbox.js └── css │ ├── metisMenu.min.css │ ├── custom.css │ └── sb-admin-2.css ├── wsgi-sample.py ├── requirements.txt ├── wsgi.py ├── wsgi_querybuilder.ini ├── templates ├── base.html ├── user.html ├── css_js.html ├── dashboard.html └── login.html ├── README.md ├── config_sample.py ├── LICENSE ├── .gitignore ├── MIMIC_Table_desc.py ├── database.dump ├── Postgres.py └── manage.py /static/media/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIT-LCP/QueryBuilder-AWS/master/static/media/loading.gif -------------------------------------------------------------------------------- /static/media/mimic-III.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIT-LCP/QueryBuilder-AWS/master/static/media/mimic-III.png -------------------------------------------------------------------------------- /static/bootstrap/css/footer.css: -------------------------------------------------------------------------------- 1 | footer { 2 | background-color: #555; 3 | color: white; 4 | padding: 15px; 5 | } 6 | -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIT-LCP/QueryBuilder-AWS/master/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIT-LCP/QueryBuilder-AWS/master/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIT-LCP/QueryBuilder-AWS/master/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /wsgi-sample.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | import sys 4 | 5 | sys.path.append('/PATH/TO/Flask/') 6 | 7 | from manage import app 8 | -------------------------------------------------------------------------------- /static/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIT-LCP/QueryBuilder-AWS/master/static/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /static/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIT-LCP/QueryBuilder-AWS/master/static/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Click==7.0 2 | Flask==1.0.2 3 | itsdangerous==1.1.0 4 | Jinja2==2.10.1 5 | MarkupSafe==1.1.0 6 | psycopg2==2.7.7 7 | Werkzeug==0.15.6 8 | requests==2.22.0 9 | -------------------------------------------------------------------------------- /static/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIT-LCP/QueryBuilder-AWS/master/static/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /static/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MIT-LCP/QueryBuilder-AWS/master/static/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /wsgi.py: -------------------------------------------------------------------------------- 1 | import sys 2 | # 3 | sys.path.append('/var/www/vhosts/querybuilder-lcp.mit.edu/Flask/') 4 | 5 | from manage import app 6 | from manage import app as application 7 | 8 | #if __name__ == "__main__": 9 | # app.run() 10 | # application.run() 11 | -------------------------------------------------------------------------------- /static/js/analytics.js: -------------------------------------------------------------------------------- 1 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 2 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 3 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 4 | })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 5 | 6 | ga('create', 'UA-87592301-2', 'auto'); 7 | ga('send', 'pageview'); -------------------------------------------------------------------------------- /wsgi_querybuilder.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | 3 | need-app = true 4 | wsgi-file = /PATH/TO/Flask/wsgi.py 5 | 6 | plugins = python3 7 | 8 | callable = app 9 | master = true 10 | processes = 5 11 | gid = publicusers 12 | 13 | socket = /etc/uwsgi.sockets/querybuilder_uwsgi.sock 14 | venv = /PATH/TO/Flask/python_env 15 | 16 | logto = /var/log/uwsgi/%n.log 17 | 18 | chmod-socket = 666 19 | die-on-term = true 20 | 21 | vacuum = true 22 | -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |User information
32 |Last {{ Query_History | length }} queries
43 || ID | COLUMN_NAME | DATA_TYPE | NULLABLE | 61 |
|---|---|---|---|
| {0} | {1} | {2} | {3} | 65 |
| {0} | ".format(item1) 73 | temp += "
|---|
| {0} | ".format(line2) 78 | temp += "
Query Builder is a simple Postgres SQL client that allows you to do introductory searches 16 | to our public databases.
17 |This interface also provides the 18 | ability for users to export the results of their queries for processing in their own statistical tools.
If you are experiencing issues when using Query Builder or if you have a suggestion for improvement, please raise an issue on our issue tracker.
79 |To raise an issue, first navigate to the Query Builder Repository on GitHub or click here. After logging in to GitHub, click “New issue”, add a title and description of the problem, and then select the “Submit new issue” button.
80 |MIMIC-III (Medical Information Mart for Intensive Care III) is a large, freely-available database comprising deidentified health-related data associated with over forty thousand patients who stayed in critical care units of the Beth Israel Deaconess Medical Center between 2001 and 2012.
88 |The database includes information such as demographics, vital sign measurements made at the bedside (~1 data point per hour), laboratory test results, procedures, medications, caregiver notes, imaging reports, and mortality (both in and out of hospital).
89 |MIMIC supports a diverse range of analytic studies spanning epidemiology, clinical decision-rule improvement, and electronic tool development. It is notable for three factors:
90 |
98 | Your query was:
{}
175 |The error is:
""".format( 176 | query.rstrip()) 177 | for line in str(error).split("\n"): 178 | query_error += "{}
".format(line) 179 | query_error += """