BreathTestData: Data structure for saving into database

Description Usage Arguments

View source: R/BreathTestData.R

Description

Generates structure of class BreathTestData with required fields and optional fields as an intermediate between file data and the SQlite database. All optional fields by default are NA

Usage

1
2
3
4
5
6
BreathTestData(PatientID, Name = NA, FirstName = NA, Initials = NA,
  DOB = NA, BirthYear = NA, Gender = NA, Study = NA,
  PatStudyID = NA, FileName, Device = "generic", Substrate, RecordDate,
  StartTime = RecordDate, EndTime = RecordDate, TestNo, Dose = 100,
  Height = NA, Weight = NA, T50 = NA, GEC = NA, TLag = NA,
  Data = Data)

Arguments

PatientID

required, string or number for unique identification in database

Name

optional

FirstName

optional

Initials

optional, 2 characters, 1 number

DOB

optional Date of birth (not to be confused with "delta over baseline)

BirthYear

optional

Gender

optional m or f

Study

optional name of study; can be used in population fit

PatStudyID

optional; Patient number within study. Does not need to be globally unique

FileName

required; file where data were read from, or other unique string. When data are read again, this string is tested and record is skipped when same filename is already in database, therefore uniqueness is important. When some record does not turn up in database after repeated reading, check if a record with the same file name is already there, and rename the file to avoid collisions.

Device

BreathID or Iris; default "generic"

Substrate

Should contain string "ace" or "oct" or "okt", case insensitive. Will be replaced by "acetate" or "octanoate"

RecordDate

Required record date.

StartTime

optional

EndTime

optional

TestNo

required integer; unique test number. Converted to integer if factor

Dose

optional, default 100 mg

Height

optional, in cm; when PDR must be calculated, default values are used; see DOBToPDR

Weight

optional, in kg

T50

optional, only present if device computes this value

GEC

optional, only present if device computes this value

TLag

optional, only present if device computes this value

Data

data frame with at least 5 rows and columns Time and one or both of DOB or PDR. If PDR is missing, and Height, Weight and Substrate are given, computes PDR via function DOBToPDR


dmenne/d13cbreath documentation built on March 1, 2020, 3:41 a.m.