Originally posted by Eric Sligh
I am trying to add the PV1-3.4 into an ADT message using tcl. We currently have no Xlates or Variants on this site and I inherited this architecture so given the time constraints I have no choice but to do it in tcl.
Here is where we build the segments:
foreach seg $msg {
set fields [split $seg |]
set type [csubstr $seg 0 3]
switch -exact -- $type {
Then each segment is listed for the message.
Here is the code where the PV1 Segment is being built:
PV1 {
# Assigned patient location
# .1 Nurse .2 Station/Point of care, .3 Room, .4 Bed,
# .5 facility, .6 location status, .7person location type,
# .8 building, .9 floor, .10 location description
set pv1_3 [lindex $fields 3]
set bed [lindex [split $pv1_3 $sub_sep] 2]
What do I need to add to make the PV1-3.4 populate this message after hitting this proc? I need to put an "A" in as the value.
Something like:
set facility [lindex [split $pv1_3 $sub_sep] 3]
Any helped is greatly appreciated.
Eric