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

BARPT175.m

Go to the documentation of this file.
  1. BARPT175 ; IHS/SD/LSL - Post init for V1.7 Patch 5 ;
  1. ;;1.8;IHS ACCOUNTS RECEIVABLE;;OCT 26, 2005
  1. ;
  1. Q
  1. ; *********************************************************************
  1. ;
  1. EN ; EP - Driver
  1. D PRVPATCH ; Check to see if previous patches installed
  1. ; Post init for V1.7 Patch 5
  1. I '($$INSTALLD^BAREV17("BAR*1.7*5")) D PATCH5
  1. Q
  1. ; *********************************************************************
  1. ;
  1. PRVPATCH ;
  1. ; Check previous patch post inits
  1. N BARP1,BARP2,BARP3
  1. S BARP5=$$INSTALLD^BAREV17("BAR*1.7*5")
  1. S BARP4=$$INSTALLD^BAREV17("BAR*1.7*4")
  1. S BARP3=$$INSTALLD^BAREV17("BAR*1.7*3")
  1. S BARP2=$$INSTALLD^BAREV17("BAR*1.7*2")
  1. S BARP1=$$INSTALLD^BAREV17("BAR*1.7*1")
  1. I BARP5 Q ; This patch already installed
  1. I 'BARP4 D EN^BARPT174 Q ; Patch 4 (or 3,2,1) not installed
  1. I 'BARP3 D EN^BARPT173 Q ; Patch 3 ( or 2,1) not installed
  1. I 'BARP2 D EN^BARPT172 Q ; Patch 2 (or 1) not installed
  1. I 'BARP1 D EN^BARPT171 Q ; Patch 1 not installed
  1. Q
  1. ; ********************************************************************
  1. PATCH5 ;
  1. ; Patch 5 post init
  1. D PRCRTN ; Change processing rtn for Remark Code
  1. D NCPDPTBL ; Add NCPDP Rej/Pay Codes to table
  1. D TRNSPT ; Update Transport with posting element
  1. D TRNLQ ; Modify LQ02 of HIPAA transport
  1. D VPTRN ; Add entry to Variable Processing Mult
  1. D VPNCPDP ; Add entry to Variable Processing Mult
  1. D TRNTYP ; Create Rem Cd, NCPDP Transaction Types
  1. D MAIL ; Send Patch 5 MailMan message to users
  1. Q
  1. ; ********************************************************************
  1. ; ********************************************************************
  1. ;
  1. PRCRTN ;
  1. ; In the A/R EDI TABLES File, change the processing routine for
  1. ; Remittance Remark Code entry (IEN 34)
  1. W !!,"Updating Remittance Remark Code A/R EDI TABLES entry... "
  1. K DIE,DA,DR
  1. S DIE="^BARETBL("
  1. S DA=34
  1. S DR=".03///D HRMKCD|BAREDP02"
  1. D ^DIE
  1. K DIE,DA,DR
  1. W ?73,"DONE"
  1. Q
  1. ; ********************************************************************
  1. ; ********************************************************************
  1. ;
  1. NCPDPTBL ;
  1. ; In the A/R EDI TABLES File, add entry for NCPDP Reject/Payment
  1. ; Codes (IEN 41)
  1. W !!,"Creating NCPDP Reject/Payment Codes A/R EDI TABLES entry... "
  1. K DIC,DIE,DA,DR,DINUM,X
  1. S DIC="^BARETBL("
  1. S DIC(0)="ZXEL"
  1. S DLAYGO=90056
  1. S DINUM=41
  1. S X="NCPDP Reject/Payment Codes"
  1. S DIC("DR")=".03///D LQCD|BAREDP02"
  1. K DD,DO
  1. D FILE^DICN
  1. K DIE,DA,DR
  1. W ?73,"DONE"
  1. Q
  1. ; ********************************************************************
  1. ; ********************************************************************
  1. ;
  1. TRNSPT ;
  1. ; Update Remark Code elements of HIPAA transport with VRMKCD posting
  1. ; element
  1. W !!,"Updating HIPAA transport with Remark Code posting element..."
  1. ; First, look up HIPAA 835 v4010 Transport
  1. K DIC,DA,DR,X,Y
  1. S DIC="^BAREDI(""1T"","
  1. S DIC(0)="ZX"
  1. S X="HIPAA 835 v4010"
  1. K DD,DO
  1. D ^DIC
  1. I Y<1 D Q
  1. . W !!,$$EN^BARVDF("RVN")
  1. . W "An exact match for the HIPAA 835 v4010 transport in the A/R EDI TRANSPORT File"
  1. . W !,"WAS NOT FOUND! Remark code variables have not been added to the transport."
  1. . W !,"When the patch install has completed, resolve the above situation"
  1. . W !,"AND run TRNSPT^BARPT175 to populate Remark Code variables in Transport"
  1. . W $$EN^BARVDF("RVF")
  1. S BARTP=+Y ; IEN to A/R EDI TRANSPORT file
  1. ; Now find MIA and MOA Segments
  1. F I="3-033-MIA","3-035-MOA" D TRNSEG
  1. W ?73,"DONE"
  1. Q
  1. ; ********************************************************************
  1. ;
  1. TRNSEG ;
  1. ; Find MIA and MOA segments of HIPAA transport
  1. K DIC,DA,DR,X,Y
  1. S DA(1)=BARTP
  1. S DIC="^BAREDI(""1T"","_DA(1)_",10,"
  1. S DIC(0)="ZX"
  1. S X=I
  1. K DD,DO
  1. D ^DIC
  1. I Y<1 Q
  1. S BARSEG=+Y ; Segment IEN
  1. I I="3-033-MIA" F J="MIA05","MIA20","MIA21","MIA22","MIA23" D TRNELM
  1. I I="3-035-MOA" F J="MOA03","MOA04","MOA05","MOA06","MOA07" D TRNELM
  1. Q
  1. ; ********************************************************************
  1. ;
  1. TRNELM ;
  1. ; Find Remark Code elements of MIA and MOA segments and
  1. ; edit posting element field (.08)
  1. K DIC,DA,DR,X,Y
  1. S DA(2)=BARTP
  1. S DA(1)=BARSEG
  1. S DIC="^BAREDI(""1T"","_DA(2)_",10,"_DA(1)_",10,"
  1. S DIC(0)="ZX"
  1. S X=J
  1. K DD,DO
  1. D ^DIC
  1. I Y<1 Q
  1. S BARELM=+Y
  1. S DIE=DIC
  1. S DA=+Y
  1. S DR=".08///VRMKCD"
  1. D ^DIE
  1. Q
  1. ; ********************************************************************
  1. ; ********************************************************************
  1. ;
  1. TRNLQ ;
  1. ; Update LQ02 element of HIPAA transport for processing
  1. ;
  1. W !!,"Updating HIPAA transport with LQ Remark Code/NCPDP Reject/Payment"
  1. W !,"data fields necessary for ERA processing..."
  1. ; First, look up HIPAA 835 v4010 Transport
  1. K DIC,DA,DR,X,Y
  1. S DIC="^BAREDI(""1T"","
  1. S DIC(0)="ZX"
  1. S X="HIPAA 835 v4010"
  1. K DD,DO
  1. D ^DIC
  1. I Y<1 D Q
  1. . W !!,$$EN^BARVDF("RVN")
  1. . W "An exact match for the HIPAA 835 v4010 transport in the A/R EDI TRANSPORT File"
  1. . W !,"WAS NOT FOUND! Remark code variables have not been added to the transport."
  1. . W !,"When the patch install has completed, resolve the above situation"
  1. . W !,"AND run TRNLQ^BARPT175 to populate LQ Segment variables in Transport"
  1. . W $$EN^BARVDF("RVF")
  1. S BARTP=+Y ; IEN to A/R EDI TRANSPORT file
  1. ;
  1. ; Now find LQ Segment
  1. K DIC,DA,DR,X,Y
  1. S DA(1)=BARTP
  1. S DIC="^BAREDI(""1T"","_DA(1)_",10,"
  1. S DIC(0)="ZX"
  1. S X="3-130-LQ"
  1. K DD,DO
  1. D ^DIC
  1. I Y<1 Q
  1. S BARSEG=+Y ; Segment IEN
  1. ;
  1. ; Now find LQ02 element and edit
  1. K DIC,DA,DR,X,Y
  1. S DA(2)=BARTP
  1. S DA(1)=BARSEG
  1. S DIC="^BAREDI(""1T"","_DA(2)_",10,"_DA(1)_",10,"
  1. S DIC(0)="ZX"
  1. S X="LQ02"
  1. K DD,DO
  1. D ^DIC
  1. I Y<1 Q
  1. S BARELM=+Y
  1. S DIE=DIC
  1. S DA=+Y
  1. S DR=".04///ID"
  1. S DR=DR_";.08///VLQCD"
  1. S DR=DR_";.09////41"
  1. D ^DIE
  1. W ?73,"DONE"
  1. Q
  1. ; ********************************************************************
  1. ;
  1. VPTRN ;
  1. ; Create VRMKCD in Variable Processing Multiple for HIPAA 835 v4010
  1. ; Transport (node 70). The routine populated here for VRMKCD is what
  1. ; is used to populate the REMARK CODE multiple in the CLAIM multiple
  1. ; in the A/R EDI IMPORT file.
  1. W !!,"Updating Variable Processing mult for Remark Code of HIPAA transport... "
  1. K DIC,DA,DR,X,Y
  1. Q:'+$G(BARTP)
  1. Q:$D(^BAREDI("1T",BARTP,70,"VRMKCD"))
  1. S DA(1)=BARTP
  1. S DIC="^BAREDI(""1T"","_DA(1)_",70,"
  1. S DIC(0)="ZXLE"
  1. S DLAYGO=90056
  1. S DIC("P")=$P($G(^DD(90056.01,70,0)),U,2)
  1. S DIC("DR")=".02///RMKCD|BAREDPA1"
  1. S X="VRMKCD"
  1. K DD,DO
  1. D ^DIC
  1. W ?73,"DONE"
  1. Q
  1. ; ********************************************************************
  1. ;
  1. VPNCPDP ;
  1. ; Create VLQCD in Variable Processing Multiple for HIPAA 835 v4010
  1. ; Transport (node 70). The routine populated here for VLQCD is what
  1. ; is used to populate the REMARK CODE multiple OR NCPDP REJ/PAY
  1. ; multiple in the CLAIM multiple of the A/R EDI IMPORT file dependent on
  1. ; the value of LQ01.
  1. W !!,"Updating Variable Processing mult for NCPDP Reject/Payment Code"
  1. W !,"of HIPAA transport... "
  1. K DIC,DA,DR,X,Y
  1. Q:'+$G(BARTP)
  1. Q:$D(^BAREDI("1T",BARTP,70,"VLQCD"))
  1. S DA(1)=BARTP
  1. S DIC="^BAREDI(""1T"","_DA(1)_",70,"
  1. S DIC(0)="ZXLE"
  1. S DLAYGO=90056
  1. S DIC("P")=$P($G(^DD(90056.01,70,0)),U,2)
  1. S DIC("DR")=".02///LQ|BAREDPA1"
  1. S X="VLQCD"
  1. K DD,DO
  1. D ^DIC
  1. W ?73,"DONE"
  1. Q
  1. ; ********************************************************************
  1. ; ********************************************************************
  1. ;
  1. TRNTYP ;
  1. ; Create New transaction type called Remark Code
  1. W !!,"Creating REMARK CODE and NCPDP REJ/PAY Transaction Types... "
  1. ; REMARK CODE
  1. K DIC,DA,DR,X,Y
  1. S DIC="^BARTBL("
  1. S DIC(0)="LZX"
  1. S DINUM=505
  1. S X="REMARK CODE"
  1. S DLAYGO=90052
  1. S DIC("DR")="2////7" ; Transaction type
  1. S DIC("DR")=DIC("DR")_";6///RMKCD" ; Synonym
  1. K DD,DO
  1. D ^DIC
  1. ; NCPDP REJ/PAY
  1. K DIC,DA,DR,X,Y
  1. S DIC="^BARTBL("
  1. S DIC(0)="LZX"
  1. S DINUM=506
  1. S X="NCPDP REJ/PAY"
  1. S DLAYGO=90052
  1. S DIC("DR")="2////7" ; Transaction type
  1. S DIC("DR")=DIC("DR")_";6///NCPDP" ; Synonym
  1. K DD,DO
  1. D ^DIC
  1. W ?73,"DONE"
  1. Q
  1. ; ********************************************************************
  1. ; ********************************************************************
  1. ;
  1. MAIL ;
  1. ; Send a mail message to all holders of the BARZMENU key that a patch
  1. ; has been installed on the system.
  1. ;
  1. W !!,"Sending MailMan message to users..."
  1. D MAILSET
  1. D MAILTXT
  1. D MAILMSG
  1. W " DONE"
  1. Q
  1. ; *********************************************************************
  1. ;
  1. MAILSET ;
  1. ; Set Mailman Variables
  1. K XMY
  1. S XMSUB="Accounts Receivable V1.7 Patch 5"
  1. S XMDUZ="Accounts Receivable Software Engineer"
  1. D MAILIST ; Get list of recipients
  1. Q
  1. ; *********************************************************************
  1. ;
  1. MAILIST ;
  1. ; Find users who hold the BARZMENU key
  1. ;S XMY("STAR,GLEN R")=""
  1. S J=0
  1. F S J=$O(^XUSEC("BARZMENU",J)) Q:'J D
  1. . S BARNAME=$P($G(^VA(200,J,0)),U)
  1. . Q:BARNAME=""
  1. . S XMY(BARNAME)=""
  1. Q
  1. ; *********************************************************************
  1. ;
  1. MAILTXT ;
  1. ; Determine body of e-mail
  1. S K=0
  1. F D Q:BARTXT="END"
  1. . S K=K+1
  1. . S BARTXT=$P($T(@1+K),";;",2)
  1. . I BARTXT="END" Q
  1. . S BARMSG(K)=BARTXT
  1. Q
  1. ; *********************************************************************
  1. ;
  1. MAILMSG ;
  1. S XMTEXT="BARMSG("
  1. S %H=$H
  1. D YX^%DTC
  1. N DIFROM
  1. D ^XMD
  1. K BARMSG
  1. Q
  1. ; *********************************************************************
  1. ;
  1. 1 ;;
  1. ;;Accounts Receivable V1.7 Patch 5 has been installed on your
  1. ;;computer. You have received this message because you hold the BARZMENU
  1. ;;key that allows access to the Accounts Receivable Master Menu.
  1. ;;
  1. ;;Accounts Receivable V1.7 Patch 5 is inclusive of patches 1 thru 4. It
  1. ;;also contains the following:
  1. ;;
  1. ;;1. Incorporation of HIPAA compliant Remittance Advice Remark Codes to
  1. ;; RPMS Accounts Receivable. This includes the following changes:
  1. ;;
  1. ;; a. Creation and population of new A/R EDI REMARK CODES File.
  1. ;; This file reflects Remark Codes as of February 2004 Code List
  1. ;; Updates as published by wpc-edi.com.
  1. ;; b. Creation of new Transaction Type called "REMARK CODE"
  1. ;; c. Recognize Remittance Advice Remark Codes in 835 remittance
  1. ;; files.
  1. ;; d. Post Remark Codes during ERA Post Claims process.
  1. ;; e. New Posting option called Post Remark Codes allowing user to
  1. ;; manually post remark codes if desired.
  1. ;; f. New Posting option called Remittance Advice Remark Code Inquiry
  1. ;; allowing user to inquire individual remark codes.
  1. ;; g. Display REMARK CODE transactions on Bill Posted Summary.
  1. ;;
  1. ;;2. Incorporation of HIPAA compliant NCPDP Reject/Payment Codes to
  1. ;; RPMS Accounts Receivable. This includes the following changes:
  1. ;;
  1. ;; a. Creation of new Transaction Type called "NCPDP REJ/PAY"
  1. ;; b. Recognize NCPDP Reject/Payment Codes in 835 remittance
  1. ;; files.
  1. ;; c. Post NCPDP Reject/Payment Codes during ERA Post Claims process.
  1. ;; d. New Posting option called Post NCPDP Reject/Payment Codes
  1. ;; allowing user to manually post NCPDP Reject/Payment Codes if
  1. ;; desired.
  1. ;; e. Display NCPDP REJ/PAY transactions on Bill Posted Summary.
  1. ;; f. The NCPDP Reject/Payment Code table is distributed with the
  1. ;; Pharmacy POS software. If it is not installed on you system,
  1. ;; you will not be able to post NCPDP Reject/Payment codes
  1. ;; manually and NCPDP reject codes on the ERA will come up
  1. ;; "NOT MATCHED"
  1. ;;
  1. ;;3. Allow ERA posting process to obtain Date of Service from the line
  1. ;; item level if Date of Service not available at the claim level.
  1. ;;
  1. ;;4. New Posting Menu option called Standard Adjustment Reason Code
  1. ;; Inquiry.
  1. ;;
  1. ;;5. Reworded all references of "check" to "chk/EFT #" in regards to
  1. ;; ERA Posting and Collection Batch Items.
  1. ;;
  1. ;;6. Modified ERA Posting option Review Postable Claims allowing
  1. ;; check/EFT # to be reviewed more than once.
  1. ;;
  1. ;;7. Seven Support Center calls that have been resolved:
  1. ;;
  1. ;; a. Resolved undefined error when loading an ERA file and the
  1. ;; user must pick the correct bill if more than one bill in
  1. ;; RPMS matches the bill on the ERA (835).
  1. ;; b. Resolved undefined error when loading an ERA file that is
  1. ;; all one line and has a carriage return/line feed at the end.
  1. ;; c. Modified Post ERA Claims option to stop display of negative
  1. ;; balance on bill if posting bill's single transaction brings
  1. ;; the bill's balance to zero in A/R.
  1. ;; d. Modified Collection Batch totals to not include items with a
  1. ;; status of "rolled up".
  1. ;; e. Modified Load New Import option for AHCCCS Transport
  1. ;; (proprietary format) to allow mapping of AHCCCS denial codes
  1. ;; to RPMS categories and reasons.
  1. ;; f. Modified Flag Patients Accounts for Statements to allow marking
  1. ;; of patient registered at satellite when user is logged into
  1. ;; parent.
  1. ;; g. Resolved undefined error when Posting Refunds.
  1. ;;END