source: FOIAVistA/trunk/r/NOIS-FSC/FSCLMPMS.m@ 1203

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1FSCLMPMS ;SLC/STAFF-NOIS List Manager Protocol Modify Save ;1/13/98 12:55
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4STUFF ; from FSCLMPM
5 ; common update for editing
6 ; not scoped
7 D QDESC^FSCLMPMQ(.NEWDEF,.QDESC)
8 D SAVE(.QDESC,.OK)
9 I 'OK Q
10 D STORE("",.DESC,.QDESC,.NEWDEF)
11 S FSCLNAME=$P(^FSC("LIST",FSCLNUM,0),U)
12 D ENTRY^FSCLMM,HEADER^FSCLMM
13 Q
14 ;
15SAVE(QDESC,OK) ;
16 N DIR,LINE,X,Y K DIR
17 W !,"The new definition will be:"
18 S LINE=0 F S LINE=$O(QDESC(LINE)) Q:LINE<1 W !,QDESC(LINE)
19 S DIR(0)="YAO",DIR("A")="Do you want to save this definition? ",DIR("B")="YES"
20 S DIR("?",1)="Enter YES to save this list definition."
21 S DIR("?",2)="Enter NO or '^' to exit without saving, '??' for more help."
22 S DIR("?")="^D HELP^FSCU(.DIR)"
23 S DIR("??")="FSC U1 NOIS"
24 D ^DIR K DIR
25 I Y'=1 S OK=0 Q
26 S OK=1
27 Q
28 ;
29STORE(ZERO,DESC,QDESC,QDEF) ;
30 N CNT,DA,DIC,DIE,DR,LINE,LIST0,OK I $P(^FSC("LIST",FSCLNUM,0),U,3)="A" S FSCQEDIT=1
31 L +^FSC("LIST",FSCLNUM):30 I '$T D BAD^FSCLDS Q
32 I $L($G(ZERO)) D
33 .S DA=FSCLNUM,(DIC,DIE)=7107.1,DR="",LIST0=^FSC("LIST",FSCLNUM,0)
34 .I $P(ZERO,U)'=$P(LIST0,U) S DR=".01///"_$P(ZERO,U)
35 .I $P(ZERO,U,2)'=$P(LIST0,U,2) S DR=DR_";1///"_$P(ZERO,U,2)
36 .I $L(DR) D ^DIE
37 I $D(DESC) D
38 .K ^FSC("LIST",FSCLNUM,2)
39 .S (CNT,LINE)=0 F S LINE=$O(DESC(LINE)) Q:LINE<1 S CNT=CNT+1,^FSC("LIST",FSCLNUM,2,LINE,0)=DESC(LINE)
40 .S ^FSC("LIST",FSCLNUM,2,0)="^^"_CNT_U_CNT_U_DT_U
41 I $D(QDESC) D
42 .K ^FSC("LIST",FSCLNUM,3)
43 .S (CNT,LINE)=0 F S LINE=$O(QDESC(LINE)) Q:LINE<1 S CNT=CNT+1,^FSC("LIST",FSCLNUM,3,LINE,0)=QDESC(LINE)
44 .S ^FSC("LIST",FSCLNUM,3,0)="^^"_CNT_U_CNT_U_DT_U
45 I $D(QDEF) D
46 .K ^FSC("LIST",FSCLNUM,1)
47 .S (CNT,LINE)=0 F S LINE=$O(QDEF(LINE)) Q:LINE<1 S CNT=CNT+1,^FSC("LIST",FSCLNUM,1,LINE,0)=QDEF(LINE),^FSC("LIST",FSCLNUM,1,"B",LINE,LINE)=""
48 .S ^FSC("LIST",FSCLNUM,1,0)="^7107.11^"_CNT_U_CNT
49 L -^FSC("LIST",FSCLNUM)
50 L +^XTMP("FSC LIST DEF",FSCLNUM):20 I '$T D BAD^FSCLDS Q
51 D BUILD^FSCLDU(FSCLNUM,.OK) I 'OK D BAD^FSCLDS
52 L -^XTMP("FSC LIST DEF",FSCLNUM)
53 Q
Note: See TracBrowser for help on using the repository browser.