source: FOIAVistA/trunk/r/NOIS-FSC/FSCUEDIT.m@ 1757

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1FSCUEDIT ;SLC/STAFF-NOIS Utilities Edit ;1/17/98 17:13
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4FILES ; from FSCOPT
5 N DIR,FILE,X,Y K DIR
6 S DIR(0)="SAMO^CALL:CALL;FORMAT:FORMAT;FUNC:FUNC;OFFICE:OFFICE;LIST:LIST;MOD:MOD;PACK:PACK;PARAM:PARAM;RPT:RPT;SITE:SITE;SPEC:SPEC;STATUS:STATUS;SUB:SUB;TASK:TASK;WORK:WORK"
7 S DIR("?",1)="Enter the file you wish to review."
8 S DIR("?")="^D HELP^FSCU(.DIR)"
9 S DIR("??")="FSC U1 NOIS"
10 W !,"These are files you can review (editing only by supervisors).",!
11 S DIR("A",1)=" Call"
12 S DIR("A",2)=" Format"
13 S DIR("A",3)=" Functional Area"
14 S DIR("A",4)=" List"
15 S DIR("A",5)=" Module"
16 S DIR("A",6)=" Office"
17 S DIR("A",7)=" Package"
18 S DIR("A",8)=" Parameter"
19 S DIR("A",9)=" Reports"
20 S DIR("A",10)=" Site"
21 S DIR("A",11)=" Specialist"
22 S DIR("A",12)=" Status History"
23 S DIR("A",13)=" Subcomponent"
24 S DIR("A",14)=" Task"
25 S DIR("A",15)=" Workload"
26 S DIR("A",16)=""
27 S DIR("A")="Select file: "
28 D ^DIR K DIR
29 I $D(DIRUT) Q
30 I '$L(Y) Q
31 S FILE=Y
32 N DIR,X,Y K DIR
33 S DIR(0)="SAMO^PRINT:PRINT;SEARCH:SEARCH;INQUIRE:INQUIRE"
34 S DIR("A")="Select (P)rint, (S)earch, (I)nquire"_$S($$ACCESS^FSCU(DUZ,"SUPER"):"/Edit",1:"")_": "
35 S DIR("?",1)="Enter PRINT to print the file."
36 S DIR("?",2)="Enter SEARCH the file."
37 S DIR("?",3)="Enter INQUIRE to inquire on the file."
38 S DIR("?")="^D HELP^FSCU(.DIR)"
39 S DIR("??")="FSC U1 NOIS"
40 D ^DIR K DIR
41 I $D(DIRUT) Q
42 I '$L(Y) Q
43 I Y="PRINT" D PRINT(FILE) Q
44 I Y="SEARCH" D SEARCH(FILE) Q
45 I Y="INQUIRE" D INQUIRE(FILE) Q
46 Q
47 ;
48PRINT(FILE) ;
49 N DIC,L
50 S DIC=$S(FILE="CALL":"^FSCD(""CALL"",",FILE="WORK":"^FSCD(""WKLD"",",FILE="STATUS":"^FSCD(""STATUS HIST"",",FILE="OFFICE":"^FSC(""ISC"",",1:"^FSC("""_FILE_""","),L="LIST "_$P(@(DIC_"0)"),U)
51 D EN1^DIP
52 Q
53 ;
54SEARCH(FILE) ;
55 N DIC
56 S DIC=$S(FILE="CALL":"^FSCD(""CALL"",",FILE="WORK":"^FSCD(""WKLD"",",FILE="STATUS":"^FSCD(""STATUS HIST"",",FILE="OFFICE":"^FSC(""ISC"",",1:"^FSC("""_FILE_""",")
57 D EN^DIS
58 Q
59 ;
60INQUIRE(FILE) ;
61 N CONTINUE S CONTINUE=1
62 I FILE="OFFICE" S FILE="ISC"
63 F D I 'CONTINUE Q
64 .N ENTRY,DR,OK
65 .W ! D LOOKUP^FSCULOOK(FILE,.ENTRY,$S($$ACCESS^FSCU(DUZ,"SUPER"):"AELMOQ",1:"AEMOQ"),.OK)
66 .I 'OK S CONTINUE=0 Q
67 .D SHOW(FILE,+ENTRY,.OK)
68 .I FILE="SITE",DUZ=$P(^FSC("SITE",+ENTRY,0),U,6) D EDIT(FILE,+ENTRY,"3:5.4",.OK) Q
69 .I '$$ACCESS^FSCU(DUZ,"SUPER") D PAUSE^FSCU(.OK) Q
70 .I FILE="CALL" W !!,"NOIS calls should be edited using other options." H 2 Q
71 .I FILE="WORK" W !!,"NOIS workload should be edited using other options." H 2 Q
72 .I FILE="STATUS" W !!,"NOIS Status History should be edited using other options." H 2 Q
73 .S DR=".01R;.02:999"
74 .I FILE="PARAM" S DR="100:101;8"
75 .D EDIT(FILE,+ENTRY,DR,.OK)
76 Q
77 ;
78EDIT(FILE,DA,DR,OK) ;
79 N DIE,GBL S OK=1
80 D FILE(FILE,DA,.DIE,.GBL,.OK)
81 I 'OK Q
82 L +@GBL:30 I '$T W !,"Unable to edit." Q
83 D ^DIE
84 L -@GBL
85 Q
86 ;
87FILE(FILE,ENTRY,DIE,GBL,OK) ;
88 S OK=0
89 I '$D(^FSC(FILE,0)) Q
90 S DIE="^FSC("""_FILE_""",",GBL=DIE_ENTRY_")",OK=1
91 Q
92 ;
93SHOW(FILE,DA,OK) ;
94 N DIC
95 S OK=0
96 S DIC=$S(FILE="CALL":"^FSCD(""CALL"",",FILE="WORK":"^FSCD(""WKLD"",",FILE="STATUS":"^FSCD(""STATUS HIST"",",FILE="OFFICE":"^FSC(""ISC"",",1:"^FSC("""_FILE_""",")
97 I '$D(@(DIC_"0)")) Q
98 D EN^DIQ S OK=1
99 Q
Note: See TracBrowser for help on using the repository browser.