emr_track.addto {naryn}R Documentation

Adds new records to a track

Description

Adds new records to a track from a TAB-delimited file or a data frame.

Usage

emr_track.addto(track, src, force = FALSE, remove_unknown = FALSE)

Arguments

track

track name

src

file name or data-frame containing the track records

force

if 'TRUE', suppresses user confirmation for addition to logical tracks

remove_unknown

if 'TRUE', removes unknown ids (ids that are not present at 'patients.dob' track) from the data. Otherwise, an error is thrown.

Details

This function adds new records to a track. The records are contained either in a file or a data frame.

If 'src' is a file name, the latter must be constituted of four columns separated by spaces or 'TAB' characters: ID, time, reference and value. The file might contain lines of comments which should start with a '#' character. Note that the file should not contain a header line.

Alternatively 'src' can be a data frame consisting of the columns named "id", "time", "ref" and "value". Note: "ref" column in the data frame is optional.

Adding to a logical track adds the values to the underlying physical track, and is allowed only if all the values are within the logical track allowed values and only from a data frame src. Note that this might affect other logical tracks pointing to the same physical track and therefore requires confirmation from the user unless force=TRUE.

Value

None.

See Also

emr_track.import, emr_track.create, emr_db.init, emr_track.ls


[Package naryn version 2.6.26 Index]