source: FOIAVistA/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVFUT0.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1GMRVFUT0 ;HIRMFO/RM-FILE UTILITIES FOR 120.5 FILE ;1/21/97
2 ;;4.0;Vitals/Measurements;;Apr 25, 1997
3EN1(Y,DA) ; INPUT TRANSFORM FOR NAME (.01) FIELD OF QUALIFIER
4 ; (120.505) SUB-FILE OF GMRV VITAL MEASUREMENT (120.5) FILE.
5 ; Input variables: Y is entry in 120.52 being looked up
6 ; DA is entry in 120.5 where Qualifier data
7 ; is being selected.
8 ; Function value: 1 if can select this Qualifier, else 0.
9 ;
10 N GMRVFXN,GMRVTYP S GMRVFXN=0
11 S GMRVTYP=$P($G(^GMR(120.5,DA,0)),"^",3)
12 I GMRVTYP>0,$D(^GMRD(120.52,"C",GMRVTYP,+Y)) S GMRVFXN=1
13 Q GMRVFXN
14 ;
15EN2(DA,X) ; CALLED FROM INPUT TRANSFORM OF RATE (1.2) FIELD OF THE GMRV
16 ; VITAL MEASUREMENT (#120.5) FILE.
17 ; Input variable: DA is entry in 120.5 where Rate is being validated.
18 ; X is value of Rate being validated.
19 ;
20 N GMRVFXN,GMRVINP,GMRVM,GMRVTYP
21 S GMRVFXN=1 I $A(X)=45 S GMRVFXN=0
22 I GMRVFXN D
23 . S GMRVTYP=$P($G(^GMR(120.5,DA,0)),"^",3)
24 . I GMRVTYP'>0 S GMRVFXN=0
25 . I GMRVTYP>0,'$P($G(^GMRD(120.51,GMRVTYP,0)),"^",4) S GMRVFXN=0
26 . I 'GMRVFXN D
27 . . S GMRVFXN=0,GMRVM(1)=$C(7),GMRVM(3)=""
28 . . S GMRVM(2)=" RATE CANNOT BE ENTERED FOR THIS MEASUREMENT TYPE!"
29 . . D EN^DDIOL(.GMRVM,"","?5")
30 . . Q
31 . Q
32 I GMRVFXN,$L(X)>30!($L(X)<1) S GMRVFXN=0
33 I GMRVFXN D
34 . S GMRVINP=$E($G(^GMRD(120.51,$P(^GMR(120.5,DA,0),U,3),1)),1,245)
35 . I GMRVINP'="" X GMRVINP I '$D(X) S GMRVFXN=0
36 . I GMRVINP="" S GMRVFXN=0
37 . Q
38 Q GMRVFXN
39 ;
40AA(GMRVFLD,GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF: AA01 XREF OF
41 ; DATE/TIME VITALS TAKEN (.01) FIELD, AA02 XREF OF PATIENT (.02)
42 ; FIELD, AND AA03 XREF OF VITAL TYPE (.03) FIELD OF THE GMRV VITAL
43 ; MEASUREMENT (120.5) FILE TO SET "AA" INDEX.
44 ; Input variables: GMRVFLD=field making call
45 ; GMRVSK=1 if called from SET LOGIC, 2 if called
46 ; from KILL LOGIC.
47 ; DA is entry being indexed.
48 ; X is value of GMRVFLD to be indexed.
49 ;
50 N GMRVDFN,GMRVDT,GMRVTYP,GMRVX
51 S GMRVX=$G(^GMR(120.5,DA,0))
52 S GMRVDT=$S(GMRVFLD=.01:X,1:$P(GMRVX,"^"))
53 S GMRVDFN=$S(GMRVFLD=.02:X,1:$P(GMRVX,"^",2))
54 S GMRVTYP=$S(GMRVFLD=.03:X,1:$P(GMRVX,"^",3))
55 Q:GMRVDT=""!(GMRVDFN="")!(GMRVTYP="")
56 I GMRVSK=1 S ^GMR(120.5,"AA",GMRVDFN,GMRVTYP,9999999-GMRVDT,DA)=""
57 I GMRVSK=2 K ^GMR(120.5,"AA",GMRVDFN,GMRVTYP,9999999-GMRVDT,DA)
58 Q
59RATEHLP(DA) ; CALLED FROM EXECUTABLE HELP OF RATE (1.2) FIELD OF GMRV
60 ; VITAL MEASUREMENT (120.5) FILE.
61 ; Input Variable: DA is entry in 120.5 to display help for.
62 ;
63 N GMRVTYP,XQH
64 S GMRVTYP=$P($G(^GMR(120.5,DA,0)),"^",3)
65 S XQH=$P($G(^GMRD(120.51,+GMRVTYP,0)),"^",6)
66 I XQH="" D EN^DDIOL("RATE NOT APPLICABLE FOR THIS TYPE OF MEASUREMENT")
67 I XQH'="" D EN^XQH
68 Q
Note: See TracBrowser for help on using the repository browser.