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

tm_g_patient_profile update validation of ADLB variables #5

Open
cicdguy opened this issue Aug 5, 2021 · 2 comments
Open

tm_g_patient_profile update validation of ADLB variables #5

cicdguy opened this issue Aug 5, 2021 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@cicdguy
Copy link
Contributor

cicdguy commented Aug 5, 2021

Patient profile module tests that ADLB is unique by:
"USUBJID", "STUDYID", "ANRIND", "LBSEQ",
"PARAMCD", "BASETYPE", "ADT", "AVISITN",
"LBSTRESN", "LBCAT", "LBTESTCD"
So in case any of these variables are missing, the LB plot is not created.

Provenance:

Creator: bahatsky
@cicdguy cicdguy added devops enhancement New feature or request labels Aug 5, 2021
@cicdguy
Copy link
Contributor Author

cicdguy commented Aug 5, 2021

Hmm I looked very quickly but it looks like at least LBSTRESN and ANRIND are required to be non-missing. I'm not sure about the other vars mentioned above.

NEST/teal.osprey/blob/77b09f95ebd8f9f6df4bea6724deb4680996c88e/R/tm_g_patient_profile.R#L878

Two options could be:

  • use validate to catch missing values in these variables and provide a note to the user about what's missing. This is pretty common in lab data but users can use the filters panel to filter out the NAs or select records with ANL01FL.
  • drop rows from ADLB --> this one is not great since the user may not know this is happening. But I guess the module is already doing this.

What do you think?

Provenance:

Creator: anajens

@cicdguy
Copy link
Contributor Author

cicdguy commented Aug 5, 2021

I looked further and I think it's a bit wrong what is done there. For example, ANRIND normally is not even based on LBSTRESN, it's based on AVAL, I think we should replace the references to SDTM variables to ADaM variables and then it will be fine. Suppose we have some derived tests in ADLB for which LBTESTCD and LBCAT are missing. Then this code will return an error although nothing is really wrong.

Provenance:

Creator: bahatsky

@mhallal1 mhallal1 added the SP3 label Oct 19, 2021
@pawelru pawelru removed the devops label Nov 2, 2021
@pawelru pawelru added the good first issue Good for newcomers label Nov 16, 2021
@pawelru pawelru removed the SP3 label Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants