MHVXWLC ;KUM - Extractions for SM Work Load Credit ; 3/5/14 9:10am
;;1.0;My HealtheVet;**11**;Mar 05, 2014;Build 61
;;Per VHA Directive 2004-038, this routine should not be modified.
;
Q
;
; Integration Agreements:
;
; 10103 : $$DT^XLFDT
; $$NOW^XLFDT
; 10004 : $$GET1^DIQ
;
SPDSS(QRY,ERR,DATAROOT) ; return all DSS Unts for Provider and Associated Clinic
;
; return provider data in DATAROOT
; QRY, ERR passed by ref.
;
; Input:
; QRY - Query array
;
; DATAROOT - Root of array to hold extract data
;
; Output:
; DATAROOT - Populated data array
; includes number of hits and timestamp
; ERR - Errors during extraction, zero on success
;
N EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVPRDUZ,MHVACIEN,MHVSTRING,MHVDSS,MHVCOUNT,X,MHVC
;
S LOGND=$T(+0)_"^DSSUNIT" ; node for logging
D LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
; needed vars.
S ERR=0,EXTIME=$$NOW^XLFDT,HIT=0
;
K @DATAROOT ; clean up residue
S HIT=0
S MHVCOUNT=0
; All validations should be in Validation routine.
S MHVPRVDUZ=$G(QRY("PDUZ"))
S MHVACIEN=$G(QRY("ACLN"))
S MHVSTRING=MHVACIEN_"^"_MHVPRVDUZ
D DSSUNT^MHVUMRPC(.MHVDSS,.MHVSTRING)
F S MHVCOUNT=$O(MHVDSS(MHVCOUNT)) Q:'MHVCOUNT!($P(MHVDSS(1),"^",1)=0) D
.S HIT=HIT+1
.S @DATAROOT@(HIT)=MHVDSS(MHVCOUNT)
;
S @DATAROOT=HIT_U_EXTIME ; hits ^ time
I $P($G(MHVDSS(1)),"^",1)=0 S ERR="1^"_$P($G(MHVDSS(1)),"^",2)
D XITLOG(LOGND,HIT)
;
Q
SPECS(QRY,ERR,DATAROOT) ; return all ECS Procedures from DSS Unts and Location IEN
;
; return provider data in DATAROOT
; QRY, ERR passed by ref.
;
; Input:
; QRY - Query array
;
; DATAROOT - Root of array to hold extract data
;
; Output:
; DATAROOT - Populated data array
; includes number of hits and timestamp
; ERR - Errors during extraction, zero on success
;
N EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVPRDUZ,MHVACIEN,MHVSTRING,MHVDSS,MHVCOUNT,X
;
S LOGND=$T(+0)_"^ECSPROC" ; node for logging
D LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
; needed vars.
S ERR=0,EXTIME=$$NOW^XLFDT,HIT=0
;
K @DATAROOT ; clean up residue
S HIT=0
S MHVCOUNT=0
; All validations should be in Validation routine.
S MHVDSSIEN=$G(QRY("DSSI"))
S MHVLOCIEN=$G(QRY("LOCI"))
S MHVSTRING=MHVDSSIEN_"^"_MHVLOCIEN
D DSSPROCS^MHVUMRPC(.MHVPROC,.MHVSTRING)
F S MHVCOUNT=$O(MHVPROC(MHVCOUNT)) Q:'MHVCOUNT!($P(MHVPROC(1),"^",1)=0) D
.S HIT=HIT+1
.S @DATAROOT@(HIT)=MHVPROC(MHVCOUNT)
;
S @DATAROOT=HIT_U_EXTIME ; hits ^ time
I $P($G(MHVPROC(1)),"^",1)=0 S ERR="1^"_$P($G(MHVPROC(1)),"^",2)
D XITLOG(LOGND,HIT)
;
Q
PECLASS(QRY,ERR,DATAROOT) ; returns Patient Eligibility and Classification Data
;
; return provider data in DATAROOT
; QRY, ERR passed by ref.
;
; Input:
; QRY - Query array
;
; DATAROOT - Root of array to hold extract data
;
; Output:
; DATAROOT - Populated data array
; includes number of hits and timestamp
; ERR - Errors during extraction, zero on success
;
N EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVPRDUZ,MHVACIEN,MHVSTRING,MHVDSS,MHVCOUNT,X
;
S LOGND=$T(+0)_"^PATECLASS" ; node for logging
D LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
; needed vars.
S ERR=0,EXTIME=$$NOW^XLFDT,HIT=0
;
K @DATAROOT ; clean up residue
S HIT=0
S MHVCOUNT=0
; All validations should be in Validation routine.
S MHVPATICN=$G(QRY("PICN"))
S MHVDSSIEN=$G(QRY("DSSI"))
S MHVPROCDT=DT
S MHVSTRING=MHVPATICN_"^"_MHVDSSIEN_"^"_MHVPROCDT
D PATECLS^MHVUMRPC(.MHVPROC,.MHVSTRING)
S HIT=HIT+1
I $G(MHVPROC(MHVCOUNT))="" S MHVPROC(MHVCOUNT)=""
S @DATAROOT@(HIT)=MHVPROC(MHVCOUNT)
F S MHVCOUNT=$O(MHVPROC(MHVCOUNT)) Q:'MHVCOUNT!($P(MHVPROC(1),"^",1)=0) D
.S HIT=HIT+1
.S @DATAROOT@(HIT)=MHVPROC(MHVCOUNT)
;
S HIT=HIT-1 ; To take out Classification count as Classification and Primary eligibility are in one segment
S @DATAROOT=HIT_U_EXTIME ; hits ^ time
I $P($G(MHVPROC(1)),"^",1)=0 S ERR="1^"_$P($G(MHVPROC(1)),"^",2)
D XITLOG(LOGND,HIT)
;
Q
SMPPRB(QRY,ERR,DATAROOT) ; returns Patient Problem list Data
;
; return provider data in DATAROOT
; QRY, ERR passed by ref.
;
; Input:
; QRY - Query array
;
; DATAROOT - Root of array to hold extract data
;
; Output:
; DATAROOT - Populated data array
; includes number of hits and timestamp
; ERR - Errors during extraction, zero on success
;
N EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVPRDUZ,MHVACIEN,MHVSTRING,MHVDSS,MHVCOUNT,X
;
S LOGND=$T(+0)_"^SMPPRB" ; node for logging
D LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
; needed vars.
S ERR=0,EXTIME=$$NOW^XLFDT,HIT=0
;
K @DATAROOT ; clean up residue
S HIT=0
S MHVCOUNT=0
; All validations should be in Validation routine.
S MHVPATICN=$G(QRY("PICN"))
S MHVSTRING=MHVPATICN
D DIAGPL^MHVUMRPC(.MHVPRB,.MHVSTRING)
F S MHVCOUNT=$O(MHVPRB(MHVCOUNT)) Q:'MHVCOUNT!($P(MHVPRB(1),"^",1)=0) D
.S HIT=HIT+1
.S @DATAROOT@(HIT)=MHVPRB(MHVCOUNT)
;
S MHVC=1
I $P($G(@DATAROOT@(MHVC)),"^",2)=0 S HIT=0
S @DATAROOT=HIT_U_EXTIME ; hits ^ time
I $P($G(MHVPRB(1)),"^",1)=0 S ERR="1^"_$P($G(MHVPRB(1)),"^",2)
D XITLOG(LOGND,HIT)
;
Q
SMDIAG(QRY,ERR,DATAROOT) ; returns Diagnosis Search results
;
; return provider data in DATAROOT
; QRY, ERR passed by ref.
;
; Input:
; QRY - Query array
;
; DATAROOT - Root of array to hold extract data
;
; Output:
; DATAROOT - Populated data array
; includes number of hits and timestamp
; ERR - Errors during extraction, zero on success
;
N EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVPRDUZ,MHVACIEN,MHVSTRING,MHVDSS,MHVCOUNT,X,MHVSCHSTR
;
S LOGND=$T(+0)_"^SMDIAG" ; node for logging
D LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
; needed vars.
S ERR=0,EXTIME=$$NOW^XLFDT,HIT=0
;
K @DATAROOT ; clean up residue
S HIT=0
S MHVCOUNT=0
; All validations should be in Validation routine.
S MHVSCHSTR=$G(QRY("DSRCH"))
S MHVSTRING="757.01^"_MHVSCHSTR
D DIAGSRCH^MHVUMRPC(.MHVPRB,.MHVSTRING)
F S MHVCOUNT=$O(MHVPRB(MHVCOUNT)) Q:'MHVCOUNT!($P(MHVPRB(1),"^",1)=0) D
.S HIT=HIT+1
.S @DATAROOT@(HIT)=MHVPRB(MHVCOUNT)
;
S MHVC=1
I $P($G(@DATAROOT@(MHVC)),"^",2)=0 S HIT=0
S @DATAROOT=HIT_U_EXTIME ; hits ^ time
I $P($G(MHVPRB(1)),"^",2)=0 S ERR="1^"_$P($G(MHVPRB(1)),"^",3)
D XITLOG(LOGND,HIT)
;
Q
SMFILE(QRY,ERR,DATAROOT) ; File Workload Credit
;
; return provider data in DATAROOT
; QRY, ERR passed by ref.
;
; Input:
; QRY - Query array
;
; DATAROOT - Root of array to hold extract data
;
; Output:
; DATAROOT - Populated data array
; includes number of hits and timestamp
; ERR - Errors during extraction, zero on success
;
N EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVSTR,MHVCOUNT,X
;
;FILE^LOCATION^DSS UNIT^CATEGORY^PROCEDURE DATE TIME^PROCEDURE^PATIENT IEN^ORDERING SECTION^ENTER BY^PAT STATUS^PROVIDER^DX^
;ASSOC CLINIC^PATIENT STATUS AND CLASSIFICATION DATA^ELIGIBILITY IEN
;
S LOGND=$T(+0)_"^SMDIAG" ; node for logging
D LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
; needed vars.
S ERR=0,EXTIME=$$NOW^XLFDT,HIT=0
;
K @DATAROOT ; clean up residue
S HIT=0
S MHVCOUNT=0
; All validations should be in Validation routine.
S MHVSTR=$G(QRY("ECFILE"))_"^"_$G(QRY("ECL"))_"^"_$G(QRY("ECD"))_"^"_$G(QRY("ECC"))_"^"_$G(QRY("ECDT"))_"^"
S MHVSTR=MHVSTR_$G(QRY("ECP"))_"^"_$G(QRY("ECICN"))_"^"_$G(QRY("ECMN"))_"^"_$G(QRY("ECDUZ"))_"^"_$G(QRY("ECPTSTAT"))_"^"
S MHVSTR=MHVSTR_$G(QRY("ECU"))_"^"_$G(QRY("ECDX"))_"^"_$G(QRY("EC4"))_"^"_$G(QRY("ECELCL"))
D FILE^MHVECFLR(.MHVPRB,.MHVSTR)
S HIT=HIT+1
S @DATAROOT@(HIT)=MHVPRB(1)
;
S @DATAROOT=HIT_U_EXTIME ; hits ^ time
D XITLOG(LOGND,HIT)
;
Q
XITLOG(ND,HT) ; exit log
D LOG^MHVUL2(ND,HT_" HITS","S","TRACE")
D LOG^MHVUL2(ND,"END","S","TRACE") Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMHVXWLC 8064 printed Nov 22, 2024@17:26:27 Page 2
MHVXWLC ;KUM - Extractions for SM Work Load Credit ; 3/5/14 9:10am
+1 ;;1.0;My HealtheVet;**11**;Mar 05, 2014;Build 61
+2 ;;Per VHA Directive 2004-038, this routine should not be modified.
+3 ;
+4 QUIT
+5 ;
+6 ; Integration Agreements:
+7 ;
+8 ; 10103 : $$DT^XLFDT
+9 ; $$NOW^XLFDT
+10 ; 10004 : $$GET1^DIQ
+11 ;
SPDSS(QRY,ERR,DATAROOT) ; return all DSS Unts for Provider and Associated Clinic
+1 ;
+2 ; return provider data in DATAROOT
+3 ; QRY, ERR passed by ref.
+4 ;
+5 ; Input:
+6 ; QRY - Query array
+7 ;
+8 ; DATAROOT - Root of array to hold extract data
+9 ;
+10 ; Output:
+11 ; DATAROOT - Populated data array
+12 ; includes number of hits and timestamp
+13 ; ERR - Errors during extraction, zero on success
+14 ;
+15 NEW EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVPRDUZ,MHVACIEN,MHVSTRING,MHVDSS,MHVCOUNT,X,MHVC
+16 ;
+17 ; node for logging
SET LOGND=$TEXT(+0)_"^DSSUNIT"
+18 DO LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
+19 ; needed vars.
+20 SET ERR=0
SET EXTIME=$$NOW^XLFDT
SET HIT=0
+21 ;
+22 ; clean up residue
KILL @DATAROOT
+23 SET HIT=0
+24 SET MHVCOUNT=0
+25 ; All validations should be in Validation routine.
+26 SET MHVPRVDUZ=$GET(QRY("PDUZ"))
+27 SET MHVACIEN=$GET(QRY("ACLN"))
+28 SET MHVSTRING=MHVACIEN_"^"_MHVPRVDUZ
+29 DO DSSUNT^MHVUMRPC(.MHVDSS,.MHVSTRING)
+30 FOR
SET MHVCOUNT=$ORDER(MHVDSS(MHVCOUNT))
if 'MHVCOUNT!($PIECE(MHVDSS(1),"^",1)=0)
QUIT
Begin DoDot:1
+31 SET HIT=HIT+1
+32 SET @DATAROOT@(HIT)=MHVDSS(MHVCOUNT)
End DoDot:1
+33 ;
+34 ; hits ^ time
SET @DATAROOT=HIT_U_EXTIME
+35 IF $PIECE($GET(MHVDSS(1)),"^",1)=0
SET ERR="1^"_$PIECE($GET(MHVDSS(1)),"^",2)
+36 DO XITLOG(LOGND,HIT)
+37 ;
+38 QUIT
SPECS(QRY,ERR,DATAROOT) ; return all ECS Procedures from DSS Unts and Location IEN
+1 ;
+2 ; return provider data in DATAROOT
+3 ; QRY, ERR passed by ref.
+4 ;
+5 ; Input:
+6 ; QRY - Query array
+7 ;
+8 ; DATAROOT - Root of array to hold extract data
+9 ;
+10 ; Output:
+11 ; DATAROOT - Populated data array
+12 ; includes number of hits and timestamp
+13 ; ERR - Errors during extraction, zero on success
+14 ;
+15 NEW EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVPRDUZ,MHVACIEN,MHVSTRING,MHVDSS,MHVCOUNT,X
+16 ;
+17 ; node for logging
SET LOGND=$TEXT(+0)_"^ECSPROC"
+18 DO LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
+19 ; needed vars.
+20 SET ERR=0
SET EXTIME=$$NOW^XLFDT
SET HIT=0
+21 ;
+22 ; clean up residue
KILL @DATAROOT
+23 SET HIT=0
+24 SET MHVCOUNT=0
+25 ; All validations should be in Validation routine.
+26 SET MHVDSSIEN=$GET(QRY("DSSI"))
+27 SET MHVLOCIEN=$GET(QRY("LOCI"))
+28 SET MHVSTRING=MHVDSSIEN_"^"_MHVLOCIEN
+29 DO DSSPROCS^MHVUMRPC(.MHVPROC,.MHVSTRING)
+30 FOR
SET MHVCOUNT=$ORDER(MHVPROC(MHVCOUNT))
if 'MHVCOUNT!($PIECE(MHVPROC(1),"^",1)=0)
QUIT
Begin DoDot:1
+31 SET HIT=HIT+1
+32 SET @DATAROOT@(HIT)=MHVPROC(MHVCOUNT)
End DoDot:1
+33 ;
+34 ; hits ^ time
SET @DATAROOT=HIT_U_EXTIME
+35 IF $PIECE($GET(MHVPROC(1)),"^",1)=0
SET ERR="1^"_$PIECE($GET(MHVPROC(1)),"^",2)
+36 DO XITLOG(LOGND,HIT)
+37 ;
+38 QUIT
PECLASS(QRY,ERR,DATAROOT) ; returns Patient Eligibility and Classification Data
+1 ;
+2 ; return provider data in DATAROOT
+3 ; QRY, ERR passed by ref.
+4 ;
+5 ; Input:
+6 ; QRY - Query array
+7 ;
+8 ; DATAROOT - Root of array to hold extract data
+9 ;
+10 ; Output:
+11 ; DATAROOT - Populated data array
+12 ; includes number of hits and timestamp
+13 ; ERR - Errors during extraction, zero on success
+14 ;
+15 NEW EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVPRDUZ,MHVACIEN,MHVSTRING,MHVDSS,MHVCOUNT,X
+16 ;
+17 ; node for logging
SET LOGND=$TEXT(+0)_"^PATECLASS"
+18 DO LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
+19 ; needed vars.
+20 SET ERR=0
SET EXTIME=$$NOW^XLFDT
SET HIT=0
+21 ;
+22 ; clean up residue
KILL @DATAROOT
+23 SET HIT=0
+24 SET MHVCOUNT=0
+25 ; All validations should be in Validation routine.
+26 SET MHVPATICN=$GET(QRY("PICN"))
+27 SET MHVDSSIEN=$GET(QRY("DSSI"))
+28 SET MHVPROCDT=DT
+29 SET MHVSTRING=MHVPATICN_"^"_MHVDSSIEN_"^"_MHVPROCDT
+30 DO PATECLS^MHVUMRPC(.MHVPROC,.MHVSTRING)
+31 SET HIT=HIT+1
+32 IF $GET(MHVPROC(MHVCOUNT))=""
SET MHVPROC(MHVCOUNT)=""
+33 SET @DATAROOT@(HIT)=MHVPROC(MHVCOUNT)
+34 FOR
SET MHVCOUNT=$ORDER(MHVPROC(MHVCOUNT))
if 'MHVCOUNT!($PIECE(MHVPROC(1),"^",1)=0)
QUIT
Begin DoDot:1
+35 SET HIT=HIT+1
+36 SET @DATAROOT@(HIT)=MHVPROC(MHVCOUNT)
End DoDot:1
+37 ;
+38 ; To take out Classification count as Classification and Primary eligibility are in one segment
SET HIT=HIT-1
+39 ; hits ^ time
SET @DATAROOT=HIT_U_EXTIME
+40 IF $PIECE($GET(MHVPROC(1)),"^",1)=0
SET ERR="1^"_$PIECE($GET(MHVPROC(1)),"^",2)
+41 DO XITLOG(LOGND,HIT)
+42 ;
+43 QUIT
SMPPRB(QRY,ERR,DATAROOT) ; returns Patient Problem list Data
+1 ;
+2 ; return provider data in DATAROOT
+3 ; QRY, ERR passed by ref.
+4 ;
+5 ; Input:
+6 ; QRY - Query array
+7 ;
+8 ; DATAROOT - Root of array to hold extract data
+9 ;
+10 ; Output:
+11 ; DATAROOT - Populated data array
+12 ; includes number of hits and timestamp
+13 ; ERR - Errors during extraction, zero on success
+14 ;
+15 NEW EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVPRDUZ,MHVACIEN,MHVSTRING,MHVDSS,MHVCOUNT,X
+16 ;
+17 ; node for logging
SET LOGND=$TEXT(+0)_"^SMPPRB"
+18 DO LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
+19 ; needed vars.
+20 SET ERR=0
SET EXTIME=$$NOW^XLFDT
SET HIT=0
+21 ;
+22 ; clean up residue
KILL @DATAROOT
+23 SET HIT=0
+24 SET MHVCOUNT=0
+25 ; All validations should be in Validation routine.
+26 SET MHVPATICN=$GET(QRY("PICN"))
+27 SET MHVSTRING=MHVPATICN
+28 DO DIAGPL^MHVUMRPC(.MHVPRB,.MHVSTRING)
+29 FOR
SET MHVCOUNT=$ORDER(MHVPRB(MHVCOUNT))
if 'MHVCOUNT!($PIECE(MHVPRB(1),"^",1)=0)
QUIT
Begin DoDot:1
+30 SET HIT=HIT+1
+31 SET @DATAROOT@(HIT)=MHVPRB(MHVCOUNT)
End DoDot:1
+32 ;
+33 SET MHVC=1
+34 IF $PIECE($GET(@DATAROOT@(MHVC)),"^",2)=0
SET HIT=0
+35 ; hits ^ time
SET @DATAROOT=HIT_U_EXTIME
+36 IF $PIECE($GET(MHVPRB(1)),"^",1)=0
SET ERR="1^"_$PIECE($GET(MHVPRB(1)),"^",2)
+37 DO XITLOG(LOGND,HIT)
+38 ;
+39 QUIT
SMDIAG(QRY,ERR,DATAROOT) ; returns Diagnosis Search results
+1 ;
+2 ; return provider data in DATAROOT
+3 ; QRY, ERR passed by ref.
+4 ;
+5 ; Input:
+6 ; QRY - Query array
+7 ;
+8 ; DATAROOT - Root of array to hold extract data
+9 ;
+10 ; Output:
+11 ; DATAROOT - Populated data array
+12 ; includes number of hits and timestamp
+13 ; ERR - Errors during extraction, zero on success
+14 ;
+15 NEW EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVPRDUZ,MHVACIEN,MHVSTRING,MHVDSS,MHVCOUNT,X,MHVSCHSTR
+16 ;
+17 ; node for logging
SET LOGND=$TEXT(+0)_"^SMDIAG"
+18 DO LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
+19 ; needed vars.
+20 SET ERR=0
SET EXTIME=$$NOW^XLFDT
SET HIT=0
+21 ;
+22 ; clean up residue
KILL @DATAROOT
+23 SET HIT=0
+24 SET MHVCOUNT=0
+25 ; All validations should be in Validation routine.
+26 SET MHVSCHSTR=$GET(QRY("DSRCH"))
+27 SET MHVSTRING="757.01^"_MHVSCHSTR
+28 DO DIAGSRCH^MHVUMRPC(.MHVPRB,.MHVSTRING)
+29 FOR
SET MHVCOUNT=$ORDER(MHVPRB(MHVCOUNT))
if 'MHVCOUNT!($PIECE(MHVPRB(1),"^",1)=0)
QUIT
Begin DoDot:1
+30 SET HIT=HIT+1
+31 SET @DATAROOT@(HIT)=MHVPRB(MHVCOUNT)
End DoDot:1
+32 ;
+33 SET MHVC=1
+34 IF $PIECE($GET(@DATAROOT@(MHVC)),"^",2)=0
SET HIT=0
+35 ; hits ^ time
SET @DATAROOT=HIT_U_EXTIME
+36 IF $PIECE($GET(MHVPRB(1)),"^",2)=0
SET ERR="1^"_$PIECE($GET(MHVPRB(1)),"^",3)
+37 DO XITLOG(LOGND,HIT)
+38 ;
+39 QUIT
SMFILE(QRY,ERR,DATAROOT) ; File Workload Credit
+1 ;
+2 ; return provider data in DATAROOT
+3 ; QRY, ERR passed by ref.
+4 ;
+5 ; Input:
+6 ; QRY - Query array
+7 ;
+8 ; DATAROOT - Root of array to hold extract data
+9 ;
+10 ; Output:
+11 ; DATAROOT - Populated data array
+12 ; includes number of hits and timestamp
+13 ; ERR - Errors during extraction, zero on success
+14 ;
+15 NEW EXTIME,HIT,KEYNM,LOGND,CLINAR,MHVSTR,MHVCOUNT,X
+16 ;
+17 ;FILE^LOCATION^DSS UNIT^CATEGORY^PROCEDURE DATE TIME^PROCEDURE^PATIENT IEN^ORDERING SECTION^ENTER BY^PAT STATUS^PROVIDER^DX^
+18 ;ASSOC CLINIC^PATIENT STATUS AND CLASSIFICATION DATA^ELIGIBILITY IEN
+19 ;
+20 ; node for logging
SET LOGND=$TEXT(+0)_"^SMDIAG"
+21 DO LOG^MHVUL2(LOGND,"BEGIN","S","TRACE")
+22 ; needed vars.
+23 SET ERR=0
SET EXTIME=$$NOW^XLFDT
SET HIT=0
+24 ;
+25 ; clean up residue
KILL @DATAROOT
+26 SET HIT=0
+27 SET MHVCOUNT=0
+28 ; All validations should be in Validation routine.
+29 SET MHVSTR=$GET(QRY("ECFILE"))_"^"_$GET(QRY("ECL"))_"^"_$GET(QRY("ECD"))_"^"_$GET(QRY("ECC"))_"^"_$GET(QRY("ECDT"))_"^"
+30 SET MHVSTR=MHVSTR_$GET(QRY("ECP"))_"^"_$GET(QRY("ECICN"))_"^"_$GET(QRY("ECMN"))_"^"_$GET(QRY("ECDUZ"))_"^"_$GET(QRY("ECPTSTAT"))_"^"
+31 SET MHVSTR=MHVSTR_$GET(QRY("ECU"))_"^"_$GET(QRY("ECDX"))_"^"_$GET(QRY("EC4"))_"^"_$GET(QRY("ECELCL"))
+32 DO FILE^MHVECFLR(.MHVPRB,.MHVSTR)
+33 SET HIT=HIT+1
+34 SET @DATAROOT@(HIT)=MHVPRB(1)
+35 ;
+36 ; hits ^ time
SET @DATAROOT=HIT_U_EXTIME
+37 DO XITLOG(LOGND,HIT)
+38 ;
+39 QUIT
XITLOG(ND,HT) ; exit log
+1 DO LOG^MHVUL2(ND,HT_" HITS","S","TRACE")
+2 DO LOG^MHVUL2(ND,"END","S","TRACE")
QUIT
+3 QUIT