INTSUT2 ;JPD; 1 Feb 96 09:26; Utility routine
;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
;COPYRIGHT 1991-2000 SAIC
;
Q
CHECK(INDA,DIE,Y,DWSFLD) ;called from post action of 1st screen of
;windowman gallery.
;Input:
; INDA - ien of 4001.1 entry
; DIE - ^DIZ(4001.1,
;Output:
; Y - where to put cursor
; DWSFLD - Array of values for gallery
;
N INIPPO,INBPN,INBPNAP
;Type is Unit test
I $$VAL^DWRA(4001.1,13.02,0,DIE,INDA)="T" S Y="" Q 1
;If logon server and no app server have them get app server
I $$VAL^DWRA(4001.1,18.03,0,DIE,INDA),'$$VAL^DWRA(4001.1,18.04,0,DIE,INDA) D Q 0
.D MSG("You picked a Logon Server but no App Server")
.S Y="18.04"
;If App server and no logon server have them get logon server
I $$VAL^DWRA(4001.1,18.04,0,DIE,INDA),'$$VAL^DWRA(4001.1,18.03,0,DIE,INDA) D Q 0
.D MSG("You picked an App Server but no Logon Server")
.S Y="18.03"
I $$VAL^DWRA(4001.1,13.02,0,DIE,INDA)="U",$$VAL^DWRA(4001.1,6,0,DIE,INDA)="" D Q 0
.D MSG("You must pick a direction. Inbound or Outbound")
.S Y=6
Q 1
GETPORT(INBPN) ;get port - called from INTS
;Input:
; INBPN - ien of background process
N INIPPO,POP
S POP=0,INIPPO=6100 F S INIPPO=INIPPO+$R(15)+10 D Q:POP
.L +^INRHB("RUN","SRVR",INBPN,INIPPO):0 S:$T POP=1
.S ^INRHB("RUN","SRVR",INBPN,INIPPO)=$H
Q INIPPO
PORTULCK(INIPPO) ;current port value changed- called from gallery
;Input:
; INIPPO - port number
N INBPN
S INBPN=+$O(^INTHPC("B","TEST INTERACTIVE",""))
L -^INRHB("RUN","SRVR",INBPN,INIPPO)
Q
LOCKPORT(X) ;Lock port - called from gallery
;Input:
; X - Port number
N INBPN
S INBPN=+$O(^INTHPC("B","TEST INTERACTIVE",""))
L +^INRHB("RUN","SRVR",INBPN,X):0 I '$T D Q
.D MSG("Port is already locked by another user. Pick another one")
.K X
S DIPA("18.02")=X
S ^INRHB("RUN","SRVR",INBPN,X)=$H
Q
TYPECHK(INDA,X,DWDIPA,DWSFLD) ;User sets TYPE field.
;Input:
; INDA - ien of Criteria
; X - Value inserted by user in TYPE field
;Output:
; DWDIPA - sets DIPA
; DWSFLD - Sets value in fields
;
N INBPN,INIPPO,INBPNAP
;called from post action of field 13.02 in windowman gallery
S DWDIPA(13.02,13.02)=""
;If type is changing blank out second screen values
I $D(DWFCHG) F I=13.03,16.01,16.02,16.03,16.05,16.06,16.07,16.08,16.09,16.1,16.11,16.12,17.01,17.02,23.01,17.03,18.01,18.02 S DWSFLD(I)="@"
;
;If type is unsolicited clear query values make uneditable
I $E(X)="U" D
.;make fields display only
.S (DWSFLD(17.03,0),DWSFLD(18.01,0),DWSFLD(18.02,0),DWSFLD(18.03,0),DWSFLD(18.04,0),DWSFLD(13.07,0))=2
.;clear fields
.S DWSFLD(18.03)="^S X=""@""",DWSFLD(18.04)="^S X=""@""",DWSFLD(13.07)="^S X=""@""",DWSFLD(17.03)="^S X=""@""",DWSFLD(18.01)="^S X=""@""",DWSFLD(18.02)="^S X=""@"""
.;make fields editable
.S (DWSFLD(20,0),DWSFLD(6,0))=0
.S INBPN=+$$VAL^DWRA(4001.1,20,1,DIE,INDA)
.;Inbound unsolicited set accept ack transaction type
.I $$VAL^DWRA(4001.1,6,1,DIE,INDA)="I" S DWSFLD(13.01)="HL GIS ACCEPT ACKNOWLEDGEMENT"
.S (DWSFLD(17.03,0),DWSFLD(18.01,0),DWSFLD(18.02,0))=2
.;only continue if change was made to reinitialize
.Q:'$D(DWFCHG)
.;if inbound then set Accept ack Tran type
.I $$VAL^DWRA(4001.1,6,0,DIE,INDA)="I" S DWSFLD(13.01)="HL GIS ACCEPT ACKNOWLEDGEMENT"
.S DWSFLD(13.04)="AL"
.D DEFRHT^INTSUT1(.DWSFLD,+$G(INBPN))
;If query response
I $E(X)="Q" D
.;make background process/Start at process display only and clear them
.S (DWSFLD(20,0),DWSFLD(13.07,0))="2^1"
.S DWSFLD(20)="^S X=""@""",DWSFLD(13.07)="^S X=""@"""
.S DWSFLD(6)="O",DWSFLD(6,0)=2
.S (DWSFLD(18.03,0),DWSFLD(18.04,0))=0
.;only continue if change was made to reinitialize
.Q:'$D(DWFCHG)
.;Accept Transaction Type
.S DWSFLD(13.01)="HL GIS ACCEPT ACKNOWLEDGEMENT"
.;Accept ack condition
.S DWSFLD(13.04)="AL"
.;Query response background process
.S INBPN=+$O(^INTHPC("B","TEST INTERACTIVE",""))
.I $$VAL^DWRA(4001.1,18.01,0,DIE,INDA)="" S DWSFLD(18.01)="127.0.0.1"
.;set port
.S INIPPO=$$VAL^DWRA(4001.1,18.02,0,DIE,INDA)
.S INBPNAP=+$$VAL^DWRA(4001.1,18.04,0,DIE,INDA)
.I INBPNAP,$$VAL^DWRA(4001.1,17.03,0,DIE,INDA)="" S DWSFLD(17.03)=$P($G(^INTHPC(INBPNAP,7)),U,4)
.D DEFRHT^INTSUT1(.DWSFLD,+$G(INBPN))
.;if port not set
.I INIPPO="" S DWSFLD(18.02)="AUTO GENERATE"
.E I INIPPO'="",$E(INIPPO,1,4)'="AUTO" D
..;try locking existing defined port
..L +^INRHB("RUN","SRVR",INBPN,INIPPO):0 I '$T D MSG("Note - Port currently locked by another user")
..L -^INRHB("RUN","SRVR",INBPN,INIPPO)
;Unit test
I $E(X)="T" D
.S (DWSFLD(18.03,0),DWSFLD(18.04,0))=2
.;clear fields
.S (DWSFLD(18.03),DWSFLD(18.04),DWSFLD(6))="^S X=""@"""
.S DWSFLD(20,0)="2^1",DWSFLD(20)="^S X=""@"""
.;start at process required and direction uneditable
.S DWSFLD(13.07,0)=1,DWSFLD(6,0)=2
Q
CLSVCK(X,DWSFLD) ;client server check
;Input:
; X - User input - 0 Client, 1 Server
;Output:
; DWSFLD - Array to set gallery
;
;answer was server
I X=1 S DWSFLD(16.01,0)=2,DWSFLD(16.01)="^S X=""@"""
;answer was client or not answered
I 'X S DWSFLD(16.01,0)=0
Q
MSG(MSG) ;Write message to screen
;Input:
; MSG - message to display
W $$SETXY^%ZTF(0,21),MSG,*7
Q
PRE(INDA,INPRE,INUIF,INARY) ;Pre process
;Input:
; INDA - ien of 4001.1
; INPRE - xecutable pre processing code
; INUIF - Current Universal Interface file ien to be sent next
;Output: INARY("C") = ien - Current UIF ien value to process
; INARY("A",n) = ien - Process UIF at position n in ^UTILITY
; INARY("F") = ien - First UIF entry to process
; INARY("L") = ien - Last UIF entry to process
; INARY("M",n) = Message to display & save in displayman array
; INARY("REF") = 1 Refresh command screen when done
N DIPA,INBPN,INIP,INCHNL,INIP,INDEST,INXDST,INTT
K INARY
D DISPLAY^INTSUT1("Pre Processing")
X INPRE
Q
POSTPRE(INDA,INARY,INEXTUIF,INLASTN,INPOP,INUPDAT) ;Post Pre processing
; Input:
; INARY= "^INTHU" , "^INLHFTSK"
; INARY("C") = ien - Current UIF ien value to process
; INARY("A",n) = ien - Process UIF at position n in ^UTILITY
; INARY("F") = ien - First UIF entry to process
; INARY("L") = ien - Last UIF entry to process
; INARY("M",n) = Message to display & save in displayman array
; INARY("REF") = 1 Refresh command screen when done
; Output: INEXTUIF - Next Universal Interface file entry to process -
; can be set/reset by the programmer
; INLASTN - Last entry in ^UTILITY global processed - can be
; set/reset by the programmer - (should be set if
; it was not set previously)
; INEXTUIF and INLASTN need to be set in or out of the PRE and POST
; in order to process at least one message.
;
N INP
I 'INPOP Q 0
Q:$D(INARY)<10 1
K INUPDAT
I $G(INARY("C"))+$G(INARY("F"))+$G(INARY("L"))+$O(INARY("A","")) S INUPDAT=1
I $G(INARY("REF")) D
.;D CLR^DIJF
.D LSTHDR^INTSTRT(INDA)
.D SCR^INTSUT1(5,17,1)
S:$G(INARY)="" INARY="^INTHU"
D DISPLAY^INTSUT1("POSTPRE Processing")
;current entry to process
I +$G(INARY("C")) S INEXTUIF=+INARY("C")
D MERGE2^INTSUT3(.INARY)
;put entry in first spot
I $D(@(INARY_"(+$G(INARY(""F"")),0)")) D
.S INP=+$O(^UTILITY("INTHU",DUZ,$J,""))
.I INP S INP=INP-".00001"
.S:'INP INP=1
.S ^UTILITY("INTHU",DUZ,$J,INP,INARY("F"))=INARY("F")
;Put entry in last spot
I $D(@(INARY_"(+$G(INARY(""L"")),0)")) D
.S INP=+$O(^UTILITY("INTHU",DUZ,$J,""),-1)
.S ^UTILITY("INTHU",DUZ,$J,INP,INARY("L"))=INARY("L")
I '$L($G(INLASTN)),$D(INUPDAT) D
.S INLASTN=$O(^UTILITY("INTHU",DUZ,$J,""))
.I '$L($G(INEXTUIF)) S INEXTUIF=$O(^UTILITY("INTHU",DUZ,$J,+INLASTN,""))
;put messages in displayman array
S INP=""
F S INP=$O(INARY("M",INP)) Q:'INP D DISPLAY^INTSUT1(INARY("M",INP),INEXPAND)
K INARY
;Update Multiple
D UPDTFRUT^INTSUT3(INDA)
Q 1
POST(INDA,INEXTUIF,INARY) ;Post process
;Input:
; INDA - ien of 4001.1
; INEXTUIF - next UIF ien to transmit
; Input: INARY("C") = ien - Current UIF ien value to process
; INARY("A",n) = ien - Process UIF at position n in ^UTILITY
; INARY("F") = ien - First UIF entry to process
; INARY("L") = ien - Last UIF entry to process
; INARY("M",n) = "Message to display & save in displayman array
; INARY("REF") = 1 Refresh command screen when done
N DIPA,DIE,INBPN,INIP,INCHNL,INIP,INDEST,INXDST,INTT
S INEXTUIF=$G(INEXTUIF)
D DISPLAY^INTSUT1("Post Processing")
X INIP("POST")
Q
INTSUT2 ;JPD; 1 Feb 96 09:26; Utility routine
+1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
+2 ;COPYRIGHT 1991-2000 SAIC
+3 ;
+4 QUIT
CHECK(INDA,DIE,Y,DWSFLD) ;called from post action of 1st screen of
+1 ;windowman gallery.
+2 ;Input:
+3 ; INDA - ien of 4001.1 entry
+4 ; DIE - ^DIZ(4001.1,
+5 ;Output:
+6 ; Y - where to put cursor
+7 ; DWSFLD - Array of values for gallery
+8 ;
+9 NEW INIPPO,INBPN,INBPNAP
+10 ;Type is Unit test
+11 IF $$VAL^DWRA(4001.1,13.02,0,DIE,INDA)="T"
SET Y=""
QUIT 1
+12 ;If logon server and no app server have them get app server
+13 IF $$VAL^DWRA(4001.1,18.03,0,DIE,INDA)
IF '$$VAL^DWRA(4001.1,18.04,0,DIE,INDA)
Begin DoDot:1
+14 DO MSG("You picked a Logon Server but no App Server")
+15 SET Y="18.04"
End DoDot:1
QUIT 0
+16 ;If App server and no logon server have them get logon server
+17 IF $$VAL^DWRA(4001.1,18.04,0,DIE,INDA)
IF '$$VAL^DWRA(4001.1,18.03,0,DIE,INDA)
Begin DoDot:1
+18 DO MSG("You picked an App Server but no Logon Server")
+19 SET Y="18.03"
End DoDot:1
QUIT 0
+20 IF $$VAL^DWRA(4001.1,13.02,0,DIE,INDA)="U"
IF $$VAL^DWRA(4001.1,6,0,DIE,INDA)=""
Begin DoDot:1
+21 DO MSG("You must pick a direction. Inbound or Outbound")
+22 SET Y=6
End DoDot:1
QUIT 0
+23 QUIT 1
GETPORT(INBPN) ;get port - called from INTS
+1 ;Input:
+2 ; INBPN - ien of background process
+3 NEW INIPPO,POP
+4 SET POP=0
SET INIPPO=6100
FOR
SET INIPPO=INIPPO+$RANDOM(15)+10
Begin DoDot:1
+5 LOCK +^INRHB("RUN","SRVR",INBPN,INIPPO):0
IF $TEST
SET POP=1
+6 SET ^INRHB("RUN","SRVR",INBPN,INIPPO)=$HOROLOG
End DoDot:1
IF POP
QUIT
+7 QUIT INIPPO
PORTULCK(INIPPO) ;current port value changed- called from gallery
+1 ;Input:
+2 ; INIPPO - port number
+3 NEW INBPN
+4 SET INBPN=+$ORDER(^INTHPC("B","TEST INTERACTIVE",""))
+5 LOCK -^INRHB("RUN","SRVR",INBPN,INIPPO)
+6 QUIT
LOCKPORT(X) ;Lock port - called from gallery
+1 ;Input:
+2 ; X - Port number
+3 NEW INBPN
+4 SET INBPN=+$ORDER(^INTHPC("B","TEST INTERACTIVE",""))
+5 LOCK +^INRHB("RUN","SRVR",INBPN,X):0
IF '$TEST
Begin DoDot:1
+6 DO MSG("Port is already locked by another user. Pick another one")
+7 KILL X
End DoDot:1
QUIT
+8 SET DIPA("18.02")=X
+9 SET ^INRHB("RUN","SRVR",INBPN,X)=$HOROLOG
+10 QUIT
TYPECHK(INDA,X,DWDIPA,DWSFLD) ;User sets TYPE field.
+1 ;Input:
+2 ; INDA - ien of Criteria
+3 ; X - Value inserted by user in TYPE field
+4 ;Output:
+5 ; DWDIPA - sets DIPA
+6 ; DWSFLD - Sets value in fields
+7 ;
+8 NEW INBPN,INIPPO,INBPNAP
+9 ;called from post action of field 13.02 in windowman gallery
+10 SET DWDIPA(13.02,13.02)=""
+11 ;If type is changing blank out second screen values
+12 IF $DATA(DWFCHG)
FOR I=13.03,16.01,16.02,16.03,16.05,16.06,16.07,16.08,16.09,16.1,16.11,16.12,17.01,17.02,23.01,17.03,18.01,18.02
SET DWSFLD(I)="@"
+13 ;
+14 ;If type is unsolicited clear query values make uneditable
+15 IF $EXTRACT(X)="U"
Begin DoDot:1
+16 ;make fields display only
+17 SET (DWSFLD(17.03,0),DWSFLD(18.01,0),DWSFLD(18.02,0),DWSFLD(18.03,0),DWSFLD(18.04,0),DWSFLD(13.07,0))=2
+18 ;clear fields
+19 SET DWSFLD(18.03)="^S X=""@"""
SET DWSFLD(18.04)="^S X=""@"""
SET DWSFLD(13.07)="^S X=""@"""
SET DWSFLD(17.03)="^S X=""@"""
SET DWSFLD(18.01)="^S X=""@"""
SET DWSFLD(18.02)="^S X=""@"""
+20 ;make fields editable
+21 SET (DWSFLD(20,0),DWSFLD(6,0))=0
+22 SET INBPN=+$$VAL^DWRA(4001.1,20,1,DIE,INDA)
+23 ;Inbound unsolicited set accept ack transaction type
+24 IF $$VAL^DWRA(4001.1,6,1,DIE,INDA)="I"
SET DWSFLD(13.01)="HL GIS ACCEPT ACKNOWLEDGEMENT"
+25 SET (DWSFLD(17.03,0),DWSFLD(18.01,0),DWSFLD(18.02,0))=2
+26 ;only continue if change was made to reinitialize
+27 IF '$DATA(DWFCHG)
QUIT
+28 ;if inbound then set Accept ack Tran type
+29 IF $$VAL^DWRA(4001.1,6,0,DIE,INDA)="I"
SET DWSFLD(13.01)="HL GIS ACCEPT ACKNOWLEDGEMENT"
+30 SET DWSFLD(13.04)="AL"
+31 DO DEFRHT^INTSUT1(.DWSFLD,+$GET(INBPN))
End DoDot:1
+32 ;If query response
+33 IF $EXTRACT(X)="Q"
Begin DoDot:1
+34 ;make background process/Start at process display only and clear them
+35 SET (DWSFLD(20,0),DWSFLD(13.07,0))="2^1"
+36 SET DWSFLD(20)="^S X=""@"""
SET DWSFLD(13.07)="^S X=""@"""
+37 SET DWSFLD(6)="O"
SET DWSFLD(6,0)=2
+38 SET (DWSFLD(18.03,0),DWSFLD(18.04,0))=0
+39 ;only continue if change was made to reinitialize
+40 IF '$DATA(DWFCHG)
QUIT
+41 ;Accept Transaction Type
+42 SET DWSFLD(13.01)="HL GIS ACCEPT ACKNOWLEDGEMENT"
+43 ;Accept ack condition
+44 SET DWSFLD(13.04)="AL"
+45 ;Query response background process
+46 SET INBPN=+$ORDER(^INTHPC("B","TEST INTERACTIVE",""))
+47 IF $$VAL^DWRA(4001.1,18.01,0,DIE,INDA)=""
SET DWSFLD(18.01)="127.0.0.1"
+48 ;set port
+49 SET INIPPO=$$VAL^DWRA(4001.1,18.02,0,DIE,INDA)
+50 SET INBPNAP=+$$VAL^DWRA(4001.1,18.04,0,DIE,INDA)
+51 IF INBPNAP
IF $$VAL^DWRA(4001.1,17.03,0,DIE,INDA)=""
SET DWSFLD(17.03)=$PIECE($GET(^INTHPC(INBPNAP,7)),U,4)
+52 DO DEFRHT^INTSUT1(.DWSFLD,+$GET(INBPN))
+53 ;if port not set
+54 IF INIPPO=""
SET DWSFLD(18.02)="AUTO GENERATE"
+55 IF '$TEST
IF INIPPO'=""
IF $EXTRACT(INIPPO,1,4)'="AUTO"
Begin DoDot:2
+56 ;try locking existing defined port
+57 LOCK +^INRHB("RUN","SRVR",INBPN,INIPPO):0
IF '$TEST
DO MSG("Note - Port currently locked by another user")
+58 LOCK -^INRHB("RUN","SRVR",INBPN,INIPPO)
End DoDot:2
End DoDot:1
+59 ;Unit test
+60 IF $EXTRACT(X)="T"
Begin DoDot:1
+61 SET (DWSFLD(18.03,0),DWSFLD(18.04,0))=2
+62 ;clear fields
+63 SET (DWSFLD(18.03),DWSFLD(18.04),DWSFLD(6))="^S X=""@"""
+64 SET DWSFLD(20,0)="2^1"
SET DWSFLD(20)="^S X=""@"""
+65 ;start at process required and direction uneditable
+66 SET DWSFLD(13.07,0)=1
SET DWSFLD(6,0)=2
End DoDot:1
+67 QUIT
CLSVCK(X,DWSFLD) ;client server check
+1 ;Input:
+2 ; X - User input - 0 Client, 1 Server
+3 ;Output:
+4 ; DWSFLD - Array to set gallery
+5 ;
+6 ;answer was server
+7 IF X=1
SET DWSFLD(16.01,0)=2
SET DWSFLD(16.01)="^S X=""@"""
+8 ;answer was client or not answered
+9 IF 'X
SET DWSFLD(16.01,0)=0
+10 QUIT
MSG(MSG) ;Write message to screen
+1 ;Input:
+2 ; MSG - message to display
+3 WRITE $$SETXY^%ZTF(0,21),MSG,*7
+4 QUIT
PRE(INDA,INPRE,INUIF,INARY) ;Pre process
+1 ;Input:
+2 ; INDA - ien of 4001.1
+3 ; INPRE - xecutable pre processing code
+4 ; INUIF - Current Universal Interface file ien to be sent next
+5 ;Output: INARY("C") = ien - Current UIF ien value to process
+6 ; INARY("A",n) = ien - Process UIF at position n in ^UTILITY
+7 ; INARY("F") = ien - First UIF entry to process
+8 ; INARY("L") = ien - Last UIF entry to process
+9 ; INARY("M",n) = Message to display & save in displayman array
+10 ; INARY("REF") = 1 Refresh command screen when done
+11 NEW DIPA,INBPN,INIP,INCHNL,INIP,INDEST,INXDST,INTT
+12 KILL INARY
+13 DO DISPLAY^INTSUT1("Pre Processing")
+14 XECUTE INPRE
+15 QUIT
POSTPRE(INDA,INARY,INEXTUIF,INLASTN,INPOP,INUPDAT) ;Post Pre processing
+1 ; Input:
+2 ; INARY= "^INTHU" , "^INLHFTSK"
+3 ; INARY("C") = ien - Current UIF ien value to process
+4 ; INARY("A",n) = ien - Process UIF at position n in ^UTILITY
+5 ; INARY("F") = ien - First UIF entry to process
+6 ; INARY("L") = ien - Last UIF entry to process
+7 ; INARY("M",n) = Message to display & save in displayman array
+8 ; INARY("REF") = 1 Refresh command screen when done
+9 ; Output: INEXTUIF - Next Universal Interface file entry to process -
+10 ; can be set/reset by the programmer
+11 ; INLASTN - Last entry in ^UTILITY global processed - can be
+12 ; set/reset by the programmer - (should be set if
+13 ; it was not set previously)
+14 ; INEXTUIF and INLASTN need to be set in or out of the PRE and POST
+15 ; in order to process at least one message.
+16 ;
+17 NEW INP
+18 IF 'INPOP
QUIT 0
+19 IF $DATA(INARY)<10
QUIT 1
+20 KILL INUPDAT
+21 IF $GET(INARY("C"))+$GET(INARY("F"))+$GET(INARY("L"))+$ORDER(INARY("A",""))
SET INUPDAT=1
+22 IF $GET(INARY("REF"))
Begin DoDot:1
+23 ;D CLR^DIJF
+24 DO LSTHDR^INTSTRT(INDA)
+25 DO SCR^INTSUT1(5,17,1)
End DoDot:1
+26 IF $GET(INARY)=""
SET INARY="^INTHU"
+27 DO DISPLAY^INTSUT1("POSTPRE Processing")
+28 ;current entry to process
+29 IF +$GET(INARY("C"))
SET INEXTUIF=+INARY("C")
+30 DO MERGE2^INTSUT3(.INARY)
+31 ;put entry in first spot
+32 IF $DATA(@(INARY_"(+$G(INARY(""F"")),0)"))
Begin DoDot:1
+33 SET INP=+$ORDER(^UTILITY("INTHU",DUZ,$JOB,""))
+34 IF INP
SET INP=INP-".00001"
+35 IF 'INP
SET INP=1
+36 SET ^UTILITY("INTHU",DUZ,$JOB,INP,INARY("F"))=INARY("F")
End DoDot:1
+37 ;Put entry in last spot
+38 IF $DATA(@(INARY_"(+$G(INARY(""L"")),0)"))
Begin DoDot:1
+39 SET INP=+$ORDER(^UTILITY("INTHU",DUZ,$JOB,""),-1)
+40 SET ^UTILITY("INTHU",DUZ,$JOB,INP,INARY("L"))=INARY("L")
End DoDot:1
+41 IF '$LENGTH($GET(INLASTN))
IF $DATA(INUPDAT)
Begin DoDot:1
+42 SET INLASTN=$ORDER(^UTILITY("INTHU",DUZ,$JOB,""))
+43 IF '$LENGTH($GET(INEXTUIF))
SET INEXTUIF=$ORDER(^UTILITY("INTHU",DUZ,$JOB,+INLASTN,""))
End DoDot:1
+44 ;put messages in displayman array
+45 SET INP=""
+46 FOR
SET INP=$ORDER(INARY("M",INP))
IF 'INP
QUIT
DO DISPLAY^INTSUT1(INARY("M",INP),INEXPAND)
+47 KILL INARY
+48 ;Update Multiple
+49 DO UPDTFRUT^INTSUT3(INDA)
+50 QUIT 1
POST(INDA,INEXTUIF,INARY) ;Post process
+1 ;Input:
+2 ; INDA - ien of 4001.1
+3 ; INEXTUIF - next UIF ien to transmit
+4 ; Input: INARY("C") = ien - Current UIF ien value to process
+5 ; INARY("A",n) = ien - Process UIF at position n in ^UTILITY
+6 ; INARY("F") = ien - First UIF entry to process
+7 ; INARY("L") = ien - Last UIF entry to process
+8 ; INARY("M",n) = "Message to display & save in displayman array
+9 ; INARY("REF") = 1 Refresh command screen when done
+10 NEW DIPA,DIE,INBPN,INIP,INCHNL,INIP,INDEST,INXDST,INTT
+11 SET INEXTUIF=$GET(INEXTUIF)
+12 DO DISPLAY^INTSUT1("Post Processing")
+13 XECUTE INIP("POST")
+14 QUIT