diff --git a/p/C0CCPT.m b/p/C0CCPT.m index 944ef96..efd72d8 100644 --- a/p/C0CCPT.m +++ b/p/C0CCPT.m @@ -88,7 +88,7 @@ VISIT ;GET VISIT INFO FOR A GIVEN NOTE. BUILD INTO RETURN ARRAY .VISIT Q GETNOTE(IEN) ;GET THE TEXT THAT GOES WITH VISIT ;EXTRACT NOTE TEXT FROM ^TIU(8925,IEN,"TEXT" - Q:'$D(VISIT(IEN,"CPT")) + ;Q:'$D(VISIT(IEN,"CPT")) S TXTCNT=0 F S TXTCNT=TXTCNT+1 Q:'$D(^TIU(8925,IEN,"TEXT",TXTCNT,0)) D . S VISIT(IEN,"TEXT",TXTCNT)=^TIU(8925,IEN,"TEXT",TXTCNT,0) diff --git a/p/C0CPROC.m b/p/C0CPROC.m index 911642a..fedde6d 100644 --- a/p/C0CPROC.m +++ b/p/C0CPROC.m @@ -94,8 +94,11 @@ DATE(ISTR) ; EXTRINSIC TO RETURN THE DATE IN CCR FORMAT CPT(ISTR) ; EXTRINSIC THAT SEARCHES FOR CPT CODES AND RETURNS ; CPT^CATEGORY^TEXT N Z1,Z2,Z3,ZRTN - I $P(ISTR,U,1)'="" D ; IF THERE IS A CPT CODE IN THERE - . S Z1=$P(ISTR,U,1) + S Z1=$P(ISTR,U,1) + I Z1="" D ; + . I ISTR["(CPT-4 " S Z1=$P($P(ISTR,"(CPT-4 ",2),")",1) + I Z1'="" D ; IF THERE IS A CPT CODE IN THERE + . ;S Z1=$P(ISTR,U,1) . S Z2=$P(ISTR,U,2) . S Z3=$P(ISTR,U,3) . S ZRTN=Z1_U_Z2_U_Z3