Skip to contents

A small, fabricated dataset representing a HasBeenE = 1 ESSENCE query, purpose-built to demonstrate link_encounters() two-pull linkage in vignette("encounter-linkage") alongside essence_inp_raw. Unlike essence_raw (a single, larger, realistic pull covering every deduplication/care-setting/geography issue sysPrep addresses), essence_ed_raw exists solely to demonstrate encounter linkage and is deliberately small. All facility names, visit identifiers, patient identifiers, and geographic values are entirely synthetic. No real patient or facility data are included.

Usage

essence_ed_raw

Format

A data frame with approximately 15 rows and 19 columns. Same column structure as essence_raw, plus HasBeenI (see Details); see essence_raw's documentation for the other column definitions.

Source

Entirely synthetic. Generated by data-raw/generate_synthetic_data.R.

Details

Visit types included

Plain ED-only visits

HasBeenE = 1, HasBeenAdmitted = 0: the majority of rows.

Correctly carried-through escalation

HasBeenE = 1 and HasBeenAdmitted = 1 on one already-deduplicated record; needs no cross-pull linking, since there is only ever one record. These 2 visits also have HasBeenI = 1, so that link_encounters()'s preference for HasBeenAdmitted over HasBeenI when both are present is demonstrable with real data.

Continuity-break ED half

2 rows that look like plain ED visits within essence_ed_raw alone (HasBeenE = 1, HasBeenAdmitted = 0); their mis-submitted direct-admit continuation lives in essence_inp_raw, sharing the same HospitalName x Visit_ID key. link_encounters() should merge each pair back into one episode.

One standard retransmission duplicate (same HospitalName x Visit_ID, differing Arrived_Date_Time) is included so vignette("encounter-linkage")'s "dedupe each pull separately before linking" guidance has something real to demonstrate.

See also

essence_inp_raw, the paired inpatient-admission pull; essence_raw for the general-purpose synthetic pull used elsewhere; link_encounters() and vignette("encounter-linkage").