CIAU1 ;MSC/IND/PLS - General Purpose Utilites - Con't ;04-May-2006 08:19;DKM
;;1.2;CIA UTILITIES;;Mar 20, 2007
;;Copyright 2000-2006, Medsphere Systems Corporation
;=================================================================
; Parameterized call to ScreenMan interface
DDS(DDSFILE,DR,DA,DDSPARM,DDSCHANG,CIAERR) ;
S CIAERR=0
D:'$D(IOST(0)) HOME^%ZIS
D ENS^%ZISS
D ^DDS
S:$D(DTOUT) CIAERR=1
I $D(DIMSG)!($D(DIERR)) D
.S CIAERR=1
.;D SHOWDLG(23)
.W !,?5,"The Screen Manager could not edit this record."
.H 5
Q
; Prompt for single date date
; PMT = Prompt
; DFL = Default value (optional)
; MIN = Minimum value (optional)
; OPT = Additional options (optional)
ASKDATE(PMT,DFL,MIN,OPT) ;
N %DT,Y
S %DT="APEX"_$G(OPT)
S %DT("A")=PMT
S:$G(MIN) %DT(0)=MIN
I $G(DFL) D
.S Y=DFL
.D DD^%DT
.S %DT("B")=Y
D ^%DT
S:Y<0 POP=1
Q Y
CIAU1 ;MSC/IND/PLS - General Purpose Utilites - Con't ;04-May-2006 08:19;DKM
+1 ;;1.2;CIA UTILITIES;;Mar 20, 2007
+2 ;;Copyright 2000-2006, Medsphere Systems Corporation
+3 ;=================================================================
+4 ; Parameterized call to ScreenMan interface
DDS(DDSFILE,DR,DA,DDSPARM,DDSCHANG,CIAERR) ;
+1 SET CIAERR=0
+2 IF '$DATA(IOST(0))
DO HOME^%ZIS
+3 DO ENS^%ZISS
+4 DO ^DDS
+5 IF $DATA(DTOUT)
SET CIAERR=1
+6 IF $DATA(DIMSG)!($DATA(DIERR))
Begin DoDot:1
+7 SET CIAERR=1
+8 ;D SHOWDLG(23)
+9 WRITE !,?5,"The Screen Manager could not edit this record."
+10 HANG 5
End DoDot:1
+11 QUIT
+12 ; Prompt for single date date
+13 ; PMT = Prompt
+14 ; DFL = Default value (optional)
+15 ; MIN = Minimum value (optional)
+16 ; OPT = Additional options (optional)
ASKDATE(PMT,DFL,MIN,OPT) ;
+1 NEW %DT,Y
+2 SET %DT="APEX"_$GET(OPT)
+3 SET %DT("A")=PMT
+4 IF $GET(MIN)
SET %DT(0)=MIN
+5 IF $GET(DFL)
Begin DoDot:1
+6 SET Y=DFL
+7 DO DD^%DT
+8 SET %DT("B")=Y
End DoDot:1
+9 DO ^%DT
+10 IF Y<0
SET POP=1
+11 QUIT Y