import os import cPickle as pickle client = MongoClient() db = client.test #"ATHENA_TOKEN":"Bearer 2bsm398qq7827s9r85xg8nd5" key = 'gt5p97xrp5qzur3wecvzn3py' secret = 'XgptQJgP8jWSdey' #key = 'rpees3hagjarypdvwdnhjm4f' #secret = 'BR46MSP5bRreWEA' version = 'preview1' practiceid = '195900' api = athenahealthapi.APIConnection(version, key, secret, practiceid) app = Bottle() def scoring(personality_res): result = personality_res['emotion']['document']['emotion'] score = 0 if result['anger'] > 0.8: score += 4 elif result['anger'] > 0.5: score += 3 elif result['anger'] > 0.3: score += 2 if result['sadness'] > 0.8: score += 4
def __init__(self): self.__api = athenahealthapi.APIConnection(version, key, secret, practiceid) self.__db = athenadb.AthenaPatientDatabase(db_filename)