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.
  1. 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
  1. ;
  1. ; Show latest Lab Patch & Lab Version
  1. ;
  1. EP ; EP
  1. NEW HEADER,INSTALLN,INSTLLDT,LABPATCH,LABVER,STATUS
  1. ;
  1. S HEADER(1)="IHS LAB Package"
  1. S HEADER(2)="Current VERSION & PATCH Report"
  1. ;
  1. ; D LATEST(.LABPATCH,.INSTALLN) ; Latest IHS Lab Patch & Install IEN
  1. ;
  1. ; S LABVER=$P(LABPATCH,"*",2) ; Version Number
  1. ;
  1. ; S INSTLLDT=$P($G(^XPD(9.7,INSTALLN,0)),"^",3) ; Latest Patch Install Date
  1. ; S INSTLLDT=$$UP^XLFSTR($$FMTE^XLFDT(INSTLLDT,"MP"))
  1. ;
  1. D LATEST("LR",.LABPATCH,.INSTLLDT,.LABVER) ; IHS/MSC/MKK - LR*5.2*1033
  1. ;
  1. D HEADERDT^BLRGMENU
  1. ;
  1. ; W $$CJ^XLFSTR("Lab Version "_LABVER,IOM)
  1. W $$CJ^XLFSTR("IHS Lab Version "_LABVER,IOM) ; IHS/MSC/MKK - LR*5.2*1033
  1. W !!
  1. W $$CJ^XLFSTR("Latest IHS Lab Patch: "_LABPATCH,IOM)
  1. W !!
  1. W $$CJ^XLFSTR("Latest IHS Lab Patch Install Date/Time: "_INSTLLDT,IOM)
  1. W !
  1. ;
  1. D PRESSKEY^BLRGMENU(0)
  1. Q
  1. ;
  1. ; This is necessary because Kernel DOES NOT return the proper
  1. ; Install IF there were multiple installs in one day.
  1. ; LATEST(LABPATCH,INSTALLN) ; EP
  1. ; NEW LRP,LRPIN,LROKAY
  1. ;
  1. ; S LRP="LR*5.2*1000"
  1. ; S LROKAY=""
  1. ; F S LRP=$O(^XPD(9.7,"B",LRP)) Q:LRP=""!($P(LRP,"*",1)'="LR") D
  1. ; . S LRPIN=0
  1. ; . F S LRPIN=$O(^XPD(9.7,"B",LRP,LRPIN)) Q:LRPIN="" D
  1. ; .. I $P($G(^XPD(9.7,LRPIN,0)),"^",9)'=3 Q ; Complete Status?
  1. ; .. ;
  1. ; .. ; I +$P(LRP,"*",3)>+$P($P(LROKAY,"^",1),"*",3) S LROKAY=LRP_"^"_LRPIN
  1. ;
  1. ; S LABPATCH=$P(LROKAY,"^",1)
  1. ; S INSTALLN=$P(LROKAY,"^",2)
  1. ;
  1. ; Q
  1. ; ----- BEGIN IHS/MSC/MKK - LR*5.2*1033
  1. 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
  1. ;
  1. S LROKAY=$$LABINSTL(WOT)
  1. ;
  1. S LABPATCH=$P(LROKAY,"^",1)
  1. S INSTALLN=$P(LROKAY,"^",2)
  1. ;
  1. S INSTLLDT=$P($G(^XPD(9.7,INSTALLN,0)),"^",3) ; Latest Patch Install Date
  1. S INSTLLDT=$$UP^XLFSTR($$FMTE^XLFDT(INSTLLDT,"MP"))
  1. ;
  1. S LABVER=$P(PATCH,"*",2) ; Version Number
  1. Q
  1. ;
  1. LABINSTL(LABLTRS) ; EP - Function to return IEN of Patch & IEN of Date/Time of completed install
  1. S LRP=LABLTRS_"*5.2*1099",LROKAY=""
  1. F S LRP=$O(^XPD(9.7,"B",LRP),-1) Q:LRP=""!($P(LRP,"*",1)'=LABLTRS)!($L(LROKAY)) D
  1. . S LRPIN="A"
  1. . F S LRPIN=$O(^XPD(9.7,"B",LRP,LRPIN),-1) Q:LRPIN=""!($L(LROKAY)) D
  1. .. I $P($G(^XPD(9.7,LRPIN,0)),"^",9)'=3 Q ; Complete Status?
  1. .. ;
  1. .. I +$P(LRP,"*",3)'<+$P($P(LROKAY,"^",1),"*",3) S LROKAY=LRP_"^"_LRPIN
  1. Q LROKAY
  1. ; ----- END IHS/MSC/MKK - LR*5.2*1033