File size: 2,930 Bytes
bc5d3e4 4b4f1f6 bc5d3e4 412f613 451cda9 412f613 362c1df bc5d3e4 3bbaa1f bc5d3e4 3bbaa1f c4a2f1e 3bbaa1f bc5d3e4 6399f10 412f613 0f8c356 3bbaa1f 0f8c356 bb32635 3bbaa1f ce1b1cd 3bbaa1f 362c1df bc5d3e4 412f613 362c1df bb32635 362c1df 412f613 4b4f1f6 004db8a 4b4f1f6 4dd128d 4b4f1f6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
import os
import json
'''
shared environment variables
'''
aws_access_key_id = os.getenv('AMRA_AWS_ACCESS_KEY_ID')
aws_secret_access_key = os.getenv('AMRA_AWS_SECRET_ACCESS_KEY')
openai_api_key = os.getenv('AMRA_OPENAI_API_KEY')
default_region = "Spine"
device_options={
"secondary extraction":False,
"secondary extraction count":0
}
default_s3_bucket = "amra-studies"
'''
ui equivalent environment variables
'''
ec_options={
"Equivalent Comparator":False,
"Equivalent Comparator require SD":False,
"Equivalent Comparator count":0
}
anatomic_domains=[
# "Dental/CMF",
"Extremity",
"Spine"
]
'''
dynamodb tables structure
'''
logic_keywords = {
"groups":["group"],
"preoperatives":["preoperative","preop","pre-op"]
}
source_format = "<column 1 field>\n<value 1>\n<value 2>...<value n>\n<column 2 field>\n<value 1>\n<value 2>...<value n>\n...<column n field>\n<value 1>\n<value 2>...<value n>\n"
anatomic_list = ["Spinal","Extremities"]
tables_inst=[
f"extract tables from the system text. the tables are mostly in the following format: {source_format}",
f"reformat the returned tables into a markdown table syntax.",
f"if applicable, remove the standard deviation after the mean and round all the numbers to one decimal places.",
f"include all table titles."
]
article_prompts = {
"Authors": '''extract all of the authors of the article from the above text.\n
Return the results on the same line separated by commas as Authors: Author A, Author B...
''',
"Acceptance Year": '''extract the acceptance year of the article from the above text.\n
Return the results on a single line as Accepted Year: <year>.
''',
"Acceptance Month":'''extract the acceptance month of the article from the above text.\n
Return the results on a single line as Accepted Month: <month>.
'''
}
# overview_prompts = clinical_prompts = radiological_prompts = other_prompts = {}
# # populate the prompts from .prompt/overview/ folder
# def update_prompts_from_dir(prompts,path):
# for file in os.listdir(path):
# with open(f"{path}/{file}","r") as f:
# prompts[file.split(".")[0]] = f.read()
# update_prompts_from_dir(overview_prompts,".prompts/overview")
# update_prompts_from_dir(clinical_prompts,".prompts/clinical")
# update_prompts_from_dir(radiological_prompts,".prompts/radiologic")
# update_prompts_from_dir(other_prompts,".prompts/other")
'''
application default data
'''
app_data = {
"current article":{},
"articles":{},
"prompts":{},
"terms":[],
"summary":{},
"user":{
"summary":{"articles":[]},
"performance outcome #1":{"assessment_step":"Clinical"},
"performance outcome #2":{"assessment_step":"Clinical"},
"safety outcome #1":{},
"safety outcome #2":{},
}
}
with open(".data/defaults.json","r") as f:
defaults = json.load(f) |