added checksum processing
This commit is contained in:
parent
2dccdced72
commit
2bf3550f5d
34
p/C0CFM2.m
34
p/C0CFM2.m
|
@ -85,8 +85,8 @@ PUTELS(DFN,ZTYPE,ZOCC,ZVALS) ; PUT CCR VALUES INTO THE CCR ELEMENTS FILE
|
||||||
; @ZVALS@("VAR1")="VALUE1" FOR ALL VARIABLES IN THIS ELEMENT
|
; @ZVALS@("VAR1")="VALUE1" FOR ALL VARIABLES IN THIS ELEMENT
|
||||||
; AND @ZVALS@("M",SUBOCCUR,"VAR2")="VALUE2" FOR SUB VARIABLES
|
; AND @ZVALS@("M",SUBOCCUR,"VAR2")="VALUE2" FOR SUB VARIABLES
|
||||||
;
|
;
|
||||||
N ZSRC,PATN,ZTYPN,XD0,ZTYP
|
N PATN,ZTYPN,XD0,ZTYP
|
||||||
S ZSRC=1 ; CCR SOURCE IS ASSUMED TO BE THIS EHR, WHICH IS ALWAYS SOURCE 1
|
I '$D(ZSRC) S ZSRC=1 ; CCR SOURCE IS ASSUMED, 1 IF NOT SET
|
||||||
; PUT THIS IN PARAMETERS - SO SOURCE NUMBER FOR PROCESSING IN CONFIGURABLE
|
; PUT THIS IN PARAMETERS - SO SOURCE NUMBER FOR PROCESSING IN CONFIGURABLE
|
||||||
N C0CFPAT S C0CFPAT=171.101 ; FILE AT PATIENT LEVEL
|
N C0CFPAT S C0CFPAT=171.101 ; FILE AT PATIENT LEVEL
|
||||||
N C0CFSRC S C0CFSRC=171.111 ; FILE AT CCR SOURCE LVL
|
N C0CFSRC S C0CFSRC=171.111 ; FILE AT CCR SOURCE LVL
|
||||||
|
@ -154,6 +154,36 @@ UPDIE ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS
|
||||||
K C0CFDA
|
K C0CFDA
|
||||||
Q
|
Q
|
||||||
;
|
;
|
||||||
|
CHECK ; CHECKSUM EXPERIMENTS
|
||||||
|
;
|
||||||
|
;B
|
||||||
|
S ZG=$NA(^C0CE(DA(2),1,DA(1),1,DA))
|
||||||
|
;S G2=$NA(^C0CE(8,1,1,1,2,1,6))
|
||||||
|
S X=$$CHKSUM^XUSESIG1(ZG)
|
||||||
|
W G1,!
|
||||||
|
Q
|
||||||
|
;
|
||||||
|
CHKELS(DFN) ; CHECKSUM ALL ELEMENTS FOR A PATIENT
|
||||||
|
;
|
||||||
|
S ZGLB=$NA(^TMP("C0CCHK"))
|
||||||
|
S ZPAT=$O(^C0CE("B",DFN,""))
|
||||||
|
K @ZGLB@(ZPAT) ; CLEAR PREVIOUS CHECKSUMS
|
||||||
|
S ZSRC=""
|
||||||
|
F S ZSRC=$O(^C0CE(ZPAT,1,"B",ZSRC)) Q:ZSRC="" D ;
|
||||||
|
. W "PAT:",ZPAT," SRC:",ZSRC,!
|
||||||
|
. S ZEL=""
|
||||||
|
. F S ZEL=$O(^C0CE(ZPAT,1,ZSRC,1,"B",ZEL)) Q:ZEL="" D ;ELEMENTS
|
||||||
|
. . W "ELEMENT:",ZEL," "
|
||||||
|
. . S ZELE=$$GET1^DIQ(170.101,ZEL,.01,"E") ;ELEMENT NAME
|
||||||
|
. . W ZELE," "
|
||||||
|
. . S ZELI=$O(^C0CE(ZPAT,1,ZSRC,1,"B",ZEL,""))
|
||||||
|
. . S ZG=$NA(^C0CE(ZPAT,1,ZSRC,1,ZELI))
|
||||||
|
. . S ZCHK=$$CHKSUM^XUSESIG1(ZG) ; CHECKSUM FOR THE ELEMENT
|
||||||
|
. . W ZCHK,!
|
||||||
|
. . S @ZGLB@(ZPAT,ZELE,ZSRC)=ZCHK
|
||||||
|
ZWR ^TMP("C0CCHK",ZPAT,*)
|
||||||
|
Q
|
||||||
|
;
|
||||||
PUTELSOLD(DFN,ZTYPE,ZOCC,ZVALS) ; PUT CCR VALUES INTO THE CCR ELEMENTS FILE
|
PUTELSOLD(DFN,ZTYPE,ZOCC,ZVALS) ; PUT CCR VALUES INTO THE CCR ELEMENTS FILE
|
||||||
; 171.101, ^C0CE DFN IS THE PATIENT IEN PASSED BY VALUE
|
; 171.101, ^C0CE DFN IS THE PATIENT IEN PASSED BY VALUE
|
||||||
; ZTYPE IS THE NODE TYPE IE RESULTS,PROBLEMS PASSED BY VALUE
|
; ZTYPE IS THE NODE TYPE IE RESULTS,PROBLEMS PASSED BY VALUE
|
||||||
|
|
Loading…
Reference in New Issue