ACHSEOBE ; IHS/ITSC/PMF - SET VARIABLES FROM NON-PROCESSED EOBRS FILE ; [ 10/16/2001 8:16 AM ]
;;3.1;CONTRACT HEALTH MGMT SYSTEM;**23**;JUN 11, 2001;Build 43
;ACHS*3.1*23 ADDED NEW PROCEDURE FIELDS IN RECORD "G"
;
GET ;GET THE FIELD VALUES FROM 'CHS NON-PROCESSED EOBRS' FILE
;ACHSNON0 = NODE 0
;ACHSNON1 = NODE 1
;ACHSNON2 = NODE 2
;ACHSNON4 = NODE 4
;
S ACHSNON0=$G(^ACHSEOBE(ACHSNON,0))
S ACHSNON1=$G(^ACHSEOBE(ACHSNON,1))
S ACHSNON2=$G(^ACHSEOBE(ACHSNON,2))
S ACHSNON4=$G(^ACHSEOBE(ACHSNON,4))
;
S ACHSEOBR("A",12)=$P(ACHSNON0,U) ;'NAME'
S ACHSEOBR("A",1)=$P(ACHSNON0,U,2) ;'AREA OFFICE'
S ACHSEOBR("A",2)=$P(ACHSNON0,U,3) ;'SERVICE UNIT'
S ACHSEOBR("A",5)=$P(ACHSNON0,U,4) ;'CLAIM NUMBER'
S ACHSEOBR("A",8)=$P(ACHSNON0,U,5) ;'CLAIM SEQUENCE COUNT'
S ACHSEOBR("A",9)=$P(ACHSNON0,U,6) ;'CHECK NUMBER'
S ACHSEOBR("A",10)=$P(ACHSNON0,U,7) ;'REMITTANCE NUMBER'
S ACHSEOBR("A",11)=$P(ACHSNON0,U,8) ;'PAID DATE'
S ACHSEOBR("A",13)=$P(ACHSNON0,U,9) ;'CERTIFICATE NUMBER'
S ACHSEOBR("A",14)=$P(ACHSNON0,U,10) ;'FACILITY CODE'
S ACHSEOBR("A",15)=$P(ACHSNON0,U,11) ;'DOCUMENTATION TYPE'
;
S ACHSEOBR("B",8)=$P(ACHSNON1,U) ;'PATIENT NAME'
S ACHSEOBR("B",9)=$P(ACHSNON1,U,2) ;'HEALTH RECORD NUMBER'
S ACHSEOBR("B",10)=$P(ACHSNON1,U,3) ;'AUTHORIZATION DATE'
S ACHSEOBR("B",11)=$P(ACHSNON1,U,4) ;'ACTUAL DAYS'
S ACHSEOBR("B",12)=$P(ACHSNON1,U,5) ;'DRG'
;
;
I ACHSEOBR("B",8)?1N.N S ACHSEOBR("B",8)=$P($G(^DPT(ACHSEOBR("B",8),0)),U)
;
S ACHSEOBR("C",8)=$P(ACHSNON1,U,6) ;'COMMON ACCOUNTING NUMBER'
S ACHSEOBR("C",9)=$P(ACHSNON1,U,7) ;'OBJECT CLASS CODE'
S ACHSEOBR("C",10)=$P(ACHSNON1,U,8) ;'SERVICES BILLED'
S ACHSEOBR("C",11)=$P(ACHSNON1,U,9) ;'BLANKET INDICATOR'
S ACHSEOBR("C",12)=$P(ACHSNON1,U,10) ;'CONTRACT NUMBER'
S ACHSEOBR("C",14)=$P(ACHSNON1,U,11) ;'SERVICE START DATE'
S ACHSEOBR("C",15)=$P(ACHSNON1,U,12) ;'SERVICE END DATE'
S ACHSEOBR("C",16)=$P(ACHSNON1,U,13) ;'VENDOR NUMBER'
S ACHSEOBR("C",13)=$P(ACHSNON1,U,14) ;'INTERIM/FINAL INDICATOR'
;
S ACHSEOBR("D",8)=$P(ACHSNON2,U) ;'VENDOR NAME'
S ACHSEOBR("D",9)=$P(ACHSNON2,U,2) ;'BILLED BY PROVIDER'
S ACHSEOBR("D",10)=$P(ACHSNON2,U,3) ;'ALLOWABLE AMOUNT'
S ACHSEOBR("D",11)=$P(ACHSNON2,U,4) ;'PAID BY 3RD PARTY'
;
;
I +ACHSEOBR("D",8)>0 S ACHSEOBR("D",8)=$P($G(^AUTTVNDR(ACHSEOBR("D",8),0)),U)
S ACHSREJ=$P(ACHSNON2,U,14) ;ACHS*3.1*23 AND MOD NXT 9 LINES
S ACHSEOBR(ACHSREJ,8)=$P(ACHSNON2,U,5) ;'IHS COST'
S ACHSEOBR(ACHSREJ,9)=$P(ACHSNON2,U,6) ;'OBLIGATION INDICATOR'
S ACHSEOBR(ACHSREJ,10)=$P(ACHSNON2,U,7) ;'OBLIGATION AMOUNT'
S ACHSEOBR(ACHSREJ,11)=$P(ACHSNON2,U,8) ;'ADJUSTMENT AMOUNT'
S ACHSEOBR(ACHSREJ,12)=$P(ACHSNON2,U,9) ;'DIAGNOSIS CODE 1'
S ACHSEOBR(ACHSREJ,13)=$P(ACHSNON2,U,10) ;'DIAGNOSIS CODE 2'
S ACHSEOBR(ACHSREJ,14)=$P(ACHSNON2,U,11) ;'DIAGNOSIS CODE 3'
S ACHSEOBR(ACHSREJ,15)=$P(ACHSNON2,U,12) ;'DIAGNOSIS CODE 4'
S ACHSEOBR(ACHSREJ,16)=$P(ACHSNON2,U,13) ;'DIAGNOSIS CODE 5'
;
;
S ACHSEOBR("G",8)=$P(ACHSNON4,U) ;'PROCEDURE CODE 1'
S ACHSEOBR("G",9)=$P(ACHSNON4,U,2) ;'PROCEDURE CODE 2'
S ACHSEOBR("G",10)=$P(ACHSNON4,U,3) ;'PROCEDURE CODE 3'
S ACHSEOBR("G",11)=$P(ACHSNON4,U,4) ;'PROCEDURE CODE 4' ;ACHS*3.1*23
S ACHSEOBR("G",12)=$P(ACHSNON4,U,5) ;'PROCEDURE CODE 5' ;ACHS*3.1*23
;
S ACHSCPT=0
K ^TMP("ACHSEOB",$J)
D ACHSF
G END
;
ACHSF ;
S ACHSCPT=$O(^ACHSEOBE(ACHSNON,3,ACHSCPT))
Q:ACHSCPT=""
Q:+ACHSCPT<1
S ^TMP("ACHSEOB",$J,"F",ACHSCPT)=$J(" ",22)_$E($P(^ACHSEOBE(ACHSNON,3,ACHSCPT,0),U,2),2,7)_$E($P(^(0),U,3),2,7)_$P(^(0),U,1)_$P(^(0),U,4)_$P(^(0),U,5)_$P(^(0),U,6)_$P(^(0),U,7)_$P(^(0),U,8)_$P(^(0),U,9)
I $P(^ACHSEOBE(ACHSNON,3,ACHSCPT,0),U,7)[" " G ACHSF
S ACHSEOBR("M","B",$P(^ACHSEOBE(ACHSNON,3,ACHSCPT,0),U,7))=""
G ACHSF
;
END ;
Q
;
ACHSEOBE ; IHS/ITSC/PMF - SET VARIABLES FROM NON-PROCESSED EOBRS FILE ; [ 10/16/2001 8:16 AM ]
+1 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;**23**;JUN 11, 2001;Build 43
+2 ;ACHS*3.1*23 ADDED NEW PROCEDURE FIELDS IN RECORD "G"
+3 ;
GET ;GET THE FIELD VALUES FROM 'CHS NON-PROCESSED EOBRS' FILE
+1 ;ACHSNON0 = NODE 0
+2 ;ACHSNON1 = NODE 1
+3 ;ACHSNON2 = NODE 2
+4 ;ACHSNON4 = NODE 4
+5 ;
+6 SET ACHSNON0=$GET(^ACHSEOBE(ACHSNON,0))
+7 SET ACHSNON1=$GET(^ACHSEOBE(ACHSNON,1))
+8 SET ACHSNON2=$GET(^ACHSEOBE(ACHSNON,2))
+9 SET ACHSNON4=$GET(^ACHSEOBE(ACHSNON,4))
+10 ;
+11 ;'NAME'
SET ACHSEOBR("A",12)=$PIECE(ACHSNON0,U)
+12 ;'AREA OFFICE'
SET ACHSEOBR("A",1)=$PIECE(ACHSNON0,U,2)
+13 ;'SERVICE UNIT'
SET ACHSEOBR("A",2)=$PIECE(ACHSNON0,U,3)
+14 ;'CLAIM NUMBER'
SET ACHSEOBR("A",5)=$PIECE(ACHSNON0,U,4)
+15 ;'CLAIM SEQUENCE COUNT'
SET ACHSEOBR("A",8)=$PIECE(ACHSNON0,U,5)
+16 ;'CHECK NUMBER'
SET ACHSEOBR("A",9)=$PIECE(ACHSNON0,U,6)
+17 ;'REMITTANCE NUMBER'
SET ACHSEOBR("A",10)=$PIECE(ACHSNON0,U,7)
+18 ;'PAID DATE'
SET ACHSEOBR("A",11)=$PIECE(ACHSNON0,U,8)
+19 ;'CERTIFICATE NUMBER'
SET ACHSEOBR("A",13)=$PIECE(ACHSNON0,U,9)
+20 ;'FACILITY CODE'
SET ACHSEOBR("A",14)=$PIECE(ACHSNON0,U,10)
+21 ;'DOCUMENTATION TYPE'
SET ACHSEOBR("A",15)=$PIECE(ACHSNON0,U,11)
+22 ;
+23 ;'PATIENT NAME'
SET ACHSEOBR("B",8)=$PIECE(ACHSNON1,U)
+24 ;'HEALTH RECORD NUMBER'
SET ACHSEOBR("B",9)=$PIECE(ACHSNON1,U,2)
+25 ;'AUTHORIZATION DATE'
SET ACHSEOBR("B",10)=$PIECE(ACHSNON1,U,3)
+26 ;'ACTUAL DAYS'
SET ACHSEOBR("B",11)=$PIECE(ACHSNON1,U,4)
+27 ;'DRG'
SET ACHSEOBR("B",12)=$PIECE(ACHSNON1,U,5)
+28 ;
+29 ;
+30 IF ACHSEOBR("B",8)?1N.N
SET ACHSEOBR("B",8)=$PIECE($GET(^DPT(ACHSEOBR("B",8),0)),U)
+31 ;
+32 ;'COMMON ACCOUNTING NUMBER'
SET ACHSEOBR("C",8)=$PIECE(ACHSNON1,U,6)
+33 ;'OBJECT CLASS CODE'
SET ACHSEOBR("C",9)=$PIECE(ACHSNON1,U,7)
+34 ;'SERVICES BILLED'
SET ACHSEOBR("C",10)=$PIECE(ACHSNON1,U,8)
+35 ;'BLANKET INDICATOR'
SET ACHSEOBR("C",11)=$PIECE(ACHSNON1,U,9)
+36 ;'CONTRACT NUMBER'
SET ACHSEOBR("C",12)=$PIECE(ACHSNON1,U,10)
+37 ;'SERVICE START DATE'
SET ACHSEOBR("C",14)=$PIECE(ACHSNON1,U,11)
+38 ;'SERVICE END DATE'
SET ACHSEOBR("C",15)=$PIECE(ACHSNON1,U,12)
+39 ;'VENDOR NUMBER'
SET ACHSEOBR("C",16)=$PIECE(ACHSNON1,U,13)
+40 ;'INTERIM/FINAL INDICATOR'
SET ACHSEOBR("C",13)=$PIECE(ACHSNON1,U,14)
+41 ;
+42 ;'VENDOR NAME'
SET ACHSEOBR("D",8)=$PIECE(ACHSNON2,U)
+43 ;'BILLED BY PROVIDER'
SET ACHSEOBR("D",9)=$PIECE(ACHSNON2,U,2)
+44 ;'ALLOWABLE AMOUNT'
SET ACHSEOBR("D",10)=$PIECE(ACHSNON2,U,3)
+45 ;'PAID BY 3RD PARTY'
SET ACHSEOBR("D",11)=$PIECE(ACHSNON2,U,4)
+46 ;
+47 ;
+48 IF +ACHSEOBR("D",8)>0
SET ACHSEOBR("D",8)=$PIECE($GET(^AUTTVNDR(ACHSEOBR("D",8),0)),U)
+49 ;ACHS*3.1*23 AND MOD NXT 9 LINES
SET ACHSREJ=$PIECE(ACHSNON2,U,14)
+50 ;'IHS COST'
SET ACHSEOBR(ACHSREJ,8)=$PIECE(ACHSNON2,U,5)
+51 ;'OBLIGATION INDICATOR'
SET ACHSEOBR(ACHSREJ,9)=$PIECE(ACHSNON2,U,6)
+52 ;'OBLIGATION AMOUNT'
SET ACHSEOBR(ACHSREJ,10)=$PIECE(ACHSNON2,U,7)
+53 ;'ADJUSTMENT AMOUNT'
SET ACHSEOBR(ACHSREJ,11)=$PIECE(ACHSNON2,U,8)
+54 ;'DIAGNOSIS CODE 1'
SET ACHSEOBR(ACHSREJ,12)=$PIECE(ACHSNON2,U,9)
+55 ;'DIAGNOSIS CODE 2'
SET ACHSEOBR(ACHSREJ,13)=$PIECE(ACHSNON2,U,10)
+56 ;'DIAGNOSIS CODE 3'
SET ACHSEOBR(ACHSREJ,14)=$PIECE(ACHSNON2,U,11)
+57 ;'DIAGNOSIS CODE 4'
SET ACHSEOBR(ACHSREJ,15)=$PIECE(ACHSNON2,U,12)
+58 ;'DIAGNOSIS CODE 5'
SET ACHSEOBR(ACHSREJ,16)=$PIECE(ACHSNON2,U,13)
+59 ;
+60 ;
+61 ;'PROCEDURE CODE 1'
SET ACHSEOBR("G",8)=$PIECE(ACHSNON4,U)
+62 ;'PROCEDURE CODE 2'
SET ACHSEOBR("G",9)=$PIECE(ACHSNON4,U,2)
+63 ;'PROCEDURE CODE 3'
SET ACHSEOBR("G",10)=$PIECE(ACHSNON4,U,3)
+64 ;'PROCEDURE CODE 4' ;ACHS*3.1*23
SET ACHSEOBR("G",11)=$PIECE(ACHSNON4,U,4)
+65 ;'PROCEDURE CODE 5' ;ACHS*3.1*23
SET ACHSEOBR("G",12)=$PIECE(ACHSNON4,U,5)
+66 ;
+67 SET ACHSCPT=0
+68 KILL ^TMP("ACHSEOB",$JOB)
+69 DO ACHSF
+70 GOTO END
+71 ;
ACHSF ;
+1 SET ACHSCPT=$ORDER(^ACHSEOBE(ACHSNON,3,ACHSCPT))
+2 IF ACHSCPT=""
QUIT
+3 IF +ACHSCPT<1
QUIT
+4 SET ^TMP("ACHSEOB",$JOB,"F",ACHSCPT)=$JUSTIFY(" ",22)_$EXTRACT($PIECE(^ACHSEOBE(ACHSNON,3,ACHSCPT,0),U,2),2,7)_$EXTRACT($PIECE(^(0),U,3),2,7)_$PIECE(^(0),U,1)_$PIECE(^(0),U,4)_$PIECE(^(0),U,5)_$PIECE(^(0),U,6)_$PIECE(^(0),U,7)_...
... $PIECE(^(0),U,8)_$PIECE(^(0),U,9)
+5 IF $PIECE(^ACHSEOBE(ACHSNON,3,ACHSCPT,0),U,7)[" "
GOTO ACHSF
+6 SET ACHSEOBR("M","B",$PIECE(^ACHSEOBE(ACHSNON,3,ACHSCPT,0),U,7))=""
+7 GOTO ACHSF
+8 ;
END ;
+1 QUIT
+2 ;