source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURA6B2.m@ 1578

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1NURA6B2 ;HIRMFO/RM/MD,FT-AGE REPORT BY SERVICE BY POSITION ;3/27/97
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 (NURQUIT,NURQUEUE,NUROUT)=0
5 D EN1^NURSAUTL G QUIT:NUROUT
6 I NURMDSW D EN12^NURSAGSP G:$G(NUROUT) QUIT S DIC(0)="AEQZ",NURPLSCR=0 D EN5^NURSAGSP G:$G(NUROUT) QUIT
7 I NURMDSW=0,NURPLSW=1 S NURPLSCR=0 D PRD^NURSAGSP K NURPLSCR I $G(NUROUT) G QUIT
8 W ! D EN2^NURSAGSP G:NUROUT QUIT
9 D EN3^NURSAGP0 W ! G QUIT:NUROUT
10 S ZTDESC="Age Report by Nursing Location & Position",ZTRTN="START^NURA6B2" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
11START ;
12 K ^TMP("NURA",$J),^TMP($J) S NSEL="S",(NURQUIT,NURSW1,NURSW1(1),NURPAGE,NTCT)=0,(NL1,NCATPOS)=""
13 D SORT I 'NUROUT U IO D NPRINT,FINCAT^NURAGE
14QUIT K ^TMP("NURA",$J),^TMP($J) D CLOSE^NURSUT1,^NURAKILL
15 Q
16NPRINT F NURI=1:1:8 S (NURSOLD(NURI),NURSFOLD(NURI),NURSWOLD(NURI),NURSPOLD(NURI),NURSMOLD(NURI))=0
17 S NURFAC="" F S NURFAC=$O(^TMP($J,"L",NURFAC)) Q:NURFAC="" D NO Q:NURQUIT D:NURMDSW FSUBTL^NURAGE Q:NURQUIT
18 Q
19NO S NURSPROG="" F S NURSPROG=$O(^TMP($J,"L",NURFAC,NURSPROG)) Q:NURSPROG="" D:'$G(NURSUMSW) HDGING^NURAGE Q:NURQUIT D NP Q:NURQUIT I NURPLSW,'$G(NURSUMSW) D PSUBTL^NURAGE Q:NURQUIT
20 Q
21NP S NPRI="" F S NPRI=$O(^TMP($J,"L",NURFAC,NURSPROG,NPRI)) Q:NPRI="" D NQ Q:NURQUIT
22 Q
23NQ S NCATPOS="" F S NCATPOS=$O(^TMP($J,"L",NURFAC,NURSPROG,NPRI,NCATPOS)) Q:NCATPOS="" D HDGBYP^NURAGE D NR Q:NURQUIT D WRTCAT^NURAGE Q:NURQUIT
24 Q
25NR S NURDOB="" F S NURDOB=$O(^TMP($J,"L",NURFAC,NURSPROG,NPRI,NCATPOS,NURDOB)) Q:NURDOB="" S NURSORT=$G(^(NURDOB)) I NURSORT D NS Q:NURQUIT
26 Q
27NS S NURN1="" F S NURN1=$O(^TMP($J,"L1",NURSORT,NURN1)) Q:NURN1="" D NT Q:NURQUIT
28 Q
29NT S DA="" F S DA=$O(^TMP($J,"L1",NURSORT,NURN1,DA)) Q:DA="" D ^NURAGE Q:NURQUIT
30 Q
31SORT W ! S NRPT=7 D EN2^NURAAGS0
32 S X=$O(^TMP($J,""))
33 I X="" S NUROUT=1,NURFAC=$S($G(NURFAC)=0:$G(NURFAC(1)),1:""),NURSPROG=$S($G(NURSPROG)=0:NURSPROG(1),1:"") D HDGING^NURAGE W !,"THERE IS NO DATA FOR THIS REPORT"
34 Q
Note: See TracBrowser for help on using the repository browser.