ECU1RPC ;ALB/ACS - Event Capture Spreadsheet Utilities ;12/5/22 11:45
;;2.0;EVENT CAPTURE ;**25,30,49,61,131,139,159**;8 May 96;Build 61
;
; Reference to ^TMP supported by SACC 2.3.2.5.1
; Reference to ^XLFSTR in ICR #10104
;
;----------------------------------------------------------------------
;
;INPUT ECDATA - Contains column headers or a row of Event Capture
; spreadshet data
;
;
;OTHER ^TMP($J,"COLS" array will store the column header order
;
;----------------------------------------------------------------------
;======================================================================
;MODIFICATIONS:
;
;08/2001 EC*2.0*30 Changed column header from 'Station' to
; 'Location'.
;08/2016 EC*2.0*131 Added many new columns
;======================================================================
;
ECHDRS(ECDATA) ;
;
;--kill temporary file
K ^TMP($J,"COLS")
N PIECENUM,NUMCOLS
;
; --Set up column header order
S NUMCOLS=$L(ECDATA,U)
;
; --Remove first piece "COLHEADERS" from colum header string--
S ECDATA=$P(ECDATA,U,2,NUMCOLS)
S NUMCOLS=$L(ECDATA,U)
;
; --Spin through each piece in string and assign 'piece' value
F PIECENUM=1:1 Q:PIECENUM>NUMCOLS D
. S DATA=$P(ECDATA,U,PIECENUM)
. I DATA["Record Num" S ECRECPC=PIECENUM Q
. I DATA["Location" S ECSTAPC=PIECENUM Q
. I DATA["SSN" S ECSSNPC=PIECENUM Q
. I DATA["Pat LName" S ECPATLPC=PIECENUM Q
. I DATA["Pat FName" S ECPATFPC=PIECENUM Q
. I DATA["Unit Name" S ECDSSPC=PIECENUM Q
. I DATA["DSS Department" S ECDCMPC=PIECENUM Q ;139 Updated column header name
. I DATA["Unit IEN" S ECUNITPC=PIECENUM Q
. I DATA["Proc" S ECPROCPC=PIECENUM Q
. I DATA["Volume" S ECVOLPC=PIECENUM Q
. I DATA["Ordering Sect" S ECOSPC=PIECENUM Q
. I DATA["Prov 1" S ECPRV1PC=PIECENUM Q ;131
. I DATA["Prov 2" S ECPRV2PC=PIECENUM Q ;131
. I DATA["Prov 3" S ECPRV3PC=PIECENUM Q ;131
. I DATA["Prov 4" S ECPRV4PC=PIECENUM Q ;131
. I DATA["Prov 5" S ECPRV5PC=PIECENUM Q ;131
. I DATA["Prov 6" S ECPRV6PC=PIECENUM Q ;131
. I DATA["Prov 7" S ECPRV7PC=PIECENUM Q ;131
. I DATA["Date/Time" S ECENCPC=PIECENUM Q
. I DATA["Category" S ECCATPC=PIECENUM Q
. I DATA["Diag" S ECDXPC=PIECENUM Q
. I DATA["Sec Dx 1" S ECSEC1PC=PIECENUM Q ;159
. I DATA["Sec Dx 2" S ECSEC2PC=PIECENUM Q ;159
. I DATA["Sec Dx 3" S ECSEC3PC=PIECENUM Q ;159
. I DATA["Sec Dx 4" S ECSEC4PC=PIECENUM Q ;159
. I DATA["Assoc Clin Name" S ECCLNNPC=PIECENUM Q ;131
. I DATA["Assoc Clin IEN" S ECCLNIPC=PIECENUM Q ;131
. I DATA["Mod 1" S ECMOD1PC=PIECENUM Q ;131
. I DATA["Mod 2" S ECMOD2PC=PIECENUM Q ;131
. I DATA["Mod 3" S ECMOD3PC=PIECENUM Q ;131
. I DATA["Mod 4" S ECMOD4PC=PIECENUM Q ;131
. I DATA["Mod 5" S ECMOD5PC=PIECENUM Q ;131
. I DATA["Agent" S ECAOPC=PIECENUM Q ;131
. I DATA["Ion" S ECIRPC=PIECENUM Q ;131
. I DATA["Service" S ECSCPC=PIECENUM Q ;131
. I DATA["SW A" S ECSWAPC=PIECENUM Q ;131
. I DATA["Mil Sexual" S ECMSTPC=PIECENUM Q ;131
. I DATA["Head" S ECHNCPC=PIECENUM Q ;131
. I DATA["Combat" S ECCVPC=PIECENUM Q ;131
. I DATA["SHAD" S ECSHADPC=PIECENUM Q ;131
. I DATA["Camp" S ECCLPC=PIECENUM Q ;131
. ;
. I DATA["Pat Stat" S ECPSTATV=+DATA Q
. I DATA["Override Deceased" S ECDECPAT=+DATA Q
. I DATA["Override Duplicate" S ECFILDUP=+DATA
;
;--Move column header piece numbers into Temp file ^TMP($J,"COLS")
; for future reference
;
K ^TMP($J,"COLS")
S ^TMP($J,"COLS","ECRECPC")=ECRECPC
S ^TMP($J,"COLS","ECSTAPC")=ECSTAPC
S ^TMP($J,"COLS","ECSSNPC")=ECSSNPC
S ^TMP($J,"COLS","ECPATLPC")=ECPATLPC
S ^TMP($J,"COLS","ECPATFPC")=ECPATFPC
S ^TMP($J,"COLS","ECDSSPC")=ECDSSPC
S ^TMP($J,"COLS","ECDCMPC")=ECDCMPC
S ^TMP($J,"COLS","ECUNITPC")=ECUNITPC
S ^TMP($J,"COLS","ECPROCPC")=ECPROCPC
S ^TMP($J,"COLS","ECVOLPC")=ECVOLPC
S ^TMP($J,"COLS","ECOSPC")=ECOSPC
S ^TMP($J,"COLS","ECPRV1PC")=ECPRV1PC ;131
S ^TMP($J,"COLS","ECENCPC")=ECENCPC
S ^TMP($J,"COLS","ECCATPC")=ECCATPC
S ^TMP($J,"COLS","ECDXPC")=ECDXPC
S ^TMP($J,"COLS","ECSEC1PC")=ECSEC1PC ;159
S ^TMP($J,"COLS","ECSEC2PC")=ECSEC2PC ;159
S ^TMP($J,"COLS","ECSEC3PC")=ECSEC3PC ;159
S ^TMP($J,"COLS","ECSEC4PC")=ECSEC4PC ;159
S ^TMP($J,"COLS","ECCLNNPC")=ECCLNNPC ;131
;131 New entries added here
S ^TMP($J,"COLS","ECCLNIPC")=ECCLNIPC
S ^TMP($J,"COLS","ECMOD1PC")=ECMOD1PC
S ^TMP($J,"COLS","ECMOD2PC")=ECMOD2PC
S ^TMP($J,"COLS","ECMOD3PC")=ECMOD3PC
S ^TMP($J,"COLS","ECMOD4PC")=ECMOD4PC
S ^TMP($J,"COLS","ECMOD5PC")=ECMOD5PC
S ^TMP($J,"COLS","ECAOPC")=ECAOPC
S ^TMP($J,"COLS","ECIRPC")=ECIRPC
S ^TMP($J,"COLS","ECSCPC")=ECSCPC
S ^TMP($J,"COLS","ECSWAPC")=ECSWAPC
S ^TMP($J,"COLS","ECMSTPC")=ECMSTPC
S ^TMP($J,"COLS","ECHNCPC")=ECHNCPC
S ^TMP($J,"COLS","ECCVPC")=ECCVPC
S ^TMP($J,"COLS","ECSHADPC")=ECSHADPC
S ^TMP($J,"COLS","ECCLPC")=ECCLPC
S ^TMP($J,"COLS","ECPRV2PC")=ECPRV2PC
S ^TMP($J,"COLS","ECPRV3PC")=ECPRV3PC
S ^TMP($J,"COLS","ECPRV4PC")=ECPRV4PC
S ^TMP($J,"COLS","ECPRV5PC")=ECPRV5PC
S ^TMP($J,"COLS","ECPRV6PC")=ECPRV6PC
S ^TMP($J,"COLS","ECPRV7PC")=ECPRV7PC
S ^TMP($J,"COLS","ECPSTATV")=ECPSTATV
S ^TMP($J,"COLS","ECDECPAT")=ECDECPAT
S ^TMP($J,"COLS","ECFILDUP")=ECFILDUP
;
Q
;
GETDATA(ECDATA) ;
;
N NUM ;131
;--Get data piece numbers and uploaded data values
S ECRECPC=$G(^TMP($J,"COLS","ECRECPC"))
S ECRECV=$P(ECDATA,U,ECRECPC)
;
S ECSTAPC=$G(^TMP($J,"COLS","ECSTAPC"))
S ECSTAV=$P(ECDATA,U,ECSTAPC)
;
S ECSSNPC=$G(^TMP($J,"COLS","ECSSNPC"))
I ECSSNPC S ECSSNV=$P(ECDATA,U,ECSSNPC)
;
S ECPATLPC=$G(^TMP($J,"COLS","ECPATLPC"))
S ECPATLV=$$UP^XLFSTR($P(ECDATA,U,ECPATLPC)) ;131 Convert to upper case
;
S ECPATFPC=$G(^TMP($J,"COLS","ECPATFPC"))
S ECPATFV=$$UP^XLFSTR($P(ECDATA,U,ECPATFPC)) ;131 Convert to upper case
; --concatenate patient name into one string, comma separated
S ECPATV=ECPATLV_","_ECPATFV
;
S ECDSSPC=$G(^TMP($J,"COLS","ECDSSPC"))
S ECDSSV=$P(ECDATA,U,ECDSSPC)
;
S ECDCMPC=$G(^TMP($J,"COLS","ECDCMPC"))
S ECDCMV=$P(ECDATA,U,ECDCMPC)
;
S ECUNITPC=$G(^TMP($J,"COLS","ECUNITPC"))
S ECUNITV=$P(ECDATA,U,ECUNITPC)
;
S ECPROCPC=$G(^TMP($J,"COLS","ECPROCPC"))
S ECPROCV=$P(ECDATA,U,ECPROCPC)
;
S ECVOLPC=$G(^TMP($J,"COLS","ECVOLPC"))
S ECVOLV=$P(ECDATA,U,ECVOLPC)
;
S ECOSPC=$G(^TMP($J,"COLS","ECOSPC"))
S ECOSV=$P(ECDATA,U,ECOSPC)
;Get all the provider values
;
F NUM=1:1:7 S @("ECPRV"_NUM_"V")=$$UP^XLFSTR($P(ECDATA,U,$G(^TMP($J,"COLS",("ECPRV"_NUM_"PC"))))),@("ECPRV"_NUM_"PC")=$G(^TMP($J,"COLS",("ECPRV"_NUM_"PC"))) ;131
;
S ECENCPC=$G(^TMP($J,"COLS","ECENCPC"))
S ECENCV=$P(ECDATA,U,ECENCPC),ECENCV=$TR(ECENCV," ","")
;
S ECCATPC=$G(^TMP($J,"COLS","ECCATPC"))
S ECCATV=$P(ECDATA,U,ECCATPC)
;
S ECDXPC=$G(^TMP($J,"COLS","ECDXPC"))
S ECDXV=$P(ECDATA,U,ECDXPC)
;
; Secondary Diagnoses added for Patch 159
S ECSEC1PC=$G(^TMP($J,"COLS","ECSEC1PC"))
S ECSEC1V=$P(ECDATA,U,ECSEC1PC)
S ECSEC2PC=$G(^TMP($J,"COLS","ECSEC2PC"))
S ECSEC2V=$P(ECDATA,U,ECSEC2PC)
S ECSEC3PC=$G(^TMP($J,"COLS","ECSEC3PC"))
S ECSEC3V=$P(ECDATA,U,ECSEC3PC)
S ECSEC4PC=$G(^TMP($J,"COLS","ECSEC4PC"))
S ECSEC4V=$P(ECDATA,U,ECSEC4PC)
;
S ECCLNNPC=$G(^TMP($J,"COLS","ECCLNNPC")) ;131
S ECCLNNV=$P(ECDATA,U,ECCLNNPC) ;131
S ECCLNIV=$P(ECDATA,U,$G(^TMP($J,"COLS","ECCLNIPC"))),ECCLNIPC=$G(^TMP($J,"COLS","ECCLNIPC")) ;131
;
;Get all CPT Mod values
F NUM=1:1:5 S @("ECMOD"_NUM_"V")=$$UP^XLFSTR($P(ECDATA,U,$G(^TMP($J,"COLS",("ECMOD"_NUM_"PC"))))),@("ECMOD"_NUM_"PC")=$G(^TMP($J,"COLS",("ECMOD"_NUM_"PC"))) ;131
;
;131, all patient eligibilities added in this section
S ECAOV=$P(ECDATA,U,$G(^TMP($J,"COLS","ECAOPC"))),ECAOPC=$G(^TMP($J,"COLS","ECAOPC"))
S ECIRV=$P(ECDATA,U,$G(^TMP($J,"COLS","ECIRPC"))),ECIRPC=$G(^TMP($J,"COLS","ECIRPC"))
S ECSCV=$P(ECDATA,U,$G(^TMP($J,"COLS","ECSCPC"))),ECSCPC=$G(^TMP($J,"COLS","ECSCPC"))
S ECSWAV=$P(ECDATA,U,$G(^TMP($J,"COLS","ECSWAPC"))),ECSWAPC=$G(^TMP($J,"COLS","ECSWAPC"))
S ECMSTV=$P(ECDATA,U,$G(^TMP($J,"COLS","ECMSTPC"))),ECMSTPC=$G(^TMP($J,"COLS","ECMSTPC"))
S ECHNCV=$P(ECDATA,U,$G(^TMP($J,"COLS","ECHNCPC"))),ECHNCPC=$G(^TMP($J,"COLS","ECHNCPC"))
S ECCVV=$P(ECDATA,U,$G(^TMP($J,"COLS","ECCVPC"))),ECCVPC=$G(^TMP($J,"COLS","ECCVPC"))
S ECSHADV=$P(ECDATA,U,$G(^TMP($J,"COLS","ECSHADPC"))),ECSHADPC=$G(^TMP($J,"COLS","ECSHADPC"))
S ECCLV=$P(ECDATA,U,$G(^TMP($J,"COLS","ECCLPC"))),ECCLPC=$G(^TMP($J,"COLS","ECCLPC"))
;
S ECPSTATV=$G(^TMP($J,"COLS","ECPSTATV"))
;
S ECDECPAT=$G(^TMP($J,"COLS","ECDECPAT"))
;
S ECFILDUP=$G(^TMP($J,"COLS","ECFILDUP"))
;
END Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECU1RPC 8687 printed Oct 16, 2024@17:59:44 Page 2
ECU1RPC ;ALB/ACS - Event Capture Spreadsheet Utilities ;12/5/22 11:45
+1 ;;2.0;EVENT CAPTURE ;**25,30,49,61,131,139,159**;8 May 96;Build 61
+2 ;
+3 ; Reference to ^TMP supported by SACC 2.3.2.5.1
+4 ; Reference to ^XLFSTR in ICR #10104
+5 ;
+6 ;----------------------------------------------------------------------
+7 ;
+8 ;INPUT ECDATA - Contains column headers or a row of Event Capture
+9 ; spreadshet data
+10 ;
+11 ;
+12 ;OTHER ^TMP($J,"COLS" array will store the column header order
+13 ;
+14 ;----------------------------------------------------------------------
+15 ;======================================================================
+16 ;MODIFICATIONS:
+17 ;
+18 ;08/2001 EC*2.0*30 Changed column header from 'Station' to
+19 ; 'Location'.
+20 ;08/2016 EC*2.0*131 Added many new columns
+21 ;======================================================================
+22 ;
ECHDRS(ECDATA) ;
+1 ;
+2 ;--kill temporary file
+3 KILL ^TMP($JOB,"COLS")
+4 NEW PIECENUM,NUMCOLS
+5 ;
+6 ; --Set up column header order
+7 SET NUMCOLS=$LENGTH(ECDATA,U)
+8 ;
+9 ; --Remove first piece "COLHEADERS" from colum header string--
+10 SET ECDATA=$PIECE(ECDATA,U,2,NUMCOLS)
+11 SET NUMCOLS=$LENGTH(ECDATA,U)
+12 ;
+13 ; --Spin through each piece in string and assign 'piece' value
+14 FOR PIECENUM=1:1
if PIECENUM>NUMCOLS
QUIT
Begin DoDot:1
+15 SET DATA=$PIECE(ECDATA,U,PIECENUM)
+16 IF DATA["Record Num"
SET ECRECPC=PIECENUM
QUIT
+17 IF DATA["Location"
SET ECSTAPC=PIECENUM
QUIT
+18 IF DATA["SSN"
SET ECSSNPC=PIECENUM
QUIT
+19 IF DATA["Pat LName"
SET ECPATLPC=PIECENUM
QUIT
+20 IF DATA["Pat FName"
SET ECPATFPC=PIECENUM
QUIT
+21 IF DATA["Unit Name"
SET ECDSSPC=PIECENUM
QUIT
+22 ;139 Updated column header name
IF DATA["DSS Department"
SET ECDCMPC=PIECENUM
QUIT
+23 IF DATA["Unit IEN"
SET ECUNITPC=PIECENUM
QUIT
+24 IF DATA["Proc"
SET ECPROCPC=PIECENUM
QUIT
+25 IF DATA["Volume"
SET ECVOLPC=PIECENUM
QUIT
+26 IF DATA["Ordering Sect"
SET ECOSPC=PIECENUM
QUIT
+27 ;131
IF DATA["Prov 1"
SET ECPRV1PC=PIECENUM
QUIT
+28 ;131
IF DATA["Prov 2"
SET ECPRV2PC=PIECENUM
QUIT
+29 ;131
IF DATA["Prov 3"
SET ECPRV3PC=PIECENUM
QUIT
+30 ;131
IF DATA["Prov 4"
SET ECPRV4PC=PIECENUM
QUIT
+31 ;131
IF DATA["Prov 5"
SET ECPRV5PC=PIECENUM
QUIT
+32 ;131
IF DATA["Prov 6"
SET ECPRV6PC=PIECENUM
QUIT
+33 ;131
IF DATA["Prov 7"
SET ECPRV7PC=PIECENUM
QUIT
+34 IF DATA["Date/Time"
SET ECENCPC=PIECENUM
QUIT
+35 IF DATA["Category"
SET ECCATPC=PIECENUM
QUIT
+36 IF DATA["Diag"
SET ECDXPC=PIECENUM
QUIT
+37 ;159
IF DATA["Sec Dx 1"
SET ECSEC1PC=PIECENUM
QUIT
+38 ;159
IF DATA["Sec Dx 2"
SET ECSEC2PC=PIECENUM
QUIT
+39 ;159
IF DATA["Sec Dx 3"
SET ECSEC3PC=PIECENUM
QUIT
+40 ;159
IF DATA["Sec Dx 4"
SET ECSEC4PC=PIECENUM
QUIT
+41 ;131
IF DATA["Assoc Clin Name"
SET ECCLNNPC=PIECENUM
QUIT
+42 ;131
IF DATA["Assoc Clin IEN"
SET ECCLNIPC=PIECENUM
QUIT
+43 ;131
IF DATA["Mod 1"
SET ECMOD1PC=PIECENUM
QUIT
+44 ;131
IF DATA["Mod 2"
SET ECMOD2PC=PIECENUM
QUIT
+45 ;131
IF DATA["Mod 3"
SET ECMOD3PC=PIECENUM
QUIT
+46 ;131
IF DATA["Mod 4"
SET ECMOD4PC=PIECENUM
QUIT
+47 ;131
IF DATA["Mod 5"
SET ECMOD5PC=PIECENUM
QUIT
+48 ;131
IF DATA["Agent"
SET ECAOPC=PIECENUM
QUIT
+49 ;131
IF DATA["Ion"
SET ECIRPC=PIECENUM
QUIT
+50 ;131
IF DATA["Service"
SET ECSCPC=PIECENUM
QUIT
+51 ;131
IF DATA["SW A"
SET ECSWAPC=PIECENUM
QUIT
+52 ;131
IF DATA["Mil Sexual"
SET ECMSTPC=PIECENUM
QUIT
+53 ;131
IF DATA["Head"
SET ECHNCPC=PIECENUM
QUIT
+54 ;131
IF DATA["Combat"
SET ECCVPC=PIECENUM
QUIT
+55 ;131
IF DATA["SHAD"
SET ECSHADPC=PIECENUM
QUIT
+56 ;131
IF DATA["Camp"
SET ECCLPC=PIECENUM
QUIT
+57 ;
+58 IF DATA["Pat Stat"
SET ECPSTATV=+DATA
QUIT
+59 IF DATA["Override Deceased"
SET ECDECPAT=+DATA
QUIT
+60 IF DATA["Override Duplicate"
SET ECFILDUP=+DATA
End DoDot:1
+61 ;
+62 ;--Move column header piece numbers into Temp file ^TMP($J,"COLS")
+63 ; for future reference
+64 ;
+65 KILL ^TMP($JOB,"COLS")
+66 SET ^TMP($JOB,"COLS","ECRECPC")=ECRECPC
+67 SET ^TMP($JOB,"COLS","ECSTAPC")=ECSTAPC
+68 SET ^TMP($JOB,"COLS","ECSSNPC")=ECSSNPC
+69 SET ^TMP($JOB,"COLS","ECPATLPC")=ECPATLPC
+70 SET ^TMP($JOB,"COLS","ECPATFPC")=ECPATFPC
+71 SET ^TMP($JOB,"COLS","ECDSSPC")=ECDSSPC
+72 SET ^TMP($JOB,"COLS","ECDCMPC")=ECDCMPC
+73 SET ^TMP($JOB,"COLS","ECUNITPC")=ECUNITPC
+74 SET ^TMP($JOB,"COLS","ECPROCPC")=ECPROCPC
+75 SET ^TMP($JOB,"COLS","ECVOLPC")=ECVOLPC
+76 SET ^TMP($JOB,"COLS","ECOSPC")=ECOSPC
+77 ;131
SET ^TMP($JOB,"COLS","ECPRV1PC")=ECPRV1PC
+78 SET ^TMP($JOB,"COLS","ECENCPC")=ECENCPC
+79 SET ^TMP($JOB,"COLS","ECCATPC")=ECCATPC
+80 SET ^TMP($JOB,"COLS","ECDXPC")=ECDXPC
+81 ;159
SET ^TMP($JOB,"COLS","ECSEC1PC")=ECSEC1PC
+82 ;159
SET ^TMP($JOB,"COLS","ECSEC2PC")=ECSEC2PC
+83 ;159
SET ^TMP($JOB,"COLS","ECSEC3PC")=ECSEC3PC
+84 ;159
SET ^TMP($JOB,"COLS","ECSEC4PC")=ECSEC4PC
+85 ;131
SET ^TMP($JOB,"COLS","ECCLNNPC")=ECCLNNPC
+86 ;131 New entries added here
+87 SET ^TMP($JOB,"COLS","ECCLNIPC")=ECCLNIPC
+88 SET ^TMP($JOB,"COLS","ECMOD1PC")=ECMOD1PC
+89 SET ^TMP($JOB,"COLS","ECMOD2PC")=ECMOD2PC
+90 SET ^TMP($JOB,"COLS","ECMOD3PC")=ECMOD3PC
+91 SET ^TMP($JOB,"COLS","ECMOD4PC")=ECMOD4PC
+92 SET ^TMP($JOB,"COLS","ECMOD5PC")=ECMOD5PC
+93 SET ^TMP($JOB,"COLS","ECAOPC")=ECAOPC
+94 SET ^TMP($JOB,"COLS","ECIRPC")=ECIRPC
+95 SET ^TMP($JOB,"COLS","ECSCPC")=ECSCPC
+96 SET ^TMP($JOB,"COLS","ECSWAPC")=ECSWAPC
+97 SET ^TMP($JOB,"COLS","ECMSTPC")=ECMSTPC
+98 SET ^TMP($JOB,"COLS","ECHNCPC")=ECHNCPC
+99 SET ^TMP($JOB,"COLS","ECCVPC")=ECCVPC
+100 SET ^TMP($JOB,"COLS","ECSHADPC")=ECSHADPC
+101 SET ^TMP($JOB,"COLS","ECCLPC")=ECCLPC
+102 SET ^TMP($JOB,"COLS","ECPRV2PC")=ECPRV2PC
+103 SET ^TMP($JOB,"COLS","ECPRV3PC")=ECPRV3PC
+104 SET ^TMP($JOB,"COLS","ECPRV4PC")=ECPRV4PC
+105 SET ^TMP($JOB,"COLS","ECPRV5PC")=ECPRV5PC
+106 SET ^TMP($JOB,"COLS","ECPRV6PC")=ECPRV6PC
+107 SET ^TMP($JOB,"COLS","ECPRV7PC")=ECPRV7PC
+108 SET ^TMP($JOB,"COLS","ECPSTATV")=ECPSTATV
+109 SET ^TMP($JOB,"COLS","ECDECPAT")=ECDECPAT
+110 SET ^TMP($JOB,"COLS","ECFILDUP")=ECFILDUP
+111 ;
+112 QUIT
+113 ;
GETDATA(ECDATA) ;
+1 ;
+2 ;131
NEW NUM
+3 ;--Get data piece numbers and uploaded data values
+4 SET ECRECPC=$GET(^TMP($JOB,"COLS","ECRECPC"))
+5 SET ECRECV=$PIECE(ECDATA,U,ECRECPC)
+6 ;
+7 SET ECSTAPC=$GET(^TMP($JOB,"COLS","ECSTAPC"))
+8 SET ECSTAV=$PIECE(ECDATA,U,ECSTAPC)
+9 ;
+10 SET ECSSNPC=$GET(^TMP($JOB,"COLS","ECSSNPC"))
+11 IF ECSSNPC
SET ECSSNV=$PIECE(ECDATA,U,ECSSNPC)
+12 ;
+13 SET ECPATLPC=$GET(^TMP($JOB,"COLS","ECPATLPC"))
+14 ;131 Convert to upper case
SET ECPATLV=$$UP^XLFSTR($PIECE(ECDATA,U,ECPATLPC))
+15 ;
+16 SET ECPATFPC=$GET(^TMP($JOB,"COLS","ECPATFPC"))
+17 ;131 Convert to upper case
SET ECPATFV=$$UP^XLFSTR($PIECE(ECDATA,U,ECPATFPC))
+18 ; --concatenate patient name into one string, comma separated
+19 SET ECPATV=ECPATLV_","_ECPATFV
+20 ;
+21 SET ECDSSPC=$GET(^TMP($JOB,"COLS","ECDSSPC"))
+22 SET ECDSSV=$PIECE(ECDATA,U,ECDSSPC)
+23 ;
+24 SET ECDCMPC=$GET(^TMP($JOB,"COLS","ECDCMPC"))
+25 SET ECDCMV=$PIECE(ECDATA,U,ECDCMPC)
+26 ;
+27 SET ECUNITPC=$GET(^TMP($JOB,"COLS","ECUNITPC"))
+28 SET ECUNITV=$PIECE(ECDATA,U,ECUNITPC)
+29 ;
+30 SET ECPROCPC=$GET(^TMP($JOB,"COLS","ECPROCPC"))
+31 SET ECPROCV=$PIECE(ECDATA,U,ECPROCPC)
+32 ;
+33 SET ECVOLPC=$GET(^TMP($JOB,"COLS","ECVOLPC"))
+34 SET ECVOLV=$PIECE(ECDATA,U,ECVOLPC)
+35 ;
+36 SET ECOSPC=$GET(^TMP($JOB,"COLS","ECOSPC"))
+37 SET ECOSV=$PIECE(ECDATA,U,ECOSPC)
+38 ;Get all the provider values
+39 ;
+40 ;131
FOR NUM=1:1:7
SET @("ECPRV"_NUM_"V")=$$UP^XLFSTR($PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS",("ECPRV"_NUM_"PC")))))
SET @("ECPRV"_NUM_"PC")=$GET(^TMP($JOB,"COLS",("ECPRV"_NUM_"PC")))
+41 ;
+42 SET ECENCPC=$GET(^TMP($JOB,"COLS","ECENCPC"))
+43 SET ECENCV=$PIECE(ECDATA,U,ECENCPC)
SET ECENCV=$TRANSLATE(ECENCV," ","")
+44 ;
+45 SET ECCATPC=$GET(^TMP($JOB,"COLS","ECCATPC"))
+46 SET ECCATV=$PIECE(ECDATA,U,ECCATPC)
+47 ;
+48 SET ECDXPC=$GET(^TMP($JOB,"COLS","ECDXPC"))
+49 SET ECDXV=$PIECE(ECDATA,U,ECDXPC)
+50 ;
+51 ; Secondary Diagnoses added for Patch 159
+52 SET ECSEC1PC=$GET(^TMP($JOB,"COLS","ECSEC1PC"))
+53 SET ECSEC1V=$PIECE(ECDATA,U,ECSEC1PC)
+54 SET ECSEC2PC=$GET(^TMP($JOB,"COLS","ECSEC2PC"))
+55 SET ECSEC2V=$PIECE(ECDATA,U,ECSEC2PC)
+56 SET ECSEC3PC=$GET(^TMP($JOB,"COLS","ECSEC3PC"))
+57 SET ECSEC3V=$PIECE(ECDATA,U,ECSEC3PC)
+58 SET ECSEC4PC=$GET(^TMP($JOB,"COLS","ECSEC4PC"))
+59 SET ECSEC4V=$PIECE(ECDATA,U,ECSEC4PC)
+60 ;
+61 ;131
SET ECCLNNPC=$GET(^TMP($JOB,"COLS","ECCLNNPC"))
+62 ;131
SET ECCLNNV=$PIECE(ECDATA,U,ECCLNNPC)
+63 ;131
SET ECCLNIV=$PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS","ECCLNIPC")))
SET ECCLNIPC=$GET(^TMP($JOB,"COLS","ECCLNIPC"))
+64 ;
+65 ;Get all CPT Mod values
+66 ;131
FOR NUM=1:1:5
SET @("ECMOD"_NUM_"V")=$$UP^XLFSTR($PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS",("ECMOD"_NUM_"PC")))))
SET @("ECMOD"_NUM_"PC")=$GET(^TMP($JOB,"COLS",("ECMOD"_NUM_"PC")))
+67 ;
+68 ;131, all patient eligibilities added in this section
+69 SET ECAOV=$PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS","ECAOPC")))
SET ECAOPC=$GET(^TMP($JOB,"COLS","ECAOPC"))
+70 SET ECIRV=$PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS","ECIRPC")))
SET ECIRPC=$GET(^TMP($JOB,"COLS","ECIRPC"))
+71 SET ECSCV=$PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS","ECSCPC")))
SET ECSCPC=$GET(^TMP($JOB,"COLS","ECSCPC"))
+72 SET ECSWAV=$PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS","ECSWAPC")))
SET ECSWAPC=$GET(^TMP($JOB,"COLS","ECSWAPC"))
+73 SET ECMSTV=$PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS","ECMSTPC")))
SET ECMSTPC=$GET(^TMP($JOB,"COLS","ECMSTPC"))
+74 SET ECHNCV=$PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS","ECHNCPC")))
SET ECHNCPC=$GET(^TMP($JOB,"COLS","ECHNCPC"))
+75 SET ECCVV=$PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS","ECCVPC")))
SET ECCVPC=$GET(^TMP($JOB,"COLS","ECCVPC"))
+76 SET ECSHADV=$PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS","ECSHADPC")))
SET ECSHADPC=$GET(^TMP($JOB,"COLS","ECSHADPC"))
+77 SET ECCLV=$PIECE(ECDATA,U,$GET(^TMP($JOB,"COLS","ECCLPC")))
SET ECCLPC=$GET(^TMP($JOB,"COLS","ECCLPC"))
+78 ;
+79 SET ECPSTATV=$GET(^TMP($JOB,"COLS","ECPSTATV"))
+80 ;
+81 SET ECDECPAT=$GET(^TMP($JOB,"COLS","ECDECPAT"))
+82 ;
+83 SET ECFILDUP=$GET(^TMP($JOB,"COLS","ECFILDUP"))
+84 ;
END QUIT