Forum Replies Created
-
AuthorReplies
-
Yes. It’s a custom piece of software from our Dutch reseller, so I can’t share it here. It is built for Cloverleaf to simplify some difficult tasks, such as cycle saving al SMATs in one go, clean up sites, restart daemons/processes/threads etc.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
You are right when you say you can’t set retention on a global level: you will always have to do it per site. With the options provided in Network Configurator through Options/Site Preferences… tab SMAT, you can also delete SMAT history files when they are older than X days. This could work for most of our sites.
However, we have always worked with a ‘weekly_housekeeping’ crontab script to cyclesave all SMATs for all sites/processes and delete old SMAT files. And we save all inbound DFT SMAT for 2 years, so with this script we can differentiate the retention time between processes/threads.
Here is our current weekly_housekeeping script. Please don’t ask about the ‘sitecontrol’ command: this is software provided by our Dutch reseller and we can’t disclose it. Basically it allows us to cyclesave the SMATs of all processes and threads within a site with one command.
#!/bin/sh
umask 000
# redirect stdout/stderr to a file
exec &> /cldata/scripts/weekly_housekeeping_cloverleaf.log
#
# load function for execution in cron
FPATH=${CL_INSTALL_DIR}/integrator/kshlib; export FPATH
. $FPATH/setroot
. $FPATH/setsite#
# Functie voor het verwijderen op leeftijd van alle *ecd en *smatdb bestanden uit een (list van) processen
# in de site die op dat moment actief is.
# Hierbij moeten een aantal argumenten worden opgegeven:
# 1 – de leeftijd in dagen waarop smats worden verwijderd. De *ecd en *smatdb bestanden worden verwijderd.
# 2 – komma-gescheiden lijst van processen waarin smats worden verwijderd. De processen moeten in de huidige site voorkomen!
#
function remove_smat_age ()
{
echo “Remove SMAT with age $1 in processes $2”
for process in ${2//,/ }
do
#echo “process: ${process}”
find ${HCISITEDIR}/exec/processes/${process} -name “*.smatdb” -mtime +$1 -exec rm -f {} \;
find ${HCISITEDIR}/exec/processes/${process} -name “*.ecd” -mtime +$1 -exec rm -f {} \;
done
}#
# Functie voor het verwijderen op leeftijd van alle *ecd en *smatdb bestanden uit een (list van) threads
# binnen een proces in de site die op dat moment actief is.
# Hierbij moeten een aantal argumenten worden opgegeven:
# 1 – de leeftijd in dagen waarop smats worden verwijderd. De *ecd en *smatdb bestanden worden verwijderd.
# 2 – proces waar de threads in hangen
# 3 – komma-gescheiden lijst van threads (namen van de smats eigenlijk) waarvan smats worden verwijderd. De processen en threads moeten in de huidige site voorkomen!
#
function remove_smat_age_thread ()
{
echo “Remove SMAT with age $1 in proces $2 from threads $3”
for thread in ${3//,/ }
do
find ${HCISITEDIR}/exec/processes/$2 -name “${thread}*.smatdb” -mtime +$1 -exec rm -f {} \;
find ${HCISITEDIR}/exec/processes/$2 -name “${thread}*.ecd” -mtime +$1 -exec rm -f {} \;
done
}#
# Functie voor het opschonen van de huidige site.
# Gaat om de huidige site; hier gaat de functie vanuit.
# Diverse zaken per site regelen:
# * Verouderde ECD bestanden verwijderen
# * Tellers op nul zetten
#
function clean_current_site ()
{# Cycle SMAT van deze site
sitecontrol cycle –smat# Verouderde .ecd-bestanden verwijderen uit de hele processes-tree
find ${HCISITEDIR}/exec/processes -name “*.ecd” -mtime +100 -exec rm -f {} \;# Verouderde error bestanden verwijderen uit de /exec/errors map
find ${HCISITEDIR}/exec/errors -mtime +100 -exec rm -f {} \;# Alle tellers op nul zetten
# Gebruik optie -X ipv -Z om alle tijden (laatst ontvangen/verstuurd bericht) ongemoeid te laten
hcimsiutil -X}
################################################################################################
###
### Start van de weekly housekeeping
###
################################################################################################# Housekeeping: dit script dient elke 7 dagen gedraaid te worden!
# Dient te draaien onder user ‘hci’; ivm rechten en paden!
tijdnu=date "+%d-%m-%Y %H:%M:%S"
echo “Start time script: $tijdnu”date=date "+%Y%m%d_%H%M"
# Allereerst worden per proces alle smat-files gecycled: dit doen we met één
# sitecontrol commanda; dit commando doet per site een cycle smat van alle (!)
# threads van alle processes binnen die thread.
# Later gaan we dan kijken of we smats per site/proces na bepaalde tijd gaan verwijderen. Je kunt
# dit via de ‘Site Preferences/SMAT’ ook instellen, maar dat geldt dan voor de gehele site.
# Met name voor DFT willen we de smats langer bewaren, dus met name voor die site moeten we iets apart doen.
#
# 25-11-2024 Omdat het SMAT cycle commando afbreekt op lege sites (en die hebben we nu nog) verplaats
# ik dit commando naar de functie toe. Hierdoor breekt het commando af bij lege site, maar bij andere
# sites werkt het dan wel.#sitecontrol cycle -a -s
################################################################################################
###
### hixin
###
################################################################################################
setsite hixin# Opschonen van de huidige site
clean_current_siteremove_smat_age 90 adt_hix,adt1,adt2,adtdmz,mfn,siu
################################################################################################
###
### hixout
###
################################################################################################
setsite hixout# Opschonen van de huidige site
clean_current_siteremove_smat_age 730 dft
remove_smat_age 90 oru,politheek_ezorg,politheek_h,politheek_s,siu,vecozo,zm2hix_lsdv,zm_lsdv,zorgdomein
remove_smat_age 14 qry
#remove_smat_age_thread 365 dft hix_dft################################################################################################
###
### functie
###
################################################################################################
setsite functie# Opschonen van de huidige site
clean_current_siteremove_smat_age 90 car,clinical,knf,kno,long,mbv,mitralis,oog,orm_functie,uro
#remove_smat_age 45 oru_gen,oru_gen2
#remove_smat_age_thread 5 oru_gen pi_qry_patnr
#remove_smat_age_thread 5 oru_gen2 pi_qry_patnr
#remove_smat_age_thread 5 uitslagen delay_pihcm_kch################################################################################################
###
### lab
###
################################################################################################
setsite lab# Opschonen van de huidige site
clean_current_siteremove_smat_age 90 bloed,glims,lab2lab_in,lab2lab_out,lms,order_lab,oul
#remove_smat_age_thread 5 transport leftclick_api################################################################################################
###
### overig
###
################################################################################################
setsite overig# Opschonen van de huidige site
clean_current_siteremove_smat_age 90 csa_miele,csa_mmm_ac,csa_mmm_wash,csa_pmt,csa_steris,csa_sterrad,ediin,ediout,fico_grootboek,hr,mm_dff,mm,transport,zm_peridos
#remove_smat_age_thread 5 transport leftclick_api# Wekelijks bouncen van processen transport en hr
#/cldata/scripts/bounce_process transport
#/cldata/scripts/bounce_process transport2
#/cldata/scripts/bounce_process hr################################################################################################
###
### Rest van de weekly housekeeping
###
################################################################################################
# Switch voor alle zekerheid weer terug naar de hixin site.
setsite hixin# In /opt/cloverleaf/cis19.1/integrator/temp worden tijdelijke bestanden aangelegd;
# dit is voor het herzenden van berichten nodig. Deze worden verwijderd.
rm /opt/cloverleaf/cis19.1/integrator/temp/tmp*
# Cycle de log voor het verwijderen van Studytube bestanden
#mv /cldata/scripts/studytube_remove_files.log /cldata/scripts/studytube_remove_files.log.old
# Cycle de ‘check_errors’ log
mv /cldata/scripts/check_errors.log /cldata/scripts/check_errors.log.old
# Cycle de ‘check_certificate_ezorg’ log
mv /cldata/scripts/check_certificate_ezorg.log /cldata/scripts/check_certificate_ezorg.log.old
# Cycle de ‘mail_vs30_duplicate_messages’ log
mv /cldata/scripts/log/mail_vs30_duplicate_messages.log /cldata/scripts/log/mail_vs30_duplicate_messages.log.oldtijdnu=date "+%d-%m-%Y %H:%M:%S"
echo “End time script: $tijdnu”Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
Your error log showed: Unexpected character ‘M’ (code 77) in prolog; expected ‘<‘.
So I assumed you were sending a real HL7 message (starting with MSH) through java/ws-client. Are you sure the XML wrapper works? It’s not standard functionality, as far as I know.You could at least try the rawclient to see if it gives you a better result. We mostly use rawclient.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
Rodney, you are trying to send an HL7 message with java/ws-client; this protocol expects an XML message. I think you need to use either java/ws-rawclient or http-client to send HL7 messages over a webservice. The http-client is easier to setup, just don’t forget to put set Driver Mode on ‘Message Driven’ and set script ‘httpQuery’ in Query TPS.
About the key: you need to ask the receiving application how they want to receive this key. Could be X-API-KEY or X-functions-key. You can then add the key to Headers as a keyed list, something like this:
{Content-Type “text/plain; charset=utf-8”} {X-functions-key “<put your key here>”}Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
We also have a retention of 90 days, with some exceptions. QRY messages we save for 14 days, while we save DFT messages for 2 years. We have had several times that we were asked about DFT messages from the year before, so we extended that retention.
We keep all our SMATDB files in their usual place: under their process or under Smathistory. No offsite archive. Currently we have about 30oGB of data saved.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
We are nowhere near the size of your system, nor for that matter other US hospitals I read about here on the forum. We have only 5 sites with about 10 processes each serving two hospital locations.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
Not in Infor Cloud. We were told our configuration is too big for Infor Cloud.
One of our Cloverleaf clusters runs in the Azure cloud, on RHEL vm’s. Will soon be moving the other Cloverleaf cluster (the DMZ Cloverleaf) to Azure as well.Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
In ‘SSL Configure’ choose Mode ‘ClientAnon’ so all paths are greyed out. You can then choose SSL Protocl ‘TLSv1.3’ (you need CL2022.09 for this; CL19.1 only supports up to TLSv1.2) and then select the required SSL Cipher Suite.
We are getting questions about secure/encrypted HL7 connections for all vendors. I don’t think many vendors can support this though.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
April 2, 2025 at 10:51 am in reply to: How to convert data in xml into array or list using tcl script #121981I would use a ‘list of lists’ for this. Something similar to Jason’s answer but a little bit less complicated.
set orderlist {}
foreach column $result {
lappend orderlist}
You would end up with this orderlist:
{{ORD0029 C628 Proc1} {ORD0030 C628 Proc142} {ORD0049 C638 Proc133} {ORD0089 C700 Proc190}}You could sort this list and ‘foreach’ through it, column by column. Or you could search for a specific entry. If you want the entry for ‘ORD0049’:
echo [lsearch -exact -inline -index 0 $orderlist “ORD0049”]
ORD0049 C638 Proc133Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
We are currently on RHEL 8.10 with CL19.1.2. Test: 4 CPUs and 16 GB RAM; Prod: 8 CPUs and 32 GB RAM.
We also have two RHEL 9.2 environments with CL2022.09.02 in Azure, as we will migrate from SAP to HiX in June 2025. Same specs.In Azure though we started with smaller specs: 2 CPU and 8 GB RAM for Test en 4 CPU and 16 GB RAM for Prod. But Test wasn’t able to start because of the limited resources, so we returned to the specs we have at the moment.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
It is that simple: site name.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
Hi Jim,
To dynamically name the required table, you could use the tcl command ‘hcitbllookup’ and a variable to define the name of the table. Right? That would be a workaround for what you want.
What I would like to see is the ability to load in a complete table at runtime, so you can use both the in and out sides of the table to search for certain values.
A normal TABLE operation will search for a specified value on the ‘in’ side and, if found, return the ‘out’ side value. However sometimes I need/want to use Tables differently. For example on the ‘in’ side I will have lists of several codes: “{A B C} {X Y}” and on the ‘out’ side will be a resulting code, say “R”. If the message contains a code A, B or C AND a code X or Y, then the resulting code will be ‘R’.I got this to work (a long time ago) by loading the complete Table as a variable:
<pre>set recid “Combination_codes.tbl”
TioReset $recid
TioLoad $recid Combination_codes.tbl</pre>
Not sure how long this solution will keep on working. For example it doesn’t work if the specified Table isn’t in the site of the running process, but in the Master site; this method doen’t work with master sites.Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
Great to see this forum back online. I hope the search capabilities will improve because finding something is a pita.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
Better/easier to use translations for this.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
This link has some useful things to check. https://stackoverflow.com/questions/22566433/http-415-unsupported-media-type-error-with-json
- Change Content-Type: application/json; charset=utf-8
into Content-Type: application/json;charset=utf-8
so without the space before charset. - Change Content-Type: application/json; charset=utf-8
into Content-Type: application/json
so no charset at all - You get a different Accept content-type than the content-type you send. You can define the Accept content-type by adding header “Accept: application/json”.
Hope this helps.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands
- Change Content-Type: application/json; charset=utf-8
-
AuthorReplies