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

SD5364PT.m

Go to the documentation of this file.
  1. SD5364PT ;ALB/REW - SD*5.3*64 Post-installation ; 5 OCT 1996
  1. ;;5.3;Scheduling;**64**;SEP 25, 1993
  1. EN ;entry point
  1. ;look through TRANSMITTED OUTPATIENT ENCOUNTER file (#409.73) to find
  1. ;encounters without an encounter that occured prior to 10/1/96
  1. ;delete all such entries that are awaiting transmittal
  1. ;
  1. D INTRO
  1. D SEARCH
  1. D EXIT
  1. Q
  1. ;
  1. INTRO ;header info for output
  1. D MES^XPDUTL(" The TRANSMITTED OUTPATIENT ENCOUNTER File (#409.73)")
  1. D MES^XPDUTL(" should only contain records for visits after 10/1/96.")
  1. D BMES^XPDUTL(" This deletes records in this file for all visits prior to 10/1/96")
  1. Q
  1. ; SCE = ien of OUTPATIENT ENCOUNTER (#409.68)
  1. ; SCD = ien of DELETED OUTPATIENT ENCOUNTER (#409.74)
  1. ; SCCNT = Count of actually deleted records
  1. ; SCNODE = Zero Node of Associated File (409.68 or 409.74)
  1. ; SCTEST = Testing parameter to prevent deletion & list records
  1. ;
  1. N SCE,SC40973,SCCNT,SCNODE,SCD
  1. D:$G(SCTEST) BMES^XPDUTL("*** Warning !!! with SCTEST flag, no records are deleted!!")
  1. D:$G(SCTEST) MES^XPDUTL(" Clear the SCTEST variable to delete records and avoid listing records")
  1. D BMES^XPDUTL(">>>OUTPATIENT ENCOUNTER File (#409.68) related entries...")
  1. S SCCNT=0
  1. S SCE=0 F S SCE=$O(^SD(409.73,"AENC",SCE)) Q:'SCE D
  1. .S SCNODE=$G(^SCE(SCE,0))
  1. .Q:+SCNODE'<2961001
  1. .S SC40973=+$O(^SD(409.73,"AENC",SCE,""))
  1. .D:$G(SCTEST) MES^XPDUTL(" 409.73 IEN: "_SC40973_" 409.68 IEN: "_SCE_" Enc Date: "_+SCNODE)
  1. .IF '$G(SCTEST) IF $$DELXMIT^SCDXFU03(SC40973,0) D
  1. ..D MES^XPDUTL(" 409.73 IEN: "_SC40973_" 409.68 IEN: "_SCE_" Enc Date: "_+SCNODE)
  1. ..D MES^XPDUTL(" ***Entry could not be deleted. Please check.")
  1. .S SCCNT=SCCNT+1
  1. D BMES^XPDUTL(" "_SCCNT_" records deleted related to File #409.68")
  1. S SCCNT=0
  1. D BMES^XPDUTL(">>>DELETED OUTPATIENT ENCOUNTER File (#409.74) related entries...")
  1. S SCD=0 F S SCD=$O(^SD(409.73,"ADEL",SCD)) Q:'SCD D
  1. .S SCNODE=$G(^SD(409.74,SCD,0))
  1. .Q:+SCNODE'<2961001
  1. .S SCCNT=SCCNT+1
  1. .S SC40973=+$O(^SD(409.73,"ADEL",SCD,""))
  1. .D MES^XPDUTL(" 409.73 IEN: "_SC40973_" 409.74 IEN: "_SCD_" Enc Date: "_+SCNODE)
  1. .IF '$G(SCTEST) IF $$DELXMIT^SCDXFU03(SC40973,0) D
  1. ..D MES^XPDUTL(" ***Entry could not be deleted. Please check.")
  1. D BMES^XPDUTL(" "_SCCNT_" records deleted related to File #409.74")
  1. Q
  1. PRINT ;
  1. Q
  1. EXIT ;final cleanup
  1. D BMES^XPDUTL("This post-install output is saved in the INSTALL File (#9.7)")
  1. D MES^XPDUTL("under 'SD*5.3*64'")
  1. Q