JSON Acknowledgement Script

Clovertech Forums Cloverleaf JSON Acknowledgement Script

Tagged: 

  • Creator
    Topic
  • #119424
    David Speare
    Participant

      Does anyone have a json acknowledgment script they are using that they would be kind enough to share?

    Viewing 2 reply threads
    • Author
      Replies
      • #119425

        proc tps_bounce_response_json { args } {
        set module tps_bounce_response_json
        set debug 0
        keylget args MODE mode
        set dispList {}

        switch -exact — $mode {
        start {}

        run {
        keylget args MSGID mh
        set userData [msgmetaget $mh USERDATA]
        set requestInfo [keylget userData httpRequestInfo]
        set requestPath [keylget requestInfo “path”]
        set httpResponseHeaders {}

        set response {
        {
        “response”: “Success”
        }
        }

        set mhReply [msgcreate -class protocol -recover -type reply $response]
        set driverCtl [msgmetaget $mh DRIVERCTL]
        msgmetaset $mhReply DRIVERCTL $driverCtl
        set userData {}
        keylset userData httpResponseHeaders $httpResponseHeaders
        msgmetaset $mhReply USERDATA $userData
        lappend dispList “OVER $mhReply” “CONTINUE $mh”
        }

        time {}
        shutdown {}
        }

        return $dispList
        }

        -- Max Drown (Infor)

        • #121579
          Mahmoud Ihaddadene
          Participant

            Hi,

            I’m looking for a tcl script to convert HL7 2.3 ADT transactions to JSON.

            Thanks in advance

            Mahmoud

             

             

          • #121593
            David Barr
            Participant

              It depends on what kind of conversion you’re looking for. For example, our state department of health wants to receive HL7 in the body of an HTTPS POST request. The raw HL7 message contents are wrapped in a simple JSON object. I can send you this code if that’s what you need. If you need to translate the message field by field into JSON, then I agree with Robert.

            • #121599
              Mahmoud Ihaddadene
              Participant

                Hi David,

                I’m looking for a curl tcl script to :

                1 -initiate a POST Token APIĀ  jasonĀ  Authorization: Bearer token

                2- Add Patient using POST to jason API when i get the Token

                Thanks

            • #121580
              Robert Kersemakers
              Participant

                Better/easier to use translations for this.

                Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

              • #121594
                Mahmoud Ihaddadene
                Participant

                  Hi

                  I’m developing for a first time an interface to send ADT to Jason API.

                  How can i configure my thread to do the following steps:

                  1-New Token Path/oauth/token

                  Request Method POST Headers

                  Content-Type: application/json

                  2-Add Patient Path /endpoint/patients/

                  Request Method POST

                  Headers Content-Type: application/json

                  Authorization: Bearer oauth_access_token

                  Description Use this method to add eligibility data for a new patient

                  3-Update Patient Path /endpoint/patients/id

                  Request Method PATCH

                  Headers Content-Type: application/json

                  Authorization: Bearer oauth_access_token

                  Description Use this method to update eligibility data for an existing patient

                  Thank you in advance.

                  Best Regards,

                  Mahmoud

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