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

IBCNBLL.m

Go to the documentation of this file.
  1. IBCNBLL ;ALB/ARH - Ins Buffer: LM main screen, list buffer entries ;1 Jun 97
  1. ;;2.0;INTEGRATED BILLING;**82,149,153,183,184,271,345,416,438,435,506,519,528,549,601,595,631,664,668,737,771,794**;21-MAR-94;Build 9
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ; DBIA# 642 for call to $$LST^DGMTU
  1. ; DBIA# 4433 for call to $$SDAPI^SDAMA301
  1. ;
  1. EN ; - main entry point for screen
  1. N VIEW,AVIEW,DFLG,IBKEYS
  1. S VIEW=6,AVIEW=0 ; default to complete view ;IB*2*506/taz changed
  1. K ^TMP("IBCNERTQ",$J) ; clear temp. global for eIV real time inquiries
  1. D EN^VALM("IBCNB INSURANCE BUFFER LIST")
  1. Q
  1. ;
  1. EN1(V) ; entry point from view changing actions
  1. S VIEW=V S AVIEW=$S(VIEW=4:1,1:0)
  1. D INIT,HDR
  1. S VALMBCK="R",VALMBG=1
  1. Q
  1. ;
  1. HDR ; header code for list manager display
  1. S VALMHDR(1)="Sorted by: "_$P(IBCNSORT,U,2)
  1. I $P(IBCNSORT,U,3)'="" S VALMHDR(1)=VALMHDR(1)_", """_$P(IBCNSORT,U,3)_""" first"
  1. ; IB*2.0*737/DTG remove '* verified' reference from VALMSG,
  1. ; impacts views 1-3 and 5
  1. ; I VIEW=1 S VALM("TITLE")="Positive Insurance Buffer",VALMSG="*Verified +Active" ;IB*2*506/taz Only shows Verified and Active records.
  1. ; I VIEW=2 S VALM("TITLE")="Negative Insurance Buffer",VALMSG="*Verified -N/Active" ;IB*2*506/taz Only shows Verified and N/Active records.
  1. ; I VIEW=3 S VALM("TITLE")="Medicare(WNR) Insurance Buffer",VALMSG="*Verified +Act -N/Act ?Await/R #Unclr !Unable/Send"
  1. ; I VIEW=5 S VALM("TITLE")="e-Pharmacy Buffer",VALMSG="*Verified" ; IB*2*435
  1. I VIEW=1 S VALM("TITLE")="Positive Insurance Buffer",VALMSG="+Active" ;IB*2*506/taz & IB*737 Active policies only
  1. I VIEW=2 S VALM("TITLE")="Negative Insurance Buffer",VALMSG="-N/Active" ;IB*2*506/taz & IB*737 Inactive policies only
  1. I VIEW=3 S VALM("TITLE")="Medicare(WNR) Insurance Buffer",VALMSG="+Act -N/Act ?Await/R #Unclr !Unable/Send" ; IB737 removed *Verified
  1. I VIEW=4 S VALM("TITLE")="Failure Buffer",VALMSG="!Unable/Send" ;IB*2*506/taz changed
  1. I VIEW=5 S VALM("TITLE")="e-Pharmacy Buffer",VALMSG="" ; IB*2*435 & IB*737 dropped "*Verified"
  1. I VIEW=6 S VALM("TITLE")="Complete Buffer",VALMSG="" ; IB*2*506/taz added
  1. I VIEW=7 S VALM("TITLE")="TRICARE/CHAMPVA",VALMSG="" ;528/baa added
  1. Q
  1. ;
  1. INIT ; initialization for list manager list
  1. K ^TMP("IBCNBLL",$J),^TMP("IBCNBLLX",$J),^TMP("IBCNBLLY",$J),^TMP($J,"IBCNBLLS"),^TMP($J,"IBCNAPPTS")
  1. ; IB*2.0*737/DTG correct IBCNSORT due to removed "*"
  1. ; S:$G(IBCNSORT)="" IBCNSORT=$S(VIEW=1:"10^Positive Response",1:"1^Patient Name")
  1. ;IB*794/DTG if sort is null default to patient name for all
  1. ;S:$G(IBCNSORT)="" IBCNSORT=$S(VIEW=1:"9^Positive Response",1:"1^Patient Name")
  1. S:$G(IBCNSORT)="" IBCNSORT="1^Patient Name"
  1. S IBKEYS=$$GETKEYS(DUZ) ;IB*2*506/taz user must have either IB INSURANCE EDIT or IB GROUP/PLAN EDIT in order to view entries without defined insurance company entries
  1. D BLD
  1. Q
  1. ;
  1. HELP ; list manager help
  1. D FULL^VALM1
  1. S VALMBCK="R"
  1. W @IOF
  1. W !,"Flags displayed on screen if they apply to the Buffer entry:"
  1. W !," i - Patient has other currently effective Insurance"
  1. W !," I - Patient is currently admitted as an Inpatient"
  1. W !," E - Patient has Expired"
  1. W !," Y - Means Test Copay Patient"
  1. W !," H - Patient has Bills On Hold"
  1. ; W !," * - Buffer entry Verified by User" ; IB*2.0*737 removed
  1. W !
  1. D PAUSE^VALM1 I 'Y Q
  1. W !,"Sources displayed on the screen if they apply to the Buffer entry:"
  1. W !," I - Interview"
  1. W !," D - Data Match"
  1. W !," V - IVM"
  1. W !," P - Pre-Registration"
  1. W !," E - eIV"
  1. W !," H - HMS"
  1. W !," M - Medicare"
  1. W !," R - ICB Card Reader"
  1. W !," C - Contract Services"
  1. W !," X - e-Pharmacy" ; IB*2*435
  1. ; IB*2*595/DM K,T,U,B,O,N,S,A,J added
  1. W !," K - Kiosk"
  1. W !," F - Interfacility Insurance Update" ; IB*2*528
  1. W !," T - Insurance Import"
  1. ; IB*2.0*631/VD - Changed U from Purchased Care Choice to Community Care Network
  1. W !," U - Community Care Network"
  1. W !," B - Purchased Care Fee-Basis"
  1. W !," O - Purchased Care Other"
  1. W !," N - Insurance Intake"
  1. W !," S - Insurance Verification"
  1. W !," A - Veteran Appt Request"
  1. W !," J - MYVA Health Journal"
  1. ;/vd - IB*2*664 - Added "W" for Electronic Health Record
  1. W !," W - Electronic Health Record"
  1. W !," G - Adv Med Cost Mgmt Solution" ;IB*668/DW Added
  1. D PAUSE^VALM1 I 'Y Q
  1. ;
  1. I VIEW'=5 D ; IB*2*435
  1. . W !,"eIV Electronic Insurance Verification Status"
  1. . W !!,"The following eIV Status indicators may appear to the left of the patient name:",!
  1. . Q
  1. ;
  1. I VIEW=1 D
  1. .W !," + - eIV payer response indicates this is an active policy."
  1. .W !," $ - Escalated active policy."
  1. .; W !," * - Previously an active policy." ; IB*2.0*737 removed
  1. .Q
  1. I VIEW=2 D
  1. .W !," - - eIV payer response indicates this is NOT an active policy."
  1. .; W !," * - Previously an not active policy." ; IB*2.0*737 removed
  1. .Q
  1. I $F(",3,6,7,",VIEW) D ;528/baa
  1. .W !," + - eIV payer response indicates this is an active policy."
  1. .W !," ? - Awaiting electronic reply from eIV Payer."
  1. .W !," $ - Escalated Active policy."
  1. .; W !," * - Previously either an active or not active policy." ; IB*2.0*737 removed
  1. .W !," # - Can not determine from eIV response if coverage is Active."
  1. .W !," Review Response Report. Manual verification required."
  1. .W !," ! - eIV was unable to send an inquiry for this entry."
  1. .W !," Corrections required or payer not Active."
  1. .W !," - - eIV payer response indicates this is NOT an active policy."
  1. .W !," % - CMS responded with the patient's new MBI value."
  1. .W !,"<Blank> - Entry added through manual process."
  1. .Q
  1. I VIEW=4 D
  1. .W !," ! - eIV was unable to send an inquiry for this entry."
  1. .W !," Corrections required or payer not Active."
  1. .Q
  1. ;
  1. I VIEW=5 D ; IB*2*435
  1. . W !," e-Pharmacy buffer entries are not applicable for e-IV processing."
  1. . Q
  1. ;
  1. D PAUSE^VALM1 I 'Y Q
  1. W !,"When an entry is Processed it is either:"
  1. W !," Accepted - the Buffer entry's data is stored in the main Insurance files."
  1. W !," - the modified Insurance entry is flagged as Verified."
  1. W !
  1. W !," Rejected - the Buffer entry's data is not stored in the main Insurance files."
  1. W !!
  1. W !,"Once an entry is processed (either accepted or rejected) most of the data in"
  1. W !,"the Buffer File entry is deleted leaving only a stub entry for tracking"
  1. W !,"and reporting purposes."
  1. W !!
  1. W !,"The IB INSURANCE SUPERVISOR key is required to either Accept or Reject an entry."
  1. D PAUSE^VALM1
  1. Q
  1. ;
  1. EXIT ; exit list manager option and clean up
  1. K ^TMP("IBCNBLL",$J),^TMP("IBCNBLLX",$J),^TMP("IBCNBLLY",$J),^TMP($J,"IBCNBLLS"),^TMP($J,"SDAMA301"),^TMP($J,"IBCNAPPTS")
  1. K IBCNSORT,IBCNSCRN,DFN,IBINSDA,IBFASTXT,IBBUFDA
  1. D CLEAR^VALM1
  1. Q
  1. ;
  1. BLD ; build screen display
  1. N IBCNT,IBCNS1,IBCNS2,IBBUFDA,IBLINE
  1. ;
  1. D SORT S IBCNT=0,VALMCNT=0,IBBUFDA=0
  1. ;
  1. I '$D(ZTQUEUED) W !,"Building display " ;IB*794/DJW telling users what we are doing
  1. S IBCNS1="" F S IBCNS1=$O(^TMP($J,"IBCNBLLS",IBCNS1)) Q:IBCNS1="" D
  1. .S IBCNS2="" F S IBCNS2=$O(^TMP($J,"IBCNBLLS",IBCNS1,IBCNS2)) Q:IBCNS2="" D
  1. ..S IBBUFDA=0 F S IBBUFDA=$O(^TMP($J,"IBCNBLLS",IBCNS1,IBCNS2,IBBUFDA)) Q:'IBBUFDA D
  1. ...S DFLG=^TMP($J,"IBCNBLLS",IBCNS1,IBCNS2,IBBUFDA)
  1. ...S IBCNT=IBCNT+1 I '$D(ZTQUEUED),'(IBCNT#100) W "." ;IB*794/DJW changed '(IBCNT#15) to be #100
  1. ...S IBLINE=$$BLDLN(IBBUFDA,IBCNT,DFLG) I IBLINE="" S IBCNT=IBCNT-1 Q ; IB*2*506/taz If line is null stop processing this entry.
  1. ...D SET(IBLINE,IBCNT)
  1. ;
  1. I VALMCNT=0 D SET("",0),SET("There are no Buffer entries that have not been processed.",0)
  1. Q
  1. ;
  1. BLDLN(IBBUFDA,IBCNT,DFLG) ; build line to display on List screen for one Buffer entry
  1. N DFN,IB0,IB20,IB40,IB60,IBLINE,IBMTS,IBY,MCFLAG,VA,VADM,VAERR,VAIN,X,Y
  1. S IBLINE="",IBBUFDA=+$G(IBBUFDA)
  1. S IB40=$G(^IBA(355.33,IBBUFDA,40)),MCFLAG=$$GTMFLG(IBBUFDA) ;IB*2.0*549
  1. S IB0=$G(^IBA(355.33,IBBUFDA,0)),IB20=$G(^IBA(355.33,IBBUFDA,20)),IB60=$G(^IBA(355.33,IBBUFDA,60))
  1. S DFN=+IB60 I +DFN D DEM^VADPT,INP^VADPT
  1. ;
  1. ;IB*2.0*549 - Replaced the following line of code:
  1. ;I 'IBKEYS,'$$ACTIVE(DFN) G BLDLNQ ;IB*2*506/taz Only allow active insurance for users not holding IB INSURANCE EDIT or IB GROUP/PLAN EDIT keys
  1. ; With the following code that will determine if the list item is Medicare (+MCFLAG,) then include it on
  1. ; the list even if the user doesn't have the security keys and if the patient has ACTIVE or INACTIVE policies.
  1. I 'IBKEYS,'$$ACTIVE(DFN),'MCFLAG G BLDLNQ ;IB*2.0*549
  1. ;
  1. S IBY=$G(IBCNT),IBLINE=$$SETSTR^VALM1(IBY,"",1,4)
  1. ;
  1. ; ESG - 6/6/02 - SDD 5.1.8
  1. ; pull the symbol from the symbol function
  1. ;
  1. S IBY=$$SYMBOL(IBBUFDA)
  1. ;I IBY="*" S IBY=" " ;528/baa ;IB*737/DTG stop '*' verified
  1. S IBY=IBY_$P($G(^DPT(+DFN,0)),U,1),IBLINE=$$SETSTR^VALM1(IBY,IBLINE,5,20)
  1. S IBLINE=$$SETSTR^VALM1(DFLG,IBLINE,25,1)
  1. S IBY=$G(VA("BID")),IBLINE=$$SETSTR^VALM1(IBY,IBLINE,27,4)
  1. S IBY=$P(IB20,U,1),IBLINE=$$SETSTR^VALM1(IBY,IBLINE,32,17)
  1. S IBY=$P(IB60,U,4),IBLINE=$$SETSTR^VALM1(IBY,IBLINE,50,13)
  1. S IBY=$$GET1^DIQ(355.12,$P(IB0,U,3),.03),IBLINE=$$SETSTR^VALM1($$SRCCNV(IBY),IBLINE,64,1)
  1. S IBY=$$DATE(+IB0),IBLINE=$$SETSTR^VALM1(IBY,IBLINE,66,8)
  1. ;IB*771/TAZ - Moved Flags logic to FLAGS subroutine.
  1. S IBY="" D FLAGS(DFN,.IBY) S IBLINE=$$SETSTR^VALM1(IBY,IBLINE,76,5)
  1. BLDLNQ ; IB*2*506/taz Tag added
  1. Q IBLINE
  1. ;
  1. FLAGS(DFN,IBY) ;Build flag set for line
  1. ;IB*771/TAZ - Segregated so that the code could be called from other routines.
  1. ;INPUT:
  1. ; DFN - Patient IEN
  1. ; IBY - String to append the buffer flags to. Must be initialized in calling routine.
  1. ;
  1. ;
  1. ;OUTPUT:
  1. ; IBY - String with formatted flags appended.
  1. ;
  1. N IBMTS,VA,VADM,VAIN,VAERR
  1. D DEM^VADPT,INP^VADPT
  1. S IBY=IBY_$S(+$$INSURED^IBCNS1(DFN,DT):"i",1:" ")
  1. S IBY=IBY_$S(+$G(VAIN(1)):"I",1:" ")
  1. S IBY=IBY_$S(+$G(VADM(6)):"E",1:" ")
  1. S IBMTS=$P($$LST^DGMTU(DFN),U,4)
  1. S IBY=IBY_$S(IBMTS="C":"Y",IBMTS="G":"Y",1:" ")
  1. S IBY=IBY_$S(+$$HOLD(DFN):"H",1:" ")
  1. Q
  1. ;
  1. SET(LINE,CNT) ; set up list manager screen display array
  1. S VALMCNT=VALMCNT+1
  1. S ^TMP("IBCNBLL",$J,VALMCNT,0)=LINE Q:'CNT
  1. S ^TMP("IBCNBLL",$J,"IDX",VALMCNT,+CNT)=""
  1. S ^TMP("IBCNBLLX",$J,CNT)=VALMCNT_U_IBBUFDA
  1. S ^TMP("IBCNBLLY",$J,IBBUFDA)=VALMCNT_U_+CNT
  1. Q
  1. ;
  1. SORT ; set up sort for list screen
  1. ; IB*2.0*737/DTG remove "8^Verified" reference
  1. ; Line below is the relationship between the sort order and the external description.
  1. ; 1^Patient Name, 2^Ins Name, 3^Source Of Info, 4^Date Entered, 5^Inpatient (Y/N), 6^Means Test (Y/N), 7^On Hold, 8^Verified, 9^eIV Status, 10^Positive Response
  1. ; 1^Patient Name, 2^Ins Name, 3^Source Of Info, 4^Date Entered, 5^Inpatient (Y/N), 6^Means Test (Y/N), 7^On Hold, 8^eIV Status, 10^Positive Response
  1. N APPTNUM,IB0,IB20,IB60,IBCNDT,IBBUFDA,IBCNDFN,IBCNPAT,IBCSORT1,IBCSORT2,IBSDA,DFN,VAIN,VA,VAERR,IBX,IBCNT,INAME,SYM,X,Y
  1. S IBCNT=0
  1. ;
  1. K ^TMP($J,"IBCNBLLS") I '$G(IBCNSORT) S IBCNSORT="1^Patient Name"
  1. ; get payer ien for Medicare WNR
  1. ;
  1. I '$D(ZTQUEUED) W !,"Gathering and sorting the records " ;IB*794/DJW telling users what we are doing
  1. S IBCNDT=0 F S IBCNDT=$O(^IBA(355.33,"AEST","E",IBCNDT)) Q:'IBCNDT D
  1. .S IBBUFDA=0 F S IBBUFDA=$O(^IBA(355.33,"AEST","E",IBCNDT,IBBUFDA)) Q:'IBBUFDA D
  1. ..S IBCNT=IBCNT+1 I '$D(ZTQUEUED),'(IBCNT#100) W "." ;IB*794/DJW changed '(IBCNT#15) to be #100
  1. ..S IB0=$G(^IBA(355.33,IBBUFDA,0)),IB20=$G(^IBA(355.33,IBBUFDA,20)),IB60=$G(^IBA(355.33,IBBUFDA,60))
  1. ..S IBCNDFN=+IB60,IBCNPAT="" I +IBCNDFN S IBCNPAT=$P($G(^DPT(IBCNDFN,0)),U,1)
  1. ..S INAME=$P(IB20,U)
  1. ..;
  1. ..I +IBCNSORT=1 S IBCSORT1=IBCNPAT
  1. ..I +IBCNSORT=2 S IBCSORT1=INAME
  1. ..I +IBCNSORT=3 S IBCSORT1=$P(IB0,U,3)
  1. ..I +IBCNSORT=4 S IBCSORT1=$P(+IB0,".",1)
  1. ..I +IBCNSORT=5 I +IBCNDFN S DFN=+IBCNDFN D INP^VADPT S IBCSORT1=$S($G(VAIN(1)):1,1:2)
  1. ..I +IBCNSORT=6 I +IBCNDFN S IBX=$P($$LST^DGMTU(IBCNDFN),U,4) S IBCSORT1=$S(IBX="C":1,IBX="G":1,1:2)
  1. ..I +IBCNSORT=7 I +IBCNDFN S IBX=$$HOLD(IBCNDFN) S IBCSORT1=$S(+IBX:1,1:2)
  1. .. ;IB*737 dropped "* verified" sort which was +IBCNSORT=8, changed
  1. .. ; code below where +IBCNSORT=9 & +IBCNSORT=10 is now 8 and 9
  1. .. ; to compensate for dropping "*"
  1. ..; I +IBCNSORT=8 S IBCSORT1=$S(+$P(IB0,U,10):1,1:2) ; IB*737 removed
  1. ..; Sort by symbol and then within the symbol, sort by date entered
  1. ..; Build a numerical subscript with format ##.FM date
  1. ..S SYM=$$SYMBOL(IBBUFDA)
  1. ..; I +IBCNSORT=9 S IBCSORT1=$G(IBCNSORT(1,SYM))_"."_$P(+IB0,".",1),IBCSORT1=+IBCSORT1 ;IB*737
  1. ..; I +IBCNSORT=10 S IBCSORT1=$S(SYM="+":0,1:1),IBCSORT2=IBCNPAT ;IB*737
  1. ..;
  1. ..I +IBCNSORT=8 S IBCSORT1=$G(IBCNSORT(1,SYM))_"."_$P(+IB0,".",1),IBCSORT1=+IBCSORT1 ;IB*737
  1. ..;
  1. ..I +IBCNSORT=9 S IBCSORT1=$S(SYM="+":0,1:1),IBCSORT2=IBCNPAT ;IB*737
  1. ..;
  1. ..S IBCSORT1=$S($G(IBCSORT1)="":"~UNKNOWN",1:IBCSORT1),IBCSORT2=$S(IBCNPAT="":"~UNKNOWN",1:IBCNPAT)
  1. ..; get future appointments
  1. ..S IBSDA(1)=DT,IBSDA(3)="R;I;NT",IBSDA(4)=IBCNDFN,IBSDA("FLDS")="1;2"
  1. ..S DFLG="" ;,APPTNUM=$$SDAPI^SDAMA301(.IBSDA) I APPTNUM>0,SYM="!" S DFLG="d" ; duplicate flag ;IB*2*506 appointment data removed.
  1. ..I $$INCL(VIEW,SYM,IB0) S ^TMP($J,"IBCNBLLS",IBCSORT1,IBCSORT2,IBBUFDA)=DFLG
  1. ..K VAIN,IBCSORT1,IBCSORT2
  1. ..Q
  1. .Q
  1. ;I IBCNT,'$D(ZTQUEUED) W "|" ;IB*794 "|" No longer needed
  1. Q
  1. ;
  1. INCL(VIEW,SYM,IB0) ;
  1. N INCL,IENS,IBEBI,MCFLAG
  1. S INCL=0
  1. ; IB*2*549 - Added 'MCFLAG to allow Medicare in the following line.
  1. S MCFLAG=$$GTMFLG(IBBUFDA)
  1. I 'IBKEYS,'MCFLAG,(SYM'="+") G INCLQ ; If users don't have required keys, they only see current Positive Entries.
  1. I VIEW=6 S INCL=1 G INCLQ ;Include Everything (Complete view)
  1. I VIEW=7,((INAME["TRICARE")!(INAME["CHAMPVA")) S INCL=1 G INCLQ ; Tricare/Champva;528/baa
  1. I VIEW=5,$P(IB0,U,17) S INCL=1 G INCLQ ;Only e-Pharmacy on e-Pharmacy view (IB*2*435)
  1. I $P(IB0,U,17) G INCLQ ;Exclude e-Pharmacy (IB*2*435)
  1. I VIEW=3,MCFLAG S INCL=1 G INCLQ ;Only Medicare View
  1. I MCFLAG G INCLQ ;Exclude Medicare from Positive, Negative and Failure Views
  1. I VIEW=4,(SYM="!") S INCL=1 G INCLQ ;Only failures on Failure view
  1. I VIEW=1,((SYM="+")!(SYM="$")) S INCL=1 G INCLQ ;Positive View
  1. I VIEW=2,(SYM="-") S INCL=1 G INCLQ ;Negative View
  1. ;I SYM="*" D G INCLQ ;IB*737/DTG stop '*' verified
  1. ;. ;find history in Response file for verified entries.
  1. ;. I $$GET1^DIQ(355.33,IBBUFDA,.15)="" S:(VIEW=1) INCL=1 Q ;IIV PROCESSED DATE field is empty entry is positive
  1. ;. S IENS="1,"_$O(^IBCN(365,"AF",IBBUFDA,""))_","
  1. ;. ;the following line of code is necessary to check for both "eIV Eligibility Determination" and "IIV Eligibility Determination" (IB*2.0*506)
  1. ;. I $$GET1^DIQ(365.02,IENS,.06)["IV Eligibility Determination" Q
  1. ;. S IBEBI=$$GET1^DIQ(365.02,IENS,.02) ;Eligibility/Benefits Info
  1. ;. I IBEBI=1 S:(VIEW=1) INCL=1 Q
  1. ;. I VIEW=2 S INCL=1 Q
  1. INCLQ ;
  1. Q INCL
  1. ;
  1. DATE(X) ;
  1. Q $E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)
  1. HOLD(DFN) ; returns true if patient has bills On Hold
  1. Q $D(^IB("AH",+$G(DFN)))
  1. ;
  1. SYMBOL(IBBUFDA) ; Returns the symbol for this buffer entry
  1. NEW IB0,SYM
  1. S IB0=$G(^IBA(355.33,IBBUFDA,0)),SYM=""
  1. I +$P(IB0,U,12) S SYM=$C($P($G(^IBE(365.15,+$P(IB0,U,12),0)),U,2))
  1. ; If the entry has been manually verified, override the symbol displayed
  1. ;I $P(IB0,U,10)'="",'+$P(IB0,U,12) S SYM="*" ;IB*737/DTG stop '*' verified
  1. I SYM="" S SYM=" "
  1. Q SYM
  1. ;
  1. ;
  1. UPDLN(IBBUFDA,ACTION) ; *** called by any action that modifies a buffer entry, so list screen can be updated if screen not recompiled
  1. ; modifies a single line in the display array for a buffer entry that has been modified in some way
  1. ; ACTION = REJECTED, ACCEPTED, EDITED
  1. N IBARRN,IBOLD,IBNEW,IBO,IBN S IBO="0123456789",IBN="----------"
  1. ;
  1. S IBARRN=$G(^TMP("IBCNBLLY",$J,+$G(IBBUFDA))) Q:'IBARRN
  1. S IBOLD=$G(^TMP("IBCNBLL",$J,+IBARRN,0)) Q:IBOLD=""
  1. ;
  1. ; if action is REJECTED or ACCEPTED then the patient name is replaced by the Action in the display array
  1. ; and the buffer entry is removed from the list of entries that can be selected
  1. I (ACTION="REJECTED")!(ACTION="ACCEPTED") D
  1. . S IBNEW=$TR($E(IBOLD,1,5),IBO,IBN)_ACTION_$J("",7)_$E(IBOLD,21,999)
  1. . S ^TMP("IBCNBLL",$J,+IBARRN,0)=IBNEW
  1. ;
  1. ; if the action is EDITED then the line for the buffer entry is recompiled and the updated line is set into
  1. ; the display array
  1. I ACTION="EDITED" D
  1. . S IBNEW=$$BLDLN(IBBUFDA,+$P(IBARRN,U,2),$E(IBOLD,25))
  1. . S ^TMP("IBCNBLL",$J,+IBARRN,0)=IBNEW
  1. Q
  1. ;
  1. SRCCNV(SRC) ; convert Source of Info acronym from field 355.12/.03 into 1 char code
  1. ; IB*2*595/DM T,U,B,O,N,S,A,K,J translations added
  1. ; IB*2*664/DW updated "U" for Community Care Network - should be CCN and not PCC
  1. ; IB*2*664/VD added "W" for Electronic Health Record
  1. ; IB*2*668/DW added "G" for Adv Med Cost Mgmt Solution
  1. N SRCSTR,CODE
  1. Q:SRC="" ""
  1. S SRCSTR="INTVW;I^DMTCH;D^IVM;V^PreRg;P^eIV;E^HMS;H^MCR;M^ICB;R^CS;C^eRxEL;X^IIU;F^INSPT;T^CCN;U^PCFB;B^PCOTR;O^INSIN;N^INSVR;S^VAR;A^KSK;K^MVAH;J^EHR;W^AMCMS;G"
  1. S CODE=$P($P(SRCSTR,SRC_";",2),U,1)
  1. Q CODE
  1. ;
  1. GETKEYS(DUZ) ;
  1. ;Make sure that user has the INSURANCE EDIT key and/or the GROUP/PLAN EDIT key. User
  1. ;must have either key in order to see non_Positive Entries.
  1. N KEY1,KEY2
  1. S KEY1=$O(^DIC(19.1,"B","IB INSURANCE COMPANY EDIT","")) I KEY1 S KEY1=$D(^VA(200,DUZ,51,KEY1))
  1. S KEY2=$O(^DIC(19.1,"B","IB GROUP PLAN EDIT","")) I KEY2 S KEY2=$D(^VA(200,DUZ,51,KEY2))
  1. Q KEY1!KEY2
  1. ;
  1. ACTIVE(DFN) ;Check for active insurance
  1. N IBINSCO
  1. D ALL^IBCNS1(DFN,"IBINSCO",3,DT,0) ;IB*2.0*519 allow WNRs and Indemnity plans
  1. Q +$G(IBINSCO(0))
  1. ;
  1. GTMFLG(IBBUFDA) ;Check if Medicare
  1. ; IB*2.0*549 Added method
  1. N MWNRIEN,MWNRFLG
  1. S MWNRFLG=0
  1. S MWNRIEN=$P($G(^IBE(350.9,1,51)),U,25)
  1. S MWNRFLG=0
  1. I MWNRIEN'="",$P($$INSERROR^IBCNEUT3("B",IBBUFDA),U,2)=MWNRIEN S MWNRFLG=1
  1. Q MWNRFLG
  1. REFRESH ; IB*794/DJW Refresh the buffer data but keep the selected view and sort
  1. D INIT,HDR
  1. S VALMBCK="R",VALMBG=1
  1. Q
  1. ;