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

ABSPOSMD.m

Go to the documentation of this file.
  1. ABSPOSMD ; IHS/FCS/DRS - General Inquiry/Report .57; [ 09/12/2002 10:14 AM ]
  1. ;;1.0;PHARMACY POINT OF SALE;**3**;JUN 21, 2001;Build 38
  1. Q
  1. ; Things which are one per page - does DHIT="W @IOF" work?
  1. ; that is, will you get the page header?
  1. ; Which would be nice to have as a standard transaction header.
  1. ;
  1. ACTION ; EP - given ACTION = one of the codes for an action
  1. ; as selected from the list in ABSPOSMZ
  1. ; Also the ABSPOSMA() array is still there
  1. ; All of the EN1^DIP variables have been NEWed by the caller
  1. I $T(@ACTION)="" D NOLABEL
  1. N TEMPLATE,IENLIST
  1. S IENLIST=$$IENLIST^ABSPOSMC
  1. G @ACTION
  1. DIP ; and each one rejoins here (G DIP) to set up for call to EN1^DIP
  1. ; with TEMPLATE=[template name]
  1. K L,DIC,FLDS,BY,FR,TO,DHD,DIASKHD,DIPCRIT,PG,DHIT,DIOEND,DIOBEG
  1. K DCOPIES,IOP,DQTIME,DIS,DISUPNO,DISTOP,DISPAR
  1. S L=0
  1. S DIC=9002313.57
  1. S FLDS=TEMPLATE
  1. S BY="@-NUMBER"
  1. S FR=0
  1. S TO=$O(@IENLIST@(""),-1)
  1. I $D(TEMPLATE("HEADER")) D
  1. . S DHD=TEMPLATE("HEADER")
  1. . I $D(TEMPLATE("TRAILER")) S DHD=DHD_"-"_TEMPLATE("TRAILER")
  1. ; DIASKHD ; no, don't ask user
  1. ; DIPCRIT ; no, don't print sort criteria
  1. ; PG ; starting page number
  1. ; DHIT ; maybe formfeed for each new patient, for certain things?
  1. I 1 D ; based on ACTION and ABSPOSMA(), maybe each claim on sep. page
  1. . S DHIT="F Q:$Y+2'<IOSL W !"
  1. ; DIOEND
  1. ; DIOBEG
  1. ; DCOPIES
  1. ; IOP - prompt for device
  1. ; DQTIME
  1. ; DIS - no screens
  1. ; DISUPNO
  1. S DISTOP="I 1"
  1. ;
  1. S BY(0)=$$OPEN^ABSPOSMC(IENLIST)
  1. S L(0)=1
  1. ;
  1. D EN1^DIP
  1. I ABSPOSMA("MODE")="INQUIRY" D PRESSANY^ABSPOSU5()
  1. Q
  1. TEMPLATE(TNAMESFX) ;
  1. ; Look for site-specific version of the print template.
  1. ; The template name ends in TNAMESFX.
  1. ; Otherwise, use the standard print template for TNAMESFX.
  1. ;
  1. ; Example: at tag S, xxxxx TRANSACTION SUMMARY
  1. ;
  1. ; If there's a site-specific version, a pointer to the template is at
  1. ; $P(^ABSP(9002313.99,1,"DIPT TRANSACTION SUMMARY"),U)
  1. ; and from that pointer, we can find the print template name.
  1. ; Such site-specific templates should be name spaced, but we don't
  1. ; enforce that here. We leave the naming as a local decision.
  1. ;
  1. ; Otherwise, we use the template named ABSP57 TRANSACTION SUMMARY
  1. ;
  1. ; Return value is the template name in [brackets]
  1. ;
  1. N TNAME,TNUM
  1. S TNUM=$P($G(^ABSP(9002313.99,1,"DIPT "_TNAMESFX)),U)
  1. I TNUM S TNAME=$P($G(^DIPT(TNUM,0)),U)
  1. E S TNAME=""
  1. I TNAME="" S TNAME="ABSP57 "_TNAMESFX
  1. ; Make sure the template exists
  1. S TNUM=$O(^DIPT("B",TNAME,0))
  1. I 'TNUM D IMPOSS^ABSPOSUE("DB","TI","Missing print template "_TNAME,,"TEMPLATE",$T(+0))
  1. S TNAME="["_TNAME_"]"
  1. Q TNAME
  1. TRANSHDR() ; $$ returns template name for transaction header
  1. Q $$TEMPLATE("TRANSACTION HEADER")
  1. ;
  1. S ; Transaction Summary ;
  1. S TEMPLATE=$$TEMPLATE("TRANSACTION SUMMARY")
  1. G DIP
  1. C ; Claim - Basic info ;
  1. S TEMPLATE("HEADER")=$$TEMPLATE("TRANSACTION SUMMARY")
  1. S TEMPLATE=$$TEMPLATE("CLAIM BASIC INFO")
  1. G DIP
  1. R ; Response Detail
  1. S TEMPLATE("HEADER")=$$TEMPLATE("TRANSACTION SUMMARY")
  1. S TEMPLATE=$$TEMPLATE("RESPONSE INFO")
  1. G DIP
  1. F ; Financial Detail ; $$TEMPLATE("FINANCIAL DETAIL")
  1. S TEMPLATE("HEADER")=$$TEMPLATE("TRANSACTION SUMMARY")
  1. S TEMPLATE=$$TEMPLATE("FINANCIAL INFO")
  1. G DIP
  1. J ; Rejection Detail
  1. S TEMPLATE("HEADER")=$$TEMPLATE("TRANSACTION SUMMARY")
  1. S TEMPLATE=$$TEMPLATE("REJECT INFO")
  1. G DIP
  1. T ; Total Comprehensive Detail ; $$TEMPLATE("COMPREHENSIVE DETAIL")
  1. D NOTIM("T")
  1. G DIP
  1. REC ; Summary Receipt ; $$TEMPLATE("SUMMARY RECEIPT")
  1. D NOTIM("REC")
  1. G DIP
  1. D ; DUR Info Only ; $$TEMPLATE("DUR INFO ONLY")
  1. S TEMPLATE("HEADER")=$$TEMPLATE("TRANSACTION SUMMARY")
  1. S TEMPLATE=$$TEMPLATE("DUR INFO")
  1. G DIP
  1. PT ; Print Template selection ; Prompt user for a print template
  1. ; Let EN1^DIP do it. Just print instructions here to alert user
  1. ; as to what to do.
  1. D NOTIM("PT")
  1. G DIP
  1. FM ; Fileman to customize output ; EN1^DIP will prompt user for fields
  1. ; to be printed.
  1. D NOTIM("FM")
  1. G DIP
  1. NOLABEL(X) ;
  1. D IMPOSS^ABSPOSUE("P","TI","Missing label "_X,,"NOLABEL",$T(+0))
  1. Q
  1. NOTIM(X) ;
  1. D IMPOSS^ABSPOSUE("P","I","Not implemented at label "_X,,"NOTIM",$T(+0))
  1. Q