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

Current Time in CRF

Hi all,

I need to insert the current timestamp into a CRF upon entry, or I need to have the time completed available on extract. Does anyone know how to do this?

Thank you.

Joe
This message contains confidential information and is intended only for the individual(s) named. If you are not an addressee, any dissemination, distribution, or copying of this communication is strictly prohibited. Please notify the sender immediately if you have inadvertently received this message and delete it from your computer system.

Comments

  • jjahrjjahr Posts: 41
    Hi all,

    I need to insert the current timestamp into a CRF upon entry, or I need to have the time completed available on extract. Does anyone know how to do this?

    Thank you.

    Joe
    This message contains confidential information and is intended only for the individual(s) named. If you are not an addressee, any dissemination, distribution, or copying of this communication is strictly prohibited. Please notify the sender immediately if you have inadvertently received this message and delete it from your computer system.
  • jjahrjjahr Posts: 41
    Hi all,

    I need to insert the current timestamp into a CRF upon entry, or I need to have the time completed available on extract. Does anyone know how to do this?

    Thank you.

    Joe


    This message contains confidential information and is intended only for the individual(s) named. If you are not an addressee, any dissemination, distribution, or copying of this communication is strictly prohibited. Please notify the sender immediately if you have inadvertently received this message and delete it from your computer system.
  • adridderadridder Posts: 38
    Hi Joseph,
    Sorry, bit of a slow reply. Are you still looking for this? If you wish to insert a complete timestamp upon entry, you could probably:
    * create a text field in your CRF
    * create a script to insert the timestamp
    Shouldn't be too hard, so I could probably give you a hand.
    By the way, if just the current date suffices you could go for a date field and either a script, or perhaps an insert rule with the _CURRENT_DATE, which is inserted after pressing save (haven't tried that).
    Cheers,
    Sander
    On 31 January 2013 15:05, Joseph Jahr wrote:
    Hi all,

    I need to insert the current timestamp into a CRF upon entry, or I need to have the time completed available on extract. Does anyone know how to do this?

    Thank you.

    Joe
    This message contains confidential information and is intended only for the individual(s) named. If you are not an addressee, any dissemination, distribution, or copying of this communication is strictly prohibited. Please notify the sender immediately if you have inadvertently received this message and delete it from your computer system.
  • Hi Joe,
    I think the instant-calculation type field introduced recently was designed for this sort of thing - from memory it can do a date or date-time. If you can't upgrade your version then probably go with a script as Sander suggested.
    In short I don't think inserting _CURRENT_DATE will work; it seems that insertaction can only insert a text string (using the value="" property), or copy a value from one field to another (using ), without any access to functions (including arithmetic).
    Long-winded description of buggy insertaction / date behaviour follows:
    Last week I was testing out what precisely will and won't work with insertaction rules in 3.1.1., and tested some date inserts in a setup where the target was on a different CRF to the destination date field.
    a) insert _CURRENT_DATE as valueexpression results in the string '_CURRENT_DATE' being saved in the destination field and is shown in an extract (xml 1.3), rather than the server date going in
    b) insert 2011-02-16 as valueexpression results in the string '2011-02-16' being saved in the destination field and is shown in an extract (xml 1.3), rather than the 16-Feb-2011 format being shown on the CRF
    c) copy 21-Feb-2011 from a field on the target's CRF results in the string '21-Feb-2011' being saved in the destination field and is shown in an extract (xml 1.3), rather than 21-Feb-2011 being shown on the CRF and 2011-02-16 shown in the extract
    In each case, manually saving the destination field's CRF resulted in the expected date field being validated:
    a) _CURRENT_DATE string rejected
    b) 2011-02-16 string rejected
    c) 21-Feb-2011 string accepted, converted to 2011-02-16 format in extract.
    So, make sure you test any use of insertaction carefully, and put the destination field(s) on a CRF you know will be manually saved by someone at some point. That goes for text strings as well, because as far as I can tell an initial insertaction doesn't generate an attributed audit trail entry. The insertaction runs after the current validations so be careful of that too, if the target and destination are in the same section. In the insertaction example on the trial data solutions website, there is a showaction accompanying the insertaction, which causes another validation loop, which would be an OK workaround.
    Best regards,
    Lindsay
    Sent: Tuesday, 12 February 2013 10:11 PM
    To: [email protected]
    Subject: Re: [Users] Current Time in CRF
    Hi Joseph,
    Sorry, bit of a slow reply. Are you still looking for this? If you wish to insert a complete timestamp upon entry, you could probably:
    * create a text field in your CRF
    * create a script to insert the timestamp
    Shouldn't be too hard, so I could probably give you a hand.
    By the way, if just the current date suffices you could go for a date field and either a script, or perhaps an insert rule with the _CURRENT_DATE, which is inserted after pressing save (haven't tried that).
    Cheers,
    Sander
    On 31 January 2013 15:05, Joseph Jahr wrote:
    Hi all,

    I need to insert the current timestamp into a CRF upon entry, or I need to have the time completed available on extract. Does anyone know how to do this?

    Thank you.

    Joe
    This message contains confidential information and is intended only for the individual(s) named. If you are not an addressee, any dissemination, distribution, or copying of this communication is strictly prohibited. Please notify the sender immediately if you have inadvertently received this message and delete it from your computer system.
  • GerbenRienkGerbenRienk Posts: 810 ✭✭✭
    Hello Joseph,
    In addition to Sander's reply: if you are using 3.1.3(.1) you can use the
    response_type instant-calculation.
    It is used in combination with an item and it records the date or
    date/time the item was last changed.
    So it is slightly different from what you ask in your mail, but it can
    come in handy.
    Also, from a completely different angle, you can find (almost) all info in
    the extract "CDISC ODM XML 1.3 Full with OpenClinica extensions", although
    that takes some XML-knowledge. But among other timestamps the
    DateTimeStamp for "Event CRF marked complete" is there. Unfortunately you
    can not find an entry for "CRF created", but you can find that for every
    item of the CRF.
    Kind regards,
    Gerben Rienk
    > > Hi Joseph,
    > >
    > > Sorry, bit of a slow reply. Are you still looking for this? If you wish to
    > > insert a complete timestamp upon entry, you could probably:
    > > * create a text field in your CRF
    > > * create a script to insert the timestamp
    > >
    > > Shouldn't be too hard, so I could probably give you a hand.
    > >
    > > By the way, if just the current date suffices you could go for a date
    > > field
    > > and either a script, or perhaps an insert rule with the _CURRENT_DATE,
    > > which is inserted after pressing save (haven't tried that).
    > >
    > > Cheers,
    > > Sander
    > >
    > >
    > >
    > > On 31 January 2013 15:05, Joseph Jahr wrote:
    > >
    >> >> Hi all,
    >> >>
    >> >>
    >> >>
    >> >> I need to insert the current timestamp into a CRF upon entry, or I need
    >> >> to
    >> >> have the time completed available on extract. Does anyone know how to do
    >> >> this?
    >> >>
    >> >>
    >> >>
    >> >> Thank you.
    >> >>
    >> >>
    >> >>
    >> >> Joe
    >> >> This message contains confidential information and is intended only for
    >> >> the individual(s) named. If you are not an addressee, any dissemination,
    >> >> distribution, or copying of this communication is strictly prohibited.
    >> >> Please notify the sender immediately if you have inadvertently received
    >> >> this message and delete it from your computer system.
    >> >>
    >> >>
This discussion has been closed.