Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BLRVPTCH

BLRVPTCH.m

Go to the documentation of this file.
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