You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
719 B
Python
36 lines
719 B
Python
import psycopg as psyco
|
|
from datetime import datetime
|
|
|
|
from flask import current_app, g
|
|
|
|
|
|
|
|
|
|
def get_all_formulary_groups(db_conn):
|
|
'''
|
|
Get the list of active formulary groups
|
|
TODO: IMplement for the given formulary
|
|
'''
|
|
sql = '''\
|
|
select distinct "USP Category", "USP Class"
|
|
from "Formularies".usp_dc ud
|
|
order by "USP Category", "USP Class"
|
|
;
|
|
'''
|
|
|
|
#query
|
|
with db_conn.cursor() as curse:
|
|
curse.execute(sql)
|
|
return curse.fetchall()
|
|
|
|
def get_formulary_groups_per_NCTID(db_conn, nct_id):
|
|
'''
|
|
Get the list of formulary groups associated with
|
|
the drugs found in a trial identified by NCTID
|
|
'''
|
|
pass
|
|
|
|
|
|
def store_trial_to_formulary_group_matches():
|
|
pass
|