- INTSTF ;DGH; 11 Jun 97 12:07;Unit Test Formatter functions
- ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
- ;COPYRIGHT 1991-2000 SAIC
- ;
- ; !!! If routine INHFTM is modified, this routine !!!
- ; !!! may need comparable change. !!!
- ;Unit Test Utility to test format queue entries through the
- ;format controller.
- Q
- ;
- EN(INIP,INEXPAND,INDA) ;Specify an entry from the format queue
- ;INPUT:
- ; INIP = array of PRE and POST executable code. PRE must set...
- ; a) INTSK = entry to be processed in ^INLHFTSK or
- ; b) INTSK(entry) = array of entries from ^INLHFTSK
- ; INEXPAND = expanded display (0) or brief (1)
- ; INDA = ien in criteria file, 4001.1
- ;INTERNAL VARIABLES:
- ; INEXPND = reverse logic of INEXPAND
- ;
- N INREQLST,INLST,UIF,INEXPND,INMSG,INTSK,INIDA,INEXTSK,INARY,INDO,INPOP
- K ^UTILITY("INTHU",DUZ)
- S INEXPND='$G(INEXPAND)
- ;Protect INDA and DUZ
- S INIDA=INDA,INDUZ=DUZ
- N INDA,DUZ
- S DUZ=.5,DUZ(0)="@"
- S (INSND,OUT,RCVE,INLASTN,INUPDAT)=0,INPOP=1
- ;Loop until there is nothing left to do or user aborts.
- F D Q:OUT!'INPOP
- .K INARY,INEXTSK
- .S (INEXTN,INLASTN)=$O(^UTILITY("INTHU",INDUZ,$J,INLASTN))
- .I INEXTN S INEXTSK=$O(^UTILITY("INTHU",INDUZ,$J,INEXTN,""))
- .;Pre process
- .I $G(INIP("PRE"))'="" D PRE^INTSUT2(INIDA,INIP("PRE"),.INEXTSK,.INARY)
- .;set INARY to task queue--defualt would have been to UIF
- .S INARY="^INLHFTSK"
- .Q:'$$POSTPRE^INTSUT2(INIDA,.INARY,.INEXTSK,.INLASTN,.INPOP,.INPUDAT)
- .;Pre-processor should have created an entry for INEXTSK
- .I '$G(INEXTSK) S OUT=1 Q
- .;Execute format controller logic on next entry
- .D FMT(INEXTSK,.INIP,INEXPND,.INREQLST)
- .S INDO=1
- .;Execute post action. Any Pre and Post defined in criteria
- .;screen wrap around Format process if "Start at Process"=Format
- .I $G(INIP("POST"))'="" D
- ..I INEXPND S INMSG="Executing post processor code" D DISPLAY^INTSUT1(INMSG,0) Q:'INPOP
- ..D POST^INTSUT2(INIDA)
- .;IF FMT tag didn't create an INREQLST array, nothing left to do
- .Q:'$D(INREQLST)
- .;Execute Output Controller logic.
- .S INLST="" F S INLST=$O(INREQLST(INLST)) Q:'INLST D
- ..D PROCESS^INTSTO(INLST,INEXPAND,INIDA,.INIP)
- .K INREQLST
- ;Message if nothing was processed
- D:'$G(INDO)
- .D DISPLAY^INTSUT1("No format entries processed!",0)
- .S INMSG="Formatter test requires INTSK to exist as a variable or an array" D DISPLAY^INTSUT1(INMSG,0)
- .S INMSG="set to one or more entries in the Formatter Task File." D DISPLAY^INTSUT1(INMSG,0)
- .S INMSG="The format is either INTSK=entry or INTSK(entry)=""""" D DISPLAY^INTSUT1(INMSG,0)
- .S INMSG="Use Pre-Processor code to create the entries." D DISPLAY^INTSUT1(INMSG,0)
- Q
- ;
- FMT(INTSK,INIP,INEXPND,INREQLST) ;Working section of the code
- ;Modified version of BACK^INHFTM, revised to control script processing
- ;INPUT:
- ; INTSK = entry in Formatter Task File
- ; INIP= array of variables set in criteria screen
- ; INEXPND=1 for expanded, 0 for not (reverse of ININEXPND)
- ;OUTPUT:
- ; INREQLST array of entries created in the UIF (PBR)
- ;
- D SCR^INTSUT1(7,17)
- N PRIO,INMSG,DA,DEST,DIK,I,INI1,INTT,INDA,INDIPA,INIDA,X,INJ,INORDUZ,INORDIV
- S INPOP=1
- ;BACK^INHF protects INBPN and INHSRVR here. Not needed for IUTU
- ;--Initial validation of message to be processed
- I '$D(^INLHFTSK(INTSK,0)) S INMSG="Task "_INTSK_" does not exist in INLHFTSK" D DISPLAY^INTSUT1(INMSG,0) Q
- S X=^INLHFTSK(INTSK,0),INTT=+X,INIDA=$P(X,U,2),(DUZ,INORDUZ)=$P(X,U,3),INORDIV=$P(X,U,7)
- I INEXPND S INMSG="------- Processing Format Task Queue Entry "_INTSK_"--------" D DISPLAY^INTSUT1(INMSG,0)
- S INMSG="Parent Transaction Type: "_$P(^INRHT(INTT,0),U) D DISPLAY^INTSUT1(INMSG,0)
- S:$P(X,U,5) DUZ(2)=$P(X,U,5)
- D SETDT^UTDT
- X:$L($G(^INRHSITE(1,1))) $G(^INRHSITE(1,1))
- ;Load and display INDIPA/INA array
- I $D(^INLHFTSK(INTSK,2))>9 D
- .M INDIPA=^INLHFTSK(INTSK,2)
- .Q:'INEXPND
- .D DISPLAY^INTSUT1("INA values:",0)
- .S QX="INDIPA"
- .F S QX=$Q(@(QX)) Q:'$L(QX) S INMSG=QX_"="_$G(@(QX)) D DISPLAY^INTSUT1(INMSG,0)
- ;Load and display INDA values
- I $D(^INLHFTSK(INTSK,1)) D
- .M INIDA=^INLHFTSK(INTSK,1)
- .Q:'INEXPND
- .D DISPLAY^INTSUT1("INDA values:",0)
- .S INMSG="INDA = "_INIDA D DISPLAY^INTSUT1(INMSG,0)
- .S QX="INIDA"
- .F S QX=$Q(@(QX)) Q:'$L(QX) S INMSG=QX_"="_$G(@(QX)) D DISPLAY^INTSUT1(INMSG,0)
- D:INEXPND DISPLAY^INTSUT1("Parent has the following active children:",0)
- Q:'INPOP
- S I="" F S I=$O(^INRHT("AC",INTT,I)) Q:'I D
- .;Display only active children
- .I $P($G(^INRHT(I,0)),U,5) D
- ..S INJ(+$P(^INRHT(I,0),U,7),I)=""
- ..I INEXPND S INMSG=" "_$P(^INRHT(I,0),U) D DISPLAY^INTSUT1(INMSG,0)
- ;If dependencies exist, display dependencies 1 through 9, then 0
- I $D(INJ) D Q:'INPOP
- .S PRIO=.9 F S PRIO=$O(INJ(PRIO)) Q:'PRIO D JL(.INJ,PRIO,.INDIPA,.INIDA,.INORDUZ,INORDIV) Q:'INPOP
- .S PRIO=0 D JL(.INJ,PRIO,.INDIPA,.INIDA,.INORDUZ,INORDIV)
- S INMSG="------- Formatting of Task File entry "_INTSK_" completed ------" D DISPLAY^INTSUT1(INMSG,0)
- ;Kill entry from ^INLHFTSK
- S DIK="^INLHFTSK(",DA=INTSK D ^DIK
- Q
- ;
- JL(INJ,PRIO,INDIPA,INIDA,INORDUZ,INORDIV) ;Loop through jobs at priority PRIO
- ;This is a modified version of JL^INHFTM
- ;INPUT:
- ; INJ(PRIO,TRT) = array of child TTs in priority order
- ; INDIPA = "INA" array loaded from task file
- ; INIDA = "INDA" array loaded from task file
- ; INORDUZ = DUZ loaded from task file
- ; INORDIV = Division loaded from task file
- N INPOP,TRT,SCR,INTNAME,INHERR,ERR,ER,Z
- S INPOP=1
- S TRT=0 F S TRT=$O(INJ(PRIO,TRT)) Q:'TRT!'INPOP D
- .;;Future**If transaction parameter is set, only continue if this is
- .;;the transaction type selected by user.
- .;;;IF $G(INPARM("TT"),$G(INPARM("TT")'=TRT Q
- .;Preserve original values of INIDA (INDA) and INA (INDIPA) through
- .;script processing. They will be needed for subsequent children.
- .N INA,INDA
- .M INA=INDIPA,INDA=INIDA
- .K INV,UIF
- .;Get child TT info, including script and destination
- .S SCR=$P(^INRHT(TRT,0),U,3),DEST=+$P(^INRHT(TRT,0),U,2),INTNAME=$P(^(0),U)
- .S INMSG="------- Formatting child transaction: "_INTNAME_" --------" D DISPLAY^INTSUT1(INMSG,0) Q:'INPOP
- .;Avoid "no program" error if script is missing
- .I 'SCR S INMSG="No script for transaction type "_INTNAME D DISPLAY^INTSUT1(INMSG,0) Q
- .I INEXPND S INMSG="Script name: "_$P(^INRHS(SCR,0),U) D DISPLAY^INTSUT1(INMSG,0)
- .S INMSG="Destination: "_$P($G(^INRHD(DEST,0)),U) D DISPLAY^INTSUT1(INMSG,0) Q:'INPOP
- .K ^UTILITY("INDA",$J) M ^UTILITY("INDA",$J)=INDA
- .;Set "no queue" parameter to 1 so UIF entry will not be queued.
- .S Z="S ER=$$^IS"_$E(SCR#100000+100000,2,6)_"("_TRT_",.INDA,.INA,"_DEST_",1,$G(INORDUZ,DUZ),$G(INORDIV))"
- .D
- ..X Z I $G(UIF)>0 D
- ...S INMSG="Message "_$P(^INTHU(UIF,0),U,5)_" created in the UIF" D DISPLAY^INTSUT1(INMSG,0,UIF) Q:'INPOP
- ...M ^INTHU(UIF,6)=^UTILITY("INDA",$J)
- ...I $D(INA("DMISID")) M ^INTHU(UIF,7,"DMISID")=INA("DMISID")
- ...I $D(INA("MSGTYPE")) M ^INTHU(UIF,7,"MSGTYPE")=INA("MSGTYPE")
- ...;Set array to pass to Output test function
- ...S INREQLST(UIF)=""
- ...;List the message text in expanded mode
- ...I INEXPND D EXPNDIS^INTSUT1(UIF) Q:'INPOP
- ...;IF there are errors, display error messages
- ...D:$D(INHERR)
- ....I $L($G(INHERR)) D DISPLAY^INTSUT1(INHERR,0)
- ....S ERR=0
- ....F S ERR=$O(INHERR(ERR)) Q:'ERR D DISPLAY^INTSUT1(INHERR(ERR),0)
- .K ^UTILITY("INDA",$J)
- .I '$G(UIF) S INMSG="Unable to create message" D DISPLAY^INTSUT1(INMSG,0)
- Q
- ;
- TEST ;Sample executable pre-processing code to test this routine
- ;OUTPUT: INARY array
- N INTT,INA,INDA,INHF,DIC,DA
- ;Prompt for an entry to test through TEST DAVE -PARENT transaction type
- S DIC="^DPT(",DIC(0)="AEZ" D ^DIC
- Q:Y<0
- ;Create entry in Interface Task File to test.
- S INDA=+Y,INTT="TEST DAVE -PARENT"
- S INA("TEST")="TEST INA",INA("HARRY")="BENCHMARK"
- S INA("DMISID")=9999
- S INDA(2,20)="",INDA(63,1)=""
- ;Pass 7th parameter as 1 to suppress from Format Queue
- D ^INHF(INTT,.INDA,.INA,"","","",1)
- ;INHF will be positive if Format Task Entry is created
- ;Return value in INARY to Pre-processor.
- S INARY("C")=INHF
- Q
- ;
- ;
- INTSTF ;DGH; 11 Jun 97 12:07;Unit Test Formatter functions
- +1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
- +2 ;COPYRIGHT 1991-2000 SAIC
- +3 ;
- +4 ; !!! If routine INHFTM is modified, this routine !!!
- +5 ; !!! may need comparable change. !!!
- +6 ;Unit Test Utility to test format queue entries through the
- +7 ;format controller.
- +8 QUIT
- +9 ;
- EN(INIP,INEXPAND,INDA) ;Specify an entry from the format queue
- +1 ;INPUT:
- +2 ; INIP = array of PRE and POST executable code. PRE must set...
- +3 ; a) INTSK = entry to be processed in ^INLHFTSK or
- +4 ; b) INTSK(entry) = array of entries from ^INLHFTSK
- +5 ; INEXPAND = expanded display (0) or brief (1)
- +6 ; INDA = ien in criteria file, 4001.1
- +7 ;INTERNAL VARIABLES:
- +8 ; INEXPND = reverse logic of INEXPAND
- +9 ;
- +10 NEW INREQLST,INLST,UIF,INEXPND,INMSG,INTSK,INIDA,INEXTSK,INARY,INDO,INPOP
- +11 KILL ^UTILITY("INTHU",DUZ)
- +12 SET INEXPND='$GET(INEXPAND)
- +13 ;Protect INDA and DUZ
- +14 SET INIDA=INDA
- SET INDUZ=DUZ
- +15 NEW INDA,DUZ
- +16 SET DUZ=.5
- SET DUZ(0)="@"
- +17 SET (INSND,OUT,RCVE,INLASTN,INUPDAT)=0
- SET INPOP=1
- +18 ;Loop until there is nothing left to do or user aborts.
- +19 FOR
- Begin DoDot:1
- +20 KILL INARY,INEXTSK
- +21 SET (INEXTN,INLASTN)=$ORDER(^UTILITY("INTHU",INDUZ,$JOB,INLASTN))
- +22 IF INEXTN
- SET INEXTSK=$ORDER(^UTILITY("INTHU",INDUZ,$JOB,INEXTN,""))
- +23 ;Pre process
- +24 IF $GET(INIP("PRE"))'=""
- DO PRE^INTSUT2(INIDA,INIP("PRE"),.INEXTSK,.INARY)
- +25 ;set INARY to task queue--defualt would have been to UIF
- +26 SET INARY="^INLHFTSK"
- +27 IF '$$POSTPRE^INTSUT2(INIDA,.INARY,.INEXTSK,.INLASTN,.INPOP,.INPUDAT)
- QUIT
- +28 ;Pre-processor should have created an entry for INEXTSK
- +29 IF '$GET(INEXTSK)
- SET OUT=1
- QUIT
- +30 ;Execute format controller logic on next entry
- +31 DO FMT(INEXTSK,.INIP,INEXPND,.INREQLST)
- +32 SET INDO=1
- +33 ;Execute post action. Any Pre and Post defined in criteria
- +34 ;screen wrap around Format process if "Start at Process"=Format
- +35 IF $GET(INIP("POST"))'=""
- Begin DoDot:2
- +36 IF INEXPND
- SET INMSG="Executing post processor code"
- DO DISPLAY^INTSUT1(INMSG,0)
- IF 'INPOP
- QUIT
- +37 DO POST^INTSUT2(INIDA)
- End DoDot:2
- +38 ;IF FMT tag didn't create an INREQLST array, nothing left to do
- +39 IF '$DATA(INREQLST)
- QUIT
- +40 ;Execute Output Controller logic.
- +41 SET INLST=""
- FOR
- SET INLST=$ORDER(INREQLST(INLST))
- IF 'INLST
- QUIT
- Begin DoDot:2
- +42 DO PROCESS^INTSTO(INLST,INEXPAND,INIDA,.INIP)
- End DoDot:2
- +43 KILL INREQLST
- End DoDot:1
- IF OUT!'INPOP
- QUIT
- +44 ;Message if nothing was processed
- +45 IF '$GET(INDO)
- Begin DoDot:1
- +46 DO DISPLAY^INTSUT1("No format entries processed!",0)
- +47 SET INMSG="Formatter test requires INTSK to exist as a variable or an array"
- DO DISPLAY^INTSUT1(INMSG,0)
- +48 SET INMSG="set to one or more entries in the Formatter Task File."
- DO DISPLAY^INTSUT1(INMSG,0)
- +49 SET INMSG="The format is either INTSK=entry or INTSK(entry)="""""
- DO DISPLAY^INTSUT1(INMSG,0)
- +50 SET INMSG="Use Pre-Processor code to create the entries."
- DO DISPLAY^INTSUT1(INMSG,0)
- End DoDot:1
- +51 QUIT
- +52 ;
- FMT(INTSK,INIP,INEXPND,INREQLST) ;Working section of the code
- +1 ;Modified version of BACK^INHFTM, revised to control script processing
- +2 ;INPUT:
- +3 ; INTSK = entry in Formatter Task File
- +4 ; INIP= array of variables set in criteria screen
- +5 ; INEXPND=1 for expanded, 0 for not (reverse of ININEXPND)
- +6 ;OUTPUT:
- +7 ; INREQLST array of entries created in the UIF (PBR)
- +8 ;
- +9 DO SCR^INTSUT1(7,17)
- +10 NEW PRIO,INMSG,DA,DEST,DIK,I,INI1,INTT,INDA,INDIPA,INIDA,X,INJ,INORDUZ,INORDIV
- +11 SET INPOP=1
- +12 ;BACK^INHF protects INBPN and INHSRVR here. Not needed for IUTU
- +13 ;--Initial validation of message to be processed
- +14 IF '$DATA(^INLHFTSK(INTSK,0))
- SET INMSG="Task "_INTSK_" does not exist in INLHFTSK"
- DO DISPLAY^INTSUT1(INMSG,0)
- QUIT
- +15 SET X=^INLHFTSK(INTSK,0)
- SET INTT=+X
- SET INIDA=$PIECE(X,U,2)
- SET (DUZ,INORDUZ)=$PIECE(X,U,3)
- SET INORDIV=$PIECE(X,U,7)
- +16 IF INEXPND
- SET INMSG="------- Processing Format Task Queue Entry "_INTSK_"--------"
- DO DISPLAY^INTSUT1(INMSG,0)
- +17 SET INMSG="Parent Transaction Type: "_$PIECE(^INRHT(INTT,0),U)
- DO DISPLAY^INTSUT1(INMSG,0)
- +18 IF $PIECE(X,U,5)
- SET DUZ(2)=$PIECE(X,U,5)
- +19 DO SETDT^UTDT
- +20 IF $LENGTH($GET(^INRHSITE(1,1)))
- XECUTE $GET(^INRHSITE(1,1))
- +21 ;Load and display INDIPA/INA array
- +22 IF $DATA(^INLHFTSK(INTSK,2))>9
- Begin DoDot:1
- +23 MERGE INDIPA=^INLHFTSK(INTSK,2)
- +24 IF 'INEXPND
- QUIT
- +25 DO DISPLAY^INTSUT1("INA values:",0)
- +26 SET QX="INDIPA"
- +27 FOR
- SET QX=$QUERY(@(QX))
- IF '$LENGTH(QX)
- QUIT
- SET INMSG=QX_"="_$GET(@(QX))
- DO DISPLAY^INTSUT1(INMSG,0)
- End DoDot:1
- +28 ;Load and display INDA values
- +29 IF $DATA(^INLHFTSK(INTSK,1))
- Begin DoDot:1
- +30 MERGE INIDA=^INLHFTSK(INTSK,1)
- +31 IF 'INEXPND
- QUIT
- +32 DO DISPLAY^INTSUT1("INDA values:",0)
- +33 SET INMSG="INDA = "_INIDA
- DO DISPLAY^INTSUT1(INMSG,0)
- +34 SET QX="INIDA"
- +35 FOR
- SET QX=$QUERY(@(QX))
- IF '$LENGTH(QX)
- QUIT
- SET INMSG=QX_"="_$GET(@(QX))
- DO DISPLAY^INTSUT1(INMSG,0)
- End DoDot:1
- +36 IF INEXPND
- DO DISPLAY^INTSUT1("Parent has the following active children:",0)
- +37 IF 'INPOP
- QUIT
- +38 SET I=""
- FOR
- SET I=$ORDER(^INRHT("AC",INTT,I))
- IF 'I
- QUIT
- Begin DoDot:1
- +39 ;Display only active children
- +40 IF $PIECE($GET(^INRHT(I,0)),U,5)
- Begin DoDot:2
- +41 SET INJ(+$PIECE(^INRHT(I,0),U,7),I)=""
- +42 IF INEXPND
- SET INMSG=" "_$PIECE(^INRHT(I,0),U)
- DO DISPLAY^INTSUT1(INMSG,0)
- End DoDot:2
- End DoDot:1
- +43 ;If dependencies exist, display dependencies 1 through 9, then 0
- +44 IF $DATA(INJ)
- Begin DoDot:1
- +45 SET PRIO=.9
- FOR
- SET PRIO=$ORDER(INJ(PRIO))
- IF 'PRIO
- QUIT
- DO JL(.INJ,PRIO,.INDIPA,.INIDA,.INORDUZ,INORDIV)
- IF 'INPOP
- QUIT
- +46 SET PRIO=0
- DO JL(.INJ,PRIO,.INDIPA,.INIDA,.INORDUZ,INORDIV)
- End DoDot:1
- IF 'INPOP
- QUIT
- +47 SET INMSG="------- Formatting of Task File entry "_INTSK_" completed ------"
- DO DISPLAY^INTSUT1(INMSG,0)
- +48 ;Kill entry from ^INLHFTSK
- +49 SET DIK="^INLHFTSK("
- SET DA=INTSK
- DO ^DIK
- +50 QUIT
- +51 ;
- JL(INJ,PRIO,INDIPA,INIDA,INORDUZ,INORDIV) ;Loop through jobs at priority PRIO
- +1 ;This is a modified version of JL^INHFTM
- +2 ;INPUT:
- +3 ; INJ(PRIO,TRT) = array of child TTs in priority order
- +4 ; INDIPA = "INA" array loaded from task file
- +5 ; INIDA = "INDA" array loaded from task file
- +6 ; INORDUZ = DUZ loaded from task file
- +7 ; INORDIV = Division loaded from task file
- +8 NEW INPOP,TRT,SCR,INTNAME,INHERR,ERR,ER,Z
- +9 SET INPOP=1
- +10 SET TRT=0
- FOR
- SET TRT=$ORDER(INJ(PRIO,TRT))
- IF 'TRT!'INPOP
- QUIT
- Begin DoDot:1
- +11 ;;Future**If transaction parameter is set, only continue if this is
- +12 ;;the transaction type selected by user.
- +13 ;;;IF $G(INPARM("TT"),$G(INPARM("TT")'=TRT Q
- +14 ;Preserve original values of INIDA (INDA) and INA (INDIPA) through
- +15 ;script processing. They will be needed for subsequent children.
- +16 NEW INA,INDA
- +17 MERGE INA=INDIPA,INDA=INIDA
- +18 KILL INV,UIF
- +19 ;Get child TT info, including script and destination
- +20 SET SCR=$PIECE(^INRHT(TRT,0),U,3)
- SET DEST=+$PIECE(^INRHT(TRT,0),U,2)
- SET INTNAME=$PIECE(^(0),U)
- +21 SET INMSG="------- Formatting child transaction: "_INTNAME_" --------"
- DO DISPLAY^INTSUT1(INMSG,0)
- IF 'INPOP
- QUIT
- +22 ;Avoid "no program" error if script is missing
- +23 IF 'SCR
- SET INMSG="No script for transaction type "_INTNAME
- DO DISPLAY^INTSUT1(INMSG,0)
- QUIT
- +24 IF INEXPND
- SET INMSG="Script name: "_$PIECE(^INRHS(SCR,0),U)
- DO DISPLAY^INTSUT1(INMSG,0)
- +25 SET INMSG="Destination: "_$PIECE($GET(^INRHD(DEST,0)),U)
- DO DISPLAY^INTSUT1(INMSG,0)
- IF 'INPOP
- QUIT
- +26 KILL ^UTILITY("INDA",$JOB)
- MERGE ^UTILITY("INDA",$JOB)=INDA
- +27 ;Set "no queue" parameter to 1 so UIF entry will not be queued.
- +28 SET Z="S ER=$$^IS"_$EXTRACT(SCR#100000+100000,2,6)_"("_TRT_",.INDA,.INA,"_DEST_",1,$G(INORDUZ,DUZ),$G(INORDIV))"
- +29 Begin DoDot:2
- +30 XECUTE Z
- IF $GET(UIF)>0
- Begin DoDot:3
- +31 SET INMSG="Message "_$PIECE(^INTHU(UIF,0),U,5)_" created in the UIF"
- DO DISPLAY^INTSUT1(INMSG,0,UIF)
- IF 'INPOP
- QUIT
- +32 MERGE ^INTHU(UIF,6)=^UTILITY("INDA",$JOB)
- +33 IF $DATA(INA("DMISID"))
- MERGE ^INTHU(UIF,7,"DMISID")=INA("DMISID")
- +34 IF $DATA(INA("MSGTYPE"))
- MERGE ^INTHU(UIF,7,"MSGTYPE")=INA("MSGTYPE")
- +35 ;Set array to pass to Output test function
- +36 SET INREQLST(UIF)=""
- +37 ;List the message text in expanded mode
- +38 IF INEXPND
- DO EXPNDIS^INTSUT1(UIF)
- IF 'INPOP
- QUIT
- +39 ;IF there are errors, display error messages
- +40 IF $DATA(INHERR)
- Begin DoDot:4
- +41 IF $LENGTH($GET(INHERR))
- DO DISPLAY^INTSUT1(INHERR,0)
- +42 SET ERR=0
- +43 FOR
- SET ERR=$ORDER(INHERR(ERR))
- IF 'ERR
- QUIT
- DO DISPLAY^INTSUT1(INHERR(ERR),0)
- End DoDot:4
- End DoDot:3
- End DoDot:2
- +44 KILL ^UTILITY("INDA",$JOB)
- +45 IF '$GET(UIF)
- SET INMSG="Unable to create message"
- DO DISPLAY^INTSUT1(INMSG,0)
- End DoDot:1
- +46 QUIT
- +47 ;
- TEST ;Sample executable pre-processing code to test this routine
- +1 ;OUTPUT: INARY array
- +2 NEW INTT,INA,INDA,INHF,DIC,DA
- +3 ;Prompt for an entry to test through TEST DAVE -PARENT transaction type
- +4 SET DIC="^DPT("
- SET DIC(0)="AEZ"
- DO ^DIC
- +5 IF Y<0
- QUIT
- +6 ;Create entry in Interface Task File to test.
- +7 SET INDA=+Y
- SET INTT="TEST DAVE -PARENT"
- +8 SET INA("TEST")="TEST INA"
- SET INA("HARRY")="BENCHMARK"
- +9 SET INA("DMISID")=9999
- +10 SET INDA(2,20)=""
- SET INDA(63,1)=""
- +11 ;Pass 7th parameter as 1 to suppress from Format Queue
- +12 DO ^INHF(INTT,.INDA,.INA,"","","",1)
- +13 ;INHF will be positive if Format Task Entry is created
- +14 ;Return value in INARY to Pre-processor.
- +15 SET INARY("C")=INHF
- +16 QUIT
- +17 ;
- +18 ;