source: WorldVistAEHR/trunk/r/GEN_MED_OTHER-GMV/GMVFUT0.m@ 1801

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

initial load of WorldVistAEHR

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