source: FOIAVistA/trunk/r/CONSULT_REQUEST_TRACKING-GMRC-GMRS-GMRT/GMRCYP41.m@ 1446

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1GMRCYP41 ;SLC/JFR - PRE/POST INSTALL FOR GMRC*3*41; 2/4/05 13:29
2 ;;3.0;CONSULT/REQUEST TRACKING;**41**;DEC 27, 1997
3 ;
4 ; This routine invokes one-time IA #4605
5 ;
6 Q
7PRE ; pre-install
8 ; This pre-install will delete the "AE", "AE1" and "AE2" MUMPS
9 ; cross-references on the REQUEST/CONSULTATION (#123) file
10 ; and replace them with a new-style index "AE" during the install
11 ; that will have the same format as the prior "AE" cross-reference.
12 ; This will insure greater reliability in the setting and
13 ; killing of the "AE" cross-reference.
14 ;
15 N GMRCAE,GMRCAE1,GMRCAE2,IDX
16 S (GMRCAE,GMRCAE1,GMRCAE2)=0
17 K ^GMR(123,"AE") ; kill off all existing data
18 S IDX=0
19 F S IDX=$O(^DD(123,1,1,IDX)) Q:'IDX D
20 . Q:$P($G(^DD(123,1,1,IDX,0)),U,2)'="AE"
21 . S GMRCAE=IDX
22 . D DELIX^DDMOD(123,1,GMRCAE)
23 . S IDX=" " ;quit the loop
24 . Q
25 S IDX=0
26 F S IDX=$O(^DD(123,3,1,IDX)) Q:'IDX D
27 . Q:$P($G(^DD(123,3,1,IDX,0)),U,2)'="AE1"
28 . S GMRCAE1=IDX
29 . D DELIX^DDMOD(123,3,GMRCAE1)
30 . S IDX=" " ; quit the loop
31 . Q
32 S IDX=0
33 F S IDX=$O(^DD(123,8,1,IDX)) Q:'IDX D
34 . Q:$P($G(^DD(123,8,1,IDX,0)),U,2)'="AE2"
35 . S GMRCAE2=IDX
36 . D DELIX^DDMOD(123,8,GMRCAE2)
37 . S IDX=" " ; quit the loop
38 . Q
39 Q
40 ;
41POST ; post-install to create and build new "AE" index
42 N GMRCXR,GMRCRES,GMRCOUT
43 S GMRCXR("FILE")=123
44 S GMRCXR("NAME")="AE"
45 S GMRCXR("TYPE")="R"
46 S GMRCXR("USE")="S"
47 S GMRCXR("EXECUTION")="R"
48 S GMRCXR("ACTIVITY")="IR"
49 S GMRCXR("SHORT DESCR")="Index by SERVICE, STATUS, DATE OF REQUEST"
50 S GMRCXR("DESCR",1)="This cross reference is used for services to see all consults by service,"
51 S GMRCXR("DESCR",2)="OE/RR status and Date of Request."
52 S GMRCXR("VAL",1)=1
53 S GMRCXR("VAL",1,"SUBSCRIPT")=1
54 S GMRCXR("VAL",1,"LENGTH")=5
55 S GMRCXR("VAL",1,"COLLATION")="F"
56 S GMRCXR("VAL",2)=8
57 S GMRCXR("VAL",2,"SUBSCRIPT")=2
58 S GMRCXR("VAL",2,"LENGTH")=5
59 S GMRCXR("VAL",2,"COLLATION")="F"
60 S GMRCXR("VAL",3)=3
61 S GMRCXR("VAL",3,"SUBSCRIPT")=3
62 S GMRCXR("VAL",3,"LENGTH")=20
63 S GMRCXR("VAL",3,"COLLATION")="F"
64 S GMRCXR("VAL",3,"XFORM FOR STORAGE")="S X=9999999-X"
65 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
66 Q
Note: See TracBrowser for help on using the repository browser.