We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Tables and Simple Conditional Display

Dear all

Simple question can i set a simple conditional display for a table? Say a table has 5 items relying on the previous question of yes no...What I did was hide all items in the table display only when previous qn is a yes.. Gave me a weird x and add button and none of my items..Thank you so much for your help..Cheers..

kevin
Tagged:

Comments

  • kristiakkristiak Posts: 1,338 ✭✭✭
    via Email
    Hi Kevin,

    I would make the table a grouped item and set the condition for show or hide in a rule. Find further instructions in the Excel template.

    This works very well and I use it e.g. to show or hide the AE page.

    Regards

    Krister
  • kevintehkevinteh Posts: 32
    Krister

    Thank you for your reply...Shame there's no simple conditional display ability. So i've never written rules for a group before..Tried it and it returned an error...Below is my xml file:

    <!--
    StudyEventOID: SE_IMAGINGVISIT
    CRF OID      : F_MEDICALHISTO
    GROUP OID    : IG_MEDIC_MEDHIST
    Item OID     : I_MEDIC_HISTORY_MEDICAL 
    Description: 
    -->
    <RuleImport>
      <RuleAssignment>
        <Target Context="OC_RULES_V1">SE_IMAGINGVISIT.F_MEDICALHISTO.IG_MEDIC_MEDHIST.I_MEDIC_HISTORY_MEDICAL</Target>
        <RuleRef OID="I_MEDIC_HISTORY_MEDICAL_1">
          <ShowAction IfExpressionEvaluates="True">
            <Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="true" ImportDataEntry="false" Batch="false"/>
            <Message></Message>
            <DestinationProperty OID="IG_MEDIC_MEDHIST"/>
          </ShowAction>
        </RuleRef>
      </RuleAssignment>


      <!-- Hide Item Rule -->

      <RuleDef OID="I_MEDIC_HISTORY_MEDICAL_1" Name="Hide Table if No(0) selected for medical history">
        <Description>Show Item</Description>
        <Expression>
          I_MEDIC_HISTORY_MEDICAL eq "1"
        </Expression>
      </RuleDef>
    </RuleImport>

    Not sure what's wrong? I've chose hide for group display status for the chosen group..Cheers..

    Kevin


  • haenselhaensel Posts: 602 ✭✭✭
    Hi Kevin

    Are you trying to use an item (I_MEDIC_HISTORY_MEDICAL) as trigger from the item group you want to SHOW/HIDE (IG_MEDIC_MEDHIST)?

    Regards,
    Christian

    kevinteh said:
        <Target Context="OC_RULES_V1">SE_IMAGINGVISIT.F_MEDICALHISTO.IG_MEDIC_MEDHIST.I_MEDIC_HISTORY_MEDICAL</Target>
            <DestinationProperty OID="IG_MEDIC_MEDHIST"/>

          I_MEDIC_HISTORY_MEDICAL eq "1"

  • kristiakkristiak Posts: 1,338 ✭✭✭
    via Email
    I think you got the correct rule from Christian. Don't worry, it takes a while to get used to the syntax .

    Regards

    Krister
  • kevintehkevinteh Posts: 32
    Christian

    Yes i am..Sorry for xml confusion i was trying the hide item first before the show item(which i prefer)...So i'm using i_medic_history(has yes no , 1,0 response)..If yes show grouped IG_MEDIC_MEDHIST item...The rule goes through ok..However when i select yes and then save(learned that to pass a rule one needs to save first)..it returns an error occured page..Cheers..

    Kevin
This discussion has been closed.