NURA7C ;HIRMFO/MD,FT-INDIVIDUAL PHONE NUMBER ;8/8/96 13:50
;;4.0;NURSING SERVICE;;Apr 25, 1997
Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
W ! S (NURQUEUE,NUROUT,NURQUIT)=0
D EN1^NURSAUTL G QUIT:NUROUT
S DIC("S")=" S DA=+Y I 'NURSZAP!(NURSZAP'>7)!(NURSZDA=DA)"
D EN3^NURSAGP1 G QUIT:NUROUT
W ! S ZTDESC="Nursing Individual Phone Number(s)",ZTRTN="START^NURA7C" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
START ;
K ^TMP($J)
U IO S (NURPAGE,NURSW1)=0 D HEADER,WRITE
QUIT K ^TMP($J) D CLOSE^NURSUT1,^NURAKILL
Q
; DETAIL LINE PRINT ROUTINE
WRITE I ($Y>(IOSL-6)) D HEADER Q:NURQUIT
S NURSW1=1
W:+N2 !,$E($P(^VA(200,N2,0),"^",1),1,20)
D EN2^NURSUT0 W ?36,NPSPOS
F NS2=0:0 S NS2=$O(^NURSF(210,N1,2,NS2)) Q:NS2'>0 W:$D(^NURSF(210,N1,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:"") W !
Q
S NURPAGE=NURPAGE+1 W:$E(IOST)="C"!(NURPAGE>1) @IOF
W !!,"TELEPHONE NUMBERS OF NURSING EMPLOYEES" S X="T" D ^%DT D:+Y D^DIQ W ?44,Y,?59,"PAGE: ",NURPAGE
W !!,"EMPLOYEE",?36,"SERVICE",?51,"TELEPHONE",?66,"OWNER OF" W !,"NAME",?36,"POSITION",?51,"NUMBER",?66,"PHONE NO."
W !,$$REPEAT^XLFSTR("-",80),!
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HNURA7C 1311 printed Dec 13, 2024@02:18:27 Page 2
NURA7C ;HIRMFO/MD,FT-INDIVIDUAL PHONE NUMBER ;8/8/96 13:50
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
+2 if '$DATA(^DIC(213.9,1,"OFF"))
QUIT
if $PIECE(^DIC(213.9,1,"OFF"),"^",1)=1
QUIT
+3 WRITE !
SET (NURQUEUE,NUROUT,NURQUIT)=0
+4 DO EN1^NURSAUTL
if NUROUT
GOTO QUIT
+5 SET DIC("S")=" S DA=+Y I 'NURSZAP!(NURSZAP'>7)!(NURSZDA=DA)"
+6 DO EN3^NURSAGP1
if NUROUT
GOTO QUIT
+7 WRITE !
SET ZTDESC="Nursing Individual Phone Number(s)"
SET ZTRTN="START^NURA7C"
DO EN7^NURSUT0
if POP!($DATA(ZTSK))
GOTO QUIT
START ;
+1 KILL ^TMP($JOB)
+2 USE IO
SET (NURPAGE,NURSW1)=0
DO HEADER
DO WRITE
QUIT KILL ^TMP($JOB)
DO CLOSE^NURSUT1
DO ^NURAKILL
+1 QUIT
+2 ; DETAIL LINE PRINT ROUTINE
WRITE IF ($Y>(IOSL-6))
DO HEADER
if NURQUIT
QUIT
+1 SET NURSW1=1
+2 if +N2
WRITE !,$EXTRACT($PIECE(^VA(200,N2,0),"^",1),1,20)
+3 DO EN2^NURSUT0
WRITE ?36,NPSPOS
+4 FOR NS2=0:0
SET NS2=$ORDER(^NURSF(210,N1,2,NS2))
if NS2'>0
QUIT
if $DATA(^NURSF(210,N1,2,NS2,0))
WRITE ?51,$PIECE(^(0),"^",1)
SET NO=$PIECE(^(0),"^",2)
WRITE ?66,$SELECT(NO="S":"SELF",NO="R":"RELATIVE",NO="N":"NEIGHBOR",NO="O":"OTHER",1:"")
WRITE !
+5 QUIT
IF $EXTRACT(IOST)="C"
IF NURSW1
DO ENDPG^NURSUT1
if NUROUT
SET NURQUIT=+NUROUT
if NURQUIT
QUIT
+1 SET NURPAGE=NURPAGE+1
if $EXTRACT(IOST)="C"!(NURPAGE>1)
WRITE @IOF
+2 WRITE !!,"TELEPHONE NUMBERS OF NURSING EMPLOYEES"
SET X="T"
DO ^%DT
if +Y
DO D^DIQ
WRITE ?44,Y,?59,"PAGE: ",NURPAGE
+3 WRITE !!,"EMPLOYEE",?36,"SERVICE",?51,"TELEPHONE",?66,"OWNER OF"
WRITE !,"NAME",?36,"POSITION",?51,"NUMBER",?66,"PHONE NO."
+4 WRITE !,$$REPEAT^XLFSTR("-",80),!
+5 QUIT