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

ABSP5B1F.m

Go to the documentation of this file.
ABSP5B1F ; IHS/OIT/CASSevern/Pieran ran 1/19/2011 - Handling of outgoing NCPDP Billing "B1" Claims for 5.1 (Helper subroutines)
 ;;1.0;PHARMACY POINT OF SALE;**42**;JUN 21, 2001;Build 38
ADDSEG(SPECIAL,ADDSEG) ;EP CALLED FROM ABSP5B1,ABSP5B2 -- Add segment if we have a field in that segment to send
 N NCODE,SEG
 S SEG("COB")="^337^338^339^340^443^341^342^431^471^472^"
 S SEG("WORKCOMP")="^434^315^316^317^318^319^320^321^327^435^"
 S SEG("DURRPPS")="^473^439^440^441^474^475^476^"
 S SEG("COUPON")="^485^486^487^"
 S SEG("COMPOUND")="^450^451^452^447^488^489^448^449^490^"
 S SEG("CLINICAL")="^491^492^424^493^494^495^496^497^499^"
 S SEG("PROVIDER")="^465^444^"
 S SEG("PRIORAUTH")="^498.01^498.02^498.03^498.04^498.05^498.06^498.07^498.08^498.09^498.11^498.13^498.14^503^"
 S NCODE=""
 F  S NCODE=$O(SPECIAL(NCODE)) Q:NCODE=""  D
 . N NCTEST
 . S NCTEST="^"_NCODE_"^"
 . I SEG("PROVIDER")[NCTEST S ADDSEG("PROVIDER")=""  K SUPRESSG("Provider") Q
 . I SEG("COB")[NCTEST S ADDSEG("COB")=""  K SUPRESSG("COB") Q
 . I SEG("WORKCOMP")[NCTEST S ADDSEG("WORKCOMP")=""  K SUPRESSG("Workers Comp") Q
 . I SEG("DURRPPS")[NCTEST S ADDSEG("DURRPPS")=""  K SUPRESSG("DURR/PPS") Q
 . I SEG("COUPON")[NCTEST S ADDSEG("COUPON")=""   K SUPRESSG("Coupon") Q
 . I SEG("COMPOUND")[NCTEST S ADDSEG("COMPOUND")=""  K SUPRESSG("Compound") Q
 . I SEG("CLINICAL")[NCTEST S ADDSEG("CLINICAL")=""  K SUPRESSG("Clinical") Q
 . I SEG("PRIORAUTH")[NCTEST S ADDSEG("PRIORAUTH")=""  K SUPRESSG("Prior Auth")
 Q
CHECKOVER(IEN59,SPECIAL) ;EP CALLED FROM ABSP5B1,ABSP5B2 -- Check for manual Over-Rides
 N OVRREC,FIELD,VALUE,DO,OVRARRAY
 S OVRREC=$P($G(^ABSPT(IEN59,1)),U,13)
 Q:OVRREC=""
 S DO=OVRREC_","
 D GETS^DIQ(9002313.511,DO,"**","","OVRARRAY")
 N I
 S I=""
 F  S I=$O(OVRARRAY(9002313.5111,I)) Q:I=""  D
 . S FIELD=OVRARRAY(9002313.5111,I,.01)
 . S VALUE=OVRARRAY(9002313.5111,I,.02)
 . S SPECIAL(FIELD)="S ABSP(""X"")="""_VALUE_""""
 Q
CHKDUROVR(IEN59,SPECIAL) ;EP CALLED FROM ABSP5B1,ABSP5B2 -- Check for manual Over-Rides
 N OVRREC,FIELD,VALUE,DO,OVRARRAY
 S OVRREC=$P($G(^ABSPT(IEN59,1)),U,14)
 Q:OVRREC=""
 S DO=OVRREC_","
 D GETS^DIQ(9002313.473,DO,"**","","OVRARRAY")
 N I,DUR
 S I=""
 F  S I=$O(OVRARRAY(9002313.4731,I)) Q:I=""  D
 . S FIELD=.01
 . S DUR=OVRARRAY(9002313.4731,I,FIELD)
 . F  S FIELD=$O(OVRARRAY(9002313.4731,I,FIELD)) Q:FIELD=""  D
 . . S VALUE=OVRARRAY(9002313.4731,I,FIELD)
 . . S SPECIAL(FIELD,DUR)="S ABSP(""X"")="""_VALUE_""""
 Q
CHKDIAGOVR(IEN59,SPECIAL) ;EP CALLED FROM ABSP5B1,ABSP5B2 -- Check for manual Over-Rides
 N OVRREC,FIELD,VALUE,DO,OVRARRAY
 S OVRREC=$P($G(^ABSPT(IEN59,1)),U,17)
 Q:OVRREC=""
 S DO=OVRREC_","
 D GETS^DIQ(9002313.491,DO,"**","","OVRARRAY")
 N I,DIAG
 S I=""
 F  S I=$O(OVRARRAY(9002313.4911,I)) Q:I=""  D
 . S FIELD=.01
 . S DIAG=OVRARRAY(9002313.4911,I,FIELD)
 . F  S FIELD=$O(OVRARRAY(9002313.4911,I,FIELD)) Q:FIELD=""  D
 . . S VALUE=OVRARRAY(9002313.4911,I,FIELD)
 . . S SPECIAL(FIELD,DIAG)="S ABSP(""X"")="""_VALUE_""""
 Q