JMP Clinical Review API

The JMP Clinical Review API provides functions for manipulation of JMP Clinical Reviews and Reports.

The general usage centers around a reference to a Review Builder based on a generated ID. The ID may be obtained via one of several functions below, or will be made available in the context of Review Builder executing code embedded within a JMP data table within a Report. The variable JMPClinicalReviewID will be the ID of the Review in which the code is executing. In this way, the script writer may customize output generated by a JMP Clinical Report by simply adding a script to the data table within the Report.

Descriptions of each function is provided below. Additionally, the installed API/example folder contains example scripts which demonstrate the usage of the functions.

Functions:

JMPClinicalReviewAPI:getCurrentStudy

Returns the name of the current study.

Returns:

If there is a current study, the study name (a string); otherwise Empty().

Syntax

JMPClinicalReviewAPI:getCurrentStudy = function({}, {},

expr(StudyListClass:studyListSingleton):getCurrentStudy();

);

JMPClinicalReviewAPI:setCurrentStudy

Sets the current study to the one specified.

Arguments:

study

{study} - where "study" is a string containing the name of the study to set as the current study

{Empty()} - to set the current study to <None>

Returns:

1- if the current study was successfully set

0 - if no study was successfully set

Syntax:

JMPClinicalReviewAPI:setCurrentStudy = function({study}, {cs},

JMPClinicalReviewAPI:getReviewBuilder

This function gets an instance of a Review Builder. If an instance doesn't exist, one will be created.

Arguments:

show

{show=1} - shows the window

{show=0} - hides the window

Returns:

A reference to the Review Builder object.

Syntax:

JMPClinicalReviewAPI:getReviewBuilder = function({show=1}, {default local},

JMPClinicalReviewAPI:closeReviewBuilder

This function closes the current Review Builder instance.

Arguments:

None

Returns:

N/A

Syntax:

JMPClinicalReviewAPI:closeReviewBuilder = function({}, {default local},

JMPClinicalReviewAPI:openReviewTemplate

This function opens a Review Template.

Arguments:

templatePath - path to the Review Template to open

Returns:

A reference to the Review Builder object.

Syntax:

JMPClinicalReviewAPI:openReviewTemplate = function({templatePath}, {default local},

JMPClinicalReviewAPI:createStaticReport

Creates a static version (PDF, RTF, PowerPoint) of the review.

Arguments:

type - "PDF", "RTF", or "PowerPoint"

includeNotes - 0 = do not include notes, 1 = include notes

filePath - full file path where to save report. If not specified, the default static report location is used - as specified in the configuration as /user/clinical/staticreportpath

Returns:

N/A

Syntax:

JMPClinicalReviewAPI:createStaticReport = function({type = empty(), includeNotes = empty(), filePath = empty()}, {default local},

JMPClinicalReviewAPI:createLiveReport

Creates a web-based JMP Live version of the review.

Arguments:

{ConnectionName = String} - specifies the name of the JMP Live Connection

{Space = String} - specifies the name of the JMP Live Space to publish to, within the JMP Live Connection

{PublishData = Number} - type 1 to allow data to be published, 0 to disallow it

{PublishOptimization = Number} - type 1 for best interactivity, 2 for best performance

{AllowDataToBeDownloaded = Number}: type 1 to allow data to be downloaded, 0 to disallow it

{PublishNotes => Number} - type 1 to include notes, 0 to not include notes

Syntax:

JMPClinicalReviewAPI:createLiveReport = function({ConnectionName = empty(), Space = empty(), PublishData = empty(), PublishOptimization = empty(), AllowDataToBeDownloaded = empty(), PublishNotes = empty()}, {default local},

JMPClinicalReviewAPI:upgradeReviewTemplate

Reads a single review template (infile) and writes its upgraded form (outfile).

Arguments:

{infile} - The path to a review template created in an older version of JMP Clinical

{outfile} - The path to the destination of the upgraded template

Returns :

N/A, but diagnostic information is written to the JMP log.

Syntax:

JMPClinicalReviewAPI:upgradeReviewTemplate = Function({infile, outfile},

JMPClinicalReviewAPI:upgradeReviewTemplates

Reads all review templates from a directory (infolder) and writes their upgraded copies to another directory (outfolder).

Arguments:

{infolder} - The path to a source directory containing review templates created in an older version of JMP Clinical

{outfolder} - The path to a destination directory where upgraded review templates should be written

Returns :

N/A, but diagnostic information is written to the JMP log.

Syntax:

JMPClinicalReviewAPI:upgradeReviewTemplates = Function({infolder, outfolder},