source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURA5A.m@ 635

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1NURA5A ;HIRMFO/MD,FT-SALARY REPORT FOR ENTIRE SERVICE ;8/8/96 12:42
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3 Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
4 W !
5 S (NURQUEUE,NURSW1,NURPAGE,NUROUT)=0
6 D EN1^NURSAUTL G QUIT:NUROUT
7 I NURMDSW S DIC(0)="AEQZ",NURPLSCR=0 D EN5^NURSAGSP G:$G(NUROUT) QUIT
8 I NURMDSW=0,NURPLSW=1 S NURPLSCR=1 D PRD^NURSAGSP K NURPLSCR I $G(NUROUT) G QUIT
9 W ! S ZTDESC="Salary Report for Entire Nursing Service",ZTRTN="START^NURA5A" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
10START ;
11 K ^TMP($J)
12 S X="" F I=0:0 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)),+$P(^(0),U) S DA(1)=$P(^(0),U) D BLD1
13 U IO D HEADER,PRINT
14QUIT K ^TMP($J) D CLOSE^NURSUT1,^NURAKILL
15 Q
16BLD1 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
17 .I $D(^NURSF(211.8,NURNODE4,1,NURNODE5,0)),$P(^(0),U)'>DT&(('$P(^(0),U,6))!($P(^(0),U,6)'<DT)) D BLD2
18 .Q
19 Q
20BLD2 Q:NURSZAP>7&(NURSZDA'=DA) S NURSZORT=1 D EN3^NURSAUTL:NURSZAP>6,EN2^NURSAUTL:NURSZORT&NURSZAP Q:'NURSZORT
21 W:$E(IOST)="C"&($R(100)) "." S NURNEN=1 D SETFAC^NURAAGS1,SETPROG^NURAAGS1
22 I $D(^VA(200,DA(1),0)),$P(^(0),"^",1)'="" S N1=$P(^(0),"^")
23 E S N1=" BLANK"
24 I $G(NURMDSW),'$G(NURFAC),$G(NURFAC(1))'=$G(NURFAC(2)) Q
25 I $G(NURPLSW),$G(NURPROG)=0,$G(NURPROG(1))'=$G(NURPROG(2)) Q
26 I $G(NURPLSW) S:NURPROG(2)="NURSING" NURPROG(2)=" NURSING"
27 S ^TMP($J,NURFAC(2),NURPROG(2),N1,DA)=""
28 Q
29 ; DETAIL LINE PRINT ROUTINE
30PRINT S NURFAC(2)=""
31 F S NURFAC(2)=$O(^TMP($J,NURFAC(2))) Q:NURFAC(2)=""!(NUROUT) S NURPROG(2)="" F S NURPROG(2)=$O(^TMP($J,NURFAC(2),NURPROG(2))) Q:NURPROG(2)=""!(NUROUT) S N1="" F S N1=$O(^TMP($J,NURFAC(2),NURPROG(2),N1)) Q:N1="" D P1 Q:NUROUT
32 Q
33P1 F DA=0:0 S DA=$O(^TMP($J,NURFAC(2),NURPROG(2),N1,DA)) Q:DA'>0 D WRITE Q:NUROUT
34 Q
35WRITE I ($Y>(IOSL-6)) D HEADER Q:NUROUT
36 S NURSW1=1
37 I $D(^VA(200,$P(^NURSF(210,DA,0),"^"),0)),$P(^(0),"^")'="" W !,$E($P(^(0),"^"),1,20)
38 E Q
39 S DATA=$S($D(^NURSF(210,DA,7)):^(7),1:"")
40 I $P(DATA,"^")'="",$D(^NURSF(211.1,$P(DATA,"^"),0)) S DATA(1)=^(0)
41 E S DATA(1)=""
42 W:DATA(1)'="" ?32,$P(DATA(1),"^") S NURSAL=+$$EN12^NURSUT0(DA) W ?55,$J(NURSAL,6,2)
43 Q
44HEADER I 'NURQUEUE,$E(IOST)="C",NURSW1 D ENDPG^NURSUT1 Q:NUROUT
45 S NURPAGE=NURPAGE+1 W:$E(IOST)="C"!(NURPAGE>1) @IOF
46 I NURMDSW,$G(NURFAC(2))'="" W ?$$CNTR^NURSUT2(NURFAC(2)),$$FACL^NURSUT2(NURFAC(2))
47 W !!,"NURSING SERVICE STAFF SALARIES" S X="T" D ^%DT D:+Y D^DIQ W ?44,Y,?59,"PAGE: ",NURPAGE
48 W !!,?32,"GRADE/STEP",?55,"GRADE/STEP" W !,"EMPLOYEE NAME",?32,"CODE",?55,"SALARY" W !,$$REPEAT^XLFSTR("-",70)
49 I $G(NURPLSW),$G(NURPROG(2))'="" N Z S Z=$$PROD^NURSUT2(NURPROG(2)) W !,?$$CNTR^NURSUT2(NURPROG(2)),$G(Z),!,?$$CNTR^NURSUT2(NURPROG(2)),$$REPEAT^XLFSTR("-",$L(Z)+1)
50 Q
Note: See TracBrowser for help on using the repository browser.