spell_table | R Documentation |
A dataset containing the output of make_spell_table() and add_spell_vars() when applied to ed_data and inpatient_data.
spell_table
A data frame with 32 variables. Each observation corresponds to an entire patient spell made up of their episodes from the corresponding ED and inpatient tables.
Unique ID number of the patient. Original mapping back to hospital number should be destroyed or adequately protected according to all relevant data governance legislation and protocols
The recorded gender of the patient coded using the NHS data dictionary coding system (e.g. "Male","Female","Not Known","Not Specified") https://www.datadictionary.nhs.uk/data_dictionary/attributes/p/person/person_gender_code_de.asp?shownav=1?query=gender&rank=80&shownav=1
The age band that the patient was in at time of admission (e.g. "0 yrs", "1-4 yrs"..."95+")
The datetime at which the first episode in this spell began, as a POSIXct datetime
The datetime at which the last episode in this spell ended, as a POSIXct datetime
Total number of episode that make up this spell
list of the episode IDs of the episodes which took place in ED for this spell
list of the episode IDs of the inpatient episodes for this spell
A string made up of "E"s and "I"s denoting the sequence of ED and Inpatient episodes within the spell respectively
Distinct ID number for each spell
The type of admission if applicable (e.g Maternity Admission, Emergency Admission, Elective Admission)
The end datetime of the first ED episode in the spell, if the spell started with an ED episode
Code denoting how the spell ended e.g.(Discharged, Transferred to other Health Care Provider, Admitted, ...)
Healthcare Resource Group code. Standard groupings of clinically similar treatments which use common levels of healthcare resource, and which are currently used as a means of determining fair and equitable reimbursement for care services
The referral source to ED, if applicable, coded using the NHS data dictionary coding system (e.g. "General Medical Practitioner", "Self referral", "Emergency Services", ...)
A boolean of whether the patient died during the spell
A boolean of whether the spell starts with an ED episode
A boolean of whether the spell was entirely in ED with no admission
A boolean of whether the spell is a made up of more than one ED episode with no admission
A boolean of whether the spell involves an admission from ED
A boolean of whether the spell is a composite ED admission. I.e. The spell starts with an ED episode followed by any number of inpatient episodes.
A boolean of whether the spell is made up of any number of inpatient episodes that did not start in ED
A boolean of whether the spell involves a direct admission
The type of admission/non-admission was involved, derived from the booleans in the previous columns
The main speciality of the first ward that the spell started on
String of diagnoses codes from the episodes in the spell separated by "#"
The discharge destination coded using the NHS data dictionary coding system (e.g. "Own Residence", "Patient Died or Still Birth", "NHS Hospital Provider"...)
The datetime of the most recent previous discharge if applicable
The discharge destination of the previous discharge (e.g. Own Residence)
A string of diagnoses from previous spell relating to that patient, separted by "#"
A string of all previous diagnoses from all spells relating to that patient, separted by "#"
Number of days since the previous discharge
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.