source: FOIAVistA/trunk/r/NOIS-FSC/FSCRPCGT.m@ 1757

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1FSCRPCGT ;SLC/STAFF-NOIS RPC Test Package Installs ;1/11/98 15:25
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4SITE(SITE) ; from FSCRPCG
5 N CNT,DATE,LINE,LINE1,NUM,OK,PACK,PACKNM,SITENUM,VER K ^TMP("FSC TEST",$J)
6 S SITENUM=+$$STSITE^FSCRPCOC(+$G(SITE)) I 'SITENUM Q
7 S CNT=0
8 S NUM=0 F S NUM=$O(^NTS(2050,SITENUM,8,NUM)) Q:NUM<1 S LINE=$G(^(NUM,0)) D
9 .S PACK=$$STPACK(NUM) I 'PACK Q
10 .S VER=$P(LINE,U,7)
11 .S OK=0
12 .I VER["T" S OK=1
13 .I VER["V" S OK=1
14 .I 'OK Q
15 .S DATE=$P(LINE,U,8),DATE=$$FMTE^XLFDT(DATE)
16 .S PACKNM=$P(^FSC("PACK",PACK,0),U)
17 .S LINE1=$$SETSTR^VALM1(VER,PACKNM,30,$L(VER))
18 .S LINE1=$$SETSTR^VALM1(DATE,LINE1,37,$L(DATE))
19 .S CNT=CNT+1,^TMP("FSC TEST",$J,PACKNM,CNT)=LINE1
20 I 'CNT S ^TMP("FSCRPC",$J,"OUTPUT",1)=" No test versions of packages installed." Q
21 S CNT=0,PACKNM="" F S PACKNM=$O(^TMP("FSC TEST",$J,PACKNM)) Q:PACKNM="" D
22 .S NUM=0 F S NUM=$O(^TMP("FSC TEST",$J,PACKNM,NUM)) Q:NUM<1 S LINE=^(NUM) D
23 ..S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
24 K ^TMP("FSC TEST",$J)
25 Q
26 ;
27MOD(MODULE) ; from FSCRPCG
28 N CNT,DATE,LINE,NUM,OK,PACKAGE,SITENM,SITENUM,VER K ^TMP("FSC TEST",$J)
29 S PACKAGE=+$P($G(^FSC("MOD",+$G(MODULE),0)),U,8) I 'PACKAGE Q
30 S PACKAGE=$$STPACK^FSCRPCGN(PACKAGE) I 'PACKAGE Q
31 S CNT=0
32 S SITENUM=0 F S SITENUM=$O(^NTS(2050,SITENUM)) Q:SITENUM<1 D
33 .S LINE=$G(^NTS(2050,SITENUM,8,PACKAGE,0)) I '$L(LINE) Q
34 .S VER=$P(LINE,U,7)
35 .S OK=0
36 .I VER["T" S OK=1
37 .I VER["V" S OK=1
38 .I 'OK Q
39 .S DATE=$P(LINE,U,8),DATE=$$FMTE^XLFDT(DATE)
40 .S SITENM=$$STSITE(SITENUM) I 'SITENM Q
41 .S SITENM=$P($G(^FSC("SITE",SITENM,0)),U) I '$L(SITENM) Q
42 .S LINE=$$SETSTR^VALM1(VER,SITENM,30,$L(VER))
43 .S LINE=$$SETSTR^VALM1(DATE,LINE,37,$L(DATE))
44 .S CNT=CNT+1,^TMP("FSC TEST",$J,SITENM,CNT)=LINE
45 I 'CNT S ^TMP("FSCRPC",$J,"OUTPUT",1)=" No sites with test versions installed." Q
46 S CNT=0,SITENM="" F S SITENM=$O(^TMP("FSC TEST",$J,SITENM)) Q:SITENM="" D
47 .S NUM=0 F S NUM=$O(^TMP("FSC TEST",$J,SITENM,NUM)) Q:NUM<1 S LINE=^(NUM) D
48 ..S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
49 K ^TMP("FSC TEST",$J)
50 Q
51 ;
52STPACK(STPACK) ; $$(site tracking package) -> site
53 N OPACK,PACK
54 S OPACK=+$P($G(^DIC(120102,+$G(STPACK),0)),U,8) I 'STPACK Q ""
55 S PACK=+$O(^FSC("PACK","AC",OPACK,0)) I 'PACK Q ""
56 Q PACK
57 ;
58STSITE(STSITE) ; $$(site tracking site) -> site
59 N DOMAIN,SITE
60 S DOMAIN=$P($G(^NTS(2050,+$G(STSITE),22)),U) I '$L(DOMAIN) Q ""
61 S DOMAIN=+$O(^DIC(4.2,"B",DOMAIN,0)) I 'DOMAIN Q ""
62 S SITE=+$O(^FSC("SITE","AE",DOMAIN,0)) I 'SITE Q ""
63 Q SITE
Note: See TracBrowser for help on using the repository browser.