source: FOIAVistA/trunk/r/CLINICAL_INFO_RESOURCE_NETWORK-MRF-RGE--RG--RGED--RGUT--RGWB/RGEQSTAT.m@ 1504

Last change on this file since 1504 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 851 bytes
Line 
1RGEQSTAT ;BHM/RGY-Statistics ;17-Feb-98
2 ;;1.0; CLINICAL INFO RESOURCE NETWORK ;;30 Apr 99
3ENT(TYPE) ;Get available entry
4 NEW DATE
5 I TYPE'?1N.N S TYPE=+$O(^RGEQASN("B",TYPE,0))
6 I '$D(^RGEQASN(TYPE,0)) Q 0
7 S DATE=$$NOW^XLFDT\1
8 I '$O(^RGSTAT(995.2,"AX",TYPE,DATE,0)) D ADD(TYPE,DATE)
9 Q $O(^RGSTAT(995.2,"AX",TYPE,DATE,0))
10 ;
11ADD(TYPE,DATE) ;Add statistics entry for type of event
12 NEW DIC,D0,DIE,DA,X,DLAYGO,DR,RGOK,EVN
13 I $G(TYPE)="" Q
14 I $G(DATE)="" Q
15 I TYPE'?1N.N S TYPE=$O(^RGEQASN("B",TYPE,0)) I TYPE="" G Q
16 F EVN=+$P(^RGSTAT(995.2,0),"^",3)+1:1 L +^RGSTAT(995.2,EVN):0 I $T S RGOK=0 D L -^RGSTAT(995.2,EVN) Q:RGOK
17 .I $D(^RGSTAT(995.2,EVN)) Q
18 .S DINUM=EVN,DIC="^RGSTAT(995.2,",DIC(0)="L",DLAYGO=995.2,X=EVN K DD,D0 D FILE^DICN K DIC,DLAYGO,D0
19 .S DIE="^RGSTAT(995.2,",DR="[RGEQ NEW STATISTIC]",DA=EVN D ^DIE
20 .S RGOK=1
21 .Q
22Q Q
Note: See TracBrowser for help on using the repository browser.