PXRMEXIH ; SLC/PKR - Routines for installation history. ;01/25/2013
;;2.0;CLINICAL REMINDERS;**6,12,26**;Feb 04, 2005;Build 404
;======================================================
BLDLIST ;Build a list of install histories in ^TMP("PXRMEXIH",$J).
N DATE,FMTSTR,IHIEN,IND,INDONE,JND,NAME,NL,NLINE,NSEL,OUTPUT
N SOURCE,TDATE,TEMP,TEXT,TYPE
K ^TMP("PXRMEXIH",$J)
S FMTSTR=$$LMFMTSTR^PXRMTEXT(.VALMDDF,"LLL")
S (NLINE,NSEL,VALMCNT)=0
S INDONE=+$P($G(^PXD(811.8,PXRMRIEN,130,0)),U,4)
S TEMP=^PXD(811.8,PXRMRIEN,0)
S NAME=" "_$P(TEMP,U,1)
S SOURCE=$P(TEMP,U,2)
S DATE=$P(TEMP,U,3)
D FMT(NAME,SOURCE,DATE,FMTSTR,.NL,.OUTPUT)
F JND=1:1:NL S NLINE=NLINE+1,^TMP("PXRMEXIH",$J,NLINE,0)=OUTPUT(JND)
S FMTSTR="4R1^20L2^15L2^35L"
S TEXT=" ^Installation Date^Type^Installed By"
D COLFMT^PXRMTEXT(FMTSTR,TEXT," ",.NL,.OUTPUT)
F JND=1:1:NL S NLINE=NLINE+1,^TMP("PXRMEXIH",$J,NLINE,0)=OUTPUT(JND)
S TEXT=" ^-------------------^----^------------"
D COLFMT^PXRMTEXT(FMTSTR,TEXT," ",.NL,.OUTPUT)
F JND=1:1:NL S NLINE=NLINE+1,^TMP("PXRMEXIH",$J,NLINE,0)=OUTPUT(JND)
I 'INDONE D Q
. S NLINE=NLINE+1
. S ^TMP("PXRMEXIH",$J,NLINE,0)=" none"
. S NLINE=NLINE+1
. S ^TMP("PXRMEXIH",$J,NLINE,0)=" "
. S VALMCNT=1
;Build the "dummy" lines so EN^VALM2 will work.
F IND=1:1:NLINE S ^TMP("PXRMEXIH",$J,"IDX",IND,1)=""
S DATE=""
F S DATE=$O(^PXD(811.8,PXRMRIEN,130,"B",DATE)) Q:DATE="" D
. S NSEL=NSEL+1
. S IHIEN=$O(^PXD(811.8,PXRMRIEN,130,"B",DATE,""))
. S TEMP=^PXD(811.8,PXRMRIEN,130,IHIEN,0)
. S TDATE=$$FMTE^XLFDT($P(TEMP,U,1),"5Z")
. S SOURCE=$P(TEMP,U,2)
. S TYPE=$P(TEMP,U,3)
. S TEXT=NSEL_U_TDATE_U_TYPE_U_SOURCE
. D COLFMT^PXRMTEXT(FMTSTR,TEXT," ",.NL,.OUTPUT)
. F JND=1:1:NL D
.. S NLINE=NLINE+1,^TMP("PXRMEXIH",$J,NLINE,0)=OUTPUT(JND)
.. S ^TMP("PXRMEXIH",$J,"IDX",NLINE,NSEL)=""
.. S ^TMP("PXRMEXIH",$J,"SEL",NSEL)=PXRMRIEN_U_IHIEN
S NLINE=NLINE+1,^TMP("PXRMEXIH",$J,NLINE,0)=" "
S VALMCNT=NLINE
S ^TMP("PXRMEXIH",$J,"VALMCNT")=NLINE
S ^TMP("PXRMEXIH",$J,"IDX",NLINE,NSEL)=""
Q
;
;======================================================
DELETE(LIST) ;Delete the install histories on the list.
N IHIEN,IND,RIEN,TEMP
S IND=""
F S IND=$O(LIST(IND)) Q:IND="" D
. S TEMP=^TMP("PXRMEXIH",$J,"SEL",IND)
. S RIEN=$P(TEMP,U,1)
. S IHIEN=$P(TEMP,U,2)
. D DELHIST^PXRMEXU1(RIEN,IHIEN)
;Rebuild the history list display.
D BLDLIST
S VALMBCK="R"
Q
;
;======================================================
DELHIST ;Get a list of repository installation entries and delete them.
;Save the original list, it contains the selected repository entries.
N VALMBG,VALMLST,VALMY
S VALMBG=1,VALMLST=+$O(^TMP("PXRMEXIH",$J,"IDX",""),-1)
;Get the list to delete.
D EN^VALM2(XQORNOD(0))
;If there is no list quit.
I '$D(VALMY) Q
D DELETE(.VALMY)
Q
;
;======================================================
DETAILS ;Output the details of an installation.
N VALMBG,VALMCNT,VALMLST,VALMY
S VALMBG=1,VALMLST=+$O(^TMP("PXRMEXIH",$J,"IDX",""),-1)
S VALMCNT=+$G(^TMP("PXRMEXIH",$J,"VALMCNT"))
;Get the list to display.
D EN^VALM2(XQORNOD(0))
;If there is no list quit.
I '$D(VALMY) Q
D DDISP(.VALMY)
Q
;
;==================================================
DDISP(ARRAY) ;Display details list
N ACTION,CAPTION,CMPNT,DI,DP,ENTRY,FMTSTR,IHIEN,IND,JND,KND
N NL,NLINE,OUTPUT,RIEN,TEMP,TEXT,VALMCNT,VALMHDR
K ^TMP("PXRMEXID",$J)
;If there are no items then quit.
I '$D(ARRAY) Q
S FMTSTR="4R1^34L2^6C2^34L"
S VALMCNT=0
S TEMP=^PXD(811.8,PXRMRIEN,0)
S ENTRY=$E($P(TEMP,U,1),1,38)
S DP=$$FMTE^XLFDT($P(TEMP,U,3),"5Z")
;CAPTION is used in ENTRY action of LM template
S CAPTION="Entry: "_ENTRY_" Date Packed: "_DP
S (IND,NLINE)=0
F S IND=$O(ARRAY(IND)) Q:IND="" D
. S TEMP=^TMP("PXRMEXIH",$J,"SEL",IND)
. S RIEN=$P(TEMP,U,1)
. S IHIEN=$P(TEMP,U,2)
. S DI=$$FMTE^XLFDT(^PXD(811.8,RIEN,130,IHIEN,0),"5Z")
. I NLINE>1 D
.. S NLINE=NLINE+1
.. S ^TMP("PXRMEXID",$J,NLINE,0)="------------------------------------------------------------------------------"
. S NLINE=NLINE+1
. S ^TMP("PXRMEXID",$J,NLINE,0)="Installation date: "_DI
.;Write the header line here.
. S NLINE=NLINE+1
. S ^TMP("PXRMEXID",$J,NLINE,0)=" Component Action New Name"
. S CMPNT=""
. S JND=0
. F S JND=+$O(^PXD(811.8,RIEN,130,IHIEN,1,JND)) Q:JND=0 D
.. S TEMP=^PXD(811.8,RIEN,130,IHIEN,1,JND,0)
.. I $P(TEMP,U,2)'=CMPNT D
... S NLINE=NLINE+1
... S ^TMP("PXRMEXID",$J,NLINE,0)=" "
... S CMPNT=$P(TEMP,U,2)
... S NLINE=NLINE+1
... S ^TMP("PXRMEXID",$J,NLINE,0)=CMPNT
..;The first piece is the component number in the packed reminder.
.. S TEXT=$P(TEMP,U,1)_U_$P(TEMP,U,3,5)
.. D COLFMT^PXRMTEXT(FMTSTR,TEXT," ",.NL,.OUTPUT)
.. F KND=1:1:NL S NLINE=NLINE+1,^TMP("PXRMEXID",$J,NLINE,0)=OUTPUT(KND)
..;If there are Additional Details add them to the display.
.. S KND=0
.. F S KND=$O(^PXD(811.8,RIEN,130,IHIEN,1,JND,1,KND)) Q:KND="" D
... S NLINE=NLINE+1
... S ^TMP("PXRMEXID",$J,NLINE,0)=^PXD(811.8,RIEN,130,IHIEN,1,JND,1,KND,0)
. S NLINE=NLINE+1
. S ^TMP("PXRMEXID",$J,NLINE,0)=" "
S VALMHDR(1)=^PXD(811.8,RIEN,0)_" "_^TMP("PXRMEXID",$J,1,0)
S VALMCNT=NLINE
D EN^VALM("PXRM EX INSTALLATION DETAIL")
K ^TMP("PXRMEXID",$J)
Q
;
;======================================================
ENTRY ;List Manager ENTRY entry point.
D BLDLIST,XQORM
Q
;
;======================================================
EXIT ;List Manager EXIT entry point.
K ^TMP("PXRMEXIH",$J)
Q
;
;======================================================
FMT(ENTRY,SOURCE,DATE,FMTSTR,NL,OUTPUT) ;
N TEMP
S TEMP=NAME_U_SOURCE
S DATE=$$FMTE^XLFDT(DATE,"5Z")
S TEMP=TEMP_U_DATE
D COLFMT^PXRMTEXT(FMTSTR,TEMP," ",.NL,.OUTPUT)
Q
;
;======================================================
HDR ;List Manager HEADER entry point.
S VALMHDR(1)="Exchange File Entry History."
S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
Q
;
;======================================================
HELP ;Help code
W !,"Select DH to delete install histories."
W !,"Select ID to see the details of an install."
D PAUSE^VALM1
Q
;
;======================================================
IHIST ;Get a list of repository entries and show their installation history.
N PXRMRIEN,VALMCNT,VALMY
D EN^VALM2(XQORNOD(0))
;If there is no list quit.
I '$D(VALMY) Q
S IND=""
F S IND=$O(VALMY(IND)) Q:IND="" D
. S PXRMRIEN=^TMP("PXRMEXLR",$J,"SEL",IND)
. D EN^VALM("PXRM EX INSTALLATION HISTORY")
S VALMBCK="R"
Q
;
;=====================================================
PEXIT ;PXRM EXCH SELECT HISTORY protocol exit code
S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
;Reset after page up/down etc
D XQORM
Q
;
;======================================================
START ;Main entry point for installation history. The Exchange File IEN is
;PXRMRIEN.
N VALMBCK,VALMCNT,VALMSG,X,XMZ,XQORM,XQORNOD
S X="IORESET"
D ENDR^%ZISS
S VALMCNT=0
D EN^VALM("PXRM EX INSTALLATION HISTORY")
Q
;
;======================================================
XQORM S XQORM("#")=$O(^ORD(101,"B","PXRM EXCH SELECT HISTORY",0))_U_"1:"_VALMCNT
S XQORM("A")="Select Action: "
Q
;
;======================================================
XSEL ;PXRM EXCH SELECT HISTORY validation
N ARRAY,CNT,SEL,SELECT
S SELECT=$P(XQORNOD(0),"=",2)
I '$$VALID^PXRMEXLD(SELECT) S VALMBCK="R" Q
;Build array of selected items
F CNT=1:1 S SEL=$P(SELECT,",",CNT) Q:'SEL S ARRAY(SEL)=""
;
D FULL^VALM1
;
;Option to display installation details or delete install history.
N DIR,DIROUT,DIRUT,DTOUT,DUOUT,OPTION,X,Y
S DIR(0)="SBM"_U_"DH:Delete Install History;"
S DIR(0)=DIR(0)_"ID:Installation Details;"
S DIR("A")="Select Action: "
S DIR("B")="ID"
S DIR("?")="Select from the codes displayed."
D ^DIR
I $D(DIROUT)!$D(DIRUT) S VALMBCK="R" Q
I $D(DTOUT)!$D(DUOUT) S VALMBCK="R" Q
S OPTION=Y
;
;Display installation details.
I OPTION="ID" D DDISP(.ARRAY)
;
;Delete installation history.
I OPTION="DH" D DELETE(.ARRAY)
S VALMBCK="R"
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRMEXIH 8244 printed Dec 13, 2024@01:44:59 Page 2
PXRMEXIH ; SLC/PKR - Routines for installation history. ;01/25/2013
+1 ;;2.0;CLINICAL REMINDERS;**6,12,26**;Feb 04, 2005;Build 404
+2 ;======================================================
BLDLIST ;Build a list of install histories in ^TMP("PXRMEXIH",$J).
+1 NEW DATE,FMTSTR,IHIEN,IND,INDONE,JND,NAME,NL,NLINE,NSEL,OUTPUT
+2 NEW SOURCE,TDATE,TEMP,TEXT,TYPE
+3 KILL ^TMP("PXRMEXIH",$JOB)
+4 SET FMTSTR=$$LMFMTSTR^PXRMTEXT(.VALMDDF,"LLL")
+5 SET (NLINE,NSEL,VALMCNT)=0
+6 SET INDONE=+$PIECE($GET(^PXD(811.8,PXRMRIEN,130,0)),U,4)
+7 SET TEMP=^PXD(811.8,PXRMRIEN,0)
+8 SET NAME=" "_$PIECE(TEMP,U,1)
+9 SET SOURCE=$PIECE(TEMP,U,2)
+10 SET DATE=$PIECE(TEMP,U,3)
+11 DO FMT(NAME,SOURCE,DATE,FMTSTR,.NL,.OUTPUT)
+12 FOR JND=1:1:NL
SET NLINE=NLINE+1
SET ^TMP("PXRMEXIH",$JOB,NLINE,0)=OUTPUT(JND)
+13 SET FMTSTR="4R1^20L2^15L2^35L"
+14 SET TEXT=" ^Installation Date^Type^Installed By"
+15 DO COLFMT^PXRMTEXT(FMTSTR,TEXT," ",.NL,.OUTPUT)
+16 FOR JND=1:1:NL
SET NLINE=NLINE+1
SET ^TMP("PXRMEXIH",$JOB,NLINE,0)=OUTPUT(JND)
+17 SET TEXT=" ^-------------------^----^------------"
+18 DO COLFMT^PXRMTEXT(FMTSTR,TEXT," ",.NL,.OUTPUT)
+19 FOR JND=1:1:NL
SET NLINE=NLINE+1
SET ^TMP("PXRMEXIH",$JOB,NLINE,0)=OUTPUT(JND)
+20 IF 'INDONE
Begin DoDot:1
+21 SET NLINE=NLINE+1
+22 SET ^TMP("PXRMEXIH",$JOB,NLINE,0)=" none"
+23 SET NLINE=NLINE+1
+24 SET ^TMP("PXRMEXIH",$JOB,NLINE,0)=" "
+25 SET VALMCNT=1
End DoDot:1
QUIT
+26 ;Build the "dummy" lines so EN^VALM2 will work.
+27 FOR IND=1:1:NLINE
SET ^TMP("PXRMEXIH",$JOB,"IDX",IND,1)=""
+28 SET DATE=""
+29 FOR
SET DATE=$ORDER(^PXD(811.8,PXRMRIEN,130,"B",DATE))
if DATE=""
QUIT
Begin DoDot:1
+30 SET NSEL=NSEL+1
+31 SET IHIEN=$ORDER(^PXD(811.8,PXRMRIEN,130,"B",DATE,""))
+32 SET TEMP=^PXD(811.8,PXRMRIEN,130,IHIEN,0)
+33 SET TDATE=$$FMTE^XLFDT($PIECE(TEMP,U,1),"5Z")
+34 SET SOURCE=$PIECE(TEMP,U,2)
+35 SET TYPE=$PIECE(TEMP,U,3)
+36 SET TEXT=NSEL_U_TDATE_U_TYPE_U_SOURCE
+37 DO COLFMT^PXRMTEXT(FMTSTR,TEXT," ",.NL,.OUTPUT)
+38 FOR JND=1:1:NL
Begin DoDot:2
+39 SET NLINE=NLINE+1
SET ^TMP("PXRMEXIH",$JOB,NLINE,0)=OUTPUT(JND)
+40 SET ^TMP("PXRMEXIH",$JOB,"IDX",NLINE,NSEL)=""
+41 SET ^TMP("PXRMEXIH",$JOB,"SEL",NSEL)=PXRMRIEN_U_IHIEN
End DoDot:2
End DoDot:1
+42 SET NLINE=NLINE+1
SET ^TMP("PXRMEXIH",$JOB,NLINE,0)=" "
+43 SET VALMCNT=NLINE
+44 SET ^TMP("PXRMEXIH",$JOB,"VALMCNT")=NLINE
+45 SET ^TMP("PXRMEXIH",$JOB,"IDX",NLINE,NSEL)=""
+46 QUIT
+47 ;
+48 ;======================================================
DELETE(LIST) ;Delete the install histories on the list.
+1 NEW IHIEN,IND,RIEN,TEMP
+2 SET IND=""
+3 FOR
SET IND=$ORDER(LIST(IND))
if IND=""
QUIT
Begin DoDot:1
+4 SET TEMP=^TMP("PXRMEXIH",$JOB,"SEL",IND)
+5 SET RIEN=$PIECE(TEMP,U,1)
+6 SET IHIEN=$PIECE(TEMP,U,2)
+7 DO DELHIST^PXRMEXU1(RIEN,IHIEN)
End DoDot:1
+8 ;Rebuild the history list display.
+9 DO BLDLIST
+10 SET VALMBCK="R"
+11 QUIT
+12 ;
+13 ;======================================================
DELHIST ;Get a list of repository installation entries and delete them.
+1 ;Save the original list, it contains the selected repository entries.
+2 NEW VALMBG,VALMLST,VALMY
+3 SET VALMBG=1
SET VALMLST=+$ORDER(^TMP("PXRMEXIH",$JOB,"IDX",""),-1)
+4 ;Get the list to delete.
+5 DO EN^VALM2(XQORNOD(0))
+6 ;If there is no list quit.
+7 IF '$DATA(VALMY)
QUIT
+8 DO DELETE(.VALMY)
+9 QUIT
+10 ;
+11 ;======================================================
DETAILS ;Output the details of an installation.
+1 NEW VALMBG,VALMCNT,VALMLST,VALMY
+2 SET VALMBG=1
SET VALMLST=+$ORDER(^TMP("PXRMEXIH",$JOB,"IDX",""),-1)
+3 SET VALMCNT=+$GET(^TMP("PXRMEXIH",$JOB,"VALMCNT"))
+4 ;Get the list to display.
+5 DO EN^VALM2(XQORNOD(0))
+6 ;If there is no list quit.
+7 IF '$DATA(VALMY)
QUIT
+8 DO DDISP(.VALMY)
+9 QUIT
+10 ;
+11 ;==================================================
DDISP(ARRAY) ;Display details list
+1 NEW ACTION,CAPTION,CMPNT,DI,DP,ENTRY,FMTSTR,IHIEN,IND,JND,KND
+2 NEW NL,NLINE,OUTPUT,RIEN,TEMP,TEXT,VALMCNT,VALMHDR
+3 KILL ^TMP("PXRMEXID",$JOB)
+4 ;If there are no items then quit.
+5 IF '$DATA(ARRAY)
QUIT
+6 SET FMTSTR="4R1^34L2^6C2^34L"
+7 SET VALMCNT=0
+8 SET TEMP=^PXD(811.8,PXRMRIEN,0)
+9 SET ENTRY=$EXTRACT($PIECE(TEMP,U,1),1,38)
+10 SET DP=$$FMTE^XLFDT($PIECE(TEMP,U,3),"5Z")
+11 ;CAPTION is used in ENTRY action of LM template
+12 SET CAPTION="Entry: "_ENTRY_" Date Packed: "_DP
+13 SET (IND,NLINE)=0
+14 FOR
SET IND=$ORDER(ARRAY(IND))
if IND=""
QUIT
Begin DoDot:1
+15 SET TEMP=^TMP("PXRMEXIH",$JOB,"SEL",IND)
+16 SET RIEN=$PIECE(TEMP,U,1)
+17 SET IHIEN=$PIECE(TEMP,U,2)
+18 SET DI=$$FMTE^XLFDT(^PXD(811.8,RIEN,130,IHIEN,0),"5Z")
+19 IF NLINE>1
Begin DoDot:2
+20 SET NLINE=NLINE+1
+21 SET ^TMP("PXRMEXID",$JOB,NLINE,0)="------------------------------------------------------------------------------"
End DoDot:2
+22 SET NLINE=NLINE+1
+23 SET ^TMP("PXRMEXID",$JOB,NLINE,0)="Installation date: "_DI
+24 ;Write the header line here.
+25 SET NLINE=NLINE+1
+26 SET ^TMP("PXRMEXID",$JOB,NLINE,0)=" Component Action New Name"
+27 SET CMPNT=""
+28 SET JND=0
+29 FOR
SET JND=+$ORDER(^PXD(811.8,RIEN,130,IHIEN,1,JND))
if JND=0
QUIT
Begin DoDot:2
+30 SET TEMP=^PXD(811.8,RIEN,130,IHIEN,1,JND,0)
+31 IF $PIECE(TEMP,U,2)'=CMPNT
Begin DoDot:3
+32 SET NLINE=NLINE+1
+33 SET ^TMP("PXRMEXID",$JOB,NLINE,0)=" "
+34 SET CMPNT=$PIECE(TEMP,U,2)
+35 SET NLINE=NLINE+1
+36 SET ^TMP("PXRMEXID",$JOB,NLINE,0)=CMPNT
End DoDot:3
+37 ;The first piece is the component number in the packed reminder.
+38 SET TEXT=$PIECE(TEMP,U,1)_U_$PIECE(TEMP,U,3,5)
+39 DO COLFMT^PXRMTEXT(FMTSTR,TEXT," ",.NL,.OUTPUT)
+40 FOR KND=1:1:NL
SET NLINE=NLINE+1
SET ^TMP("PXRMEXID",$JOB,NLINE,0)=OUTPUT(KND)
+41 ;If there are Additional Details add them to the display.
+42 SET KND=0
+43 FOR
SET KND=$ORDER(^PXD(811.8,RIEN,130,IHIEN,1,JND,1,KND))
if KND=""
QUIT
Begin DoDot:3
+44 SET NLINE=NLINE+1
+45 SET ^TMP("PXRMEXID",$JOB,NLINE,0)=^PXD(811.8,RIEN,130,IHIEN,1,JND,1,KND,0)
End DoDot:3
End DoDot:2
+46 SET NLINE=NLINE+1
+47 SET ^TMP("PXRMEXID",$JOB,NLINE,0)=" "
End DoDot:1
+48 SET VALMHDR(1)=^PXD(811.8,RIEN,0)_" "_^TMP("PXRMEXID",$JOB,1,0)
+49 SET VALMCNT=NLINE
+50 DO EN^VALM("PXRM EX INSTALLATION DETAIL")
+51 KILL ^TMP("PXRMEXID",$JOB)
+52 QUIT
+53 ;
+54 ;======================================================
ENTRY ;List Manager ENTRY entry point.
+1 DO BLDLIST
DO XQORM
+2 QUIT
+3 ;
+4 ;======================================================
EXIT ;List Manager EXIT entry point.
+1 KILL ^TMP("PXRMEXIH",$JOB)
+2 QUIT
+3 ;
+4 ;======================================================
FMT(ENTRY,SOURCE,DATE,FMTSTR,NL,OUTPUT) ;
+1 NEW TEMP
+2 SET TEMP=NAME_U_SOURCE
+3 SET DATE=$$FMTE^XLFDT(DATE,"5Z")
+4 SET TEMP=TEMP_U_DATE
+5 DO COLFMT^PXRMTEXT(FMTSTR,TEMP," ",.NL,.OUTPUT)
+6 QUIT
+7 ;
+8 ;======================================================
HDR ;List Manager HEADER entry point.
+1 SET VALMHDR(1)="Exchange File Entry History."
+2 SET VALMSG="+ Next Screen - Prev Screen ?? More Actions"
+3 QUIT
+4 ;
+5 ;======================================================
HELP ;Help code
+1 WRITE !,"Select DH to delete install histories."
+2 WRITE !,"Select ID to see the details of an install."
+3 DO PAUSE^VALM1
+4 QUIT
+5 ;
+6 ;======================================================
IHIST ;Get a list of repository entries and show their installation history.
+1 NEW PXRMRIEN,VALMCNT,VALMY
+2 DO EN^VALM2(XQORNOD(0))
+3 ;If there is no list quit.
+4 IF '$DATA(VALMY)
QUIT
+5 SET IND=""
+6 FOR
SET IND=$ORDER(VALMY(IND))
if IND=""
QUIT
Begin DoDot:1
+7 SET PXRMRIEN=^TMP("PXRMEXLR",$JOB,"SEL",IND)
+8 DO EN^VALM("PXRM EX INSTALLATION HISTORY")
End DoDot:1
+9 SET VALMBCK="R"
+10 QUIT
+11 ;
+12 ;=====================================================
PEXIT ;PXRM EXCH SELECT HISTORY protocol exit code
+1 SET VALMSG="+ Next Screen - Prev Screen ?? More Actions"
+2 ;Reset after page up/down etc
+3 DO XQORM
+4 QUIT
+5 ;
+6 ;======================================================
START ;Main entry point for installation history. The Exchange File IEN is
+1 ;PXRMRIEN.
+2 NEW VALMBCK,VALMCNT,VALMSG,X,XMZ,XQORM,XQORNOD
+3 SET X="IORESET"
+4 DO ENDR^%ZISS
+5 SET VALMCNT=0
+6 DO EN^VALM("PXRM EX INSTALLATION HISTORY")
+7 QUIT
+8 ;
+9 ;======================================================
XQORM SET XQORM("#")=$ORDER(^ORD(101,"B","PXRM EXCH SELECT HISTORY",0))_U_"1:"_VALMCNT
+1 SET XQORM("A")="Select Action: "
+2 QUIT
+3 ;
+4 ;======================================================
XSEL ;PXRM EXCH SELECT HISTORY validation
+1 NEW ARRAY,CNT,SEL,SELECT
+2 SET SELECT=$PIECE(XQORNOD(0),"=",2)
+3 IF '$$VALID^PXRMEXLD(SELECT)
SET VALMBCK="R"
QUIT
+4 ;Build array of selected items
+5 FOR CNT=1:1
SET SEL=$PIECE(SELECT,",",CNT)
if 'SEL
QUIT
SET ARRAY(SEL)=""
+6 ;
+7 DO FULL^VALM1
+8 ;
+9 ;Option to display installation details or delete install history.
+10 NEW DIR,DIROUT,DIRUT,DTOUT,DUOUT,OPTION,X,Y
+11 SET DIR(0)="SBM"_U_"DH:Delete Install History;"
+12 SET DIR(0)=DIR(0)_"ID:Installation Details;"
+13 SET DIR("A")="Select Action: "
+14 SET DIR("B")="ID"
+15 SET DIR("?")="Select from the codes displayed."
+16 DO ^DIR
+17 IF $DATA(DIROUT)!$DATA(DIRUT)
SET VALMBCK="R"
QUIT
+18 IF $DATA(DTOUT)!$DATA(DUOUT)
SET VALMBCK="R"
QUIT
+19 SET OPTION=Y
+20 ;
+21 ;Display installation details.
+22 IF OPTION="ID"
DO DDISP(.ARRAY)
+23 ;
+24 ;Delete installation history.
+25 IF OPTION="DH"
DO DELETE(.ARRAY)
+26 SET VALMBCK="R"
+27 QUIT
+28 ;