Milestone 01: Screening For Kidney Disease

You've just started a new role as a health informaticist at the UNC Kidney Center. The center has a new initiative - they've gathered patient records from elsewhere in the UNC Healthcare system and would like to automatically screen patients for CKD (Chronic Kidney Disease). They would like for you to write a python script that processes health records and blood tests to identify individuals who they should contact to proactively engage for care.

To identify these patients, the clinic has obtained two different data streams. The first is a PATIENT DEMOGRAPHICS file, which includes key demographics about patients such as their age, sex, height and weight. The second is a COMPREHENSIVE METABOLIC PANEL (CMP), a lab test that measures a number of substances in the blood used to assess overall health and metabolism.

To complete this task, you will need to extract data from these files based on a shared PATIENT ID, calculate their Estimated Glomerular Filtration Rate (eGFR), and check against a THRESHOLD to identify patients who may be experiencing CKD.


Requirements

You are being provided with two files for this assignment:
You are also being provided with a formula for calculating Estimated Glomerular Filtration Rate (eGFR). This formula, The CKD-EPI Creatinine Equation (2021), calculates a patient's eGFR using their age, sex, and serum creatinine. The equation is as follows:
CKD-EPI Creatinine Equation (2021) Variables
Variable Name Value
c 142
Scr (Serum Creatinine) Patient Measure
k 0.7 (females) or 0.9 (males)
a -0.241 (female) or -0.302 (male)
low min(Scr / k, 1)
high max(Scr / k, 1)
age Patient Measure

CKD-EPI Creatinine Equation (2021)

c ⨯ low a ⨯ high -1.200 ⨯ 0.9938 age ⨯ 1.012 [if female]

The criteria that the clinic would like to use to identify patients for screening is an eGFR of <= 65.

They would like you to write a script that creates a csv file called results.csv that includes the Patient ID, patient full name, patient mobile phone number, and their calculated eGFR. This file should only include the patients screened for CKD (eGFR <= 65).


Deliverable

Name your script onyen_ckd_screening.py, where onyen is your onyen, and upload it to Milestone 01 on Canvas.


References

What follows are a few documentation links I think you might find helpful.

To verify that your script is outputting the correct values, you can check that it matches the table below or this results_gold_standard.csv file.

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Example Results
Patient_ID Patient_Name Patient_Phone Patient_eGFR
762116383Donald Morris313.959.976458.48741007347305
E36334296Brandon Webster001-372-631-054939.445536638673296
792717195Jocelyn Calderon001-432-988-3642x54545.38780526121239
K16719467Allen Lambert480.912.826360.135800534555145
345380060Ryan Ellison001-215-692-9323x145458.60472326585637
606320215Robert Kennedy+1-251-719-5935x0730749.42728716596531
L64281921Michael Singh(422)349-5770x806043.070011118296584
U53337753Courtney Johnson247-842-2467x036441.74522703520632
R49737210Spencer Roberts001-868-346-4425x02251.31672696093375
329933985Joseph Cox(612)464-3043x0990148.14472015510412
W75286992Kathy Conner359-677-948140.69831639284317
433693947Yolanda Williamson805-826-1694x77249.84115308659465
O34217130Kimberly Wilson823.804.997941.95224680908009
859924187Sharon Hogan729.485.3452x430249.57189715342774
420145045Sheila Lopez902.718.3361x7608744.42339323680083
619453711Peter Ross710-708-3906x349164.98777566223981
582469691Michael Barker953-905-4749x91347.45620129398696
U03959797Heather Ferguson(503)968-771056.28157231644802
P47416727Bobby Grant669-379-8675x61656.076814627216216
289580721Jason Ramirez001-728-805-635563.770278966214036
574988968Brooke Khan001-421-568-795056.87705043245832
753514666Amy Hansen(479)714-3345x07754.47333565543411
M56402332Bianca Marsh597.919.8972x14656.11122991097018
871012985Eric Jimenez001-319-598-3498x273161.22568013142235
N68959447Stephen Davis001-812-379-6902x32161.518176085040835
D18145546Larry Shepard001-754-257-9652x173761.66032066842206
I41537198Leonard Ward+1-833-842-5870x510155.03736408913408
F27789285Robert Kirby(641)433-5949x860857.91404084758961
836894412Justin Rivera664.794.1442x1244349.85136646300038
U30439100Christian Carney951-927-8576x39664.30246774402258
W98356135Cheryl Zimmerman+1-258-383-7833x0702534.42199354399834
I75913668Thomas Hale(829)217-4452x396749.797992605102145
819168839Jonathan Wade+1-691-411-315746.835825386620726
G65774531Emily Moore+1-221-549-963553.649754328439414
866266547Michael King+1-842-962-1960x49262.008648982264596
630724356John Porter609323477051.44853783854659
N54126269Ronald Taylor369-495-7975x975761.86199767804506
554348094Ashley Valencia737-935-6820x043335.55826736640459
T02672161Megan Davis(225)736-7303x0107838.69504877956488
734762729Patrick Hogan546709671557.73780021345566
N98866252Tiffany Jones529.841.607354.284170011825466