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