Skip to content

OHSUCMP/COACH_RenderCards

 
 

Repository files navigation

COACH_RenderCards

Command-line utility to render COACH recommendation cards based off internal spreadsheet rows

Setup and Preparation

  1. IF YOU DON'T HAVE A JAVA 11 JDK INSTALLED, install OpenJ9 JDK for Java 11:

  2. IF YOU DON'T HAVE APACHE MAVEN INSTALLED, Install Apache Maven:

  3. Retrieve a copy of the "HBP CDS Cards" Excel spreadsheet from OHSU CMP Box folder (hereafter <file>)

Build the Project

  1. Open a Windows command prompt and navigate to the folder where this project is cloned
  2. Build the project by running the following command:
mvn clean compile package

Running the Program

  1. Identify the Recommendation Number from Column A within <file> (hereafter <recNo>) for which to render cards
  2. In the root of this folder, run:
mvn exec:java "-Dexec.args=<file> <recNo>"

For example:

mvn exec:java "-Dexec.args=Cards.xlsx 23c"
mvn exec:java "-Dexec.args='other cards with spaces in the filename.xlsx' 13"

Note the double quotes around the -Dexec.args block, this is necessary to ensure both parameters get passed into the program correctly.

If <file> contains spaces, it must be wrapped in single quotes, as seen in the second example above.

The following is an example of a successful execution:

C:\git\COACH_RenderCards>mvn exec:java "-Dexec.args='HBP CDS Cards v5.xlsx' 23c"
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< edu.ohsu.dmice.cmp:COACH_RenderCards >----------------
[INFO] Building COACH_RenderCards 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ COACH_RenderCards ---
Writing file 23c.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.439 s
[INFO] Finished at: 2021-08-31T15:57:29-07:00
[INFO] ------------------------------------------------------------------------

C:\git\COACH_RenderCards>

You can see from the output above that it completed successfully, and wrote a file "23c.html" which contains the rendered card for Recommendation 23c.

Credit

This project is forked from https://github.com/ellieychang/OHSUHBP_CardToDisplay

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 83.5%
  • CSS 16.5%