RAORD7 ;HISC/CAH AISC/RMO-Log of Scheduled Requests by Procedure ;11/8/01 08:00
;;5.0;Radiology/Nuclear Medicine;**15,31**;Mar 16, 1998
;;This routine looks at orders in file 75.1 with field 23 (Scheduled date) within the date range selected. User also selects order statuses to include.
DATE D SET^RAPSET1 I $D(XQUIT) K RAED,XQUIT Q
S %DT("A")="Starting Scheduled Date: ",%DT="EXA" W ! D ^%DT K %DT G Q^RAORD7A:Y<0 S RALDTE1=Y
S %DT("A")="Ending Scheduled Date: ",%DT="EXAT" W ! D ^%DT K %DT G Q^RAORD7A:Y<0 S RALDTE2=Y
I RALDTE2<RALDTE1 W !?5," ?? Starting date must be before ending date. Please try again.",! G DATE
I RALDTE2#1=0 S RALDTE2=RALDTE2+.2359
W !!,"Enter * to select all imaging locations that",!,"you are allowed here (enter ?? to view them.)"
D OMA^RAUTL13 G Q^RAORD7A:'$L($O(RALOC(0)))!($G(RAQUIT)=1)
S %DT="R",X="NOW" D ^%DT I Y>RALDTE1,Y'<RALDTE2 D
. K DIR S DIR(0)="Y",DIR("A")="Include only orders not registered (no-show's)",DIR("B")="NO",DIR("?")=" "
. S DIR("?",1)="If you have entered a date range in the past, and answer 'Yes' to this question,"
. S DIR("?",2)="the log will only include orders that have not yet reached an 'active' status.",DIR("?",3)="In other words, the orders that appear on the log are probably no-show's." W ! D ^DIR
. I Y=1 S RANOSHOW=1 ;User wants a no-show report
I $D(DTOUT)!($D(DUOUT)) G Q^RAORD7A
K DIR S DIR(0)="S^P:Procedure Name;D:Date/Time",DIR("A")="Sort by (P)rocedure Name or (D)ate/Time",DIR("B")="P" D ^DIR G:'$D(Y(0)) Q^RAORD7A S RASORT=Y(0) K DIR
F I=1,2,6 S RANO(I)=""
W !!!,"Scheduled requests to be included on this report are:",!
I $D(RANOSHOW) W !,"No-show's only."
W !,"Starting Schedule date: " W $$FMTE^XLFDT(RALDTE1,"P")
W !,"Ending Schedule date: " W $$FMTE^XLFDT(RALDTE2,"P")
W !,"Locations: " S I=0 F S I=$O(RALOC(I)) Q:I="" W I W:$X>(IOM-25) ! W ?($X+5)
W !!,"Sorted by: ",RASORT,!
K DIR S DIR(0)="Y",DIR("A")="SELECTION CRITERIA OK",DIR("B")="YES" W ! D ^DIR
I $D(DUOUT)!($D(DTOUT)) G Q^RAORD7A
I Y'=1 G DATE
;
S:$D(RANOSHOW) ZTSAVE("RANOSHOW")=""
S ZTRTN="START^RAORD7A",ZTSAVE("RALDTE1")="",ZTSAVE("RALDTE2")="",ZTSAVE("RAST")="",ZTSAVE("RALOC(")="",ZTSAVE("RAORST(")="",ZTSAVE("RASORT")="" W ! D ZIS^RAUTL G Q^RAORD7A:RAPOP
G ^RAORD7A
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRAORD7 2289 printed Oct 16, 2024@18:38:45 Page 2
RAORD7 ;HISC/CAH AISC/RMO-Log of Scheduled Requests by Procedure ;11/8/01 08:00
+1 ;;5.0;Radiology/Nuclear Medicine;**15,31**;Mar 16, 1998
+2 ;;This routine looks at orders in file 75.1 with field 23 (Scheduled date) within the date range selected. User also selects order statuses to include.
DATE DO SET^RAPSET1
IF $DATA(XQUIT)
KILL RAED,XQUIT
QUIT
+1 SET %DT("A")="Starting Scheduled Date: "
SET %DT="EXA"
WRITE !
DO ^%DT
KILL %DT
if Y<0
GOTO Q^RAORD7A
SET RALDTE1=Y
+2 SET %DT("A")="Ending Scheduled Date: "
SET %DT="EXAT"
WRITE !
DO ^%DT
KILL %DT
if Y<0
GOTO Q^RAORD7A
SET RALDTE2=Y
+3 IF RALDTE2<RALDTE1
WRITE !?5," ?? Starting date must be before ending date. Please try again.",!
GOTO DATE
+4 IF RALDTE2#1=0
SET RALDTE2=RALDTE2+.2359
+5 WRITE !!,"Enter * to select all imaging locations that",!,"you are allowed here (enter ?? to view them.)"
+6 DO OMA^RAUTL13
if '$LENGTH($ORDER(RALOC(0)))!($GET(RAQUIT)=1)
GOTO Q^RAORD7A
+7 SET %DT="R"
SET X="NOW"
DO ^%DT
IF Y>RALDTE1
IF Y'<RALDTE2
Begin DoDot:1
+8 KILL DIR
SET DIR(0)="Y"
SET DIR("A")="Include only orders not registered (no-show's)"
SET DIR("B")="NO"
SET DIR("?")=" "
+9 SET DIR("?",1)="If you have entered a date range in the past, and answer 'Yes' to this question,"
+10 SET DIR("?",2)="the log will only include orders that have not yet reached an 'active' status."
SET DIR("?",3)="In other words, the orders that appear on the log are probably no-show's."
WRITE !
DO ^DIR
+11 ;User wants a no-show report
IF Y=1
SET RANOSHOW=1
End DoDot:1
+12 IF $DATA(DTOUT)!($DATA(DUOUT))
GOTO Q^RAORD7A
+13 KILL DIR
SET DIR(0)="S^P:Procedure Name;D:Date/Time"
SET DIR("A")="Sort by (P)rocedure Name or (D)ate/Time"
SET DIR("B")="P"
DO ^DIR
if '$DATA(Y(0))
GOTO Q^RAORD7A
SET RASORT=Y(0)
KILL DIR
+14 FOR I=1,2,6
SET RANO(I)=""
+15 WRITE !!!,"Scheduled requests to be included on this report are:",!
+16 IF $DATA(RANOSHOW)
WRITE !,"No-show's only."
+17 WRITE !,"Starting Schedule date: "
WRITE $$FMTE^XLFDT(RALDTE1,"P")
+18 WRITE !,"Ending Schedule date: "
WRITE $$FMTE^XLFDT(RALDTE2,"P")
+19 WRITE !,"Locations: "
SET I=0
FOR
SET I=$ORDER(RALOC(I))
if I=""
QUIT
WRITE I
if $X>(IOM-25)
WRITE !
WRITE ?($X+5)
+20 WRITE !!,"Sorted by: ",RASORT,!
+21 KILL DIR
SET DIR(0)="Y"
SET DIR("A")="SELECTION CRITERIA OK"
SET DIR("B")="YES"
WRITE !
DO ^DIR
+22 IF $DATA(DUOUT)!($DATA(DTOUT))
GOTO Q^RAORD7A
+23 IF Y'=1
GOTO DATE
+24 ;
+25 if $DATA(RANOSHOW)
SET ZTSAVE("RANOSHOW")=""
+26 SET ZTRTN="START^RAORD7A"
SET ZTSAVE("RALDTE1")=""
SET ZTSAVE("RALDTE2")=""
SET ZTSAVE("RAST")=""
SET ZTSAVE("RALOC(")=""
SET ZTSAVE("RAORST(")=""
SET ZTSAVE("RASORT")=""
WRITE !
DO ZIS^RAUTL
if RAPOP
GOTO Q^RAORD7A
+27 GOTO ^RAORD7A