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.
patient_demographics.csv, contains all of the demographics gathered by primary care providers about the patient at their last appointment. This includes their patient ID.cmp.json, contains a set of metabolic panels for each patient in the demographics file, keyed by the patient ID.| 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 |
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).
Name your script onyen_ckd_screening.py, where onyen is your onyen, and upload it to Milestone 01 on Canvas.
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.
| Patient_ID | Patient_Name | Patient_Phone | Patient_eGFR |
|---|---|---|---|
| 762116383 | ,Donald Morris | ,313.959.9764 | ,58.48741007347305 |
| E36334296 | ,Brandon Webster | ,001-372-631-0549 | ,39.445536638673296 |
| 792717195 | ,Jocelyn Calderon | ,001-432-988-3642x545 | ,45.38780526121239 |
| K16719467 | ,Allen Lambert | ,480.912.8263 | ,60.135800534555145 |
| 345380060 | ,Ryan Ellison | ,001-215-692-9323x1454 | ,58.60472326585637 |
| 606320215 | ,Robert Kennedy | ,+1-251-719-5935x07307 | ,49.42728716596531 |
| L64281921 | ,Michael Singh | ,(422)349-5770x8060 | ,43.070011118296584 |
| U53337753 | ,Courtney Johnson | ,247-842-2467x0364 | ,41.74522703520632 |
| R49737210 | ,Spencer Roberts | ,001-868-346-4425x022 | ,51.31672696093375 |
| 329933985 | ,Joseph Cox | ,(612)464-3043x09901 | ,48.14472015510412 |
| W75286992 | ,Kathy Conner | ,359-677-9481 | ,40.69831639284317 |
| 433693947 | ,Yolanda Williamson | ,805-826-1694x772 | ,49.84115308659465 |
| O34217130 | ,Kimberly Wilson | ,823.804.9979 | ,41.95224680908009 |
| 859924187 | ,Sharon Hogan | ,729.485.3452x4302 | ,49.57189715342774 |
| 420145045 | ,Sheila Lopez | ,902.718.3361x76087 | ,44.42339323680083 |
| 619453711 | ,Peter Ross | ,710-708-3906x3491 | ,64.98777566223981 |
| 582469691 | ,Michael Barker | ,953-905-4749x913 | ,47.45620129398696 |
| U03959797 | ,Heather Ferguson | ,(503)968-7710 | ,56.28157231644802 |
| P47416727 | ,Bobby Grant | ,669-379-8675x616 | ,56.076814627216216 |
| 289580721 | ,Jason Ramirez | ,001-728-805-6355 | ,63.770278966214036 |
| 574988968 | ,Brooke Khan | ,001-421-568-7950 | ,56.87705043245832 |
| 753514666 | ,Amy Hansen | ,(479)714-3345x077 | ,54.47333565543411 |
| M56402332 | ,Bianca Marsh | ,597.919.8972x146 | ,56.11122991097018 |
| 871012985 | ,Eric Jimenez | ,001-319-598-3498x2731 | ,61.22568013142235 |
| N68959447 | ,Stephen Davis | ,001-812-379-6902x321 | ,61.518176085040835 |
| D18145546 | ,Larry Shepard | ,001-754-257-9652x1737 | ,61.66032066842206 |
| I41537198 | ,Leonard Ward | ,+1-833-842-5870x5101 | ,55.03736408913408 |
| F27789285 | ,Robert Kirby | ,(641)433-5949x8608 | ,57.91404084758961 |
| 836894412 | ,Justin Rivera | ,664.794.1442x12443 | ,49.85136646300038 |
| U30439100 | ,Christian Carney | ,951-927-8576x396 | ,64.30246774402258 |
| W98356135 | ,Cheryl Zimmerman | ,+1-258-383-7833x07025 | ,34.42199354399834 |
| I75913668 | ,Thomas Hale | ,(829)217-4452x3967 | ,49.797992605102145 |
| 819168839 | ,Jonathan Wade | ,+1-691-411-3157 | ,46.835825386620726 |
| G65774531 | ,Emily Moore | ,+1-221-549-9635 | ,53.649754328439414 |
| 866266547 | ,Michael King | ,+1-842-962-1960x492 | ,62.008648982264596 |
| 630724356 | ,John Porter | ,6093234770 | ,51.44853783854659 |
| N54126269 | ,Ronald Taylor | ,369-495-7975x9757 | ,61.86199767804506 |
| 554348094 | ,Ashley Valencia | ,737-935-6820x0433 | ,35.55826736640459 |
| T02672161 | ,Megan Davis | ,(225)736-7303x01078 | ,38.69504877956488 |
| 734762729 | ,Patrick Hogan | ,5467096715 | ,57.73780021345566 |
| N98866252 | ,Tiffany Jones | ,529.841.6073 | ,54.284170011825466 |