From 2040dcbf25cda7ee6cb0078d833d736dbec523bf Mon Sep 17 00:00:00 2001 From: jdhayhurst Date: Fri, 21 Jul 2023 11:48:44 +0100 Subject: [PATCH] update harmonisation status --- harmonisationUtils/db.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/harmonisationUtils/db.py b/harmonisationUtils/db.py index 95c16f8..c5be321 100644 --- a/harmonisationUtils/db.py +++ b/harmonisationUtils/db.py @@ -50,6 +50,22 @@ def insert_study(self, study: tuple) -> None: """, study) self.commit() + + def update_harmonisation_status(self, study_id: str, status: bool) -> None: + self.cur.execute(""" + UPDATE studies + SET isHarm = ? + WHERE study = ? + """, + (status, study_id)) + + def update_in_progress_status(self, study_id: str, status: bool) -> None: + self.cur.execute(""" + UPDATE studies + SET inProg = ? + WHERE study = ? + """, + (status, study_id)) def select_studies(self, studies: list) -> list: sql = f"""