cohort_slice_first_team: Return first or latest team in a SSNAP patient episode

Description Usage Arguments Details Value

View source: R/create_cohort_helpers.R

Description

These functions group the data by PatientId, and then slices by either the lowest (first) or highest (last) ProClinV1Id, returning either the first or the latest record of a patient spell.

Usage

1
2
3

Arguments

source_data

A tibble of SSNAP data

Details

It is designed for the SSNAP dataset in the sense that it uses ProClinV1Id and PatientId columns, and assumes a similar record passing model - but could have more generic uses.

Value

the data will be grouped by PatientId, sliced to return one record for each patient spell, and then ungrouped.


md0u80c9/SSNAPStats documentation built on Feb. 11, 2020, 11:43 a.m.