BEHOVMRP ;IHS/MSC/MGH - OE/RR REPORTS FOR MEASUREMNTS AND I&O;26-Mar-2010 15:42;PLS
;;1.1;BEH COMPONENTS;**001004,001005**;March 20,2007
;
VITALS(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- get vitals report
D START^ORWRP(132,"VITALSB^BEHOVMRP(.ROOT,.ORDFN,.ID,.ALPHA,.OMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)")
Q
VITALSB(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- build vitals report
N ORVP,XQORNOD,ORSSTRT,ORSSTOP
Q:'$G(ORDFN)
I $L(ORDTRNG),'$G(ALPHA) S ALPHA=$$FMADD^XLFDT(DT,-ORDTRNG),OMEGA=$$NOW^XLFDT
Q:'$G(ALPHA) Q:'$G(OMEGA)
I '$P(OMEGA,".",2) S OMEGA=OMEGA_".2359"
S ORVP=ORDFN_";DPT(",XQORNOD=1,ORSSTRT(XQORNOD)=ALPHA,ORSSTOP(XQORNOD)=OMEGA
D VITCUM
Q
VITCUM ; Print Vitals Cumulative Report
N %,DFN,BEH1ST,BEHDAT,BEHDATE,BEHSH,BEHDT,BEHLN,BEHOUT,BEHPDT,BEHPG
N BEHSITE,BEHSP,BEHVDA,BEHVFDT,BEHVITY,BEHVSDT,BEHVTY,GMTVX,BEHY,I
N VA,VADM
S DFN=+ORVP,BEHVSDT=$G(ORSSTRT(+XQORNOD)),BEHVFDT=$G(ORSSTOP(+XQORNOD))
D EN3^BEHOVMC(DFN,BEHVSDT,BEHVFDT) G:BEHOUT VCOUT
VCOUT ;
Q
IANDO(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- get Intake and output report
D START^ORWRP(132,"IANDOSB^BEHOVMRP(.ROOT,.ORDFN,.ID,.ALPHA,.OMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)")
Q
IANDOSB(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- build I&O report
N ORVP,XQORNOD,ORSSTRT,ORSSTOP
Q:'$G(ORDFN)
I $L(ORDTRNG),'$G(ALPHA) S ALPHA=$$FMADD^XLFDT(DT,-ORDTRNG),OMEGA=$$NOW^XLFDT
Q:'$G(ALPHA) Q:'$G(OMEGA)
I '$P(OMEGA,".",2) S OMEGA=OMEGA_".2359"
S ORVP=ORDFN_";DPT(",XQORNOD=1,ORSSTRT(XQORNOD)=ALPHA,ORSSTOP(XQORNOD)=OMEGA
D IOCUM
Q
IOCUM ; Print I&O Cumulative Report
N VA,VADM,DFN,%,GMREDB,GMRSTRT,GMRFIN,GMRCOL,GMROUT,GRPT
S DFN=+ORVP,GMRSTRT=$G(ORSSTRT(+XQORNOD)),GMRFIN=$G(ORSSTOP(+XQORNOD))
S GMREDB="P",GRPT=1,GMROUT=0
S GMRCOL=6*(3+$P(^GMRD(126.56,0),"^",4)+$P(^GMRD(126.58,0),"^",4))
D START^GMRYRP0 G VCOUT
Q
VERR(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- get error report
D START^ORWRP(132,"VERRSB^BEHOVMRP(.ROOT,.ORDFN,.ID,.ALPHA,.OMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)")
Q
VERRSB(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- build vitals error report
N ORVP,XQORNOD,ORSSTRT,ORSSTOP
Q:'$G(ORDFN)
I $L(ORDTRNG),'$G(ALPHA) S ALPHA=$$FMADD^XLFDT(DT,-ORDTRNG),OMEGA=$$NOW^XLFDT
Q:'$G(ALPHA) Q:'$G(OMEGA)
I '$P(OMEGA,".",2) S OMEGA=OMEGA_".2359"
S ORVP=ORDFN_";DPT(",XQORNOD=1,ORSSTRT(XQORNOD)=ALPHA,ORSSTOP(XQORNOD)=OMEGA
D ERRPT
Q
ERRPT ; Print Vitals Entered in error Report
N VA,VADM,DFN,%,GMREDB,GMRVSDT,GMRVFDT,GMRCOL,PARAM,DATA
S DFN=+ORVP,BEHVSDT=$G(ORSSTRT(+XQORNOD)),BEHVFDT=$G(ORSSTOP(+XQORNOD))
S PARAM="BEHOVM ERROR RPT"
D GETPAR^CIAVMRPC(.DATA,PARAM)
I DATA=0 W !,"You are not authorized to view the error reprort" Q
I DATA=1 D EN1^BEHOVMER
Q
BEHOVMRP ;IHS/MSC/MGH - OE/RR REPORTS FOR MEASUREMNTS AND I&O;26-Mar-2010 15:42;PLS
+1 ;;1.1;BEH COMPONENTS;**001004,001005**;March 20,2007
+2 ;
VITALS(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- get vitals report
+1 DO START^ORWRP(132,"VITALSB^BEHOVMRP(.ROOT,.ORDFN,.ID,.ALPHA,.OMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)")
+2 QUIT
VITALSB(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- build vitals report
+1 NEW ORVP,XQORNOD,ORSSTRT,ORSSTOP
+2 IF '$GET(ORDFN)
QUIT
+3 IF $LENGTH(ORDTRNG)
IF '$GET(ALPHA)
SET ALPHA=$$FMADD^XLFDT(DT,-ORDTRNG)
SET OMEGA=$$NOW^XLFDT
+4 IF '$GET(ALPHA)
QUIT
IF '$GET(OMEGA)
QUIT
+5 IF '$PIECE(OMEGA,".",2)
SET OMEGA=OMEGA_".2359"
+6 SET ORVP=ORDFN_";DPT("
SET XQORNOD=1
SET ORSSTRT(XQORNOD)=ALPHA
SET ORSSTOP(XQORNOD)=OMEGA
+7 DO VITCUM
+8 QUIT
VITCUM ; Print Vitals Cumulative Report
+1 NEW %,DFN,BEH1ST,BEHDAT,BEHDATE,BEHSH,BEHDT,BEHLN,BEHOUT,BEHPDT,BEHPG
+2 NEW BEHSITE,BEHSP,BEHVDA,BEHVFDT,BEHVITY,BEHVSDT,BEHVTY,GMTVX,BEHY,I
+3 NEW VA,VADM
+4 SET DFN=+ORVP
SET BEHVSDT=$GET(ORSSTRT(+XQORNOD))
SET BEHVFDT=$GET(ORSSTOP(+XQORNOD))
+5 DO EN3^BEHOVMC(DFN,BEHVSDT,BEHVFDT)
IF BEHOUT
GOTO VCOUT
VCOUT ;
+1 QUIT
IANDO(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- get Intake and output report
+1 DO START^ORWRP(132,"IANDOSB^BEHOVMRP(.ROOT,.ORDFN,.ID,.ALPHA,.OMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)")
+2 QUIT
IANDOSB(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- build I&O report
+1 NEW ORVP,XQORNOD,ORSSTRT,ORSSTOP
+2 IF '$GET(ORDFN)
QUIT
+3 IF $LENGTH(ORDTRNG)
IF '$GET(ALPHA)
SET ALPHA=$$FMADD^XLFDT(DT,-ORDTRNG)
SET OMEGA=$$NOW^XLFDT
+4 IF '$GET(ALPHA)
QUIT
IF '$GET(OMEGA)
QUIT
+5 IF '$PIECE(OMEGA,".",2)
SET OMEGA=OMEGA_".2359"
+6 SET ORVP=ORDFN_";DPT("
SET XQORNOD=1
SET ORSSTRT(XQORNOD)=ALPHA
SET ORSSTOP(XQORNOD)=OMEGA
+7 DO IOCUM
+8 QUIT
IOCUM ; Print I&O Cumulative Report
+1 NEW VA,VADM,DFN,%,GMREDB,GMRSTRT,GMRFIN,GMRCOL,GMROUT,GRPT
+2 SET DFN=+ORVP
SET GMRSTRT=$GET(ORSSTRT(+XQORNOD))
SET GMRFIN=$GET(ORSSTOP(+XQORNOD))
+3 SET GMREDB="P"
SET GRPT=1
SET GMROUT=0
+4 SET GMRCOL=6*(3+$PIECE(^GMRD(126.56,0),"^",4)+$PIECE(^GMRD(126.58,0),"^",4))
+5 DO START^GMRYRP0
GOTO VCOUT
+6 QUIT
VERR(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- get error report
+1 DO START^ORWRP(132,"VERRSB^BEHOVMRP(.ROOT,.ORDFN,.ID,.ALPHA,.OMEGA,.ORDTRNG,.REMOTE,.ORMAX,.ORFHIE)")
+2 QUIT
VERRSB(ROOT,ORDFN,ID,ALPHA,OMEGA,ORDTRNG,REMOTE,ORMAX,ORFHIE) ; -- build vitals error report
+1 NEW ORVP,XQORNOD,ORSSTRT,ORSSTOP
+2 IF '$GET(ORDFN)
QUIT
+3 IF $LENGTH(ORDTRNG)
IF '$GET(ALPHA)
SET ALPHA=$$FMADD^XLFDT(DT,-ORDTRNG)
SET OMEGA=$$NOW^XLFDT
+4 IF '$GET(ALPHA)
QUIT
IF '$GET(OMEGA)
QUIT
+5 IF '$PIECE(OMEGA,".",2)
SET OMEGA=OMEGA_".2359"
+6 SET ORVP=ORDFN_";DPT("
SET XQORNOD=1
SET ORSSTRT(XQORNOD)=ALPHA
SET ORSSTOP(XQORNOD)=OMEGA
+7 DO ERRPT
+8 QUIT
ERRPT ; Print Vitals Entered in error Report
+1 NEW VA,VADM,DFN,%,GMREDB,GMRVSDT,GMRVFDT,GMRCOL,PARAM,DATA
+2 SET DFN=+ORVP
SET BEHVSDT=$GET(ORSSTRT(+XQORNOD))
SET BEHVFDT=$GET(ORSSTOP(+XQORNOD))
+3 SET PARAM="BEHOVM ERROR RPT"
+4 DO GETPAR^CIAVMRPC(.DATA,PARAM)
+5 IF DATA=0
WRITE !,"You are not authorized to view the error reprort"
QUIT
+6 IF DATA=1
DO EN1^BEHOVMER
+7 QUIT