OHDSI Home | Forums | Wiki | Github

cdmInspection report, enable to generate it

I have been following all the steps for the cdminspection package and keep getting this error after fix all the sql queries that had tables that were not mapped(non essential maps).

Error in gregexec(pattern = what, x$txt, ...) : 
  could not find function "gregexec"

So I checked the greg function to understand the error and it is looking for some files that are not there, therefore it can not move forward and generate the .doc file, I was expecting.

Next step was check the main function itself to understand if I was missing something and apparently I am.

 doc <-  doc %>%
      body_add_par('Checklist', style = "heading 1") %>%

      body_add_par("Have the following checks been performed?", style = "Normal") %>%
      body_add_par("[ ] ATLAS cohort creation, e.g. Type 2 Diabetes", style = "Normal") %>%
      body_add_par("[ ] Check of Achilles results", style = "Normal") %>%
      body_add_par("Comments:", style = "Normal") %>%

      body_add_par("Check that all the items mentioned below are shared with EHDEN in addition to this inspection report. If items cannot be shared, add an explanation in the comments section.", style = "Normal") %>%
      body_add_par("[ ] ETL Documentation", style = "Normal") %>%
      body_add_par("[ ] ETL Code", style = "Normal") %>%
      body_add_par("[ ] DQD dashboard json file", style = "Normal") %>%
      body_add_par("[ ] White Rabbit output", style = "Normal") %>%
      body_add_par("[ ] CdmInspection results.zip ", style = "Normal") %>%
      body_add_par("Comments:", style = "Normal")

cdmInspection sample script

It led me to believe that I need to add a couple of files to the outputfolder in order to be able to generate the report.

Any help please? A note about the subject, the documentation is lacking more info about this package.

What R version are you using? The function gregexec was introduced in R 4.1.0.
I see that the DESCRIPTION has R >= 3.5.0 as requirement. This should be updated.

Could you elaborate what fix you made? If this a bug in CdmInspection I would like to implement the fix in the package.

This should not be required. The referenced codeblock is simply a checklist for EHDEN data partners.

Hello Maxim,

Thanks for your help.
Yep it was the version as I figured that the gregexec was just used after R4.1.
Thanks for your answer though. I managed to generated the .docx a few days ago.

Suggestion, if you could add this point to the documentation that would be nice, as it could help others.

1 Like

Great, thanks for reporting. I added an issue on Github so this gets fixed in a next version.

1 Like