Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion data_management/services/tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ def truncate_biopsy_tracking(self):
)
return result

def truncate_biopsy_tracking_long(self):
result = self.db_tableau.get_data(
"truncate table biopsy_tracking_long"
)
return result

def truncate_data_manager_data(self):
result = self.db_tableau.get_data(
"truncate table data_manager_data"
Expand All @@ -34,7 +40,7 @@ def load_biopsy_tracking(self):
def load_biopsy_tracking_long(self):
self.truncate_biopsy_tracking_long()
bt_results = self.dlu_management.get_biopsy_tracking_long()
query = "INSERT INTO biopsy_tracking_long(redcap_id, specimen_id, dlu_packageType, status) VALUES(%s, %s, %s, %s)"
query = "INSERT INTO biopsy_tracking_long(redcap_id, specimen_id, dlu_tis, dlu_packageType, status) VALUES(%s, %s, %s, %s, %s)"
records_modified = 0
for result in bt_results:
self.db_tableau.insert_data(query, tuple(result.values()))
Expand Down
1 change: 1 addition & 0 deletions data_management/sql/biopsy_tracking_long.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CREATE TABLE biopsy_tracking_long
(
redcap_id varchar(100) NULL,
specimen_id varchar(100) NULL,
dlu_tis varchar(100) NULL,
dlu_packageType varchar(100) NULL,
status varchar(100) NULL
) ENGINE=InnoDB
Expand Down