Changeset 429 for ccr/trunk/p/C0CRIMA.m


Ignore:
Timestamp:
Mar 31, 2009, 8:23:06 PM (16 years ago)
Author:
George Lilly
Message:

CHECKSUM processing in ANALYZEC0CRIMA

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/C0CRIMA.m

    r413 r429  
    7575    . . W "FOUND RESULTS VARS",!
    7676    . . M @RIMBASE@("VARS",RIMDFN,"RESULTS")=^TMP("C0CCCR",$J,"RESULTS")
     77    . I $$CHKSUM(RIMDFN) D  ; CHECKSUM HAS CHANGED
     78    . . W "CHECKSUM IS NEW OR HAS CHANGED",!
     79    . . ZWR ^TMP("C0CRIM","CHKSUM",RIMDFN,*)
    7780    . K ^TMP("C0CCCR",$J) ; KILL WORK AREA FOR CCR BUILDING
    7881    . ;
     
    199202    Q
    200203    ;
     204CHKSUM(CKDFN) ; DOES A CHECKSUM AND STORES IT IN MUMPS GLOBALS
     205 ;
     206 S C0CCKB=$NA(^TMP("C0CRIM","CHKSUM")) ;CHECKSUM BASE
     207 S C0CGLB=$NA(^TMP("C0CRIM","VARS")) ;CCR VARIABLE BASE
     208 S C0CI=""
     209 F  S C0CI=$O(@C0CGLB@(CKDFN,C0CI)) Q:C0CI=""  D  ;FOR EACH DOMAIN
     210 . ;W "DFN:",DFN," DOMAIN:",C0CI,!
     211 . S C0CJ=$NA(@C0CGLB@(CKDFN,C0CI))
     212 . I C0CI="HEADER" D  ; HAVE TO TAKE OUT THE "DATE GENERATED"
     213 . . S C0CDT=@C0CGLB@(CKDFN,C0CI,1,"DATETIME")
     214 . . K @C0CGLB@(CKDFN,C0CI,1,"DATETIME")
     215 . S C0CCK(C0CI)=$$CHKSUM^XUSESIG1(C0CJ)
     216 . I C0CI="HEADER" D  ; PUT IT BACK
     217 . . S @C0CGLB@(CKDFN,C0CI,1,"DATETIME")=C0CDT
     218 S C0CK="C0CCK" ;
     219 S C0CALL=$$CHKSUM^XUSESIG1(C0CK) ;CHECKSUM OF ALL DOMAIN CHECKSUMS
     220 S CHKR=0 ; RESULT DEFAULT
     221 I $D(^TMP("C0CRIM","CHKSUM",CKDFN,"ALL")) D  ; OLD CHECKSUM EXISTS
     222 . I @C0CCKB@(CKDFN,"ALL")'=C0CALL S CHKR=1
     223 E  S CHKR=1 ;CHECKSUM IS NEW
     224 S @C0CCKB@(CKDFN,"ALL")=C0CALL
     225 M @C0CCKB@(CKDFN,"DOMAIN")=C0CCK
     226 ZWR ^TMP("C0CRIM","CHKSUM",CKDFN,*)
     227 Q CHKR
     228 ;
    201229CCOUNT ; RECOUNT THE CATEGORIES.. USE IN CASE OF RESTART OF ANALYZE
    202230    ;
Note: See TracChangeset for help on using the changeset viewer.