diff --git a/docs/toardb_fastapi.md b/docs/toardb_fastapi.md index 31a81d74ed414c90301215b41dd9af2f2fb064e0..9d2e0bfa26e534c8ed87c78ad33d483addcd9f85 100644 --- a/docs/toardb_fastapi.md +++ b/docs/toardb_fastapi.md @@ -420,6 +420,10 @@ [0, 'active', 'active'], [1, 'inactive', 'inactive'], [2, 'unknown', 'unknown']] +#### Kind Of Annotations #### + * Kind of Annotations: [ + [0, 'User', 'user comment'], + [1, 'Provider', 'provider comment']] #### Kind Of Organizations #### * Kind of Organizations: [ [1, 'Government', 'government'], diff --git a/toardb/toardb.py b/toardb/toardb.py index ca457c4a707f6c6c5d53edef98edb432579e323f..92f6893abf3a89a185b3bcb9ce23782d55fe4815 100644 --- a/toardb/toardb.py +++ b/toardb/toardb.py @@ -24,6 +24,7 @@ async def info(): controlled_vocabulary = { "Role Codes": settings.RC_vocab, "Role Status": settings.RS_vocab, + "Kind of Annotations": settings.AK_vocab, "Kind of Organizations": settings.OK_vocab, "Data Access Rights": settings.DA_vocab, "Sampling Frequencies": settings.SF_vocab, @@ -48,6 +49,7 @@ async def info(name: str): controlled_vocabulary = { "Role Codes": settings.RC_vocab, "Role Status": settings.RS_vocab, + "Kind of Annotations": settings.AK_vocab, "Kind of Organizations": settings.OK_vocab, "Data Access Rights": settings.DA_vocab, "Sampling Frequencies": settings.SF_vocab, @@ -119,6 +121,7 @@ async def startup_event(): fake_cur = fake_conn.cursor() RC_vocabulary = __get_enum_dict(fake_cur, "rc_vocabulary") RS_vocabulary = __get_enum_dict(fake_cur, "rs_vocabulary") + AK_vocabulary = __get_enum_dict(fake_cur, "ak_vocabulary") OK_vocabulary = __get_enum_dict(fake_cur, "ok_vocabulary") DA_vocabulary = __get_enum_dict(fake_cur, "da_vocabulary") SF_vocabulary = __get_enum_dict(fake_cur, "sf_vocabulary") @@ -142,6 +145,7 @@ fake_conn = engine.raw_connection() fake_cur = fake_conn.cursor() RC_vocabulary = __get_enum_dict(fake_cur, "rc_vocabulary") RS_vocabulary = __get_enum_dict(fake_cur, "rs_vocabulary") +AK_vocabulary = __get_enum_dict(fake_cur, "ak_vocabulary") OK_vocabulary = __get_enum_dict(fake_cur, "ok_vocabulary") DA_vocabulary = __get_enum_dict(fake_cur, "da_vocabulary") SF_vocabulary = __get_enum_dict(fake_cur, "sf_vocabulary") @@ -164,6 +168,7 @@ class Settings(BaseSettings): Enumdict=namedtuple("Dict",["value","string","display_str"]) RC_vocab = RC_vocabulary RS_vocab = RS_vocabulary + AK_vocab = AK_vocabulary OK_vocab = OK_vocabulary DA_vocab = DA_vocabulary SF_vocab = SF_vocabulary