3C Extract
Running
Install sql_runner -https://bitbucket.renalregistry.nhs.uk/projects/RR/repos/sql_runner/browse
Run:
python scripts\sql_run.py batch jobs\regular\3C Q:\Output
then run:
python scripts\sql_run.py --connection-string "postgresql+psycopg2://ukrdc:XXXXXXXXXX@localhost:6200/UKRDC3" batch jobs\regular\3C_UKRDC Q:\Ouput
(with the actual password subtituted above)
Definition
See DSA71 ( R:\0 Information Governance\Data sharing agreements (DSAs)\DSAs\Current DSAs\DSA71 Haynes_3C_Oxford )
All the patient data extracts are restricted to those patients in the 3C Study Identifier Table.
"biochem"
This looks in the QUARTERLY_TREATMENT (QUA) & MONTHLY_TREATMENT (QBL) blocks for:
- Creatinine
- Tacrolimus
- Sirolimus
"latest_treatment"
This returns the latest TREATMENT (TXT) record for the patient.
"modality_after_transplant"
This looks for the NHS B&T Transplant records for each of the patients. A patient may have more than one.
For each of these records it uses the Failure Date (if supplied) or the Transplant Date and looks for the closest TREATMENT entry to start after that Date.
"Transfer In" Transplant Type codes are excluded as these are common when a patient returns to their own unit, as are codes we have classified as type "X" - these would typically be codes that record something other than a treatment such as "Graft Functioning".
"code_desc"
This contains the description of all the modality codes as well as how we classify them to help explain the logic used.
"ukrdc_biochem"
This looks in the UKRDC for patients with a 3C Program Membership (originally created from the table in the renalreg database) who have creatinine/sirolimus/tacrolimus results.
Note that this data has not been through a validation process in the same way as the UKRR data.
Sending
E-mail to richardhaynes@nhs.net