Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SD53P389

SD53P389.m

Go to the documentation of this file.
  1. SD53P389 ;;BP OIFO/RJV Fix ASDCN xref.
  1. ;;5.3;Scheduling;**389,1015**;Aug 13, 1993;Build 21
  1. ;
  1. ;Routine to loop thru appointments and if no xref for
  1. ;cancelled, create it.
  1. ;
  1. Q
  1. CHK ;
  1. N STATUS,SC,SDDFN,SDAPDTE
  1. S SDDFN=0,STATUS="",SC=""
  1. F S SDDFN=$O(^DPT(SDDFN)) Q:+SDDFN=0 D
  1. .S SDAPDTE=0 F S SDAPDTE=$O(^DPT(SDDFN,"S",SDAPDTE)) Q:SDAPDTE="" D
  1. ..S SC=$P(^DPT(SDDFN,"S",SDAPDTE,0),"^",1)
  1. ..S STATUS=$P(^DPT(SDDFN,"S",SDAPDTE,0),"^",2)
  1. ..I STATUS["C",'$D(^DPT("ASDCN",SC,SDAPDTE,SDDFN)) D
  1. ...W !,SDDFN_" - "_SDAPDTE_" - "_SC
  1. Q
  1. ASDCN ;
  1. N STATUS,SC,SDDFN,SDAPDTE
  1. S SDDFN=0,STATUS="",SC=""
  1. F S SDDFN=$O(^DPT(SDDFN)) Q:+SDDFN=0 D
  1. .S SDAPDTE=0 F S SDAPDTE=$O(^DPT(SDDFN,"S",SDAPDTE)) Q:SDAPDTE="" D
  1. ..S SC=$P(^DPT(SDDFN,"S",SDAPDTE,0),"^",1)
  1. ..S STATUS=$P(^DPT(SDDFN,"S",SDAPDTE,0),"^",2)
  1. ..I STATUS["C",'$D(^DPT("ASDCN",SC,SDAPDTE,SDDFN)) D
  1. ...S ^DPT("ASDCN",SC,SDAPDTE,SDDFN)=$S(STATUS["P":1,1:"")
  1. Q