adt thread with tcl script sends data to sqlite db – blank in db row

Homepage Clovertech Forums Cloverleaf adt thread with tcl script sends data to sqlite db – blank in db row

  • Creator
    Topic
  • #120508
    Bobby Harris
    Participant

    Thank you for this valuable resource!

    GOAL:I am creating an interface that will write a medical record number and the ADT message to a sqlite DB. It consist of a server thread that sends outbound to the database outbound thread and a tcl script that extracts the medical record number.

    PROBLEM: A new row is written to the database as ” | “. Meaning, no column data is written.
    Any insight as to why the data from the tcl script is not being set to the DB
    and blank rows are being populated in the database.
    DETAILS:
    – The inbound is a server thread that sends the ADT message to the sqlite outbound thread.
    – The inbound thread has a tcl script that extracts the medical record number.
    – The same tcl script performs a:
    — msgset $mh “$medical_record_number|$entire_msg\r”
    — lappend dispList “CONTINUE $mh”
    — return $dispList
    – Script Testing shows the variables contain information at the msgset point.

    The Database Outbound Protocol Properties has a Content sql statement as:
    INSERT INTO Table_ADT(mrn,full_msg) Values (<mrn>,<full_msg>)

Viewing 0 reply threads
  • Author
    Replies
    • #120510
      Arie Klop
      Participant

      What is the setup of your translation and database thread?

      You should have an xlate for the data to your database thread. Maybe you don’t need one,  i haven’t tried it, but then i expect you should have a comma between the fields, instead of a pipe.

      When i look at my smat for outbound db threads, it always shows a comma as field separator, like 1563,entire message.

      If you do have everything in order, have a look at the check “use cached pre-xlated message as whole message” in your database thread.

      Lastly: are you sure you can only get one message per mrn? i would expect you need multiple. Perhaps add a datetime or msgctrlid column would help you.

       

       

      • #120512
        Bobby Harris
        Participant

        Thank you for responding.

        I did not receive the typical notification from Clovertech.

        I am not using an xlate. I THOUGHT I could use just add  a typical tcl script to the initial thread and have that tcl script provide the appropriate information to the sqllite database thread.

        I will try using a comma.

        I saw the whole message option, but did not try it. I will try it.

        Not sure I understand you last paragraph.

         

Viewing 0 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10