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

ABSPDB1F.m

Go to the documentation of this file.
ABSPDB1F ; IHS/OIT/CASSevern/Pieran ran 1/19/2011 - Handling of outgoing NCPDP Billing "B1" Claims for D.0 (Helper subroutines)
 ;;1.0;PHARMACY POINT OF SALE;**42**;JUN 21, 2001;Build 38
ADDSEG(SPECIAL,ADDSEG) ;EP CALLED FROM ABSPDB1,ABSPDB2 -- Add segment if we have a field in that segment to send
 N NCODE,SEG
 S SEG("COB")="^337^338^339^340^443^993^341^342^431^471^472^353^351^352^392^393^394^"
 S SEG("WORKCOMP")="^434^315^316^317^318^319^320^321^327^435^117^118^119^120^121^122^123^124^125^126^"
 S SEG("DURRPPS")="^473^439^440^441^474^475^476^"
 S SEG("COUPON")="^485^486^487^"
 S SEG("COMPOUND")="^450^451^447^488^489^448^449^490^362^363^"
 S SEG("CLINICAL")="^491^492^424^493^494^495^496^497^499^"
 S SEG("ADDOC")="^369^374^375^373^371^370^372^376^377^378^379^380^381^382^383^"
 S SEG("FACILITY")="^336^385^386^388^387^389^"
 S SEG("PROVIDER")="^465^444^"
 S NCODE=""
 F  S NCODE=$O(SPECIAL(NCODE)) Q:NCODE=""  D
 . I NCODE=390 S ADDSEG("NARRATIVE")=""  K SUPRESSG("Narrative") Q
 . 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("ADDOC")[NCTEST S ADDSEG("ADDOC")=""  K SUPRESSG("Additional Doc") Q
 . I SEG("FACILITY")[NCTEST S ADDSEG("FACILITY")=""  K SUPRESSG("Facility") Q
 Q
CHECKOVER(IEN59,SPECIAL) ;EP CALLED FROM ABSPDB1,ABSPDB2 -- 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 ABSPDB1,ABSPDB2 -- 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 ABSPDB1,ABSPDB2 -- 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