source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURSXECP.m@ 1696

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1NURSXECP ;HIRMFO/MD-NURSING DATA EXCEPTION REPORT ;AUG 93
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3EN1 ; CHECK NURSING EDUCATION DATA
4 S (NURQUIT,NURQUEUE,NUROUT)=0
5 S ZTRTN="START^NURSXECP" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
6START ;
7 K ^TMP($J) S (NURSW1,NURQUIT,NURPAGE)=0 F DA=0:0 S DA=$O(^NURSF(210,DA)) Q:DA'>0 I +$G(^NURSF(210,DA,0)) W:$R(100) "." D
8 . S NAME=$S($P($G(^VA(200,+$G(^NURSF(210,DA,0)),0)),U)'="":$P($G(^VA(200,+$G(^NURSF(210,DA,0)),0)),U),1:+$G(^NURSF(210,DA,0)))
9 . F D1=0:0 S D1=$O(^NURSF(210,DA,8,D1)) Q:D1'>0 I '($G(^NURSF(210,DA,8,D1,0))="") D
10 . . S DATA=$G(^NURSF(210,DA,8,D1,0)),CLASS=$S($D(^NURSF(212.4,+$P(DATA,U,2),0)):$P($G(^NURSF(212.4,+$P(DATA,U,2),0)),U),'(+$P(DATA,U,2)>0):0,1:1),DATE=+DATA D CHKCLS
11 . . Q
12 . F D2=0:0 S D2=$O(^NURSF(210,DA,18,D2)) Q:D2'>0 I '($G(^NURSF(210,DA,18,D2,0))="") D
13 . . S DATA=$G(^NURSF(210,DA,18,D2,0)),CLASS=$S($P($G(^NURSF(210,DA,18,D2,0)),U)'="":$P($G(^(0)),U),1:0),DATE=+$P($G(^(0)),U,2) D CHKCLS
14 . . Q
15 . Q
16 I $O(^TMP("NURPRSE",$J,""))="" D HEADER W !,"THERE WERE NO EXCEPTION RECORDS FOUND!" G QUIT
17 S NAME="" F S NAME=$O(^TMP("NURPRSE",$J,NAME)) Q:NAME="" S CLASS="" F S CLASS=$O(^TMP("NURPRSE",$J,NAME,CLASS)) Q:CLASS="" S DATE="" F S DATE=$O(^TMP("NURPRSE",$J,NAME,CLASS,DATE)) Q:DATE="" D
18 . I 'NURSW1!($Y>(IOSL-2)) D HEADER Q:NURQUIT
19 . W !,$S(CLASS=" BLANK":"",1:CLASS),?34,$S(DATE=" BLANK":"",1:$E(DATE,4,5)_"/"_$E(DATE,6,7)_"/"_$E(DATE,2,3)),?48,NAME,!,"DISCREPANCY: ",^TMP("NURPRSE",$J,NAME,CLASS,DATE),!!
20 . Q
21QUIT ;
22Q K ^TMP("NURPRSE",$J) D CLOSE^NURSUT1,^NURSKILL
23 Q
24CHKCLS I CLASS=0,+DATE S ^TMP("NURPRSE",$J,NAME," BLANK",DATE)="MISSING CLASS NAME"
25 I CLASS=1,+DATE S ^TMP("NURPRSE",$J,NAME," BLANK",DATE)="POINTED TO CLASS IS MISSING" Q
26 I '(+DATE>0) S ^TMP("NURPRSE",$J,NAME,CLASS," BLANK")="MISSING CLASS DATE" Q
27 I +NAME S ^TMP("NURPRSE",$J,NAME,CLASS,DATE)="BAD NEW PERSON FILE POINTER"
28 I $D(^TMP($J,NAME,CLASS,DATE)) S ^TMP("NURPRSE",$J,NAME,CLASS,DATE)="PREVIOUS ENTRY FOR THIS RECORD/EMPLOYEE"
29 S ^TMP($J,NAME,CLASS,DATE)=""
30 Q
31HEADER I 'NURQUEUE,$E(IOST)="C",NURSW1 W $C(7),! R X:DTIME I '$T!(X="^") S NURQUIT=1 Q
32 S X="T",NURPAGE=NURPAGE+1,NURSW1=1 D ^%DT D:+Y D^DIQ W @IOF,Y,?25,"NURSING EDUCATION DATA EXCEPTION REPORT",?72,"PAGE: ",NURPAGE
33 W !!,"CLASS",?35,"DATE",?48,"EMPLOYEE NAME"
34 S X="",$P(X,"-",80)="" W !,X
35 Q
Note: See TracBrowser for help on using the repository browser.