plot_ed_attendance_demographics: Attendance and admissions by age and gender in emergency...

View source: R/plot_ed_attendance_demographics.R

plot_ed_attendance_demographicsR Documentation

Attendance and admissions by age and gender in emergency department (ED)

Description

plot_ed_attendance_demographics returns the number of ED attendances and hospitalizations by age (divided into bands) and gender (male and female).

Usage

plot_ed_attendance_demographics(
  data,
  startDate,
  endDate,
  returnPlot = TRUE,
  hospitalName = "Hospital name"
)

Arguments

data

Hospital episode data.

startDate

Date of earliest discharge to be included in the analysis.

endDate

Date of latest admission to be included in the analysis.

returnPlot

If TRUE returns a plot, otherwise returns a dataframe.

hospitalName

Name of the hospital.

Value

A plot (default) or a dataframe showing attendance of emergency department and admissions therefrom by age and gender.

Examples

## Not run: 
plot_ed_attendance_demographics(
  data = test_data_age_sex_att_adm,
  startDate = "2012-01-01 00:00:00",
  endDate = "2015-01-01 00:00:00",
  returnPlot = TRUE
)

## End(Not run)

HorridTom/hospitalflow documentation built on June 14, 2022, noon