FSCUEDIT ;SLC/STAFF-NOIS Utilities Edit ;1/17/98 17:13
;;1.1;NOIS;;Sep 06, 1998
;
FILES ; from FSCOPT
N DIR,FILE,X,Y K DIR
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"
S DIR("?",1)="Enter the file you wish to review."
S DIR("?")="^D HELP^FSCU(.DIR)"
S DIR("??")="FSC U1 NOIS"
W !,"These are files you can review (editing only by supervisors).",!
S DIR("A",1)=" Call"
S DIR("A",2)=" Format"
S DIR("A",3)=" Functional Area"
S DIR("A",4)=" List"
S DIR("A",5)=" Module"
S DIR("A",6)=" Office"
S DIR("A",7)=" Package"
S DIR("A",8)=" Parameter"
S DIR("A",9)=" Reports"
S DIR("A",10)=" Site"
S DIR("A",11)=" Specialist"
S DIR("A",12)=" Status History"
S DIR("A",13)=" Subcomponent"
S DIR("A",14)=" Task"
S DIR("A",15)=" Workload"
S DIR("A",16)=""
S DIR("A")="Select file: "
D ^DIR K DIR
I $D(DIRUT) Q
I '$L(Y) Q
S FILE=Y
N DIR,X,Y K DIR
S DIR(0)="SAMO^PRINT:PRINT;SEARCH:SEARCH;INQUIRE:INQUIRE"
S DIR("A")="Select (P)rint, (S)earch, (I)nquire"_$S($$ACCESS^FSCU(DUZ,"SUPER"):"/Edit",1:"")_": "
S DIR("?",1)="Enter PRINT to print the file."
S DIR("?",2)="Enter SEARCH the file."
S DIR("?",3)="Enter INQUIRE to inquire on the file."
S DIR("?")="^D HELP^FSCU(.DIR)"
S DIR("??")="FSC U1 NOIS"
D ^DIR K DIR
I $D(DIRUT) Q
I '$L(Y) Q
I Y="PRINT" D PRINT(FILE) Q
I Y="SEARCH" D SEARCH(FILE) Q
I Y="INQUIRE" D INQUIRE(FILE) Q
Q
;
PRINT(FILE) ;
N DIC,L
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)
D EN1^DIP
Q
;
SEARCH(FILE) ;
N DIC
S DIC=$S(FILE="CALL":"^FSCD(""CALL"",",FILE="WORK":"^FSCD(""WKLD"",",FILE="STATUS":"^FSCD(""STATUS HIST"",",FILE="OFFICE":"^FSC(""ISC"",",1:"^FSC("""_FILE_""",")
D EN^DIS
Q
;
INQUIRE(FILE) ;
N CONTINUE S CONTINUE=1
I FILE="OFFICE" S FILE="ISC"
F D I 'CONTINUE Q
.N ENTRY,DR,OK
.W ! D LOOKUP^FSCULOOK(FILE,.ENTRY,$S($$ACCESS^FSCU(DUZ,"SUPER"):"AELMOQ",1:"AEMOQ"),.OK)
.I 'OK S CONTINUE=0 Q
.D SHOW(FILE,+ENTRY,.OK)
.I FILE="SITE",DUZ=$P(^FSC("SITE",+ENTRY,0),U,6) D EDIT(FILE,+ENTRY,"3:5.4",.OK) Q
.I '$$ACCESS^FSCU(DUZ,"SUPER") D PAUSE^FSCU(.OK) Q
.I FILE="CALL" W !!,"NOIS calls should be edited using other options." H 2 Q
.I FILE="WORK" W !!,"NOIS workload should be edited using other options." H 2 Q
.I FILE="STATUS" W !!,"NOIS Status History should be edited using other options." H 2 Q
.S DR=".01R;.02:999"
.I FILE="PARAM" S DR="100:101;8"
.D EDIT(FILE,+ENTRY,DR,.OK)
Q
;
EDIT(FILE,DA,DR,OK) ;
N DIE,GBL S OK=1
D FILE(FILE,DA,.DIE,.GBL,.OK)
I 'OK Q
L +@GBL:30 I '$T W !,"Unable to edit." Q
D ^DIE
L -@GBL
Q
;
FILE(FILE,ENTRY,DIE,GBL,OK) ;
S OK=0
I '$D(^FSC(FILE,0)) Q
S DIE="^FSC("""_FILE_""",",GBL=DIE_ENTRY_")",OK=1
Q
;
SHOW(FILE,DA,OK) ;
N DIC
S OK=0
S DIC=$S(FILE="CALL":"^FSCD(""CALL"",",FILE="WORK":"^FSCD(""WKLD"",",FILE="STATUS":"^FSCD(""STATUS HIST"",",FILE="OFFICE":"^FSC(""ISC"",",1:"^FSC("""_FILE_""",")
I '$D(@(DIC_"0)")) Q
D EN^DIQ S OK=1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCUEDIT 3379 printed Oct 16, 2024@18:21 Page 2
FSCUEDIT ;SLC/STAFF-NOIS Utilities Edit ;1/17/98 17:13
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
FILES ; from FSCOPT
+1 NEW DIR,FILE,X,Y
KILL DIR
+2 SET 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"
+3 SET DIR("?",1)="Enter the file you wish to review."
+4 SET DIR("?")="^D HELP^FSCU(.DIR)"
+5 SET DIR("??")="FSC U1 NOIS"
+6 WRITE !,"These are files you can review (editing only by supervisors).",!
+7 SET DIR("A",1)=" Call"
+8 SET DIR("A",2)=" Format"
+9 SET DIR("A",3)=" Functional Area"
+10 SET DIR("A",4)=" List"
+11 SET DIR("A",5)=" Module"
+12 SET DIR("A",6)=" Office"
+13 SET DIR("A",7)=" Package"
+14 SET DIR("A",8)=" Parameter"
+15 SET DIR("A",9)=" Reports"
+16 SET DIR("A",10)=" Site"
+17 SET DIR("A",11)=" Specialist"
+18 SET DIR("A",12)=" Status History"
+19 SET DIR("A",13)=" Subcomponent"
+20 SET DIR("A",14)=" Task"
+21 SET DIR("A",15)=" Workload"
+22 SET DIR("A",16)=""
+23 SET DIR("A")="Select file: "
+24 DO ^DIR
KILL DIR
+25 IF $DATA(DIRUT)
QUIT
+26 IF '$LENGTH(Y)
QUIT
+27 SET FILE=Y
+28 NEW DIR,X,Y
KILL DIR
+29 SET DIR(0)="SAMO^PRINT:PRINT;SEARCH:SEARCH;INQUIRE:INQUIRE"
+30 SET DIR("A")="Select (P)rint, (S)earch, (I)nquire"_$SELECT($$ACCESS^FSCU(DUZ,"SUPER"):"/Edit",1:"")_": "
+31 SET DIR("?",1)="Enter PRINT to print the file."
+32 SET DIR("?",2)="Enter SEARCH the file."
+33 SET DIR("?",3)="Enter INQUIRE to inquire on the file."
+34 SET DIR("?")="^D HELP^FSCU(.DIR)"
+35 SET DIR("??")="FSC U1 NOIS"
+36 DO ^DIR
KILL DIR
+37 IF $DATA(DIRUT)
QUIT
+38 IF '$LENGTH(Y)
QUIT
+39 IF Y="PRINT"
DO PRINT(FILE)
QUIT
+40 IF Y="SEARCH"
DO SEARCH(FILE)
QUIT
+41 IF Y="INQUIRE"
DO INQUIRE(FILE)
QUIT
+42 QUIT
+43 ;
PRINT(FILE) ;
+1 NEW DIC,L
+2 SET DIC=$SELECT(FILE="CALL":"^FSCD(""CALL"",",FILE="WORK":"^FSCD(""WKLD"",",FILE="STATUS":"^FSCD(""STATUS HIST"",",FILE="OFFICE":"^FSC(""ISC"",",1:"^FSC("""_FILE_""",")
SET L="LIST "_$PIECE(@(DIC_"0)"),U)
+3 DO EN1^DIP
+4 QUIT
+5 ;
SEARCH(FILE) ;
+1 NEW DIC
+2 SET DIC=$SELECT(FILE="CALL":"^FSCD(""CALL"",",FILE="WORK":"^FSCD(""WKLD"",",FILE="STATUS":"^FSCD(""STATUS HIST"",",FILE="OFFICE":"^FSC(""ISC"",",1:"^FSC("""_FILE_""",")
+3 DO EN^DIS
+4 QUIT
+5 ;
INQUIRE(FILE) ;
+1 NEW CONTINUE
SET CONTINUE=1
+2 IF FILE="OFFICE"
SET FILE="ISC"
+3 FOR
Begin DoDot:1
+4 NEW ENTRY,DR,OK
+5 WRITE !
DO LOOKUP^FSCULOOK(FILE,.ENTRY,$SELECT($$ACCESS^FSCU(DUZ,"SUPER"):"AELMOQ",1:"AEMOQ"),.OK)
+6 IF 'OK
SET CONTINUE=0
QUIT
+7 DO SHOW(FILE,+ENTRY,.OK)
+8 IF FILE="SITE"
IF DUZ=$PIECE(^FSC("SITE",+ENTRY,0),U,6)
DO EDIT(FILE,+ENTRY,"3:5.4",.OK)
QUIT
+9 IF '$$ACCESS^FSCU(DUZ,"SUPER")
DO PAUSE^FSCU(.OK)
QUIT
+10 IF FILE="CALL"
WRITE !!,"NOIS calls should be edited using other options."
HANG 2
QUIT
+11 IF FILE="WORK"
WRITE !!,"NOIS workload should be edited using other options."
HANG 2
QUIT
+12 IF FILE="STATUS"
WRITE !!,"NOIS Status History should be edited using other options."
HANG 2
QUIT
+13 SET DR=".01R;.02:999"
+14 IF FILE="PARAM"
SET DR="100:101;8"
+15 DO EDIT(FILE,+ENTRY,DR,.OK)
End DoDot:1
IF 'CONTINUE
QUIT
+16 QUIT
+17 ;
EDIT(FILE,DA,DR,OK) ;
+1 NEW DIE,GBL
SET OK=1
+2 DO FILE(FILE,DA,.DIE,.GBL,.OK)
+3 IF 'OK
QUIT
+4 LOCK +@GBL:30
IF '$TEST
WRITE !,"Unable to edit."
QUIT
+5 DO ^DIE
+6 LOCK -@GBL
+7 QUIT
+8 ;
FILE(FILE,ENTRY,DIE,GBL,OK) ;
+1 SET OK=0
+2 IF '$DATA(^FSC(FILE,0))
QUIT
+3 SET DIE="^FSC("""_FILE_""","
SET GBL=DIE_ENTRY_")"
SET OK=1
+4 QUIT
+5 ;
SHOW(FILE,DA,OK) ;
+1 NEW DIC
+2 SET OK=0
+3 SET DIC=$SELECT(FILE="CALL":"^FSCD(""CALL"",",FILE="WORK":"^FSCD(""WKLD"",",FILE="STATUS":"^FSCD(""STATUS HIST"",",FILE="OFFICE":"^FSC(""ISC"",",1:"^FSC("""_FILE_""",")
+4 IF '$DATA(@(DIC_"0)"))
QUIT
+5 DO EN^DIQ
SET OK=1
+6 QUIT