source: FOIAVistA/tag/r/NOIS-FSC/FSCRPCWP.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1FSCRPCWP ;SLC/STAFF-NOIS RPC Web Page ;7/23/98 13:07
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4LOADCALL(IN,OUT) ; from FSCRPX (RPCLoadWebCall)
5 N CALL,CNT,KEYWORDS,LINE,NUM,ONETWO,SUBJECT,ZERO
6 S CALL=+$G(^TMP("FSCRPC",$J,"INPUT",1))
7 S ZERO=$G(^FSCD("CALL",CALL,0))
8 I '$L(ZERO) Q
9 S ONETWO=$G(^FSCD("CALL",CALL,120))
10 S SUBJECT=$G(^FSCD("CALL",CALL,1))
11 S KEYWORDS=$G(^FSCD("CALL",CALL,1.5))
12 S ^TMP("FSCRPC",$J,"OUTPUT",1)=ZERO,^(2)=ONETWO,^(3)=SUBJECT,^(4)=KEYWORDS
13 S CNT=4
14 I $O(^FSCD("CALL",CALL,30,0)) D
15 .S CNT=CNT+1
16 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{DESC}}}"
17 .S NUM=0 F S NUM=$O(^FSCD("CALL",CALL,30,NUM)) Q:NUM<1 S LINE=$G(^(NUM,0)) D
18 ..S CNT=CNT+1
19 ..S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
20 .S CNT=CNT+1
21 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{}}}"
22 I $O(^FSCD("CALL",CALL,80,0)) D
23 .S CNT=CNT+1
24 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{RES}}}"
25 .S NUM=0 F S NUM=$O(^FSCD("CALL",CALL,80,NUM)) Q:NUM<1 S LINE=$G(^(NUM,0)) D
26 ..S CNT=CNT+1
27 ..S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
28 .S CNT=CNT+1
29 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{}}}"
30 Q
31 ;
32LOADWEB(IN,OUT) ; from FSCRPX (RPCLoadWeb)
33 N CNT,ID,KEYWORDS,LINE,NUM,ONETWO,SUBJECT,ZERO
34 S ID=+$G(^TMP("FSCRPC",$J,"INPUT",1))
35 S ZERO=$G(^FSCD("WEB",ID,0))
36 I '$L(ZERO) Q
37 S SUBJECT=$G(^FSCD("WEB",ID,1))
38 S ONETWO="",KEYWORDS=""
39 S ^TMP("FSCRPC",$J,"OUTPUT",1)=ZERO,^(2)=ONETWO,^(3)=SUBJECT,^(4)=KEYWORDS
40 S CNT=4
41 I $O(^FSCD("WEB",ID,2,0)) D
42 .S CNT=CNT+1
43 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{DESC}}}"
44 .S NUM=0 F S NUM=$O(^FSCD("WEB",ID,2,NUM)) Q:NUM<1 S LINE=$G(^(NUM,0)) D
45 ..S CNT=CNT+1
46 ..S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
47 .S CNT=CNT+1
48 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{}}}"
49 I $O(^FSCD("WEB",ID,3,0)) D
50 .S CNT=CNT+1
51 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{RES}}}"
52 .S NUM=0 F S NUM=$O(^FSCD("WEB",ID,3,NUM)) Q:NUM<1 S LINE=$G(^(NUM,0)) D
53 ..S CNT=CNT+1
54 ..S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
55 .S CNT=CNT+1
56 .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)="{{{}}}"
57 Q
58 ;
59SAVEWEB(IN,OUT) ; from FSCRPX (RPCSaveWeb)
60 N CNT,ID,LINE,NEWPACK,NUM,PACKAGE,TITLE
61 K FIELDS,^TMP("FSC WP",$J)
62 S PACKAGE=+^TMP("FSCRPC",$J,"INPUT",1)
63 I $O(^FSCD("WEB","C",PACKAGE,0)) S NEWPACK=0
64 E S NEWPACK=1
65 S TITLE=^TMP("FSCRPC",$J,"INPUT",2)
66 S NOW=$$NOW^XLFDT()
67 L +^FSCD("WEB",0):20 I '$T Q
68 S ID=1+$P(^FSCD("WEB",0),U,3)
69 F Q:'$D(^FSCD("WEB",ID,0)) S ID=ID+1
70 S $P(^FSCD("WEB",0),U,3)=ID,$P(^(0),U,4)=$P(^(0),U,4)+1
71 S ^FSCD("WEB",ID,0)="P"_ID_U_PACKAGE_U_DUZ_U_NOW_U_DUZ_U_NOW
72 L -^FSCD("WEB",0)
73 S ^FSCD("WEB",ID,1)=TITLE
74 D PROCESS^FSCRPCNC(.FIELDS)
75 I $O(^TMP("FSC WP",$J,"DESC",0)) D
76 .K ^FSCD("WEB",ID,2)
77 .S (CNT,NUM)=0 F S NUM=$O(^TMP("FSC WP",$J,"DESC",NUM)) Q:NUM<1 S LINE=^(NUM) D
78 ..S CNT=CNT+1
79 ..S ^FSCD("WEB",ID,2,CNT,0)=LINE
80 .S ^FSCD("WEB",ID,2,0)="^^"_CNT_U_CNT_U_DT_U
81 I $O(^TMP("FSC WP",$J,"RES",0)) D
82 .K ^FSCD("WEB",ID,3)
83 .S (CNT,NUM)=0 F S NUM=$O(^TMP("FSC WP",$J,"RES",NUM)) Q:NUM<1 S LINE=^(NUM) D
84 ..S CNT=CNT+1
85 ..S ^FSCD("WEB",ID,3,CNT,0)=LINE
86 .S ^FSCD("WEB",ID,3,0)="^^"_CNT_U_CNT_U_DT_U
87 S DIK="^FSCD(""WEB"",",DA=ID
88 D IX1^DIK
89 K FIELDS,^TMP("FSC WP",$J)
90SEND S CNT=0
91 I NEWPACK D MAIN^FSCRPCW1(.CNT)
92 D PACK^FSCRPCW2(PACK,.CNT)
93 D SOL^FSCRPCW3(ID,.CNT)
94 Q
95 ;
96WEBIEN(IN,OUT) ; from FSCRPXU (RPCWebIEN)
97 N LINE
98 S LINE=$G(^TMP("FSCRPC",$J,"INPUT",1))
99 S ^TMP("FSCRPC",$J,"OUTPUT",1)=$$IEN(LINE)
100 Q
101 ;
102IEN(URL) ; $$(url) -> valid web ien else -1
103 N AURL,BACK,FRONT,IEN
104 S ADDRESS=$P($G(^FSC("PARAM",1,1.8)),U,2)
105 I '$L(ADDRESS) Q -1
106 S AURL=""
107 I $L($P(URL,":",3,99)) D
108 .S FRONT=$P(URL,":",1,2),BACK=$P(URL,":",3,99),BACK=$P(BACK,"/",2,99)
109 .S AURL=FRONT_"/"_BACK
110 S IEN=+$P(URL,ADDRESS_"p",2)
111 I $D(^FSCD("WEB",IEN,0)) Q IEN
112 I $L(AURL) S IEN=+$P(AURL,ADDRESS_"p",2)
113 I $D(^FSCD("WEB",IEN,0)) Q IEN
114 Q -1
115 ;
116TEST ;
117 W $$IEN("http://152.131.1.116:80/nois/p22.htm")
118 Q
119DELWEB(IN,OUT) ; from FSCRPXU (RPCDeleteWeb)
120 Q
Note: See TracBrowser for help on using the repository browser.