source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURADEG2.m@ 868

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1NURADEG2 ;HIRMFO/JH,FT-COMBINED EDUCATIONAL REPORT BY SERVICE ;6/14/94
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3 S (NURQUIT,NURPAGE,NUROUT)=0 W !
4 S X="" F S X=$O(^NURSF(210,"AC",X)) Q:X="" I X'="R" F DA=0:0 S DA=$O(^NURSF(210,"AC",X,DA)) Q:DA'>0 I $D(^NURSF(210,DA,0)),+$P(^(0),U) S DA(1)=$P(^(0),U) W:$R(100)&($E(IOST)="C") "." D SORT1
5 K %DT,NDA,NOD1,NOD2,NURNODE4,NURNODE5,Y,NURSCAT,NURCAT,NURCAT,NRNLPN,X,J,K,N,NL,NOD,ATD,NJ,D1
6QUIT K NURS132,DATA,ZZ,I,NSPC,D0,DIC,NURFLAG,NPSPOS,M,NADT,NLDTPR,NLO,NSP,NTD,N1,NURCAT,NL1,NK,NURSZDA,NURSZLO,NURSZAP,NURSZORT,NURSZSP,NPWARD,NUREQWRD
7 Q
8SORT1 F NURNODE4=0:0 S NURNODE4=$O(^NURSF(211.8,"C",DA(1),NURNODE4)) Q:NURNODE4'>0 F NURNODE5=0:0 S NURNODE5=$O(^NURSF(211.8,"C",DA(1),NURNODE4,NURNODE5)) Q:NURNODE5'>0 D
9 .I $D(^NURSF(211.8,NURNODE4,1,NURNODE5,0)),$P(^(0),U)'>DT&(('$P(^(0),U,6))!($P(^(0),U,6)'<DT)) D SORT2
10 .Q
11 Q
12SORT2 Q:NURSZAP>7&(NURSZDA'=DA) S NURSZORT=1 D EN3^NURSAUTL:NURSZAP>6,EN2^NURSAUTL:NURSZORT&NURSZAP Q:'NURSZORT
13 S NURNEN=1 D SETFAC^NURAAGS1,SETPROG^NURAAGS1
14 I $D(^VA(200,DA(1),0)),$P(^(0),"^",1)'="" S N1=$P(^(0),"^",1)
15 E S N1=" BLANK"
16 S NLO=$S($D(^NURSF(211.8,NURNODE4,0))&($P(^(0),"^")'=""):$P(^(0),"^"),1:" BLANK")
17 E S NLO=" BLANK"
18 I $D(^NURSF(211.4,"B",+NLO)) S NLO(1)=$O(^NURSF(211.4,"B",+NLO,0)) I $D(^NURSF(211.4,+NLO(1),"I")),$E($P(^("I"),"^"))="I" Q
19 D EN2^NURSUT0 Q:NPSPOS="" S Y=$G(^NURSF(211.3,+NPSPOS(0),0))
20 I Y'="" S NURSCATY=$P(Y,U,5) S:NURSCATY="O" NURSCATY=NURSCATY_" "_$P(Y,U,6)
21 I $S($E(NURSCATY)'="O":'$D(^TMP("NURSCAT",$J,NURSCATY)),$P($G(NURSCATY),"O ",2)'="":'$D(^TMP("NURSCAT",$J,$E(NURSCATY,3,99))),1:0) Q
22 I NURMDSW,'$G(NURFAC),$G(NURFAC(1))'=$G(NURFAC(2)) Q
23 I NURPLSW,'$G(NURPROG),$G(NURPROG(1))'=$G(NURPROG(2)) Q
24 S:NURPROG(2)="NURSING" NURPROG(2)=" "_NURPROG(2)
25 S NPWARD=NLO D EN7^NURSAUTL S NL1=$S(NPWARD'="":NPWARD,1:" BLANK")
26 S II=0 F I=0:0 S II=$O(^NURSF(210,DA,6,II)) Q:II'>0 D
27 . 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,"DEG",DA,N1,$S(NURASSN'="":NURASSN,1:999999999),II)=NURAH
28 . Q
29 S NURAHIGH=$G(^NURSF(210,DA,17)) Q:'$P(NURAHIGH,U)&('$P(NURAHIGH,U,2)) S (NURANUR,NURAACA)="" D
30 . I $P(NURAHIGH,U)'="" S NURANUR=$P($G(^NURSF(212.1,$P(NURAHIGH,U),0)),U)
31 . I $P(NURAHIGH,U,2)'="" S NURAACA=$P($G(^NURSF(212.1,$P(NURAHIGH,U,2),0)),U)
32 . S:$D(NURANUR)!($D(NURAACA)) ^TMP($J,"HIGH",DA)=NURANUR_U_NURAACA_U_NPWARD_U_NPSPOS
33 . Q
34 S ^TMP($J,"SER",NURFAC(2),NURPROG(2),NPSPOS(1),DA)=""
35 Q
Note: See TracBrowser for help on using the repository browser.