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

Calculated field with missing values

aarrietaaarrieta Posts: 16
We have a CRF that a central cardiologist reads an ECHO and enters three values for certain fields. We created a calculated field on that CRF to take the average of the three reads. We have found that if one of the fields is missing (for example one of the three images can't be read) the calculation does not work. Is there a way to write the calculation so it takes the average as long as at least one field is entered? This calculation is part of inclusion criteria so it must be on the CRF, we can't do the calculation after downloading the data. We had hoped to have the database do it automatically otherwise we rely on the cardiologist to do it by hand.
Thanks,
Adrienne
Post edited by bbaumann on

Best Answer

Answers

  • kristiakkristiak Posts: 1,338 ✭✭✭

    Adrienne,

    If only one field is entered, then that value is the average and you have no problem. Likewise if all three fields are entered there is no problem, I guess you can construct the CRF with two options. If all three values are available, enter on line 1 and write a calculation for this.

    If only two values are available enter them on line 2. Here you write a calculation for two values.

    If only one value is available the you do need to calculate anything. It is clumsy and maybe Gerben, Christian or someone else can come up with a better idea. I'm sure that you could resolve it with a rule where you have more options.



  • kristiakkristiak Posts: 1,338 ✭✭✭
    edited March 2014 via Email
    Wooooow! Alicia that was clever!! Regards Krister
    Post edited by rrittberg on
  • aarrietaaarrieta Posts: 16
    Thanks Alicia.

    Instead of using 999 would decode work if I put "." for missing? For example: decode(ITEM1,.,0,ITEM1). Or do you have to have a value?
  • agoodwinagoodwin Posts: 131 admin
    Hello Adrienne,
    I haven't tested that specifically. I am not sure if that would work. I do know that it will not work with "" e.g.( ITEM1,,0,ITEM1 ). I think it also would depend on your data type. If you get a chance to test it out could you let us know? I think it only works with numeric but would like to know your findings.

    Best,
    Alicia
This discussion has been closed.