Forum Replies Created
-
AuthorReplies
-
Jim and Charlie – as always thanks for your responses and suggestions! So coming back the next day with a clearer head and not overcomplicating it, in the screen shot is what I needed to get this working:
– in the source I used the MSH.7 for the message date time and set the format
– in the PreProc is the TCL proc that takes the Source date and changes it to the last day of the month and the copied into the destination field.- This reply was modified 3 years ago by Jerry Magrann.
Attachments:
You must be logged in to view attached files.Here is the Proc, I’m not sure how to call the Args from it in the source:
proc acXlte_GetLastDateOfMonth { args } {
upvar xlateId xlateId \
xlateInList xlateInList \
xlateInTypes xlateInTypes \
xlateInVals xlateInVals \
xlateOutList xlateOutList \
xlateOutTypes xlateOutTypes \
xlateOutVals xlateOutValsac_Puts “i” “<<PROC acXlte_GetLastDateOfMonth>> args: $args xlateInVals: $xlateInVals” $xlateId
set dateInSeconds [lindex $xlateInVals 0]
set inDateFormat [lindex $xlateInVals 1]
set outDateFormat [lindex $xlateInVals 2]set lastDateOfMonth [ac_GetLastDateOfMonth $dateInSeconds $inDateFormat $outDateFormat]
ac_Puts “i” “lastDateOfMonth: $lastDateOfMonth”
set xlateOutVals “{$lastDateOfMonth}”
ac_Puts “i” “xlateOutVals: $xlateOutVals” $xlateId
}- This reply was modified 3 years ago by Jerry Magrann.
Thanks Jim – I’m still having a block on how to enter the args in the source. if the args in the Proc are:
set dateInSeconds [lindex $xlateInVals 0]
set inDateFormat [lindex $xlateInVals 1]
set outDateFormat [lindex $xlateInVals 2]My source would be:
@date
arg?
arg?and then it hits the Proc to get the last day of the month?
Thanks – opening a ticket and see what they say.
To update everyone – the issue is resolved, there was a developer in training that had an instance of the configurator and script editor open that did not realize it. When I added a new proc and ran the mktclindex command through my code editor and command line, it must have thrown the tclIndex file off. Once we closed those instances and ran the command again, everything was available in the GUI again.
All permissions are good – same as other sites where the issue is not there, tried saving from the IDE editor and still no luck. Jim – thanks for the reply – I am using that as well.
Keith – Many Thanks! I got it working and with your explanation understand a lot better how regexp works and seeing it in action with the match and expressions – I’ve never used the match and output to a variable like that before, but I’m sure to use it many times over now.
Again, many thanks!
Jerry
I have my code searching to find the expression as:
if {[regexp {The patient was seen on:s+(d{2}[A-Za-z]{3}d{4}s+d{2}:d{2})} $obx_5] == 1} {
set seen_flag 1
}
This gives me the flag indicator that the expression is there to make other changes such as changing other fields in the message, but I’m not sure how to grab the string of the actual expression with the date.
OK, I’m almost there, the light bulb in my brain is dim, but at least it’s on now. I have finding the string with the regexp, but I’m not able to dump the string into a variable or output the way you did declaring the date – thoughts?
Keith – I see what you’re trying to do, and I’ll admit I don’t use regexp that much, so I’m think I’m having trouble with the command – here is more of where I have to look for the string: wpparid0EplainEf1Efs23 The patient was seen on: 21Sep2014 13:52.EparX00\Ewpparid0EplainEf1
How should I set my variable and then output the string?[/b]
I’ve been trying to use string, but I can’t seem to figure it out to pull the 12 characters after finding the expression. Here are my variables:
set seen “The patient was seen on:”
set match [string range $seen end 12]
I find the expression “The patient was seen on:”, but the match to get the characters with the date after doesn’t pick the characters / date up.
Thanks – I’ve been hacking away trying to get something nice and clean out of the 5.8 NetConfig, but so far no luck – I’ll see what your procs have and if I get something working will repost here.
Thanks again!
Vince – Thank you for your response and an interesting one it was in regards to the additional engine required. We are having technical reviews with both vendors in the coming week and it will be something to discuss.
already tried the hcimsiutil way and where it gets to thread level, I need process level. I have too many threads to go through each one and do the numbers that way.
Charlie, you got it right – I got the file open, the data extracted, but friendly LFs instead of the HL7 necessary CRs after each segment. Without editing the tcl library like you suggested, to do it in coding, use a split to append the CR?
-
AuthorReplies