From f3d73a5ac18a152a570913c661c74c7deb42cea7 Mon Sep 17 00:00:00 2001 From: youainti Date: Wed, 29 Jun 2022 13:50:06 -0700 Subject: [PATCH] Added instructions on extracting other data --- Parser/extraction-lib.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Parser/extraction-lib.py b/Parser/extraction-lib.py index 4a11cce..84b2007 100644 --- a/Parser/extraction-lib.py +++ b/Parser/extraction-lib.py @@ -371,4 +371,30 @@ if __name__ == "__main__": with psycopg2.connect(dbname="aact_db", user="root", password="root",host="will-office") as db_connection: version1.load_to_db(db_connection) version2.load_to_db(db_connection) - #print(db_connection) \ No newline at end of file + #print(db_connection) + +""" +Documentation: + +TO add a new field to extraction-lib + +1. Locate the field in the HTML + - form id (e.g.
Record Verification:. + "Record Verification:" is the data label in the example above. +2. Identify what data you will be extracting + - type (date, text, int, etc) + - if it contains a category ([Actual] vs [Anticipated] etc) +3. Add data to: + - sql table: history.trial_snapshots + - the VersionData class + - the VersionData.load_to_db() function +4. Ensure the field matcher in `get_forms(*)` is matching on the form ID and has a function processing the form +5. Ensure the function processing the form has a match entry to proceess the row + - This should match on data label and then process the data by + - splitting into old and new versions + - Extracting the data for both old and new + - add the data to the passed VersionData objects +""" \ No newline at end of file