Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Sub Field breaks
- This topic has 6 replies, 3 voices, and was last updated 13 years, 6 months ago by Jim Kosloskey.
-
CreatorTopic
-
February 16, 2011 at 8:42 pm #52279Chris WetheyParticipant
What is a Tilde (~) within a HL7 record example ||724^^^^^^^99DOC~7777^^^^^^^99DOC||
I know the “|” is field breaks OBR 3.1 to 3.2 but like the example above, is it the subfield break within say OBR 3.3
Thanks
-
CreatorTopic
-
AuthorReplies
-
-
February 16, 2011 at 8:46 pm #73671Robert MilfajtParticipant
A tilde is for repeating fields, i.e., multiple values for a field.
You can think of it as an array, so in your example,
field1(1)=724^^^^^^^99DOC
field1(2)=7777^^^^^^^99DOC
Hope this helps,
Robert Milfajt
Northwestern Medicine
Chicago, IL -
February 16, 2011 at 8:47 pm #73672Jim KosloskeyParticipant
Chris,
Well that depends on what the tilde in the MSH-2 means but typically that is the repeating field separator.
So it means this field for this mesage has multiple occurrences.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
-
March 3, 2011 at 3:59 pm #73673Chris WetheyParticipant
The tilde is the repetitive separator – so when i am performing a lookup using the tblqualify_kill_default within qdx5.5 GUI screen and using this command within the edit of the command for the table view
“”SEGNAME OBR} {FIELDNUM 28} {SUBFIELDNUM 1}”” – would the subfieldnum be the repetitive within that segname so “0” is the first and “1” is the second and so on down the line.
-
March 3, 2011 at 4:04 pm #73674Jim KosloskeyParticipant
Chris,
I don’t recognize that as a Cloverleaf distributed proc so you will probably need to look into that proc to see what it does with those keyed lists (at least they look like they are keyed lists).
If it is a distributed Cloverleaf proc, let me know.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
-
March 3, 2011 at 7:45 pm #73675Chris WetheyParticipant
Jim,
It is a tcl that is part of the install on our server from either mckesson or quovadx.
Here is the coding of that tcl.
######################################################################
# Name: tblqualify
# Purpose: Qualify on a field
# UPoC type: tps
# Args: tps keyedlist containing the following keys:
# MODE run mode (“start”, “run” or “time”)
# MSGID message handle
# ARGS user-supplied arguments:
# TBLNAME Table Lookup name
# ERRCOND Literal that is set as DEFAULT in the table lookup
# SEGNAME Segment to check
# FIELDNUM Field number to check within the segment
# SUBFIELDNUM Subfield to check within the field
#
# Args (Example ENTRY): To qualify on the patient location field (PV1 3):
# the arguments would be:
# {TBLNAME
} {ERRCOND
} {SEGNAME PV1} {FIELDNUM 3} {SUBFIELDNUM 0}
#
# Returns: tps disposition list:
# $CONTINUE
#
proc tblqualify_kill_default { args } {
keylget args MODE mode ;# Fetch mode
set dispList {} ;# Nothing to return
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
}
run {
# ‘run’ mode always has a MSGID; fetch and process it
keylget args MSGID mh
set msg [msgget $mh] ;# Get message
#
# Get arguments
#
set tblname {}
keylget args ARGS.TBLNAME tblname ;# Fetch the table name
set errcond {}
keylget args ARGS.ERRCOND errcond ;# Fetch the error literal
set segname {}
keylget args ARGS.SEGNAME segname ;# Fetch the segment
set fieldnum {}
keylget args ARGS.FIELDNUM fieldnum ;# Fetch the fieldnum
set subfielnum {}
keylget args ARGS.SUBFIELDNUM subfieldnum ;# Fetch the subfieldnum
#
# Split the message and get fields to check
# First set up some constants
#
set sep [csubstr $msg 3 1] ;# HL7 field separator
set sub [csubstr $msg 4 1] ;# HL7 subfield separator
set segments [split $msg r] ;# Get segments
#
# LOOP through and make changes
#
foreach seg $segments {
if [cequal $seg “”] { continue } ;# Just in case
set segtype [csubstr $seg 0 3] ;# segment type
if [cequal $segtype $segname] { ;# MSH?
set fields [split $seg $sep] ;# Fields
set checkfield [lindex $fields $fieldnum] ;# field to check
set subfields [split $checkfield $sub] ;# subfields
set checkvalue [lindex $subfields $subfieldnum]
#
# do table lookup
#
echo “Table=$tblname Value to check=$checkvaluen”
set tblvalue [tbllookup $tblname $checkvalue]
echo “Table value=$tblvaluen”
#
# if the default value is returned, KILL the message”
#
if [cequal $tblvalue $errcond] {
lappend dispList “KILL $mh”
} else {
lappend dispList “CONTINUE $mh”
}
echo “dispList=$dispList”
}
}
}
time {
# Timer-based processing
# N.B.: there may or may not be a MSGID key in args
}
shutdown {
# Doing some clean-up work
}
default {
error “Unknown mode ‘$mode’ in tblqualify”
}
}
return $dispList
}
*******
I need to read the Repetitive information in one of the OBR fields since it could have multiple physician numbers in there and if one of them match’s then i would send the record onto the receiving interface.
-
March 3, 2011 at 7:50 pm #73676Jim KosloskeyParticipant
Chris,
I am betting this is from McKesson.
Anyway from just a cursory glance it appears this proc does not do what you want – so you either need to modify this proc or create a copy with your mods.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
-
-
AuthorReplies
- The forum ‘Cloverleaf’ is closed to new topics and replies.