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

SCDXSUP2.m

Go to the documentation of this file.
  1. SCDXSUP2 ;ALB/JRP - PURGE ERROR FILE;22-APR-97 ; 12/20/01 4:49pm
  1. ;;5.3;Scheduling;**121,247,1015**;AUG 13, 1993;Build 21
  1. ;
  1. PRGCO ;Purge TRANSMITTED OUTPATIENT ENCOUNTER ERROR file (#409.75) of
  1. ; rejections for encounters that can not be transmitted due to
  1. ; NPCD Database Close-Out
  1. ;
  1. ;Input : None
  1. ;Output : None
  1. ;
  1. ;Declare variables
  1. N ZTRTN,ZTDESC,ZTIO,ZTDTH,ZTSK,DIR,Y,X,DTOUT,DUOUT,DIRUT
  1. ;'Are you sure' prompt
  1. S DIR("A",1)=" "
  1. S DIR("A",2)="This option will purge entries in the TRANSMITTED OUTPATIENT"
  1. S DIR("A",3)="ENCOUNTER ERROR file (#409.75) of rejections for encounters that"
  1. S DIR("A",4)="can not be transmitted due to close-out of the National Patient"
  1. S DIR("A",5)="Care Database for database credit."
  1. S DIR("A",6)=" "
  1. S DIR("A")="Ok to continue"
  1. S DIR("B")="NO"
  1. S DIR(0)="Y"
  1. D ^DIR
  1. Q:('Y)
  1. ;Task (no device needed)
  1. S ZTRTN="PRGCOT^SCDXSUP2"
  1. S ZTDESC="Purge file #409.75 of encounters that won't get database credit"
  1. S ZTIO=""
  1. S ZTDTH=""
  1. D ^%ZTLOAD
  1. W:($G(ZTSK)) !!,"Scheduled as task number ",ZTSK
  1. W:('$G(ZTSK)) !!,"** Unable to schedule correctly **"
  1. Q
  1. ;
  1. PRGCOT ;Task entry point (self contained)
  1. ;Declare variables
  1. N XMITPTR
  1. ;Loop through 'B' x-ref
  1. S XMITPTR=0
  1. F S XMITPTR=+$O(^SD(409.75,"B",XMITPTR)) Q:('XMITPTR) D Q:($$S^%ZTLOAD())
  1. .;Determine if encounter can be transmitted for database credit
  1. .Q:+$$XMIT4DBC^SCDXFU04(XMITPTR)<4 ;SD*5.3*247
  1. .;Won't received database credit - delete all errors for encounter
  1. .D DELAERR^SCDXFU02(XMITPTR)
  1. ;Done
  1. S:($D(ZTQUEUED)) ZTREQ="@"
  1. Q