BDMVRL1 ; cmi/anch/maw - VIEW RECORD ACTION ;
;;2.0;DIABETES MANAGEMENT SYSTEM;**12**;JUN 14, 2007;Build 51
;
MP ;EP; -- view medication profile
K BDMONLY
S BDMVALM="BDMV MEDICATIONS"
D VALM^BDMVRL(BDMVALM)
Q
MP1 ;EP;TO PRINT DIABETES MEDS ONLY
S BDMONLY=""
S BDMVALM="BDMV MEDICATIONS"
D VALM^BDMVRL(BDMVALM)
K BDMONLY
Q
OERR ;EP; -- view lab/rad results
D REG^BDMFUTIL
Q:$D(BDMQUIT)
; LORI, this will eventually be an entry point into an OE/RR rtn
D MSG^BDMVU("SORRY, NOT READY YET!",2,1,1)
D RETURN^BDMVU
Q
;
PAUSE ; -- ask user to press RETURN when ready
D RETURN^BDMVU
Q
;
PAD(D,L) ; -- SUBRTN to pad length of data
; -- D=data L=length
Q $E(D_$$REPEAT^XLFSTR(" ",L),1,L)
;
SP(N) ; -- SUBRTN to pad N number of spaces
Q $$PAD(" ",N)
;
SURGP ;;
;; 1. Brief Operation Summary
;; 2. Operation Report
;; 3. Anesthesia Report
;; 4. Nurse Intraoperative Report
;;
MINIT ;EP;DISPLAY MED FROM THE V MED FILE
K VALMCNT
K ^TMP("BDMVR",$J)
S VALMCNT=0
N DATE,VMDA,X,Y,Z
S DATE=0
F S DATE=$O(^AUPNVMED("AA",DFN,DATE)) Q:'DATE!$D(BDMQUIT) D
.S VMDA=0
.F S VMDA=$O(^AUPNVMED("AA",DFN,DATE,VMDA)) Q:'VMDA!$D(BDMQUIT) D
..S X=$G(^AUPNVMED(VMDA,0))
..I $D(BDMONLY),'$D(BDMMEDS(+X)) Q
..D MEDDISP
Q
MEDDISP ;DISPLAY EACH V MED ENTRY
N Y,Z
S Y=9999999-DATE
S Z=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_(1700+$E(Y,1,3))
S $E(Z,13)=$P($G(^PSDRUG(+X,0)),U)
I 'X,$P(X,U,4) S Z=Z_$P(X,U,4)
S Z=Z_" QTY: "_$P(X,U,6)
S Z=Z_" DAYS: "_$P(X,U,7)
I $P(X,U,8) D
.S Y=$P(X,U,8)
.X ^DD("DD")
.S Z=Z_" DC'D: "_Y
D Z(Z)
S Z=""
S $E(Z,13)=$P(X,U,5)
D Z(Z)
Q
Z(X) ;SET TMP NODE
S VALMCNT=VALMCNT+1
S ^TMP("BDMVR",$J,VALMCNT,0)=X
Q
BDMVRL1 ; cmi/anch/maw - VIEW RECORD ACTION ;
+1 ;;2.0;DIABETES MANAGEMENT SYSTEM;**12**;JUN 14, 2007;Build 51
+2 ;
MP ;EP; -- view medication profile
+1 KILL BDMONLY
+2 SET BDMVALM="BDMV MEDICATIONS"
+3 DO VALM^BDMVRL(BDMVALM)
+4 QUIT
MP1 ;EP;TO PRINT DIABETES MEDS ONLY
+1 SET BDMONLY=""
+2 SET BDMVALM="BDMV MEDICATIONS"
+3 DO VALM^BDMVRL(BDMVALM)
+4 KILL BDMONLY
+5 QUIT
OERR ;EP; -- view lab/rad results
+1 DO REG^BDMFUTIL
+2 IF $DATA(BDMQUIT)
QUIT
+3 ; LORI, this will eventually be an entry point into an OE/RR rtn
+4 DO MSG^BDMVU("SORRY, NOT READY YET!",2,1,1)
+5 DO RETURN^BDMVU
+6 QUIT
+7 ;
PAUSE ; -- ask user to press RETURN when ready
+1 DO RETURN^BDMVU
+2 QUIT
+3 ;
PAD(D,L) ; -- SUBRTN to pad length of data
+1 ; -- D=data L=length
+2 QUIT $EXTRACT(D_$$REPEAT^XLFSTR(" ",L),1,L)
+3 ;
SP(N) ; -- SUBRTN to pad N number of spaces
+1 QUIT $$PAD(" ",N)
+2 ;
SURGP ;;
+1 ;; 1. Brief Operation Summary
+2 ;; 2. Operation Report
+3 ;; 3. Anesthesia Report
+4 ;; 4. Nurse Intraoperative Report
+5 ;;
MINIT ;EP;DISPLAY MED FROM THE V MED FILE
+1 KILL VALMCNT
+2 KILL ^TMP("BDMVR",$JOB)
+3 SET VALMCNT=0
+4 NEW DATE,VMDA,X,Y,Z
+5 SET DATE=0
+6 FOR
SET DATE=$ORDER(^AUPNVMED("AA",DFN,DATE))
IF 'DATE!$DATA(BDMQUIT)
QUIT
Begin DoDot:1
+7 SET VMDA=0
+8 FOR
SET VMDA=$ORDER(^AUPNVMED("AA",DFN,DATE,VMDA))
IF 'VMDA!$DATA(BDMQUIT)
QUIT
Begin DoDot:2
+9 SET X=$GET(^AUPNVMED(VMDA,0))
+10 IF $DATA(BDMONLY)
IF '$DATA(BDMMEDS(+X))
QUIT
+11 DO MEDDISP
End DoDot:2
End DoDot:1
+12 QUIT
MEDDISP ;DISPLAY EACH V MED ENTRY
+1 NEW Y,Z
+2 SET Y=9999999-DATE
+3 SET Z=$EXTRACT(Y,4,5)_"/"_$EXTRACT(Y,6,7)_"/"_(1700+$EXTRACT(Y,1,3))
+4 SET $EXTRACT(Z,13)=$PIECE($GET(^PSDRUG(+X,0)),U)
+5 IF 'X
IF $PIECE(X,U,4)
SET Z=Z_$PIECE(X,U,4)
+6 SET Z=Z_" QTY: "_$PIECE(X,U,6)
+7 SET Z=Z_" DAYS: "_$PIECE(X,U,7)
+8 IF $PIECE(X,U,8)
Begin DoDot:1
+9 SET Y=$PIECE(X,U,8)
+10 XECUTE ^DD("DD")
+11 SET Z=Z_" DC'D: "_Y
End DoDot:1
+12 DO Z(Z)
+13 SET Z=""
+14 SET $EXTRACT(Z,13)=$PIECE(X,U,5)
+15 DO Z(Z)
+16 QUIT
Z(X) ;SET TMP NODE
+1 SET VALMCNT=VALMCNT+1
+2 SET ^TMP("BDMVR",$JOB,VALMCNT,0)=X
+3 QUIT