source: WorldVistAEHR/trunk/r/PATCH_MANAGEMNT-AAQ/AAQJPINQ.m@ 1685

Last change on this file since 1685 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 5.4 KB
RevLine 
[613]1AAQJPINQ ;FGO/JHS - Inquire for Patch Record ;10-06-97 [10/23/02 5:14pm]
2 ;;1.4;AAQJ PATCH RECORD;; May 14, 1999
3 S (AAQINS,AAQDONE,AAQNOF,AAQTST,AAQTSW)=0,U="^",DIC="^DIZ(437016,",DIC(0)="AEQM" D ^DIC W !
4 S AAQJDA=+Y,AAQJPKG=$P(Y,U,2),AAQPKG=AAQJPKG G:Y=-1 EXITK
5 S DIC="^DIZ(437016,AAQJDA,1,",DIC(0)="AEQM",DIC("A")="Select PATCH: "
6 D ^DIC W ! I Y=-1 W $C(7),"No Patch selected. Exiting." G EXITK
7 S DA=+Y,AAQDA=DA,AAQJPAT=$P(Y,U,2),AAQPAT=AAQJPAT D INIT^XMVVITAE
8MRP ; Entry point for Most Recent Patch option
9 D CKUCI S DIC="^DIZ(437016,",FLDS="[AAQJ INQUIRE]",BY="[AAQJ PKG/PATCH RANGE]",DHD="[AAQJ INQ HEADING]",DHIT="D PINST^AAQJPINQ",DIOEND="D EN^AAQJIDOC"
10 S FR(1)=AAQJPKG,TO(1)=AAQJPKG,FR(2)=AAQJPAT,TO(2)=AAQJPAT
11 S AAQPLN=10 ;Print lines for Inquire
12 D EN1^DIP G DONE
13PINST S AAQPLN=5 I AAQINS=1 S AAQPLN=10 ;Print lines with/without install
14 S (AAQIN,AAQTSW)=0 I AAQJPAT["S" D:AAQNOF=0 NOF G DONE
15 ;Support Patch will not have #9.7 entry
16 I AAQJPAT["L" S AAQPAT=$P(AAQJPAT,"L",2),AAQP1=$P(AAQJPKG,"*",1),AAQP2=$P(AAQJPKG,"*",2),AAQPKG=AAQP1_"Z*"_AAQP2 ;Strip L, add Z to Nmsp
17 I AAQPAT<10 S AAQPAT=+AAQPAT ;Strip leading zero
18 D LKUP I '$D(^XPD(9.7,"B",AAQP)) D:AAQNOF=0 NOF G DONE
19NEXT S AAQIN=$O(^XPD(9.7,"B",AAQP,AAQIN)) G:AAQIN="" EXIT
20 D LKUP S AAQP3=$P(AAQP,AAQPKG,2),AAQP3=$P(AAQP3,"*",2)
21 G:AAQP3'=AAQPAT EXIT
22 I IOST["C-" D CKRET
23 I IOST["P-" D CKHDR
24SETBEG S AAQBEG=$P($G(^XPD(9.7,AAQIN,1)),U,1),AAQEND=$P($G(^XPD(9.7,AAQIN,1)),U,3) S AAQSTA=$P($G(^XPD(9.7,AAQIN,0)),U,9) DO STA
25 S AAQDUZ=$P($G(^XPD(9.7,AAQIN,0)),U,11) I AAQDUZ="" S AAQDUZ="Unknown" G SETCOM
26 S AAQDUZ=$P(^VA(200,AAQDUZ,0),U,1)
27SETCOM S AAQCOM=^XPD(9.7,AAQIN,2)
28 I AAQCOM["TEST" D:AAQTSW=0 TEST
29WRTI W !,?6,"Install: ",AAQP," "_AAQSTAX," by ",AAQDUZ
30 S AAQDT=AAQBEG D DT W !,?6,"Start Time: ",AAQINX
31 S AAQDT=AAQEND D DT W !,?6,"Stop Time: ",AAQINX
32 W !,?6,"Comment: ",$E(AAQCOM,1,48),! S IOY=IOY+5
33 G NEXT
34DT I AAQDT="" S AAQINX="Unknown"
35 E S AAQINX=$$FMTE^XLFDT(AAQDT,"2ZP")
36 Q
37STA I AAQSTA=0 S AAQSTAX="Loaded from Distribution" Q
38 I AAQSTA=1 S AAQSTAX="Queued for Install" Q
39 I AAQSTA=2 S AAQSTAX="Start of Install" Q
40 I AAQSTA=3 S AAQSTAX="Install Completed" Q
41 I AAQSTA=4 S AAQSTAX="De-Installed" Q
42 S AAQSTAX="Status Unknown" Q
43 ; Changed the following line from Q:AAQX="" to Q:(+AAQX'>0) -JFW
44CKUCI S (AAQT,AAQTST,AAQV,AAQX)=0 F S AAQX=$O(^DIZ(437016,AAQJDA,1,DA,2,AAQX)) Q:(+AAQX'>0) D
45 .S AAQSYS=^DIZ(437016,AAQJDA,1,DA,2,AAQX,0)
46 .I $E(AAQSYS,1,1)="T" S AAQT=AAQT+1
47 .I $E(AAQSYS,1,1)="V" S AAQV=AAQV+1
48 .I AAQT=1 S AAQTST=1
49 .I AAQV=1 S AAQTST=0
50 Q
51LKUP S AAQP=AAQPKG_"*"_AAQPAT ;Lookup value for LOCAL and Released
52 I AAQJPAT["V" S AAQPAT=$P(AAQJPAT,"V",1),AAQP=AAQPKG_"*"_AAQPAT ;Lookup value for TEST Patch
53 Q
54NOF Q:AAQNOF=1 S AAQNOF=1 W !,?5,"Patch Number not found in the INSTALL File (#9.7)." S IOY=IOY+2 Q
55TEST Q:AAQINS=1 S AAQTSW=1 I IOY>(IOSL-4) D CKRET
56 W !,"NOTE: The Install File lookup appears to have found a Test Patch.",!,?6,"It will attempt to find more versions of the same Test Patch,",!,?6,"and the Verified Patch with the same number.",! S IOY=IOY+4 Q
57EXIT Q:AAQINS=1 I AAQTSW=1,AAQTST=1 D UPDT ;AAQINS set by ASKINS^AAQJL80
58DONE Q:AAQINS=1 S AAQDONE=1,DN=0 ;If AAQINS=1, File #9.7 info on List 80
59 ; DN=0 used to avoid <UNDEFINED>XDY+1^DIO2 if BROWSER selected
60EXITK ; This line tag is also called by the routine AAQJL80
61 K AAQBEG,AAQCOM,AAQDT,AAQDUZ,AAQEND,AAQIN,AAQINX,AAQP1,AAQP2,AAQP3,AAQNOF,AAQP,AAQPLN,AAQSHDR,AAQSTA,AAQSTAX,AAQSYS,AAQT,AAQV,AAQX
62 D ^%ZISC K %ZIS,BY,DA,DDH,DHD,DHIT,DIC,FLDS,FR,IOY,POP,RV0,RV1,TO,Y Q
63 ; AAQJDA,AAQJPAT,AAQJPKG,AAQPAT,AAQPKG,AAQTST,AAQTSW are killed
64 ; at EXITK^AAQJIDOC ;AAQINS Killed by AAQJL80.
65EXITA ; Called by [AAQJ PATCH INQUIRE] Menu Exit Action.
66 K AAQDA,AAQDONE,AAQINS,DIOEND D EXITK^AAQJIDOC Q
67CKRET I (IOY>(IOSL-6))!($Y>(IOSL-6)) R !,"Press RETURN to Continue: ",AAQX:20 D HDR
68 Q
69CKHDR I (IOY>(IOSL-AAQPLN))!($Y>(IOSL-AAQPLN)) D HDR
70 Q
71HDR W @IOF
72HDR1 I FLDS["LIST" G LHDR
73 W ?1,"PATCH INQUIRE - " D UCI^%ZOSV W $P(Y,",") W ?55,$$HTE^XLFDT($H,"1M") S IOY=6
74 W !!,?15,"METHOD"
75 W !,?15,"MESSAGE# BACKUP#",?35,"SUBJECT"
76 W !,?1,"NO.",?8,"SEQ#",?15,"ROUTINE MULTIPLE",?35,"UCI DATE/TIME",?62,"INITIALS"
77 W !,?1,"---------------------------------------------------------------------------"
78 Q
79LHDR W ?1,"PATCH LIST 80 - " D UCI^%ZOSV W $P(Y,",") W ?55,$$HTE^XLFDT($H,"1M") S IOY=6
80 I $D(AAQSHDR) W !,?1,AAQSHDR S IOY=IOY+1
81 W !!,?15,"METHOD",?35,"SUBJECT"
82 W !,?1,"NO.",?6,"SEQ#",?15,"MESSAGE# BACKUP#",?35,"UCI DATE/TIME",?62,"INITIALS"
83 W !,?1,"---------------------------------------------------------------------------"
84 Q
85UPDT Q:AAQJPAT["V" I IOY>(IOSL-14) D CKRET
86 S RV1="$C(27,91,55,109)",RV0="$C(27,91,109)" ;Reverse Video VT100
87 W ! W:IOST["C-" @RV1 W "UPDATE NOTICE:" W:IOST["C-" @RV0
88 W " If this patch shows only TST UCI information in the",!,"Patch Record and has 'TEST v' in the Comment field of the INSTALL File,",!,"you may have to use Enter/Edit Patch Record to update another entry."
89 W !!,"The KIDS INSTALLATION message used by Simple Patch does not contain",!,"any data which can identify a TEST Patch. The message sent from",!,"TST to VAH can only do the update using the patch number."
90 W !!,"When a TEST Patch is installed in VAH, it can be indentified and is",!,"designated as a TEST Patch with a Version number. Check for a TEST",!,"patch with this same patch number and a Version number."
91 W !!,"If a matching TEST patch is found, update that record with install data",!,"for the TST UCI, and delete the entry created by the automatic update",!,"from TST." Q
Note: See TracBrowser for help on using the repository browser.