ECXLBB1 ;ALB/JRC - DSS VBECS EXTRACT ;7/3/18 15:06
;;3.0;DSS EXTRACTS;**105,102,120,127,144,156,161,170,184**;Dec 22, 1997;Build 124
;Per VA Directive 6402, this routine should not be modified. Medical Device # BK970021
; access to the VBECS EXTRACT file (#6002.03) is supported by
; controlled subscription to IA #4953 (global root ^VBECS(6002.03)
BEG ;entry point from option
D SETUP I ECFILE="" Q
D ^ECXTRAC,^ECXKILL
Q
;
START ; Entry point from tasked job
; begin package specific extract
N ECTRSP,ECADMT,ECTODT,ECENCTR,ECPAT,ECLRDFN,ECXPHY,ECXPHYPC
N ECD,ECXDFN,ECARRY,EC66,ECERR,ECTRFDT,ECTRFTM,ECX,ECINOUT,ECXINST
N ECPHYNPI,ECREQNPI,ECXPATCAT,ECXESC ;144
;variables ECFILE,EC23,ECXYM,ECINST,ECSD,ECSD1,ECED passed in
; by taskmanager
; ECED defined in ^ECXTRAC - end date of the extract
; TRANSFUSION DATE should be within start and end dates
; ECED and ECSD input provided by the user interface
; and ECSD1 = ECSD-.1
; Read through the VBECS DSS EXTRACT file (6002.03)
I $D(ZTQUEUED),$$S^%ZTLOAD S QFLG=1 Q ;quit if tasked and user sends stop request (QFLG assigned in ECXTRAC)
;
AUDRPT ; entry point for pre-extract audit report
N RECORD
S RECORD=0,ECD=ECSD-.1,ECTODT=ECED+.9
F S ECD=$O(^VBEC(6002.03,"C",ECD)) Q:'ECD!(ECD>ECTODT) S RECORD=0 F S RECORD=$O(^VBEC(6002.03,"C",ECD,RECORD)) Q:RECORD'>0 S EC0=^VBEC(6002.03,RECORD,0) D
.; ECARRY(1)=TRANSFUSION DATE AND TIME, ECARRY(3)=COMPONENT
.; ECARRY(4)=COMPONENT ABBREVIATION, ECARRY(5)=UNITS POOLED
.; ECARRY(6)=TRANSFUSION REACTION,ECARRY(7)=VOLUME TRANSFUSED
.; ECARRY(8)=TRANSFUSION REACTION TYPE, ECARRY(9)=REQUESTING PROVIDER
.; ECARRY(10)=REQUEST. PROV. PERSON CLASS, ECARRY(11)=UNIT MODIFIED
.; ECARRY(12)=UNIT MODIFICATION, ECARRY(13)=PRODUCTION DIVISION CODE
.;
. S ECXDFN=$P(EC0,U,2),ECERR=$$PAT(ECXDFN) Q:ECERR
. S ECARRY(1)=$P(EC0,U,10),ECARRY(3)=$P(EC0,U,7),ECARRY(4)=$P(EC0,U,8),ECARRY(5)=$S(+$P(EC0,U,9)=0:1,1:+$P(EC0,U,9)),ECARRY(6)=$S($P(EC0,U,15):"Y",1:"N"),ECARRY(7)=$P(EC0,"^",12),ECARRY(8)=$P(EC0,U,13)
. S ECARRY(9)=$P(EC0,U,6),ECINST=$P(EC0,U,3),ECARRY(12)=$P(EC0,U,14),ECARRY(11)=$S(ECARRY(12)'="":"Y",1:"N"),ECARRY(13)=$P(EC0,U,4)
. ;get requesting and ordering providers and their person class
. S ECXPHY=$P(EC0,U,5),(ECXPHYPC,ECARRY(10),ECPHYNPI,ECREQNPI)=""
. I ECXPHY]"" S ECXPHY=$O(^VA(200,"B",ECXPHY,0))
. I ECXPHY>0 D
.. N PERCLS S PERCLS=$$GET^XUA4A72(ECXPHY,ECD)
.. I +PERCLS>0 S ECXPHYPC=$P(PERCLS,U,7)
.. S ECPHYNPI=$$NPI^XUSNPI("Individual_ID",ECXPHY,ECD)
.. S:+ECPHYNPI'>0 ECPHYNPI="" S ECPHYNPI=$P(ECPHYNPI,U)
.. S ECXPHY=2_ECXPHY
. I ECARRY(9)>0 D
.. N PERCLS S PERCLS=$$GET^XUA4A72(ECARRY(9),ECD)
.. I +PERCLS>0 S ECARRY(10)=$P(PERCLS,U,7)
.. S ECREQNPI=$$NPI^XUSNPI("Individual_ID",ECARRY(9),ECD)
.. S:+ECREQNPI'>0 ECREQNPI="" S ECREQNPI=$P(ECREQNPI,U)
.. S ECARRY(9)=2_ECARRY(9)
. D GETDATA
. K ECARRY
Q
;
GETDATA ; gather rest of extract data that will be recorded in an
; entry in file 727.829
N ECXSTR,ECXASIH ;170
N ECXNMPI,ECXCERN,ECXSIGI ;184 - fields added
S ECTRFDT=$$ECXDOB^ECXUTL(ECARRY(1)),ECTRFTM=$$ECXTIME^ECXUTL(ECARRY(1))
S ECX=$$INP^ECXUTL2(ECXDFN,ECARRY(1)),ECINOUT=$P(ECX,U),ECTRSP=$P(ECX,U,3),ECADMT=$P(ECX,U,4),ECXASIH=$P(ECX,U,14) ;170
;
;- Observation patient indicator (YES/NO)
S ECXOBS=$$OBSPAT^ECXUTL4(ECINOUT,ECTRSP)
;- If no encounter number don't file record
S ECENCTR=$$ENCNUM^ECXUTL4(ECINOUT,ECPAT("SSN"),ECADMT,ECARRY(1),ECTRSP,ECXOBS,ECHEAD,,) ; [FLD #6]
Q:ECENCTR=""
;get emergency response indicator (FEMA)
S ECXERI=$G(ECPAT("ERI"))
;184 - Get New MPI and Self Identified Gender
S ECXNMPI=ECPAT("MPI")
S ECXSIGI=ECPAT("SIGI")
;
; ******* - PATCH 127, ADD PATCAT CODE ********
S ECXPATCAT=$$PATCAT^ECXUTL(ECXDFN)
S ECXESC="" ;144
I $G(ECXASIH) S ECINOUT="A" ;170
S ECXSTR=$G(EC23)_"^"_ECINST_"^"_ECXDFN_"^"_ECPAT("SSN")_"^"_ECPAT("NAME")_"^"_ECINOUT_"^"_ECENCTR_"^"_ECTRFDT_"^"_ECTRFTM_"^"_ECARRY(3)_"^"_ECARRY(4)_"^"_ECARRY(5)_"^"_ECARRY(7)_"^"_ECARRY(6)_"^"_ECARRY(8)_"^BB"_ECARRY(13)_"^^"
I $G(ECXLOGIC)>2005 S ECXSTR=ECXSTR_U_ECXPHY_U_ECXPHYPC
I $G(ECXLOGIC)>2006 D
.S ECXSTR=ECXSTR_U_ECXERI_U_ECARRY(11)_U_ECARRY(12)_U_ECARRY(9)_U_ECARRY(10)_U_ECARRY(13)_U
I $G(ECXLOGIC)>2022 S ECXSTR=ECXSTR_ECPAT("SIGI") ;184
I '$D(ECXRPT) D FILE(ECXSTR) Q
S ^TMP("ECXLBB",$J,ECXDFN,ECD,RECORD)=ECXSTR ;temporary global array,156-added additional subscript
I $D(ECXCRPT) D
. N ECCOUNT S ECCOUNT=0
. F S ECCOUNT=ECCOUNT+1 Q:'$D(^TMP("ECXLBBC",$J,$S($G(ECXCFLG)=1:ECARRY(4),1:"ZZNOZZ"),ECXDFN,ECTRFDT_"."_ECTRFTM_"."_ECCOUNT,"S"))
. S ^TMP("ECXLBBC",$J,$S($G(ECXCFLG)=1:ECARRY(4),1:"ZZNOZZ"),ECXDFN,ECTRFDT_"."_ECTRFTM_"."_ECCOUNT,"S")=ECXSTR
; used in ECXPLBB/ECXLBBC (pre-extract audit report)
Q
;
PAT(ECXDFN) ;get/set patient data
; INPUT - ECXDFN = patient ien (DFN)
; OUTPUT - ECPAT array:
; ECPAT("SSN")
; ECPAT("NAME")
; returns 0 or 1 in ECXERR - 0=successful
; 1=error condition
N X,OK,ECXERR
;get data
S ECXERR=0
K ECXPAT S OK=$$PAT^ECXUTL3(ECXDFN,"","1;3",.ECPAT)
I 'OK S ECXERR=1
Q ECXERR
;
FILE(ECODE) ;
; Input - ECODE = extract record
;
; record the extract record at a global node in file 727.829
; sequence #^year/month of extract^extract #^facility^patient dfn^SSN^
; name^i/o pt indicator^encounter #^date of transfusion^time of
; transfusion^component^component abbrev^# of units^volume in mm^
; reaction^reaction type^feeder location^placeholder^DSS IP #
; ordering physician^ordering physician pc^emergency response indicator
; (FEMA)^unit modified^unit modification^requesting provider^request.
; provider person class^ordering provider npi ECPHYNPI
;ECODE1- requesting provider npi ECREQNPI^PATCAT^Encounter SC ECXESC
;ECODE2 - Cerner Data
;ECODE3 - New MPI (ECXNMPI)^Self Identified Gender (ECXSIGI)
N DA,DIK,EC7
S EC7=$O(^ECX(ECFILE,999999999),-1),EC7=EC7+1
S ECODE=EC7_"^"_ECODE
I ECXLOGIC>2007 D
.S ECODE=ECODE_ECPHYNPI_U
.S ECODE1=$G(ECREQNPI)
.I ECXLOGIC>2010 S ECODE1=ECODE1_U_ECXPATCAT
I ECXLOGIC>2013 S ECODE1=ECODE1_U_ECXESC_U ;144 ,184 - Added "^"
I ECXLOGIC>2022 S ECODE2=$G(ECXCERN)_U,ECODE3=ECXNMPI_U_ECXSIGI ;184
S ^ECX(ECFILE,EC7,0)=ECODE,^ECX(ECFILE,EC7,1)=$G(ECODE1) ; 184 Moved record count to below
S ^ECX(ECFILE,EC7,2)=$G(ECODE2),^ECX(ECFILE,EC7,3)=$G(ECODE3) ;184
S ECRN=ECRN+1 ;184 Moved from above
S DA=EC7,DIK="^ECX("_ECFILE_"," D IX1^DIK K DIK,DA
Q
;
SETUP ;Set required input for ECXTRAC.
S ECHEAD="LBB"
D ECXDEF^ECXUTL2(ECHEAD,.ECPACK,.ECGRP,.ECFILE,.ECRTN,.ECPIECE,.ECVER)
Q
;
LOCAL ; to extract nightly for local use not to be transmitted to TSI
; should be queued with a 1D frequency
D SETUP,^ECXTLOCL,^ECXKILL Q
;
CHKMOD(MD) ;check if modifier is contained in string
N RES,MODX
I MD="" Q ""
S (RES,MODX)="" F S MODX=$O(MODARY(MODX)) Q:MODX="" D I RES'="" Q
.I MD[MODX S RES=MODARY(MODX)
Q RES
;
QUE ; entry point for the background requeuing handled by ECXTAUTO
D SETUP,QUE^ECXTAUTO,^ECXKILL
Q
;
;ECXLBB
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECXLBB1 7157 printed Oct 16, 2024@17:53:43 Page 2
ECXLBB1 ;ALB/JRC - DSS VBECS EXTRACT ;7/3/18 15:06
+1 ;;3.0;DSS EXTRACTS;**105,102,120,127,144,156,161,170,184**;Dec 22, 1997;Build 124
+2 ;Per VA Directive 6402, this routine should not be modified. Medical Device # BK970021
+3 ; access to the VBECS EXTRACT file (#6002.03) is supported by
+4 ; controlled subscription to IA #4953 (global root ^VBECS(6002.03)
BEG ;entry point from option
+1 DO SETUP
IF ECFILE=""
QUIT
+2 DO ^ECXTRAC
DO ^ECXKILL
+3 QUIT
+4 ;
START ; Entry point from tasked job
+1 ; begin package specific extract
+2 NEW ECTRSP,ECADMT,ECTODT,ECENCTR,ECPAT,ECLRDFN,ECXPHY,ECXPHYPC
+3 NEW ECD,ECXDFN,ECARRY,EC66,ECERR,ECTRFDT,ECTRFTM,ECX,ECINOUT,ECXINST
+4 ;144
NEW ECPHYNPI,ECREQNPI,ECXPATCAT,ECXESC
+5 ;variables ECFILE,EC23,ECXYM,ECINST,ECSD,ECSD1,ECED passed in
+6 ; by taskmanager
+7 ; ECED defined in ^ECXTRAC - end date of the extract
+8 ; TRANSFUSION DATE should be within start and end dates
+9 ; ECED and ECSD input provided by the user interface
+10 ; and ECSD1 = ECSD-.1
+11 ; Read through the VBECS DSS EXTRACT file (6002.03)
+12 ;quit if tasked and user sends stop request (QFLG assigned in ECXTRAC)
IF $DATA(ZTQUEUED)
IF $$S^%ZTLOAD
SET QFLG=1
QUIT
+13 ;
AUDRPT ; entry point for pre-extract audit report
+1 NEW RECORD
+2 SET RECORD=0
SET ECD=ECSD-.1
SET ECTODT=ECED+.9
+3 FOR
SET ECD=$ORDER(^VBEC(6002.03,"C",ECD))
if 'ECD!(ECD>ECTODT)
QUIT
SET RECORD=0
FOR
SET RECORD=$ORDER(^VBEC(6002.03,"C",ECD,RECORD))
if RECORD'>0
QUIT
SET EC0=^VBEC(6002.03,RECORD,0)
Begin DoDot:1
+4 ; ECARRY(1)=TRANSFUSION DATE AND TIME, ECARRY(3)=COMPONENT
+5 ; ECARRY(4)=COMPONENT ABBREVIATION, ECARRY(5)=UNITS POOLED
+6 ; ECARRY(6)=TRANSFUSION REACTION,ECARRY(7)=VOLUME TRANSFUSED
+7 ; ECARRY(8)=TRANSFUSION REACTION TYPE, ECARRY(9)=REQUESTING PROVIDER
+8 ; ECARRY(10)=REQUEST. PROV. PERSON CLASS, ECARRY(11)=UNIT MODIFIED
+9 ; ECARRY(12)=UNIT MODIFICATION, ECARRY(13)=PRODUCTION DIVISION CODE
+10 ;
+11 SET ECXDFN=$PIECE(EC0,U,2)
SET ECERR=$$PAT(ECXDFN)
if ECERR
QUIT
+12 SET ECARRY(1)=$PIECE(EC0,U,10)
SET ECARRY(3)=$PIECE(EC0,U,7)
SET ECARRY(4)=$PIECE(EC0,U,8)
SET ECARRY(5)=$SELECT(+$PIECE(EC0,U,9)=0:1,1:+$PIECE(EC0,U,9))
SET ECARRY(6)=$SELECT($PIECE(EC0,U,15):"Y",1:"N")
SET ECARRY(7)=$PIECE(EC0,"^",12)
SET ECARRY(8)=$PIECE(EC0,U,13)
+13 SET ECARRY(9)=$PIECE(EC0,U,6)
SET ECINST=$PIECE(EC0,U,3)
SET ECARRY(12)=$PIECE(EC0,U,14)
SET ECARRY(11)=$SELECT(ECARRY(12)'="":"Y",1:"N")
SET ECARRY(13)=$PIECE(EC0,U,4)
+14 ;get requesting and ordering providers and their person class
+15 SET ECXPHY=$PIECE(EC0,U,5)
SET (ECXPHYPC,ECARRY(10),ECPHYNPI,ECREQNPI)=""
+16 IF ECXPHY]""
SET ECXPHY=$ORDER(^VA(200,"B",ECXPHY,0))
+17 IF ECXPHY>0
Begin DoDot:2
+18 NEW PERCLS
SET PERCLS=$$GET^XUA4A72(ECXPHY,ECD)
+19 IF +PERCLS>0
SET ECXPHYPC=$PIECE(PERCLS,U,7)
+20 SET ECPHYNPI=$$NPI^XUSNPI("Individual_ID",ECXPHY,ECD)
+21 if +ECPHYNPI'>0
SET ECPHYNPI=""
SET ECPHYNPI=$PIECE(ECPHYNPI,U)
+22 SET ECXPHY=2_ECXPHY
End DoDot:2
+23 IF ECARRY(9)>0
Begin DoDot:2
+24 NEW PERCLS
SET PERCLS=$$GET^XUA4A72(ECARRY(9),ECD)
+25 IF +PERCLS>0
SET ECARRY(10)=$PIECE(PERCLS,U,7)
+26 SET ECREQNPI=$$NPI^XUSNPI("Individual_ID",ECARRY(9),ECD)
+27 if +ECREQNPI'>0
SET ECREQNPI=""
SET ECREQNPI=$PIECE(ECREQNPI,U)
+28 SET ECARRY(9)=2_ECARRY(9)
End DoDot:2
+29 DO GETDATA
+30 KILL ECARRY
End DoDot:1
+31 QUIT
+32 ;
GETDATA ; gather rest of extract data that will be recorded in an
+1 ; entry in file 727.829
+2 ;170
NEW ECXSTR,ECXASIH
+3 ;184 - fields added
NEW ECXNMPI,ECXCERN,ECXSIGI
+4 SET ECTRFDT=$$ECXDOB^ECXUTL(ECARRY(1))
SET ECTRFTM=$$ECXTIME^ECXUTL(ECARRY(1))
+5 ;170
SET ECX=$$INP^ECXUTL2(ECXDFN,ECARRY(1))
SET ECINOUT=$PIECE(ECX,U)
SET ECTRSP=$PIECE(ECX,U,3)
SET ECADMT=$PIECE(ECX,U,4)
SET ECXASIH=$PIECE(ECX,U,14)
+6 ;
+7 ;- Observation patient indicator (YES/NO)
+8 SET ECXOBS=$$OBSPAT^ECXUTL4(ECINOUT,ECTRSP)
+9 ;- If no encounter number don't file record
+10 ; [FLD #6]
SET ECENCTR=$$ENCNUM^ECXUTL4(ECINOUT,ECPAT("SSN"),ECADMT,ECARRY(1),ECTRSP,ECXOBS,ECHEAD,,)
+11 if ECENCTR=""
QUIT
+12 ;get emergency response indicator (FEMA)
+13 SET ECXERI=$GET(ECPAT("ERI"))
+14 ;184 - Get New MPI and Self Identified Gender
+15 SET ECXNMPI=ECPAT("MPI")
+16 SET ECXSIGI=ECPAT("SIGI")
+17 ;
+18 ; ******* - PATCH 127, ADD PATCAT CODE ********
+19 SET ECXPATCAT=$$PATCAT^ECXUTL(ECXDFN)
+20 ;144
SET ECXESC=""
+21 ;170
IF $GET(ECXASIH)
SET ECINOUT="A"
+22 SET ECXSTR=$GET(EC23)_"^"_ECINST_"^"_ECXDFN_"^"_ECPAT("SSN")_"^"_ECPAT("NAME")_"^"_ECINOUT_"^"_ECENCTR_"^"_ECTRFDT_"^"_ECTRFTM_"^"_ECARRY(3)_"^"_ECARRY(4)_"^"_ECARRY(5)_"^"_ECARRY(7)_"^"_ECARRY(6)_"^"_ECARRY(8)_"^BB"_ECARRY(13)_"^^"
+23 IF $GET(ECXLOGIC)>2005
SET ECXSTR=ECXSTR_U_ECXPHY_U_ECXPHYPC
+24 IF $GET(ECXLOGIC)>2006
Begin DoDot:1
+25 SET ECXSTR=ECXSTR_U_ECXERI_U_ECARRY(11)_U_ECARRY(12)_U_ECARRY(9)_U_ECARRY(10)_U_ECARRY(13)_U
End DoDot:1
+26 ;184
IF $GET(ECXLOGIC)>2022
SET ECXSTR=ECXSTR_ECPAT("SIGI")
+27 IF '$DATA(ECXRPT)
DO FILE(ECXSTR)
QUIT
+28 ;temporary global array,156-added additional subscript
SET ^TMP("ECXLBB",$JOB,ECXDFN,ECD,RECORD)=ECXSTR
+29 IF $DATA(ECXCRPT)
Begin DoDot:1
+30 NEW ECCOUNT
SET ECCOUNT=0
+31 FOR
SET ECCOUNT=ECCOUNT+1
if '$DATA(^TMP("ECXLBBC",$JOB,$SELECT($GET(ECXCFLG)=1
QUIT
+32 SET ^TMP("ECXLBBC",$JOB,$SELECT($GET(ECXCFLG)=1:ECARRY(4),1:"ZZNOZZ"),ECXDFN,ECTRFDT_"."_ECTRFTM_"."_ECCOUNT,"S")=ECXSTR
End DoDot:1
+33 ; used in ECXPLBB/ECXLBBC (pre-extract audit report)
+34 QUIT
+35 ;
PAT(ECXDFN) ;get/set patient data
+1 ; INPUT - ECXDFN = patient ien (DFN)
+2 ; OUTPUT - ECPAT array:
+3 ; ECPAT("SSN")
+4 ; ECPAT("NAME")
+5 ; returns 0 or 1 in ECXERR - 0=successful
+6 ; 1=error condition
+7 NEW X,OK,ECXERR
+8 ;get data
+9 SET ECXERR=0
+10 KILL ECXPAT
SET OK=$$PAT^ECXUTL3(ECXDFN,"","1;3",.ECPAT)
+11 IF 'OK
SET ECXERR=1
+12 QUIT ECXERR
+13 ;
FILE(ECODE) ;
+1 ; Input - ECODE = extract record
+2 ;
+3 ; record the extract record at a global node in file 727.829
+4 ; sequence #^year/month of extract^extract #^facility^patient dfn^SSN^
+5 ; name^i/o pt indicator^encounter #^date of transfusion^time of
+6 ; transfusion^component^component abbrev^# of units^volume in mm^
+7 ; reaction^reaction type^feeder location^placeholder^DSS IP #
+8 ; ordering physician^ordering physician pc^emergency response indicator
+9 ; (FEMA)^unit modified^unit modification^requesting provider^request.
+10 ; provider person class^ordering provider npi ECPHYNPI
+11 ;ECODE1- requesting provider npi ECREQNPI^PATCAT^Encounter SC ECXESC
+12 ;ECODE2 - Cerner Data
+13 ;ECODE3 - New MPI (ECXNMPI)^Self Identified Gender (ECXSIGI)
+14 NEW DA,DIK,EC7
+15 SET EC7=$ORDER(^ECX(ECFILE,999999999),-1)
SET EC7=EC7+1
+16 SET ECODE=EC7_"^"_ECODE
+17 IF ECXLOGIC>2007
Begin DoDot:1
+18 SET ECODE=ECODE_ECPHYNPI_U
+19 SET ECODE1=$GET(ECREQNPI)
+20 IF ECXLOGIC>2010
SET ECODE1=ECODE1_U_ECXPATCAT
End DoDot:1
+21 ;144 ,184 - Added "^"
IF ECXLOGIC>2013
SET ECODE1=ECODE1_U_ECXESC_U
+22 ;184
IF ECXLOGIC>2022
SET ECODE2=$GET(ECXCERN)_U
SET ECODE3=ECXNMPI_U_ECXSIGI
+23 ; 184 Moved record count to below
SET ^ECX(ECFILE,EC7,0)=ECODE
SET ^ECX(ECFILE,EC7,1)=$GET(ECODE1)
+24 ;184
SET ^ECX(ECFILE,EC7,2)=$GET(ECODE2)
SET ^ECX(ECFILE,EC7,3)=$GET(ECODE3)
+25 ;184 Moved from above
SET ECRN=ECRN+1
+26 SET DA=EC7
SET DIK="^ECX("_ECFILE_","
DO IX1^DIK
KILL DIK,DA
+27 QUIT
+28 ;
SETUP ;Set required input for ECXTRAC.
+1 SET ECHEAD="LBB"
+2 DO ECXDEF^ECXUTL2(ECHEAD,.ECPACK,.ECGRP,.ECFILE,.ECRTN,.ECPIECE,.ECVER)
+3 QUIT
+4 ;
LOCAL ; to extract nightly for local use not to be transmitted to TSI
+1 ; should be queued with a 1D frequency
+2 DO SETUP
DO ^ECXTLOCL
DO ^ECXKILL
QUIT
+3 ;
CHKMOD(MD) ;check if modifier is contained in string
+1 NEW RES,MODX
+2 IF MD=""
QUIT ""
+3 SET (RES,MODX)=""
FOR
SET MODX=$ORDER(MODARY(MODX))
if MODX=""
QUIT
Begin DoDot:1
+4 IF MD[MODX
SET RES=MODARY(MODX)
End DoDot:1
IF RES'=""
QUIT
+5 QUIT RES
+6 ;
QUE ; entry point for the background requeuing handled by ECXTAUTO
+1 DO SETUP
DO QUE^ECXTAUTO
DO ^ECXKILL
+2 QUIT
+3 ;
+4 ;ECXLBB