Open edward-burn opened 6 months ago
should we have a vocab or sth similar package? @edward-burn I would agree it is not the place in pp but maybe neither in og? @edward-burn
I would have thought omopgenerics because it seems a useful function for CDMConnector, CodelistGenerator, and PatientProfiles. Similar with the others (except variableTypes) in that they are related to the definition of the omop cdm
create a set of functions vocabulary based
@catalamarti shall I re export of those functions ed mention above or just copy over?
omopColumns
if onlyRequired can be deprecatedThis function is not used in anywhere.
vs
# OPTION 1
startDateColumn <- function(table) {
omopColumn(table = table, field = "start_date")
}
omopColumn <- function(table, field, call = parent.frame()) {
# initial checks
assertChoice(table, optionsTable, call = call)
# internal dataset
fields$name[fields$table == table & fields$type == field]
}
# OPTION 2
omopColumn <- function(table, field) {
# initial checks
assertChoice(table, optionsTable)
assertChoice(field, c("start_date", "end_date", ...))
# internal dataset
fields$name[fields$table == table & fields$type == field]
}
@catalamarti seems more like a function for omopgenerics? https://darwin-eu-dev.github.io/PatientProfiles/reference/startDateColumn.html