source: FOIAVistA/tag/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR61PG.m@ 821

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1RMPR61PG ;OIFO HINES/AA-PURGE 661.2 PROS STOCK ITEM RECORD FILE ;04/16/05
2 ;;3.0;PROSTHETICS;**107**;04/16/05
3 ;
4 ; This routine used to remove records from Global RMPR(661.2
5 ; and remove the pointers to RMPR(661.2 from Global
6 ; RMPR(660 field 4.6 to reduce the install time for Patch RMPR*3*61
7 ;
8 ;
9EN ;
10 ; Check for installed RMPR*3.0*61 sites ** DO NOT CONTINUE PROCESS
11 ; Patch 61 creates global #661.6
12 ;
13 I '$D(^RMPR(661.6,0)) D BACKUP D UPDATE G EXIT Q
14 Q
15 ;
16UPDATE ;
17 ; Processing for non-installed RMPR*3.0*61 sites ** CONTINE TO PROCESS
18 ;
19 S RMPRIEN=0,(RMPRDAT,RMPRORDT)=""
20 D NOW^%DTC S RMPRYR=X-0020000,RMPRDAT=X
21 ;
22 ; RMPRYR = used to determine entries 2 years or more prior to
23 ; today's date
24 ; RMPRIEN = Internal Entry Number for records in RMPR(660
25 ; RMPRNODE = Store the one (1) node for the selected record
26 ; RMPRPNTR = Pointer to record IEN in Global RMPR(661.2
27 ; RMPRREC = Store the zero Node of the RMPR(661.2 Record
28 ; RMPRDAT = Record Date used to identify records 2+ years from
29 ; today's date.
30 ;
31 F S RMPRIEN=$O(^RMPR(660,RMPRIEN)) G:RMPRIEN'>0 EXIT D
32 .S RMPRNODE=$G(^RMPR(660,RMPRIEN,1)) Q:RMPRNODE=""
33 .S RMPRPNTR=$P(RMPRNODE,"^",5) Q:RMPRPNTR=""
34 .S RMPRREC=$G(^RMPR(661.2,RMPRPNTR,0)),RMPRDAT=$P(RMPRREC,"^",1) Q:RMPRDAT'>0
35 .I RMPRDAT<RMPRYR D
36 ..;
37 ..S DIK="^RMPR(661.2,",DA=RMPRPNTR D ^DIK
38 ..;
39 ..; DELETE RECORD IN RMPR(661.2
40 ..;
41 ..S DR="4.6///@",DIE="^RMPR(660,",DA=RMPRIEN D ^DIE
42 ..;
43 ..; REMOVE POINTER FROM RMPR(660,FIELD 4.6
44 ..;
45 ..Q
46 .Q
47 Q
48BACKUP ;
49 ; CREATE BACKUP OF GLOBAL ^RMPR(661.2 TO ^XTMP("RMPR6612"
50 ; PURGE DATE WILL BE 90 DAYS FOR THE DATE THIS PATCH IS RUN
51 ;
52 S DA=0
53 D NOW^%DTC S RMPRPGDT=X+0000300,RMPRTODT=X
54 S ^XTMP("RMPR6612",0)=RMPRPGDT_"^"_RMPRTODT
55 F S DA=$O(^RMPR(661.2,DA)) Q:'DA D
56 .S ^XTMP("RMPR6612",DA,0)=$G(^RMPR(661.2,DA,0))
57 .I $D(^RMPR(661.2,DA,1)) S ^XTMP("RMPR6612",DA,1)=$G(^RMPR(661.2,DA,1))
58 .Q
59 Q
60EXIT ;
61 Q:+$G(DUZ)'>0
62 S RMPRDUZ=$$WHO^RMPREOU(DUZ)
63 S XMY(RMPRDUZ)=""
64 S XMDUZ=DUZ
65 S XMSUB="PATCH RMPR*3.0*107 HAS COMPLETED"
66 S RMPRMSG(1)="PATCH RMPR*3.0*107 HAS COMPLETED SUCCESSFULLY"
67 S XMTEXT="RMPRMSG("
68 D ^XMD
69 ; End of Message
70 K RMPRIEN,RMPRNODE,RMPRPNTR,RMPRREC,RMPRDAT,RMPRYR,DIE,DIK,DA,DR
71 K RMPRDUZ,RMPRMSG,RMPRPGDT,RMPRTODT,RMPRORDT
72 Q
Note: See TracBrowser for help on using the repository browser.