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

InsertAction (Rule)

Hi everyone,

I need to take more information about Insert Action. I have two CRF (F_NORMSLABANAL_V90 and F_LABORATORYAN_V10) are located in the one event (SE_VISIT2), I want the investigator to fill the item I_NORMS_NORM_ESR and this value insert in the item names I_LABOR_ESR_NORM. It is my target.

I understand that I should specify exact value in the DestinationProperty, that's Value in the DestinationProperty can not be the link on the Item OID. But.. How can I solve my problem?

This is my script with variables:
<!--

VARIABLES:
Study event OID:    SE_VISIT2
CRF version OID:    F_NORMSLABANAL_V90
Group OID:        IG_NORMS_UNGROUPED
Item OID:        I_NORMS_NORM_ESR 

Study event OID:    SE_VISIT2
CRF version OID:    F_LABORATORYAN_V10
Group OID:        IG_LABOR_UNGROUPED
Item OID:        I_LABOR_ESR_NORM
-->

<RuleImport>
    <RuleAssignment>
        <Target Context="OC_RULES_V1">I_NORMS_NORM_ESR</Target>
        <RuleRef OID="CBCNORMS2">
            <InsertAction IfExpressionEvaluates="true">
                <Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="true" ImportDataEntry="false"  Batch="false" />
                <DestinationProperty OID="IG_NORMS_UNGROUPED.I_LABOR_ESR_NORM" Value="I_NORMS_NORM_ESR"></DestinationProperty>
                                <ValueExpression Context="OC_RULES_V1"></ValueExpression>
            </InsertAction>
        </RuleRef>
    </RuleAssignment>

<!--***************************************************************************************************-->
    <RuleDef OID="CBCNORMS2" Name="Section CBC parametre ESR">
        <Description>Insert the normal value in LABORATORYANALYZES CRF</Description>
        <Expression>(I_NORMS_NORM_ESR ne "") and (I_LABOR_ESR_NORM eq "")</Expression>
    </RuleDef>
</RuleImport>

Comments

  • tkhajatkhaja Posts: 62 ✭✭
    edited June 2015 via Email

  • tkhajatkhaja Posts: 62 ✭✭
    Hi Viktoriya,

    Your DestinationProperty and Expression OIDs have to be updated.

    Currently, you have
    <DestinationProperty OID="IG_NORMS_UNGROUPED.I_LABOR_ESR_NORM" Value="I_NORMS_NORM_ESR"></DestinationProperty>
                                    <ValueExpression Context="OC_RULES_V1"></ValueExpression>

    Change it to
    <DestinationProperty OID="F_NORMSLABANAL_V90.IG_NORMS_UNGROUPED.I_LABOR_ESR_NORM"></DestinationProperty>
                                    <ValueExpression Context="OC_RULES_V1">I_NORMS_NORM_ESR</ValueExpression>

    I_LABOR_ESR_NORM belongs to another CRF within the same event when compared to item I_NORMS_NORM_ESR(Target OID), therefore, you have to start with FormOID.IG_OID.I_OID. If item I_LABOR_ESR_NORM was a part of another event then you have to start with SE_OID.IG_OID.I_OID. Also, if you want to insert a value from another item, the OID should go in the ValueExpression. Value is used only when you want to insert a static value(for example: 100, "ABC", etc)

    Currently, you have
            <Expression>(I_NORMS_NORM_ESR ne "") and (I_LABOR_ESR_NORM eq "")</Expression>

    Change it to
            <Expression>(I_NORMS_NORM_ESR ne "") and (F_NORMSLABANAL_V90.IG_NORMS_UNGROUPED.I_LABOR_ESR_NORM eq "")</Expression>

    Similarly, I included the Form OID for the item I_LABOR_ESR_NORM.

    Let me know if the rule doesn't work even after making the above changes.

    Thanks,
    Thasbiha
  • Dear, Thasbiha

    Thanks for your answer! I get error.
    The error looks like:

    Your XML is not well formed, and does not comply with the Rules schema. Check it and try again. It returned the message: Line : -1 - cvc-complex-type.2.4.a: Invalid content was found starting with element 'ValueExpression'. One of '{DestinationProperty}' is expected.
  • tkhajatkhaja Posts: 62 ✭✭
    Can you please attached the modified rule and the CRFs and I can take a look.
  • Oh, see files below

    and my rule

    <!--

    VARIABLES:
    Study event OID:    SE_VISIT2
    CRF version OID:    F_NORMSLABANAL_V90
    Group OID:        IG_NORMS_UNGROUPED
    Item OID:        I_NORMS_NORM_ESR 

    Study event OID:    SE_VISIT2
    CRF version OID:    F_LABORATORYAN_V10
    Group OID:        IG_LABOR_UNGROUPED
    Item OID:        I_LABOR_ESR_NORM
    -->

    <RuleImport>
        <RuleAssignment>
            <Target Context="OC_RULES_V1">SE_VISIT2.F_NORMSLABANAL_V90.IG_NORMS_UNGROUPED.I_NORMS_NORM_ESR</Target>
            <RuleRef OID="CBCNORMS">
                <InsertAction IfExpressionEvaluates="true">
                    <Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="true" ImportDataEntry="false"  Batch="false" />
                    <DestinationProperty OID="F_LABORATORYAN_V10.IG_LABOR_UNGROUPED.I_LABOR_ESR_NORM"></DestinationProperty>
                                    <ValueExpression Context="OC_RULES_V1">I_NORMS_NORM_ESR</ValueExpression>
                </InsertAction>
            </RuleRef>
        </RuleAssignment>

    <!--***************************************************************************************************-->
        <RuleDef OID="CBCNORMS" Name="Section CBC parametre ESR">
            <Description>Insert the normal value in LABORATORYANALYZES CRF</Description>
            <Expression>(I_NORMS_NORM_ESR ne "") and (F_LABORATORYAN_V10.IG_LABOR_UNGROUPED.I_LABOR_ESR_NORM eq "")</Expression>
        </RuleDef>
    </RuleImport>


  • tkhajatkhaja Posts: 62 ✭✭
    Hi Viktoriya,

    Thank you for uploading the CRFs. Please move the closing tag </DestinationProperty> and make it go after </ValueExpression>

    <DestinationProperty OID="F_LABORATORYAN_V10.IG_LABOR_UNGROUPED.I_LABOR_ESR_NORM">
                        <ValueExpression Context="OC_RULES_V1">I_NORMS_NORM_ESR</ValueExpression>
                        </DestinationProperty>

    Let me know if you still have issues.

    Thanks,
    Thasbiha
  • Viktoriya LeushevaViktoriya Leusheva Posts: 21
    edited June 2015
    Thasbiha,

    Thank you so much!!! It works) I move the closing tag </DestinationProperty> and change Expression in the RuleDef. It looks like:

        <RuleDef OID="CBCNORMS" Name="Section CBC parametre ESR">
            <Description>Insert the normal value in LABORATORYANALYZES CRF</Description>
            <Expression>(I_NORMS_NORM_ESR ne "")</Expression>
        </RuleDef>
This discussion has been closed.