Arie Klop

Forum Replies Created

Viewing 13 replies – 1 through 13 (of 13 total)
  • Author
    Replies
  • in reply to: Add Read_ONLY option to DB connection string #120730
    Arie Klop
    Participant

      because wordpress won’t show the full url, here its pasted broken up by the semicolon:

      jdbc:sqlserver://SQLservername:1433;
      DatabaseName=DB;
      ApplicationIntent=ReadOnly;

      This should be one single string without line breaks when you fill it in in Cloverleaf

      in reply to: Add Read_ONLY option to DB connection string #120725
      Arie Klop
      Participant

        If you mean the sql server (secondary) readonly node, you can use ‘ApplicationIntent=ReadOnly’ in your db connection.

        Like so:
        jdbc:sqlserver://SQLservername:1433;DatabaseName=DB;ApplicationIntent=ReadOnly;

        I only used this in a Java UPOC, but it should work in your regular JDBC thread as well.

        • This reply was modified 1 year, 4 months ago by Arie Klop. Reason: jdbc url not fully visible
        • This reply was modified 1 year, 4 months ago by Arie Klop.
        • This reply was modified 1 year, 4 months ago by Arie Klop.
        • This reply was modified 1 year, 4 months ago by Arie Klop.
        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.

           

           

          in reply to: SFTP upload options #120338
          Arie Klop
          Participant

            Do you have a source thread where you get the message from or want to upload from a directory?

            If you have a source thread where you get the messages from you can leave the directory empty. I did and it works fine in my case.

            But seriously, try filling the local binding address with the ip you are coming from, not 127.0.0.1.  Not sure why but it only works when i fill that.

            in reply to: SFTP upload options #120321
            Arie Klop
            Participant

              I see you did not specify a local binding address, that is a mandatory field. It won’t work without it.

              It should be the dns name of your local server/cluster.  We have defined a global variable for this $$BINDING_ADDRESS so that we only have to change it once per site.

              Also: not sure if you want active mode, i don’t use it.

              • This reply was modified 1 year, 10 months ago by Arie Klop.
              in reply to: SFTP upload options #120287
              Arie Klop
              Participant

                My guess would be that WinSCP automatically redirects you to a home directory and you don’t see the full path.  As the sftp fileset does not have that possibility, you would need to find out the full path. Or you could try what happens if you remove the first slash from your path and see what happens.

                in reply to: SFTP upload options #120281
                Arie Klop
                Participant

                  What a coincidence, i have just been breaking my head about the sftp options.

                  The fields are very non descriptive and the documentation says nothing about what to fill in where.

                  I have a working config now, see screenprint. I think the tric is to use the full pathname and dont fill in any field you don’t need (that was my mistake).

                  If you don’t have the ssl licence, you will be notified in the process log.

                  Attachments:
                  You must be logged in to view attached files.
                  in reply to: Writing to MSSQL Database – Best Practice Question #117889
                  Arie Klop
                  Participant

                    We have a couple of threads writing to database, some via a stored procedure and some via db insert.

                    It works fine, but is kind of a memory hog. Performance is good though, with a couple of messages per second.

                    We got the recommendation to keep each database thread in it’s own process. I have multiple tcp threads writing to the same db thread, so we created a tcp thread with a db thread in one process and let the other threads provide the messages via tcp. (HL7)

                    The important thing to remember is that there is one java virtual machine per site (actually per translation thread).

                    Also don’t forget to load the right (recent) sqlsrv drivers.

                    We have xlates translating from hl7 to database schema, so create a connection via site preferences and import the schema. Then write the xlate.

                    I have a small tcl to replace , with ; before the xlate because , is the field separator and if there is a , in your content the db write will fail.

                    I am thinking of using a separate Java program or REST service to write to database with a connection pool because of the memory footprint.

                    Arie Klop
                    Participant

                      We used to have a policy saying you need a VPN for sending data outside the hospital, but nowadays we have a policy of VPN or TLS >= 1.2. Data is just as encrypted between the two.

                      We also use SOAP to transfer data to another party, via a url. This is  no different. FHIR works the same.

                      There are two mayor issues: 1 are  you sure you are (still) posting to the right party and 2 are your data being sent secure, or is it possible to eavesdrop.

                      These concerns can be addressed by making sure you use TLS (https) and enforcing a valid certificate with an expiration date not to far in the future (2 years?). By doing so you also solve the problem of losing sight of a data target and having it being sent elsewhere.

                      I would advise to not send every patient, but only those really needed. And only the info they really need. ADT is a protocol from a time when all receivers needed all patient info from all patients. That is seldomly the case nowadays. Privacy by design is really important IMO.

                      Arie Klop
                      Participant

                        Sure, no problem. I have created a small function execCLAPICmd which executes an http request. As you can see, it always uses http POST. It’s exceedingly simple.

                        <?php

                        $authhash = base64_encode(“user:password”);

                        $headers = array(“Authorization: Basic $authhash”);
                        $site = “sitename”;
                        $process = “processname”;
                        $thread = “threadname”;
                        $server = “ourserver.ourdomain.com”;

                        $cmd = “clapi/api/site/$site/command/process/$process/thread/$thread/start”;

                        $result = execCLAPICmd($server, 15037, $headers, $cmd);
                        $result = json_decode($result);
                        $result = $result->$thread;

                        echo “status thread: $thread: {$result->state}<br/>”;

                        var_dump($result); //dump rest of the result object

                        function execCLAPICmd($hostname, $port, $headers, $cmd) {

                        //first get xcsrf token

                        $xcsrf_token_url = “https://$hostname:$port/clapi/api/security/csrf&#8221;;
                        $ch = curl_init($xcsrf_token_url);

                        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
                        $cookiefile = ‘/tmp/curl-session’; //must be valid directory!
                        curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
                        curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile);

                        $xcsrf_response = curl_exec($ch);

                        $xcsrf_response_err = curl_error($ch);

                        if(! empty($xcsrf_response_err)) {
                        $xcsrf_response = $xcsrf_response_err;
                        }

                        $xcsrf_token_obj = json_decode($xcsrf_response);

                        $xcsrf_token = $xcsrf_token_obj->csrf;

                        $headers[] = “X-CSRF-TOKEN: $xcsrf_token”;

                        $url = “https://$hostname:$port/$cmd&#8221;;

                        curl_setopt($ch, CURLOPT_URL, $url);
                        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
                        curl_setopt($ch, CURLOPT_POST, 1);
                        curl_setopt($ch, CURLOPT_HEADER, 0); //set to 1 to also output headers
                        curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);

                        $return = curl_exec($ch);
                        $cerr = curl_error($ch);

                        if(! empty($cerr)) {
                        $return = $cerr;
                        }

                        curl_close($ch);

                        return $return;
                        }

                        ?>

                        • This reply was modified 5 years, 2 months ago by Arie Klop.
                        in reply to: What is CLAPI? is it new for Cloverleaf 6.2? #110283
                        Arie Klop
                        Participant

                          Is there a way to fetch the status report for a thread or a number of threads, including pending messages and Error msg via clapi?

                          in reply to: What is CLAPI? is it new for Cloverleaf 6.2? #109531
                          Arie Klop
                          Participant

                            Thank you for the reassurance, i will definitely be using the API then. Must have been fake news.

                            in reply to: What is CLAPI? is it new for Cloverleaf 6.2? #109483
                            Arie Klop
                            Participant

                              I would really like to use clapi for my monitoring solution. I have heard through the grapevine that the future of this api is in doubt. Can anyone please confirm that i can safely build on it without losing my work in the future?

                            Viewing 13 replies – 1 through 13 (of 13 total)