source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURSEP3I.m@ 868

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

initial load of FOIAVistA 6/30/08 version

File size: 4.0 KB
Line 
1NURSEP3I ;HIRMFO/GLB,JH,FT-INDIVIDUAL NURSING MANDATORY INSERVICE CLASS DATA FOR THE LAST THREE YEARS ;2/27/98 14:26
2 ;;4.0;NURSING SERVICE;**9**;Apr 25, 1997
3EN1 S X=$G(^PRSE(452.7,1,"OFF")) Q:X=""!(X=1)
4 S Y=$G(^DIC(213.9,1,"OFF")) Q:X=""!(X=1)
5 S (NUSW,NSP,NURQUEUE,NUROUT)=0,YRSW=1
6 S DATSEL="NS^N+" D DATSEL^NURSAGP2 G QUIT:NUROUT W ! D INS^NURSAGP2 G QUIT:NUROUT D:NURSEL'="A" EN5^NURSAGP1 G QUIT:NUROUT
7 D EN1^NURSAUTL G QUIT:NUROUT D EN10^NURSUT3($G(DUZ)) I $G(NURSZAP)>7 S DA=$O(^NURSF(210,"B",DUZ,0)),DA(1)=DUZ G A1
8 S DIC("S")="I +$$EN6^NURSUT3($G(Y))"
9 D EN3^NURSAGP1 G QUIT:NUROUT S DA=+Y,DA(1)=+$G(^NURSF(210,DA,0))
10A1 W ! S ZTRTN="START^NURSEP3I" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
11START ;
12 K ^TMP("NURE",$J) S NURS132=$S(IOM'<132:1,1:0),$P(HH,"-",$S(NURS132:133,1:81))="",(CLASS,NURPAGE)=0,(NOIEN,NOLOC,NOMIC1,NYR,SLOC,SNM,SIEN,SMC)="",FSW=1
13 S X=YRST D COMPARE S YR=Y F Y=0:1:2 S YR(Y)=YR-(Y*10000),YR0(YR-(Y*10000))=""
14 K NYR D SORT
15 S LOC=""
16 F S LOC=$O(^TMP("NURE",$J,"L",LOC)) Q:LOC=""!NUROUT S NM="" F S NM=$O(^TMP("NURE",$J,"L",LOC,NM)) Q:NM=""!NUROUT S NURSORT=$G(^TMP("NURE",$J,"L",LOC,NM)) I NURSORT F IEN=0:0 S IEN=$O(^TMP("NURE",$J,"L1",NURSORT,IEN)) Q:IEN'>0!NUROUT D FIN
17 I 'NURPAGE D HDR W !!,"THERE IS NO SELECTED INSERVICE DATA."
18QUIT ;
19 K ^TMP("NURE",$J) D CLOSE^NURSUT1,^NURSKILL
20 Q
21FIN S MC="" F S MC=$O(^TMP("NURE",$J,"L1",NURSORT,IEN,MC)) Q:MC=""!NUROUT D FIN1
22 Q
23FIN1 S SP=$P(^TMP("NURE",$J,"L1",NURSORT,IEN,MC),"^")
24 I $Y>(IOSL-4)!(FSW) D HDR Q:NUROUT
25 I NOIEN'=IEN D PHDR
26 I NOMIC1'=MC D CHDR
27 F X=0:1:2 S NYR(YR(X))=0
28 F I=0:0 D FIN2 W ! Q:NYR(YR(1))="E"&(NYR(YR(0))="E")&(NYR(YR(2))="E") I ($Y>(IOSL-4)) D HDR Q:NUROUT
29 Q
30FIN2 F NX=2:-1:0 I NYR(YR(NX))'="E" S NYR(YR(NX))=$O(^TMP("NURE",$J,2,IEN,MC,YR(NX),NYR(YR(NX)))) S:NYR(YR(NX))'>0 NYR(YR(NX))="E" I NYR(YR(NX))'="E" D FIN3
31 Q
32FIN3 S Y=$E(^TMP("NURE",$J,2,IEN,MC,YR(NX),NYR(YR(NX))),1,7),X=$O(^(NYR(YR(NX)))) D D^DIQ S YY=$P(Y,",") W ?($S(NURS132:88,1:52)+((2-NX)*9)),YY S:X'>0 NYR(YR(NX))="E"
33 Q
34HDR I 'NUROUT I 'FSW,$E(IOST)="C" D ENDPG^NURSUT1 Q:$G(NUROUT)
35 S FSW=0,NOLOC=LOC,NURPAGE=NURPAGE+1
36 W:$E(IOST)="C"!(NURPAGE>1) @IOF
37 W !,"3 "_$S(TYP="C":"CY ",1:"FY ")_"INDIVIDUAL "_$S(NURSEL="M":"MANDATORY",NURSEL="O":"OTHER",NURSEL="W":"WARD",NURSEL="C":"C.E.",1:"COMPLETE")_" TRAINING REPORT",?$S(NURS132:100,1:52)," "
38 S Y=DT D DT^DIQ
39 W ?$S(NURS132:121,1:69),"PAGE: ",NURPAGE,!!,"CLASS"
40 I NURS132 W ?82," "
41 I 'NURS132 W ?46," "
42 F X=2:-1:0 S Z=1700+$E(YR(X),1,3) W " ",Z
43 W !,HH Q:NUROUT!($G(IEN)="")
44PHDR S NOIEN=IEN W !,"Employee Name: "_NM_" "_SP,!!
45CHDR S NOMIC1=MC W $S(NURS132:MC,1:$E(MC,1,50))
46 Q
47SORT S NAM=" BLANK" I $D(^VA(200,DA(1),0)),$P(^(0),"^",1)'="" S NAM=$P(^(0),"^",1)
48 D EN3^NURSUT0 S LOC=$S('$D(^NURSF(211.8,+NOD1,0)):" BLANK",'+$P(^(0),U):" BLANK",1:$P(^(0),U))
49 S NPWARD=LOC D EN7^NURSAUTL S LOC1=$S(NPWARD'="":NPWARD,1:" BLANK")
50 D EN2^NURSUT0 S SP=NPSPOS(1),SP=$S(SP="R":"RN",SP="L":"LPN",SP="N":"NA",SP="C":"CK",SP="S":"SE",SP="A":"AO",SP="O":"OT",1:" ")
51 S NIC2="" F S NIC2=$O(^PRSE(452,"AA",NIC2)) Q:NIC2="" S MIC="" F S MIC=$O(^PRSE(452,"AA",NIC2,DA(1),MIC)) Q:MIC="" W:$E(IOST)="C" "." D A
52 Q
53A F MIC(0)=0:0 S MIC(0)=$O(^PRSE(452,"AA",NIC2,DA(1),MIC,MIC(0))) Q:MIC(0)'>0 F MIC(1)=0:0 S MIC(1)=$O(^PRSE(452,"AA",NIC2,DA(1),MIC,MIC(0),MIC(1))) Q:MIC(1)'>0 D SORT2
54 Q
55SORT2 ;
56 S:$G(NURSORT)="" NURSORT=1
57 I NURSEL'="A"&(NURSEL'=NIC2) Q
58 S MICD=9999999-MIC(0),X=MICD S:NURSEL="A" NSPC=MIC D COMPARE S MICY=Y
59 Q:'$D(YR0(MICY)) I 'NSP,NSPC'=MIC Q
60 S NYR(MIC,MICY)=$S('$D(NYR(MIC,MICY)):0,1:NYR(MIC,MICY))+1
61 N X S X=$G(^TMP("NURE",$J,"L",LOC1,NAM))
62 I X="" S X=NURSORT,NURSORT=NURSORT+1,^TMP("NURE",$J,"L",LOC1,NAM)=X
63 S ^TMP("NURE",$J,"L1",X,DA,MIC)=SP
64 S ^TMP("NURE",$J,2,DA,MIC,MICY,NYR(MIC,MICY))=MICD
65 Q
66COMPARE ;CHECK FOR NEW FISCAL YEAR
67 S Y=$E(X,1,3)_"0000" I X'<($E(X,1,3)_"1000"),TYP="F" S Y=Y+10000
68 Q
69EN4 ; SCREEN OUT UNAUTHORIZED LOCATION DATA
70 S X="" F Y=0:0 S X=$O(^TMP("NURE",$J,1,X)) Q:X="" S Z="" F Y=0:0 S Z=$O(^SC("B",$S(X'?1"NUR ":"NUR ",1:"")_X,Z)) Q:Z'>0 S Y=$O(^NURSF(211.4,"B",Z,"")) K:$S(Y'>0:0,'$D(NURSZLO(Y)):1,1:0) ^TMP("NURE",$J,1,X)
71 K X,Y
72 Q
Note: See TracBrowser for help on using the repository browser.