| | 41 | == i2b2ImportPathologyObservations SSIS Package |
| | 42 | |
| | 43 | Before running the package checks the contents of the ETLHistory table in the i2b2ClinDataIntegration database and the results of the web service at address http://uhlidtapps.xuhl-tr.nhs.uk:1106/Service.asmx/outputXMLStatusInfo?systemlist to see if the data warehouse is up to date and has been updated since the last time the data was copied. |
| | 44 | |
| | 45 | If the data warehouse is ready and does contain new data, the package executes the following steps: |
| | 46 | |
| | 47 | 1. Create temporary tables for Patient and LOINC mappings in the DWBRICCS database and copy the mappings into them. |
| | 48 | 1. Delete the existing pathology observations from the Observation_Fact table of the i2b2 data database. |
| | 49 | 1. Create new pathology records in the Observation_Fact table of the i2b2 data database. |
| | 50 | 1. Records are created by joining data tables in the data warehouse DWPATH database, with the mapping temporary tables created earlier in the job. |
| | 51 | 1. Rows that produce an error are inserted into the Failed_Observation_Fact table in the i2b2ClinDataIntegration database. |
| | 52 | 1. Drop temporary mapping tables. |
| | 53 | 1. Log the job completion to the ETLHistory table in the i2b2ClinDataIntegration database. |
| | 54 | |
| | 55 | |