NURSAGP2 ;HIRMFO/MD-ADMINISTRATION/EDUCATION REPORT PROMPTS CONTINUED ;2/27/98 14:25
;;4.0;NURSING SERVICE;**9**;Apr 25, 1997
INS ; INSERVICE SELECTION
S DIR(0)="SO^M:Mandatory Training;C:Continuing Education;O:Other/Miscellaneous;W:Ward/Unit-Location Training;A:All",DIR("A")="Select Sort Parameter(s)" D ^DIR K DIR I $D(DUOUT)!$D(DTOUT)!("^"[X) S NUROUT=1 Q
S NURSEL=Y
Q
DATSEL ;
S DATSEL=U_$G(DATSEL)_U,DIR(0)="SO^C:Calendar Year;F:Fiscal Year;"
I DATSEL'["^NS^" S DIR(0)=DIR(0)_"S:Selected Date Range;"
S DIR("A")="Select a Sort Parameter"
D ^DIR K DIR I $D(DUOUT)!$D(DTOUT)!("^"[X) S NUROUT=1 Q
S TYP=Y,YR=1700+$E(DT,1,3) I TYP="F" S MN=$E(DT,4,5) S:MN>9 YR=(YR+1)
S DIR(0)="DA^^K:X'?4N X"
S X=YR D ^%DT D:+Y D^DIQ S DIR("B")=Y,DIR("?")="This response must be a year i.e. 1990"
I TYP["C" S DIR("A")="Select "_$S($G(YRSW):"Latest ",1:"")_"Calendar Year: " W ! D
.D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S NUROUT=1 Q
.S NYR=$G(Y(0)),YR(6)=$S($G(Y)="":"",1:1700+$E(Y,1,3)),%DT="",X=Y D ^%DT S YRST=+Y,%DT="",X="12/31/"_YR(6) D ^%DT S YREND=+Y K %DT S X1=YRST,X2=-90 D C^%DTC S YRCHK=X
I TYP["F" S DIR("A")="Select "_$S($G(YRSW):"Latest ",1:"")_"Fiscal Year: " W ! D
.D ^DIR S NYR=$G(Y(0)),YR(6)=1700+$E(Y,1,3) K DIR I $D(DTOUT)!$D(DUOUT) S NUROUT=1 Q
.S %DT="",X="10/"_(YR(6)-1) D ^%DT S YRST=+Y S %DT="",X="9/30/"_YR(6) D ^%DT S YREND=+Y K %DT S X1=YRST,X2=-90 D C^%DTC S YRCHK=X
I TYP["S" K DIR D
.W ! S X=DT D ^%DT D:+Y D^DIQ S DIR("B")=Y,DIR(0)="DA^::ET",DIR("A")="Start With DATE: ",DIR("?")="^D HELP^%DTC"
.I DATSEL["^N+^" S DIR(0)="DA^:"_DT_":ET",DIR("?")="^S %DT(0)=-DT D HELP^%DTC"
.D ^DIR K %DT(0),DIR I $D(DTOUT)!$D(DUOUT)!("^"[X) S NUROUT=1 Q
.S YRST=+Y,X=DT,%DT(0)=-DT,%DT="T" D ^%DT D:+Y D^DIQ S YRST(1)=$E(YRST,4,5)_"/"_$E(YRST,6,7)_"/"_$E(YRST,2,3) W ! S DIR("B")=Y,DIR("A")=" Go to DATE: "
.S DIR(0)="DA^"_+YRST_"::ET",DIR("?")="^D HELP^%DTC"
.I DATSEL["^N+^" S DIR(0)="DA^"_+YRST_":"_DT_":ET",DIR("?")="^S %DT(0)=-DT D HELP^%DTC"
.D ^DIR K %DT(0),DIR I $D(DTOUT)!$D(DUOUT)!(U[X) S NUROUT=1 Q
.S X1=YRST,X2=+90 D C^%DTC S YRCHK=X
.S YREND=+Y_$S(+Y#1:"",1:".2359"),YREND(1)=$E(YREND,4,5)_"/"_$E(YREND,6,7)_"/"_$E(YREND,2,3)
K DATSEL,YR Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HNURSAGP2 2215 printed Oct 16, 2024@18:22:11 Page 2
NURSAGP2 ;HIRMFO/MD-ADMINISTRATION/EDUCATION REPORT PROMPTS CONTINUED ;2/27/98 14:25
+1 ;;4.0;NURSING SERVICE;**9**;Apr 25, 1997
INS ; INSERVICE SELECTION
+1 SET DIR(0)="SO^M:Mandatory Training;C:Continuing Education;O:Other/Miscellaneous;W:Ward/Unit-Location Training;A:All"
SET DIR("A")="Select Sort Parameter(s)"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)!$DATA(DTOUT)!("^"[X)
SET NUROUT=1
QUIT
+2 SET NURSEL=Y
+3 QUIT
DATSEL ;
+1 SET DATSEL=U_$GET(DATSEL)_U
SET DIR(0)="SO^C:Calendar Year;F:Fiscal Year;"
+2 IF DATSEL'["^NS^"
SET DIR(0)=DIR(0)_"S:Selected Date Range;"
+3 SET DIR("A")="Select a Sort Parameter"
+4 DO ^DIR
KILL DIR
IF $DATA(DUOUT)!$DATA(DTOUT)!("^"[X)
SET NUROUT=1
QUIT
+5 SET TYP=Y
SET YR=1700+$EXTRACT(DT,1,3)
IF TYP="F"
SET MN=$EXTRACT(DT,4,5)
if MN>9
SET YR=(YR+1)
+6 SET DIR(0)="DA^^K:X'?4N X"
+7 SET X=YR
DO ^%DT
if +Y
DO D^DIQ
SET DIR("B")=Y
SET DIR("?")="This response must be a year i.e. 1990"
+8 IF TYP["C"
SET DIR("A")="Select "_$SELECT($GET(YRSW):"Latest ",1:"")_"Calendar Year: "
WRITE !
Begin DoDot:1
+9 DO ^DIR
KILL DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
SET NUROUT=1
QUIT
+10 SET NYR=$GET(Y(0))
SET YR(6)=$SELECT($GET(Y)="":"",1:1700+$EXTRACT(Y,1,3))
SET %DT=""
SET X=Y
DO ^%DT
SET YRST=+Y
SET %DT=""
SET X="12/31/"_YR(6)
DO ^%DT
SET YREND=+Y
KILL %DT
SET X1=YRST
SET X2=-90
DO C^%DTC
SET YRCHK=X
End DoDot:1
+11 IF TYP["F"
SET DIR("A")="Select "_$SELECT($GET(YRSW):"Latest ",1:"")_"Fiscal Year: "
WRITE !
Begin DoDot:1
+12 DO ^DIR
SET NYR=$GET(Y(0))
SET YR(6)=1700+$EXTRACT(Y,1,3)
KILL DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
SET NUROUT=1
QUIT
+13 SET %DT=""
SET X="10/"_(YR(6)-1)
DO ^%DT
SET YRST=+Y
SET %DT=""
SET X="9/30/"_YR(6)
DO ^%DT
SET YREND=+Y
KILL %DT
SET X1=YRST
SET X2=-90
DO C^%DTC
SET YRCHK=X
End DoDot:1
+14 IF TYP["S"
KILL DIR
Begin DoDot:1
+15 WRITE !
SET X=DT
DO ^%DT
if +Y
DO D^DIQ
SET DIR("B")=Y
SET DIR(0)="DA^::ET"
SET DIR("A")="Start With DATE: "
SET DIR("?")="^D HELP^%DTC"
+16 IF DATSEL["^N+^"
SET DIR(0)="DA^:"_DT_":ET"
SET DIR("?")="^S %DT(0)=-DT D HELP^%DTC"
+17 DO ^DIR
KILL %DT(0),DIR
IF $DATA(DTOUT)!$DATA(DUOUT)!("^"[X)
SET NUROUT=1
QUIT
+18 SET YRST=+Y
SET X=DT
SET %DT(0)=-DT
SET %DT="T"
DO ^%DT
if +Y
DO D^DIQ
SET YRST(1)=$EXTRACT(YRST,4,5)_"/"_$EXTRACT(YRST,6,7)_"/"_$EXTRACT(YRST,2,3)
WRITE !
SET DIR("B")=Y
SET DIR("A")=" Go to DATE: "
+19 SET DIR(0)="DA^"_+YRST_"::ET"
SET DIR("?")="^D HELP^%DTC"
+20 IF DATSEL["^N+^"
SET DIR(0)="DA^"_+YRST_":"_DT_":ET"
SET DIR("?")="^S %DT(0)=-DT D HELP^%DTC"
+21 DO ^DIR
KILL %DT(0),DIR
IF $DATA(DTOUT)!$DATA(DUOUT)!(U[X)
SET NUROUT=1
QUIT
+22 SET X1=YRST
SET X2=+90
DO C^%DTC
SET YRCHK=X
+23 SET YREND=+Y_$SELECT(+Y#1:"",1:".2359")
SET YREND(1)=$EXTRACT(YREND,4,5)_"/"_$EXTRACT(YREND,6,7)_"/"_$EXTRACT(YREND,2,3)
End DoDot:1
+24 KILL DATSEL,YR
QUIT