Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ACHSEOBS

ACHSEOBS.m

Go to the documentation of this file.
ACHSEOBS ; IHS/ITSC/TPF/PMF - SELECT EOBR FILE FOR PROCESSING ; 
 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;**22**;JUN 11, 2001;Build 43
 ;
 W @IOF,$$REPEAT^XLFSTR("*",79),!,$$C^XBFUNC("***   SELECT EOBR FILE FOR PROCESSING   ***")
 I ACHSISAO W !,$$C^XBFUNC("LAST AREA OFFICE SEQUENCE NUMBER = "_$$AOP^ACHS(2,9)),!,$$C^XBFUNC("FI/EOBR Files Archive Directory = '"_$$AOP^ACHS(2,7)_"'.")
 W !,$$REPEAT^XLFSTR("*",79),!
 D ^ACHSEOBY                    ;GET LIST OF FILES AVAILABLE
 I $D(ACHSJFLG) G ABEND
D0 ;
 S (ACHSI,ACHSII)="",ACHSISEQ=0
 K ACHSSEL
 U IO(0)
 W !!,"NUMBER   FILE NAME               FI PROCESS DATE  # RCDS   SEQ #"
 W !,"------   ---------------         ---------------  ------   ------"
D1 ;
 S ACHSII=$O(ACHSUFLS("C",ACHSII))
 G DEND:+ACHSII=0
D2 ;
 S ACHSI=$O(ACHSUFLS("C",ACHSII,ACHSI))
 G D1:+ACHSI=0
 G D1:$P(ACHSUFLS(ACHSI),U,2)'="OK"
 S ACHSISEQ=ACHSISEQ+1
 W !,$J(ACHSISEQ,6),?9,$P(ACHSUFLS(ACHSI),U,1)
 S X=$P(ACHSUFLS(ACHSI),U,3),X=$E(X,5,6)_$E(X,1,4),X=$S($E(X,1,2)>50:2,1:3)_X
 ;W ?28,$J($$FMTE^XLFDT(X),15),?52,$J($FN($P(ACHSUFLS(ACHSI),U,4),",",0),6),?60,$J($P(ACHSUFLS(ACHSI),U,5),3)
 W ?35,$$FMTE^XLFDT(X),?50,$J($FN($P(ACHSUFLS(ACHSI),U,4),",",0),6),?60,$J($P(ACHSUFLS(ACHSI),U,5),3)
 S ACHSSEL(ACHSISEQ)=ACHSI
 G D2
 ;
DEND ;
 W !
 S X=$$DIR^XBDIR("NO^1:"_ACHSISEQ,"Enter NUMBER of EOBR FILE From Above List to Process")
 I $D(DTOUT)!$D(DUOUT)!('X) S ACHSAEND=2 Q
 I '$D(ACHSSEL(X)) G ABEND
 S ACHSFILE=+ACHSSEL(X),ACHSZFN=$P(ACHSUFLS(ACHSFILE),U,1),ACHSEOBD=$P(ACHSUFLS(ACHSFILE),U,3)
 I ACHSISAO S X=ACHSEOBD,X=$E(X,5,6)_$E(X,1,4),ACHSEOBD=$S($E(X,1,2)>50:2,1:3)_X
 S ACHSLEOB=$P(^ACHSAOP(DUZ(2),2),U,11)
 I 'ACHSISAO G CONT
 ;
 I +$P(^ACHSAOP(DUZ(2),2),U,9)=0 G SEQOK
 I +$P(^ACHSAOP(DUZ(2),2),U,9)=999 S $P(^ACHSAOP(DUZ(2),2),U,9)=0
 I $P(^ACHSAOP(DUZ(2),2),U,9)+1=$P(ACHSUFLS(ACHSFILE),U,5) G SEQOK
 G:$P(ACHSUFLS(ACHSFILE),U,5)="ICD" FACCK   ;ACHS*3.1*22 ICD-9 FIX
 K DIR
 U IO(0)
 W !,*7,"Wrong BCBS Report (Sequence) Number Selected ",!
 S DIR(0)="E"
 D ^DIR
 G D0:Y=1,ABEND:Y=0,D0:Y=""
SEQOK ;
 ;CHECK IF B X-REF FOR 'EOBR PROCESS DATE' HAS BEEN SET IF SO THEN
 ;THE FILE HAS BEEN PROCESSED. FILE IS 'CHS AREA OFFICE PARAMETERS'
 I '$D(^ACHSAOP(DUZ(2),17,"B",ACHSEOBD)) G CONT
 U IO(0)
 W *7,!
 I $$DIR^XBDIR("E","FI EOBR FILE has already been PROCESSED -- Enter <RETURN> to Continue")
 G ABEND
 ;
FACCK ;ACHS*3.1*22 FAC ICD9 FILE ALREADY PROCESSED
 S X=0,X=$O(^AUTTLOC("C",$P(ACHSUFLS(ACHSFILE),U,6),X))
 I $P(^ACHSAOP(DUZ(2),16,X,0),U,6)'="Y" G CONT
 U IO(0)
 W *7,!
 I $$DIR^XBDIR("E","FI ICD EOBR FILE has already been PROCESSED -- Enter <RETURN> to Continue")
 G ABEND
 ;
CONT ;
 S ACHSMEDA=ACHSZFN
 Q
 ;
ABEND ;
 S ACHSAEND=1
VKILL ; Kill vars, quit.
 K ACHSZDEV,ACHSZFN,ACHSZFO,ACHSZIN,ACHSCMD,ACHSERDT,ACHSERR,ACHSERRC,ACHSLMT,ACHSRCT,ACHSCMD,ACHSFILE,ACHSFNAM,ACHSFSIZ,ACHSHFS1,ACHSI,ACHSISEQ,ACHSSEL,ACHSUFLS,ACHSLCTR,DIR,X,Y,ACHSXX,ACHSLEOB
 Q
 ;