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

ABMELGCK.m

Go to the documentation of this file.
ABMELGCK ; IHS/SD/SDR - Recreate cancelled claim from PCC ;
 ;;2.6;IHS 3P BILLING SYSTEM;**14,21**;NOV 12, 2009;Build 379
 ;Allows user to look up eligibility for visit by patient
 ;This runs "eligiblity checker" portion of CG and outputs
 ;ABML array of info found
 ;IHS/SD/SDR - 2.6*21 - HEAT123571 - defined ABMP("VDT") to stop <UNDEF>OPCK+13^ABMDVCK1 error
 ;IHS/SD/SDR - 2.6*21 - HEAT137034 - Added visit type to display
 ;
START ;EP
 S DIC="^AUPNPAT("
 S DIC(0)="AEMQ"
 S DIC("S")="I $D(^AUPNVSIT(""AC"",Y))"
 D ^DIC
 I Y<0 G Q
 S ABMPDFN=+Y
 S DIC="^AUPNVSIT("
 S DIC(0)="AEQ"
 S DIC("S")="I $D(^AUPNVSIT(""AC"",DFN,Y))&'$P(^AUPNVSIT(Y,0),U,11)"
 D ^DIC
 I Y<0 G Q
 S ABMVDFN=+Y
 ;S ABMVDT=+$P($G(^AUPNVSIT(ABMVDFN,0)),U)  ;abm*2.6*21 IHS/SD/SDR HEAT123571
 S (ABMVDT,ABMP("VDT"))=+$P($G(^AUPNVSIT(ABMVDFN,0)),U)  ;abm*2.6*21 IHS/SD/SDR HEAT123571
 S ABMSERVC=$P($G(^AUPNVSIT(ABMVDFN,0)),U,7)  ;abm*2.6*21 IHS/SD/SDR HEAT137034
 S ABMCLN=$$GET1^DIQ(40.7,$P($G(^AUPNVSIT(ABMVDFN,0)),U,8),1,"E")  ;abm*2.6*21 IHS/SD/SDR HEAT137034
 S ABML=""
 D ELG^ABMDLCK(ABMVDFN,.ABML,ABMPDFN,ABMVDT)
 ;
 W !!
 W !,"For patient ",$P($G(^DPT(ABMPDFN,0)),U),", for visit ",$$CDT^ABMDUTL($P($G(^AUPNVSIT(ABMVDFN,0)),U)),!
 ;W "PRIORITY",?9,"INSURER",?37,"STATUS",?50,"REASON UNBILLABLE",!  ;abm*2.6*21 IHS/SD/SDR HEAT137034
 W "PRIORITY",?9,"INSURER",?37,"VTYP",?42,"STATUS",?53,"REASON UNBILLABLE",!  ;abm*2.6*21 IHS/SD/SDR HEAT137034
 F A=1:1:80 W "-"
 W !
 S ABMPRI=0
 K ABME
 F  S ABMPRI=$O(ABML(ABMPRI)) Q:+ABMPRI=0  D
 .S ABMINS=0
 .F  S ABMINS=$O(ABML(ABMPRI,ABMINS)) Q:+ABMINS=0  D
 ..W ?2,ABMPRI
 ..W ?9,$E($P($G(^AUTNINS(ABMINS,0)),U),1,20)_"("_ABMINS_")"
 ..W ?37,$$VTYP^ABMDVCK1(ABMVDFN,ABMSERVC,ABMINS,ABMCLN)  ;abm*2.6*21 IHS/SD/SDR HEAT137034
 ..;W ?37,$S(+$P(ABML(ABMPRI,ABMINS),U,6):"UNBILLABLE",1:"BILLABLE")  ;abm*2.6*21 IHS/SD/SDR HEAT137034
 ..W ?42,$S(+$P(ABML(ABMPRI,ABMINS),U,6):"UNBILLABLE",1:"BILLABLE")  ;abm*2.6*21 IHS/SD/SDR HEAT137034
 ..;W:$P(ABML(ABMPRI,ABMINS),U,6) ?50,"("_$P(ABML(ABMPRI,ABMINS),U,6)_")",$E($P($G(^ABMDCS($P(ABML(ABMPRI,ABMINS),U,6),0)),U),1,26)  ;abm*2.6*21 IHS/SD/SDR HEAT137034
 ..W:$P(ABML(ABMPRI,ABMINS),U,6) ?53,"("_$P(ABML(ABMPRI,ABMINS),U,6)_")",$E($P($G(^ABMDCS($P(ABML(ABMPRI,ABMINS),U,6),0)),U),1,23)  ;abm*2.6*21 IHS/SD/SDR HEAT137034
 ..W !
 ..Q:($P(ABML(ABMPRI,ABMINS),U,6)="")
 ..S ABME($P(ABML(ABMPRI,ABMINS),U,6))=""
 W !!
 I $D(ABME) D
 .W ?1,"REASON UNBILLABLE KEY:"
 .S ABMA=0
 .F  S ABMA=$O(ABME(ABMA)) Q:+ABMA=0  D
 ..W !?3,ABMA_" - ",$P($G(^ABMDCS(ABMA,0)),U)
 .W !
 G START
 ;
Q K DIC,DIE,ABMV,DR
 Q