SD53P487 ;;BP OIFO/RJV Fix ASDCN xref.
;;5.3;Scheduling;**487**;Aug 13, 1993
;
;Routine to loop thru appointments and if no xref for
;cancelled, create it.
;
Q
CHK ;
N STATUS,SC,SDDFN,SDAPDTE
S SDDFN=0,STATUS="",SC=""
F S SDDFN=$O(^DPT(SDDFN)) Q:+SDDFN=0 D
.S SDAPDTE=0 F S SDAPDTE=$O(^DPT(SDDFN,"S",SDAPDTE)) Q:SDAPDTE="" D
..S SC=$P(^DPT(SDDFN,"S",SDAPDTE,0),"^",1)
..S STATUS=$P(^DPT(SDDFN,"S",SDAPDTE,0),"^",2)
..I STATUS["C",'$D(^DPT("ASDCN",SC,SDAPDTE,SDDFN)) D
...W !,SDDFN_" - "_SDAPDTE_" - "_SC
Q
ASDCN ;
N STATUS,SC,SDDFN,SDAPDTE
S SDDFN=0,STATUS="",SC=""
F S SDDFN=$O(^DPT(SDDFN)) Q:+SDDFN=0 D
.S SDAPDTE=0 F S SDAPDTE=$O(^DPT(SDDFN,"S",SDAPDTE)) Q:SDAPDTE="" D
..I $P($G(^DPT(SDDFN,"S",SDAPDTE,0)),"^",1)="" Q
..S SC=$P(^DPT(SDDFN,"S",SDAPDTE,0),"^",1)
..S STATUS=$P($G(^DPT(SDDFN,"S",SDAPDTE,0)),"^",2)
..I STATUS["C",'$D(^DPT("ASDCN",SC,SDAPDTE,SDDFN)) D
...S ^DPT("ASDCN",SC,SDAPDTE,SDDFN)=$S(STATUS["P":1,1:"")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSD53P487 990 printed Dec 13, 2024@02:46:18 Page 2
SD53P487 ;;BP OIFO/RJV Fix ASDCN xref.
+1 ;;5.3;Scheduling;**487**;Aug 13, 1993
+2 ;
+3 ;Routine to loop thru appointments and if no xref for
+4 ;cancelled, create it.
+5 ;
+6 QUIT
CHK ;
+1 NEW STATUS,SC,SDDFN,SDAPDTE
+2 SET SDDFN=0
SET STATUS=""
SET SC=""
+3 FOR
SET SDDFN=$ORDER(^DPT(SDDFN))
if +SDDFN=0
QUIT
Begin DoDot:1
+4 SET SDAPDTE=0
FOR
SET SDAPDTE=$ORDER(^DPT(SDDFN,"S",SDAPDTE))
if SDAPDTE=""
QUIT
Begin DoDot:2
+5 SET SC=$PIECE(^DPT(SDDFN,"S",SDAPDTE,0),"^",1)
+6 SET STATUS=$PIECE(^DPT(SDDFN,"S",SDAPDTE,0),"^",2)
+7 IF STATUS["C"
IF '$DATA(^DPT("ASDCN",SC,SDAPDTE,SDDFN))
Begin DoDot:3
+8 WRITE !,SDDFN_" - "_SDAPDTE_" - "_SC
End DoDot:3
End DoDot:2
End DoDot:1
+9 QUIT
ASDCN ;
+1 NEW STATUS,SC,SDDFN,SDAPDTE
+2 SET SDDFN=0
SET STATUS=""
SET SC=""
+3 FOR
SET SDDFN=$ORDER(^DPT(SDDFN))
if +SDDFN=0
QUIT
Begin DoDot:1
+4 SET SDAPDTE=0
FOR
SET SDAPDTE=$ORDER(^DPT(SDDFN,"S",SDAPDTE))
if SDAPDTE=""
QUIT
Begin DoDot:2
+5 IF $PIECE($GET(^DPT(SDDFN,"S",SDAPDTE,0)),"^",1)=""
QUIT
+6 SET SC=$PIECE(^DPT(SDDFN,"S",SDAPDTE,0),"^",1)
+7 SET STATUS=$PIECE($GET(^DPT(SDDFN,"S",SDAPDTE,0)),"^",2)
+8 IF STATUS["C"
IF '$DATA(^DPT("ASDCN",SC,SDAPDTE,SDDFN))
Begin DoDot:3
+9 SET ^DPT("ASDCN",SC,SDAPDTE,SDDFN)=$SELECT(STATUS["P":1,1:"")
End DoDot:3
End DoDot:2
End DoDot:1
+10 QUIT