Changeset 420 for ccr/trunk


Ignore:
Timestamp:
Mar 24, 2009, 7:53:12 PM (16 years ago)
Author:
George Lilly
Message:

added checksum processing

File:
1 edited

Legend:

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

    r404 r420  
    8686 ; AND @ZVALS@("M",SUBOCCUR,"VAR2")="VALUE2" FOR SUB VARIABLES
    8787 ;
    88  N ZSRC,PATN,ZTYPN,XD0,ZTYP
    89  S ZSRC=1 ; CCR SOURCE IS ASSUMED TO BE THIS EHR, WHICH IS ALWAYS SOURCE 1
     88 N PATN,ZTYPN,XD0,ZTYP
     89 I '$D(ZSRC) S ZSRC=1 ; CCR SOURCE IS ASSUMED, 1 IF NOT SET
    9090 ; PUT THIS IN PARAMETERS - SO SOURCE NUMBER FOR PROCESSING IN CONFIGURABLE
    9191 N C0CFPAT S C0CFPAT=171.101 ; FILE AT PATIENT LEVEL
     
    155155 Q
    156156 ;
     157CHECK ; CHECKSUM EXPERIMENTS
     158 ;
     159 ;B
     160 S ZG=$NA(^C0CE(DA(2),1,DA(1),1,DA))
     161 ;S G2=$NA(^C0CE(8,1,1,1,2,1,6))
     162 S X=$$CHKSUM^XUSESIG1(ZG)
     163 W G1,!
     164 Q
     165 ;
     166CHKELS(DFN) ; CHECKSUM ALL ELEMENTS FOR  A PATIENT
     167 ;
     168 S ZGLB=$NA(^TMP("C0CCHK"))
     169 S ZPAT=$O(^C0CE("B",DFN,""))
     170 K @ZGLB@(ZPAT) ; CLEAR PREVIOUS CHECKSUMS
     171 S ZSRC=""
     172 F  S ZSRC=$O(^C0CE(ZPAT,1,"B",ZSRC)) Q:ZSRC=""  D  ;
     173 . W "PAT:",ZPAT," SRC:",ZSRC,!
     174 . S ZEL=""
     175 . F  S ZEL=$O(^C0CE(ZPAT,1,ZSRC,1,"B",ZEL)) Q:ZEL=""  D  ;ELEMENTS
     176 . . W "ELEMENT:",ZEL," "
     177 . . S ZELE=$$GET1^DIQ(170.101,ZEL,.01,"E") ;ELEMENT NAME
     178 . . W ZELE," "
     179 . . S ZELI=$O(^C0CE(ZPAT,1,ZSRC,1,"B",ZEL,""))
     180 . . S ZG=$NA(^C0CE(ZPAT,1,ZSRC,1,ZELI))
     181 . . S ZCHK=$$CHKSUM^XUSESIG1(ZG) ; CHECKSUM FOR THE ELEMENT
     182 . . W ZCHK,!
     183 . . S @ZGLB@(ZPAT,ZELE,ZSRC)=ZCHK
     184 ZWR ^TMP("C0CCHK",ZPAT,*)
     185 Q
     186 ;
    157187PUTELSOLD(DFN,ZTYPE,ZOCC,ZVALS) ; PUT CCR VALUES INTO THE CCR ELEMENTS FILE
    158188 ; 171.101, ^C0CE  DFN IS THE PATIENT IEN PASSED BY VALUE
Note: See TracChangeset for help on using the changeset viewer.