Simplified - Proposed File Processing (Old)
This was intended as an interim solution to use PatientView in place of the new UKRDC if the process needed to be operational before that was ready. At the moment we are still waiting for a Data Sharing Agreement to be agreed.
Outstanding pieces of work are -
- The script is currently written as a manual process and would need automating.
- The script has been written to use the full DBS Tracing Response. It needs to use the cut down one returned by the SIMPLIFIED Tracing Process.
- The script uses the Views that were created for the UKRDC PV2 Migration and assumes that these have been refreshed recrently.
- Once the DSA has been agreed the output of the script needs reviewing to make sure that it matches. This would also involve filtering the test results so only those specifically requested were included.
Code
Input
The script uses a copy of the Response file generated by the DBS System Tracing the list of SIMPLIFIED patients. Each row in the file represents one patient.
The script checks that the patient has been successfully traced. If they haven't then they are ignored. The SIMPLIFIED project will have separately recieved a copy of the Tracing output and so will know that these patients need investigating.
The Traced NHS Number is then used to query the PatientView database to see if data has been received for them. If no data is found an error is logged.
The SIMPLIFIED project have been told that they need to make sure that the patients are enrolled on PatientView. At the moment a high proportion are not.
Processing
The output is a single RDA file per Facility that has sent data for that patient. This means that a patient could have more than one file if they attend multiple hospitals.
The script outputs what we think will meet the requirements of the project but is subject to checking against the DSA once agreed.
The script shares (via copy/paste not libraries) code with the PV migration script.
RDA Output
Demographics
The standard PV demographics are currently included. This is a particular area that needs checking against the DSA.
PVData
This is used to send the current Transplant Status, Modality and Primary Renal Diagnosis. This was included as it was likely of interest to the SIMPLIFIED project, however caution should be used when analysing these fields.
Medication
The current medications as held on PV are sent. If we were working from the UKRDC they would want the full set to be sent.
LabOrders
These are extracted from PatientView in the same way as the PV Extract.
Modalities (Timelines)
These come from the UKRR SQL Server Database. Each TREATMENT record is turned into a TREATMENT type ENCOUNTER. It is likely that only the Start Date will be available in the UKRR database and we are not doing anything to calculate a To Date.
TNG-182 still needs to be looked at for this.
NHSB&T Waiting Lists
The UKT_TRANSPLANT records in the UKRR SQL Database are turned into TRANSPLANTLIST type ENCOUNTERs. The Encounter starts with REGISTRATION_START_DATE and ends with REGISTRATION_END_DATE
Looking at some examples REGISTRATION_END_DATE seems poorly/inconsistently populated. If this is included in the DSA we should check if this is the "correct" thing to do or whether we should assume that a TRANSPLANT_DATE ends a REGISTRATION if not otherwise supplied.
NHSB&T Transplants
The UKT_TRANSPLANT records in the UKRR SQL Database are turned into TRANSPLANT type PROCEDURES. No attempt is made to supplement them using TREATMENT records held by the UKRR as NHS B&T's records should be comprehensive and are more up to date than those held by the UKRR.
Output
The process outputs the XML files to a specified folder.