Announcement

Collapse
No announcement yet.

db source on update when errors occur

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • db source on update when errors occur

    Hi,

    First of all, I must say this product is looking great - in a relatively short time I have a decent HL7 2.4 ADT from a custom XML.

    For a db reader source I have the following SQL which works fine

    select message_id, contents from messages where state = 'P'


    Right now I have a 'Run on update statement' which has the following

    update messages set state= 'U' where message_id = ${message_id}


    That works fine, is it possible though to set the state to 'E' and store the error message in the database, so

    update messages set state = 'E', error_message = ${error} where message_id = ${message_id}


    This would allow me to have various reports, views etc from the applications messages table

    thanks!


  • #2
    Re: db source on update when errors occur

    You can do this with a Javascript on-update statement. You can check the responseMap value and see if there is an error and execute either update based on that.

    -Chris
    Chris Lang

    Comment

    Working...
    X