HorridTom / hospitalflow

0 stars 0 forks source link

Some charts repeat the word "hospital" in the title #84

Open ImogenConnorHelleur opened 3 years ago

ImogenConnorHelleur commented 3 years ago

Go through and check the consistency to see whether the hospital_name argument of function should include the word hospital to avoid doubling the word.

HorridTom commented 2 years ago

Here is a reproducible example for one instance of this issue:

# Load the synthetic spell table data
load("~/Rprojects/hospitalflow/data/spell_table.rda")

# Define start and end dates for the chart
my_start_date <- as.POSIXct(as.Date("2019-01-01"), tz = "Europe/London")
my_end_date <- as.POSIXct(as.Date("2019-01-31"), tz = "Europe/London")

# Create the chart
hospitalflow::ae_arrival_occupancy(start_date = my_start_date,
                                   end_date = my_end_date,
                                   data = spell_table,
                                   plot_chart = TRUE,
                                   hospital_name = "Anytown General Hospital")

Note that the chart title reads "Anytown General Hospital hospital: Hourly..." - the double "hospital" is the issue.

There may be other chart functions (other than hospitalflow::ae_arrival_occupancy) exhibiting this behaviour - use the example report to identify them, and fix all of them.

mcunning0708 commented 2 years ago

The desired behaviour here would be to remove the Feature of automatically appending hospital to a name