AGMPHLEU ; IHS/SD/TPF - HLO MPI A28 MISSING ICN BACKGROUND TASKS ;
;;7.2;IHS PATIENT REGISTRATION;**1,3,6**;MAY 20, 2010;Build 23
;
;RTN RUNS IN BACKGROUND AND TRAVERSES VA PATIENT FILE
;ANY RECORDS WITH FIELD ANY RECORDS WIH ONLY A LOCAL ICN
;OR MISSING AN EUID AN ATTEMPT WILL BE MADE TO DO ANOTHER
;EXACT MATCH QUERY A28 IN THE SAME WAY AS DONE IN THE 'ADD; OPTION
START ;EP - START UP MISSING AND LOCAL ID TASK
D MISSEUID
Q
;
MISSEUID ;EP - PROCESS MISSING EUID
N DFNIEN,MISSING,ADDED,ERRORS,TMPDUZ2,NONORF,MERGED,LOCKED,NOCHART,QUEUED,PICN,TICN,DELAY,MAX,DA,CNT
S TMPDUZ2=DUZ(2)
S (MISSING,ADDED,ERRORS,NONORF,MERGED,LOCKED,NOCHART,QUEUED)=0
;05/30/2013 - KJH - TFS8081 - Update the ^XTMP global used to store temporary info about the MISSING ICN TASK.
S ^XTMP("AGMPICN",0)=$$FMADD^XLFDT(DT,58)_U_DT_U_"AGMP MPI MISSING ICN TSK"
S DELAY=+$G(^XTMP("AGMPICN","DELAY")) I DELAY=0 S DELAY=14 ;If not set, use 14 day minimum between attempts to get an ICN for a patient.
S MAX=+$G(^XTMP("AGMPICN","MAX")) I MAX=0 S MAX=5000 ;If not set, use 5000 as the maximum number of attempts.
;06/07/2013 - DMB - TFS8081 - If running in foreground, let user pick maximum number of records to extract
I '$D(ZTQUEUED) D I MAX=-1 Q
. N DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
. W !!,"Enter the maximum number of messages you would like to create. If you want to"
. W !,"send messages for all active charts for all patients who are currently missing"
. W !,"an ICN, enter 9999999",!
. S DIR(0)="NA^1:9999999:0",DIR("A")="Maximum number of messages to send? ",DIR("B")=MAX
. D ^DIR
. I +Y<1 S MAX=-1 Q
. S MAX=Y
S DFNIEN=0
;05/30/2013 - KJH - TFS8081 - Update the MISSING ICN TASK to use the TREATING FACILITY LIST.
F CNT=0:1 S DFNIEN=$O(^DPT(DFNIEN)) Q:'DFNIEN D
.I $D(^DPT(DFNIEN,-9)) S MERGED=MERGED+1 Q ;DON'T ATTEMPT FOR MERGED RECORDS
.I $$DEMOPAT^AGMPHLU(DFNIEN) Q ; 9/13/2017 - GCD - CR 7713 - Don't upload demo patients.
.S PICN=$$GET1^DIQ(2,DFNIEN_",",991.01,"E") ;PATIENT INTEGRATION CONTROL NUMBER
.;W !,DFNIEN
.;TRY A LOCK. IF CAN'T LOCK PATIENT, RECORD BEING BUILT??
.L +^DPT(DFNIEN):5 I '$T S LOCKED=LOCKED+1 Q
.L -^DPT(DFNIEN)
.I '$D(ZTQUEUED),CNT#1000=0 W "."
.I '$O(^AUPNPAT(DFNIEN,41,0)) S NOCHART=NOCHART+1 Q
.S DUZ(2)=0
.F S DUZ(2)=$O(^AUPNPAT(DFNIEN,41,DUZ(2))) Q:DUZ(2)="" D
..;W !,?5,$S($P($G(^AGFAC(DUZ(2),0)),U,21)'="":$P($G(^AGFAC(DUZ(2),0)),U,21),1:"UNDEFINED")
..I $P($G(^AGFAC(DUZ(2),0)),U,21)'="Y" D Q ;ONLY "OFFICAL REGISTERING FACILITIES"
...S NONORF=NONORF+1
..S DA=$O(^DGCN(391.91,"AINST",DUZ(2),DFNIEN,"")),TICN=""
..I DA S TICN=$$GET1^DIQ(391.91,DA_",",9999999.02,"E") ;TREATING FACILITY INTEGRATION CONTROL NUMBER
..;05/30/2013 - KJH - TFS8081 - Add code to try to prevent system from attempting to resend a request until at least 7 days have passed.
..I PICN]"",TICN]"",PICN=TICN K ^XTMP("AGMPICN",DFNIEN,DUZ(2)) Q ; OK. Does not need to be tracked.
..S MISSING=MISSING+1
..I $G(^XTMP("AGMPICN",DFNIEN,DUZ(2)))+DELAY>+$H S QUEUED=QUEUED+1 Q ;Wait at least 'DELAY' days before trying again.
..;06/11/2013 - DMB - TFS8081 - Only add to queue if under the maximum number of attempts per execution
..I ADDED<MAX D ATTEMPT(DFNIEN,.ADDED,.ERRORS)
S DUZ(2)=TMPDUZ2 ;RESTORE DUZ(2) TO TASKER
I '$D(ZTQUEUED) D
.W !,"PATIENT LOCKED: ",LOCKED
.W !,"PATIENT MERGED: ",MERGED
.W !,"NO CHARTS FOR PATIENT: ",NOCHART
.W !,"ORF IS OFF FOR LOCATION/STATION: ",NONORF
.W !!,"ICN MISSING FROM PATIENT/STATION: ",MISSING
.W !,"ALREADY ON QUEUE: ",QUEUED
.W !,"ERRORS: ",ERRORS
.W !,"MESSAGES QUEUED: ",ADDED I ADDED>MAX W " *** Per execution maximum of ",MAX," exceeeded ***"
Q
;
ATTEMPT(DFN,ADDED,ERRORS) ;EP - TRY TO ADD PTS WITH MISSING EUIDs
D CREATMSG^AGMPIHLO(DFN,"A28","",.SUCCESS) ;DO THE A28
I 'SUCCESS D Q
.S ERRORS=ERRORS+1
.S ERR="CANNOT CREATE A28 DURING 'AGMP MPI MISSING ICN TSK'"
.D NOTIF^AGMPIHLO(DFN,ERR)
;06/11/2013 - DMB - TFS8081 - If successful, update counter and add to the temporary global
S ADDED=ADDED+1
S ^XTMP("AGMPICN",DFNIEN,DUZ(2))=+$H
;05/29/2013 - KJH - TFS8109 - This was causing an extra message to be sent to EDR.
;S X="AG REGISTER A PATIENT",DIC=101,INDA=DFN
;D EN^XQOR
Q
;CREATE OUTGOING BATCH
BATCHOUT() ;EP - THIS ENTRY POINT WILL COLLECT A28 MESSAGE FOR PTS WITH MISSING ICNS
N MSG,PARMS,SEG,WHOTO,DFN,QUIT,BATCH,HLMP,HLMSTATE
S BATCH=1
S HLPM("MESSAGE TYPE")="ADT"
S HLPM("EVENT")="A28"
S HLPM("VERSION")=2.4
S HLPM("FIELD SEPARATOR")="^"
S HLPM("ENCODING CHARACTERS")="~|\&"
S HL1("ECH")=HLPM("ENCODING CHARACTERS")
S COMP=$E(HL1("ECH"))
S HL1("FS")=HLPM("FIELD SEPARATOR")
S HL1("ECH")="~|\&"
S HL1("FS")="^"
S HL1("Q")=""
S HL1("VER")=2.4
I '$$NEWBATCH^HLOAPI(.HLPM,.HLMSTATE,.ERR) D Q 0
.D NOTIF^AGMPIHLO(0,"Unable to create batch."_$S($D(ERR):" ERR:"_$G(ERR),1:""))
S (DFNIEN,QUIT)=0
F S DFNIEN=$O(^DPT(DFNIEN)) Q:'DFNIEN!(QUIT) D
.Q:$$GET1^DIQ(2,DFNIEN_",",991.01,"E") ;INTEGRATION CONTROL NUMBER
.Q:$D(^DPT(DFNIEN,-9)) ;DON'T ATTEMPT FOR MERGED RECORDS
.I $$DEMOPAT^AGMPHLU(DFNIEN) Q ; 9/13/2017 - GCD - CR 7713 - Don't upload demo patients.
.;IF NO ICN THEN TRY A LOCK, IF CAN'T LOCK PATIENT RECORD BEING BUILT??
.L +^DPT(DFNIEN):5 I '$T Q
.L -^DPT(DFNIEN)
.D
..I '$$ADDMSG^HLOAPI(.HLMSTATE,.HLPM,.ERR) D Q
...S QUIT=1
...D NOTIF^AGMPIHLO(0,"UNABLE TO ADD MESSAGE TO BATCH."_$S($D(ERR):" ERR:"_$G(ERR),1:""))
..M HLST=HLMSTATE
..D EVN^AGMPIHLO(HLPM("EVENT"))
..I '$D(ERR) D PID^AGMPIHL1(DFNIEN)
..I '$D(ERR) D ZPD^AGMPIHL1(DFNIEN)
..I $D(ERR) D NOTIF^AGMPIHLO(0,"UNABLE TO ADD MSG TO BATCH."_$S($D(ERR):" ERR:"_$G(ERR),1:""))
..;D VTQ(DFNIEN,.SEG,.MSG)
..;I '$$ADDSEG^HLOAPI(.MSG,.SEG,.ERR) Q
..;D RDF(DFNIEN,.SEG,.MSG)
..;I '$$ADDSEG^HLOAPI(.MSG,.SEG,.ERR) Q
Q:QUIT 0
;B "S+"
D SET
; 05/24/2013 - KJH - TFS8008 - Remove extraneous locks on the HLO globals.
I '$$SENDONE^HLOAPI1(.MSG,.APPARMS,.WHO,.ERR) D Q 0
.D NOTIF^AGMPIHLO(0,"UNABLE TO SEND BATCH."_$S($D(ERR):" ERR:"_$G(ERR),1:""))
K BATCH
Q 1
;
SET ;EP - INIT VARS FOR BATCH
S APPARMS("SENDING APPLICATION")="RPMS-MPI"
S APPARMS("ACCEPT ACK TYPE")="AL" ;Commit ACK type
;S APPARMS("ACCEPT ACK TYPE")="NE" ;(FIELD 15) Commit ACK type ;TPF - CHANGED TO THIS BECASUE OF "SE" ERRORS APPARMS("APP ACK RESPONSE")="AACK^AGMPIHLO" ;Callback when 'application ACK' is received
S APPARMS("ACCEPT ACK RESPONSE")="CACK^AGMPIHLO" ;Callback when 'commit ACK' is received
;S APPARMS("APP ACK TYPE")="AL" ;Application ACK type
S APPARMS("APP ACK TYPE")="NE" ;(FIELD 16) Application ACK type ;TPF - CHANGED TO THIS BECASUE OF "SE" ERROR
S APPARMS("QUEUE")="MPI RPMS" ;Incoming QUEUE
S APPARMS("RECEIVING APPLICATION")="MPI RPMS"
S WHO("RECEIVING APPLICATION")="MPI" ;THIS DOES OVERRIDE LINE ABOVE
S WHO("FACILITY LINK NAME")="MPI"
S WHO("STATION NUMBER")=8990 ;IHS/SD/TPF MPI TEST
;S WHO("IE LINK NAME")="MPIVA" ;FOR EARLIER TESTS
S WHO("IE LINK NAME")="MPI" ;FOR HLO TESTING
;S APPARMS("SENDING FACILITY")=14752 ;14752 IS SELLS
S APPARMS("SENDING FACILITY")=$$GET1^DIQ(4,DUZ(2)_",",99,"E")
Q
;SET(SEG,VALUE,FIELD,REP,COMP,SUBCOMP)
;THIS LOOKS MORE LIKE THE ARRAY WILL ACTUALLY TURN OUT
;AND ALSO MATCHES THE AGMPPARS V1.6 MESSAGE PARSER GENERIC OUTPUT
MYSET(ARY,V,F,R,C,S) ;EP
D SET^HLOAPI(.ARY,.V,.F,.C,.S,.R)
Q
AGMPHLEU ; IHS/SD/TPF - HLO MPI A28 MISSING ICN BACKGROUND TASKS ;
+1 ;;7.2;IHS PATIENT REGISTRATION;**1,3,6**;MAY 20, 2010;Build 23
+2 ;
+3 ;RTN RUNS IN BACKGROUND AND TRAVERSES VA PATIENT FILE
+4 ;ANY RECORDS WITH FIELD ANY RECORDS WIH ONLY A LOCAL ICN
+5 ;OR MISSING AN EUID AN ATTEMPT WILL BE MADE TO DO ANOTHER
+6 ;EXACT MATCH QUERY A28 IN THE SAME WAY AS DONE IN THE 'ADD; OPTION
START ;EP - START UP MISSING AND LOCAL ID TASK
+1 DO MISSEUID
+2 QUIT
+3 ;
MISSEUID ;EP - PROCESS MISSING EUID
+1 NEW DFNIEN,MISSING,ADDED,ERRORS,TMPDUZ2,NONORF,MERGED,LOCKED,NOCHART,QUEUED,PICN,TICN,DELAY,MAX,DA,CNT
+2 SET TMPDUZ2=DUZ(2)
+3 SET (MISSING,ADDED,ERRORS,NONORF,MERGED,LOCKED,NOCHART,QUEUED)=0
+4 ;05/30/2013 - KJH - TFS8081 - Update the ^XTMP global used to store temporary info about the MISSING ICN TASK.
+5 SET ^XTMP("AGMPICN",0)=$$FMADD^XLFDT(DT,58)_U_DT_U_"AGMP MPI MISSING ICN TSK"
+6 ;If not set, use 14 day minimum between attempts to get an ICN for a patient.
SET DELAY=+$GET(^XTMP("AGMPICN","DELAY"))
IF DELAY=0
SET DELAY=14
+7 ;If not set, use 5000 as the maximum number of attempts.
SET MAX=+$GET(^XTMP("AGMPICN","MAX"))
IF MAX=0
SET MAX=5000
+8 ;06/07/2013 - DMB - TFS8081 - If running in foreground, let user pick maximum number of records to extract
+9 IF '$DATA(ZTQUEUED)
Begin DoDot:1
+10 NEW DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
+11 WRITE !!,"Enter the maximum number of messages you would like to create. If you want to"
+12 WRITE !,"send messages for all active charts for all patients who are currently missing"
+13 WRITE !,"an ICN, enter 9999999",!
+14 SET DIR(0)="NA^1:9999999:0"
SET DIR("A")="Maximum number of messages to send? "
SET DIR("B")=MAX
+15 DO ^DIR
+16 IF +Y<1
SET MAX=-1
QUIT
+17 SET MAX=Y
End DoDot:1
IF MAX=-1
QUIT
+18 SET DFNIEN=0
+19 ;05/30/2013 - KJH - TFS8081 - Update the MISSING ICN TASK to use the TREATING FACILITY LIST.
+20 FOR CNT=0:1
SET DFNIEN=$ORDER(^DPT(DFNIEN))
IF 'DFNIEN
QUIT
Begin DoDot:1
+21 ;DON'T ATTEMPT FOR MERGED RECORDS
IF $DATA(^DPT(DFNIEN,-9))
SET MERGED=MERGED+1
QUIT
+22 ; 9/13/2017 - GCD - CR 7713 - Don't upload demo patients.
IF $$DEMOPAT^AGMPHLU(DFNIEN)
QUIT
+23 ;PATIENT INTEGRATION CONTROL NUMBER
SET PICN=$$GET1^DIQ(2,DFNIEN_",",991.01,"E")
+24 ;W !,DFNIEN
+25 ;TRY A LOCK. IF CAN'T LOCK PATIENT, RECORD BEING BUILT??
+26 LOCK +^DPT(DFNIEN):5
IF '$TEST
SET LOCKED=LOCKED+1
QUIT
+27 LOCK -^DPT(DFNIEN)
+28 IF '$DATA(ZTQUEUED)
IF CNT#1000=0
WRITE "."
+29 IF '$ORDER(^AUPNPAT(DFNIEN,41,0))
SET NOCHART=NOCHART+1
QUIT
+30 SET DUZ(2)=0
+31 FOR
SET DUZ(2)=$ORDER(^AUPNPAT(DFNIEN,41,DUZ(2)))
IF DUZ(2)=""
QUIT
Begin DoDot:2
+32 ;W !,?5,$S($P($G(^AGFAC(DUZ(2),0)),U,21)'="":$P($G(^AGFAC(DUZ(2),0)),U,21),1:"UNDEFINED")
+33 ;ONLY "OFFICAL REGISTERING FACILITIES"
IF $PIECE($GET(^AGFAC(DUZ(2),0)),U,21)'="Y"
Begin DoDot:3
+34 SET NONORF=NONORF+1
End DoDot:3
QUIT
+35 SET DA=$ORDER(^DGCN(391.91,"AINST",DUZ(2),DFNIEN,""))
SET TICN=""
+36 ;TREATING FACILITY INTEGRATION CONTROL NUMBER
IF DA
SET TICN=$$GET1^DIQ(391.91,DA_",",9999999.02,"E")
+37 ;05/30/2013 - KJH - TFS8081 - Add code to try to prevent system from attempting to resend a request until at least 7 days have passed.
+38 ; OK. Does not need to be tracked.
IF PICN]""
IF TICN]""
IF PICN=TICN
KILL ^XTMP("AGMPICN",DFNIEN,DUZ(2))
QUIT
+39 SET MISSING=MISSING+1
+40 ;Wait at least 'DELAY' days before trying again.
IF $GET(^XTMP("AGMPICN",DFNIEN,DUZ(2)))+DELAY>+$HOROLOG
SET QUEUED=QUEUED+1
QUIT
+41 ;06/11/2013 - DMB - TFS8081 - Only add to queue if under the maximum number of attempts per execution
+42 IF ADDED<MAX
DO ATTEMPT(DFNIEN,.ADDED,.ERRORS)
End DoDot:2
End DoDot:1
+43 ;RESTORE DUZ(2) TO TASKER
SET DUZ(2)=TMPDUZ2
+44 IF '$DATA(ZTQUEUED)
Begin DoDot:1
+45 WRITE !,"PATIENT LOCKED: ",LOCKED
+46 WRITE !,"PATIENT MERGED: ",MERGED
+47 WRITE !,"NO CHARTS FOR PATIENT: ",NOCHART
+48 WRITE !,"ORF IS OFF FOR LOCATION/STATION: ",NONORF
+49 WRITE !!,"ICN MISSING FROM PATIENT/STATION: ",MISSING
+50 WRITE !,"ALREADY ON QUEUE: ",QUEUED
+51 WRITE !,"ERRORS: ",ERRORS
+52 WRITE !,"MESSAGES QUEUED: ",ADDED
IF ADDED>MAX
WRITE " *** Per execution maximum of ",MAX," exceeeded ***"
End DoDot:1
+53 QUIT
+54 ;
ATTEMPT(DFN,ADDED,ERRORS) ;EP - TRY TO ADD PTS WITH MISSING EUIDs
+1 ;DO THE A28
DO CREATMSG^AGMPIHLO(DFN,"A28","",.SUCCESS)
+2 IF 'SUCCESS
Begin DoDot:1
+3 SET ERRORS=ERRORS+1
+4 SET ERR="CANNOT CREATE A28 DURING 'AGMP MPI MISSING ICN TSK'"
+5 DO NOTIF^AGMPIHLO(DFN,ERR)
End DoDot:1
QUIT
+6 ;06/11/2013 - DMB - TFS8081 - If successful, update counter and add to the temporary global
+7 SET ADDED=ADDED+1
+8 SET ^XTMP("AGMPICN",DFNIEN,DUZ(2))=+$HOROLOG
+9 ;05/29/2013 - KJH - TFS8109 - This was causing an extra message to be sent to EDR.
+10 ;S X="AG REGISTER A PATIENT",DIC=101,INDA=DFN
+11 ;D EN^XQOR
+12 QUIT
+13 ;CREATE OUTGOING BATCH
BATCHOUT() ;EP - THIS ENTRY POINT WILL COLLECT A28 MESSAGE FOR PTS WITH MISSING ICNS
+1 NEW MSG,PARMS,SEG,WHOTO,DFN,QUIT,BATCH,HLMP,HLMSTATE
+2 SET BATCH=1
+3 SET HLPM("MESSAGE TYPE")="ADT"
+4 SET HLPM("EVENT")="A28"
+5 SET HLPM("VERSION")=2.4
+6 SET HLPM("FIELD SEPARATOR")="^"
+7 SET HLPM("ENCODING CHARACTERS")="~|\&"
+8 SET HL1("ECH")=HLPM("ENCODING CHARACTERS")
+9 SET COMP=$EXTRACT(HL1("ECH"))
+10 SET HL1("FS")=HLPM("FIELD SEPARATOR")
+11 SET HL1("ECH")="~|\&"
+12 SET HL1("FS")="^"
+13 SET HL1("Q")=""
+14 SET HL1("VER")=2.4
+15 IF '$$NEWBATCH^HLOAPI(.HLPM,.HLMSTATE,.ERR)
Begin DoDot:1
+16 DO NOTIF^AGMPIHLO(0,"Unable to create batch."_$SELECT($DATA(ERR):" ERR:"_$GET(ERR),1:""))
End DoDot:1
QUIT 0
+17 SET (DFNIEN,QUIT)=0
+18 FOR
SET DFNIEN=$ORDER(^DPT(DFNIEN))
IF 'DFNIEN!(QUIT)
QUIT
Begin DoDot:1
+19 ;INTEGRATION CONTROL NUMBER
IF $$GET1^DIQ(2,DFNIEN_",",991.01,"E")
QUIT
+20 ;DON'T ATTEMPT FOR MERGED RECORDS
IF $DATA(^DPT(DFNIEN,-9))
QUIT
+21 ; 9/13/2017 - GCD - CR 7713 - Don't upload demo patients.
IF $$DEMOPAT^AGMPHLU(DFNIEN)
QUIT
+22 ;IF NO ICN THEN TRY A LOCK, IF CAN'T LOCK PATIENT RECORD BEING BUILT??
+23 LOCK +^DPT(DFNIEN):5
IF '$TEST
QUIT
+24 LOCK -^DPT(DFNIEN)
+25 Begin DoDot:2
+26 IF '$$ADDMSG^HLOAPI(.HLMSTATE,.HLPM,.ERR)
Begin DoDot:3
+27 SET QUIT=1
+28 DO NOTIF^AGMPIHLO(0,"UNABLE TO ADD MESSAGE TO BATCH."_$SELECT($DATA(ERR):" ERR:"_$GET(ERR),1:""))
End DoDot:3
QUIT
+29 MERGE HLST=HLMSTATE
+30 DO EVN^AGMPIHLO(HLPM("EVENT"))
+31 IF '$DATA(ERR)
DO PID^AGMPIHL1(DFNIEN)
+32 IF '$DATA(ERR)
DO ZPD^AGMPIHL1(DFNIEN)
+33 IF $DATA(ERR)
DO NOTIF^AGMPIHLO(0,"UNABLE TO ADD MSG TO BATCH."_$SELECT($DATA(ERR):" ERR:"_$GET(ERR),1:""))
+34 ;D VTQ(DFNIEN,.SEG,.MSG)
+35 ;I '$$ADDSEG^HLOAPI(.MSG,.SEG,.ERR) Q
+36 ;D RDF(DFNIEN,.SEG,.MSG)
+37 ;I '$$ADDSEG^HLOAPI(.MSG,.SEG,.ERR) Q
End DoDot:2
End DoDot:1
+38 IF QUIT
QUIT 0
+39 ;B "S+"
+40 DO SET
+41 ; 05/24/2013 - KJH - TFS8008 - Remove extraneous locks on the HLO globals.
+42 IF '$$SENDONE^HLOAPI1(.MSG,.APPARMS,.WHO,.ERR)
Begin DoDot:1
+43 DO NOTIF^AGMPIHLO(0,"UNABLE TO SEND BATCH."_$SELECT($DATA(ERR):" ERR:"_$GET(ERR),1:""))
End DoDot:1
QUIT 0
+44 KILL BATCH
+45 QUIT 1
+46 ;
SET ;EP - INIT VARS FOR BATCH
+1 SET APPARMS("SENDING APPLICATION")="RPMS-MPI"
+2 ;Commit ACK type
SET APPARMS("ACCEPT ACK TYPE")="AL"
+3 ;S APPARMS("ACCEPT ACK TYPE")="NE" ;(FIELD 15) Commit ACK type ;TPF - CHANGED TO THIS BECASUE OF "SE" ERRORS APPARMS("APP ACK RESPONSE")="AACK^AGMPIHLO" ;Callback when 'application ACK' is received
+4 ;Callback when 'commit ACK' is received
SET APPARMS("ACCEPT ACK RESPONSE")="CACK^AGMPIHLO"
+5 ;S APPARMS("APP ACK TYPE")="AL" ;Application ACK type
+6 ;(FIELD 16) Application ACK type ;TPF - CHANGED TO THIS BECASUE OF "SE" ERROR
SET APPARMS("APP ACK TYPE")="NE"
+7 ;Incoming QUEUE
SET APPARMS("QUEUE")="MPI RPMS"
+8 SET APPARMS("RECEIVING APPLICATION")="MPI RPMS"
+9 ;THIS DOES OVERRIDE LINE ABOVE
SET WHO("RECEIVING APPLICATION")="MPI"
+10 SET WHO("FACILITY LINK NAME")="MPI"
+11 ;IHS/SD/TPF MPI TEST
SET WHO("STATION NUMBER")=8990
+12 ;S WHO("IE LINK NAME")="MPIVA" ;FOR EARLIER TESTS
+13 ;FOR HLO TESTING
SET WHO("IE LINK NAME")="MPI"
+14 ;S APPARMS("SENDING FACILITY")=14752 ;14752 IS SELLS
+15 SET APPARMS("SENDING FACILITY")=$$GET1^DIQ(4,DUZ(2)_",",99,"E")
+16 QUIT
+17 ;SET(SEG,VALUE,FIELD,REP,COMP,SUBCOMP)
+18 ;THIS LOOKS MORE LIKE THE ARRAY WILL ACTUALLY TURN OUT
+19 ;AND ALSO MATCHES THE AGMPPARS V1.6 MESSAGE PARSER GENERIC OUTPUT
MYSET(ARY,V,F,R,C,S) ;EP
+1 DO SET^HLOAPI(.ARY,.V,.F,.C,.S,.R)
+2 QUIT