Learn R Programming

packDAMipd (version 1.1.0)

get_cost_ip_dc_hrg: Function to extract the unit hospital inpatient admission by matching HRG code

Description

Function to extract the unit hospital inpatient admission by matching HRG code

Usage

get_cost_ip_dc_hrg(
  hrg,
  ref_cost_data_file,
  col_name_hrg_code,
  unit_cost_col,
  sheet = NULL
)

Value

unit cost the unit cost matching the hrg code

Arguments

hrg

hrg code corresponding to the inpatient admission

ref_cost_data_file

file that has unit cost

col_name_hrg_code

name of the column that has the hrg code

unit_cost_col

name of the colum with the unit cost

sheet

sheet if excel file is given

Examples

Run this code
ref_cost_data_file <- system.file("extdata",
"National_schedule_of_NHS_costs_2019.csv", package = "packDAMipd")
get_cost_ip_dc_hrg("AA22C", ref_cost_data_file, "Currency_Code",
"National_Average_Unit_Cost")

Run the code above in your browser using DataLab