BLRVPTCH ; IHS/OIT/MKK - LAB VERSION & LATEST PATCH REPORT ; 22-Oct-2013 09:22 ; MKK
;;5.2;IHS LABORATORY;**1025,1033**;NOV 01, 1997
;
; Show latest Lab Patch & Lab Version
;
EP ; EP
NEW HEADER,INSTALLN,INSTLLDT,LABPATCH,LABVER,STATUS
;
S HEADER(1)="IHS LAB Package"
S HEADER(2)="Current VERSION & PATCH Report"
;
; D LATEST(.LABPATCH,.INSTALLN) ; Latest IHS Lab Patch & Install IEN
;
; S LABVER=$P(LABPATCH,"*",2) ; Version Number
;
; S INSTLLDT=$P($G(^XPD(9.7,INSTALLN,0)),"^",3) ; Latest Patch Install Date
; S INSTLLDT=$$UP^XLFSTR($$FMTE^XLFDT(INSTLLDT,"MP"))
;
D LATEST("LR",.LABPATCH,.INSTLLDT,.LABVER) ; IHS/MSC/MKK - LR*5.2*1033
;
D HEADERDT^BLRGMENU
;
; W $$CJ^XLFSTR("Lab Version "_LABVER,IOM)
W $$CJ^XLFSTR("IHS Lab Version "_LABVER,IOM) ; IHS/MSC/MKK - LR*5.2*1033
W !!
W $$CJ^XLFSTR("Latest IHS Lab Patch: "_LABPATCH,IOM)
W !!
W $$CJ^XLFSTR("Latest IHS Lab Patch Install Date/Time: "_INSTLLDT,IOM)
W !
;
D PRESSKEY^BLRGMENU(0)
Q
;
; This is necessary because Kernel DOES NOT return the proper
; Install IF there were multiple installs in one day.
; LATEST(LABPATCH,INSTALLN) ; EP
; NEW LRP,LRPIN,LROKAY
;
; S LRP="LR*5.2*1000"
; S LROKAY=""
; F S LRP=$O(^XPD(9.7,"B",LRP)) Q:LRP=""!($P(LRP,"*",1)'="LR") D
; . S LRPIN=0
; . F S LRPIN=$O(^XPD(9.7,"B",LRP,LRPIN)) Q:LRPIN="" D
; .. I $P($G(^XPD(9.7,LRPIN,0)),"^",9)'=3 Q ; Complete Status?
; .. ;
; .. ; I +$P(LRP,"*",3)>+$P($P(LROKAY,"^",1),"*",3) S LROKAY=LRP_"^"_LRPIN
;
; S LABPATCH=$P(LROKAY,"^",1)
; S INSTALLN=$P(LROKAY,"^",2)
;
; Q
; ----- BEGIN IHS/MSC/MKK - LR*5.2*1033
LATEST(WOT,PATCH,INSTLLDT,LABVER) ; EP - Written because Kernel $PATCH does NOT work if multiple installs in one day
NEW INSTALLN,LRP,LRPIN,LROKAY
;
S LROKAY=$$LABINSTL(WOT)
;
S LABPATCH=$P(LROKAY,"^",1)
S INSTALLN=$P(LROKAY,"^",2)
;
S INSTLLDT=$P($G(^XPD(9.7,INSTALLN,0)),"^",3) ; Latest Patch Install Date
S INSTLLDT=$$UP^XLFSTR($$FMTE^XLFDT(INSTLLDT,"MP"))
;
S LABVER=$P(PATCH,"*",2) ; Version Number
Q
;
LABINSTL(LABLTRS) ; EP - Function to return IEN of Patch & IEN of Date/Time of completed install
S LRP=LABLTRS_"*5.2*1099",LROKAY=""
F S LRP=$O(^XPD(9.7,"B",LRP),-1) Q:LRP=""!($P(LRP,"*",1)'=LABLTRS)!($L(LROKAY)) D
. S LRPIN="A"
. F S LRPIN=$O(^XPD(9.7,"B",LRP,LRPIN),-1) Q:LRPIN=""!($L(LROKAY)) D
.. I $P($G(^XPD(9.7,LRPIN,0)),"^",9)'=3 Q ; Complete Status?
.. ;
.. I +$P(LRP,"*",3)'<+$P($P(LROKAY,"^",1),"*",3) S LROKAY=LRP_"^"_LRPIN
Q LROKAY
; ----- END IHS/MSC/MKK - LR*5.2*1033
BLRVPTCH ; IHS/OIT/MKK - LAB VERSION & LATEST PATCH REPORT ; 22-Oct-2013 09:22 ; MKK
+1 ;;5.2;IHS LABORATORY;**1025,1033**;NOV 01, 1997
+2 ;
+3 ; Show latest Lab Patch & Lab Version
+4 ;
EP ; EP
+1 NEW HEADER,INSTALLN,INSTLLDT,LABPATCH,LABVER,STATUS
+2 ;
+3 SET HEADER(1)="IHS LAB Package"
+4 SET HEADER(2)="Current VERSION & PATCH Report"
+5 ;
+6 ; D LATEST(.LABPATCH,.INSTALLN) ; Latest IHS Lab Patch & Install IEN
+7 ;
+8 ; S LABVER=$P(LABPATCH,"*",2) ; Version Number
+9 ;
+10 ; S INSTLLDT=$P($G(^XPD(9.7,INSTALLN,0)),"^",3) ; Latest Patch Install Date
+11 ; S INSTLLDT=$$UP^XLFSTR($$FMTE^XLFDT(INSTLLDT,"MP"))
+12 ;
+13 ; IHS/MSC/MKK - LR*5.2*1033
DO LATEST("LR",.LABPATCH,.INSTLLDT,.LABVER)
+14 ;
+15 DO HEADERDT^BLRGMENU
+16 ;
+17 ; W $$CJ^XLFSTR("Lab Version "_LABVER,IOM)
+18 ; IHS/MSC/MKK - LR*5.2*1033
WRITE $$CJ^XLFSTR("IHS Lab Version "_LABVER,IOM)
+19 WRITE !!
+20 WRITE $$CJ^XLFSTR("Latest IHS Lab Patch: "_LABPATCH,IOM)
+21 WRITE !!
+22 WRITE $$CJ^XLFSTR("Latest IHS Lab Patch Install Date/Time: "_INSTLLDT,IOM)
+23 WRITE !
+24 ;
+25 DO PRESSKEY^BLRGMENU(0)
+26 QUIT
+27 ;
+28 ; This is necessary because Kernel DOES NOT return the proper
+29 ; Install IF there were multiple installs in one day.
+30 ; LATEST(LABPATCH,INSTALLN) ; EP
+31 ; NEW LRP,LRPIN,LROKAY
+32 ;
+33 ; S LRP="LR*5.2*1000"
+34 ; S LROKAY=""
+35 ; F S LRP=$O(^XPD(9.7,"B",LRP)) Q:LRP=""!($P(LRP,"*",1)'="LR") D
+36 ; . S LRPIN=0
+37 ; . F S LRPIN=$O(^XPD(9.7,"B",LRP,LRPIN)) Q:LRPIN="" D
+38 ; .. I $P($G(^XPD(9.7,LRPIN,0)),"^",9)'=3 Q ; Complete Status?
+39 ; .. ;
+40 ; .. ; I +$P(LRP,"*",3)>+$P($P(LROKAY,"^",1),"*",3) S LROKAY=LRP_"^"_LRPIN
+41 ;
+42 ; S LABPATCH=$P(LROKAY,"^",1)
+43 ; S INSTALLN=$P(LROKAY,"^",2)
+44 ;
+45 ; Q
+46 ; ----- BEGIN IHS/MSC/MKK - LR*5.2*1033
LATEST(WOT,PATCH,INSTLLDT,LABVER) ; EP - Written because Kernel $PATCH does NOT work if multiple installs in one day
+1 NEW INSTALLN,LRP,LRPIN,LROKAY
+2 ;
+3 SET LROKAY=$$LABINSTL(WOT)
+4 ;
+5 SET LABPATCH=$PIECE(LROKAY,"^",1)
+6 SET INSTALLN=$PIECE(LROKAY,"^",2)
+7 ;
+8 ; Latest Patch Install Date
SET INSTLLDT=$PIECE($GET(^XPD(9.7,INSTALLN,0)),"^",3)
+9 SET INSTLLDT=$$UP^XLFSTR($$FMTE^XLFDT(INSTLLDT,"MP"))
+10 ;
+11 ; Version Number
SET LABVER=$PIECE(PATCH,"*",2)
+12 QUIT
+13 ;
LABINSTL(LABLTRS) ; EP - Function to return IEN of Patch & IEN of Date/Time of completed install
+1 SET LRP=LABLTRS_"*5.2*1099"
SET LROKAY=""
+2 FOR
SET LRP=$ORDER(^XPD(9.7,"B",LRP),-1)
IF LRP=""!($PIECE(LRP,"*",1)'=LABLTRS)!($LENGTH(LROKAY))
QUIT
Begin DoDot:1
+3 SET LRPIN="A"
+4 FOR
SET LRPIN=$ORDER(^XPD(9.7,"B",LRP,LRPIN),-1)
IF LRPIN=""!($LENGTH(LROKAY))
QUIT
Begin DoDot:2
+5 ; Complete Status?
IF $PIECE($GET(^XPD(9.7,LRPIN,0)),"^",9)'=3
QUIT
+6 ;
+7 IF +$PIECE(LRP,"*",3)'<+$PIECE($PIECE(LROKAY,"^",1),"*",3)
SET LROKAY=LRP_"^"_LRPIN
End DoDot:2
End DoDot:1
+8 QUIT LROKAY
+9 ; ----- END IHS/MSC/MKK - LR*5.2*1033