Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Implement derive_param_first_event() #1063

Closed
bundfussr opened this issue Apr 6, 2022 · 4 comments · Fixed by #1109
Closed

Feature Request: Implement derive_param_first_event() #1063

bundfussr opened this issue Apr 6, 2022 · 4 comments · Fixed by #1109
Assignees
Labels
enhancement New feature or request programming

Comments

@bundfussr
Copy link
Collaborator

bundfussr commented Apr 6, 2022

Feature Idea

derive_param_first_event(
  dataset,
  dataset_adsl,
  dataset_source,
  filter_source,
  date_var,
  subject_keys = vars(STUDYID, USUBJID),
  set_values_to)

adds a new parameter to the input dataset. AVALC is set to "Y" if an observations exists in the input dataset where PARAMCD == source_param and cond == TRUE. Otherwise AVALC is set to "N". AVAL is set to 1 or 0. ADT is set to the first date where the condition is fulfilled.

Relevant Input

What should the input look like? REMINDER: no patient level data or company sensitive information should be shared via this open public issue

Relevant Output

What should the output look like? REMINDER: no patient level data or company sensitive information should be shared via this open public issue

Reproducible Example/Pseudo Code

derive_param_first_event(
  dataset = adrs,
  dataset_adsl = adsl,
  dataset_source = adrs,
  filter_source = PARAMCD == "OVR" & AVALC == "PD" & ANL01FL=”Y”,
  date_var = ADT,
  subject_keys = vars(STUDYID, USUBJID),
  set_values_to= vars(
    PARAMCD = "PD",
    PARAM = "Disease Progression by Investigator",
    PARCAT1 = "Tumor Response",
    PARCAT2 = "Investigator",
    PARCAT3 = "Recist 1.1",
    ANL01FL = "Y"))

derive_param_first_event(
  dataset = adrs,
  dataset_adsl = adsl,
  dataset_source = adsl,
  filter_source = !is.na(DTHDT),
  date_var = DTHDT,
  set_values_to = vars(
    PARAMCD = "DEATH",
    PARAM = "Death",
    PARCAT1 = "Reference Event",
    ANL01FL = "Y"
  )
)
@rossfarrugia
Copy link
Collaborator

@bundfussr given how we recently updated the {admiralonco} functions shouldn't we replace source_param and condition with a single filter_source argument?

e.g. in the example above you'd have filter_source = PARAMCD == "OVR" & AVALC == "PD" & ANL01FL=”Y”

@bundfussr
Copy link
Collaborator Author

@rossfarrugia , yes, makes sense.

@rossfarrugia
Copy link
Collaborator

@bundfussr issue now updated accordingly - please do the same for the code.

@rossfarrugia
Copy link
Collaborator

@bundfussr also updated to add date_var and dataset_source as discussed in issue 1022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request programming
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants