2 Replies Latest reply: Mar 23, 2012 4:08 AM by Damian Spyra RSS

    Result selection - Need Help!

    Damian Spyra

      Hi all,

       

      i have follow issue:

       

      I have patient data, with correspondent medical orders and belonging checkup results.

      One single test can have two different result classes.

      Data structure:

       

      Order ID,     Test ID,     Result class,      Result

           0               1               MHK                10                  

           0               1                  A                  15

           0               2               MHK                12

           0               3               MHK                11

           0               4                  A                  15

       

       

      What I'm trying to do, is to determine if there exists the Result class MHK inside one test. In case of existing MHK class i want to show only MHK Result and "hide" the A Result class. In other case the A Result class should be pointed.

       

      Thanks for any help!            

        • Result selection - Need Help!
          Henric Cronström

          If you want to do it in the script, then there is a simple solution:

           

          LOAD [Order ID], [Test ID], [Result class], Result FROM Sourcetable

               WHERE [Result class]='MHK';

           

          LOAD [Order ID], [Test ID], [Result class], Result FROM Sourcetable

               WHERE not Exists([Test ID]);

            • Result selection - Need Help!
              Damian Spyra

              Hello Henric,

               

              thank you for your idea, it works well.

               

              I've been thinking about my issue. If i make it in script, i will lose the possibility to have/show both Result information  if required. It would be interesting to solve this problem statement with for example an set analysis formula.

               

              I'm not sure if it's possible.