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

FBXIP27.m

Go to the documentation of this file.
  1. FBXIP27 ;WOIFO/SS-PATCH INSTALL ROUTINE ;8/27/01
  1. ;;3.5;FEE BASIS;**27**;JAN 30, 1995
  1. ;File #162.7 conversion routine
  1. Q ;stub
  1. ;
  1. ;/**
  1. ;post-install entry point
  1. POST27 ;*/
  1. N FBSNDML S FBSNDML=1
  1. D PREPRPT
  1. Q
  1. ;
  1. ;/**
  1. ;This utility can be run anytime to detect claims that don't have
  1. ;all required information.
  1. ;
  1. REPORT ;*/
  1. N FBLIMDT S FBLIMDT=0
  1. S DIR("A",1)=" This utility can be run anytime to detect claims that don't have all"
  1. S DIR("A",2)=" the required information. The user is able to specify a starting date"
  1. S DIR("A",3)=" for the report. If the date is specified then the utility shows only"
  1. S DIR("A",4)=" the claims that were received on this date or later."
  1. S DIR("A",5)=" "
  1. Q:$$SETLIMT()=1
  1. D PREPRPT
  1. Q
  1. ;
  1. ;/**
  1. ;specifies the starting date
  1. SETLIMT() ;*/
  1. N DUOUT,DIROUT,DIRUT,DTOUT
  1. N FBDT1 S FBDT1=0
  1. K ^TMP($J,"FBXIP27")
  1. S DIR("A")=" Do you want to specify the starting date for the report? "
  1. S DIR("?")=" Please answer Yes or No."
  1. S DIR("B")="YES",DIR(0)="YA^^"
  1. D ^DIR K DIR
  1. I $D(DUOUT)!($D(DIROUT)) Q 1
  1. I $D(DIRUT) Q 0
  1. I $G(Y)=0 S FBLIMDT=0 Q 0
  1. W !
  1. S DIR("A")=" Starting date for the report: "
  1. S DIR("?")=" Enter a date in proper format."
  1. S FBDT1=$$FMADD^XLFDT($$DT^XLFDT,-365*2,0,0,0)
  1. S DIR("B")=$$FMTE^XLFDT(FBDT1)
  1. S DIR(0)="DA^::EX^"
  1. D ^DIR K DIR
  1. I $D(DUOUT)!($D(DIROUT)) Q 1
  1. I $D(DIRUT) S Y=FBDT1
  1. S FBLIMDT=Y
  1. Q 0
  1. ;
  1. ;/**
  1. ;Prepares report for claims w/o required information
  1. ;
  1. PREPRPT ;*/
  1. N FBDTS,FBS,FBS1,FBV,FBP,FBVP,FBV1,FBP1,FBVP1,FBCNT,FBIND,FBTXTCNT,FBSTRDT
  1. S (FBS,FBS1,FBV,FBP,FBVP,FBV1,FBP1,FBVP1,FBCNT,FBTXTCNT)=0,(FBDTS,FBIND)=""
  1. S FBSTRDT=$G(XPDQUES("POS2"))
  1. S:$D(FBLIMDT) FBSTRDT=$G(FBLIMDT)
  1. K ^TMP($J,"FBXIP27")
  1. S FBS1=FBSTRDT-1 F S FBS1=$O(^FB583("B",FBS1)) Q:+FBS1=0 D
  1. . S FBS=0 F S FBS=$O(^FB583("B",FBS1,FBS)) Q:+FBS=0 D
  1. .. S FBDTS=$G(^FB583(FBS,0)) Q:FBDTS=""
  1. .. S FBCNT=FBCNT+1,FBIND=""
  1. .. I $P(FBDTS,"^",11)=1!($P(FBDTS,"^",11)=4) D
  1. ... I $P(FBDTS,"^",3)="" S FBIND=FBIND_"A"
  1. ... I $P(FBDTS,"^",10)="" S FBIND=FBIND_"B"
  1. .. I $P(FBDTS,"^",11)="",$P($G(^FB(162.92,+$P(FBDTS,"^",24),0)),"^",4)'<30 D
  1. ... I $P(FBDTS,"^",3)="" S FBIND=FBIND_"C"
  1. ... I $P(FBDTS,"^",10)="" S FBIND=FBIND_"D"
  1. .. I FBIND'="" S ^TMP($J,"FBXIP27",FBIND,FBS)=""
  1. .. S:FBIND="A" FBV=FBV+1
  1. .. S:FBIND="B" FBP=FBP+1
  1. .. S:FBIND="AB" FBVP=FBVP+1
  1. .. S:FBIND="C" FBV1=FBV1+1
  1. .. S:FBIND="D" FBP1=FBP1+1
  1. .. S:FBIND="CD" FBVP1=FBVP1+1
  1. ;
  1. D WBMES(" The following claims have been completed or dispositioned without")
  1. D WMES(" supplying all required information. It is necessary to review them")
  1. D WMES(" in order to supply the claims with all missed information.")
  1. I +FBSTRDT>0 S Y=FBSTRDT D DD^%DT,WBMES(" === STARTING DATE: "_Y_" ===")
  1. D WBMES(" === DISPOSITIONED CLAIMS ===")
  1. D REPTXT("A"," without VENDOR information ( "_FBV_" ) :")
  1. D REPTXT("B"," without PATIENT TYPE information ( "_FBP_" ) :")
  1. D REPTXT("AB"," without VENDOR and PATIENT TYPE information ( "_FBVP_" ) :")
  1. D WBMES(" === NON-DISPOSITIONED CLAIMS ===")
  1. D REPTXT("C"," without VENDOR information ( "_FBV1_" ) :")
  1. D REPTXT("D"," without PATIENT TYPE information ( "_FBP1_" ) :")
  1. D REPTXT("CD"," without VENDOR and PATIENT TYPE information ( "_FBVP1_" ) :")
  1. ;
  1. D PRINTREP
  1. D:$D(FBSNDML) SENDMAIL
  1. K ^TMP($J,"FBXIP27")
  1. Q
  1. ;
  1. ;
  1. ;/**
  1. ;prepares report text,
  1. ;list claims w/o required information
  1. REPTXT(TYPE,MESS1) ;*/
  1. I $D(^TMP($J,"FBXIP27")),+$O(^TMP($J,"FBXIP27",TYPE,0)) D
  1. . N FBDT,FBDA,FBMESS,FBTMP
  1. . D WBMES(MESS1)
  1. . D WBMES(" Claim Date Patient Vendor Submitted by")
  1. . D WMES(" ------------ -------------------- ---------------- --------------------")
  1. . S FBDA=0 F S FBDA=$O(^TMP($J,"FBXIP27",TYPE,FBDA)) Q:'FBDA D
  1. . . S FBMESS=$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",.01),1,12),12)_" "
  1. . . S FBMESS=FBMESS_$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",2),1,20),20)_" "
  1. . . S FBMESS=FBMESS_$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",1),1,16),16)_" "
  1. . . S FBMESS=FBMESS_$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",23),1,20),20)_" "
  1. . . D WMES(" "_FBMESS)
  1. Q
  1. ;/**
  1. ;writes into ^TMP
  1. WMES(FBSTR) ;*/
  1. S FBTXTCNT=FBTXTCNT+1
  1. S ^TMP($J,"FBXIP27","TXT",FBTXTCNT)=FBSTR
  1. Q
  1. ;
  1. ;/**
  1. ;writes into ^TMP with leading "" (it works like "!")
  1. WBMES(FBSTR) ;*/
  1. D WMES("")
  1. D WMES(FBSTR)
  1. Q
  1. ;
  1. ;/**
  1. ;prints report on the install screen
  1. PRINTREP ;*/
  1. Q:'$D(^TMP($J,"FBXIP27","TXT"))
  1. N CNT S CNT=0
  1. F S CNT=$O(^TMP($J,"FBXIP27","TXT",CNT)) Q:+CNT=0 D
  1. . D MES^XPDUTL($G(^TMP($J,"FBXIP27","TXT",CNT)))
  1. Q
  1. ;
  1. ;/**
  1. ;sends e-mail with report to installer
  1. ;
  1. SENDMAIL ;*/
  1. Q:'$D(^TMP($J,"FBXIP27","TXT"))
  1. N DIFROM,XMDUZ,XMSUB,XMTEXT,XMY
  1. S XMSUB="FB*3.5*27 Install: Claims w/o all necessary information."
  1. S XMDUZ=.5
  1. S XMTEXT="^TMP($J,""FBXIP27"",""TXT"","
  1. S XMY(DUZ)=""
  1. D ^XMD
  1. Q
  1. ;