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

ECX335PT.m

Go to the documentation of this file.
  1. ECX335PT ;ALB/DKK/ESD - PATCH ECX*3.0*35 Post-Init ; 01/15/01
  1. ;;3.0;DSS EXTRACTS;**35**;Jan 15, 2001
  1. ;
  1. ; This cleanup routine will delete records in the CLINIC II (CLJ)
  1. ; Extract file (#727.818) if corresponding entries in the CLINIC I
  1. ; (CLI) Extract file (#727.816) do not exist as a result of an
  1. ; incomplete CLJ extract purge.
  1. ;
  1. EN ;- Entry point for cleanup
  1. ;
  1. N ZTRTN,ZTDESC,ZTIO
  1. D BMES^XPDUTL(">>> Searching for incomplete purged CLJ extracts. If found, the incomplete")
  1. D MES^XPDUTL(">>> purged CLJ extract records will be deleted from file #727.818.")
  1. D MES^XPDUTL(">>> This purge will be queued.")
  1. D MES^XPDUTL("")
  1. ;
  1. ;- Task job
  1. S ZTRTN="DEL818^ECX335PT"
  1. S ZTDESC="Deleting incomplete purged CLJ Extract records (#727.818)"
  1. S ZTIO=""
  1. D ^%ZTLOAD
  1. D BMES^XPDUTL($S(+ZTSK:">>> Queued: Task# "_ZTSK,1:">>> Not Queued!"))
  1. Q
  1. ;
  1. ;
  1. DEL818 ;- Compare CLJ with CLI extract log number and delete CLJ record if no
  1. ; matching CLI record is found
  1. ;
  1. N BAT,DA,DIK,ECJ
  1. S BAT=0
  1. F S BAT=$O(^ECX(727.818,"AC",BAT)) Q:'BAT D
  1. . Q:$D(^ECX(727.816,"AC",BAT))
  1. . S ECJ=0
  1. . F S ECJ=$O(^ECX(727.818,"AC",BAT,ECJ)) Q:'ECJ D
  1. .. S DIK="^ECX(727.818,",DA=ECJ D ^DIK
  1. Q