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

ABSPOSL1.m

Go to the documentation of this file.
  1. ABSPOSL1 ; IHS/FCS/DRS - log file printing ;
  1. ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
  1. Q
  1. ; D CLAIMLOG^ABSPOS6M - individual claims, as called from user screen
  1. ; D PRINTLOG^ABSPOSBD - DT+.2 - background posting to A/R
  1. ; D label^ABSPOSBL - billing log file - ILC interface - n+.2
  1. ; ABSPOSC2, ABSPOSC3 - testing and certification
  1. ; D LOGFILE^ABSPOSR1 - DT+.3 - background scanner of ^PSRX(indexes)
  1. ; D LASTLOG^ABSPOSRB - same as in ABSPOSRX, below
  1. ; D LASTLOG^ABSPOSRX - DT+.4 - background claims submission
  1. ; D LOGFILE^ABSPOSR4 - DT+.6 - back billing
  1. ; D COMMSLOG^ABSPOSU6 - dial out's log files - offset .1
  1. ; (no entry point) - DT+.5 - winnowing old data
  1. ; D PRINT^ABSPOSUT - the programmer-mode modem tests
  1. ;
  1. ; Two entry points: PRINTLOG to print the log file, given the #
  1. ; And PRINTDAT(type,start,end) prints all log files of the given
  1. ; type in the given date range. It prompts for missing parameters.
  1. ; (if start is given and end is missing, it just does start)
  1. ;
  1. PRINTDAT(TYPE,START,END) ;EP
  1. I '$D(TYPE) S TYPE=$$GETTYPE Q:'TYPE
  1. W !
  1. I $D(START) D
  1. . I '$D(END) S END=START
  1. E D Q:'START
  1. . S START=$$GETDATES,END=$P(START,U,2),START=$P(START,U)
  1. N POP D ^%ZIS Q:$G(POP)
  1. N FORDATE S FORDATE=START F D Q:FORDATE>END
  1. . N SLOT S SLOT=FORDATE+(TYPE/10)
  1. . I $$EXISTS^ABSPOSL(SLOT) D
  1. . . D PRINTLOG(SLOT)
  1. . E D
  1. . . W "There is no log file ",SLOT,! H 1
  1. . S FORDATE=$$TADD^ABSPOSUD(FORDATE,1) ; add one day
  1. D ^%ZISC
  1. Q
  1. GETDATES() ; return start^end
  1. N PROMPT1 S PROMPT1="Starting date: "
  1. N PROMPT2 S PROMPT2=" Ending date: "
  1. N DEF1,DEF2 S (DEF1,DEF2)=DT
  1. Q $$DTR^ABSPOSU1(PROMPT1,PROMPT2,DEF1,DEF2,"")
  1. GETTYPE() ; return 2 = billing, 3 = background scanner, etc.
  1. N PROMPT S PROMPT="Which log file? "
  1. N DEF S DEF=2
  1. N MODE S MODE="V"
  1. N MENU S MENU="2:Billing;3:Background scan;4:Claims submitter;5:Winnowing;6:Back billing"
  1. Q $$SET^ABSPOSU3(PROMPT,DEF,1,MODE,MENU)
  1. PRINTLOG(SLOT,START,END) ; EP
  1. I $Y D HDR
  1. I '$$EXISTS^ABSPOSL(SLOT) W "Nothing in SLOT=",SLOT,! Q
  1. I '$G(START) N START S START=1
  1. I '$G(END) N END S END=$$PRINTEND^ABSPOSL(SLOT)
  1. N PREVTIME S PREVTIME=""
  1. N MISS S MISS=0 ; count of missing lines
  1. N LEN S LEN=$S($G(IOM):IOM,1:80)-10-1
  1. N STOP S STOP=0
  1. N LINE F LINE=START:1:END D Q:STOP
  1. .I '$D(^ABSPECP("LOG",SLOT,LINE)) D Q
  1. ..I MISS>3 Q ; don't bother saying any more
  1. ..S MISS=MISS+1 W "Missing line ",LINE
  1. ..I MISS=3 W "; no more missing lines will be reported."
  1. ..W !
  1. .N X S X=^ABSPECP("LOG",SLOT,LINE) ; =$H seconds^text
  1. .N % S %=$P(X,U)
  1. .I %'=PREVTIME S PREVTIME=% D
  1. ..S %=PREVTIME W $J(%\3600,2),":" S %=%#3600
  1. ..W $TR($J(%\60,2)," ","0"),":" S %=$J(%#60,2) W $TR(%," ",0)
  1. .S X=$P(X,U,2,$L(X,U))
  1. .N I F I=1:LEN:$L(X) D Q:STOP
  1. ..I I>1 W ?6,"..."
  1. ..W ?10,$E(X,I,I+LEN-1),!
  1. ..D EOP
  1. Q
  1. EOP ; end of page handling
  1. ; set STOP if the user wants to get out
  1. S STOP=$$EOPQ^ABSPOSU8(2,,"D HDR^"_$T(+0))
  1. Q
  1. HDR W @IOF,"Log file #",SLOT,! Q