source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURSHIGH.m@ 949

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

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1NURSHIGH ;HIRMFO/JH-LIST STAFF HIGHEST DEGREES ;4/21/94
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3EN1 Q:'$D(^NURSF(210,0))!'$D(^NURSF(212.1,0))
4 W ! S ZTDESC="STAFF DESCRIPANCIES",ZTRTN="START^NURSHIGH" D QUEUE Q
5START D NOW^%DTC S NDATE=%I(1)_"/"_%I(2)_"/"_$E(%I(3),2,3),NUROUT="",$P(NURASTR,"*",IOM-5)="" K ^TMP($J),^TMP("NURHIGH",$J),^TMP("NURERR",$J)
6 F DA(1)=0:0 S DA(1)=$O(^NURSF(210,"B",DA(1))) Q:DA(1)'>0 D:'$D(^VA(200,DA(1),0)) MSG1 Q:NUROUT D
7 . F DA=0:0 S DA=$O(^NURSF(210,"B",DA(1),DA)) Q:DA'>0 D
8 .. S II=0 F I=0:0 S II=$O(^NURSF(210,DA,6,II)) Q:II'>0 D
9 ... S NURAH=^NURSF(212.1,$P(^NURSF(210,DA,6,II,0),U),0),NURASSN=$P($G(^VA(200,DA(1),1)),U,9),^TMP($J,$P(^VA(200,DA(1),0),U),$S(NURASSN'="":NURASSN,1:999999999),DA,II)=NURAH
10 ... Q
11 .. S NURAHIGH=$G(^NURSF(210,DA,17)) Q:'$P(NURAHIGH,U)&('$P(NURAHIGH,U,2)) S (NURANUR,NURAACA)="" D
12 ... I $P(NURAHIGH,U)'="" S NURANUR=$P($G(^NURSF(212.1,$P(NURAHIGH,U),0)),U)
13 ... I $P(NURAHIGH,U,2)'="" S NURAACA=$P($G(^NURSF(212.1,$P(NURAHIGH,U,2),0)),U)
14 ... S:$D(NURANUR)!($D(NURAACA)) ^TMP("NURHIGH",$J,DA)=NURANUR_U_NURAACA
15 ... Q
16 .. Q
17 . Q
18 I $D(^TMP($J)) D
19 . W !?10,"***STAFF'S NURSING AND ACADERMIC DEGREES***",?67,NDATE,!!,"STAFF NAME",?26,"SSN",?38,"DEGREE,CODE,PRIORITY",!,"---------",?26,"---",?38,"--------------------",! D
20 .. S NURANAM="" F I=0:0 S NURANAM=$O(^TMP($J,NURANAM)) Q:NURANAM="" D
21 ... S NURASSN=0 F I=0:0 S NURASSN=$O(^TMP($J,NURANAM,NURASSN)) Q:NURASSN'>0 W !,NURANAM,?26,NURASSN D
22 .... S DA=0 F I=0:0 S DA=$O(^TMP($J,NURANAM,NURASSN,DA)) Q:DA'>0 D
23 ..... S II=0 F I=0:0 S II=$O(^TMP($J,NURANAM,NURASSN,DA,II)) Q:II'>0 D
24 ...... W ?38,$P(^TMP($J,NURANAM,NURASSN,DA,II),U),?($X+2),$P(^(II),U,3),?($X+2),$P(^(II),U,4),!
25 ...... Q
26 ..... S NURANUR=$P($G(^TMP("NURHIGH",$J,DA)),U),NURAACA=$P($G(^(DA)),U,2)
27 ..... W !,"--HIGHEST NURSING DEGREE--",?40,"--HIGHEST ACADERMIC DEGREE--"
28 ..... W !,NURANUR,?40,NURAACA,!,NURASTR
29 ..... Q
30 .... Q
31 ... Q
32 .. Q
33 . Q
34 I $D(^TMP("NURERR",$J)) W ! F DA(1)=0:0 S DA(1)=$O(^TMP("NURERR",$J,DA(1))) Q:DA(1)'>0 D
35 . W !,^TMP("NURERR",$J,DA(1))
36 . Q
37 I $D(^TMP("NURERR",$J)) W !?19,"( NOTIFY YOUR IRM PERSONNEL. )"
38 K ^TMP($J),^TMP("NURHIGH",$J),^TMP("NURERR",$J) D CLOSE^NURSUT1,^NURSKILL
39 Q
40MSG1 S ^TMP("NURERR",$J,DA(1))="*** STAFF WITH DUZ "_DA(1)_" FOUND IN NURSTAFF FILE IS NOT IN NEW PERSON FILE!" S NUROUT=1
41 Q
42QUEUE S %ZIS="Q",%ZIS("B")="",IOP="Q" D ^%ZIS K %ZIS K:POP IO("Q") Q:POP
43 I $D(IO("Q")) K IO("Q"),IO("C") S ZTIO=ION_";"_IOST_";"_IOM_";"_IOSL D ^%ZTLOAD S:'$D(ZTSK) POP=1
44 Q
Note: See TracBrowser for help on using the repository browser.