APCDDIC ; IHS/CMI/LAB - FIND ENTRY IN FILE ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
;
;
FIND1(APCDFN,APCDVAL,APCDMODE,APCDDICS) ;PEP - RETURN IEN
N APCDVALI
S APCDVALI=""
I '$D(APCDMODE) S APCDMODE=""
D EN^XBNEW("DIC^APCDDIC","APCDFN;APCDVAL;APCDVALI;APCDMODE")
Q APCDVALI
;
DIC ;EP
N X S X=APCDVAL
I APCDMODE["I" S X="`"_X
S DIC=$$DIC^XBDIQ1(APCDFN)
Q:'$L(DIC)
S DIC(0)="XM"
I APCDMODE="I" S DIC(0)="XMI"
I $D(APCDDICS) S DIC("S")=APCDDICS
D ^DIC
S:+Y>0 APCDVALI=+Y
Q
APCDDIC ; IHS/CMI/LAB - FIND ENTRY IN FILE ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
+2 ;
+3 ;
FIND1(APCDFN,APCDVAL,APCDMODE,APCDDICS) ;PEP - RETURN IEN
+1 NEW APCDVALI
+2 SET APCDVALI=""
+3 IF '$DATA(APCDMODE)
SET APCDMODE=""
+4 DO EN^XBNEW("DIC^APCDDIC","APCDFN;APCDVAL;APCDVALI;APCDMODE")
+5 QUIT APCDVALI
+6 ;
DIC ;EP
+1 NEW X
SET X=APCDVAL
+2 IF APCDMODE["I"
SET X="`"_X
+3 SET DIC=$$DIC^XBDIQ1(APCDFN)
+4 IF '$LENGTH(DIC)
QUIT
+5 SET DIC(0)="XM"
+6 IF APCDMODE="I"
SET DIC(0)="XMI"
+7 IF $DATA(APCDDICS)
SET DIC("S")=APCDDICS
+8 DO ^DIC
+9 IF +Y>0
SET APCDVALI=+Y
+10 QUIT