###### tags: `Pinnacle21`
# Pinnacle 21 Community software
## What is Pinnacle 21?
**Pinnacle 21**, also known as OpenCDISC Validator, provides great compliance checks against CDISC outputs like SDTM, ADaM, SEND and Define.xml.[Common Pinnacle 21 Report Issues: Shall we Document or Fix?](https://www.lexjansen.com/pharmasug/2019/DS/PharmaSUG-2019-DS-119.pdf)
**Pinnacle 21 validation report**
PINNACLE 21 COMMUNITY VALIDATOR TOOL: Pinnacle 21 Community Validator is the leading industry tool for validating SDTM data sets against CDISC standards (for more information about CDISC standards, please see cdisc.org). After the validator has finished checking the SDTM data sets, findings are made available to the user, typically in Excel format. The findings report consists of four tabs: Datasets Summary, Issue Summary, Details, and Rules.
* The Datasets Summary tab provides an overview of the contents for each input file and contains summary information about the total number of records, errors, warnings, and notices for each domain.
* The Issue Summary tab breaks down issues by severity (error, warning, and notice) and by type for each domain. Each issue type is categorized by FDA Publisher ID, which represents the FDA’s published business rules. A description of each rule can be found on the Rules tab.
* The Details tab includes all issues in an expanded format and is presented on the record level. This tab includes the domain, record number, count, variables, values, rule ID, message, category, and severity for each issue.
---
## Steps to run validation
Log in with Pinnacle ID

When validating SDTM.
* Engine: FDA (2204.1)
* Standard: SDTM
* Source Format: SAS (R) Transport (XPORT)
* Configuration: <Look up in the Study's Current notes the correct SDTM IG Version for FDA being used>
* Source Data: Drop your files here to select them or Browse: Click on "Browse", in File Explorer, go to the path where your xpt files are, select all the relevant xpt files, then in the bottom right of the File Explorer Window, click "Open".
* Define.xml: Leave blank until you have define.xml, then when you have one, click on Browse, then go to correct path in File Explorer, select the define.xml, then in bottom right corner, click "Open"
* SDTM CT: <Look up in the Study's Current notes the correct SDTM Terminology Version being used>

** Printscreen of C-200-001 current note

Move report files, listed below new to old, from `D:\Users\Lun-Hsien.Chang\Documents\Pinnacle 21 Community\reports` to `\\sas\repos\Surface_C-200-001\prod\sdtm\validate`
* pinnacle21-report-2022-10-20T17-56-05-191.xlsx

* pinnacle21-report-2022-08-26T11-49-55-858.xlsx
When validating the SDTM datasets for the first time, simply edit the report file by adding a new column **comment**
When validating the same set of SDTM datasets for the second time, run `p21_merge_1st_time.sas` to merge commented report (1st time) and new uncommented report (2nd time) to produce a summary join file
When validating the same set of SDTM datasets for the third time and in subsequent validation, run `p21_merge_2nd_time_plus.sas` to merge the summary join file with a new (3rd time) uncommented report. See the instruction in the SAS programs
Input, output files in `p21_merge_2nd_time_plus.sas` and how to use them
* Input file 1 name is set by `&ocv_unco.` This file is called Latest uncommented report in the SAS program
* Input file 2 name is set by `&ocv_comm.` This file is called Latest commented report in the SAS program
* Output file name is set by `&ocv_out.`
```sas!
/*Latest uncommented report. This report is generated by running Pinnacle 21 validator*/
%let ocv_unco = pinnacle21-report-2022-11-03T10-19-22-475.xlsx;
%let latest_time = %substr("&ocv_unco.", %length("&ocv_unco.") - 28, 23);
%put &latest_time.;
/*Latest commented report. This file is*/
%let ocv_comm = SDTM-Summary_Join_Latest_Comments.xlsx;
/*Output Excel file containing merged data. May want to insert date in yyyy-mm-dd format*/
%let ocv_out = SDTM-Summary_Join_&latest_time._AUTO.xml;
```
* What the program `p21_merge_2nd_time_plus.sas` does is to merge `&ocv_unco.` and `&ocv_comm.` to create `&ocv_out.`
* Rename the output file `SDTM-Summary_Join_yyyy-mm-ddTdd-dd-dd-ddd_AUTO.xml` by changing the `_AUTO.xml` to `.xls` Then open this file and hit Convert tab to change file type to xlsx. For example, `SDTM-Summary_Join_2022-11-03T10-19-22-475_AUTO.xml` will be replaced by `SDTM-Summary_Join_2022-11-03T10-19-22-475.xlsx`
* Check that has both latest comments and latest Pinnacle 21 msgs as the highlighted columns below

* Make a new copy, not replace, of `SDTM-Summary_Join_yyyy-mm-ddTdd-dd-dd-ddd.xlsx` and name this copy as `SDTM-Summary_Join_Latest_Comments.xlsx` This copy will overwrite existing `SDTM-Summary_Join_Latest_Comments.xlsx` if you have previously create and edited on
* Programming to fix Pinnacle 21 messages while documenting the report by editing the Comment column
Fix issues or document on them
* In the Latest commented report, priorise on messages with Chk=New, Increased
* Use a Pinnacle 21 ID to look up variables in the Details tab of the Latest uncommented report
* FDA Severity is not found in the report produced by Pinnacle 21 Community version 4.0.1

---
## Fix or document Pinnacle 21 messages
| Source | Pinnacle 21 ID | Message |
| -------- | -------- | -------- |
| PE | SD1021 | Unexpected character value in PEORRES variable |
| PE | SD1021 | Unexpected character value in PESTRESC variable |


Using strip() to rid of white spaces and setting missing numeric values to "" resolved the issue
```sas!
/* ,put(&source_var1.,best32.) as PEORRES length=200*/
/* ,put(&source_var1.,best32.) as PESTRESC length=200*/
,case when &source_var1. not=. then strip(put(&source_var1.,best32.)) else ""
end as PEORRES length=200
,case when &source_var1. not=. then strip(put(&source_var1.,best32.)) else ""
end as PESTRESC length=200
```

---
| Source|Variable | Pinnacle 21 ID | Message |
| -------- | -------- | -------- |
| AE |AELAT| SD1076 | Model permissible variable added into standard domain|
| AE |AELNKID| SD1076 | Model permissible variable added into standard domain|
Solution:
Document this message as AELAT variable has been added to identify laterality. No need to do any fix.
[Common Pinnacle 21 Report Issues: Shall we Document or Fix?](https://www.lexjansen.com/pharmasug-cn/2018/CD/Pharmasug-China-2018-CD24.pdf)
---