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

AGEDPRVU.m

Go to the documentation of this file.
AGEDPRVU ;IHS/ASDS/TPF - EDIT/DISPLAY PRIVATE INSURANCE UTIL ;    
 ;;7.1;PATIENT REGISTRATION;**1,2**;JAN 31, 2007
 Q
HDR(ID0) ;EP - CALLED BY AGEDPRV
 I $G(AGSELECT)'="" S INSREC=$P($P($G(AGSELECT),U,11),",",3),AGELP("PH")=$S('$D(^AUPNPRVT(ID0,11,INSREC,0)):"",1:$P($G(^(0)),U,8)),AGELP("INS")=$S(AGELP("PH")]"":$P($G(^(0)),U),1:"")
 I $G(ID0)'="" D
 .S AGPAT=$P($G(^DPT(ID0,0)),U)
 .S AGCHRT=$S($D(^AUPNPAT(ID0,41,DUZ(2),0)):$P($G(^AUPNPAT(ID0,41,DUZ(2),0)),U,2),1:"xxxxx")
 .S:$D(^AUPNPAT(ID0,0)) AG("AUPN")=$G(^(0))
 S AG("AUPN")=""
 S AGLINE("-")=$TR($J(" ",78)," ","-")
 S AGLINE("EQ")=$TR($J(" ",78)," ","=")
 S $P(AGLINE("PGLN"),"=",81)=""
 W $$S^AGVDF("IOF"),!
 S ROUTID=$P($T(+1)," ")
 S SUBS=$P($G(AGSELECT),U,11)
 D PROGVIEW^AGUTILS(DUZ,SUBS)
 W "IHS REGISTRATION ",$S($D(AGSEENLY):"VIEW SCREEN",1:"EDITOR")
 ;MODIFY THIS TO BE SPECIFIC TO YOUR EDIT SCREEN
 W ?36,"Private Insurance"
 W ?80-$L($P($G(^DIC(4,DUZ(2),0)),U)),$P($G(^DIC(4,DUZ(2),0)),U)
 S AGLINE("-")=$TR($J(" ",80)," ","-")
 S AGLINE("EQ")=$TR($J(" ",80)," ","=")
 W !,AGLINE("EQ")
 W !,$E(AGPAT,1,23)
 W ?23,$$DTEST^AGUTILS(ID0)
 I $D(AGCHRT) W ?42,"HRN#:",AGCHRT
 ;GET ELIGIBILITY STATUS
 I ID0 S AGELSTS=$P($G(^AUPNPAT(ID0,11)),U,12)
 W ?56,"(",$S(AGELSTS="C":"CHS & DIRECT",AGELSTS="I":"INELIGIBLE",AGELSTS="D":"DIRECT ONLY",AGELSTS="P":"PENDING VERIFICATION",1:"NONE"),")"
 W !,AGLINE("EQ")
 S DA=ID0
 K AG("EDIT"),INSREC
 Q