Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRVFUT3

GMRVFUT3.m

Go to the documentation of this file.
  1. GMRVFUT3 ;HIRMFO/RM-FILE UTILITIES FOR 120.53 FILE ;7/22/96
  1. ;;4.0;Vitals/Measurements;;Apr 25, 1997
  1. ;
  1. ACAT(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF ACAT XREF ON CATEGORY
  1. ; (.01) FIELD OF GMRV CATEGORY (120.53) FILE. THIS PROCEDURE
  1. ; SETS/KILLS THE FOLLOWING MUMPS INDICES: "AA".
  1. ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
  1. ; DA=DA array passed by reference.
  1. ; X=value being indexed.
  1. ;
  1. S GMRVDA=DA N DA,GMRVY
  1. S DA(1)=GMRVDA,DA=0
  1. F S DA=$O(^GMRD(120.53,DA(1),1,DA)) Q:DA'>0 D
  1. . S GMRVY=$G(^GMRD(120.53,DA(1),1,DA,0))
  1. . D AA($P(GMRVY,"^"),X,.DA,GMRVSK)
  1. . Q
  1. K GMRVDA
  1. Q
  1. ATYP(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF ATYP XREF ON VITAL
  1. ; TYPE (.01) FIELD OF VITAL TYPE (120.531) SUB-FILE OF GMRV CATEGORY
  1. ; (120.53) FILE. THIS PROCEDURE SETS/KILLS THE FOLLOWING MUMPS
  1. ; INDICES: "AA", "APRINT", AND "AEDIT".
  1. ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
  1. ; DA=DA array passed by reference.
  1. ; X=value being indexed.
  1. ;
  1. N GMRVX,GMRVY
  1. S GMRVX=$G(^GMRD(120.53,DA(1),0)),GMRVY=$G(^GMRD(120.53,DA(1),1,DA,0))
  1. D AA(X,$P(GMRVX,"^"),.DA,GMRVSK)
  1. D APRINT(X,$P(GMRVY,"^",5),.DA,GMRVSK)
  1. D AEDIT(X,$P(GMRVY,"^",6),.DA,GMRVSK)
  1. Q
  1. AEDT(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF AEDT XREF ON EDIT
  1. ; ORDER (.06) FIELD OF VITAL TYPE (120.531) SUB-FILE OF GMRV CATEGORY
  1. ; (120.53) FILE. THIS PROCEDURE SETS/KILLS THE FOLLOWING MUMPS
  1. ; INDICES: "AEDIT".
  1. ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
  1. ; DA=DA array passed by reference.
  1. ; X=value being indexed.
  1. ;
  1. N GMRVY
  1. S GMRVY=$G(^GMRD(120.53,DA(1),1,DA,0))
  1. D AEDIT($P(GMRVY,"^"),X,.DA,GMRVSK)
  1. Q
  1. APRT(GMRVSK,DA,X) ; CALLED FROM SET/KILL LOGIC OF APRT XREF ON PRINT
  1. ; ORDER (.05) FIELD OF VITAL TYPE (120.531) SUB-FILE OF GMRV CATEGORY
  1. ; (120.53) FILE. THIS PROCEDURE SETS/KILLS THE FOLLOWING MUMPS
  1. ; INDICES: "APRINT".
  1. ; Input variables: GMRVSK=1 if called from SET, 2 if from KILL
  1. ; DA=DA array passed by reference.
  1. ; X=value being indexed.
  1. ;
  1. N GMRVY
  1. S GMRVY=$G(^GMRD(120.53,DA(1),1,DA,0))
  1. D APRINT($P(GMRVY,"^"),X,.DA,GMRVSK)
  1. Q
  1. AA(TYPE,CAT,DA,SK) ; This procedure updates the "AA" index for the 120.53
  1. ; file. This index has the following format:
  1. ; ^GMRD(120.53,"AA",TYPE,CAT,DA(1),DA)=""
  1. ; Input variables:
  1. ; TYPE=Vital Type (.01) field 120.531 sub-file.
  1. ; CAT=Name (.01) field of 120.53 file.
  1. ; DA=Passed by reference will have entry in 120.531 sub-file, DA,
  1. ; and entry in 120.53 file, DA(1).
  1. ; SK=1 if set xref, 2 if kill xref.
  1. ;
  1. Q:$G(TYPE)=""!($G(CAT)="")!($G(DA(1))="")!($G(DA)="")
  1. I $G(SK)=1 S ^GMRD(120.53,"AA",TYPE,CAT,DA(1),DA)=""
  1. I $G(SK)=2 K ^GMRD(120.53,"AA",TYPE,CAT,DA(1),DA)
  1. Q
  1. AEDIT(TYPE,EORD,DA,SK) ; This procedure updates the "AEDIT" index for the
  1. ; 120.53 file. This index has the following format:
  1. ; ^GMRD(120.53,"AEDIT",TYPE,EORD,DA(1),DA)=""
  1. ; Input variables:
  1. ; TYPE=Vital Type (.01) field 120.531 sub-file.
  1. ; EORD=Edit Order (.06) field of 120.531 sub-file.
  1. ; DA=Passed by reference will have entry in 120.531 sub-file, DA,
  1. ; and entry in 120.53 file, DA(1).
  1. ; SK=1 if set xref, 2 if kill xref.
  1. ;
  1. Q:$G(TYPE)=""!($G(EORD)="")!($G(DA(1))="")!($G(DA)="")
  1. I $G(SK)=1 S ^GMRD(120.53,"AEDIT",TYPE,EORD,DA(1),DA)=""
  1. I $G(SK)=2 K ^GMRD(120.53,"AEDIT",TYPE,EORD,DA(1),DA)
  1. Q
  1. APRINT(TYPE,PORD,DA,SK) ; This procedure updates the "APRINT" index for the
  1. ; 120.53 file. This index has the following format:
  1. ; ^GMRD(120.53,"APRINT",TYPE,PORD,DA(1),DA)=""
  1. ; Input variables:
  1. ; TYPE=Vital Type (.01) field 120.531 sub-file.
  1. ; PORD=Print Order (.05) field of 120.531 sub-file.
  1. ; DA=Passed by reference will have entry in 120.531 sub-file, DA,
  1. ; and entry in 120.53 file, DA(1).
  1. ; SK=1 if set xref, 2 if kill xref.
  1. ;
  1. Q:$G(TYPE)=""!($G(PORD)="")!($G(DA(1))="")!($G(DA)="")
  1. I $G(SK)=1 S ^GMRD(120.53,"APRINT",TYPE,PORD,DA(1),DA)=""
  1. I $G(SK)=2 K ^GMRD(120.53,"APRINT",TYPE,PORD,DA(1),DA)
  1. Q
  1. SCR07(DA,Y) ; CALLED FROM INPUT TRANSFORM OF DEFAULT QUALIFIER (.07)
  1. ; FIELD OF THE VITAL TYPE (120.531) SUB-FILE OF THE GMRV VITAL CATEGORY
  1. ; (120.53) FILE. WILL CHECK TO SEE IF QUALIFIER IS VALID FOR THIS
  1. ; VITAL TYPE AND CATEGORY.
  1. ; Input Variables: DA = DA arrary passed by reference from screen.
  1. ; Y = Entry in 120.53 file being validated.
  1. ;
  1. N GMRVCHAR,GMRVFXN,GMRVTYP S GMRVFXN=0
  1. S GMRVTYP=$P($G(^GMRD(120.53,DA(1),1,DA,0)),"^"),GMRVCHAR=$P($G(^GMRD(120.52,+Y,0)),"^")
  1. I GMRVTYP>0,GMRVCHAR]"",$D(^GMRD(120.52,"AA",GMRVTYP,DA(1),GMRVCHAR,+Y)) S GMRVFXN=1
  1. Q GMRVFXN