How to send data to Cloverleaf

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How to send data to Cloverleaf

  • Creator
    Topic
  • #51756
    Garrett Fletcher
    Participant

      Hi,

      A developer here is trying to send HL7 messages to our Cloverleaf server. I set up thread to listen on a port using the mlp_tcp.pdl driver.

      When he tries to send to the port, I see the connection go ‘up’, but I dont get any data.

      How does he have to format his message to get the thread to take the message?

      Thank you,

      Garrett

    Viewing 8 reply threads
    • Author
      Replies
      • #71625
        Rob Abbott
        Keymaster

          He needs to send the MLLP start and end block characters.

          (data)

          Rob Abbott
          Cloverleaf Emeritus

        • #71626
          Kevan Riley
          Participant

            I have found it useful in a case like this to create an Engine Output Alias, I call mine ‘pdl_info0’.  It contains this:

             ENABLE pdl pdl BDUG 0

            This is then setup on the thread properties for the connection you are working with, and will enable you to see every character coming in and its Hex value which enables you to see the unprintable characters like the MLLP encoding characters.  Initially, the extra stuff in the engine log might look confusing.  Just take you time going through it.

            You should also look out for errors (or warnings) with the verbiage “no more phrases to try”.  This is a sign that the MLLP encoding you are receiving is not correct.  “No more phrases to try” is the PDL driver indicating that it did not find the or the or .

          • #71627
            Garrett Fletcher
            Participant

              Thank you Both. I Emiailed my Developer to add the begining and end characters to the message.

              Keavan, I am setting up this EO Alias, and I have some questions because I have never worked with these before. I got the EO Alias all set, but I need to know where to put it. Do you apply yours to the process, thread, or inbound message on the thread? I read the documentation for the OE Config, and it doesnt really explain where to put the Alias. Also, where do you go to look at the output for the Alias? Is it just logged in the Process Output?

              Thanks,

              Garrett

            • #71628
              Kevan Riley
              Participant

                On the “Thread” tab of the connection properties lower left below “File:” is “Msg EO Config:”.  Put it there.  You don’t really need this at the process level since you just care about the protocol information.  So this is thread/connection level.

                One more note, make sure you remember to clear setting out once you have the connection working.  As you will see, it generates a lot of stuff in the log file.  You wouldn’t want all that stuff in there unless you were specifically diagnosing a problem.

              • #71629
                Kevan Riley
                Participant

                  You can also enable it from the command line if you have backend access.  After doing the setroot, setsite:

                  hcicmd -p PROCESS -c ‘CONN eo_alias enable_pdl’

                  Where

                  PROCESS is the process the connection/thread is in

                  CONN is the thread/connection name

                  This assumes you  named your EO alias “enable_pdl”, if you named yours something different you will need to adjust the last argument accordingly.

                  Note:

                  This will not “stick”.  Once you restart the thread it will go back to whatever is set in the thread properties.  Whereas, if you put the setting in the thread properties, it will be “on” for you whenever you restart the thread until you remove it via the NetConfig.

                  (PS to unset the eoalias from the command line use this:

                  hcicmd -p PROCESS -c ‘CONN eo_alias {}’

                  or just bounce the thread if it is not setup in the thread properties.

                  )

                • #71630
                  Garrett Fletcher
                  Participant

                    Ok thanks. And will this info show up in the process log?

                    G

                  • #71631
                    Kevan Riley
                    Participant

                      Yes.

                    • #71632
                      Garrett Fletcher
                      Participant

                        Great. Thank you.

                        G

                      • #71633
                        Jim Kosloskey
                        Participant

                          Garrett,

                          Something I do on all new tcp/ip connections BEFORE I build anything in Cloverleaf is to use hcitcptest (command line).

                          With that I can make sure we connect as well as see exactly what is being sent (assuming I am acting as a server) and know imeediately if there will be an issue.

                          If I am the client, not only do I want to see if we connect but I also want to see what kind of acknowledgment is sent (if any) so I just type in ‘junk’ – that should get me an acknowledgment even if it is a negative acknowledgment.

                          Saves me a lot of time.

                          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

                      Viewing 8 reply threads
                      • The forum ‘Cloverleaf’ is closed to new topics and replies.