Use source patient identity for breast follow-up

This commit is contained in:
Angel Capetillo Zavala
2026-11-13 17:38:19 -06:00
parent 2ca86232c9
commit eeb55c4255
11 changed files with 73 additions and 110 deletions
+3 -4
View File
@@ -24,10 +24,9 @@ if os.name == 'nt':
path = Path(os.environ['CAMA_SYNTHETIC_SQLITE']).resolve(strict=True)
secret = os.environ['CAMA_COHORT_SECRET'].encode()
token = os.environ['CAMA_COHORT_ACCESS_TOKEN']
if len(secret) < 32 or len(token) < 32:
raise ValueError('Both the cohort secret and access token must be at least 32 characters')
if len(token) < 32:
raise ValueError('The access token must be at least 32 characters')
if not path.is_file():
raise ValueError('The synthetic SQLite database must already exist')
@@ -47,7 +46,7 @@ app = create_app()
def read(cutoff):
with Session(engine) as session:
return CamaCohort(session, secret).rows(cutoff)
return CamaCohort(session).rows(cutoff)
def authorized(request):