| 1 | RAHLROUT ;HIRMFO/CRT - Rad/Nuc Med HL7 Interfaces Routing Logic
|
---|
| 2 | ;;5.0;Radiology/Nuclear Medicine;**25**;Mar 16, 1998
|
---|
| 3 | ;
|
---|
| 4 | RADIV ; Get the Division from the HL7 message, Piece 3 of Piece 21 of OBR.
|
---|
| 5 | ;
|
---|
| 6 | N I,J,RAPC,RAHLAPP
|
---|
| 7 | S RADVSN=0,RAPC=21
|
---|
| 8 | F I=1:1 X HLNEXT Q:HLQUIT'>0 D Q:RADVSN
|
---|
| 9 | .Q:$P(HLNODE,HL("FS"))'="OBR"
|
---|
| 10 | .I $L(HLNODE,HL("FS"))'<RAPC D
|
---|
| 11 | ..N X
|
---|
| 12 | ..S X=$P(HLNODE,HL("FS"),RAPC)
|
---|
| 13 | ..D FORMAT^RAHLTCPB
|
---|
| 14 | ..S RADVSN=$P(X,$E(HL("ECH")),3)
|
---|
| 15 | .I $L(HLNODE,HL("FS"))<RAPC D
|
---|
| 16 | ..S RAPC=RAPC+1-$L(HLNODE,HL("FS"))
|
---|
| 17 | ..S J=0 F S J=$O(HLNODE(J)) Q:'J Q:$L(HLNODE(J),HL("FS"))'<RAPC D
|
---|
| 18 | ...S RAPC=RAPC+1-$L(HLNODE(J),HL("FS"))
|
---|
| 19 | ..N X
|
---|
| 20 | ..S X=$P(HLNODE(J),HL("FS"),RAPC)
|
---|
| 21 | ..D FORMAT^RAHLTCPB
|
---|
| 22 | ..S RADVSN=$P(X,$E(HL("ECH")),3)
|
---|
| 23 | ;
|
---|
| 24 | RAHLL ; Check field .129 in Division File #79 for specific interfaces.
|
---|
| 25 | ;
|
---|
| 26 | ; If Receiving App listed as interface for this division, set and quit.
|
---|
| 27 | ;
|
---|
| 28 | S RAHLAPP=$P($G(^ORD(101,+HL("EIDS"),770)),"^",2)
|
---|
| 29 | Q:'RAHLAPP
|
---|
| 30 | I $D(^RA(79,+RADVSN,"HL7","B",+RAHLAPP)) D LINK(HL("EIDS")) Q
|
---|
| 31 | ;
|
---|
| 32 | ; Otherwise just QUIT, no message will be created for this SUBSCRIBER.
|
---|
| 33 | Q
|
---|
| 34 | ;
|
---|
| 35 | LINK(IEN) ; Return LINK information for subscriber
|
---|
| 36 | ; INPUT - IEN: IEN of protocol file
|
---|
| 37 | ; OUTPUT - SUBSCRIBER PROTOCOL^LOGICAL LINK in HLL("LINKS",1)
|
---|
| 38 | ;
|
---|
| 39 | S IEN=$G(IEN) Q:(IEN="")
|
---|
| 40 | ;
|
---|
| 41 | ; Make sure this is a subscriber type
|
---|
| 42 | Q:$P($G(^ORD(101,IEN,0)),"^",4)'="S"
|
---|
| 43 | ;
|
---|
| 44 | S HLL("LINKS",1)=$P(^ORD(101,IEN,0),"^")_"^"_$P($G(^HLCS(870,+$P(^ORD(101,IEN,770),"^",7),0)),"^")
|
---|
| 45 | Q
|
---|