Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistend behavior between emr_track.import, and emr_track.addto #117

Open
nettam opened this issue Feb 28, 2024 · 2 comments
Open

inconsistend behavior between emr_track.import, and emr_track.addto #117

nettam opened this issue Feb 28, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@nettam
Copy link
Contributor

nettam commented Feb 28, 2024

emr_track.addto fails if provided with id not in patients.dob but emr_track.import works fine.
This causes a problem in which the existing track contains problematic data, but it cannot be updated with data that is ok.

@nettam nettam added the bug Something isn't working label Feb 28, 2024
@aviezerl
Copy link
Collaborator

Does this happens even if remove_unknown=TRUE?

@aviezerl
Copy link
Collaborator

aviezerl commented Mar 17, 2024

It doesn't seem like there is an inconsistency between the functions, but there is indeed a bug: when importing to or adding to a database that is not the one that has the 'patients.dob' track an error is not thrown. e.g.:

load_test_dbs()
fn <- tempfile()
readr::write_tsv(data.frame(id = 2000, time = 5, ref = 0, value = 1), fn, col_names = FALSE)
emr_track.import("test", emr_db.ls()[3], categorical = TRUE, src = fn)

Does not throw an error.

@aviezerl aviezerl changed the title inconsistend behaviou between emr_track.import, and emr_track.addto inconsistend behavior between emr_track.import, and emr_track.addto May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants