Skip to content

Error checks involving multiple variables #210

@hewanadun

Description

@hewanadun

@jculhane @kgauthreaux

Noticed this in A5D2 error checks but reporting as a general issue since this is relevant to all forms. Requesting these changes as it helps us to generate more meaningful error report.

  1. For error checks involving multiple variables, "comp_vars" column should include all the variables involved in the check. For example,

    • In check a5d2-ivp-m-007, comp_vars column should have "MODEA5D2, RMREASA5D2", it's currently blank
    • In a5d2-ivp-m-137 and a5d2-ivp-m-352, HEADIMP is missing in the comp_vars list
    • In a5d2-ivp-m-169 and a5d2-ivp-m-354, DIABETES is missing in the comp_vars list
      These are only couple of examples, there are many checks where comp_vars are missing or incomplete.
  2. Similarly, for error checks involving multiple forms, "comp_forms" column should include all the forms involved in the check.

  3. When choosing the variable to report the error, please follow the following convention.

    • If the check is in format, "If A is .... then B (must be | cannot be) ...." => It's ok to write the error under either variable A or B.
      • Most of the error checks belong to this format and the variables RT using to report the error is correct for this type of checks (e.g. a5d2-ivp-m-007, a5d2-ivp-m-029, etc.)
    • If the check is in format, "At least one of P, Q, R, S, T must be ...." => write the error under variable P.
      • Some examples are a1-ivp-m-063, a1-ivp-m-076, these checks are also reported under the correct variables
    • If the check is in format, "If P, Q, R are ...., then Z (must be | cannot be) ..." => write the error under variable Z.
    • If the check is in format, "If A,B,C is .... then X, Y, Z ..... " => write the error under variable A.
    • If the check is in format, "If X is .... then (at least one of | none of | all of | some of | etc.) P, Q, R, S, T must be ....." => write the error under variable X.
      • This is the case where RT error checks are reported under the wrong variables. Some examples
        • a5d2-ivp-m-137 and a5d2-ivp-m-352 - these checks should be moved to variable HEADIMP (currently reported under IMPAMFOOT)
        • a5d2-ivp-m-169 and a5d2-ivp-m-354 - these checks should be moved to variable DIABETES (currently reported under DIABINS)
      • Only the var_name column needs to be updated, no changes required in rest of the columns including the error_code. Above are only couple of examples, there are more similar cases in A5D2 and maybe in other forms. Please check and fix.
      • Just want to mention that checks in B5 plausibility (b5-ivp-p-1003, b5-ivp-p-1004, b5-ivp-p-1023, b5-ivp-p-1024, etc.) belong to this format and reported under the correct variable. So, please follow the same convention for any other checks in the above mentioned format.

For when UDSv3 variables are involved (pulled from this comment)

When referring to variables and form names,

  • Let's include the version only if it's not the current version.
  • Include the version within brackets after the variable name or form name
  • List current version variables/forms first in comp_vars/comp_forms

For example

  • In b1-i4vp-p-1003, comp_forms => B1, B1[UDSv3]
  • In b1-i4vp-p-1004, test_logic => IF |WEIGHT - WEIGHT[UDSv3]| > 50

Exclude Unknown or N/A codes, or blanks when comparing with a previous visit

It is allowed to enter a valid value in the current visit if they entered Unknown or N/A code in the previous visit, and vice versa. Therefore, the equality checks should be done only if both prev visit and current visit have valid values.

For example,

  • a3-i4vp-p-1038 => If MOMYOB != 9999 and MOMYOB[UDSv3] != 9999, MOMYOB should be equal to MOMYOB[UDSv3] ....
  • a3-i4vp-p-1039 => If MOMDAGE not in (888, 999) and MOMDAGE[UDSv3] not in (888, 999), MOMDAGE should be equal to MOMDAGE[UDSv3] ...

Cross form error checks involving optional forms

When variable(s) from optional form(s) used in the checks written in another form (which can be a required form or an optional form),

  • If the check is reported in a required form => Need to add condition(s) to check whether the optional form(s) submitted (i.e. MODExx != 0). Some examples,

    • a1-ivp-p-1013: Optional Form A2 [INRELTO, INLIVWTH] compared with Form A1 [LIVSITUA], and check is in A1,
      Here, update short_desc and test_logic to IF MODEA2 != 0 and INRELTO=1 and INLIVWTH=1 then LIVSITUA must equal 2
      Update full_desc to If Form A2 submitted, .....
    • a1a-ivp-p-1002: Optional Form A2 [INRELTO, INCNTFRQ] compared with Form A1a [CHILDCOMM], and check is in A1a,
      Here, update short_desc and test_logic to IF MODEA2 != 0 and INRELTO=2 and INCNTFRQ<6 then CHILDCOMM should be <= 2
      Update full_desc to If Form A2 submitted, .....
  • If the check is reported in a optional form, and all the other variables involved in the check are from required forms => No changes required, check will be ignored if the optional form is not submitted. Some examples,

    • a2-ivp-p-1002: Optional Form A2 [INLIVWTH] compared with Form A1 [LIVSITUA], and check is in A2
    • a2-ivp-p-1009: Optional Form A2 [INMEMWORS] compared with Form B9 [DECCOGIN], and check is in A2
    • b3-ivp-p-1001: Optional Form B3 [SPEECH] compared with Form B8 [APRAXSP], and check is in B3
  • If the check is reported in a optional form, and some of the variables involved in the check are from other optional forms => Need to add condition(s) to check whether the other optional form(s) are submitted (i.e. MODEyy = 0).

    • I didn't find any examples for this case, but if there are any, please modify the checks accordingly
    • This will be applicable to FVP checks when both A1a and A2 are optional
  • If all the forms involved in the check are required forms => No changes required. Some examples,

    • b4-ivp-p-1008: Form B4 [MEMORY] compared with Form B9 [COGMEM]
    • b9-ivp-p-1016: Form A1 [MEMWORS] compared with Form B9 [DECCOG]

Cross form error checks involving C2 or C2T forms

When C2 only variables or C2T only variables used in the checks written in another form (which can be a required form or an optional form), need to add a condition to check whether the C2 or C2T is submitted.

  • For C2 only variables => Add condition RMMODEC2C2T=2 or blank. Some examples,

    • b4-ivp-p-1004: Form B4 [CDRGLOB] is compared with C2 only variable MOCATOTS
      Here, update short_desc and test_logic to If RMMODEC2C2T=2 or blank and MOCATOTS <4 then CDRGLOB should not equal 0 or 0.5
    • Similar change required in I4 check b4-i4vp-p-1004
  • For C2T only variables => Add condition RMMODEC2C2T=1. Some examples,

    • b4-ivp-p-1005: Form B4 [CDRGLOB] is compared with C2T only variable MOCBTOTS
      Here, update short_desc and test_logic to If RMMODEC2C2T=1 and MOCBTOTS <4 then CDRGLOB should not equal 0 or 0.5
    • Similar change required in I4 check b4-i4vp-p-1005

Please double check any form that C2 or C2T only variables are used for cross form checks.
Note: If a variable is common to both C2 and C2T, this additional condition is not required.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions