source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURCVED0.m@ 1177

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

initial load of WorldVistAEHR

File size: 4.1 KB
Line 
1NURCVED0 ;HIRMFO/YH,MD,RM,FT-VITAL SIGNS EDIT SHORT FORM ;6/22/01 10:28
2 ;;4.0;NURSING SERVICE;**36**;Apr 25, 1997
3 ;
4 ; This routine uses the following IAs:
5 ; #1914 ^GMRVALL0 API (private)
6 ; #1440 ^GMRVED0 APIs (private)
7 ; #1441 ^GMRVEE0 APIs (private)
8 ; #10039 ^DIC(42 (supported)
9 ; #10061 ^VADPT API (supported)
10 ;
11EN1 ;CALL TO EDIT PATIENT VITALS
12 ;ENTRY POINT FOR OPTION NURCPE-VIT-EDIT
13 ;OUTPUT VARIABLES: DFN = PT. FILE POINTER
14 ; GMRSTR = STRING OF WHICH VITALS TO EDIT
15 ; GMRVHLOC = PTS HOSPITAL LOCATION(PTR TO FILE 44)
16 S GMROUT=0,GNUROP=1,NURQUIT=$P(NURSDBA,"^"),GMRVIDT=$P(NURSDBA,"^",2)
17 ; EN3^GMRVED0 IS CALLED TO EDIT SINGLE PATIENT VITALS
18 S (NURQUIT,NURQUIT(1))=0
19 I GMRENTY=9 D LIST^GMRVALL0 G:GMROUT Q
20 D WARDPAT^NURCVUT0 G:NURQUIT!(NUREDB["S"&'$D(NRMBD)) Q D SETUTIL I '$D(^TMP($J)) W:"Ss"[NUREDB !,"*** NO PATIENTS REGISTERED IN THESE ROOMS",! G Q
21 S NURRM="" F NN=0:0 S NURRM=$O(^TMP($J,NURRM)) Q:NURRM=""!NURQUIT S NBED="" F NN=0:0 S NBED=$O(^TMP($J,NURRM,NBED)) Q:NBED=""!NURQUIT S NURNAM="" F NN=0:0 S NURNAM=$O(^TMP($J,NURRM,NBED,NURNAM)) Q:NURNAM=""!NURQUIT D EDTPT
22 G Q
23EDTPT ;
24 F DFN=0:0 S DFN=$O(^TMP($J,NURRM,NBED,NURNAM,DFN)) Q:DFN'>0!NURQUIT D:"Pp"'[NUREDB ASKOK Q:NURQUIT I 'NURQUIT(1) S GMRVHLOC=$S($D(^(DFN)):^(DFN),1:"") D I "Pp"[NUREDB D:'GMROUT MULTIVM S NURQUIT=1 Q
25 . S NURENTY=GMRENTY,NURSTR=GMRSTR D EN3^GMRVED0 S GMRENTY=NURENTY,GMRSTR=NURSTR
26 . Q
27 Q
28ASKOK ; LOOPING THROUGH NAMES
29 S (GMROUT,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
30 I '% W $C(7),!,?4,"ANSWER 'YES' or 'NO'" G ASKOK
31ASL W !,"Do you wish to stop looping through names?" S %=1 D YN^DICN W ! I %=1!(%=-1) S NURQUIT=1 Q
32 I '% W $C(7),!,?4,"ANSWER 'YES' or 'NO'" G ASL
33 S NURQUIT(1)=1
34 Q
35SETUTIL ; SET ARRAY OF PATIENTS
36 K ^TMP($J) I "Pp"[NUREDB S NURWARD=$S($D(^NURSF(214,DFN,0)):$P(^(0),"^",3),1:"") D SETWLO D WRDST
37 I "SsUu"[NUREDB D SETWLO F DFN=0:0 S DFN=$O(^NURSF(214,"AF","A",NURWARD,DFN)) Q:DFN'>0 D WRDST
38 Q
39WRDST ; SET UTILITY FOR PATIENTS ON WARD
40 W:$E(IOST)="C" "." D 1^VADPT
41 Q:"Ss"[NUREDB&($S(VAIN(5)="":1,1:'$D(NRMBD($P($P(VAIN(5),"^"),"-",1,2)))))!(VADM(1)="")
42 S NURHLO="" I +VAIN(4) S NURHLO=$S($D(^DIC(42,+VAIN(4),44)):^(44),1:"")
43 I +NURWLO,'NURHLO S NURHLO=$S($D(^DIC(42,$P(NURWLO,"^",2),44)):^(44),1:"")
44 I 'NURHLO S NURHLO=$S($D(^NURSF(211.4,+NURWARD,0)):$P(^(0),"^"),1:"")
45 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)=NURHLO
46 Q
47SETWLO ; SET 42 FILE ENTRY FOR NURSWARD, NURWLO=$S(1:ONLY ONE 42 ENTRY,
48 ; 0: MORE THAN ONE 42 ENTRY OR NO ENTRY)_"^"_(42 ENTRY)
49 ; AND THE NURHLO ARRAY AS THE HOSPITAL LOCATIONS ASSOCIATED WITH 211.4
50 S Y=0,NURWLO="0^" F X=0:0 S X=$O(^NURSF(211.4,NURWARD,3,X)) Q:X'>0 S Z=$S($D(^NURSF(211.4,NURWARD,3,X,0)):+^(0),1:"") I Z>0 S Y=Y+1 S:Y=1 NURWLO="1^"_Z S:$S('$D(^DIC(42,Z,44)):0,1:+^(44)) NURHLO(+^(44))=""
51 S:Y>1 $P(NURWLO,"^")=0
52 Q
53DATE ; CALL TO SET AND GMRVIDT (WHEN THE VITALS WERE TAKEN)
54 ; ALSO RETURNS NURQUIT=1 IF TIMEOUT OR UPARROW OUT.
55 S X="^",%DT("A")="ENTER DATE (TIME Required) VITALS WERE TAKEN: ",%DT="XAPETR",%DT(0)="-NOW" D ^%DT K %DT
56 I Y<0!(X="^") S NURQUIT=1 Q
57 I Y<$$FMADD^XLFDT(DT,-365) W !,?3,$C(7),"Sorry, you cannot enter a date more than 1 year old." G DATE
58 S GMRVIDT=Y
59 Q
60Q ;
61 D Q^GMRVED0 K NURX,NURP,GNUROP,NAME,NURHLO,NURRM,NURWLO,NBED,NN,NPWARD,NURQUIT,NROOM,NUREDB,NURNAM,NURWARD,GMROUT,GMRVIEN,GMRVIDT,GMRTYPE,GMRP,Z,GMROK,GDT,%,C,GMROV,I,J,K,W,Y,Z,NURENTY,NURSTR
62 Q
63EN2 ;EDIT A VITAL/MEASUREMENT ENTERED IN ERROR
64 ;ENTRY POINT FOR OPTION NURCPE-VIT-ERROR
65 S NACT=0,DIC(0)="EQM",NASK=1 D EN5^NURSCUTL G Q5:DFN'>0 D EN2^GMRVEE0
66Q5 K NACT,DIC,NASK,DFN
67 Q
68MULTIVM W !,"Do you want to enter other V/M data for this patient" S %=2 D YN^DICN W:%=0 !!,"Select YES if you want to enter another V/M record at a different",!,"date/time for the same patient.",! G:%=0 MULTIVM Q:%'=1
69 D DATE Q:NURQUIT S NURENTY=GMRENTY D EN3^GMRVED0 S GMRENTY=NURENTY G:'GMROUT MULTIVM Q
Note: See TracBrowser for help on using the repository browser.