EHDEN / CdmInspection

R Package to support quality control inspection of an OMOP-CDM instance
Apache License 2.0
11 stars 16 forks source link

Generated Report with missing secitons #97

Closed sutsabs closed 1 year ago

sutsabs commented 1 year ago

@MaximMoinat Hi, I was able to run the cdm inspection for our database and also generate the report. On reviewing the report, the 4.5 Unmapped Codes and 4.6 Mapped Codes are empty, no tables showing.

I dug in a little and checked the ResultsDocumentGeneration.R file. Those two sections uses custom functions my_unmapped_section() and my_mapped_section() to population the tables. I suspect that the outputs from those functions are not being saved to the doc. I checked the vocabReults and there is data for unmapped and mapped items.

`## add Top 25 missing mappings doc<-doc %>% officer::body_add_par(value = "Unmapped Codes", style = "heading 2") my_unmapped_section(doc, vocabResults$unmappedDrugs, 7, "drugs", smallCellCount) my_unmapped_section(doc, vocabResults$unmappedConditions, 8, "conditions", smallCellCount) my_unmapped_section(doc, vocabResults$unmappedMeasurements, 9, "measurements", smallCellCount) my_unmapped_section(doc, vocabResults$unmappedObservations, 10, "observations",smallCellCount) my_unmapped_section(doc, vocabResults$unmappedProcedures, 11, "procedures", smallCellCount) my_unmapped_section(doc, vocabResults$unmappedDevices, 12, "devices", smallCellCount) my_unmapped_section(doc, vocabResults$unmappedVisits, 13, "visits", smallCellCount)

## add top 25 mapped codes
doc<-doc %>%
  officer::body_add_par(value = "Mapped Codes", style = "heading 2")
my_mapped_section(doc, vocabResults$mappedDrugs, 14, "drugs", smallCellCount)
my_mapped_section(doc, vocabResults$mappedConditions, 15, "conditions", smallCellCount)
my_mapped_section(doc, vocabResults$mappedMeasurements, 16, "measurements", smallCellCount)
my_mapped_section(doc, vocabResults$mappedObservations, 17, "observations", smallCellCount)
my_mapped_section(doc, vocabResults$mappedProcedures, 18, "procedures", smallCellCount)
my_mapped_section(doc, vocabResults$mappedDevices, 19, "devices", smallCellCount)
my_mapped_section(doc, vocabResults$mappedVisits, 20, "visits", smallCellCount)`
MaximMoinat commented 1 year ago

Fixed since v1.2.0