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

ABME8L10.m

Go to the documentation of this file.
ABME8L10 ; IHS/ASDST/DMJ - Header 
 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
 ;Header Segments
 ;
 ; IHS/SD/EFG - V2.5 P8 - IM16385
 ;    Modified to print dental services
 ; IHS/SD/SDR - v2.5 p8 - IM20395
 ;   Split out lines bundled by rev code
 ; IHS/SD/SDR - v2.5 p11 - NPI
 ; IHS/SD/SDR - v2.5 p12 - IM25247
 ;   Added missing REF segment for TIN if NPI ONLY
 ;
EP ;START HERE
 S ABMLXCNT=0
 K ABM
 D FRATE^ABMDF11
 D ^ABMERGRV
 S ABMREV=""
 F  S ABMREV=$O(ABMRV(ABMREV)) Q:ABMREV=""  D
 .Q:ABMREV=9999
 .S ABMCODE=-1
 .F  S ABMCODE=$O(ABMRV(ABMREV,ABMCODE)) Q:ABMCODE=""  D
 ..S ABMCNTR=0
 ..F  S ABMCNTR=$O(ABMRV(ABMREV,ABMCODE,ABMCNTR)) Q:ABMCNTR=""  D
 ...D LOOP
 K ABMREV,ABMCODE,ABMCNTR
 Q
 ;
LOOP ;
 S ABMLXCNT=ABMLXCNT+1
 D EP^ABME8LX
 D WR^ABMUTL8("LX")
 D EP^ABME8SV2
 D WR^ABMUTL8("SV2")
 I $P(ABMRV(ABMREV,ABMCODE,ABMCNTR),U,10) D
 .D EP^ABME8DTP("472","D8",$P(ABMRV(ABMREV,ABMCODE,ABMCNTR),U,10))
 I '$P(ABMRV(ABMREV,ABMCODE,ABMCNTR),U,10) D
 .D EP^ABME8DTP(472,"D8",$P(ABMB7,U))
 D WR^ABMUTL8("DTP")
 ;
 ; Loop 2420A - Attending Physician
 I $P($G(ABMRV(ABMREV,ABMCODE,ABMCNTR)),U,15) D
 .S ABM("PRV")=$P(ABMRV(ABMREV,ABMCODE,ABMCNTR),U,15)
 .Q:ABM("PRV")=$O(ABMP("PRV","A",0))
 .D EP^ABME8NM1("71")
 .D WR^ABMUTL8("NM1")
 .I ABMNPIU="N" D
 ..D EP^ABME8REF("EI",9999999.06,DUZ(2))
 ..D WR^ABMUTL8("REF")
 .I ABMNPIU'="N" D
 ..D EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
 ..D WR^ABMUTL8("REF")
 ;
 ; Loop 2420B - Operating Physician Name
 I $P($G(ABMRV(ABMREV,ABMCODE,ABMCNTR)),U,16) D
 .S ABM("PRV")=$P(ABMRV(ABMREV,ABMCODE,ABMCNTR),U,16)
 .Q:ABM("PRV")=$O(ABMP("PRV","O",0))
 .D EP^ABME8NM1("72")
 .D WR^ABMUTL8("NM1")
 .I ABMNPIU="N" D
 ..D EP^ABME8REF("EI",9999999.06,DUZ(2))
 ..D WR^ABMUTL8("REF")
 .I ABMNPIU'="N" D
 ..D EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
 ..D WR^ABMUTL8("REF")
 ;
 ; Loop 2420C - Other Physician Name
 I $P($G(ABMRV(ABMREV,ABMCODE,ABMCNTR)),U,18) D
 .S ABM("PRV")=$P(ABMRV(ABMREV,ABMCODE,ABMCNTR),U,18)
 .Q:ABM("PRV")=$O(ABMP("PRV","T",0))
 .D EP^ABME8NM1("73")
 .D WR^ABMUTL8("NM1")
 .I ABMNPIU="N" D
 ..D EP^ABME8REF("EI",9999999.06,DUZ(2))
 ..D WR^ABMUTL8("REF")
 .I ABMNPIU'="N" D
 ..D EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
 ..D WR^ABMUTL8("REF")
 ;
 ; Loop 2420D - Referring Physician Name
 I $P($G(ABMRV(ABMREV,ABMCODE,ABMCNTR)),U,17) D
 .S ABM("PRV")=$P(ABMRV(ABMREV,ABMCODE,ABMCNTR),U,17)
 .Q:ABM("PRV")=$O(ABMP("PRV","F",0))
 .D EP^ABME8NM1("DN")
 .D WR^ABMUTL8("NM1")
 .D EP^ABME8PRV("RF",ABM("PRV"))
 .D WR^ABMUTL8("PRV")
 .I ABMNPIU="N" D
 ..D EP^ABME8REF("EI",9999999.06,DUZ(2))
 ..D WR^ABMUTL8("REF")
 .I ABMNPIU'="N" D
 ..D EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
 ..D WR^ABMUTL8("REF")
 Q