1 | NURCYED0 ;HIRMFO/YH,FT-PATIENT INTAKE/OUTPUT ENTER/EDIT ;9/16/96 14:31
|
---|
2 | ;;4.0;NURSING SERVICE;;Apr 25, 1997
|
---|
3 | EN1 ;CALL TO EDIT PATIENT OUTPUT
|
---|
4 | S X="GMRYED1" X ^%ZOSF("TEST") Q:'$T S (GNUROP,NUROP)=1 D EDIT,Q Q
|
---|
5 | EN2 ;CALL TO EDIT INTAKE
|
---|
6 | S X="GMRYED1" X ^%ZOSF("TEST") Q:'$T S (GNUROP,NUROP)=2 D EDIT,Q Q
|
---|
7 | EN3 ;IV AND IV MAINTENANCE
|
---|
8 | S X="GMRYED1" X ^%ZOSF("TEST") Q:'$T S (GNUROP,NUROP)=3 D EDIT,Q Q
|
---|
9 | EDIT ;
|
---|
10 | S (NURQUIT,NURQUIT(1))=0 D WARDPAT^NURCVUT0 Q:NURQUIT!(NUREDB["S"&'$D(NRMBD)) D SETUTIL I '$D(^TMP($J)) W:"Ss"[NUREDB !,"*** NO PATIENTS REGISTERED IN THESE ROOMS",! Q
|
---|
11 | S NURRM="" F S NURRM=$O(^TMP($J,NURRM)) Q:NURRM=""!NURQUIT S NBED="" F S NBED=$O(^TMP($J,NURRM,NBED)) Q:NBED=""!NURQUIT S NURNAM="" F S NURNAM=$O(^TMP($J,NURRM,NBED,NURNAM)) Q:NURNAM=""!NURQUIT D EDTPT
|
---|
12 | Q
|
---|
13 | EDTPT ;
|
---|
14 | S DFN=0 F S DFN=$O(^TMP($J,NURRM,NBED,NURNAM,DFN)) Q:DFN'>0!NURQUIT D CHECK Q:DA'>0 D:"Pp"'[NUREDB ASKOK Q:NURQUIT D EDIT2
|
---|
15 | Q
|
---|
16 | EDIT2 I 'NURQUIT(1) S GMROUT=0 D 1^VADPT S GMRHLOC=0 I $D(^DIC(42,+$P(VAIN(4),"^"),44)) S GMRHLOC=+$P(^(44),"^")
|
---|
17 | I 'NURQUIT(1) W:GMRHLOC'>0 !,"HOSPITAL LOCATION NOT AVAILABLE",! D:GMRHLOC>0 OUTPUT^GMRYED1:GNUROP=1,INPUT^GMRYED1:GNUROP=2,LIST^GMRYED3:GNUROP=3 S (GMROUT,NURQUIT)=0 S:"Pp"[NUREDB NURQUIT=1
|
---|
18 | Q
|
---|
19 | ASKOK ; LOOPING THROUGH NAMES
|
---|
20 | S NURQUIT(1)=0 W !,NURNAM,?$X+10,$S(NURRM=" BLANK":" ",1:NURRM)_"-"_$S(NBED=" BLANK":" ",1:NBED_" ") S %=1 D YN^DICN I %=1!(%=-1) S:%=-1 NURQUIT=1 Q
|
---|
21 | I '% W $C(7),!,?4,"ANSWER 'YES' or 'NO'" G ASKOK
|
---|
22 | ASL W !,"Do you wish to stop looping through names?" S %=1 D YN^DICN W ! I %=1!(%=-1) S NURQUIT=1 Q
|
---|
23 | I '% W $C(7),!,?4,"ANSWER 'YES' or 'NO'" G ASL
|
---|
24 | S NURQUIT(1)=1
|
---|
25 | Q
|
---|
26 | SETUTIL ; SET ARRAY OF PATIENTS
|
---|
27 | K ^TMP($J) I "Pp"[NUREDB S NURWARD=$S($D(^NURSF(214,DFN,0)):$P(^(0),"^",3),1:"") D WRDST
|
---|
28 | I "SsUu"[NUREDB F DFN=0:0 S DFN=$O(^NURSF(214,"AF","A",NURWARD,DFN)) Q:DFN'>0 D WRDST
|
---|
29 | Q
|
---|
30 | WRDST ; SET UTILITY FOR PATIENTS ON WARD
|
---|
31 | W:$E(IOST)="C" "." D 1^VADPT
|
---|
32 | Q:"Ss"[NUREDB&($S(VAIN(5)="":1,1:'$D(NRMBD($P($P(VAIN(5),"^"),"-",1,2)))))!(VADM(1)="")
|
---|
33 | S ^TMP($J,$S($P($P(VAIN(5),"^"),"-")'="":$P($P(VAIN(5),"^"),"-"),1:" BLANK"),$S($P($P(VAIN(5),"^"),"-",2)'="":$P($P(VAIN(5),"^"),"-",2),1:" BLANK"),VADM(1),DFN)=""
|
---|
34 | Q
|
---|
35 | DATE ; CALL TO SET AND GMRVIDT (WHEN THE VITALS WERE TAKEN)
|
---|
36 | ; ALSO RETURNS NURQUIT=1 IF TIMEOUT OR UPARROW OUT.
|
---|
37 | S X="^",%DT("A")="ENTER DATE (TIME Required) VITALS WERE TAKEN: ",%DT="XAPETR",%DT(0)="-NOW" D ^%DT K %DT
|
---|
38 | I Y<0!(X="^") S NURQUIT=1 Q
|
---|
39 | S GMRVIDT=Y
|
---|
40 | Q
|
---|
41 | Q ;
|
---|
42 | D KVAR^VADPT K NURP,NURX,NRMBD,NURI,NURLEN,NURRMST,GMRQUAL,GMRHLOC,DA,GNUROP,ND1,NDA,NORM,NPWARD,NURQUIT,NUREDB,NURSX,NURSY,NURWARD,NURWLO,NWLOC,POP,VA,DFN,GMROUT,NURHLO,NURRM,GDA,NURNAM,NBED,NUROP,NUROUT,X,Y
|
---|
43 | Q
|
---|
44 | CHECK I '$D(^GMR(126,0)) S ^GMR(126,0)="PATIENT I/O FILE^126P^0^0"
|
---|
45 | S X=DFN,DIC(0)="Z",DIC="^GMR(126,",D="B" D MIX^DIC1 S:Y>0 DA=+$P(Y,"^") G:Y>0 NEXT K DD S (DINUM,X)=DFN,DIC(0)="L",DLAYGO=126 D FILE^DICN S DA=+$P(Y,"^")
|
---|
46 | NEXT K DIC,DDLAYGO,DO,DD Q
|
---|