feat: add CDISC PPTESTCD/PPTEST columns to PKNCAresults#536
Draft
Gero1999 wants to merge 12 commits intohumanpred:mainfrom
Draft
feat: add CDISC PPTESTCD/PPTEST columns to PKNCAresults#536Gero1999 wants to merge 12 commits intohumanpred:mainfrom
Gero1999 wants to merge 12 commits intohumanpred:mainfrom
Conversation
New optional arguments for CDISC standard parameter code and name. Accepts a character string for simple mappings or a named list for route-dependent mappings. Defaults to name/desc when not provided.
Map all NCA parameters to CDISC PPTESTCD/PPTEST codes. Route-dependent parameters (CL, VZ, MRT, VSS) use nested lists to distinguish intravascular (IC) and extravascular (EV) CDISC codes.
Add as.data.frame.PKNCAresults() logic to extract PPTESTCD and PPTEST columns from the CDISC metadata stored in each parameter's formalsmap. Handles route-dependent parameters by matching against the dosing route.
Map DN parameters to their CDISC PPTESTCD/PPTEST codes. Uses the same route-dependent nested list pattern for CL, VZ, MRT, and VSS variants.
Add pptestcd_cdisc and pptest_cdisc to expected lists in test-001-add.interval.col.R. Remove test-cdisc.R; CDISC output tests now live in test-class-PKNCAresults.R.
When out_format='cdisc' and any PPTESTCD contains 'INT', add PPSTINT and PPENINT columns with ISO 8601 durations relative to the last dose time. The time unit designator is derived from timeu_pref or timeu.
…esults.R Cover PPTESTCD/PPTEST translation, route-dependent resolution, PPSTINT/PPENINT with various time units, multi-dose relative timing, and format_iso8601_duration edge cases.
011c3e5 to
7be890e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add CDISC PPTESTCD and PPTEST column support to
as.data.frame.PKNCAresults(). Each NCA parameter registered viaadd.interval.col()now carries optionalpptestcd_cdiscandpptest_cdiscmetadata. When results are extracted, these are mapped into output columns.Route-dependent parameters (CL, VZ, MRT, VSS and their dose-normalized variants) use nested lists keyed by
\"intravascular\"/\"extravascular\"so the correct CDISC code is selected based on the dosing route.Key changes:
add.interval.col()acceptspptestcd_cdiscandpptest_cdiscarguments (default to parameter name/description)as.data.frame.PKNCAresults()extracts CDISC columns from formalsmap metadatazzz-pk.calc.dn.Ralso carry CDISC mappingsRelated Issue(s)
Fixes #403
How to test