- ABSPOSB ; IHS/FCS/DRS - utilities used by ABSPOSB* ;
- ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
- ;
- ; A/R Interfaces - in routines ABSPOSB*
- ;
- ; ABSPOSBC,ABSPOSBD - the billing background job
- ; ABSPOSBB - calls to various interfaces
- ; ABSPOSBB - Third Party Billing
- ; ABSPOSBQ - reserved for Other interfaces (stub)
- ; ABSPOSBT - reserved for ANMC
- ; ABSPOSBP - reserved for PAC (BBM*)
- ; ABSPOSBV,ABSPOSBW - ILC A/R, main program
- ; ABSPOSB* all others - mostly ILC A/R, many obsolete
- ;
- ; ILC old A/R's NCPDP forms printing in ABSPOSN*
- ; New NCPDP forms printing in ABSPOSF* - usable by all, not just ILC
- ;
- ; The following ILC A/R routines are invoked by Point of Sale:
- ; (this list written on November 12, 2000)
- ; EN^ABSB1592 - called by ABSPOSN1 - main routine to print bills
- ; ^ABSBMAKE - called by ABSPOSBM - create an A/R account
- ; OFFNCPDP^ABSBPBRX - called by ABSPOSBM -
- ; ^ABSBVCN - called by ABSPOSQD - to assign a VCN
- Q
- AGE57(N) ;EP - ABSPOSB5 ; how old is ^ABSPTL(N,... ?
- ; $$AGE57(N)=number of days, with decimal
- N %,%H,%I,X D NOW^%DTC ; % = now
- N LAST S LAST=$P(^ABSPTL(N,0),U,8)
- I 'LAST S LAST=$P(^ABSPTL(N,0),U,11)
- N RET S RET=$$TIMEDIFI^ABSPOSUD(LAST,%)
- Q RET/86400
- ARSYSTEM() ;EP - what A/R system do we interface to?
- ; 0 (or null?) is the ILC system.
- ; Other true-valued ones are IHS 3PBilling, etc.
- ; The value "NONE" is non-zero, too
- Q $P($G(^ABSP(9002313.99,1,"A/R INTERFACE")),U)
- DOINGAR() ;EP - from many places - Do we do a Billing Interface in ABSPOSB*?
- Q $S($$ISABMAR:1,$$ISILCAR:1,1:0)
- ISILCAR() ;EP - various places
- Q $$ARSYSTEM=0 ; returns TRUE if it's ILC's billing system
- ISABMAR() ; EP - various places
- Q $$ARSYSTEM=3 ; returns TRUE if it's IHS 3rd Party Billing
- MUSTILC() ; EP - from many places
- I $$ISILCAR Q 1
- W "Requires the ILC Accounts Receivable system",!
- D PRESSANY^ABSPOSU5()
- Q
- ; ZWRITE command
- ZW(%) ;EP - ABSPOSB* ; should instead ZWRITE^ABSPOS
- I $D(%)=0 W %," undefined",! Q
- I $D(%)#10=1 W %,"=",@%,!
- N Q S Q=% F S Q=$Q(@Q) Q:Q="" W Q,"=",@Q,!
- Q
- ABSPOSB ; IHS/FCS/DRS - utilities used by ABSPOSB* ;
- +1 ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
- +2 ;
- +3 ; A/R Interfaces - in routines ABSPOSB*
- +4 ;
- +5 ; ABSPOSBC,ABSPOSBD - the billing background job
- +6 ; ABSPOSBB - calls to various interfaces
- +7 ; ABSPOSBB - Third Party Billing
- +8 ; ABSPOSBQ - reserved for Other interfaces (stub)
- +9 ; ABSPOSBT - reserved for ANMC
- +10 ; ABSPOSBP - reserved for PAC (BBM*)
- +11 ; ABSPOSBV,ABSPOSBW - ILC A/R, main program
- +12 ; ABSPOSB* all others - mostly ILC A/R, many obsolete
- +13 ;
- +14 ; ILC old A/R's NCPDP forms printing in ABSPOSN*
- +15 ; New NCPDP forms printing in ABSPOSF* - usable by all, not just ILC
- +16 ;
- +17 ; The following ILC A/R routines are invoked by Point of Sale:
- +18 ; (this list written on November 12, 2000)
- +19 ; EN^ABSB1592 - called by ABSPOSN1 - main routine to print bills
- +20 ; ^ABSBMAKE - called by ABSPOSBM - create an A/R account
- +21 ; OFFNCPDP^ABSBPBRX - called by ABSPOSBM -
- +22 ; ^ABSBVCN - called by ABSPOSQD - to assign a VCN
- +23 QUIT
- AGE57(N) ;EP - ABSPOSB5 ; how old is ^ABSPTL(N,... ?
- +1 ; $$AGE57(N)=number of days, with decimal
- +2 ; % = now
- NEW %,%H,%I,X
- DO NOW^%DTC
- +3 NEW LAST
- SET LAST=$PIECE(^ABSPTL(N,0),U,8)
- +4 IF 'LAST
- SET LAST=$PIECE(^ABSPTL(N,0),U,11)
- +5 NEW RET
- SET RET=$$TIMEDIFI^ABSPOSUD(LAST,%)
- +6 QUIT RET/86400
- ARSYSTEM() ;EP - what A/R system do we interface to?
- +1 ; 0 (or null?) is the ILC system.
- +2 ; Other true-valued ones are IHS 3PBilling, etc.
- +3 ; The value "NONE" is non-zero, too
- +4 QUIT $PIECE($GET(^ABSP(9002313.99,1,"A/R INTERFACE")),U)
- DOINGAR() ;EP - from many places - Do we do a Billing Interface in ABSPOSB*?
- +1 QUIT $SELECT($$ISABMAR:1,$$ISILCAR:1,1:0)
- ISILCAR() ;EP - various places
- +1 ; returns TRUE if it's ILC's billing system
- QUIT $$ARSYSTEM=0
- ISABMAR() ; EP - various places
- +1 ; returns TRUE if it's IHS 3rd Party Billing
- QUIT $$ARSYSTEM=3
- MUSTILC() ; EP - from many places
- +1 IF $$ISILCAR
- QUIT 1
- +2 WRITE "Requires the ILC Accounts Receivable system",!
- +3 DO PRESSANY^ABSPOSU5()
- +4 QUIT
- +5 ; ZWRITE command
- ZW(%) ;EP - ABSPOSB* ; should instead ZWRITE^ABSPOS
- +1 IF $DATA(%)=0
- WRITE %," undefined",!
- QUIT
- +2 IF $DATA(%)#10=1
- WRITE %,"=",@%,!
- +3 NEW Q
- SET Q=%
- FOR
- SET Q=$QUERY(@Q)
- IF Q=""
- QUIT
- WRITE Q,"=",@Q,!
- +4 QUIT