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

FSCRPCWS.m

Go to the documentation of this file.
FSCRPCWS ;SLC/STAFF-NOIS RPC Web Save ;7/23/98  21:48
 ;;1.1;NOIS;;Sep 06, 1998
 ;
NEWWEB(IN,OUT) ; from FSCRPX (RPCNewWeb)
 N CNT,ID,LINE,NEWPACK,NUM,PACKAGE,TITLE
 K FIELDS,^TMP("FSC WP",$J)
 S PACKAGE=+^TMP("FSCRPC",$J,"INPUT",1)
 I $O(^FSCD("WEB","C",PACKAGE,0)) S NEWPACK=0
 E  S NEWPACK=1
 S TITLE=^TMP("FSCRPC",$J,"INPUT",2)
 S NOW=$$NOW^XLFDT()
 L +^FSCD("WEB",0):20 I '$T Q
 S ID=1+$P(^FSCD("WEB",0),U,3)
 F  Q:'$D(^FSCD("WEB",ID,0))  S ID=ID+1
 S $P(^FSCD("WEB",0),U,3)=ID,$P(^(0),U,4)=$P(^(0),U,4)+1
 S ^FSCD("WEB",ID,0)="P"_ID_U_PACKAGE_U_DUZ_U_NOW_U_DUZ_U_NOW
 L -^FSCD("WEB",0)
 S ^FSCD("WEB",ID,1)=TITLE
 D PROCESS^FSCRPCNC(.FIELDS)
 I $O(^TMP("FSC WP",$J,"DESC",0)) D
 .K ^FSCD("WEB",ID,2)
 .S (CNT,NUM)=0 F  S NUM=$O(^TMP("FSC WP",$J,"DESC",NUM)) Q:NUM<1  S LINE=^(NUM) D
 ..S CNT=CNT+1
 ..S ^FSCD("WEB",ID,2,CNT,0)=LINE
 .S ^FSCD("WEB",ID,2,0)="^^"_CNT_U_CNT_U_DT_U
 I $O(^TMP("FSC WP",$J,"RES",0)) D
 .K ^FSCD("WEB",ID,3)
 .S (CNT,NUM)=0 F  S NUM=$O(^TMP("FSC WP",$J,"RES",NUM)) Q:NUM<1  S LINE=^(NUM) D
 ..S CNT=CNT+1
 ..S ^FSCD("WEB",ID,3,CNT,0)=LINE
 .S ^FSCD("WEB",ID,3,0)="^^"_CNT_U_CNT_U_DT_U
 S DIK="^FSCD(""WEB"",",DA=ID
 D IX1^DIK
 K FIELDS,^TMP("FSC WP",$J)
 S CNT=0
 I NEWPACK D MAIN^FSCRPCW1(.CNT)
 D PACK^FSCRPCW2(PACKAGE,.CNT)
 D SOL^FSCRPCW3(ID,.CNT)
 Q
 ;
EDITWEB(IN,OUT) ; from FSCRPX (RPCEditWeb)
 N CNT,ID,LINE,NEWPACK,NUM,OLDPACK,PACKAGE,TITLE
 K FIELDS,^TMP("FSC WP",$J)
 S PACKAGE=+^TMP("FSCRPC",$J,"INPUT",1),ID=+$P(^(1),U,2)
 I '$D(^FSCD("WEB",ID,0)) Q
 S OLDPACK=+$P(^FSCD("WEB",ID,0),U,2)
 I $O(^FSCD("WEB","C",PACKAGE,0)) S NEWPACK=0
 E  S NEWPACK=1
 I OLDPACK'=PACKAGE S NEWPACK=1
 S TITLE=^TMP("FSCRPC",$J,"INPUT",2)
 S NOW=$$NOW^XLFDT()
 N DA,DIE,DR,X,Y
 S DA=ID,DIE="^FSCD(""WEB"","
 S DR="1///"_PACKAGE_";4///"_DUZ_";5///"_NOW
 L +^FSCD("WEB",0):20 I '$T Q
 D ^DIE
 L -^FSCD("WEB",0)
 S ^FSCD("WEB",ID,1)=TITLE
 D PROCESS^FSCRPCNC(.FIELDS)
 K ^FSCD("WEB",ID,2)
 I $O(^TMP("FSC WP",$J,"DESC",0)) D
 .S (CNT,NUM)=0 F  S NUM=$O(^TMP("FSC WP",$J,"DESC",NUM)) Q:NUM<1  S LINE=^(NUM) D
 ..S CNT=CNT+1
 ..S ^FSCD("WEB",ID,2,CNT,0)=LINE
 .S ^FSCD("WEB",ID,2,0)="^^"_CNT_U_CNT_U_DT_U
 K ^FSCD("WEB",ID,3)
 I $O(^TMP("FSC WP",$J,"RES",0)) D
 .S (CNT,NUM)=0 F  S NUM=$O(^TMP("FSC WP",$J,"RES",NUM)) Q:NUM<1  S LINE=^(NUM) D
 ..S CNT=CNT+1
 ..S ^FSCD("WEB",ID,3,CNT,0)=LINE
 .S ^FSCD("WEB",ID,3,0)="^^"_CNT_U_CNT_U_DT_U
 S DIK="^FSCD(""WEB"",",DA=ID
 D IX1^DIK
 K FIELDS,^TMP("FSC WP",$J)
 S CNT=0
 I NEWPACK D MAIN^FSCRPCW1(.CNT)
 I OLDPACK'=PACKAGE D PACK^FSCRPCW2(OLDPACK,.CNT)
 D PACK^FSCRPCW2(PACKAGE,.CNT)
 D SOL^FSCRPCW3(ID,.CNT)
 Q
 ;
DELWEB(IN,OUT) ; from FSCRPX (RPCEditWeb)
 N CALL,CNT,ID,PACK,URL
 S ID=+^TMP("FSCRPC",$J,"INPUT",1)
 I '$D(^FSCD("WEB",ID,0)) Q
 S PACK=+$P(^FSCD("WEB",ID,0),U,2)
 D DEL^FSCUCD("^FSCD(""WEB"",",ID)
 S CNT=0
 I '$O(^FSCD("WEB","C",PACK,0)) D MAIN^FSCRPCW1(.CNT)
 D PACK^FSCRPCW2(PACK,.CNT)
 S URL=$P($G(^FSC("PARAM",1,1.8)),U,2)_"p"_ID_".htm"
 S CALL=0 F  S CALL=$O(^FSCD("CALL","AWEB",URL,CALL)) Q:CALL<1  D
 .D WEB^FSCRPCEB(CALL,"")
 Q