source: FOIAVistA/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVSITE.m@ 1123

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1GMRVSITE ;HIOFO/YH,FT-V/M SITE FILE EDIT/ENTRY ;2/17/05 14:38
2 ;;5.0;GEN. MED. REC. - VITALS;**8**;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; <None>
6 ;
7 ; This routine supports the following IAs:
8 ; #1938 - CHAR & DEFAULT entry points (private)
9 ;
10CHAR ;Enter/edit qualifier
11 ; Due to the data standardization project, the package will no
12 ; longer allow users to modify FILE 120.52.
13 Q
14DEFAULT ;Enter/edit location default for TEMP./PULSE
15 N DA,I
16 N GMRDEF,GMRVCAT,GMRVIT,GMRX,GMRV,GMRY,GMROUT
17 S GMROUT=0,GMRVCAT="LOCATION"
18 S GMRVCAT(1)=$O(^GMRD(120.53,"B",GMRVCAT,0))
19 Q:GMRVCAT(1)'>0
20 Q:$$ACTIVE^GMVUID(120.53,"",GMRVCAT(1)_",","") ;active vuid?
21 F GMRVIT(1)="TEMPERATURE","PULSE" D
22 .S GMRVIT=$O(^GMRD(120.51,"B",GMRVIT(1),0)) Q:GMRVIT'>0!GMROUT D
23 ..Q:$$ACTIVE^GMVUID(120.51,"",GMRVIT_",","") ;active vuid?
24 ..S DA(1)=GMRVCAT(1),DA=$O(^GMRD(120.53,DA(1),1,"B",GMRVIT,0)) Q:DA'>0
25 ..I '$D(^GMRD(120.53,DA(1),1,DA,0)) Q
26 ..S GMRDEF=+$P(^GMRD(120.53,DA(1),1,DA,0),"^",7)
27 ..I $$ACTIVE^GMVUID(120.52,"",GMRDEF_",","") D
28 ...D CAT2^GMVUID(DA(1),DA)
29 ...S GMRDEF=""
30 ...Q
31 ..S GMRDEF=$S($D(^GMRD(120.52,+GMRDEF,0)):$P(^(0),"^"),1:"")
32 ..D GETQUAL
33 ..Q:GMRV'>0
34 ..D SELECT
35 ..Q
36 .Q
37 Q
38SELECT ;
39 W !!,GMRVIT(1)_" has the following location qualifiers:",!
40 F I=1:1:GMRV W !,I_" "_$P(GMRV(I),"^")
41 W !!,"Enter a number for "_GMRVIT(1)_" default qualifier",!,"or ^ to quit or @ to delete: "_$S(GMRDEF'="":GMRDEF_"// ",1:"")
42 S GMRX="" R GMRX:DTIME
43 I '$T!(GMRX["^") S GMROUT=1 Q
44 Q:GMRX=""
45 G:$L(GMRX)>4 SELECT
46 I GMRX["?" W !,"Enter an appropriate qualifier as a default qualifier for this type of",!,"vital measurement",! G SELECT
47 I GMRX="@" S $P(^GMRD(120.53,DA(1),1,DA,0),"^",7)="" W:GMRDEF'="" !,GMRDEF_" has been deleted" Q
48 I '$D(GMRV(GMRX)) W !,"ERROR ENTRY!!!",! G SELECT
49 S $P(^GMRD(120.53,DA(1),1,DA,0),"^",7)=$P(GMRV(GMRX),"^",2)
50 W " ",$P(GMRV(GMRX),"^")
51 Q
52GETQUAL ;Extract qualifiers for the VITAL TYPE and the CATEGORY
53 K GMRV
54 S GMRV=0,GMRX=""
55 F S GMRX=$O(^GMRD(120.52,"AA",GMRVIT,1,GMRX)) Q:GMRX="" D
56 .S GMRY=0
57 .F S GMRY=$O(^GMRD(120.52,"AA",GMRVIT,1,GMRX,GMRY)) Q:GMRY'>0 D
58 ..Q:$$ACTIVE^GMVUID(120.52,"",GMRY_",","") ;active vuid?
59 ..S GMRV=GMRV+1
60 ..S GMRV(GMRV)=$P(^GMRD(120.52,GMRY,0),"^")_"^"_GMRY
61 ..Q
62 .Q
63 Q
Note: See TracBrowser for help on using the repository browser.