source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURAED01.m@ 1203

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1NURAED01 ;HIRMFO/RM-Cont. of NURAED0 routine ;2/26/92
2 ;;4.0;NURSING SERVICE;**3**;Apr 25, 1997
3EN1 ; Continuation of EN14^NURAED0
4 S NUR200SC=$S('$D(^DIC(213.9,1,0)):1,$P(^(0),"^",3)'=0:1,1:0)
5 S NURIDSP(210)="W ?($X+5),$S($D(^VA(200,$S($D(^NURSF(210,+Y,0)):+$P(^(0),U),1:0),1)):$P(^(1),U,9),1:"""") S DA=+Y D EN2^NURSUT0 W:$D(NPSPOS) ?($X+5),NPSPOS,@(""$E(""_DIC_""+Y,0),0)"") K DA,NPSPOS"
6 S NURIDSP(200)="W ?($X+5),$S($D(^VA(200,+Y,1)):$P(^(1),U,9),1:"""") S DA=+$O(^NURSF(210,""B"",+Y,"""")) I $D(^NURSF(210,+DA,0)) D EN2^NURSUT0 W:$D(NPSPOS) ?($X+5),NPSPOS,@(""$E(""_DIC_""Y,0),0)"") K DA,NPSPOS"
7SEL ;
8 R !!,"Select Nursing Service Staff Name: ",X:DTIME I "^"[X!'$T S XQUIT=1 G Q14
9 I X?1"?".E S X="?",DIC=210,DIC(0)="QMEZ",DIC("W")=NURIDSP(DIC) D ^DIC G:'NUR200SC SEL W !!?1,"YOU MAY ALSO ADD A NEW NURS STAFF IF YOU WISH.",! S DIC=200,DIC(0)="QMEZ",DIC("W")=NURIDSP(DIC) D ^DIC G SEL
10 S DIC=210,DIC(0)="MZ",DIC("W")=NURIDSP(DIC) D ^DIC I +Y>0 W !?7,Y(0,0) X NURIDSP(210)
11 ;I '$D(^NURSF(210,+Y,0)) W !!,$C(7),"** STAFF RECORD DATA MISSING **" S XQUIT=1 G Q14
12 K DIC I $D(DTOUT)!$D(DUOUT) S XQUIT=1 G Q14
13YNOK ;
14 I +Y>0 W !?9,"...OK" S %=1 D YN^DICN S:%=1 NURSDBA=+Y_"^210" S:%=-1 XQUIT=1,Y=-1 G Q14:%=-1!(%=1),SEL:%=2 I %=0 W !?13,"ANSWER YES OR NO." G YNOK
15 S DIC("S")="I +Y'="""_$P(Y,"^",2)_"""",DIC=200,DIC(0)="MEZ"_$S(NUR200SC:"L",1:""),DIC("W")=NURIDSP(DIC) S:NUR200SC DLAYGO=200,DIC("DR")="9R",DR(1,200)="" D ^DIC K DIC,DLAYGO S (NUR200,DA)=+Y I $D(DTOUT)!$D(DUOUT) S XQUIT=1 G Q14
16 S NURX=$O(^NURSF(210,"B",+Y,0)) I +$G(^NURSF(210,+NURX,0)) S Y=$O(^NURSF(210,"B",+Y,0)) W ?15,Y(0,0) G YNOK
17 K:'+$G(^NURSF(210,+NURX,0)) ^NURSF(210,"B",+Y)
18 I +Y'>0 W $C(7) W:'NUR200SC !,"You cannot add a 'new' NEW PERSON File entry, call Site Manager" W "??" G SEL
19 S NURCNT=$P(^NURSF(210,0),"^",4)+1,NURCNT(0)=$P(^(0),"^",3)
20ADD Q:$D(NURSADD) S NURCNT(0)=(+NURCNT(0)+1) L +^NURSF(210,NURCNT(0),0):0 I '$T!$D(^NURSF(210,NURCNT(0),0)) G ADD
21 W $C(7),!?3,"ARE YOU ADDING '",Y(0,0),"' AS A NEW NURS STAFF (THE ",NURCNT,$S(NURCNT#10=1&(NURCNT#100-11):"ST",NURCNT#10=2&(NURCNT#100-12):"ND",NURCNT#10=3&(NURCNT#100-13):"RD",1:"TH"),")" S %=0 D YN^DICN
22 S:%=-1 XQUIT=1 S:%=2 Y=-1 G Q14:%=-1,SEL:%=2 I '% W $C(7),!?4,"ANSWER 'YES' OR 'NO'" G ADD
23 S DA=NURCNT(0),^NURSF(210,DA,0)=+Y,^NURSF(210,"B",+Y,DA)="",$P(^NURSF(210,0),"^",3,4)=NURCNT(0)_"^"_NURCNT,DR=28.1,DIE=210 D ^DIE K DIE S NURDA=DA D EN5^NURAED3 S NURSDBA=NURDA_"^210" L -^NURSF(210,NURCNT(0),0)
24Q14 K %,DA,DIC,DLAYGO,DR,DTOUT,DUOUT,NI,NUROUT,NUR200,NUR200SC,NURANM,NURCNT,NURDA,NURIDSP,NURSASS,NURSNPOS,NURSPOS,NURSTAT,NURX,NURSX,NURSY,NURSNP,NURSOPOS
25 Q
Note: See TracBrowser for help on using the repository browser.