GMRVGR5 ;HIRMFO/RM,YH-TMP TO EXTRACT DATA FROM IO PAKAGE ;3/18/97
;;4.0;Vitals/Measurements;;Apr 25, 1997
IO ; INPUT VARS: DFN=PATIENT IEN
; GMRFIN=END DATE OF EXTRACT
; GMRSTRT=START DATE OF EXTRACT
; GMROUT=0 (WILL BE SET IF ABNORMAL RESULTS)
; GRPT=TYPE OF REPORT DATA EXTRACTED FOR
; OUTPUT VARS: GMROUT=1 (IF ABNORMAL RESULTS), SSN=PT'S SSN
; GMRAGE=AGE OF PATIENT, GMRBED=ROOM-BED FOR PATIENT
; GMRSEX=PATIENT SEX, GMRVADM=PATIENT'S ADMISSION DATE
; GMRWARD=PTR TO 42 OF PT LOCATION, GMRWARD(1)=FT PT. LOC
; AND GMR( WHICH HAS PT IO DATA OVER D/T RANGE
N GMRNAM S GQT=0,GNN=$O(^GMRD(126.95,0)),GNN=$G(^GMRD(126.95,+GNN,1)),GMRNIT=$S($P(GNN,"^"):$P(GNN,"^"),1:2300),GMRDAY=$S($P(GNN,"^",2):$P(GNN,"^",2),1:"0700"),GMREVE=$S($P(GNN,"^",3):$P(GNN,"^",3),1:1500)
D STARTD^GMRYRP1,PT^GMRYUT0,^GMRYRP2,REPORT1^GMRYRP3
K DA,GAMOUNT,GBLNK,GCSHFT,GCURDT,GDATE,GDAY,GDSHFT,GDTFIN,GDTSTRT,GESHFT,GHR,GIN,GINDT,GIO,GITEM,GIVSTRT,GIVTYP,GLASTDT,GLN,GMRBTH,GMRDAY,GMRDIAG,GMREVE,GMRINDT,GMRNAM,GMRNIT,GMRX,GGNSHFT,GNXNSF,GNXTDT,GOP,GOPT,GOUT,GQT,GSHIFT,GSITE,GSTRT,GTEXT
K GTOTIN,GTOTLI,GTOTLO,GTOTOUT,GTYP,GTYPE,GTYPI,GTYPO,GX,GY,II,JJ,KK,N,GGNDATE,GNN,GNSH,VAROOT,^TMP($J,"GMRY")
Q
QIO ; KILL OUTPUT VARIABLES FROM IO SUBR.
K GMRAGE,GMRBED,GMRSEX,GMRVADM,GMR,SSN
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRVGR5 1401 printed Dec 13, 2024@01:56:34 Page 2
GMRVGR5 ;HIRMFO/RM,YH-TMP TO EXTRACT DATA FROM IO PAKAGE ;3/18/97
+1 ;;4.0;Vitals/Measurements;;Apr 25, 1997
IO ; INPUT VARS: DFN=PATIENT IEN
+1 ; GMRFIN=END DATE OF EXTRACT
+2 ; GMRSTRT=START DATE OF EXTRACT
+3 ; GMROUT=0 (WILL BE SET IF ABNORMAL RESULTS)
+4 ; GRPT=TYPE OF REPORT DATA EXTRACTED FOR
+5 ; OUTPUT VARS: GMROUT=1 (IF ABNORMAL RESULTS), SSN=PT'S SSN
+6 ; GMRAGE=AGE OF PATIENT, GMRBED=ROOM-BED FOR PATIENT
+7 ; GMRSEX=PATIENT SEX, GMRVADM=PATIENT'S ADMISSION DATE
+8 ; GMRWARD=PTR TO 42 OF PT LOCATION, GMRWARD(1)=FT PT. LOC
+9 ; AND GMR( WHICH HAS PT IO DATA OVER D/T RANGE
+10 NEW GMRNAM
SET GQT=0
SET GNN=$ORDER(^GMRD(126.95,0))
SET GNN=$GET(^GMRD(126.95,+GNN,1))
SET GMRNIT=$SELECT($PIECE(GNN,"^"):$PIECE(GNN,"^"),1:2300)
SET GMRDAY=$SELECT($PIECE(GNN,"^",2):$PIECE(GNN,"^",2),1:"0700")
SET GMREVE=$SELECT($PIECE(GNN,"^",3):$PIECE(GNN,"^",3),1:1500)
+11 DO STARTD^GMRYRP1
DO PT^GMRYUT0
DO ^GMRYRP2
DO REPORT1^GMRYRP3
+12 KILL DA,GAMOUNT,GBLNK,GCSHFT,GCURDT,GDATE,GDAY,GDSHFT,GDTFIN,GDTSTRT,GESHFT,GHR,GIN,GINDT,GIO,GITEM,GIVSTRT,GIVTYP,GLASTDT,GLN,GMRBTH,GMRDAY,GMRDIAG,GMREVE,GMRINDT,GMRNAM,GMRNIT,GMRX,GGNSHFT,GNXNSF,GNXTDT,GOP,GOPT,GOUT,GQT,GSHIFT,GSITE,GSTRT,GT
EXT
+13 KILL GTOTIN,GTOTLI,GTOTLO,GTOTOUT,GTYP,GTYPE,GTYPI,GTYPO,GX,GY,II,JJ,KK,N,GGNDATE,GNN,GNSH,VAROOT,^TMP($JOB,"GMRY")
+14 QUIT
QIO ; KILL OUTPUT VARIABLES FROM IO SUBR.
+1 KILL GMRAGE,GMRBED,GMRSEX,GMRVADM,GMR,SSN
+2 QUIT