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

PSOERXP1.m

Go to the documentation of this file.
PSOERXP1 ;ALB/BWF - eRx Patient Validation - ListMan ; 06 Apr 2023  1:00 PM
 ;;7.0;OUTPATIENT PHARMACY;**467,520,527,551,581,700,746**;DEC 1997;Build 106
 ;
EN ; -- main entry point for PSO ERX HOLDING QUEUE
 N MBMSITE
 S MBMSITE=$S($$GET1^DIQ(59.7,1,102,"I")="MBM":1,1:0)
 D EN^VALM("PSO ERX PATIENT VALIDATION")
 Q
 ;
LMHDR ; ListMan Header Code
 D SHOW^VALM,HDR^PSOERXP1
 S XQORM("??")="D HELP^VALM2,HDR^PSOERXP1"
 Q
 ;
HDR ; -- header code
 N AMATCH,VPATIEN,VALUSER,VALDTTM,MATCH,HDR
 S AMATCH=$$GET1^DIQ(52.49,PSOIEN,1.6,"I"),VPATIEN=$$GET1^DIQ(52.49,PSOIEN,.05,"I")
 S VALUSER=$$GET1^DIQ(52.49,PSOIEN,1.13,"E"),VALDTTM=$$GET1^DIQ(52.49,PSOIEN,1.14,"I")
 S VALMHDR(1)="eRx Reference #: "_IOINHI_$$GET1^DIQ(52.49,PSOIEN,.01,"E")_IOINORM
 ;Only Displays Eligibility info if VistA Patient is selected
 I $G(VPATIEN) D
 . D INSTR^VALM1($S($G(MBMSITE):"ChampVA Rx Benefit: ",1:"Eligibility: ")_IOINHI_$$ELIG(VPATIEN)_IOINORM,$S($G(MBMSITE):41,1:30),2)
 S MATCH=$S(AMATCH=1:"AUTO-MATCHED",AMATCH=2:"AUTO-MATCHED/EDITED",VPATIEN:"MANUALLY-MATCHED",1:"")
 I VALUSER'="",MATCH'="" S MATCH=MATCH_" | VALIDATED by "_$E(VALUSER,1,19)_" on "_$$FMTE^XLFDT(VALDTTM,"2Y")
 I MATCH="" S MATCH="NOT MATCHED"
 S $E(MATCH,81)="" D INSTR^VALM1("Status: "_IOINHI_MATCH_IOINORM,1,3)
 S HDR="",$E(HDR,15)="ERX PATIENT",$E(HDR,40)="|",$E(HDR,54)="VISTA PATIENT"
 S $E(HDR,81)="" D INSTR^VALM1(IORVON_IOUON_HDR_IORVOFF_IOINORM,1,4)
 Q
 ;
INIT ;
 ; - Resetting list to NORMAL video attributes
 D RESET^PSOERUT0()
 S LINE=0
 ;
 D SETPAT^PSOERUT0("LM",PSOIEN,,"PSOERXP1")
 ;
 S VALMCNT=LINE-1
 S EDTYP="P"
 ; - Saving NORMAL video attributes to be reset later
 I LINE>$G(LASTLINE) D
 . F I=($G(LASTLINE)+1):1:LINE D SAVE^VALM10(I)
 . S LASTLINE=LINE
 D VIDEO^PSOERUT0()
 Q
 ;
HELP ; -- help code
 Q
 ;
EXIT ; -- exit code
 K EDTYP,@VALMAR
 Q
 ;
EXPND ; -- expand code
 Q
 ;
ELIG(DFN) ; Eligibility Label (Different between VA Site and MbM)
 ; Input: DFN    - Pointer to PATIENT File(#2)
 ;
 ;Eligibility Information
 N ELIG S ELIG=""
 I $G(DFN) D
 . I $$GET1^DIQ(59.7,1,102,"I")'="MBM" D
 . . D ELIG^VADPT S ELIG=$P(VAEL(1),"^",2)_$S(+VAEL(3):" (SC%: "_$P(VAEL(3),"^",2)_")",1:"")
 . E  D
 . . S ELIG=$P($$CHVAELIG^PSOERXU9(DFN),"^",2)
 Q ELIG