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

NURAEDCK.m

Go to the documentation of this file.
NURAEDCK ;HIRMFO/RM-ROUTINE CALCULATES HIGHEST NURSING DEGREE ;SEPTEMBER 1986
 ;;4.0;NURSING SERVICE;;Apr 25, 1997
 ;CALLED FROM [NURS-I-STAFF4] INPUT TEMPLATE
 D KILLA,KILLN
 Q:'$D(^NURSF(210,DA,6))
 Q:($P(^NURSF(210,DA,6,0),"^",4)=0)!($P(^NURSF(210,DA,6,0),"^",4)="")
 F NURSNXT=0:0 S NURSNXT=$O(^NURSF(210,DA,6,NURSNXT)) Q:NURSNXT'>0  S NURSNBR=$P(^NURSF(210,DA,6,NURSNXT,0),"^",1),NURSCODE=$P(^NURSF(212.1,NURSNBR,0),"^",3) D FINDHIGH
 D SETHIGH,QUIT
 Q
KILLA ; KILLS HIGHEST ACADEMIC DEGREE
 S $P(^NURSF(210,DA,17),"^",2)=""
 Q
KILLN ; KILLS HIGHEST NURSING DEGREE
 S:$D(^NURSF(210,DA,17)) $P(^NURSF(210,DA,17),"^",1)=""
 Q
FINDHIGH ; FINDS HIGHEST ACADEMIC AND NURSING DEGREES
 D FINDACAD
 D:(NURSCODE="DIP")!(NURSCODE="AD")!(NURSCODE="BSN")!(NURSCODE="MSN")!(NURSCODE="DNSC") FINDNURS
 Q
FINDACAD ;
 I '$D(NURSNBRA) S NURSNBRA=NURSNBR Q
 S NURSPRI0=$P(^NURSF(212.1,NURSNBRA,0),"^",4),NURSPRI1=$P(^NURSF(212.1,NURSNBR,0),"^",4)
 S:NURSPRI1>NURSPRI0 NURSNBRA=NURSNBR
 I NURSPRI1=NURSPRI0 S:(NURSCODE="AA")!(NURSCODE="BA")!(NURSCODE="MA")!(NURSCODE="PHD") NURSNBRA=NURSNBR
 Q
FINDNURS ;
 I '$D(NURSNBRN) S NURSNBRN=NURSNBR Q
 S NURSPRI0=$P(^NURSF(212.1,NURSNBRN,0),"^",4),NURSPRI1=$P(^NURSF(212.1,NURSNBR,0),"^",4)
 S:NURSPRI1>NURSPRI0 NURSNBRN=NURSNBR
 Q
SETHIGH ; SETS THE HIGHEST ACADEMIC AND NURSING DEGREES
 S:$D(NURSNBRA) $P(^NURSF(210,DA,17),"^",2)=NURSNBRA
 S:$D(NURSNBRN) $P(^NURSF(210,DA,17),"^",1)=NURSNBRN
 Q
QUIT ; KILLS LOCAL VARIABLES
 K NURSNBR,NURSNBRA,NURSNBRN,NURSPRI0,NURSPRI1,NURSCODE,NURSNXT
 Q