1 | SD53P487 ;;BP OIFO/RJV Fix ASDCN xref.
|
---|
2 | ;;5.3;Scheduling;**487**;Aug 13, 1993
|
---|
3 | ;
|
---|
4 | ;Routine to loop thru appointments and if no xref for
|
---|
5 | ;cancelled, create it.
|
---|
6 | ;
|
---|
7 | Q
|
---|
8 | CHK ;
|
---|
9 | N STATUS,SC,SDDFN,SDAPDTE
|
---|
10 | S SDDFN=0,STATUS="",SC=""
|
---|
11 | F S SDDFN=$O(^DPT(SDDFN)) Q:+SDDFN=0 D
|
---|
12 | .S SDAPDTE=0 F S SDAPDTE=$O(^DPT(SDDFN,"S",SDAPDTE)) Q:SDAPDTE="" D
|
---|
13 | ..S SC=$P(^DPT(SDDFN,"S",SDAPDTE,0),"^",1)
|
---|
14 | ..S STATUS=$P(^DPT(SDDFN,"S",SDAPDTE,0),"^",2)
|
---|
15 | ..I STATUS["C",'$D(^DPT("ASDCN",SC,SDAPDTE,SDDFN)) D
|
---|
16 | ...W !,SDDFN_" - "_SDAPDTE_" - "_SC
|
---|
17 | Q
|
---|
18 | ASDCN ;
|
---|
19 | N STATUS,SC,SDDFN,SDAPDTE
|
---|
20 | S SDDFN=0,STATUS="",SC=""
|
---|
21 | F S SDDFN=$O(^DPT(SDDFN)) Q:+SDDFN=0 D
|
---|
22 | .S SDAPDTE=0 F S SDAPDTE=$O(^DPT(SDDFN,"S",SDAPDTE)) Q:SDAPDTE="" D
|
---|
23 | ..I $P($G(^DPT(SDDFN,"S",SDAPDTE,0)),"^",1)="" Q
|
---|
24 | ..S SC=$P(^DPT(SDDFN,"S",SDAPDTE,0),"^",1)
|
---|
25 | ..S STATUS=$P($G(^DPT(SDDFN,"S",SDAPDTE,0)),"^",2)
|
---|
26 | ..I STATUS["C",'$D(^DPT("ASDCN",SC,SDAPDTE,SDDFN)) D
|
---|
27 | ...S ^DPT("ASDCN",SC,SDAPDTE,SDDFN)=$S(STATUS["P":1,1:"")
|
---|
28 | Q
|
---|