Check for Merged or Test patients. New parameter CCRTEST=0 if not testing
This commit is contained in:
parent
65aacbe1f2
commit
4c3fba6fcd
21
p/CCRSYS.m
21
p/CCRSYS.m
|
@ -32,3 +32,24 @@ SYSNAME() ;Get EHR System Name; PUBLIC; Extrinsic
|
|||
SYSVER() ;Get EHR System Version; PUBLIC; Extrinsic
|
||||
Q "1.0"
|
||||
;
|
||||
PTST(DFN) ;TEST TO SEE IF PATIENT MERGED OR A TEST PATIENT
|
||||
; DFN = IEN of the Patient to be tested
|
||||
; 1 = Merged or Test Patient
|
||||
; 0 = Non-test Patient
|
||||
;
|
||||
I $D(^DPT(DFN,-9)) Q 1 ;This patient has been merged
|
||||
I $G(^DPT(DFN,0))="" Q 1 ;Missing zeroth node <---add
|
||||
;
|
||||
I '$D(CCRTEST) S CCRTEST=1 ; DEFAULT IS THAT WE ARE TESTING
|
||||
I 'CCRTEST D ; IF WE ARE NOT TESTING, SKIP TEST PATIENTS
|
||||
. N DIERR,DATA
|
||||
. S DATA=+$$GET1^DIQ(2,DFN_",",.6,"I") ;Test Patient Indicator
|
||||
. ; 1 = Test Patient
|
||||
. ; 0 = Non-test Patient
|
||||
. I DATA Q DATA
|
||||
. S DATA=$$GET1^DIQ(2,DFN_",",.09,"I") ;SSN test
|
||||
. D CLEAN^DILF
|
||||
. I $E(DATA,1,3)="000" Q 1
|
||||
. I $E(DATA,1,3)="666" Q 1
|
||||
Q 0
|
||||
;
|
Loading…
Reference in New Issue