source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURAFSD.m@ 862

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

initial load of WorldVistAEHR

File size: 3.1 KB
Line 
1NURAFSD ;HIRMFO/MD-EMPLOYEE ACT/SEP MANUAL AND TASKED REPORTS ; 4/25/03 2:37pm
2 ;;4.0;NURSING SERVICE;**2,14,38**;Apr 25, 1997
3 Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),U,1)=1
4 W ! S (NURMDSW,NQSW,NUROUT)=0,X="T-30" D ^%DT S %DT(0)=Y,%DT("A")="Select Date of Staff Activation/Separation Report: ",%DT("B")="T-1",%DT="AE" D ^%DT K %DT I +Y'>0 S NUROUT=1 G QUIT
5 S NURSDATE=+Y
6 D EN9^NURSAGSP I NURMDSW W ! S DIC(0)="AEMQZ" D EN8^NURSAGSP G QUIT:$G(NUROUT)
7 W ! S ZTRTN="START^NURAFSD" D EN7^NURSUT0 I POP!($D(ZTSK)) S NUROUT=1 G QUIT
8START ;
9 K ^TMP($J)
10 S (NURSW1,NTCNT)=0,X=NURSDATE,DIC="^NURSA(213.5,",DIC(0)="",DIC("S")="I $P(^(0),U,2)=0" D ^DIC K DIC I '(+Y>0) S Y=NURSDATE D:+Y D^DIQ S NURSDATE=Y D HDGING W !,"NO DATA FOR "_NURSDATE G QUIT
11 S NURSDA=$S(Y'>0:"",1:+Y)
12 I $G(NURSDA) S DA(1)=NURSDA F DA=0:0 S DA=$O(^NURSA(213.5,+DA(1),2,+DA)) Q:DA'>0 I $D(^NURSA(213.5,+DA(1),2,+DA,0)) D
13 . S NURSWARD=+$P($G(^NURSA(213.5,+DA(1),2,+DA,0)),U,5)
14 . I NURMDSW S NURFAC(2)=$S($$EN12^NURSUT3(NURSWARD)'="":$$EN12^NURSUT3(NURSWARD),1:" BLANK")
15 . E S NURFAC(2)=" BLANK"
16 . I $G(NURFAC)=0,NURFAC(2)'=" BLANK",NURFAC(2)'=NURFAC(1) Q
17 . S ^TMP($J,NURFAC(2),DA(1),DA)=""
18 . Q
19 S DA=0 F S DA=$O(^NURSA(213.2,DA)) Q:DA'>0 S Y=+^NURSA(213.2,+DA,0) I Y S X=$P(^DIC(4,+Y,0),U) D
20 . I $G(NURFAC)=0,NURFAC(1)'=" BLANK",NURFAC(1)'=X Q
21 . S:$G(X)'="" NURSFAC(X)=""
22 . Q
23 I $G(NURMDSW)=1 S NURS="" F S NURS=$O(NURSFAC(NURS)) Q:NURS="" I '$D(^TMP($J,NURS)) D
24 . S NURFAC(2)=$S($G(NURS)="":"",1:NURS) D HDGING W !,"NO EMPLOYEES SEPARATED/ACTIVATED ON ",Y,! D ENDPG^NURSUT1
25 . Q
26 I $G(NURMDSW)=0 S NURS=$O(^TMP($J,"")) S NURFAC(2)=$S($G(NURS)="":"",1:NURS) I NURFAC(2)="" D
27 . D HDGING W !,"NO EMPLOYEES SEPARARTED/ACTIVATED ON ",Y,! D ENDPG^NURSUT1
28 . Q
29 S NURFAC(2)="" F S NURFAC(2)=$O(^TMP($J,NURFAC(2))) Q:NURFAC(2)="" D TOTAL,HDGING S DA(1)=0 F S DA(1)=$O(^TMP($J,NURFAC(2),DA(1))) Q:DA(1)'>0 S DA=0 F S DA=$O(^TMP($J,NURFAC(2),DA(1),DA)) Q:DA'>0 D PRINT
30 D TOTAL
31QUIT D CLOSE^NURSUT1,^NURAKILL
32 K ^TMP($J)
33 Q
34TOTAL ;
35 S:'+NTCNT NUROUT=1 I +NTCNT W !!,"TOTAL EMPLOYEES SEPARATED/ACTIVATED: ",NTCNT
36 Q
37PRINT ;
38 I ($Y>(IOSL-10))!'(NURSW1) D HDGING
39 S NURSEMP=^NURSA(213.5,DA(1),2,DA,0) I $D(^VA(200,$P(NURSEMP,U),0)) W !,$E($P(^(0),U),1,20)
40 W ?20,$S($P(NURSEMP,U,2)="S":"SEP",$P(NURSEMP,U,2)="A":"ACT",1:"") S NPWARD=$P(NURSEMP,U,5) D EN6^NURSAUTL W ?29,$E(NPWARD,1,10)
41 S Y=$P(NURSEMP,U,3) W ?39," " D DT^DIQ W:$D(^NURSF(211.3,+$P(NURSEMP,U,6),0)) ?53,$P(^(0),U) W:$D(^NURSF(211.9,+$P(NURSEMP,U,4),0)) ?64,$E($P(^(0),U,2),1,15) S NTCNT=NTCNT+1
42 Q
43HDGING ;
44 I $G(NUROUT) I '$G(NURQUEUE),$E(IOST)="C",$G(NURSW1) D ENDPG^NURSUT1 S:NUROUT=1 NURQUIT=+NUROUT Q:$G(NURQUIT)
45 W:$Y>0 @IOF
46 W !,"ON THE REPORT DATE, ASSIGNMENTS FOR THE FOLLOWING EMPLOYEES WERE",!,"ACTIVATED/SEPARATED. THE STATUS INDICATORS WERE MODIFIED APPROPRIATELY:",!
47 I NURMDSW,$G(NURFAC(2))'="" W !,?$$CNTR^NURSUT2(NURFAC(2)),$$FACL^NURSUT2(NURFAC(2))
48 S Y=NURSDATE D:+Y D^DIQ W !,?15,"EMPLOYEE ACTIVATION/SEPARATION REPORT "_Y S NURSW1=1
49 W !,"NAME",?20,"ACT/SEP",?29,"LOCATION",?40,"ST/VAC DT",?53,"POSITION",?63,"REASON",!,$$REPEAT^XLFSTR("-",80)
50 S NURSW1=1
51 Q
Note: See TracBrowser for help on using the repository browser.