Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: NURSHIGH

NURSHIGH.m

Go to the documentation of this file.
NURSHIGH ;HIRMFO/JH-LIST STAFF HIGHEST DEGREES ;4/21/94
 ;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 Q:'$D(^NURSF(210,0))!'$D(^NURSF(212.1,0))
 W ! S ZTDESC="STAFF DESCRIPANCIES",ZTRTN="START^NURSHIGH" D QUEUE Q
START 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)
 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
 .  F DA=0:0 S DA=$O(^NURSF(210,"B",DA(1),DA)) Q:DA'>0  D
 ..  S II=0 F I=0:0 S II=$O(^NURSF(210,DA,6,II)) Q:II'>0  D
 ...  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
 ...  Q
 ..  S NURAHIGH=$G(^NURSF(210,DA,17)) Q:'$P(NURAHIGH,U)&('$P(NURAHIGH,U,2))  S (NURANUR,NURAACA)="" D
 ...  I $P(NURAHIGH,U)'="" S NURANUR=$P($G(^NURSF(212.1,$P(NURAHIGH,U),0)),U)
 ...  I $P(NURAHIGH,U,2)'="" S NURAACA=$P($G(^NURSF(212.1,$P(NURAHIGH,U,2),0)),U)
 ...  S:$D(NURANUR)!($D(NURAACA)) ^TMP("NURHIGH",$J,DA)=NURANUR_U_NURAACA
 ...  Q
 ..  Q
 .  Q
 I $D(^TMP($J)) D
 .  W !?10,"***STAFF'S  NURSING  AND  ACADERMIC  DEGREES***",?67,NDATE,!!,"STAFF NAME",?26,"SSN",?38,"DEGREE,CODE,PRIORITY",!,"---------",?26,"---",?38,"--------------------",! D
 ..  S NURANAM="" F I=0:0 S NURANAM=$O(^TMP($J,NURANAM)) Q:NURANAM=""  D
 ...  S NURASSN=0 F I=0:0 S NURASSN=$O(^TMP($J,NURANAM,NURASSN)) Q:NURASSN'>0  W !,NURANAM,?26,NURASSN D
 ....  S DA=0 F I=0:0 S DA=$O(^TMP($J,NURANAM,NURASSN,DA)) Q:DA'>0  D
 .....  S II=0 F I=0:0 S II=$O(^TMP($J,NURANAM,NURASSN,DA,II)) Q:II'>0  D
 ......  W ?38,$P(^TMP($J,NURANAM,NURASSN,DA,II),U),?($X+2),$P(^(II),U,3),?($X+2),$P(^(II),U,4),!
 ......  Q
 .....  S NURANUR=$P($G(^TMP("NURHIGH",$J,DA)),U),NURAACA=$P($G(^(DA)),U,2)
 .....  W !,"--HIGHEST NURSING DEGREE--",?40,"--HIGHEST ACADERMIC DEGREE--"
 .....  W !,NURANUR,?40,NURAACA,!,NURASTR
 .....  Q
 ....  Q
 ...  Q
 ..  Q
 .  Q
 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
 .  W !,^TMP("NURERR",$J,DA(1))
 .  Q
 I $D(^TMP("NURERR",$J)) W !?19,"( NOTIFY YOUR IRM PERSONNEL. )"
 K ^TMP($J),^TMP("NURHIGH",$J),^TMP("NURERR",$J) D CLOSE^NURSUT1,^NURSKILL
 Q
MSG1 S ^TMP("NURERR",$J,DA(1))="*** STAFF WITH DUZ "_DA(1)_" FOUND IN NURSTAFF FILE IS NOT IN NEW PERSON FILE!" S NUROUT=1
 Q
QUEUE S %ZIS="Q",%ZIS("B")="",IOP="Q" D ^%ZIS K %ZIS K:POP IO("Q") Q:POP
 I $D(IO("Q")) K IO("Q"),IO("C") S ZTIO=ION_";"_IOST_";"_IOM_";"_IOSL D ^%ZTLOAD S:'$D(ZTSK) POP=1
 Q