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

BEHOCMAL.m

Go to the documentation of this file.
  1. BEHOCMAL ;IHS/MSC/IND/PLS - Community Alert;21-Apr-2010 21:22;PLS
  1. ;;1.1;BEH COMPONENTS;**050001;Mar 20, 2007
  1. ;=================================================================
  1. D REGPROT^CIAURPC("CIAV SUBSCRIBE EVENT","BEH COMMUNITY ALERT")
  1. I $$REGRPC^CIAURPC("BQI GET COMM ALERTS SPLASH","CIAV VUECENTRIC")
  1. Q
  1. ; Fire community event if needed
  1. COMALRT ; EP
  1. I $G(TYPE)="SUBSCRIBE.COMMUNITY" D
  1. .D:$$CHK() QUEUE^CIANBEVT("COMMUNITY","")
  1. Q
  1. ; Check the number of LOGIN events for the user for the current day
  1. ; Returns 0 or 1
  1. ; 0 = no fire of community event
  1. ; 1 = fire community event
  1. CHK() ;EP
  1. N LP,NODE,RES
  1. S RES=0
  1. S LP=0 F S LP=$O(^CIANB(19941.23,"D",DUZ,LP)) Q:'LP D
  1. .S NODE=^CIANB(19941.23,LP,0)
  1. .Q:NODE'["LOGIN"
  1. .S RES=RES+($P($P(NODE,U),".")=$$DT^XLFDT())
  1. Q RES<2