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

SD53105C.m

Go to the documentation of this file.
  1. SD53105C ;ALB/JRP - BULLETINS FOR PATCH 105;12-MAR-1997
  1. ;;5.3;Scheduling;**105,132**;Aug 13, 1993
  1. ;
  1. BULL1 ;Generate/send completion bulletin for cleanup #1 (see EN^SD53105A)
  1. ;
  1. ;Input : ^TMP($J,"SD53105A") defined as follows
  1. ; ^("XMIT") = Total Checked
  1. ; ^ Total deleted because of bad Encounter ptr
  1. ; ^ Total deleted because of bad Del Enc ptr
  1. ; ^ Total marked for retransmission
  1. ; ^("DEL") = Total Checked ^ Total Deleted
  1. ; ^("ERR") = Total Checked ^ Total Deleted
  1. ; ^("TIME") = Start (FM) ^ End (FM)
  1. ; ^("STOP") = Task asked to stop (1/0)
  1. ;Output : None
  1. ;Notes : Existance of ^TMP($J,"SD53105A") is assumed
  1. ;
  1. ;Declare varibales
  1. N XMB,XMTEXT,XMY,XMDUZ,XMZ,NODE,LINE
  1. ;Initialize bulletin space
  1. K ^TMP($J,"SD53105-BULL1")
  1. S LINE=1
  1. ;Asked to stop
  1. I (^TMP($J,"SD53105A","STOP")) D
  1. .S ^TMP($J,"SD53105-BULL1",LINE)="*** Note that process was asked to stop and did not run to completion ***"
  1. .S ^TMP($J,"SD53105-BULL1",(LINE+1))=" "
  1. .S LINE=LINE+2
  1. ;Time summary
  1. S NODE=^TMP($J,"SD53105A","TIME")
  1. S ^TMP($J,"SD53105-BULL1",LINE)="Process began on "_$$FMTE^XLFDT($P(NODE,"^",1))_" and completed on "_$$FMTE^XLFDT($P(NODE,"^",2))
  1. S ^TMP($J,"SD53105-BULL1",(LINE+1))=" "
  1. S LINE=LINE+2
  1. ;Transmitted Outpatient Encounter file summary
  1. S NODE=^TMP($J,"SD53105A","XMIT")
  1. S ^TMP($J,"SD53105-BULL1",LINE)="A total of "_(+$P(NODE,"^",1))_" entries in the Transmitted Outpatient Encounter file were"
  1. S ^TMP($J,"SD53105-BULL1",(LINE+1))="checked and "_(+$P(NODE,"^",2))_" of them were deleted because of bad pointers to the"
  1. S ^TMP($J,"SD53105-BULL1",(LINE+2))="Outpatient Encounter file and "_(+$P(NODE,"^",3))_" of them were deleted because of bad"
  1. S ^TMP($J,"SD53105-BULL1",(LINE+3))="pointers to the Deleted Outpatient Encounter file. In addition to this,"
  1. S ^TMP($J,"SD53105-BULL1",(LINE+4))=(+$P(NODE,"^",4))_" entries were marked for re-transmission because they were rejected and"
  1. S ^TMP($J,"SD53105-BULL1",(LINE+5))="did not contain a reason for rejection in the Transmitted Outpatient"
  1. S ^TMP($J,"SD53105-BULL1",(LINE+6))="Encounter Error file."
  1. S ^TMP($J,"SD53105-BULL1",(LINE+7))=" "
  1. S LINE=LINE+8
  1. ;Deleted Outpatient Encounter file summary
  1. S NODE=^TMP($J,"SD53105A","DEL")
  1. S ^TMP($J,"SD53105-BULL1",LINE)="A total of "_(+$P(NODE,"^",1))_" entries in the Deleted Outpatient Encounter file were"
  1. S ^TMP($J,"SD53105-BULL1",(LINE+1))="checked and "_(+$P(NODE,"^",2))_" of them were deleted because an associated entry in the"
  1. S ^TMP($J,"SD53105-BULL1",(LINE+2))="Transmitted Outpatient Encounter file could not be found."
  1. S ^TMP($J,"SD53105-BULL1",(LINE+3))=" "
  1. S LINE=LINE+4
  1. ;Transmitted Outpatient Encounter Error file summary
  1. S NODE=^TMP($J,"SD53105A","ERR")
  1. S ^TMP($J,"SD53105-BULL1",LINE)="A total of "_(+$P(NODE,"^",1))_" entries in the Transmitted Outpatient Encounter Error file"
  1. S ^TMP($J,"SD53105-BULL1",(LINE+1))="were checked and "_(+$P(NODE,"^",2))_" of them were deleted because of bad pointers to the"
  1. S ^TMP($J,"SD53105-BULL1",(LINE+2))="Transmitted Outpatient Encounter file."
  1. S ^TMP($J,"SD53105-BULL1",(LINE+3))=" "
  1. S LINE=LINE+4
  1. ;Send completion bulletin
  1. S XMB="SCDX AMBCARE TO NPCDB SUMMARY"
  1. S XMB(1)="ACRP cleanup of files 409.73, 409.74, and 409.75"
  1. S XMTEXT="^TMP($J,""SD53105-BULL1"","
  1. S XMY(DUZ)=""
  1. S XMDUZ="ACRP - SD*5.3*105"
  1. D ^XMB
  1. ;Done - clean up and quit
  1. K ^TMP($J,"SD53105-BULL1")
  1. Q
  1. ;