billdenney / pknca

An R package is designed to perform all noncompartmental analysis (NCA) calculations for pharmacokinetic (PK) data.
http://billdenney.github.io/pknca/
GNU Affero General Public License v3.0
68 stars 23 forks source link

NCA output in CDISC nomenclature #289

Open roninsightrx opened 5 months ago

roninsightrx commented 5 months ago

hi Bill, as mentioned a few months ago, I am interested in having the NCA output in CDISC-compatible format (and input as well, but that can be tackled later). I'd be happy to work on a feature in PKNCA or a subpackage that handles this. My initial questions would be:

billdenney commented 5 months ago

Yes, I'm very interested in this. Thank you for interest in contributing!

I think that the best place to make the main change would be the as.data.frame.PKMCAresults() adding a new out_format = "SDTM".

The other set of changes that would need to be made is in the add.nca.parameter() function to give SDTM PPTEST and PPTESTCD columns.

I would consider a major, breaking change as part of this to make the following changes that revise the main column structure of the internal data.frame so that it no longer uses inaccurate PPTESTCD values internally, perhaps changing to PKNCACD or similar. When I first wrote PKNCA, my understanding of SDTM was less complete, so I didn't realize that there were controlled terms. And, SDTM PPTESTCD names are not fully precise, so the names need to be maintained.

The last change I'm suggesting should probably be the first made since it can probably be a simple search and replace at this point.