RRAM Extract (DSA62)
Contact
Doug Gould <Doug.Gould@icnarc.org>
Running
Install sql_runner -https://bitbucket.renalregistry.nhs.uk/projects/RR/repos/sql_runner/browse
Run:
|
Definition
All patients extracted are restricted to those who were successfully matched and inserted into the STUDY_PATIENTS table. The original cohort was "for all patients with ERF diagnosed at anytime up to 31 March 2017 and alive at 1 April 2009".
These were found using:
SELECT A.RR_NO, A.DATE_BIRTH, A.SEX, ISNULL(A.NEW_NHS_NO, A.TRACING_NHS_NO) AS NEW_NHS_NO, B.POST_CODE FROM PATIENTS A LEFT JOIN ( SELECT RR_NO, POST_CODE, ROW_NUMBER() OVER (PARTITION BY RR_NO ORDER BY DATE_START DESC) AS ROWNUMBER FROM RESIDENCY WHERE DATE_END IS NULL ) B ON A.RR_NO = B.RR_NO AND B.ROWNUMBER = 1 WHERE (A.DATE_DEATH IS NULL OR A.DATE_DEATH > '20090401') AND A.RR_NO IN ( SELECT RR_NO FROM QUARTERLY_TREATMENT INNER JOIN MODALITY_CODES ON TREATMENT_MODALITY = REGISTRY_CODE INNER JOIN LOCATIONS ON HOSP_CENTRE = CENTRE_CODE WHERE DATE_START <= '20170101' AND RRT = 1 AND COUNTRY_CODE IN ('GB-ENG', 'GB-WLS') )
NB: There is a new field in the STUDY_PATIENTS for the match score that was returned by NHS Digital should it be required in futue.
"ESRF"
Fields:
EDTA_DISEASE_CODE
EDTA_NEW_DISEASE_CODE
SECONDARY_DISEASE_CODE
PRIMARY_DISEASE_TEXT
From ESRF block for all study patients. A patient may have multiple rows if they have attended multiple renal units.
"Haemodialysis Session"
Fields:
- HD_SESSION_DATE
- SESSION_TYPE
For all study patients. Note that we default the session type to "HD" if it is not submitted. This would include all records prior to 2015 where we weren't officially collecting Plasma Exchange sessions.
"Patient"
Fields:
- FIRST_SEEN_DATE
- FIRST_EVER_RRT_MODALITY
- FIRST_EVER_RRT_DATE
- DATE_DEATH
- COD_EDTA1
- COD_EDTA2
- COD_TEXT
The First Ever RRT fields are taken from the earliest Treatment (TXT) record where the modality was one we group as RRT. This should only include dialysis for the purposes of chronic care provided that the site is using the correct codes.
"Transplants"
Fields:
- TRANSPLANT_DATE
- TRANSPLANT_ID
- TRANSPLANT_TYPE
Where TRANSPLANT_DATE is not NULL (i.e. a transplant has happened and it's not just a waiting list entry). Because sites are not submitting the new TRA block this has had to be done from the NHSBT data to obtain the TRANSPLANT_ID. Were this not required it could also be done from the Treamtent (TXT) records albeit with less information about Transplant Type.