pdfPQ: Performance Qualification (PQ) report to a pdf file

View source: R/pdfPQ.R

pdfPQR Documentation

Performance Qualification (PQ) report to a pdf file

Description

Generate a self-contained PDF report documenting a Performance Qualification (PQ) of noncompartmental analysis for the user's own data and intended workflow. Whereas pdfOQ compares the engine to fixed reference values, PQ runs the analysis the user actually intends to run, on the user's (or representative) data, and checks that the result is reproducible, scientifically plausible, and (optionally) matches the user's pre-specified expected values, with a documented, signed record including a fingerprint (md5) of the input data. The report uses the package's own pdf helpers (no LaTeX) and the signature/approval page is placed first.

Usage

pdfPQ(fileName = "ncar-PQ-Report.pdf", concData, key = "Subject",
      colTime = "Time", colConc = "conc", ..., expected = NULL,
      acceptance = NULL, performedBy = "", paper = "auto", sigField = FALSE)

Arguments

fileName

file name to save the PDF report.

concData

the user's concentration data set (data frame) to qualify.

key

column name(s) identifying each profile.

colTime

column name for time.

colConc

column name for concentration.

...

further arguments passed to tblNCA (e.g. dose, adm, dur, down, R2ADJ, concUnit), i.e. the analysis options the user intends to use in routine work.

expected

optional data frame of the user's pre-specified expected parameter values (a key column plus PPTESTCD columns such as CMAX, AUCLST); each is compared to the computed value within acceptance$tol. This is the strongest, user-owned PQ acceptance.

acceptance

a list of PQ acceptance criteria; if NULL, sensible defaults are used (maxPctExtrap=20, minR2adj=0.80, tol=1e-3, reproTol=0, and flags checkTmaxRange, checkCmaxGEClast, checkAUCINFgeAUClast, failOnNonEvaluable). Adjust to your intended use / SOP.

performedBy

name of the person performing the qualification, printed on the signature page. Defaults to the login name.

paper

paper size: "letter", "a4", or "auto" (the default; Letter in a United States locale, A4 elsewhere).

sigField

if TRUE, add Adobe Acrobat Reader signature fields under the Performed by / Reviewed by lines (via addSigField).

Details

The report contains: the intended-use inputs and the input-data md5 fingerprint; the PQ acceptance criteria; a reproducibility check (the analysis is re-run on the same data and must reproduce identical results); per-profile performance/plausibility checks (Cmax > 0, Cmax >= Clast, Tmax within the observed time range, AUClast > 0, and for profiles with a terminal slope: AUCINF_obs >= AUClast, AUC %Extrap within limit, adjusted R-squared above limit, half-life positive and finite); an optional comparison to user-supplied expected values; an overall QUALIFIED / NOT QUALIFIED verdict; and a sessionInfo appendix.

PQ acceptance criteria and the choice of representative data are the user's responsibility; this function provides the tool and configurable defaults.

Value

Invisibly, a list with fileName, qualified, paper, results (the tblNCA table), reproducible, profiles (per-profile checks), fingerprint, nProfFail, nNonEval, and expected. A PDF is written to fileName.

Author(s)

Kyun-Seop Bae <k@acr.kr>

See Also

pdfIQ, pdfOQ, tblNCA

Examples

#Theoph2 <- as.data.frame(Theoph); Theoph2$Subject <- as.numeric(as.character(Theoph2$Subject))
#pdfPQ("MyStudy-PQ.pdf", Theoph2, "Subject", "Time", "conc", dose = 320,
#      concUnit = "mg/L", performedBy = "Kyun-Seop Bae", sigField = TRUE)

ncar documentation built on July 20, 2026, 5:07 p.m.