1. Researched the needs in detail and created the Technical Specification with help from all teams.
2. Determined the best structure for and built the database.
3. Cleanup of the source data (some prior to running through scripts and some in the code at the beginning of each file).
4. Code-load to database: converted all encoding to ASCII, modified special characters: unknown chars, carriage returns, commas, single and double quotes.
• Tested to confirm delimiters are tilde and separators are asterisk, replaced when needed.
• Parsed the data, one record at a time, first at ISA, then GS, ST and N1.
• Ensured code is looping correctly, even when multiple GS per ISA, mutliple ST per GS and multiple N1 per ST.
• Captured all relevant information.
• Created a count of both envelope levels and transaction sets to confirm accuracy at the bottom of the code.
• For each group of captured data, queried the relevant table, inserted if missing and returned the databaseID.
5. Saved the filename for each transaction set to help with testing confirmation.
6. Code-unload to reports: using two scripts, one to export data for each transaction set for easy confirmation testing against the source data and the report file; a second script generates the report file, aggregated at the level of the envelope attributes, set type and with all unique N1 data.
7. Processed some data while developing to ensure accurate processing and caught/resolved problems caused by edge cases.
8. After all issues were resolved, processed a significant volume of the data and after confirming accuracy again, gave to the EDI Manager for review.
9. After the project reviewers signed off, processed all data to create the final report.
Database structure:____________
Binary tables (databaseID and value):
Filenames
Regions
ISA_qualifiers: ISA05, ISA07
TradingPartner_IDs: ISA06, ISA08, GS02, GS03
Header_Dates: ISA09, GS04
ISA_Separators: ISA11
ISA_GS_Versions: ISA12, GS08
ISA_Controls: ISA13, GS06
ST_Settypes: ST01
N1_Types: N101
Group tables:
ISA_Info table (unique combination of databaseIDs from: ISA05, ISA06, ISA07, ISA08, ISA11 and ISA12)
GS_Info table (unique combination of databaseIDs from: GS02, GS03 and GS08)
ST_Info table (record for every Transaction Set processed, databaseIDs for: ISA_Info_ID, GS_Info_ID, ISA_Date_ID, ISA_Control_ID, GS_date_ID and ST_Settype_ID)
N1_Info table (N1_Types_ID and N1_Segment)
Crossreference tables:
TradingPartner_IDs_ID and Region_ID
ST_Info_ID and Filenames_ID
ST_Info_ID and N1_Info_ID
Scripts:____________
Script to load data: parsed inbound files one envelope at a time and for each relevant attribute, queried the database (inserted if didn't exist) and returned the databaseID.
Script to write All Sets Report: written to .csv
Header: Set, ISA S, ISA Sender, ISA R, ISA Receiver, ISA Date, ISA11, ISA Version, ISA Control, GS Sender, GS Receiver, GS Date, GS Version, Filename, N1 Types, N1 Segments
Pulled records from ST_Info table for a set date range. For all these records, determined which info is required from all other tables and loaded to variables. Then looped through initial query results again and output all to .csv
Script to write Final Report: written to .csv
Header: System, Region, Count, Set, ISA-S, ISA Sender, ISA-R, ISA Receiver, ISA Separator, ISA Version, GS Sender, GS Receiver, GS Version, N1 Types, N1 Segments
Pulled records from ST_Info table for a set date range. Determined which info is required from all other tables and loaded to variables. Then from ST_Info data, grouped unique record based on ISA_Info_ID, GS_Info_ID and ST_Settype_ID. Counted these and output one record to report, adding each unique N101 and N1-segment values to the record.