1 | NURA9K ;HIRMFO/MD,FT-NURSING SERVICE PROFICIENCY REPORT BY LOCATION ; 1/3/03 1:08pm
|
---|
2 | ;;4.0;NURSING SERVICE;**3,13,38**;Apr 25, 1997
|
---|
3 | Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
|
---|
4 | S (NURQUIT,NURQUEUE,NUROUT)=0
|
---|
5 | D EN1^NURSAUTL G QUIT:$G(NUROUT)
|
---|
6 | I NURMDSW S DIC(0)="AEQMZ",NURPLSCR=1 D EN5^NURSAGSP G QUIT:$G(NUROUT)
|
---|
7 | I NURMDSW=0,NURPLSW=1 S NURPLSCR=1 D PRD^NURSAGSP K NURPLSCR I $G(NUROUT) G QUIT
|
---|
8 | W ! D EN1^NURSAGSP G QUIT:$G(NUROUT)
|
---|
9 | D EN4^NURSAGP1 W ! G QUIT:$G(NUROUT)
|
---|
10 | S ZTDESC="Nursing Proficiency Report by Location",ZTRTN="START^NURA9K",NURS132=1,ZTIO=ION D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
|
---|
11 | START ;
|
---|
12 | K ^TMP($J),^TMP("NURLOC",$J) U IO S (NURQUIT,NURPAGE,NURSW1)=0
|
---|
13 | S X="" F S X=$O(^NURSF(210,"AC",X)) Q:X="" I '(X="R") F DA=0:0 S DA=$O(^NURSF(210,"AC",X,DA)) Q:DA'>0 I $D(^NURSF(210,DA,0)),+^(0) S DA(1)=+^(0) W:$R(100)&($E(IOST)="C") "." D SORT
|
---|
14 | D:NURSZAP=7 EN4^NURSAUTL S X=$O(^TMP($J,""))
|
---|
15 | I $O(^TMP($J,""))="",'$D(NURSNLOC) S NURFAC(2)=$S($G(NURFAC)=0:$G(NURFAC(1)),1:""),NURPROG(2)=$S($G(NURPROG)=0:$G(NURPROG(1)),1:"") D NHDR W !!,"THERE IS NO DATA FOR THIS REPORT"
|
---|
16 | I $O(^TMP($J,""))="",$D(NURSNLOC) S NURFAC(2)=$S($G(NURFAC)=0:$G(NURFAC(1)),1:""),NURPROG(2)=$S($G(NURPROG)=0:$G(NURPROG(1)),1:"") D NHDR S NL1="" F S NL1=$O(NURSNLOC(NL1)) Q:NL1="" D NODATA^NURSUT1
|
---|
17 | I $O(^TMP($J,""))'="",$D(NURSNLOC) D I NURSW1=1 D ENDPG^NURSUT1 S NURSW1=0
|
---|
18 | . S (NURY,NURZ,NURX)="" F S NURY=$O(^TMP($J,NURY)) Q:NURY="" F S NURZ=$O(^TMP($J,NURY,NURZ)) Q:NURZ="" F S NURX=$O(^TMP($J,NURY,NURZ,NURX)) Q:NURX="" S ^TMP("NURLOC",$J,NURX)=""
|
---|
19 | . S NL1="" F S NL1=$O(NURSNLOC(NL1)) Q:NL1="" I '$D(^TMP("NURLOC",$J,NL1)) D
|
---|
20 | . . S NURFAC(2)=$S($G(NURFAC)=0:$G(NURFAC(1)),1:""),NURPROG(2)=$S($G(NURPROG)=0:$G(NURPROG(1)),1:"") D:NURSW1=0 NHDR S NURSW1=1 D NODATA^NURSUT1
|
---|
21 | . . Q
|
---|
22 | . Q
|
---|
23 | U IO D NPRINT
|
---|
24 | QUIT ;
|
---|
25 | K ^TMP($J) D CLOSE^NURSUT1,^NURAKILL
|
---|
26 | Q
|
---|
27 | SORT ; POSITION SORT
|
---|
28 | F NURNODE4=0:0 S NURNODE4=$O(^NURSF(211.8,"C",DA(1),NURNODE4)) Q:NURNODE4'>0 F NURNODE5=0:0 S NURNODE5=$O(^NURSF(211.8,"C",DA(1),NURNODE4,NURNODE5)) Q:NURNODE5'>0 D
|
---|
29 | .I $D(^NURSF(211.8,NURNODE4,1,NURNODE5,0)),$P(^(0),U)'>DT&(('$P(^(0),U,6))!($P(^(0),U,6)'<DT)) D SORT1
|
---|
30 | .Q
|
---|
31 | Q
|
---|
32 | SORT1 Q:NURSZAP>7&(NURSZDA'=DA) S NURSZORT=1 D EN3^NURSAUTL:NURSZAP>6,EN2^NURSAUTL:NURSZORT&NURSZAP Q:'NURSZORT
|
---|
33 | S NURNEN=3 D SETFAC^NURAAGS1,SETPROG^NURAAGS1
|
---|
34 | I $D(^VA(200,DA(1),0)) S N1=$S($P(^(0),"^",1)'="":$P(^(0),"^",1),1:" BLANK")
|
---|
35 | I $D(^VA(200,DA(1),1)) S SSN=$S($P(^(1),"^",9)'="":$P(^(1),"^",9),1:" BLANK")
|
---|
36 | S NLO=$S($D(^NURSF(211.8,NURNODE4,0))&$P(^NURSF(211.8,NURNODE4,0),"^")'="":$P(^(0),"^"),1:" BLANK")
|
---|
37 | I $D(^NURSF(211.4,"B",+NLO)) S NLO(1)=$O(^NURSF(211.4,"B",+NLO,0)) I $D(^NURSF(211.4,NLO(1),"I")),$E($P(^("I"),"^"))="I" Q
|
---|
38 | D EN2^NURSUT0 S NURSER=$G(NPSPOS(1))
|
---|
39 | S NPWARD=NLO D EN7^NURSAUTL S NL1=$S(NPWARD'="":$E(NPWARD,1,10),1:" BLANK")
|
---|
40 | Q:NURSER=""!'(NURSER="R")
|
---|
41 | I '$D(^NURSF(210,DA,14,0)) Q
|
---|
42 | S NURPROG("TST")=$G(NURPROG(2))
|
---|
43 | S NN=0 F II=0:0 S NN=$O(^NURSF(210,DA,14,NN)) Q:NN'>0 D NGO
|
---|
44 | K NURPROG("TST")
|
---|
45 | Q
|
---|
46 | NGO I '$D(^NURSF(210,DA,14,NN,0)) Q
|
---|
47 | S NDATA=^NURSF(210,DA,14,NN,0),NDD=$S($P(NDATA,"^")'="":$P(NDATA,"^"),1:" BLANK"),NEV=$S($P(NDATA,"^",2)>0:$P(^VA(200,+$P(NDATA,"^",2),0),"^"),1:" BLANK")
|
---|
48 | I 'NURHOSP,'$D(NURSNLOC(NL1)) Q
|
---|
49 | I 'NSP,NDD<NSPC!(NDD>NSPC(2)) Q
|
---|
50 | I NURMDSW,'$G(NURFAC),$G(NURFAC(1))'=$G(NURFAC(2)) Q
|
---|
51 | I NURPLSW,'$G(NURPROG),$G(NURPROG(1))'=NURPROG("TST") Q
|
---|
52 | S:NURPROG(2)="NURSING" NURPROG(2)=" "_NURPROG(2)
|
---|
53 | S ^TMP($J,NURFAC(2),NURPROG(2),NL1,NDD,N1,SSN,NEV,DA,NN)=""
|
---|
54 | Q
|
---|
55 | NPRINT S NURFAC(2)="" F S NURFAC(2)=$O(^TMP($J,NURFAC(2))) Q:NURFAC(2)=""!NURQUIT D NM Q:NURQUIT
|
---|
56 | Q
|
---|
57 | NM S NURPROG(2)="" F S NURPROG(2)=$O(^TMP($J,NURFAC(2),NURPROG(2))) Q:NURPROG(2)=""!(NURQUIT) D NN Q:NURQUIT
|
---|
58 | Q
|
---|
59 | NN S NL1="" F S NL1=$O(^TMP($J,NURFAC(2),NURPROG(2),NL1)) Q:NL1="" D NHDR Q:NURQUIT D NO Q:NURQUIT
|
---|
60 | Q
|
---|
61 | NO F NDD=0:0 S NDD=$O(^TMP($J,NURFAC(2),NURPROG(2),NL1,NDD)) Q:NDD'>0 D NR Q:NURQUIT
|
---|
62 | Q
|
---|
63 | NR S N1="" F S N1=$O(^TMP($J,NURFAC(2),NURPROG(2),NL1,NDD,N1)) Q:N1="" D NP Q:NURQUIT
|
---|
64 | Q
|
---|
65 | NP S SSN="" F S SSN=$O(^TMP($J,NURFAC(2),NURPROG(2),NL1,NDD,N1,SSN)) Q:SSN="" D NQ Q:NURQUIT
|
---|
66 | Q
|
---|
67 | NQ S NEV="" F S NEV=$O(^TMP($J,NURFAC(2),NURPROG(2),NL1,NDD,N1,SSN,NEV)) Q:NEV="" F DA=0:0 S DA=$O(^(NEV,DA)) Q:DA'>0 F D1=0:0 S D1=$O(^(DA,D1)) Q:D1'>0 D NPPRINT Q:NURQUIT
|
---|
68 | Q
|
---|
69 | NPPRINT I 'NURSW1!($Y>(IOSL-6)) D NHDR Q:NURQUIT
|
---|
70 | W !
|
---|
71 | W:N1'=" BLANK" $E(N1,1,20)
|
---|
72 | W:$D(SSN) ?25,$E(SSN,1,3),"-",$E(SSN,4,5),"-",$E(SSN,6,9)
|
---|
73 | W:NL1'=" BLANK" ?40,$E(NL1,1,10)
|
---|
74 | I NDD'=" BLANK" S Y=NDD D:+Y D^DIQ W:$D(Y) ?51,Y
|
---|
75 | W:NEV'=" BLANK" ?65,$E(NEV,1,20)
|
---|
76 | S DATA=$G(^NURSF(210,DA,14,D1,0)) F I=4,5 I +$P(DATA,U,I) S Y=$P(DATA,U,I) D D^DIQ S ZZ=$S(I=4:91,1:105) W ?ZZ,Y
|
---|
77 | Q
|
---|
78 | NHDR I 'NURQUEUE,NURSW1,$E(IOST)="C" W $C(7),!!,"Press return to continue or ""^"" to exit: " R X:DTIME I '$T!(X="^") S NURQUIT=1 Q
|
---|
79 | S NURPAGE=NURPAGE+1,NURSW1=1 W:$E(IOST)="C"!(NURPAGE>1) @IOF
|
---|
80 | I $G(NURMDSW),$L($G(NURFAC(2)))>1 W !,?$$CNTR^NURSUT2(NURFAC(2)),$$FACL^NURSUT2(NURFAC(2))
|
---|
81 | W !,"NURSING SERVICE PROFICIENCY PROFILE BY LOCATION" S X="T" D ^%DT D:+Y D^DIQ W ?90,Y,?105,"PAGE: ",NURPAGE
|
---|
82 | W !!,?51,"DATE",?91,"WORK COPY",?105,"COPY RET'D"
|
---|
83 | W !,"NAME",?25,"SSN",?40,"LOCATION",?51,"DUE",?65,"EVALUATOR",?91,"SENT OUT",?105,"FOR TYPING",!
|
---|
84 | S X="",$P(X,"-",132)="" W X
|
---|
85 | I $G(NURPLSW),$L($G(NURPROG(2)))>1 N Z S Z=$$PROD^NURSUT2(NURPROG(2)) W !?$$CNTR^NURSUT2(Z),Z,!?$$CNTR^NURSUT2(Z),$$REPEAT^XLFSTR("-",$L(Z)+1),!
|
---|
86 | Q
|
---|