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

ABSPOS02.m

Go to the documentation of this file.
  1. ABSPOS02 ; IHS/FCS/DRS - 9002313.02 utilities ;
  1. ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
  1. Q
  1. ; General utilities for retrieval from 9002313.02, Claims
  1. ; Not sure who, if anybody, uses this!
  1. BILLED(N) ; total amount billed on a given Claim Submission
  1. ; (up to 4 prescriptions)
  1. N RX,TOT S (TOT,RX)=0
  1. F S RX=$O(^ABSPC(N,400,RX)) Q:'RX D
  1. . S TOT=TOT+$$BILLED1(N,RX)
  1. Q TOT
  1. BILLED1(N,RX) ; amount billed on a single Claim Submission
  1. ; Try Gross Amount Due, and if that's zero, Usual and Customary
  1. S X=$$430(N,RX)
  1. I 'X S X=$$426(N,RX)
  1. Q X
  1. FIRSTRX(N) Q $O(^ABSPC(N,400,0))
  1. DFF2EXT(X) Q $$DFF2EXT^ABSPECFM(X)
  1. 426(M,N) Q $$400(M,N,26) ; Usual and Customary
  1. 430(M,N) Q $$400(M,N,30) ; Gross Amount Due
  1. 400(M,N,J) ; field #400+J signed numeric
  1. N X S X=$P(^ABSPC(M,400,N,400),U,J)
  1. I $E(X,1,2)?2U S X=$E(X,3,$L(X))
  1. S X=$$DFF2EXT(X)
  1. Q X