pharmaverse / sdtm.oak

An EDC and Data Standard agnostic SDTM data transformation engine that automates the transformation of raw clinical data in ODM format to SDTM based on standard mapping algorithms
https://pharmaverse.github.io/sdtm.oak/
Apache License 2.0
22 stars 6 forks source link

Feature Request: Implement mapping functions conceptually similar to `assign_no_ct()`/`assign_ct()` #39

Closed ramiromagno closed 3 months ago

ramiromagno commented 5 months ago

Feature Idea

As per the example pseudocode provided in the template code: https://github.com/pharmaverse/sdtm.oak/blob/main/inst/cm_domain/create_cm_template.R, implement functionality equivalent to assign_no_ct()/assign_ct() either as one function, or two, still to be worked out.

Relevant Input

The relevant input(s) should be:

Relevant Output

The output should be a new dataset containing the new variables (as indicated by their names in one of the inputs.

Reproducible Example/Pseudo Code

No response

rammprasad commented 5 months ago

@ramiromagno - assign_ct() needs controlled terminology as a mandatory parameter.

ramiromagno commented 5 months ago

@rammprasad : I was thinking of having one single function, and having that controlled terminology as optional: if provided, then internally run the equivalent of assign_ct(), otherwise, default to assign_no_ct().

rammprasad commented 5 months ago

if it is ok, lets keep one function per algorithm. It will be easier to maintain in the long run.

ramiromagno commented 5 months ago

Hi @rammprasad : could you provide a mock-up example of how the controlled terminology should be used in assign_ct()?