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

HLUOPT2.m

Go to the documentation of this file.
  1. HLUOPT2 ;CIOFO-O/LJA - Purging Entries in file #772 and #773 ;12/13/02 14:03
  1. ;;1.6;HEALTH LEVEL SEVEN;**98**;Oct 13, 1995
  1. ;
  1. DELBODY(IEN772,APP,STORE) ; Delete the body of a message.
  1. ; (See patch HL*1.6*98 for complete details.)
  1. ;
  1. ; (Call here ONLY if the message, and all related ACK messages
  1. ; have been successfully completed!)
  1. ;
  1. N NOLN,NOW,SNO,SUB,X
  1. ;
  1. ; Has the message body already been deleted? If so, quit...
  1. QUIT:'$D(^HL(772,+$G(IEN772),"IN")) ;->
  1. ;
  1. ; Set up variable environment...
  1. S APP=$G(APP),STORE=$G(STORE),NOW=$$NOW^XLFDT
  1. ;
  1. ; Get the number lines and delete data...
  1. S NOLN=$O(^HL(772,+IEN772,"IN",":"),-1)
  1. KILL ^HL(772,+IEN772,"IN")
  1. ;
  1. ; Get subscript for XTMP data about to be stored. Make sub 0 entry prn.
  1. S SUB=$$XTMP0($$DT^XLFDT)
  1. ;
  1. ; Get storage number...
  1. S SNO=$O(^XTMP(SUB,":"),-1)+1
  1. ;
  1. ; Store deletion information...
  1. S ^XTMP(SUB,SNO,0)=NOW_U_APP_U_NOLN_U_$G(XQY0)_U_$G(ZTSK)
  1. ;
  1. ; Quit if user doesn't want @STORE data stored...
  1. QUIT:STORE']"" ;->
  1. ;
  1. ; Store STORE data...
  1. KILL X S X="I "_STORE D ^DIM I $D(X) MERGE ^XTMP(SUB,SNO,"S")=@STORE
  1. ;
  1. QUIT
  1. ;
  1. XTMP0(DATE) ; Return subscript for ^XTMP data...
  1. N SUB
  1. S SUB="HLUOPT2 "_DATE
  1. S:'$D(^XTMP(SUB,0)) ^XTMP(SUB,0)=$$FMADD^XLFDT(DATE,7)_U_$$NOW^XLFDT_U_"HLUOPT2 Message Body Deletion"
  1. QUIT SUB
  1. ;
  1. EOR ; HLUOPT2 - Purging Entries in file #772 and #773