Learn R Programming

packDAMipd (version 1.1.0)

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

Description

Function to extract the unit hospital inpatient admission by matching code

Usage

get_cost_AandE_code(
  code,
  type_admit,
  ref_cost_data_file,
  col_name_code,
  unit_cost_col,
  type_admit_col,
  sheet = NULL
)

Value

unit cost the unit cost matching the code

Arguments

code

code for AE attendance

type_admit

term indicating admission and type of attendance

ref_cost_data_file

file that has unit cost

col_name_code

name of the column that has the code

unit_cost_col

name of the column with the unit cost

type_admit_col

colname that describes type of the attendance and that indicates admitted or not

sheet

sheet if excel file is given

Examples

Run this code
ref_cost_data_file <- system.file("extdata",
"National_schedule_of_NHS_costs_2019_AandE.csv", package = "packDAMipd")
re = get_cost_AandE_code("VB02Z", "T01A", ref_cost_data_file,
"Currency_Code","National_Average_Unit_Cost", "Service_Code")

Run the code above in your browser using DataLab