Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: FSCEU

FSCEU.m

Go to the documentation of this file.
  1. FSCEU ;SLC/STAFF-NOIS Edit Utilities ;9/6/98 20:39
  1. ;;1.1;NOIS;;Sep 06, 1998
  1. ;
  1. UPDATE(CALL) ; from FSCEN, FSCLMPE1, FSCLMPEA, FSCLMPES
  1. D UPDATE^FSCAUDIT(CALL)
  1. D UPDATE^FSCTASK(CALL)
  1. D BUILD(CALL)
  1. Q
  1. ;
  1. BUILD(CALL) ; from FSCELL, FSCLMPE1
  1. N LINE,SHORT
  1. D BUILD^FSCFORM(FSCCNT,CALL,.FSCSTYLE,0,"FSC MULT ")
  1. S SHORT=$$SHORT^FSCGETS(CALL,FSCCNT),LINE=+$O(^TMP("FSC LIST CALLS",$J,"IDX",FSCCNT,0))
  1. S ^TMP("FSC LIST CALLS",$J,LINE,0)=SHORT
  1. S $P(^TMP("FSC MULT",$J,FSCCNT),U,2)=SHORT
  1. S VALMHDR(1)=SHORT
  1. I $L($G(FSCLNAME)),FSCLNAME'["(MODIFIED)" S FSCLNAME=FSCLNAME_" (MODIFIED)"
  1. S FSCEDIT=1
  1. S VALMCNT=+$P(@VALMAR,U,2),VALMBG=1
  1. Q
  1. ;
  1. WP(NAME,PROMPT) ; from FSCEC, FSCEN, FSCNMS
  1. N CNT,DIC,DWLW,DWPK,LINE,TEXTNUM K DIC
  1. K ^TMP("FSC TEXT",$J,NAME)
  1. L +^FSCD("TEXT",0):30 I '$T D SOMEONE^FSCLMPE1 Q
  1. S TEXTNUM=$P(^FSCD("TEXT",0),U,4)+1
  1. F Q:'$D(^FSCD("TEXT",TEXTNUM,0)) S TEXTNUM=TEXTNUM+1
  1. S $P(^FSCD("TEXT",0),U,3)=TEXTNUM,$P(^(0),U,4)=$P(^(0),U,4)+1
  1. S ^FSCD("TEXT",TEXTNUM,0)=TEXTNUM
  1. L -^FSCD("TEXT",0)
  1. I $L($G(PROMPT)) W !,PROMPT
  1. S DIC="^FSCD(""TEXT"","_TEXTNUM_",1,",DWLW=80,DWPK=1 D EN^DIWE K DIC
  1. S (CNT,LINE)=0 F S LINE=$O(^FSCD("TEXT",TEXTNUM,1,LINE)) Q:LINE<1 S ^TMP("FSC TEXT",$J,NAME,LINE,0)=^(LINE,0),CNT=CNT+1
  1. I $D(^TMP("FSC TEXT",$J,NAME)) S ^(NAME)=CNT
  1. L +^FSCD("TEXT",0):30 I '$T D SOMEONE^FSCLMPE1 Q
  1. K ^FSCD("TEXT",TEXTNUM)
  1. S $P(^(0),U,4)=$P(^FSCD("TEXT",0),U,4)-1
  1. L -^FSCD("TEXT",0)
  1. Q
  1. ;
  1. EDITWP(ARRAY,PROMPT) ; from FSCEC, FSCEN, FSCMU1, FSCNMS
  1. ; only ^TMP("FSC ... globals can be edited
  1. I $E(ARRAY)=U,$E(ARRAY,1,9)'="^TMP(""FSC" Q
  1. N CNT,DIC,DWLW,DWPK,LINE,TEXT,TEXTNUM K DIC
  1. L +^FSCD("TEXT",0):30 I '$T D SOMEONE^FSCLMPE1 Q
  1. S TEXTNUM=$P(^FSCD("TEXT",0),U,4)+1
  1. F Q:'$D(^FSCD("TEXT",TEXTNUM,0)) S TEXTNUM=TEXTNUM+1
  1. S $P(^FSCD("TEXT",0),U,3)=TEXTNUM,$P(^(0),U,4)=$P(^(0),U,4)+1
  1. S ^FSCD("TEXT",TEXTNUM,0)=TEXTNUM
  1. L -^FSCD("TEXT",0)
  1. I $L($G(PROMPT)) W !,PROMPT
  1. S (CNT,LINE)=0 F S LINE=$O(@ARRAY@(LINE)) Q:LINE<1 D
  1. .S TEXT=@ARRAY@(LINE,0),CNT=CNT+1
  1. .S ^FSCD("TEXT",TEXTNUM,1,CNT,0)=TEXT
  1. I CNT S ^FSCD("TEXT",TEXTNUM,1,0)="^^"_CNT_U_CNT_U_$G(DT)_U
  1. K @ARRAY
  1. S DIC="^FSCD(""TEXT"","_TEXTNUM_",1,",DWLW=80,DWPK=1 D EN^DIWE K DIC
  1. S (CNT,LINE)=0 F S LINE=$O(^FSCD("TEXT",TEXTNUM,1,LINE)) Q:LINE<1 S @ARRAY@(LINE,0)=^(LINE,0),CNT=CNT+1
  1. I $O(@ARRAY@(0)) S @ARRAY=CNT
  1. L +^FSCD("TEXT",0):30 I '$T D SOMEONE^FSCLMPE1 Q
  1. K ^FSCD("TEXT",TEXTNUM)
  1. S $P(^(0),U,4)=$P(^FSCD("TEXT",0),U,4)-1
  1. L -^FSCD("TEXT",0)
  1. Q
  1. ;
  1. SUB(CALL) ; $$(call#) -> @2 or @1 if subcomponents should be asked
  1. N MOD
  1. S MOD=+$P($G(^FSCD("CALL",CALL,0)),U,8)
  1. I 'MOD Q "@2"
  1. I $O(^FSC("SUB","AC",+$P($G(^FSC("MOD",MOD,0)),U,8),0)) Q "@1"
  1. Q "@2"