source: FOIAVistA/trunk/r/GEN_MED_OTHER-GMV/GMVFUT2.m@ 914

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1GMVFUT2 ;HOIFO/RM,FT-FILE UTILITIES FOR 120.52 FILE ;5/24/01 14:34
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; <None>
6 ;
7ACHR(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF ACHR XREF ON
8 ; QUALIFIER (.01) FIELD OF GMRV VITAL QUALIFIER (120.52) FILE.
9 ; THIS PROCEDURE SETS/KILLS THE FOLLOWING MUMPS INDICES: "AA".
10 ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
11 ; DA=DA array passed by reference.
12 ; X=value being indexed.
13 ;
14 S GMRVDA=DA N DA,GMRVY
15 S DA(1)=GMRVDA,DA=0
16 F S DA=$O(^GMRD(120.52,DA(1),1,DA)) Q:DA'>0 D
17 . S GMRVY=$G(^GMRD(120.52,DA(1),1,DA,0))
18 . D AA($P(GMRVY,"^"),$P(GMRVY,"^",2),X,.DA,GMRVSK)
19 . Q
20 K GMRVDA
21 Q
22ATYP(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF ATYP XREF ON VITAL
23 ; TYPE (.01) FIELD OF VITAL TYPE (120.521) SUB-FILE OF GMRV
24 ; GMRV VITAL QUALIFIER (120.52) FILE. THIS PROCEDURE SETS/KILLS THE
25 ; FOLLOWING MUMPS INDEX: "AA".
26 ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
27 ; DA=DA array passed by reference.
28 ; X=value being indexed.
29 ;
30 N GMRVX,GMRVY
31 S GMRVX=$P($G(^GMRD(120.52,DA(1),0)),"^"),GMRVY=$G(^GMRD(120.52,DA(1),1,DA,0))
32 D AA(X,$P(GMRVY,"^",2),$P(GMRVX,"^"),.DA,GMRVSK)
33 Q
34ACAT(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF ACAT XREF ON CATEGORY
35 ; (.02) FIELD OF VITAL TYPE (120.521) SUBFILE OF GMRV VITAL QUALIFIER
36 ; (120.52) FILE. THIS PROCEDURE SETS/KILLS THE FOLLOWING MUMPS
37 ; INDEX: "AA".
38 ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
39 ; DA=DA array passed by reference.
40 ; X=value being indexed.
41 ;
42 N GMRVX,GMRVY
43 S GMRVX=$G(^GMRD(120.52,DA(1),0)),GMRVY=$G(^GMRD(120.52,DA(1),1,DA,0))
44 D AA($P(GMRVY,"^"),X,$P(GMRVX,"^"),.DA,GMRVSK)
45 Q
46AA(TYPE,CAT,CHAR,DA,SK) ; This procedure updates the "AA" index for the 120.52
47 ; file. This index has the following format:
48 ; ^GMRD(120.52,"AA",TYPE,CAT,CHAR,DA(1),DA)=""
49 ; Input variables:
50 ; TYPE=Vital Type (.01) field 120.521 sub-file.
51 ; CAT=Category (.02) field of 120.521 sub-file.
52 ; CHAR=Name (.01) field of 120.52 file.
53 ; DA=Passed by reference will have entry in 120.52 sub-file, DA,
54 ; and entry in 120.52 file, DA(1).
55 ; SK=1 if set xref, 2 if kill xref.
56 ;
57 Q:$G(TYPE)=""!($G(CAT)="")!($G(CHAR)="")!($G(DA(1))="")!($G(DA)="")
58 I $G(SK)=1 S ^GMRD(120.52,"AA",TYPE,CAT,CHAR,DA(1),DA)=""
59 I $G(SK)=2 K ^GMRD(120.52,"AA",TYPE,CAT,CHAR,DA(1),DA)
60 Q
Note: See TracBrowser for help on using the repository browser.