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

ABSPOSB8.m

Go to the documentation of this file.
  1. ABSPOSB8 ; IHS/FCS/DRS - some debugging assistance ;
  1. ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
  1. Q
  1. ; Situation: the insurance changes and the PINS node is no longer
  1. ; valid - look for cases where the 9002313.57 primary insurance
  1. ; differs from the PCNDFN AUDIT INSURER
  1. ; This may be the seed of what eventually becomes a tool
  1. ; for "backsweeping", finding patients who do have insurance after all,
  1. ; even though they didn't have insurance at the time of the
  1. ; original charge
  1. FINDX(START57,END57) ;
  1. I '$D(END57) S END57=$P(^ABSP(9002313.99,1,"BILLING"),U)
  1. N N57 F N57=START57:1:END57 D
  1. . N INS57,INSNAME,PCNDFN,AUDITINS
  1. . S INS57=$P($G(^ABSPTL(N57,7)),U)
  1. . I 'INS57 D Q
  1. . . W "No primary insurance with N57=",N57,! ; should never happen
  1. . S INSNAME=$P(^AUTNINS(INS57,0),U)
  1. . S PCNDFN=$P(^ABSPTL(N57,0),U,3)
  1. . I 'PCNDFN Q ; not posted
  1. . S AUDITINS=$P(^ABSBITMS(9002302,PCNDFN,0),U,3)
  1. . I INSNAME'=AUDITINS D
  1. . . W "Insurance mismatch on N57=",N57," posted to "
  1. . . W $P(^ABSBITMS(9002302,PCNDFN,"VCN"),U)," "
  1. . . W $P(^ABSBITMS(9002302,PCNDFN,0),U)," "
  1. . . W $P(^DPT($P(^(0),U,2),0),U)
  1. . . W !
  1. . . W "Pharmacy program picked ",INSNAME," but now it's ",AUDITINS,!
  1. . Q
  1. Q