source: FOIAVistA/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVFUT3.m@ 1446

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

initial load of FOIAVistA 6/30/08 version

File size: 4.7 KB
Line 
1GMRVFUT3 ;HIRMFO/RM-FILE UTILITIES FOR 120.53 FILE ;7/22/96
2 ;;4.0;Vitals/Measurements;;Apr 25, 1997
3 ;
4ACAT(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF ACAT XREF ON CATEGORY
5 ; (.01) FIELD OF GMRV CATEGORY (120.53) FILE. THIS PROCEDURE
6 ; SETS/KILLS THE FOLLOWING MUMPS INDICES: "AA".
7 ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
8 ; DA=DA array passed by reference.
9 ; X=value being indexed.
10 ;
11 S GMRVDA=DA N DA,GMRVY
12 S DA(1)=GMRVDA,DA=0
13 F S DA=$O(^GMRD(120.53,DA(1),1,DA)) Q:DA'>0 D
14 . S GMRVY=$G(^GMRD(120.53,DA(1),1,DA,0))
15 . D AA($P(GMRVY,"^"),X,.DA,GMRVSK)
16 . Q
17 K GMRVDA
18 Q
19ATYP(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF ATYP XREF ON VITAL
20 ; TYPE (.01) FIELD OF VITAL TYPE (120.531) SUB-FILE OF GMRV CATEGORY
21 ; (120.53) FILE. THIS PROCEDURE SETS/KILLS THE FOLLOWING MUMPS
22 ; INDICES: "AA", "APRINT", AND "AEDIT".
23 ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
24 ; DA=DA array passed by reference.
25 ; X=value being indexed.
26 ;
27 N GMRVX,GMRVY
28 S GMRVX=$G(^GMRD(120.53,DA(1),0)),GMRVY=$G(^GMRD(120.53,DA(1),1,DA,0))
29 D AA(X,$P(GMRVX,"^"),.DA,GMRVSK)
30 D APRINT(X,$P(GMRVY,"^",5),.DA,GMRVSK)
31 D AEDIT(X,$P(GMRVY,"^",6),.DA,GMRVSK)
32 Q
33AEDT(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF AEDT XREF ON EDIT
34 ; ORDER (.06) FIELD OF VITAL TYPE (120.531) SUB-FILE OF GMRV CATEGORY
35 ; (120.53) FILE. THIS PROCEDURE SETS/KILLS THE FOLLOWING MUMPS
36 ; INDICES: "AEDIT".
37 ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
38 ; DA=DA array passed by reference.
39 ; X=value being indexed.
40 ;
41 N GMRVY
42 S GMRVY=$G(^GMRD(120.53,DA(1),1,DA,0))
43 D AEDIT($P(GMRVY,"^"),X,.DA,GMRVSK)
44 Q
45APRT(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF APRT XREF ON PRINT
46 ; ORDER (.05) FIELD OF VITAL TYPE (120.531) SUB-FILE OF GMRV CATEGORY
47 ; (120.53) FILE. THIS PROCEDURE SETS/KILLS THE FOLLOWING MUMPS
48 ; INDICES: "APRINT".
49 ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
50 ; DA=DA array passed by reference.
51 ; X=value being indexed.
52 ;
53 N GMRVY
54 S GMRVY=$G(^GMRD(120.53,DA(1),1,DA,0))
55 D APRINT($P(GMRVY,"^"),X,.DA,GMRVSK)
56 Q
57AA(TYPE,CAT,DA,SK) ; This procedure updates the "AA" index for the 120.53
58 ; file. This index has the following format:
59 ; ^GMRD(120.53,"AA",TYPE,CAT,DA(1),DA)=""
60 ; Input variables:
61 ; TYPE=Vital Type (.01) field 120.531 sub-file.
62 ; CAT=Name (.01) field of 120.53 file.
63 ; DA=Passed by reference will have entry in 120.531 sub-file, DA,
64 ; and entry in 120.53 file, DA(1).
65 ; SK=1 if set xref, 2 if kill xref.
66 ;
67 Q:$G(TYPE)=""!($G(CAT)="")!($G(DA(1))="")!($G(DA)="")
68 I $G(SK)=1 S ^GMRD(120.53,"AA",TYPE,CAT,DA(1),DA)=""
69 I $G(SK)=2 K ^GMRD(120.53,"AA",TYPE,CAT,DA(1),DA)
70 Q
71AEDIT(TYPE,EORD,DA,SK) ; This procedure updates the "AEDIT" index for the
72 ; 120.53 file. This index has the following format:
73 ; ^GMRD(120.53,"AEDIT",TYPE,EORD,DA(1),DA)=""
74 ; Input variables:
75 ; TYPE=Vital Type (.01) field 120.531 sub-file.
76 ; EORD=Edit Order (.06) field of 120.531 sub-file.
77 ; DA=Passed by reference will have entry in 120.531 sub-file, DA,
78 ; and entry in 120.53 file, DA(1).
79 ; SK=1 if set xref, 2 if kill xref.
80 ;
81 Q:$G(TYPE)=""!($G(EORD)="")!($G(DA(1))="")!($G(DA)="")
82 I $G(SK)=1 S ^GMRD(120.53,"AEDIT",TYPE,EORD,DA(1),DA)=""
83 I $G(SK)=2 K ^GMRD(120.53,"AEDIT",TYPE,EORD,DA(1),DA)
84 Q
85APRINT(TYPE,PORD,DA,SK) ; This procedure updates the "APRINT" index for the
86 ; 120.53 file. This index has the following format:
87 ; ^GMRD(120.53,"APRINT",TYPE,PORD,DA(1),DA)=""
88 ; Input variables:
89 ; TYPE=Vital Type (.01) field 120.531 sub-file.
90 ; PORD=Print Order (.05) field of 120.531 sub-file.
91 ; DA=Passed by reference will have entry in 120.531 sub-file, DA,
92 ; and entry in 120.53 file, DA(1).
93 ; SK=1 if set xref, 2 if kill xref.
94 ;
95 Q:$G(TYPE)=""!($G(PORD)="")!($G(DA(1))="")!($G(DA)="")
96 I $G(SK)=1 S ^GMRD(120.53,"APRINT",TYPE,PORD,DA(1),DA)=""
97 I $G(SK)=2 K ^GMRD(120.53,"APRINT",TYPE,PORD,DA(1),DA)
98 Q
99SCR07(DA,Y) ; CALLED FROM INPUT TRANSFORM OF DEFAULT QUALIFIER (.07)
100 ; FIELD OF THE VITAL TYPE (120.531) SUB-FILE OF THE GMRV VITAL CATEGORY
101 ; (120.53) FILE. WILL CHECK TO SEE IF QUALIFIER IS VALID FOR THIS
102 ; VITAL TYPE AND CATEGORY.
103 ; Input Variables: DA = DA arrary passed by reference from screen.
104 ; Y = Entry in 120.53 file being validated.
105 ;
106 N GMRVCHAR,GMRVFXN,GMRVTYP S GMRVFXN=0
107 S GMRVTYP=$P($G(^GMRD(120.53,DA(1),1,DA,0)),"^"),GMRVCHAR=$P($G(^GMRD(120.52,+Y,0)),"^")
108 I GMRVTYP>0,GMRVCHAR]"",$D(^GMRD(120.52,"AA",GMRVTYP,DA(1),GMRVCHAR,+Y)) S GMRVFXN=1
109 Q GMRVFXN
Note: See TracBrowser for help on using the repository browser.