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

BSDN1.m

Go to the documentation of this file.
  1. BSDN1 ; IHS/ANMC/LJF - IHS CHANGES TO NO-SHOW LETTERS ;
  1. ;;5.3;PIMS;;APR 26, 2002
  1. ;
  1. ARBK(DATE) ;EP; called by SDN1 to find if uncancelled auto-rebooked appt exists
  1. ; -- DATE is date of rebooked appt; returns value to SDR
  1. NEW BSDY,BSDZ
  1. S BSDY=$P($G(^DPT(DFN,"S",DATE,0)),U,2) ;appt status
  1. I (BSDY="")!(BSDY="NT")!(BSDY="I") Q 1 ;appt okay
  1. I BSDY'["A" Q 0 ;not rebooked
  1. S BSDZ=$P(^DPT(DFN,"S",DATE,0),U,10) ;rebook appt date/time
  1. I BSDZ="" Q 0 ;not really rebooked
  1. Q $$ARBK(BSDZ)
  1. ;
  1. FINDA ;EP called by SDN1 to find uncanceled auto-rebooked appt
  1. ;follows path thru every rebooked no-show and cancellation
  1. ; -- variables to reset SDX,SDC,S
  1. NEW BSDX,BSDY,BSDZ
  1. S BSDX=SDX
  1. S BSDY=$P($G(^DPT(DFN,"S",BSDX,0)),U,2) ;appt status
  1. I (BSDY="")!(BSDY="NT")!(BSDY="I") Q ;okay
  1. I BSDY="C"!(BSDY="N") S BSDQ="" Q ;deadend, no new appt
  1. S BSDZ=$P(^DPT(DFN,"S",BSDX,0),U,10) ;rebooked appt date/time
  1. I BSDZ="" S BSDQ="" Q ;deadend all cancelled
  1. ;
  1. ; reset appt date, data node and clinic then loop again
  1. S SDX=BSDZ,S=^DPT(DFN,"S",SDX,0),SDC=$P(^(0),U)
  1. D FINDA
  1. Q
  1. ;
  1. RBKDT(SDX,DFN) ;EP called by SDNOS1 to return date of uncancld rebooked appt
  1. NEW SDC,S D FINDA Q SDX