1 | NURA7A ;HIRMFO/MD,FT-HOME PHONE NUMBERS FOR ENTIRE STAFF ;8/8/96 13:45
|
---|
2 | ;;4.0;NURSING SERVICE;;Apr 25, 1997
|
---|
3 | Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
|
---|
4 | W ! S (NURSW1,NUROUT,NURPAGE,NURQUIT)=0
|
---|
5 | D EN1^NURSAUTL G QUIT:NUROUT
|
---|
6 | I NURMDSW S DIC(0)="AEQZ",NURPLSCR=0 D EN5^NURSAGSP G:$G(NUROUT) QUIT
|
---|
7 | I NURMDSW=0,NURPLSW=1 S NURPLSCR=0 D PRD^NURSAGSP K NURPLSCR I $G(NUROUT) G QUIT
|
---|
8 | W ! S ZTDESC="Nursing Home Phone Numbers for Entrie Staff",ZTRTN="START^NURA7A" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
|
---|
9 | START ;
|
---|
10 | K ^TMP($J)
|
---|
11 | 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 $G(^NURSF(210,DA,0))'="" S DA(1)=+^NURSF(210,DA,0) D:+DA(1) BLD
|
---|
12 | U IO D PRINT
|
---|
13 | QUIT ;
|
---|
14 | K ^TMP($J) D CLOSE^NURSUT1,^NURAKILL
|
---|
15 | Q
|
---|
16 | BLD W:$E(IOST)="C"&'($R(10)) "." Q:NURSZAP>7&(NURSZDA'=DA) S N1=$S($P($G(^VA(200,DA(1),0)),U)'="":$P($G(^(0)),"^"),1:" BLANK")
|
---|
17 | N X,Y,Z K NUR("DIQ1") S DIC="^NURSF(210,",DR="3;4",DIQ="NUR(""DIQ1"",",DIQ(0)="EN" D EN^DIQ1 K DIC,DIQ,DR
|
---|
18 | S NURFAC(2)=$S($G(NUR("DIQ1",210,DA,4,"E"))'="":NUR("DIQ1",210,DA,4,"E"),1:" BLANK")
|
---|
19 | S NURPROG(2)=$S($G(NUR("DIQ1",210,DA,3,"E"))'="":NUR("DIQ1",210,DA,3,"E"),1:" BLANK")
|
---|
20 | I $G(NURMDSW),'$G(NURFAC),$G(NURFAC(1))'=$G(NURFAC(2)) Q
|
---|
21 | I $G(NURPLSW),$G(NURPROG)=0,$G(NURPROG(1))'=$G(NURPROG(2)) Q
|
---|
22 | I $G(NURPLSW) S:NURPROG(2)="NURSING" NURPROG(2)=" NURSING"
|
---|
23 | S ^TMP($J,NURFAC(2),NURPROG(2),N1,DA)=""
|
---|
24 | Q
|
---|
25 | ; DETAIL LINE PRINT ROUTINE
|
---|
26 | PRINT S NURFAC(2)="" F S NURFAC(2)=$O(^TMP($J,NURFAC(2))) Q:NURFAC(2)="" D P0 Q:NURQUIT
|
---|
27 | Q
|
---|
28 | P0 S NURPROG(2)="" F S NURPROG(2)=$O(^TMP($J,NURFAC(2),NURPROG(2))) Q:NURPROG(2)="" D:NURSW1 HEADER Q:NURQUIT D P1 Q:NURQUIT
|
---|
29 | Q
|
---|
30 | P1 S N1="" F S N1=$O(^TMP($J,NURFAC(2),NURPROG(2),N1)) Q:N1="" D P2 Q:NURQUIT
|
---|
31 | Q
|
---|
32 | P2 F DA=0:0 S DA=$O(^TMP($J,NURFAC(2),NURPROG(2),N1,DA)) Q:DA'>0 D WRITE Q:NURQUIT
|
---|
33 | Q
|
---|
34 | WRITE I 'NURSW1!($Y>(IOSL-6)) D HEADER Q:NURQUIT
|
---|
35 | S NURSW1=1 W ! I $D(^VA(200,$P(^NURSF(210,DA,0),"^"),0)),$P(^(0),"^",1)'="" W $E($P(^(0),"^",1),1,20)
|
---|
36 | D EN2^NURSUT0 W ?36,NPSPOS
|
---|
37 | F NS2=0:0 S NS2=$O(^NURSF(210,DA,2,NS2)) Q:NS2'>0 W:NS2'=$O(^NURSF(210,DA,2,0)) ! W:$D(^NURSF(210,DA,2,NS2,0)) ?51,$P(^(0),"^",1) S NO=$P(^(0),"^",2) W ?66,$S(NO="S":"SELF",NO="R":"RELATIVE",NO="N":"NEIGHBOR",NO="O":"OTHER",1:"")
|
---|
38 | Q
|
---|
39 | HEADER I $E(IOST)="C",NURSW1 D ENDPG^NURSUT1 S:NUROUT NURQUIT=+NUROUT Q:NURQUIT
|
---|
40 | S NURPAGE=NURPAGE+1 W:$E(IOST)="C"!(NURPAGE>1) @IOF
|
---|
41 | I NURMDSW W ?$$CNTR^NURSUT2(NURFAC(2)),$$FACL^NURSUT2(NURFAC(2))
|
---|
42 | W !!,"TELEPHONE NUMBERS OF NURSING EMPLOYEES" S X="T" D ^%DT D:+Y D^DIQ W ?44,Y,?59,"PAGE: ",NURPAGE
|
---|
43 | W !!,"EMPLOYEE",?36,"SERVICE",?51,"TELEPHONE",?66,"OWNER OF" W !,"NAME",?36,"POSITION",?51,"NUMBER",?66,"PHONE NO." W !,$$REPEAT^XLFSTR("-",80)
|
---|
44 | I $G(NURPLSW) N Z S Z=$$PROD^NURSUT2(NURPROG(2)) W !,?$$CNTR^NURSUT2(Z),$G(Z),!,?$$CNTR^NURSUT2(Z),$$REPEAT^XLFSTR("-",$L(Z)+1)
|
---|
45 | Q
|
---|