Closed gowthamrao closed 3 years ago
Hi @gowthamrao -- WebAPI currently does not provide this text directly, rather, the Atlas JavaScript creates it based on the cohort definition expression.
There is an issue open for WebAPI to address this: https://github.com/OHDSI/WebAPI/issues/617
Once that is available, we can add a function here.
@chrisknoll is the Atlas Java script callable thru R? @schuemie have you worked on a similar problem?
Already working on this. Issue is: https://github.com/OHDSI/circe-be/issues/118.
The implementation will be a server side template rendering and the output will be HTML, but I have done some tests and I can get the proper HTML formatting and indentation using <p>
tags and margins for indentation so that it looks correct in Word. Should work out, just need to carve out time to finish it off.
@chrisknoll great!
From ROhdsiWebApi perspective, it would be great to 'post' to WebApi the JSON expression and for the API to return the human readable text.
@chrisknoll has created circeR package that performs this.
Atlas generates human readable cohort definitions. During protocol creation process, we tend to copy these specifications into Microsoft Office for each cohort definition. During this process of html to word copy pasting - formatting is lost and so is time.
It would be awesome to have a function where 1 (or n) cohorts are automatically populated into a word/pdf - that may then be merged as an appendix to the main protocol body.
One option would be to read the appropriate API endpoint and render the document using Knitr.