Added instructions on extracting other data

parser
youainti 4 years ago
parent 9d5a726494
commit f3d73a5ac1

@ -372,3 +372,29 @@ if __name__ == "__main__":
version1.load_to_db(db_connection) version1.load_to_db(db_connection)
version2.load_to_db(db_connection) version2.load_to_db(db_connection)
#print(db_connection) #print(db_connection)
"""
Documentation:
TO add a new field to extraction-lib
1. Locate the field in the HTML
- form id (e.g. <form id="form_StudyStatus> gives the form id "form_StudyStatus)
- Table row's data label. This corresponds to the text of first column in the row and will
look something like
<td class="rowLabel" style="min-width: 210px;">Record Verification:</td>.
"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
"""
Loading…
Cancel
Save