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

ABSPOSS1.m

Go to the documentation of this file.
  1. ABSPOSS1 ; IHS/FCS/DRS - report what's in POS tables ;
  1. ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001;Build 38
  1. ;
  1. ; Enter at top - option ABSP SETUP DETAIL
  1. ;
  1. ; ABSPOSS1 is for file 9002313.99 (SETUP)
  1. ; ABSPOSS2 is for file 9002313.4 (ABSP INSURER)
  1. ; and ABSPOSS7 too.
  1. ; ABSPOSS3 is for file 9002313.53 (PRICING)
  1. ; ABSPOSS4 is for file 9002313.54 (MODEM TYPES)
  1. ; ABSPOSS5 is for file 9002313.55 (DIAL OUT)
  1. ; ABSPOSS6 is for file 9002313.515 (USER PREFERENCES)
  1. ; and for file 9002313.56 (PHARMACIES)
  1. ; ABSPOSS8 has some specialized setup programs called from menus.
  1. ; ABSPOSS9 is an integrity check of selected items
  1. N POP D ^%ZIS Q:$G(POP)
  1. N REF S REF="^TMP("_$J_")"
  1. N FILENUM
  1. D REPORT^ABSPOSS9 ; integrity check
  1. S FILENUM=9002313.99 D GET99(REF),PRINT99(REF)
  1. Q
  1. GET99(TARGET) N FILE,IENS,FIELD,FLAGS,MSG,ANY
  1. S FILE=9002313.99
  1. S IENS="1,"
  1. S FIELD="**"
  1. S FLAGS="EI"
  1. D GETS^DIQ(FILE,IENS,FIELD,FLAGS,TARGET,"MSG")
  1. I $D(MSG) W "Problem in GET99^",$T(+0),! D ZWRITE^ABSPOS("MSG")
  1. Q
  1. DASHES N X S X=$J("",$S($G(IOM):IOM-1,1:79)),X=$TR(X," ","-") W X,! Q
  1. SUBTITLE(X) W !,"----- ",X," -----",!! Q
  1. SUBTITL2(X) W " ~ ",X," ~ ",! Q
  1. TITLE(FILENUM) W !,"===== File ",FILENUM," ",$P(^DIC(FILENUM,0),U)," =====",!!
  1. Q
  1. EXPLAIN(X) W ?5,"(",X,")",! Q
  1. ILCAR() Q $$ISILCAR^ABSPOSB ; is it ILC A/R (Version 1 or 2)?
  1. IHS3PB() Q $$ISABMAR^ABSPOSB ; is it IHS 3rd Party Billing?
  1. HEADING ;
  1. W "Point of Sale - Detailed Configuration Report"
  1. W ?60,$$NOWEXT^ABSPOSU1,!
  1. W !
  1. Q
  1. PRINT99(REF) D HEADING
  1. W $$VERSION^ABSPOS," ",$$VARIANT^ABSPOS,!
  1. W "Shutdown flag = ",$$SHUTDOWN^ABSPOSQ3,!
  1. W "Maximum transmitter/receiver jobs = ",$$MAXJOBS^ABSPOSQ3,!
  1. D TITLE(FILENUM)
  1. D FIELDS(FILENUM,.01)
  1. D FIELDS(FILENUM,440.01) ; default dial-out
  1. D FIELDS(FILENUM,170.01) ; A/R Package
  1. ;D FIELDS(FILENUM,.04)
  1. ;D FIELDS(FILENUM,2.01)
  1. D SUBTITLE("Input settings")
  1. D FIELDS(FILENUM,941)
  1. D FIELDS(FILENUM,943)
  1. D SUBTITLE("Miscellaneous insurance parameters")
  1. D FIELDS(FILENUM,951)
  1. I $G(@REF@(FILENUM,"1,",951,"I"))="" D
  1. . D EXPLAIN("Grace period - the default default is 30 days")
  1. . I $$ANY^ABSPOSS2("GRACE") D
  1. . . D EXPLAIN("A list of insurers with grace period override")
  1. . . D EXPLAIN(" appears later in this report.")
  1. . E D
  1. . . D EXPLAIN("All insurers are using the same grace period.")
  1. I $$ANYINUSE^ABSPOSS8 D
  1. . D EXPLAIN("A report of in-use insurance rules, if any, appears later in this report.")
  1. D PRESSANY^ABSPOSU5() ; - - - - - - - - - - - - - - - - - - -
  1. D SUBTITLE("Unbillable Items (system default settings)")
  1. I $$ANY^ABSPOSS2("UN/BILLABLE") D
  1. . D EXPLAIN("A list of insurers with specific settings for")
  1. . D EXPLAIN("billable/unbillable items appears later in this report.")
  1. D FIELDS(FILENUM,2128.13) ; OTC
  1. D FIELDS(FILENUM,2128.11) ; NDC #
  1. D FIELDS(FILENUM,2128.12) ; drug name
  1. I '$$ILCAR G NOTILCAR ; but then the rest of this is ILC only
  1. D SUBTITLE("Rules for Creating Accounts Receivable")
  1. D FIELDS(FILENUM,170.01)
  1. D EXPLAIN("Certain visit-related data is automatically filled in")
  1. D EXPLAIN("at the time A/R is created. These SUPPRESS fields can")
  1. D EXPLAIN("prevent such behavior.")
  1. D FIELDS(FILENUM,370.01,370.99)
  1. D EXPLAIN("The PREBILL fields control which forms are printed.")
  1. D EXPLAIN("If not present, the default default to print NCPDP forms.")
  1. D FIELDS(FILENUM,667.01,667.99)
  1. I $$ANY^ABSPOSS2("PREBILL") D
  1. . D EXPLAIN("A list of insurers with different prebill settings")
  1. . D EXPLAIN(" appears later in this report.")
  1. E D
  1. . D EXPLAIN("All insurers are using these prebill settings.")
  1. W !
  1. D EXPLAIN("The A/R type assigned to new accounts can be set")
  1. D EXPLAIN("to something else on a pharmacy basis.")
  1. D FIELDS(FILENUM,1801) ; A/R TYPE
  1. D SUBTITLE("Default parameters for printing NCPDP forms")
  1. D FIELDS(FILENUM,665.01,665.04)
  1. I $$ANY^ABSPOSS2("NCPDP") D
  1. . D EXPLAIN("A list of insurers with changed settings for printing")
  1. . D EXPLAIN(" NCPDP forms appears later in this report.")
  1. E D
  1. . D EXPLAIN("All insurers are using these NCPDP settings.")
  1. ; (Workers Comp in the original Sitka way)
  1. ;D SUBTITLE("Insurances to be used only for Workers Comp")
  1. ;D FIELDS(FILENUM+.0001,.01,.99)
  1. D SUBTITLE("Insurers which lead to automatic writeoff")
  1. D FIELDS(FILENUM+.002388,.01,.99)
  1. D SUBTITLE("Beneficiary codes leading to auto-writeoff of SELF PAY")
  1. D FIELDS(FILENUM+.002389,.01,.99)
  1. D SUBTITLE("Special write-off rules; usually site-specific")
  1. D FIELDS(FILENUM,2387.01,2387.99)
  1. D SUBTITLE("Last time EOB screen input was done")
  1. D FIELDS(FILENUM,577.01,577.99)
  1. D SUBTITLE("Last time Writeoff screen input was done")
  1. D FIELDS(FILENUM,2270.01,2270.99)
  1. D SUBTITL2("For A/R types:")
  1. D FIELDS(FILENUM+.002271,.01,.99)
  1. D FIELDS(FILENUM,2272.01)
  1. D SUBTITL2("For Clinics:")
  1. D FIELDS(FILENUM+.002273,.01,.99)
  1. D SUBTITL2("For Diagnoses:")
  1. D FIELDS(FILENUM+.002274,.01,.99)
  1. D SUBTITL2("For Insurers:")
  1. D FIELDS(FILENUM+.002279,.01,.99)
  1. NOTILCAR ; Branched here if not ILC A/R
  1. D SUBTITLE("Miscellaneous other settings")
  1. ;D FIELDS(FILENUM,1490) ; NULL FILE
  1. D FIELDS(FILENUM,1501) ; OUTSIDE LINE (what to dial to get one)
  1. I $$ILCAR D FIELDS(FILENUM,1660.01) ; POSTAGE CPT
  1. I $$ILCAR D FIELDS(FILENUM,1980.01,1980.99) ; STARTUP
  1. W !
  1. W "Also included in this report:",!
  1. I $$ANYINUSE^ABSPOSS8 D
  1. . W " A printout of insurance selection rules.",!
  1. F FILE=9002313.56:-.01:9002313.53 D
  1. . W " A printout of file ",FILE,": ",$P(^DIC(FILE,0),U),!
  1. S FILE=9002313.515 I $$ANY^ABSPOSS2("USERS") D
  1. . W " A printout of file ",FILE,": ",$P(^DIC(FILE,0),U),!
  1. E D
  1. . W " (There are no specific settings for individual users.)",!
  1. I $$ANYINUSE^ABSPOSS8 D RPTINUSE^ABSPOSS8 ; insurance selection rules
  1. I $$ANY^ABSPOSS2("GRACE") D TEMPLATE^ABSPOSS2("ABSP GRACE")
  1. I $$ANY^ABSPOSS2("PREBILL") D TEMPLATE^ABSPOSS2("ABSP PREBILL")
  1. I $$ANY^ABSPOSS2("NCPDP") D TEMPLATE^ABSPOSS2("ABSP NCPDP")
  1. I $$ANY^ABSPOSS2("UN/BILLABLE") D TEMPLATE^ABSPOSS2("ABSP UN/BILLABLE")
  1. I $$ANY^ABSPOSS2("WCOMP") D TEMPLATE^ABSPOSS2("ABSP WORKERS COMP")
  1. D PHARMACY^ABSPOSS6 ; 9002313.56 PHARMACIES
  1. D ABSPOSS1^ABSPOSS5 ; 9002313.55 DIAL OUT
  1. D ABSPOSS1^ABSPOSS4 ; 9002313.54 MODEM TYPES
  1. D ABSPOSS1^ABSPOSS3 ; 9002313.53 PRICING
  1. I $$ANY^ABSPOSS2("USERS") D ABSPOSS1^ABSPOSS6 ; 9002313.515 USER SETS
  1. D INUSE^ABSPOSS2 ; 9002313.4 ABSP INSURERs set up for e-claims
  1. Q
  1. FIELDS(FILENUM,LOW,HIGH) ;
  1. I '$D(HIGH) S HIGH=LOW
  1. N IENS S IENS=$O(@REF@(FILENUM,""))
  1. I IENS="" D Q
  1. . W "<no entries>",!
  1. N ONLYONE S ONLYONE=($O(@REF@(FILENUM,IENS))="")
  1. F D S IENS=$O(@REF@(FILENUM,IENS)) Q:IENS=""
  1. . N F S F=LOW
  1. . I '$D(^DD(FILENUM,F)) S F=$O(^DD(FILENUM,F)) ; be sure 1st one's def
  1. . I 'F D Q ; no fields in this range?
  1. . . W "<no fields in file ",FILENUM," range ",LOW,"-",HIGH," ?!>",!
  1. . F D S F=$O(^DD(FILENUM,F)) Q:F>HIGH!'F
  1. . . N FNAME I $D(^DD(FILENUM,F,0)) S FNAME=$P(^(0),U)
  1. . . E S FNAME="<field #"_F_" undefined?!>"
  1. . . N IVALUE S IVALUE=$G(@REF@(FILENUM,IENS,F,"I"))
  1. . . N EVALUE S EVALUE=$G(@REF@(FILENUM,IENS,F,"E"))
  1. . . I 'ONLYONE W IENS," "
  1. . . I ONLYONE,F=.01 ; don't print field number & name if only .01
  1. . . E D
  1. . . . N X,Y S X=$J(F\1,5),Y=F#1 I 'Y S Y=""
  1. . . . F Q:$L(Y)'<3 S Y=Y_" "
  1. . . . W X,Y," "
  1. . . . W FNAME,": "
  1. . . W IVALUE
  1. . . I IVALUE'=EVALUE W " (",EVALUE,")"
  1. . . W !
  1. Q