dataset <- "https://raw.githubusercontent.com/tmatis12/datafiles/refs/heads/main/RadDat_IMSE.csv"
xray_orders<- read.csv(dataset)
names(xray_orders)
## [1] "Unique.Identifier" "PatientAge"
## [3] "Radiology.Technician" "CatalogCode"
## [5] "Ordering.Physician" "PatientTypeMnemonic"
## [7] "Priority" "OrderDateTime"
## [9] "ExamCompleteDateTime" "FinalDateTime"
## [11] "Ordered.to.Complete...Mins" "Ordered.to.Complete...Hours"
## [13] "Loc.At.Exam.Complete" "Exam.Completed.Bucket"
## [15] "Section" "Exam.Room"
#filter time complete order
xray_orders <- xray_orders[xray_orders$Ordered.to.Complete...Mins >= 0, ]
xray_orders <- xray_orders[xray_orders$Ordered.to.Complete...Hours >= 0, ]
Patients that are age 65 or older quality for Medicare. Generate a histogram on the time required to fulfill X-ray orders for Medicare patients, restricting the allowable range of times to be between the first and third quartile of observations, i.e. the IQR.
#select age columns
xray_orders <- xray_orders[xray_orders$PatientAge >= 65, ]
q1 <- quantile(xray_orders$Ordered.to.Complete...Mins, 0.25, names = TRUE)
q3 <- quantile(xray_orders$Ordered.to.Complete...Mins, 0.75, names = TRUE)
xray_orders <- xray_orders[xray_orders$Ordered.to.Complete...Mins >= q1 &
xray_orders$Ordered.to.Complete...Mins <= q3, ]
#Histogram!!!!
hist(xray_orders$Ordered.to.Complete...Mins, main = "Histogram of X-Ray Order Time",
xlab = "Time to complete",
ylab = "x-ray orders",
col = "navy",
border = "magenta")
I would say that the histogram is skewed far right hinting at the completion times being relatively quick.
Create range for technician
rtech_range <- xray_orders[xray_orders$Radiology.Technician %in% 62:65, ]
Calculate median
My chunk to calculate the median only put out 3 technicians, so this is as far as I got.
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.