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

Rule not firing when running or during data entry (works in test mode though)

I assume I have this defined wrong but can't seem to see where the mistake is.. I followed how the rules for lab range checks are done in the Demo instance.. here is my rule def..
<?xml version="1.0" encoding="UTF-8"?> F_HEMATOLOGYCB.IG_HEMAT_GROUP1.I_HEMAT_HGB HGB is out of the expected range (12-17.5 gm/dL). Please verify your response. Site 9014: HGB should be between 12 and 17.5 gm/dL SE_VISIT1.F_DEMOGRAPHICS_889.IG_DEMOG.I_DEMOG_SITEID eq 9014 and (I_HEMAT_HGB lt 12 or I_HEMAT_HGB gt 17.5)

Ignore the range values.. I just put in any number (actually think I copied it from a rule for a different lab in the demo).. this is just to verofy I can make a rule.. going to write a program that produces the xml.. so just testing.. at any rate. I can run this in test and enter 9014 and 10 and it fires correctly.. if I enter a 10 in this CRF (and 9014 is in the demo graphics crf) it does not fire.. I have looked at the target and def about 3 dozen times.. they all look correct..
Tagged:

Comments

  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email
    Did you enter the site id first? Any items that don't exist yet are null,
    which nullifies the whole rule expression if it is written in the positive
    case (eq. vs. ne).

    Site specific rules you could do by setting up separate studies, to
    namespace the rules.

    Better to do this check with extracted data, with a frequency that matches
    how important a range deviation is. Lab ranges can change over time, and
    between labs that a site might use, and using rules means you need to add
    rules for every site (and all their labs) that joins the study.

    Ideally the PI should define what is an acceptable investigation value
    range for that particular study, so you can write one rule set for all
    sites. Not particularly ethical to spend time enforcing disparate lab
    ranges if it doesn't affect study outcomes.
  • gpinkhamgpinkham Posts: 37
    via Email
    On Dec 7, 2015 6:08 PM, "lindsay.stevens"
    wrote:
    >
    > Did you enter the site id first? Any items that don't exist yet are null,
    > which nullifies the whole rule expression if it is written in the positive
    > case (eq. vs. ne).
    >
    > Site specific rules you could do by setting up separate studies, to
    > namespace the rules.
    >
    > Better to do this check with extracted data, with a frequency that matches
    > how important a range deviation is. Lab ranges can change over time, and
    > between labs that a site might use, and using rules means you need to add
    > rules for every site (and all their labs) that joins the study.
    >
    > Ideally the PI should define what is an acceptable investigation value
    > range for that particular study, so you can write one rule set for all
    > sites. Not particularly ethical to spend time enforcing disparate lab
    > ranges if it doesn't affect study outcomes

    Thanks Lindsay. Yes I did enter the demographics crf with the siteid
    first.

    BTW. Just for the record. I'm the software guy. Just trying to see if OC
    could replace an old home grown EDC. Just trying to see if I can get a
    feature match. Processes and procedures of DM and clinics groups are
    outside my scope. But specially to the issue of changing ranges and
    numerous sites. Not much of an issue for us so far. Any study with lots
    of sites uses a central lab. Small studies with 1 or 2 sites uses a local
    lab. This is the kind I need to supply a lab norms check. We have his
    built into our current system. So if OC can't do similar its a strike in
    the cons column. Again just seeking feature matches. Appreciate the
    advice and knowledge share. As I said I'm the software guy. Been at this
    for 30+ years. Only these last 2 in pharma. :-)
  • gpinkhamgpinkham Posts: 37
    just reread that. typing on a phone is terrible.. typos and autocorrects! At any rate.. Thanks again Lindsay. I will do some more digging into it see why the rule won't fire.. Hopefully I can get passed it quick.. this quick PoC is turning into a longer PoC and the list of cons is growing faster than the pluses.. :-(
  • gpinkhamgpinkham Posts: 37
    So I did some more digging.. I put in some debugging code in the rule runner.. there was a catch of an exception but nothing was being done with it. . at any rate executing my rule causes this exception to happen.. I do not know why.. I saw a post earlier in the forum with the same error and they mentioned the item group oid.. I have it in there. . so not sure why it is happening.. any thoughts????

    tg expression:SE_VISIT1[7].F_HEMATOLOGYCB.IG_HEMAT_GROUP1[1].I_HEMAT_HGB
    There was an error executing the rules: OCRERR_0022
    org.akaza.openclinica.exception.OpenClinicaSystemException: OCRERR_0022
  • gpinkhamgpinkham Posts: 37
    figured it out.. after looking at the rule about a million times I didn't notice a small typo. . putting in some debugging into the code helped.. so I had the item group wrong..
This discussion has been closed.