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

HLOCLNT3.m

Go to the documentation of this file.
  1. HLOCLNT3 ;ALB/CJM- Updates messages missing application acks - 10/4/94 1pm
  1. ;;1.6;HEALTH LEVEL SEVEN;**126**;Oct 13, 1995
  1. ;
  1. DOWORK(WORK) ;
  1. ;
  1. N CUTOFF,MSGIEN,QUIT
  1. S QUIT=0
  1. ;
  1. ;7 day wait for an application ack is more than reasonable
  1. S CUTOFF=$$FMADD^XLFDT($$NOW^XLFDT,-3)
  1. ;
  1. S MSGIEN=+$G(^HLTMP("LAST IEN CHECKED FOR MISSING APPLICATION ACK"))
  1. F S MSGIEN=$O(^HLB(MSGIEN)) Q:'MSGIEN Q:MSGIEN>99999999999 D Q:QUIT
  1. .N MSG,HDR
  1. .Q:'$$GETMSG^HLOMSG(MSGIEN,.MSG)
  1. .Q:'MSG("DT/TM")
  1. .Q:'MSG("BODY")
  1. .I MSG("DT/TM")>CUTOFF S:MSG("DT/TM CREATED")>CUTOFF QUIT=1,MSGIEN=MSGIEN-1 Q
  1. .Q:MSG("STATUS")'=""
  1. .Q:MSG("DIRECTION")'="OUT"
  1. .Q:MSG("BATCH")
  1. .Q:MSG("STATUS","APP ACK'D")
  1. .;Q:MSG("STATUS","APP ACK RESPONSE")=""
  1. .;message has been in a non-complete status for a longtime, pending an application ack - set status to error
  1. .S $P(^HLB(MSGIEN,0),"^",20)="AE"
  1. .S $P(^HLB(MSGIEN,0),"^",21)="MISSING APPLICATION ACKNOWLEDGMENT"
  1. .M HDR=MSG("HDR")
  1. .Q:'$$PARSEHDR^HLOPRS(.HDR)
  1. .S ^HLB("ERRORS","AE",$S($L(HDR("RECEIVING APPLICATION")):HDR("RECEIVING APPLICATION"),1:"UNKNOWN"),MSG("DT/TM CREATED"),MSGIEN)=""
  1. S:MSGIEN>99999999999 MSGIEN=0
  1. S ^HLTMP("LAST IEN CHECKED FOR MISSING APPLICATION ACK")=MSGIEN
  1. Q