LABSETLIST,
A^sltroot,
B^slt,
""^slt2,
DO{@NEXT.TEST "got a test",
   @GET.TEST.TYPE,
   IF{@IS.PROFILE.OR.GROUP "got a group/profile",
         %PK.LABSETLIST(sltroot,slt2);
      @IS.TTEST.OR.C "got a regular ttest (or possibly C, but we include for now)",
         IF{@IS.OUTPUTABLE slt2^/T.COMPONENTS[sltroot][slt2]}}},
END;

NEXT.TEST
IF{/CONF[.labs.source]="lab" "regular labs",
      +\SLT[slt]CP[\SLT[slt]|25]T[slt2];
   "mock labs",
      +\LAB.TE[slt]LT[slt2]}^slt2

GET.TEST.TYPE
IF{/CONF[.labs.source]="lab" "regular labs",
      \SLT[slt2]|3;
   "mock labs",
      \LAB.TE[slt2]A|3}^typ

IS.PROFILE.OR.GROUP
("P"=typ)!("G"=typ)

IS.TTEST.OR.C
"type of C might be charge, but we havent filtered out in the past, so include here",
("T"=typ)!("C"=typ)

IS.OUTPUTABLE
"for contained components, just test for reportable flag",
IF{/CONF[.labs.source]="lab" "regular labs",
      \SLT[slt2]|8;
   "mock labs",
      \LAB.TE[slt2]A|8}^tmp,
("Y"=tmp)
