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

ABSPOSQH.m

Go to the documentation of this file.
  1. ABSPOSQH ; IHS/FCS/DRS - JWS 10:46 AM 7 Jan 1997 ;
  1. ;;1.0;PHARMACY POINT OF SALE;**48**;JUN 21, 2001;Build 38
  1. ;prepare claims for transmission (eg assemble into ASCII record format)
  1. ; Called from ABSPOSQG, usually from ABSPOSQ2
  1. ; Also used by certification, called from ABSPOSC2
  1. ;
  1. ; You have CLAIMIEN(*), array of pointers to 9002313.02 claims
  1. ;
  1. ;Creates the following scratch global:
  1. ; ^ABSPECX($J,"C",0) = <number of claims>
  1. ; ^ABSPECX($J,"C",CLAIMIEN,0) = <number of nodes>
  1. ; ^ABSPECX($J,"C",CLAIMIEN,1) = <ASCII record 1-245 chars>
  1. ; ^ABSPECX($J,"C",CLAIMIEN,2) = <ASCII record 246-490 chars>
  1. ; N) = <..........................>
  1. ;----------------------------------------------------------------------
  1. PASCII(DIALOUT) ;EP - from ABSPOSQG
  1. ;Manage local variables
  1. N AREC,COUNT
  1. S COUNT=0
  1. ;
  1. K ^ABSPECX($J,"C")
  1. ;
  1. ; Coming into this, ABS????? has
  1. ; set up CLAIMIEN(*) = a list of CLAIMIENs that were generated from
  1. ; all the prescriptions that might have been bundled together.
  1. ; So we must loop through that list.
  1. S CLAIMIEN=""
  1. F S CLAIMIEN=$O(CLAIMIEN(CLAIMIEN)) Q:CLAIMIEN="" D PASCII1
  1. Q
  1. ;
  1. PASCII1 ;EP - from above and also ABSPOSC2 ;
  1. ; Assemble NCPDP Ascii formatted record
  1. S AREC=$$ASCII^ABSPECA1(CLAIMIEN)
  1. Q:AREC=""
  1. ;
  1. ;Store NCPDP Ascii formatted record in ^ABSPECX($J,"C",CLAIMIEN,..)
  1. ;transmission scratch global
  1. N PREFIX S PREFIX=$P($G(^ABSP(9002313.55,DIALOUT,"NDC")),U,2)
  1. N ZERR ; /IHS/OIT/RAM ; 12 JUN 17 ; ADD DBS CALL ERROR RETURN VARIABLE
  1. ; If test mode for NDC, then change that prefix from HN* to HN.
  1. ; (Actually, I don't understand when or where that test mode really
  1. ; means anything.)
  1. D SVEAREC^ABSPECX4(PREFIX_AREC,CLAIMIEN,"C") ;production mode
  1. ;
  1. ; And save a copy of the original transmitted record in
  1. ; ^ABSPC(CLAIMIEN,"M")
  1. N WP,I F I=1:100:$L(AREC) S WP(I/100+1,0)=$E(AREC,I,I+99)
  1. D WP^DIE(9002313.02,CLAIMIEN_",",9999,"","WP","ZERR") ; /IHS/OIT/RAM ; 12 JUN 17 ; UPDATE DBS CALL TO ALLOW FOR ERROR RETURN.
  1. I $D(ZERR) D LOG^ABSPOSL2("PASCII1^ABSPOSQH",.ZERR) ; /IHS/OIT/RAM ; 12 JUN 17 ; AND LOG IT IF AN ERROR OCCURS.
  1. ;
  1. ;Increment claim counter
  1. S COUNT=COUNT+1
  1. ;
  1. ;S ^ABSPECX($J,"C",0)=COUNT
  1. Q