PXRMINDX ;SLC/PKR - Routines for utilizing the index. ;10-Jun-2015 12:10;du
;;2.0;CLINICAL REMINDERS;**4,6,1001,12,17,18,26,1005**;Feb 04, 2005;Build 23
;Code for patient findings.
;================================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;General finding evaluator.
N BDT,EDT,FIEVT,FILENUM,FINDING,FINDPA,ITEM,NOINDEX
S FILENUM=$$GETFNUM^PXRMDATA(ENODE)
I $G(^PXRMINDX(FILENUM,"DATE BUILT"))="" D
. D NOINDEX^PXRMERRH("D",PXRMITEM,FILENUM)
. S NOINDEX=1
E S NOINDEX=0
S ITEM=""
F S ITEM=$O(DEFARR("E",ENODE,ITEM)) Q:ITEM="" D
. S FINDING=""
. F S FINDING=$O(DEFARR("E",ENODE,ITEM,FINDING)) Q:+FINDING=0 D
.. I NOINDEX S FIEVAL(FINDING)=0 Q
.. K FINDPA
.. M FINDPA=DEFARR(20,FINDING)
.. K FIEVT
.. D FIEVAL(FILENUM,"PI",DFN,ITEM,.FINDPA,.FIEVT)
.. M FIEVAL(FINDING)=FIEVT
.. S FIEVAL(FINDING,"FINDING")=$P(FINDPA(0),U,1)
Q
;
;================================================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;General term
;evaluator.
N FIEVT,FILENUM,ITEM,NOINDEX,PFINDPA
N TFINDING,TFINDPA
S FILENUM=$$GETFNUM^PXRMDATA(ENODE)
I $G(^PXRMINDX(FILENUM,"DATE BUILT"))="" D
. D NOINDEX^PXRMERRH("TR",TERMARR("IEN"),FILENUM)
. S NOINDEX=1
E S NOINDEX=0
S ITEM=""
F S ITEM=$O(TERMARR("E",ENODE,ITEM)) Q:ITEM="" D
. S TFINDING=""
. F S TFINDING=$O(TERMARR("E",ENODE,ITEM,TFINDING)) Q:+TFINDING=0 D
.. I NOINDEX S TFIEVAL(TFINDING)=0 Q
.. K FIEVT,PFINDPA,TFINDPA
.. M TFINDPA=TERMARR(20,TFINDING)
..;Set the finding parameters.
.. D SPFINDPA^PXRMTERM(.FINDPA,.TFINDPA,.PFINDPA)
.. D FIEVAL(FILENUM,"PI",DFN,ITEM,.PFINDPA,.FIEVT)
.. M TFIEVAL(TFINDING)=FIEVT
.. S TFIEVAL(TFINDING,"FINDING")=$P(TFINDPA(0),U,1)
Q
;
;================================================================
FIEVAL(FILENUM,SNODE,DFN,ITEM,PFINDPA,FIEVAL) ;
;Evaluate regular patient findings.
N BDT,CASESEN,COND,CONVAL,DAS,DATE,EDT,FIEVD,FLIST,ICOND,IEN,IND,INVFD
N NFOUND,NGET,NOCC,NP
N SAVE,SDIR,SSFIND,STATOK,STATUSA,UCIFS,USESTRT,VSLIST
;Set the finding search parameters.
D SSPAR^PXRMUTIL(PFINDPA(0),.NOCC,.BDT,.EDT)
I $G(PXRMDEBG) S FIEVAL("BDTE")=BDT,FIEVAL("EDTE")=EDT
D SCPAR^PXRMCOND(.PFINDPA,.CASESEN,.COND,.UCIFS,.ICOND,.VSLIST)
S SDIR=$S(NOCC<0:+1,1:-1)
S NOCC=$S(NOCC<0:-NOCC,1:NOCC)
S NGET=$S(UCIFS:50,1:NOCC)
;Determine if this is a finding with a start and stop date.
S SSFIND=$S(FILENUM=52:1,FILENUM["55":1,FILENUM=100:1,1:0)
S USESTRT=$S(SSFIND:$P(PFINDPA(0),U,15),1:0)
I FILENUM=100,USESTRT="" S USESTRT=1
;Get the status list.
D GETSTATI^PXRMSTAT(FILENUM,.PFINDPA,.STATUSA)
I SSFIND D FPDATSS(FILENUM,SNODE,DFN,ITEM,NGET,SDIR,BDT,EDT,USESTRT,.NFOUND,.FLIST)
I 'SSFIND D FPDAT(FILENUM,SNODE,DFN,ITEM,NGET,SDIR,BDT,EDT,.NFOUND,.FLIST)
I NFOUND=0 S FIEVAL=0 Q
S INVFD=$P(PFINDPA(0),U,16)
S NP=0
F IND=1:1:NFOUND Q:NP=NOCC D
. S DAS=$P(FLIST(IND),U,1)
.;If this a Lab finding attach the item to the DAS.
. I PFINDPA(0)["LAB(60" S DAS=ITEM_"~"_DAS
.;If this is a Mental Health finding attach the scale to DAS.
. I PFINDPA(0)["YTT(601.71" S DAS=DAS_"S"_$P(PFINDPA(0),U,12)
. D GETDATA^PXRMDATA(FILENUM,DAS,.FIEVD)
. I INVFD,$D(FIEVD("VISIT")) D GETDATA^PXRMVSIT(FIEVD("VISIT"),.FIEVD,0)
. S FIEVD("DATE")=$P(FLIST(IND),U,2)
.;If there is a status list make sure the finding has one on the list.
. S STATOK=$S($D(STATUSA):$$STATUSOK(.STATUSA,.FIEVD),1:1)
. I 'STATOK Q
. S CONVAL=$S(COND'="":$$COND^PXRMCOND(CASESEN,ICOND,VSLIST,.FIEVD),1:1)
. S SAVE=$S('UCIFS:1,(UCIFS&CONVAL):1,1:0)
. I SAVE D
.. S NP=NP+1
.. S FIEVAL(NP)=CONVAL
.. I COND'="" S FIEVAL(NP,"CONDITION")=CONVAL
.. S FIEVAL(NP,"DAS")=$P(FLIST(IND),U,1)
.. S FIEVAL(NP,"DATE")=FIEVD("DATE")
.. M FIEVAL(NP)=FIEVD
.. I $G(PXRMDEBG) M FIEVAL(NP,"CSUB")=FIEVD
;
;Save the finding result.
D SFRES^PXRMUTIL(SDIR,NP,.FIEVAL)
S FIEVAL("FILE NUMBER")=FILENUM
Q
;
;================================================================
FPDAT(FILENUM,SNODE,DFN,ITEM,NGET,SDIR,BDT,EDT,NFOUND,FLIST) ;Find patient
;data for regular files. FLIST is returned in date order, i.e.,
;FLIST(1) is the most recent SDIR=-1, oldest SDIR=+1.
;IHS/MSC/MGH modified to not save entered in error vitals
I FILENUM=601.84 D SEVALFI^PXRMMH(DFN,ITEM,NGET,SDIR,BDT,EDT,.NFOUND,.FLIST) Q
N DAS,DATE,DONE,EDTT
S EIE=0
S EDTT=$S(EDT[".":EDT+.0000001,1:EDT+.240001)
S (DONE,NFOUND)=0
S DATE=$S(SDIR=+1:BDT-.000001,1:EDTT)
F S DATE=+$O(^PXRMINDX(FILENUM,SNODE,DFN,ITEM,DATE),SDIR) Q:(DATE=0)!(DONE) D
. I DATE<BDT,SDIR=-1 S DONE=1 Q
. I DATE>EDTT,SDIR=1 S DONE=1 Q
. S DAS=""
. F S DAS=$O(^PXRMINDX(FILENUM,SNODE,DFN,ITEM,DATE,DAS),-1) Q:DAS=""!(DONE) D
.. I FILENUM=9000010.01 D Q:+EIE
... S EIE=$P($G(^AUPNVMSR(DAS,2)),U,1)=1
.. S NFOUND=NFOUND+1
.. S FLIST(NFOUND)=DAS_U_DATE
.. I NFOUND=NGET S DONE=1 Q
Q
;
;================================================================
FPDATSS(FILENUM,SNODE,DFN,ITEM,NGET,SDIR,BDT,EDT,USESTRT,NFOUND,FLIST) ;Find
;patient data for findings that have a start and stop date. FLIST
;is returned in date order, i.e., FLIST(1) is the most recent.
N DAS,DONE,EDTT,OVERLAP,SDATE,START,STOP,TDATE,TIND,TLIST
S EDTT=$S(EDT[".":EDT+.0000001,1:EDT+.240001)
S (DONE,NFOUND)=0
S START=$S(SDIR=+1:0,1:EDTT)
F S START=+$O(^PXRMINDX(FILENUM,SNODE,DFN,ITEM,START),SDIR) Q:(START=0)!(DONE)!(START>EDTT) D
. S STOP=""
. F S STOP=$O(^PXRMINDX(FILENUM,SNODE,DFN,ITEM,START,STOP),SDIR) Q:(STOP="")!(DONE) D
..;Items that do not have a stop date are flagged by "U".
.. S SDATE=$S(USESTRT:START,STOP["U":$$NOW^PXRMDATE_"U",1:STOP)
.. S OVERLAP=$$OVERLAP(START,SDATE,BDT,EDT)
.. I OVERLAP="O" D
... S DAS=$O(^PXRMINDX(FILENUM,SNODE,DFN,ITEM,START,STOP,""))
... S NFOUND=NFOUND+1,TLIST(SDATE,NFOUND)=DAS_U_SDATE
..;Some orders and non-VA meds may not have a Stop Date so we have
..;to check all entries.
.. I FILENUM="55NVA" Q
.. I FILENUM=100 Q
.. I OVERLAP="L",SDIR=-1 S DONE=1 Q
.. I OVERLAP="R",SDIR=1 S DONE=1 Q
;Return up to NGET of the most recent/oldest entries.
S NFOUND=0,TDATE=""
F S TDATE=$O(TLIST(TDATE),SDIR) Q:(TDATE="")!(NFOUND=NGET) D
. S TIND=0
. F S TIND=$O(TLIST(TDATE,TIND)) Q:(TIND="")!(NFOUND=NGET) D
.. S NFOUND=NFOUND+1,FLIST(NFOUND)=TLIST(TDATE,TIND)
Q
;
;================================================================
OVERLAP(START,STOP,BDT,EDT) ;Determine if the date range defined by START and
;STOP overlaps with the date range defined by BDT and EDT. The return
;value "O" means they overlap, "L" means START, STOP is to the
;left of BDT, EDT and "R" means it is to the right.
I EDT<START Q "R"
I STOP<BDT Q "L"
Q "O"
;
;================================================================
STATUSOK(STATUSA,FIEVD) ;Return true if the status in FIEVD matches one in
;the list in STATUSA.
I '$D(FIEVD("STATUS")) Q 1
N JND,OK
S OK=0
F JND=1:1:STATUSA(0) Q:OK D
. I STATUSA(JND)="*" S OK=1 Q
. I STATUSA(JND)=FIEVD("STATUS") S OK=1 Q
Q OK
;
PXRMINDX ;SLC/PKR - Routines for utilizing the index. ;10-Jun-2015 12:10;du
+1 ;;2.0;CLINICAL REMINDERS;**4,6,1001,12,17,18,26,1005**;Feb 04, 2005;Build 23
+2 ;Code for patient findings.
+3 ;================================================================
EVALFI(DFN,DEFARR,ENODE,FIEVAL) ;General finding evaluator.
+1 NEW BDT,EDT,FIEVT,FILENUM,FINDING,FINDPA,ITEM,NOINDEX
+2 SET FILENUM=$$GETFNUM^PXRMDATA(ENODE)
+3 IF $GET(^PXRMINDX(FILENUM,"DATE BUILT"))=""
Begin DoDot:1
+4 DO NOINDEX^PXRMERRH("D",PXRMITEM,FILENUM)
+5 SET NOINDEX=1
End DoDot:1
+6 IF '$TEST
SET NOINDEX=0
+7 SET ITEM=""
+8 FOR
SET ITEM=$ORDER(DEFARR("E",ENODE,ITEM))
IF ITEM=""
QUIT
Begin DoDot:1
+9 SET FINDING=""
+10 FOR
SET FINDING=$ORDER(DEFARR("E",ENODE,ITEM,FINDING))
IF +FINDING=0
QUIT
Begin DoDot:2
+11 IF NOINDEX
SET FIEVAL(FINDING)=0
QUIT
+12 KILL FINDPA
+13 MERGE FINDPA=DEFARR(20,FINDING)
+14 KILL FIEVT
+15 DO FIEVAL(FILENUM,"PI",DFN,ITEM,.FINDPA,.FIEVT)
+16 MERGE FIEVAL(FINDING)=FIEVT
+17 SET FIEVAL(FINDING,"FINDING")=$PIECE(FINDPA(0),U,1)
End DoDot:2
End DoDot:1
+18 QUIT
+19 ;
+20 ;================================================================
EVALTERM(DFN,FINDPA,ENODE,TERMARR,TFIEVAL) ;General term
+1 ;evaluator.
+2 NEW FIEVT,FILENUM,ITEM,NOINDEX,PFINDPA
+3 NEW TFINDING,TFINDPA
+4 SET FILENUM=$$GETFNUM^PXRMDATA(ENODE)
+5 IF $GET(^PXRMINDX(FILENUM,"DATE BUILT"))=""
Begin DoDot:1
+6 DO NOINDEX^PXRMERRH("TR",TERMARR("IEN"),FILENUM)
+7 SET NOINDEX=1
End DoDot:1
+8 IF '$TEST
SET NOINDEX=0
+9 SET ITEM=""
+10 FOR
SET ITEM=$ORDER(TERMARR("E",ENODE,ITEM))
IF ITEM=""
QUIT
Begin DoDot:1
+11 SET TFINDING=""
+12 FOR
SET TFINDING=$ORDER(TERMARR("E",ENODE,ITEM,TFINDING))
IF +TFINDING=0
QUIT
Begin DoDot:2
+13 IF NOINDEX
SET TFIEVAL(TFINDING)=0
QUIT
+14 KILL FIEVT,PFINDPA,TFINDPA
+15 MERGE TFINDPA=TERMARR(20,TFINDING)
+16 ;Set the finding parameters.
+17 DO SPFINDPA^PXRMTERM(.FINDPA,.TFINDPA,.PFINDPA)
+18 DO FIEVAL(FILENUM,"PI",DFN,ITEM,.PFINDPA,.FIEVT)
+19 MERGE TFIEVAL(TFINDING)=FIEVT
+20 SET TFIEVAL(TFINDING,"FINDING")=$PIECE(TFINDPA(0),U,1)
End DoDot:2
End DoDot:1
+21 QUIT
+22 ;
+23 ;================================================================
FIEVAL(FILENUM,SNODE,DFN,ITEM,PFINDPA,FIEVAL) ;
+1 ;Evaluate regular patient findings.
+2 NEW BDT,CASESEN,COND,CONVAL,DAS,DATE,EDT,FIEVD,FLIST,ICOND,IEN,IND,INVFD
+3 NEW NFOUND,NGET,NOCC,NP
+4 NEW SAVE,SDIR,SSFIND,STATOK,STATUSA,UCIFS,USESTRT,VSLIST
+5 ;Set the finding search parameters.
+6 DO SSPAR^PXRMUTIL(PFINDPA(0),.NOCC,.BDT,.EDT)
+7 IF $GET(PXRMDEBG)
SET FIEVAL("BDTE")=BDT
SET FIEVAL("EDTE")=EDT
+8 DO SCPAR^PXRMCOND(.PFINDPA,.CASESEN,.COND,.UCIFS,.ICOND,.VSLIST)
+9 SET SDIR=$SELECT(NOCC<0:+1,1:-1)
+10 SET NOCC=$SELECT(NOCC<0:-NOCC,1:NOCC)
+11 SET NGET=$SELECT(UCIFS:50,1:NOCC)
+12 ;Determine if this is a finding with a start and stop date.
+13 SET SSFIND=$SELECT(FILENUM=52:1,FILENUM["55":1,FILENUM=100:1,1:0)
+14 SET USESTRT=$SELECT(SSFIND:$PIECE(PFINDPA(0),U,15),1:0)
+15 IF FILENUM=100
IF USESTRT=""
SET USESTRT=1
+16 ;Get the status list.
+17 DO GETSTATI^PXRMSTAT(FILENUM,.PFINDPA,.STATUSA)
+18 IF SSFIND
DO FPDATSS(FILENUM,SNODE,DFN,ITEM,NGET,SDIR,BDT,EDT,USESTRT,.NFOUND,.FLIST)
+19 IF 'SSFIND
DO FPDAT(FILENUM,SNODE,DFN,ITEM,NGET,SDIR,BDT,EDT,.NFOUND,.FLIST)
+20 IF NFOUND=0
SET FIEVAL=0
QUIT
+21 SET INVFD=$PIECE(PFINDPA(0),U,16)
+22 SET NP=0
+23 FOR IND=1:1:NFOUND
IF NP=NOCC
QUIT
Begin DoDot:1
+24 SET DAS=$PIECE(FLIST(IND),U,1)
+25 ;If this a Lab finding attach the item to the DAS.
+26 IF PFINDPA(0)["LAB(60"
SET DAS=ITEM_"~"_DAS
+27 ;If this is a Mental Health finding attach the scale to DAS.
+28 IF PFINDPA(0)["YTT(601.71"
SET DAS=DAS_"S"_$PIECE(PFINDPA(0),U,12)
+29 DO GETDATA^PXRMDATA(FILENUM,DAS,.FIEVD)
+30 IF INVFD
IF $DATA(FIEVD("VISIT"))
DO GETDATA^PXRMVSIT(FIEVD("VISIT"),.FIEVD,0)
+31 SET FIEVD("DATE")=$PIECE(FLIST(IND),U,2)
+32 ;If there is a status list make sure the finding has one on the list.
+33 SET STATOK=$SELECT($DATA(STATUSA):$$STATUSOK(.STATUSA,.FIEVD),1:1)
+34 IF 'STATOK
QUIT
+35 SET CONVAL=$SELECT(COND'="":$$COND^PXRMCOND(CASESEN,ICOND,VSLIST,.FIEVD),1:1)
+36 SET SAVE=$SELECT('UCIFS:1,(UCIFS&CONVAL):1,1:0)
+37 IF SAVE
Begin DoDot:2
+38 SET NP=NP+1
+39 SET FIEVAL(NP)=CONVAL
+40 IF COND'=""
SET FIEVAL(NP,"CONDITION")=CONVAL
+41 SET FIEVAL(NP,"DAS")=$PIECE(FLIST(IND),U,1)
+42 SET FIEVAL(NP,"DATE")=FIEVD("DATE")
+43 MERGE FIEVAL(NP)=FIEVD
+44 IF $GET(PXRMDEBG)
MERGE FIEVAL(NP,"CSUB")=FIEVD
End DoDot:2
End DoDot:1
+45 ;
+46 ;Save the finding result.
+47 DO SFRES^PXRMUTIL(SDIR,NP,.FIEVAL)
+48 SET FIEVAL("FILE NUMBER")=FILENUM
+49 QUIT
+50 ;
+51 ;================================================================
FPDAT(FILENUM,SNODE,DFN,ITEM,NGET,SDIR,BDT,EDT,NFOUND,FLIST) ;Find patient
+1 ;data for regular files. FLIST is returned in date order, i.e.,
+2 ;FLIST(1) is the most recent SDIR=-1, oldest SDIR=+1.
+3 ;IHS/MSC/MGH modified to not save entered in error vitals
+4 IF FILENUM=601.84
DO SEVALFI^PXRMMH(DFN,ITEM,NGET,SDIR,BDT,EDT,.NFOUND,.FLIST)
QUIT
+5 NEW DAS,DATE,DONE,EDTT
+6 SET EIE=0
+7 SET EDTT=$SELECT(EDT[".":EDT+.0000001,1:EDT+.240001)
+8 SET (DONE,NFOUND)=0
+9 SET DATE=$SELECT(SDIR=+1:BDT-.000001,1:EDTT)
+10 FOR
SET DATE=+$ORDER(^PXRMINDX(FILENUM,SNODE,DFN,ITEM,DATE),SDIR)
IF (DATE=0)!(DONE)
QUIT
Begin DoDot:1
+11 IF DATE<BDT
IF SDIR=-1
SET DONE=1
QUIT
+12 IF DATE>EDTT
IF SDIR=1
SET DONE=1
QUIT
+13 SET DAS=""
+14 FOR
SET DAS=$ORDER(^PXRMINDX(FILENUM,SNODE,DFN,ITEM,DATE,DAS),-1)
IF DAS=""!(DONE)
QUIT
Begin DoDot:2
+15 IF FILENUM=9000010.01
Begin DoDot:3
+16 SET EIE=$PIECE($GET(^AUPNVMSR(DAS,2)),U,1)=1
End DoDot:3
IF +EIE
QUIT
+17 SET NFOUND=NFOUND+1
+18 SET FLIST(NFOUND)=DAS_U_DATE
+19 IF NFOUND=NGET
SET DONE=1
QUIT
End DoDot:2
End DoDot:1
+20 QUIT
+21 ;
+22 ;================================================================
FPDATSS(FILENUM,SNODE,DFN,ITEM,NGET,SDIR,BDT,EDT,USESTRT,NFOUND,FLIST) ;Find
+1 ;patient data for findings that have a start and stop date. FLIST
+2 ;is returned in date order, i.e., FLIST(1) is the most recent.
+3 NEW DAS,DONE,EDTT,OVERLAP,SDATE,START,STOP,TDATE,TIND,TLIST
+4 SET EDTT=$SELECT(EDT[".":EDT+.0000001,1:EDT+.240001)
+5 SET (DONE,NFOUND)=0
+6 SET START=$SELECT(SDIR=+1:0,1:EDTT)
+7 FOR
SET START=+$ORDER(^PXRMINDX(FILENUM,SNODE,DFN,ITEM,START),SDIR)
IF (START=0)!(DONE)!(START>EDTT)
QUIT
Begin DoDot:1
+8 SET STOP=""
+9 FOR
SET STOP=$ORDER(^PXRMINDX(FILENUM,SNODE,DFN,ITEM,START,STOP),SDIR)
IF (STOP="")!(DONE)
QUIT
Begin DoDot:2
+10 ;Items that do not have a stop date are flagged by "U".
+11 SET SDATE=$SELECT(USESTRT:START,STOP["U":$$NOW^PXRMDATE_"U",1:STOP)
+12 SET OVERLAP=$$OVERLAP(START,SDATE,BDT,EDT)
+13 IF OVERLAP="O"
Begin DoDot:3
+14 SET DAS=$ORDER(^PXRMINDX(FILENUM,SNODE,DFN,ITEM,START,STOP,""))
+15 SET NFOUND=NFOUND+1
SET TLIST(SDATE,NFOUND)=DAS_U_SDATE
End DoDot:3
+16 ;Some orders and non-VA meds may not have a Stop Date so we have
+17 ;to check all entries.
+18 IF FILENUM="55NVA"
QUIT
+19 IF FILENUM=100
QUIT
+20 IF OVERLAP="L"
IF SDIR=-1
SET DONE=1
QUIT
+21 IF OVERLAP="R"
IF SDIR=1
SET DONE=1
QUIT
End DoDot:2
End DoDot:1
+22 ;Return up to NGET of the most recent/oldest entries.
+23 SET NFOUND=0
SET TDATE=""
+24 FOR
SET TDATE=$ORDER(TLIST(TDATE),SDIR)
IF (TDATE="")!(NFOUND=NGET)
QUIT
Begin DoDot:1
+25 SET TIND=0
+26 FOR
SET TIND=$ORDER(TLIST(TDATE,TIND))
IF (TIND="")!(NFOUND=NGET)
QUIT
Begin DoDot:2
+27 SET NFOUND=NFOUND+1
SET FLIST(NFOUND)=TLIST(TDATE,TIND)
End DoDot:2
End DoDot:1
+28 QUIT
+29 ;
+30 ;================================================================
OVERLAP(START,STOP,BDT,EDT) ;Determine if the date range defined by START and
+1 ;STOP overlaps with the date range defined by BDT and EDT. The return
+2 ;value "O" means they overlap, "L" means START, STOP is to the
+3 ;left of BDT, EDT and "R" means it is to the right.
+4 IF EDT<START
QUIT "R"
+5 IF STOP<BDT
QUIT "L"
+6 QUIT "O"
+7 ;
+8 ;================================================================
STATUSOK(STATUSA,FIEVD) ;Return true if the status in FIEVD matches one in
+1 ;the list in STATUSA.
+2 IF '$DATA(FIEVD("STATUS"))
QUIT 1
+3 NEW JND,OK
+4 SET OK=0
+5 FOR JND=1:1:STATUSA(0)
IF OK
QUIT
Begin DoDot:1
+6 IF STATUSA(JND)="*"
SET OK=1
QUIT
+7 IF STATUSA(JND)=FIEVD("STATUS")
SET OK=1
QUIT
End DoDot:1
+8 QUIT OK
+9 ;