Purpose:
The script produces an agreed extract in RDA format for patients who are part of the SIMPLIFIED project.
It requires that patients have been traced, or, in the case of Scottish patients that their details match a record held on the UKRR database.
The patient's records are searched for by NHS Number and extracted in RDA format if found.
To be extracted the patient will have to be a member of PV (for the UKRDC extract) or to have been loaded onto the UKRR Database (hench been receiving treatment ~12 months ago).
Code: https://bitbucket.renalregistry.nhs.uk/projects/TNG/repos/simplified_extract/browse
(NB: Code is currently in a branch awaiting end of review)
Deployment:
The code has been deployed from BitBucket to rr-systems-live under a username simpliextract (details in KeyPass).
The SSH/Database connection settings are stored in a JSON file under /etc/simplified
The script connects directly to the UKRR SQL Server Database but uses an SSH Tunnel to access the UKRDC Database.
Input:
The script currently expects a file in "Tracing Output" format with a specific filename in /data/simplified/extract/input
The fields required are the Supplied NHS Number, Supplied DOB and Traced NHS Number (if found)
Output:
The script creates files under /data/simplified/extract/ouput in sub-folders corresponding to the unit codes.
The filenames are in the format:
UKRR_REE01_1111111111.xml
UKRDC_REE01_1111111111.xml
Depending on where the data was extracted from. A patient may have one, both or neither of these files.
These files need to be encrypted and transferred to the SIMPLIFIED project via SFTP.