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

ABMDVCK2.m

Go to the documentation of this file.
  1. ABMDVCK2 ; IHS/ASDST/DMJ - PCC Visit Edits ;
  1. ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
  1. ;Original;TMD;08/19/96 4:49 PM
  1. ;Split off from ABMDVCK0
  1. ;
  1. ;IHS/DSD/MRS - 9/13/1999 - NOIS BXX-0999-150023 Patch 3 #14
  1. ; Increased default lag time from 5 to 45 days
  1. ; IHS/ASDS/LSL - 05/19/00 - V2.4 Patch 1 - NOIS NCA-0500-180018
  1. ; Modified to do proper checking of POV and orphan lag time
  1. ; for children visits where a parent claim already exists and
  1. ; has proper POV.
  1. ;
  1. ;IHS/ASDS/DMJ - 03/20/01 - V2.4 P5 - NOIS NHA-0201-180052
  1. ; Modified to correct "Visit location not found in 3P
  1. ; site parameters" error
  1. ;
  1. ; IHS/ASDS/LSL - 06/27/01 - V2.4 Patch 9 - NOIS HQW-0798-100082
  1. ; Modified to expand No Eligibility Found. Routine created as
  1. ; ABMDVCK0 became too large
  1. ;
  1. ; *********************************************************************
  1. ;
  1. Q
  1. ;
  1. ;ABML - eligibility array
  1. INS ; EP ;Go thru insurers in eligibility array
  1. ;This involves a lot of repeat checking thru stuffing rtns with little
  1. ;or no use of info in ABML.
  1. N COVB
  1. S ABMP("INS")=""
  1. F S ABMP("INS")=$O(ABML(ABMP("PRI"),ABMP("INS"))) Q:'ABMP("INS") D Q:$D(ABMP("NOKILLABILL"))!$D(ABMP("LOCKFAIL"))
  1. .S ABM("INS")=ABMP("INS")
  1. .S COVB=""
  1. .I $P(ABML(ABMP("PRI"),ABMP("INS")),U,3)?1(1"M",1"R") D
  1. ..Q:"AS"'[SERVCAT
  1. ..S I=""
  1. ..S COVB="M"
  1. ..S:$$PARTB^ABMDSPLB(ABMP("PDFN"),ABMP("VDT")) COVB=1
  1. .I COVB="M",ABMPRIM?1(1"M",1"R") D Q
  1. ..S DIE="^AUPNVSIT("
  1. ..S DA=ABMVDFN
  1. ..S DR=".04////28"
  1. ..D ^DIE
  1. .I ABMPRIM="W",ABMP("PRI")=1 D VC Q ;Workmans comp
  1. .D VC2
  1. ;ABML is the eligibility array. It is set up in ^ABMDLCK & ^ABMDLCK2
  1. Q
  1. ;
  1. ; *********************************************************************
  1. VC ; Only executed for workman's comp
  1. ;If only dental is billable and not dental clinic quit
  1. I $P($G(^AUTNINS(ABMP("INS"),2)),U,5)="O",$P(^DIC(40.7,ABMP("CLN"),0),U,2)'=56 Q
  1. ;If dental not billable and dental clinic quit
  1. I $P(^DIC(40.7,ABMP("CLN"),0),U,2)=56,$P($G(^AUTNINS(ABMP("INS"),2)),U,5)="U" Q
  1. ;If clinic pharmacy and its unbillable quit
  1. I $P(^DIC(40.7,ABMP("CLN"),0),U,2)=39,$P($G(^AUTNINS(ABMP("INS"),2)),U,3)="U" Q
  1. ;Quit if status unbillable
  1. S ABM("INS2")=$G(^AUTNINS(ABMP("INS"),2)) Q:$P($G(^(1)),U,7)=4
  1. ;Check back billing limit
  1. I $P(ABM("INS2"),U,4)>0 S X1=DT,X2=0-($P(ABM("INS2"),U,4)*30.417) D C^%DTC Q:ABMP("VDT")<X
  1. VC2 ; for all types of insurance
  1. S ABM("PRI")=ABMP("PRI")
  1. D ^ABMDVST
  1. I $D(ABMP("CDFN")) L -^ABMDCLM(DUZ(2),ABMP("CDFN"))
  1. Q
  1. ;
  1. ; *********************************************************************
  1. ORPHAN(VIS) ;EP
  1. ;-Potential orphan - allow claim with missing Provider
  1. N OK,PROV,L,BP,VFILE,V0
  1. S OK=""
  1. F VFILE="^AUPNVLAB","^AUPNVPTH","^AUPNVMIC","^AUPNVBB","^AUPNVCYT","^AUPNVMED","^AUPNVRAD" D Q:OK
  1. .I $D(@VFILE@("AD",VIS)) D
  1. ..S L=0
  1. ..F S L=$O(@VFILE@("AD",VIS,L)) Q:'L D Q:OK
  1. ...S PROV=$P($G(@VFILE@(L,12)),U,2)
  1. ...I PROV S OK=1
  1. Q:OK OK
  1. S V0=$S($D(ABMP("V0")):ABMP("V0"),1:^AUPNVSIT(VIS,0))
  1. S BP=$P(V0,U,28)
  1. I BP D
  1. .Q:'$D(^AUPNVPRV("AD",BP))
  1. .S OK=1
  1. Q OK
  1. ;
  1. ; *********************************************************************
  1. MISSPOV(VIS) ; EP ;Allow claim if POV missing
  1. I $D(^AUPNVIMM("AD",VIS)) Q 1
  1. I $D(^AUPNVSK("AD",VIS)) Q 1
  1. I $D(^AUPNVMED("AD",VIS)) Q 1
  1. I $D(^AUPNVPT("AD",VIS)) Q 1
  1. I $D(^AUPNVCPT("AD",VIS)) Q 1
  1. I $D(^AUPNVDXP("AD",VIS)) Q 1
  1. I $D(^AUPNVRAD("AD",VIS)) Q 1
  1. I $D(^AUPNVLAB("AD",VIS)) Q 1
  1. I $D(^AUPNVPTH("AD",VIS)) Q 1
  1. I $D(^AUPNVMIC("AD",VIS)) Q 1
  1. I $D(^AUPNVBB("AD",VIS)) Q 1
  1. Q 0
  1. ;
  1. ; *********************************************************************
  1. PCFL(X) ; EP ; file .04 field in VISIT file
  1. S DIE="^AUPNVSIT("
  1. S DA=ABMVDFN
  1. S DR=".04////"_X
  1. D ^DIE
  1. Q