Forum Replies Created
-
AuthorReplies
-
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
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.
April 25, 2023 at 2:36 am in reply to: adt thread with tcl script sends data to sqlite db – blank in db row #120510What 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.
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.
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.
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.
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.September 15, 2020 at 2:44 am in reply to: Writing to MSSQL Database – Best Practice Question #117889We 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.
October 28, 2019 at 3:56 am in reply to: Security concerns with writing to an external URL from Cloverleaf #113397We 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.
October 22, 2019 at 2:42 am in reply to: thread info from clapi: message queue depth and proto error message #113265Sure, 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”;
$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”;
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.
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?
Thank you for the reassurance, i will definitely be using the API then. Must have been fake news.
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?
-
AuthorReplies