Open joaofonsecapromptly opened 5 months ago
Could you check if one of the following result objects are empty?
results$vocabularyResults$mappingCompleteness$result
results$vocabularyResults$drugMapping$result
A quick fix when one is empty, is to replace these by (empty) dataframes:
results$vocabularyResults$mappingCompleteness$result <- data.frame(DOMAIN=NA, P_RECORDS_MAPPED=NA, N_CODES_SOURCE=NA, N_CODES_MAPPED=NA, P_CODES_MAPPED=NA, P_RECORDS_MAPPED=NA, N_RECORDS_SOURCE = NA, N_RECORDS_MAPPED =NA)
results$vocabularyResults$drugMapping$result <- data.frame(N_RECORDS=NA, CLASS=NA, N_PATIENTS = NA, N_SOURCE_CODES =NA)
But those should not be empty to begin with. Please also check the logs of cdmInspection
for any errors.
Could you check if one of the following result objects are empty?
results$vocabularyResults$mappingCompleteness$result
results$vocabularyResults$drugMapping$result
A quick fix when one is empty, is to replace these by (empty) dataframes:
results$vocabularyResults$mappingCompleteness$result <- data.frame(DOMAIN=NA, P_RECORDS_MAPPED=NA, N_CODES_SOURCE=NA, N_CODES_MAPPED=NA, P_CODES_MAPPED=NA, P_RECORDS_MAPPED=NA, N_RECORDS_SOURCE = NA, N_RECORDS_MAPPED =NA)
results$vocabularyResults$drugMapping$result <- data.frame(N_RECORDS=NA, CLASS=NA, N_PATIENTS = NA, N_SOURCE_CODES =NA)
But those should not be empty to begin with. Please also check the logs of
cdmInspection
for any errors.
Yes, that was the case. This solution works.
I also tried updating to new version 1.2.4 and it also fixes this, not quite sure why as I did not dive into the source code. Was one these fixes implemented in 1.2.4?
When running function
generateResultsDocument
, an error is reported statingUsing CDM Inspection version 1.2.3
This is the source code
I have tried changing every argumentm but the bug still stands. Also checked results file and seems normal and when generating, no error was reported