source: WorldVistAEHR/trunk/r/GEN_MED_OTHER-GMV/GMVFUT3.m@ 701

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

initial load of WorldVistAEHR

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