source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURA9G.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: 4.0 KB
Line 
1NURA9G ;HIRMFO/MD,RM,FT-LICENSE PROFILE BY LOCATION ;8/9/96 10:50
2 ;;4.0;NURSING SERVICE;**13**;Apr 25, 1997
3 Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
4 S (NURPLSW,NURPAGE,NURSW1,NUROUT,NURMDSW,NURQUEUE)=0
5 D EN1^NURSAUTL G QUIT:$G(NUROUT)
6 D EN9^NURSAGSP
7 I NURMDSW S DIC(0)="AEMQZ",NURPLSCR=1 D EN5^NURSAGSP K NURPLSCR I $G(NUROUT) G QUIT
8 I NURMDSW=0,NURPLSW=1 S NURPLSCR=1 D PRD^NURSAGSP K NURPLSCR I $G(NUROUT) G QUIT
9 W ! D EN1^NURSAGSP G:$G(NUROUT) QUIT
10 D EN3^NURSAGSP G:$G(NUROUT) QUIT
11 D EN7^NURSAGP0 W ! G QUIT:$G(NUROUT)
12 D EN10^NURSAGSP W ! G QUIT:$G(NUROUT)
13 S ZTDESC="Nursing License Profile by Location",ZTRTN="START^NURA9G" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
14START ;
15 K ^TMP($J),^TMP("NURLOC",$J) U IO
16 D SORT D:'$G(NUROUT) NPRINT
17QUIT K ^TMP($J) D CLOSE^NURSUT1,^NURAKILL
18 Q
19NPRINT S NURFAC(2)="" F S NURFAC(2)=$O(^TMP($J,"L",NURFAC(2))) Q:NURFAC(2)=""!$G(NUROUT) D NL Q:$G(NUROUT)
20 Q
21NL S NURPROG(4)="" F S NURPROG(4)=$O(^TMP($J,"L",NURFAC(2),NURPROG(4))) Q:NURPROG(4)=""!$G(NUROUT) D NM Q:$G(NUROUT)
22 Q
23NM S NL1="" F S NL1=$O(^TMP($J,"L",NURFAC(2),NURPROG(4),NL1)) Q:NL1=""!$G(NUROUT) D NHDR Q:$G(NUROUT) S NURCAT(1)=$O(^TMP($J,"L",NURFAC(2),NURPROG(4),NL1,"")) D NN Q:$G(NUROUT)
24 Q
25NN Q:NURCAT(1)="" S NURCAT="" F S NURCAT=$O(^TMP($J,"L",NURFAC(2),NURPROG(4),NL1,NURCAT)) Q:NURCAT=""!$G(NUROUT) D NO Q:$G(NUROUT)
26 Q
27NO S NLDT="" F S NLDT=$O(^TMP($J,"L",NURFAC(2),NURPROG(4),NL1,NURCAT,NLDT)) Q:NLDT=""!$G(NUROUT) S NURSORT=$G(^(NLDT)) I NURSORT D NP Q:$G(NUROUT)
28 Q
29NP S N1="" F S N1=$O(^TMP($J,"L1",NURSORT,N1)) Q:N1=""!$G(NUROUT) S D0=$E(NLDT,8),NLDTPR=$E(NLDT,1,7) F DA=0:0 S DA=$O(^TMP($J,"L1",NURSORT,N1,DA)) Q:DA'>0 D NPPRINT Q:$G(NUROUT)
30 Q
31NPPRINT I ($Y>(IOSL-6)) D NHDR Q:$G(NUROUT)
32 S:'NURSW1 NURSW1=1
33 W ! W:NURCAT(1)'=NURCAT !
34 W:N1'=" BLANK" ?2,$E(N1,1,20)
35 W:NURCAT'=" BLANK" ?28,$$CAT^NURSUT2(NURCAT) S NURCAT(1)=NURCAT
36 I $D(^VA(200,+^NURSF(210,DA,0),1)),$P(^(1),"^",9)'="" S M=$P(^(1),"^",9) W ?36,$E(M,1,3),"-",$E(M,4,5),"-",$E(M,6,9)
37 I NLDTPR'[" BLANK" S Y=NLDTPR D:+Y D^DIQ W ?49,Y
38 I D0'="",$D(^NURSF(210,+DA,4,D0,0)),$P(^(0),"^",1)'="",$D(^DIC(5,$P(^NURSF(210,DA,4,D0,0),"^",1),0)),$P(^(0),"^",2)'="" W ?62,$P(^(0),"^",2)
39 I D0'="",$D(^NURSF(210,+DA,4,D0,0)),$P(^(0),"^",2)'="" W ?68,$P(^(0),"^",2)
40 Q
41NHDR I 'NURQUEUE,NURSW1,$E(IOST)="C" D ENDPG^NURSUT1 Q:$G(NUROUT)
42 S NURPAGE=NURPAGE+1 W:$E(IOST)="C"!(NURPAGE>1) @IOF
43 I $G(NURMDSW) W !,?35,$S($G(NURFAC(2))=" BLANK":"NO FACILITY",1:NURFAC(2))
44 W !,"LICENSE PROFILE BY LOCATION" S X="T" D ^%DT D:+Y D^DIQ W ?56,Y,?72,"PAGE: ",NURPAGE
45 W !!,?49,"EXPIRATION",?62,"STATE",?68,"PROFESSIONAL"
46 W !,?28,"SVC",?49,"DATE OF",?62,"ISS.",?68,"LICENSE"
47 W !,?2,"NAME",?28,"CAT.",?36,"SSN",?49,"LICENSE",?62,"LIC.",?68,"NUMBER"
48 W !,$$REPEAT^XLFSTR("-",80)
49 D:$G(NURPLSW) BRK1 D BRK
50 Q
51SORT W ! S NRPT=8 D EN3^NURAAGS0
52 S (NURY,NURZ,NURX)="" F S NURY=$O(^TMP($J,"L",NURY)) Q:NURY="" F S NURZ=$O(^TMP($J,"L",NURY,NURZ)) Q:NURZ="" F S NURX=$O(^TMP($J,"L",NURY,NURZ,NURX)) Q:NURX="" S ^TMP("NURLOC",$J,NURX)=""
53 I $O(^TMP($J,""))="",'$D(NURSNLOC) S NUROUT=1 S NURPROG(4)=$S($G(NURPROG)=0:NURPROG(1),1:""),NURFAC(2)=$S($G(NURFAC)=0:NURFAC(1),1:"") D NHDR W !!,"THERE IS NO DATA FOR THIS REPORT"
54 I $O(^TMP($J,""))="",$D(NURSNLOC) S NUROUT=1 S NURPROG(4)=$S($G(NURPROG)=0:NURPROG(1),1:""),NURFAC(2)=$S($G(NURFAC)=0:NURFAC(1),1:"") D NHDR S NL1="" F S NL1=$O(NURSNLOC(NL1)) Q:NL1="" D NODATA^NURSUT1
55 I $O(^TMP($J,""))'="",$D(NURSNLOC) D I NURSW1=1 D ENDPG^NURSUT1 S NURSW1=0
56 . S NL1="" F S NL1=$O(NURSNLOC(NL1)) Q:NL1="" I '$D(^TMP("NURLOC",$J,NL1)) D
57 . . S NURPROG(4)=$S($G(NURPROG)=0:NURPROG(1),1:""),NURFAC(2)=$S($G(NURFAC)=0:NURFAC(1),1:"") I '$D(^TMP("NURLOC",$J,NL1)) D:NURSW1=0 NHDR S NURSW1=1 D NODATA^NURSUT1
58 . . Q
59 . Q
60 Q
61BRK I $G(NURFAC(2))'="",$G(NL1)'="",$D(^TMP("NURLOC",$J,NL1)) W !,"LOCATION: ",NL1,!
62 Q
63BRK1 I $G(NURPROG(4))'="",$G(NURPROG(4))'="" W !?$$CNTR^NURSUT2(NURPROG(4)),$S(NURPROG(4)=" NURSING":$E(NURPROG(4),2,99),1:$G(NURPROG(4))) W !?$$CNTR^NURSUT2(NURPROG(4)),$$REPEAT^XLFSTR("-",$L(NURPROG(4))+1),!
64 Q
Note: See TracBrowser for help on using the repository browser.