source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURAEDCK.m@ 1751

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1NURAEDCK ;HIRMFO/RM-ROUTINE CALCULATES HIGHEST NURSING DEGREE ;SEPTEMBER 1986
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3 ;CALLED FROM [NURS-I-STAFF4] INPUT TEMPLATE
4 D KILLA,KILLN
5 Q:'$D(^NURSF(210,DA,6))
6 Q:($P(^NURSF(210,DA,6,0),"^",4)=0)!($P(^NURSF(210,DA,6,0),"^",4)="")
7 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
8 D SETHIGH,QUIT
9 Q
10KILLA ; KILLS HIGHEST ACADEMIC DEGREE
11 S $P(^NURSF(210,DA,17),"^",2)=""
12 Q
13KILLN ; KILLS HIGHEST NURSING DEGREE
14 S:$D(^NURSF(210,DA,17)) $P(^NURSF(210,DA,17),"^",1)=""
15 Q
16FINDHIGH ; FINDS HIGHEST ACADEMIC AND NURSING DEGREES
17 D FINDACAD
18 D:(NURSCODE="DIP")!(NURSCODE="AD")!(NURSCODE="BSN")!(NURSCODE="MSN")!(NURSCODE="DNSC") FINDNURS
19 Q
20FINDACAD ;
21 I '$D(NURSNBRA) S NURSNBRA=NURSNBR Q
22 S NURSPRI0=$P(^NURSF(212.1,NURSNBRA,0),"^",4),NURSPRI1=$P(^NURSF(212.1,NURSNBR,0),"^",4)
23 S:NURSPRI1>NURSPRI0 NURSNBRA=NURSNBR
24 I NURSPRI1=NURSPRI0 S:(NURSCODE="AA")!(NURSCODE="BA")!(NURSCODE="MA")!(NURSCODE="PHD") NURSNBRA=NURSNBR
25 Q
26FINDNURS ;
27 I '$D(NURSNBRN) S NURSNBRN=NURSNBR Q
28 S NURSPRI0=$P(^NURSF(212.1,NURSNBRN,0),"^",4),NURSPRI1=$P(^NURSF(212.1,NURSNBR,0),"^",4)
29 S:NURSPRI1>NURSPRI0 NURSNBRN=NURSNBR
30 Q
31SETHIGH ; SETS THE HIGHEST ACADEMIC AND NURSING DEGREES
32 S:$D(NURSNBRA) $P(^NURSF(210,DA,17),"^",2)=NURSNBRA
33 S:$D(NURSNBRN) $P(^NURSF(210,DA,17),"^",1)=NURSNBRN
34 Q
35QUIT ; KILLS LOCAL VARIABLES
36 K NURSNBR,NURSNBRA,NURSNBRN,NURSPRI0,NURSPRI1,NURSCODE,NURSNXT
37 Q
Note: See TracBrowser for help on using the repository browser.