Icon

Challenge 20 - Patient Network Days

Challenge 20 - Patient Network Days
Description: You work for a hospital and they have data for each time a patient was seen. In this challenge, you will calculate the differencebetween each time a patient was seen excluding weekends (called "network days"). Once you calculate the network days, calculate the averagenetwork days per patient. For the challenge, experiment with the input and output below. InputPatient DateAline 11/01/2022Aline 12/02/2022Aline 25/02/2022Aline 15/04/2022Victor 05/02/2022Victor 25/02/2022Victor 15/03/2022Victor 30/03/2022OutputPatient Date Network Days MeanAline 11/01/2022 ? 23.333Aline 12/02/2022 24 23.333Aline 25/02/2022 10 23.333Aline 15/04/2022 36 23.333Victor 05/02/2022 ? 13.333Victor 25/02/2022 15 13.333Victor 15/03/2022 13 13.333Victor 30/03/2022 12 13.333Note: if you simply use the Date&Time Difference node, you will mix patient data/dates and will also end up counting weekends. Bonus Challenge:Create a solution without using loops. Challenge 20: Patient Network Days DATA PREPROCESSING CALCULATIONS AND FINAL OUTPUT Create table inputConvert Datecolumn to Date TypeLag Date ColumnLagPatient ColumnKeep Date Valueto the correspondingPatientCalculateNetwork / Business DaysCalculateAverage NetworkDaysAssignAverage NetworkDaysReplace withMissingTable Creator String to Date&Time Lag Column Lag Column Rule Engine Python Script GroupBy Joiner Rule Engine Description: You work for a hospital and they have data for each time a patient was seen. In this challenge, you will calculate the differencebetween each time a patient was seen excluding weekends (called "network days"). Once you calculate the network days, calculate the averagenetwork days per patient. For the challenge, experiment with the input and output below. InputPatient DateAline 11/01/2022Aline 12/02/2022Aline 25/02/2022Aline 15/04/2022Victor 05/02/2022Victor 25/02/2022Victor 15/03/2022Victor 30/03/2022OutputPatient Date Network Days MeanAline 11/01/2022 ? 23.333Aline 12/02/2022 24 23.333Aline 25/02/2022 10 23.333Aline 15/04/2022 36 23.333Victor 05/02/2022 ? 13.333Victor 25/02/2022 15 13.333Victor 15/03/2022 13 13.333Victor 30/03/2022 12 13.333Note: if you simply use the Date&Time Difference node, you will mix patient data/dates and will also end up counting weekends. Bonus Challenge:Create a solution without using loops. Challenge 20: Patient Network Days DATA PREPROCESSING CALCULATIONS AND FINAL OUTPUT Create table inputConvert Datecolumn to Date TypeLag Date ColumnLagPatient ColumnKeep Date Valueto the correspondingPatientCalculateNetwork / Business DaysCalculateAverage NetworkDaysAssignAverage NetworkDaysReplace withMissingTable Creator String to Date&Time Lag Column Lag Column Rule Engine Python Script GroupBy Joiner Rule Engine

Nodes

Extensions

Links