From db766617521392f89baf387b889ad896d0cfbee0 Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Fri, 24 Mar 2017 15:02:04 +0500 Subject: [PATCH 01/19] removed the dots in the names --- hifsa_isb_r_assignment2/R assignment 2.R | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 hifsa_isb_r_assignment2/R assignment 2.R diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R new file mode 100644 index 0000000..d8e8350 --- /dev/null +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -0,0 +1,9 @@ +library(dplyr) +library(lubridate) +"removed the dots in the names" +names(hospitaldata) <- gsub(x = names(hospitaldata), + pattern = "\\.", + replacement = " ") +names(hospitaldata) + + From 3adc5b285896efa4a17459cdfbcb50440e4bd841 Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Fri, 24 Mar 2017 15:11:59 +0500 Subject: [PATCH 02/19] day of the week is expected to have most visits --- hifsa_isb_r_assignment2/R assignment 2.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index d8e8350..465a1ca 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -6,4 +6,10 @@ names(hospitaldata) <- gsub(x = names(hospitaldata), replacement = " ") names(hospitaldata) +"day of the week is expected to have most visits" +df<-hospitaldata$Date +df<-wday(mdy(df), label=TRUE) +df +table(df) + From 2516948427b40d21e3112a5a126bdef065c62f7e Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Fri, 24 Mar 2017 15:22:30 +0500 Subject: [PATCH 03/19] What is the average age of patients --- hifsa_isb_r_assignment2/R assignment 2.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index 465a1ca..48b7939 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -12,4 +12,8 @@ df<-wday(mdy(df), label=TRUE) df table(df) +"What is the average age of patients" +nage<-as.numeric(hospitaldata$Age) +mean(nage, na.rm = TRUE) + From bfc3648e56e0dac0dd5ac275169a3fae1f6316b4 Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Sat, 25 Mar 2017 23:04:05 +0500 Subject: [PATCH 04/19] How many children were entertained --- hifsa_isb_r_assignment2/R assignment 2.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index 48b7939..7aa03a0 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -1,5 +1,6 @@ library(dplyr) library(lubridate) +library(tidyr) "removed the dots in the names" names(hospitaldata) <- gsub(x = names(hospitaldata), pattern = "\\.", @@ -16,4 +17,7 @@ table(df) nage<-as.numeric(hospitaldata$Age) mean(nage, na.rm = TRUE) - +"How many children were entertained" +"Which gender type had what kind of procedure in abundance? +i.e. Female visit mostly because of Gynae Problem" +table(group_by(hospitaldata, "Procedure", "Sex") ) From a95d0865ff2b8750857b96dee8c0bfd8902db6a1 Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Sun, 26 Mar 2017 00:50:33 +0500 Subject: [PATCH 05/19] Which gender type had what kind of procedure in abundance? --- hifsa_isb_r_assignment2/R assignment 2.R | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index 7aa03a0..d3a5908 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -1,6 +1,7 @@ library(dplyr) library(lubridate) library(tidyr) +library(ggplot2) "removed the dots in the names" names(hospitaldata) <- gsub(x = names(hospitaldata), pattern = "\\.", @@ -18,6 +19,12 @@ nage<-as.numeric(hospitaldata$Age) mean(nage, na.rm = TRUE) "How many children were entertained" +age<-as.numeric(hospitaldata$Age) +ages<-subset(age, age >= 1 & age < 12) +length(ages) + "Which gender type had what kind of procedure in abundance? i.e. Female visit mostly because of Gynae Problem" -table(group_by(hospitaldata, "Procedure", "Sex") ) +select(group_by(hospitaldata, Procedure, Sex) ) %>% +table() %>% + View() From 9a848557c52678f5d8cdfecaddfa98561d1f9cb8 Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Sun, 26 Mar 2017 12:31:48 +0500 Subject: [PATCH 06/19] 6. Which Doctor is earning highest? --- hifsa_isb_r_assignment2/R assignment 2.R | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index d3a5908..d746c72 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -2,29 +2,36 @@ library(dplyr) library(lubridate) library(tidyr) library(ggplot2) -"removed the dots in the names" +"1. removed the dots in the names" names(hospitaldata) <- gsub(x = names(hospitaldata), pattern = "\\.", replacement = " ") names(hospitaldata) -"day of the week is expected to have most visits" +"2. day of the week is expected to have most visits" df<-hospitaldata$Date df<-wday(mdy(df), label=TRUE) df table(df) -"What is the average age of patients" +"3. What is the average age of patients" nage<-as.numeric(hospitaldata$Age) mean(nage, na.rm = TRUE) -"How many children were entertained" +"4. How many children were entertained" age<-as.numeric(hospitaldata$Age) ages<-subset(age, age >= 1 & age < 12) length(ages) -"Which gender type had what kind of procedure in abundance? +"5. Which gender type had what kind of procedure in abundance? i.e. Female visit mostly because of Gynae Problem" select(group_by(hospitaldata, Procedure, Sex) ) %>% table() %>% View() + +"6. Which Doctor is earning highest?" +a<-hospitaldata$`Amount Received ` +max(a, na.rm = TRUE, filter =c(hospitaldata$`Amount Received By`) ) + +"alternatively max(a, na.rm = TRUE, select =c(hospitaldata$`Amount Received By`) ) and +hospitaldata$`Amount Received By`[which.max(a)] giving same results " \ No newline at end of file From 74211bd0f4c0d961c763a2c6404d58e4fa1cc6cf Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Sun, 26 Mar 2017 13:37:15 +0500 Subject: [PATCH 07/19] 7. Which procedure type earns more money? --- hifsa_isb_r_assignment2/R assignment 2.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index d746c72..810487e 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -30,8 +30,11 @@ table() %>% View() "6. Which Doctor is earning highest?" -a<-hospitaldata$`Amount Received ` +a<-hospitaldata$`Total Charges` max(a, na.rm = TRUE, filter =c(hospitaldata$`Amount Received By`) ) "alternatively max(a, na.rm = TRUE, select =c(hospitaldata$`Amount Received By`) ) and -hospitaldata$`Amount Received By`[which.max(a)] giving same results " \ No newline at end of file +hospitaldata$`Amount Received By`[which.max(a)] giving same results " + +"7. Which procedure type earns more money?" +max(a, na.rm = T, filter = c(hospitaldata$Procedure)) \ No newline at end of file From c9d021a138d3a9d7c94386034fe8dca2ead707be Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Sun, 26 Mar 2017 16:10:09 +0500 Subject: [PATCH 08/19] 10. How many patients are repeated visitors? --- hifsa_isb_r_assignment2/R assignment 2.R | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index 810487e..de56028 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -1,3 +1,4 @@ +library(plyr) library(dplyr) library(lubridate) library(tidyr) @@ -37,4 +38,16 @@ max(a, na.rm = TRUE, filter =c(hospitaldata$`Amount Received By`) ) hospitaldata$`Amount Received By`[which.max(a)] giving same results " "7. Which procedure type earns more money?" -max(a, na.rm = T, filter = c(hospitaldata$Procedure)) \ No newline at end of file +max(a, na.rm = T, filter = c(hospitaldata$Procedure)) + +"8. Which time of the day has highest frequency of visits by hour?" + +"9. Create a bracket of time by +Morning, Afternoon, Evening, Night +(6am - 12pm - Morning, 12 pm- 4 pm, +Afternoon, 4 pm- 7pm, Evening, 7pm - 6 am, Night)." + +"10. How many patients are repeated visitors?" +b<- ddply(hospitaldata,.(id),nrow ) +repeated <-subset(b, b$V1>1)%>% +View() From 429763e8c5e4a11a35c51de7cc960120a316b53c Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Sun, 26 Mar 2017 16:30:00 +0500 Subject: [PATCH 09/19] 11. Give us the id of repeated visitors. --- hifsa_isb_r_assignment2/R assignment 2.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index de56028..593e046 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -49,5 +49,8 @@ Afternoon, 4 pm- 7pm, Evening, 7pm - 6 am, Night)." "10. How many patients are repeated visitors?" b<- ddply(hospitaldata,.(id),nrow ) -repeated <-subset(b, b$V1>1)%>% -View() +repeated <-subset(b, b$V1>1) +View(repeated) + +"11. Give us the id of repeated visitors." +View(repeated) From 89918a6ddc0d266a48afc84537b4fad76bac3684 Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Sun, 26 Mar 2017 23:54:52 +0500 Subject: [PATCH 10/19] 12. Which patients visited again for the same problem --- hifsa_isb_r_assignment2/R assignment 2.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index 593e046..d5060d6 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -54,3 +54,7 @@ View(repeated) "11. Give us the id of repeated visitors." View(repeated) + +"12. Which patients visited again for the same problem" +select(group_by(hospitaldata, id, Specialty))%>% + View() From 3bf75f53d983c2de7865f8d7085d53705b54de5c Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Mon, 27 Mar 2017 00:36:12 +0500 Subject: [PATCH 11/19] 13. What is the median age for Females and Males? --- hifsa_isb_r_assignment2/R assignment 2.R | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index d5060d6..c09840c 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -58,3 +58,11 @@ View(repeated) "12. Which patients visited again for the same problem" select(group_by(hospitaldata, id, Specialty))%>% View() + +"13. What is the median age for Females and Males?" +fmed <- subset(hospitaldata, Sex=='F' , select = Age) +fmed +mmed <- subset(hospitaldata, Sex=='M' , select = Age) +mmed + + From dc77c35b40eb388ef1fa2ffb0cfecf920d0894ee Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Mon, 27 Mar 2017 00:56:24 +0500 Subject: [PATCH 12/19] 14. What is the total amount in balance? --- hifsa_isb_r_assignment2/R assignment 2.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index c09840c..bca9c52 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -65,4 +65,6 @@ fmed mmed <- subset(hospitaldata, Sex=='M' , select = Age) mmed - +"14. What is the total amount in balance?" +g <- hospitaldata$`Amount Balance` <- as.numeric(gsub('[,]', '', hospitaldata$`Amount Balance`)) +sum(g, na.rm = T) From 67816c2cafd49c08b7ceb685b0d9d79286c45721 Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Mon, 27 Mar 2017 09:48:51 +0500 Subject: [PATCH 13/19] 16. Is there a relation between Age and Total Charges paid? --- hifsa_isb_r_assignment2/R assignment 2.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index bca9c52..fa4fbc2 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -68,3 +68,13 @@ mmed "14. What is the total amount in balance?" g <- hospitaldata$`Amount Balance` <- as.numeric(gsub('[,]', '', hospitaldata$`Amount Balance`)) sum(g, na.rm = T) + +"16. Is there a relation between Age and Total Charges paid?" +d <-as.numeric(hospitaldata$Age) +f <-as.numeric(hospitaldata$`Total Charges`) +cor.test(x=d,y=f) + +"15. How much money was made by Procedure Type "Consultation"? +16. Is there a relation between Age and Total Charges paid? +17. Which Age group had highest number of visits? +18. What is the total cost earned by Procedure Type X Ray and Scalling together?" From dc600da3bb7517cdf9cf99486706f25c1ec3952d Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Mon, 27 Mar 2017 11:39:17 +0500 Subject: [PATCH 14/19] 13. What is the median age for Females and Males? --- hifsa_isb_r_assignment2/R assignment 2.R | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index fa4fbc2..43cb2ab 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -60,21 +60,25 @@ select(group_by(hospitaldata, id, Specialty))%>% View() "13. What is the median age for Females and Males?" -fmed <- subset(hospitaldata, Sex=='F' , select = Age) -fmed -mmed <- subset(hospitaldata, Sex=='M' , select = Age) -mmed +gsub("-", "NA" ,hospitaldata$Age) +toupper(hospitaldata$Sex) +fmed <- subset(hospitaldata, Sex=='F' , select = as.numeric(Age)) +median(fmed$Age, na.rm =T) +mmed <- subset(hospitaldata, Sex=='M' , select = as.numeric(Age)) +median(mmed$Age, na.rm= T) "14. What is the total amount in balance?" g <- hospitaldata$`Amount Balance` <- as.numeric(gsub('[,]', '', hospitaldata$`Amount Balance`)) sum(g, na.rm = T) +"15. How much money was made by Procedure Type "Consultation"?" +proct <- subset(hospitaldata, Procedure == "Consultation") +sum(proct$`Total Charges`, na.rm= T) + "16. Is there a relation between Age and Total Charges paid?" d <-as.numeric(hospitaldata$Age) f <-as.numeric(hospitaldata$`Total Charges`) cor.test(x=d,y=f) - -"15. How much money was made by Procedure Type "Consultation"? -16. Is there a relation between Age and Total Charges paid? -17. Which Age group had highest number of visits? -18. What is the total cost earned by Procedure Type X Ray and Scalling together?" +"17. Which Age group had highest number of visits? +18. What is the total cost earned by Procedure Type X Ray and Scalling together? +" From 11e10954c446968503ca65f61688fcb5369c5d26 Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Mon, 27 Mar 2017 12:00:54 +0500 Subject: [PATCH 15/19] 18. What is the total cost earned by Procedure Type X Ray and Scalling together? --- hifsa_isb_r_assignment2/R assignment 2.R | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index 43cb2ab..ce976c9 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -79,6 +79,10 @@ sum(proct$`Total Charges`, na.rm= T) d <-as.numeric(hospitaldata$Age) f <-as.numeric(hospitaldata$`Total Charges`) cor.test(x=d,y=f) -"17. Which Age group had highest number of visits? -18. What is the total cost earned by Procedure Type X Ray and Scalling together? -" + +"17. Which Age group had highest number of visits?" + +"18. What is the total cost earned by Procedure Type X Ray and Scalling together?" +cost1 <- subset(hospitaldata, Procedure == "X Ray") +cost2 <- subset(hospitaldata, Procedure == "Scalling") +sum(cost1$`Total Charges`,cost2$`Total Charges`, na.rm= T) From bee6119f9def79a2d19aa5d0277de65c5ab6886a Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Mon, 27 Mar 2017 12:20:23 +0500 Subject: [PATCH 16/19] 17. Which Age group had highest number of visits? --- hifsa_isb_r_assignment2/R assignment 2.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index ce976c9..43a466d 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -81,7 +81,10 @@ f <-as.numeric(hospitaldata$`Total Charges`) cor.test(x=d,y=f) "17. Which Age group had highest number of visits?" - +z<- ddply(hospitaldata,.(id, Age),nrow ) +repeated1 <-subset(z, z$V1>1) +repeated1 +View(repeated1) "18. What is the total cost earned by Procedure Type X Ray and Scalling together?" cost1 <- subset(hospitaldata, Procedure == "X Ray") cost2 <- subset(hospitaldata, Procedure == "Scalling") From b3fc4ff181f1ebbba393a15ae4bd176438653e8e Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Mon, 27 Mar 2017 12:34:42 +0500 Subject: [PATCH 17/19] 12. Which patients visited again for the same problem --- hifsa_isb_r_assignment2/R assignment 2.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index 43a466d..8913dcd 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -56,8 +56,9 @@ View(repeated) View(repeated) "12. Which patients visited again for the same problem" -select(group_by(hospitaldata, id, Specialty))%>% - View() + problem <- ddply(hospitaldata,.(id, Specialty),nrow) + cv<- subset(problem,problem$V1>1) + View(cv) "13. What is the median age for Females and Males?" gsub("-", "NA" ,hospitaldata$Age) From 39d055b5cd0bf7d16d528ed8262fbe366856a593 Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Mon, 27 Mar 2017 17:22:25 +0500 Subject: [PATCH 18/19] 6. Which Doctor is earning highest? --- hifsa_isb_r_assignment2/R assignment 2.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index 8913dcd..efd909b 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -41,7 +41,11 @@ hospitaldata$`Amount Received By`[which.max(a)] giving same results " max(a, na.rm = T, filter = c(hospitaldata$Procedure)) "8. Which time of the day has highest frequency of visits by hour?" - +df2 <- hospitaldata$Time +gsub("-", "NA" ,df2) +d<-hour(hm(format( s <- strptime(df2, "%I:%M %p" ), format = "%H:%M"))) +count(d)%>% + View() "9. Create a bracket of time by Morning, Afternoon, Evening, Night (6am - 12pm - Morning, 12 pm- 4 pm, From 0485034ec8cf1c79b551f081db80be1908d6eae6 Mon Sep 17 00:00:00 2001 From: hifsa-tahreem Date: Mon, 27 Mar 2017 17:22:49 +0500 Subject: [PATCH 19/19] 6. Which Doctor is earning highest? --- hifsa_isb_r_assignment2/R assignment 2.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hifsa_isb_r_assignment2/R assignment 2.R b/hifsa_isb_r_assignment2/R assignment 2.R index efd909b..4afbf4f 100644 --- a/hifsa_isb_r_assignment2/R assignment 2.R +++ b/hifsa_isb_r_assignment2/R assignment 2.R @@ -32,10 +32,9 @@ table() %>% "6. Which Doctor is earning highest?" a<-hospitaldata$`Total Charges` -max(a, na.rm = TRUE, filter =c(hospitaldata$`Amount Received By`) ) -"alternatively max(a, na.rm = TRUE, select =c(hospitaldata$`Amount Received By`) ) and -hospitaldata$`Amount Received By`[which.max(a)] giving same results " +hospitaldata$`Consulting Doctor`[which.max(a)] + "7. Which procedure type earns more money?" max(a, na.rm = T, filter = c(hospitaldata$Procedure))