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

IB20P469.m

Go to the documentation of this file.
  1. IB20P469 ;ALB/CXW - UPDATE MCCR UTILITY/REVENUE CODE; 01/10/2012
  1. ;;2.0;INTEGRATED BILLING;**469**;21-MAR-94;Build 10
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. Q
  1. POST ;
  1. ; Update value/occurrence/condition codes in mccr utility file 399.1
  1. ; Update revenue codes in revenue file 399.2
  1. N U S U="^"
  1. D MES^XPDUTL("Patch Post-Install starts")
  1. D MCR,RVC
  1. D MES^XPDUTL("Patch Post-Install is complete.")
  1. Q
  1. ;
  1. MCR ; 3 types of codes
  1. N IBACT,IBCNT,IBCOD,IBPE,IBFD,IBI,IBX,DLAYGO,DIC,DIE,DA,DD,DO,DR,X,Y
  1. ; IBACT=1 - addition, 2 - update
  1. ; Value code flag in field .18/piece 11
  1. S IBCNT=0,IBCOD="Value",IBPE=11,IBFD=.18
  1. S IBACT=1 D DIS
  1. F IBI=1:1 S IBX=$P($T(VALN+IBI),";;",2) Q:IBX="" D MFILE
  1. S IBACT=2 D DIS
  1. F IBI=1:1 S IBX=$P($T(VALO+IBI),";;",2) Q:IBX="" D MFILE
  1. D DIS1
  1. ;
  1. ; Occurrence code flag in field .11/piece 4
  1. S IBCNT=0,IBCOD="Occurrence",IBPE=4,IBFD=.11
  1. S IBACT=1 D DIS
  1. F IBI=1:1 S IBX=$P($T(OCCN+IBI),";;",2) Q:IBX="" D MFILE
  1. S IBACT=2 D DIS
  1. F IBI=1:1 S IBX=$P($T(OCCO+IBI),";;",2) Q:IBX="" D MFILE
  1. D DIS1
  1. ;
  1. ; Condition code flag in field .22/piece 15
  1. S IBCNT=0,IBCOD="Condition",IBPE=15,IBFD=.22
  1. S IBACT=1 D DIS
  1. F IBI=1:1 S IBX=$P($T(CONN+IBI),";;",2) Q:IBX="" D MFILE
  1. S IBACT=2 D DIS
  1. F IBI=1:1 S IBX=$P($T(CONO+IBI),";;",2) Q:IBX="" D MFILE
  1. D DIS1
  1. Q
  1. ;
  1. DIS ;
  1. D MES^XPDUTL($S(IBACT=1:"Add",IBACT=2:"Updat",IBACT=3:"Reserv",1:"Activat")_"ing "_IBCOD_" Code..")
  1. Q
  1. DIS1 ;
  1. D MES^XPDUTL("Total "_IBCNT_" "_IBCOD_" Code"_$S(IBCNT'=1:"s",1:"")_" updated")
  1. D MES^XPDUTL("")
  1. Q
  1. ;
  1. MFILE ; Mccr file
  1. N IBFN
  1. S IBFN=+$$EXCODE($P(IBX,U),IBPE)
  1. I IBACT=1,'IBFN D
  1. . K DD,DO S DLAYGO=399.1,DIC="^DGCR(399.1,",DIC(0)="L",X=$P(IBX,U,2) D FILE^DICN K DIC,DLAYGO I Y<1 K X,Y Q
  1. . S DA=+Y,DIE="^DGCR(399.1,",DR=".02///"_$P(IBX,U,1)_";"_IBFD_"///"_1 D ^DIE K DIE,DA,DR,X,Y
  1. . S IBCNT=IBCNT+1 D MES^XPDUTL(" Code# "_$P(IBX,U)_" "_$P(IBX,U,2))
  1. I IBACT=2,IBFN D
  1. . S DIE="^DGCR(399.1,",DA=IBFN,DR=".01///"_$P(IBX,U,2) D ^DIE K DIE,DA,DR,X,Y
  1. . S IBCNT=IBCNT+1 D MES^XPDUTL(" Code# "_$P(IBX,U)_" "_$P(IBX,U,2))
  1. Q
  1. ;
  1. EXCODE(X,P) ; Returns IEN if code found in the P piece
  1. N IBX,IBY S IBY=""
  1. I $G(X)'="" S IBX=0 F S IBX=$O(^DGCR(399.1,"C",X,IBX)) Q:'IBX I $P($G(^DGCR(399.1,IBX,0)),U,+$G(P)) S IBY=IBX
  1. Q IBY
  1. ;
  1. RVC ; Revenue code in field 1/piece 2, field 3/piece 4
  1. N IBACT,IBCOD,IBCNT,IBI,IBJ,IBX,IBX3,IBRES,IBY,IBZ,DIE,DA,DR,X,Y
  1. ; IBACT=1 - addition, 2 - update, 3 - reservation, 4 - activation
  1. S IBCNT=0,IBX3="",IBCOD="Revenue",IBRES="*RESERVED"
  1. S IBACT=1 D DIS
  1. F IBI=1:1 S IBX=$P($T(RVCN+IBI),";;",2) Q:IBX="" D
  1. . S IBY=$P(IBX,U),IBZ=$G(^DGCR(399.2,+IBY,0))
  1. . ; quit if no reserved
  1. . Q:(+IBY'=+IBZ)!($P(IBZ,U,2)'=IBRES)
  1. . S IBZ=+IBZ
  1. . D RFILE
  1. ;
  1. S IBACT=2 D DIS
  1. F IBI=1:1 S IBX=$P($T(RVCO+IBI),";;",2) Q:IBX="" D
  1. . S IBY=$P(IBX,U),IBZ=$O(^DGCR(399.2,"B",IBY,0)) Q:'IBZ
  1. . D RFILE
  1. ;
  1. S IBACT=3 D DIS
  1. F IBI=1:1 S IBX=$P($T(RVCR+IBI),";;",2) Q:IBX="" D
  1. . F IBJ=1:1 S IBY=$P(IBX,";",IBJ) Q:IBY="" D
  1. .. S IBZ=$O(^DGCR(399.2,"B",IBY,0)) Q:'IBZ
  1. .. ; quit if reserved
  1. .. Q:$P($G(^DGCR(399.2,+IBZ,0)),U,2)=IBRES
  1. .. D RFILE
  1. ;
  1. S IBACT=4 D DIS
  1. F IBI=1:1 S IBX=$P($T(RVCA+IBI),";;",2) Q:IBX="" D
  1. . F IBJ=1:1 S IBY=$P(IBX,";",IBJ) Q:IBY="" D
  1. .. S IBZ=$O(^DGCR(399.2,"B",IBY,0)) Q:'IBZ
  1. .. S IBX3=$G(^DGCR(399.2,+IBZ,0))
  1. .. ; quit if reserved and activated
  1. .. Q:$P(IBX3,U,2)=IBRES
  1. .. Q:+$P(IBX3,U,3)
  1. .. S IBX3=$P(IBX3,U,4)
  1. .. D RFILE
  1. D DIS1
  1. Q
  1. ;
  1. RFILE ; Revenue file
  1. S:(IBACT=1)!(IBACT=2) DR="1///"_$P(IBX,U,2)_";3///"_$P(IBX,U,3)_";2///1"
  1. ; bypass the input transform for reserved in a '*' char format
  1. S:IBACT=3 DR="1////"_IBRES_";2///0"_";3////"_IBRES
  1. S:IBACT=4 DR="2///1"
  1. S DIE="^DGCR(399.2,",DA=+IBZ D ^DIE K DIE,DA,DR,X,Y
  1. S IBCNT=IBCNT+1
  1. D MES^XPDUTL(" Code# "_IBZ_" "_$S(IBACT=3:IBRES,IBACT=4:IBX3,1:$P(IBX,U,3)))
  1. Q
  1. ;
  1. ;
  1. RVCN ; New revenue code (1)^abbreviation^description
  1. ;;970^PROFESSIONAL SERVICES - EXTENSION OF 096X^PROFESSIONAL SERVICES - EXTENSION OF 096X
  1. ;;
  1. RVCO ; Old revenue code (2)^abbreviation^description
  1. ;;521^RURAL/FQHC CLINIC^RURAL/FQHC - HEALTH CLINIC
  1. ;;522^HOME VISIT BY RHC/FQHC PRACTITIONER^HOME VISIT BY RHC/FQHC PRACTITIONER
  1. ;;
  1. RVCR ; Old revenue code delimited by semi-colon for reservation (7)
  1. ;;184;709;719;749;759;799;910
  1. ;;
  1. RVCA ; Old revenue code delimited by semi-colon for activation (61)
  1. ;;173;174;191;192;193;194;199;241;242;243;344;392;451;452;456;479;489
  1. ;;499;524;525;526;527;528;547;548;583;609;615;616;623;658;663;669;670
  1. ;;671;672;679;681;682;683;684;689;770;780;860;861;882;905;906;907;930
  1. ;;931;947;948;951;952;971;973;976;978;979
  1. ;;
  1. VALN ; New value code (11)^description
  1. ;;32^MULTIPLE PATIENT AMBULANCE TRANSPORT
  1. ;;54^NEWBORN BIRTH WEIGHT IN GRAMS
  1. ;;55^ELIGIBILITY THRESHOLD FOR CHARITY CARE
  1. ;;66^MEDICAID SPEND DOWN AMOUNT
  1. ;;69^STATE CHARITY CARE PERCENT
  1. ;;83^LIFETIIME RESERVE DAYS
  1. ;;A7^CO-PAYMENT PAYER A
  1. ;;B7^CO-PAYMENT PAYER B
  1. ;;C7^CO-PAYMENT PAYER C
  1. ;;D4^CLINICAL TRIAL NUMBER ASSIGNED BY THE NLM/NIH
  1. ;;G8^FACILITY WHERE INPATIENT HOSPICE SERVICE IS DELIVERED
  1. ;;
  1. VALO ; Old value code (4)^description
  1. ;;01^MOST COMMON SEMI-PRIVATE ROOM RATE
  1. ;;43^DISABLED BENEFICIARY UNDER AGE OF 65 WITH LGHP
  1. ;;44^AMT AGRED FRM PRIME<CHGS&>PYMT > THN PYMT REC, MSP CLMS
  1. ;;52^SPEECH-LANGUAGE THERAPY VISITS
  1. ;;
  1. OCCN ; New occurrence code (1)^description
  1. ;;DR^DISASTER RELATED OCCURRENCE CODE
  1. ;;
  1. OCCO ; Old occurrence code (21)^description
  1. ;;01^ACCIDENT/MEDICAL COVERAGE
  1. ;;02^NO FAULT INSURANCE INVOLVED INCLUDING AUTO ACCIDENT/OTHER
  1. ;;05^ACCIDENT/NO MEDICAL OR LIABILITY COVERAGE
  1. ;;26^DATE SNF BED BECAME AVAILABLE
  1. ;;27^DATE OF HOSPICE CERTIFICATION OR RECERTIFICATION
  1. ;;30^DATE OF OP SPEECH-LANGUAGE PATH PLAN EST/LAST REVWD
  1. ;;33^FIRST DAY THE COORD PD FOR ESRD BENEFICIARIES CVRD BY EGHP
  1. ;;34^DATE OF ELECTION OF EXTENDED CARE SERVICES
  1. ;;36^DATE OF IP HOSP DISCHG FOR COVERED TRANSPLANT PATIENT
  1. ;;37^DATE OF IP HOSP DISCHG FOR NON-COVERED TRANSPLANT PATIENT
  1. ;;45^DATE TREATMENT STARTED FOR SPEECH-LANGUAGE THERAPY
  1. ;;A4^SPLIT BILL DATE
  1. ;;E1^RZD FOR NATIONAL ASSIGNMENT
  1. ;;E2^RZD FOR NATIONAL ASSIGNMENT
  1. ;;E3^RZD FOR NATIONAL ASSIGNMENT
  1. ;;F1^RZD FOR NATIONAL ASSIGNMENT
  1. ;;F2^RZD FOR NATIONAL ASSIGNMENT
  1. ;;F3^RZD FOR NATIONAL ASSIGNMENT
  1. ;;G1^RZD FOR NATIONAL ASSIGNMENT
  1. ;;G2^RZD FOR NATIONAL ASSIGNMENT
  1. ;;G3^RZD FOR NATIONAL ASSIGNMENT
  1. ;;
  1. CONN ; New condition code (9)^description
  1. ;;51^ATTESTATION OF UNRELATED OUTPATIENT NONDIAGNOSTIC SERVICES
  1. ;;BO^MEDICARE COORDINATED CARE DEMONSTRATION CLAIM
  1. ;;B1^BENEFICIARY INELIGIBLE FOR DEMONSTRATION PROGRAM
  1. ;;B2^CRITICAL ACCESS HOSPITAL AMBULANCE ATTESTATION
  1. ;;B3^PREGNANCY INDICATOR
  1. ;;BP^GULF OIL SPILL OF 2010
  1. ;;EO^CHANGE IN PATIENT STATUS
  1. ;;P1^DO NOT RESUCITATE (DNR) FOR PUBLIC HEALTH REPORTING ONLY
  1. ;;WO^UNITED MINE WORKERS OF AMERICA (UMWA) DEMO INDICATOR
  1. ;;
  1. CONO ; Old condition code (9)^description
  1. ;;04^INFORMATION ONLY BILL
  1. ;;06^ESRD PATIENT IN FIRST 30 MONTHS OF ENTITLE CVRD BY EGHP
  1. ;;58^TERMINATED MEDICARE ADVANTAGE ENROLLEE
  1. ;;69^IME/DGME/N&AH PAYMENT ONLY
  1. ;;78^NEW COVERAGE NOT IMPLEMENTED BY MANAGED CARE PLAN
  1. ;;79^CORF SERVICES PROVIDED OFFSITE
  1. ;;H3^REOCCURRENCE OF GI BLEED (MA) CATEGORY
  1. ;;H4^REOCCURRENCE OF PNEUMONIA (MB) CATEGORY
  1. ;;H5^REOCCURRENCE OF PERICARDITIS (MC) CATEGORY
  1. ;;