View source: R/aec_inpatient.R
| aec_inpatient | R Documentation | 
Inpatients have a patient location of 'NHS Acute Trust' and are one of: inpatient, day patient or emergency assessment. Assumes that where the date of admission is greater than the date of specimen, the patient was not actually an inpatient.
aec_inpatient(patient_location, patient_category, specimen_date, date_admitted)
patient_location | 
 Location of patient at time of specimen.  | 
patient_category | 
 Category of patient at time of specimen. One of: "In-patient", "Day patient" or "Emergency Assessment"  | 
specimen_date | 
 Date specimen taken  | 
date_admitted | 
 Date of admission to NHS Acute Trust  | 
A numeric value
patient_cat <- "In-patient"
patient_loc <- "NHS Acute Trust"
date_admitted <- lubridate::dmy("01/01/2016")
specimen_date <- lubridate::dmy("02/01/2016")
aec_inpatient(patient_loc, patient_cat, specimen_date, date_admitted)
## Not run: 
date_admitted <- NA
aec_inpatient(patient_loc, patient_cat, specimen_date, date_admitted)
date_admitted <- lubridate::dmy("03/01/2016")
aec_inpatient(patient_loc, patient_cat, specimen_date, date_admitted)
specimen_date <- NA
aec_inpatient(patient_loc, patient_cat, specimen_date, date_admitted)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.