Note: When making ECLI calls, you must first navigate to the folder where you unzipped the file, then open your command prompt/terminal. Otherwise, if you open up your command prompt/terminal first, cd to the directory where you unzipped the file.
For the first example below, we will show how the ECLI command is formatted for both Windows and Mac/Linux. The key differences are:
Windows using
p21-client.bat, whereas Mac/Linux uses./p21-client.shBoth files are included in the ECLI zip downloaded
At the end of each parameter, Windows includes a
^character, whereas Mac/Linux includes a\characterFor both examples, the character is not included in the final line of the command
Following the first example, all further examples will be displayed in the Windows Template Command. If you wish to use the example shown for Mac/Linux, please make the adjustments noted above.
👩🏼💻 Example CLI Calls
ADAM Data Validation
Windows Template Command
p21-client.bat ^
--api.key={Enterprise server key} ^
--web.host=https://{your company}.pinnacle21.net ^
--project=adam-compliance ^
--study=adam-compliance-101 ^
--datapackage=ADaM ^
--standard=adam ^
--standard.version=1.1 ^
--meddra.version=19.0 ^
--cdisc.ct.sdtm.version=2017-06-30 ^
--cdisc.ct.adam.version=2017-03-31 ^
--source.adam="aspera:///adam-v1.0/compliance" ^
--source.sdtm="aspera:///sdtm/compliance" ^
--source.define="aspera:///adam/define/inprogress/define.xml" ^
--source.comment="Your comment text goes here" ^
--report="/adam-v1.0/reports/compliance.xlsx"
Mac/Linux Template Command
./p21-client.sh \
--api.key={Enterprise server key} \
--web.host=https://{your company}.pinnacle21.net \
--project=adam-compliance \
--study=adam-compliance-101 \
--datapackage=ADaM \
--standard=adam \
--standard.version=1.1 \
--meddra.version=19.0 \
--cdisc.ct.sdtm.version=2017-06-30 \
--cdisc.ct.adam.version=2017-03-31 \
--source.adam="aspera:///adam-v1.0/compliance" \
--source.sdtm="aspera:///sdtm/compliance" \
--source.define="aspera:///adam/define/inprogress/define.xml" \
--source.comment="Your comment text goes here" \
--report="/adam-v1.0/reports/compliance.xlsx"
SDTM Data Validation in a new data package
In this example, the web.host and api.key arguments are not present on the command line. Instead, they are provided through the pinnacle21.conf file. Data package is configured here to always use the latest available versions for SNOMED, UNII, NDF-RT, and LOINC dictionaries.
Windows Template Command
p21-client.bat ^
--project="Project Name" ^
--study="Study Name" ^
--datapackage="New DP Name" ^
--source.sdtm="aspera:///path/to/data" ^
--standard.version=3.3 ^
--standard=SDTM ^
--define.standard=2.1 ^
--engine.version="P21 2304.0" ^
--meddra.version=21.0 ^
--cdisc.ct.sdtm.version=2018-12-21 ^
--whodrug.version=GLOBALB3Sep19 ^
--snomed.version=latest ^
--unii.version=latest ^
--ndf-rt.version=latest ^
--loinc.version=latest ^
--report=path/to/report.xlsx
SDTM Validation using existing data package attributes
In this example, data and define.xml placed in different locations are included in validation.
p21-client.bat ^
--project="Project Name" ^
--study="Study Name" ^
--datapackage="DP Name" ^
--source.sdtm="aspera:///path/to/data" ^
--source.define="/path/to/define.xml" ^
--report=path/to/report.xlsx
Retrieve the most recent validation report for the data package
In this example data validation is not executed.
p21-client.bat ^
--project="Project Name" ^
--study="Study Name" ^
--datapackage="DP Name" ^
--report=path/to/report.xlsx
Create Define.xml from Validation Metadata
In this example, define.xml is created for a Data Package that does not have a define.xml in P21E. ECLI uses the most recently validated data. Value level metadata is generated for --ORRES, TSVAL, and QVAL variables.
In order to import validation metadata, upload define.xml or Excel spec, the CLI will need the "Define Designer" (Edit spec/define.xml) and "Analyst" (Validate Data) roles assigned to the API key it uses.
p21-client.bat ^
--project="Project Name" ^
--study="Study Name" ^
--datapackage="DP Name" ^
--import.validation.metadata ^
--create.value.level.for=”ORRES;TSVAL;QVAL”
Merge Validation Metadata into existing Define.xml
Import using validation metadata with merge option. Existing metadata in Define Designer will be merged with metadata extracted from the most recently validated data.
p21-client.bat ^
--project="Project Name" ^
--study="Study Name" ^
--datapackage="DP Name" ^
--import.validation.metadata ^
--automerge
Upload and Validate Define.xml
p21-client.bat ^
--project="Project Name" ^
--study="Study Name" ^
--datapackage="DP Name" ^
--source.define="/path/to/define.xml" ^
--standard.version=1.0 ^
--standard=adam ^
--cdisc.ct.sdtm.version=2017-06-30 ^
--cdisc.ct.adam.version=2017-03-31 ^
--report=/reports/define-issue-report.xlsx
Upload Excel Spec To Generate Define.xml
p21-client.bat ^
--project="Project Name" ^
--study="Study Name" ^
--datapackage="DP Name" ^
--standard=sdtm ^
--standard.version=3.3 ^
--source=/define/define-2017-12-18T15-01.xlsx ^
--output=/define/define_gen.xml
Upload Excel Spec To Generate Define.xml and Validate it
p21-client.bat ^
--project="Project Name" ^
--study="Study Name" ^
--datapackage="DP Name" ^
--standard=sdtm ^
--standard.version=3.3 ^
--source=/define/define-2017-12-18T15-01.xlsx ^
--output=/define/define_gen.xml ^
--report=/reports/define-issue-report.xlsx
Generate Excel Spec from existing Define.xml
p21-client.bat ^
--project="Project Name" ^
--study="Study Name" ^
--datapackage="DP Name" ^
--standard=sdtm ^
--standard.version=3.3 ^
--source.define="define-designer" ^
--output=/define/define_gen.xlsx ^
--output.format=xlsx
Export Define.xml from P21E
p21-client.bat ^
--project="Project Name" ^
--study="Study Name" ^
--datapackage="DP Name" ^
--standard=sdtm ^
--standard.version=3.3 ^
--source.define="define-designer" ^
--output="/path/to/define.xml"
Invoke ECLI From SAS Using X command
Using SAS, a call to the command line can be done using the X command. The cd command can be used to navigate to the folder containing the p21-client batch script and the ECLI p21-client .jar file
e.g., To run a validation and export an issue report, the following could be used (noting web.host and api.key would be present in the configuration file as previously described)
x "cd ""filepath/to/p21client"" && ""P21-client"" project=""myproject"" --study=""mystudy"" --datapackage=""mydatapackage"" ""source.sdtm= aspera:///filepath/to/data"" --report=""filepath/to/report""";
Additionally, macros can be developed to aid automation. See example below:
%macro ecli_val_report(fpcl=,pj=,st=,dp=,fpsrc=,fprep=);
options noxwait ;
x "cd ""&fpcl"" && ""P2I-client"" project=""&pj"" --study=""&st"" --datapackage=""&dp"" ""source.sdtm=aspera:///&fpsrc"" --report=""&fprep""";
%mend;
%ecli_val_report (fpcl=, /*File path to client*/
pj=, /*Project*/
st=, /*Study*/
dp=, /*Data package*
/ fpsrc=, /*File path to source data*/
fprep= /*File path to issue report*/)
👣 What's Next?
Learn more in Using P21 Enterprise via API/CLI.
Email questions or feedback to support@pinnacle21.atlassian.net.
