- FBXIP27 ;WOIFO/SS-PATCH INSTALL ROUTINE ;8/27/01
- ;;3.5;FEE BASIS;**27**;JAN 30, 1995
- ;File #162.7 conversion routine
- Q ;stub
- ;
- ;/**
- ;post-install entry point
- POST27 ;*/
- N FBSNDML S FBSNDML=1
- D PREPRPT
- Q
- ;
- ;/**
- ;This utility can be run anytime to detect claims that don't have
- ;all required information.
- ;
- REPORT ;*/
- N FBLIMDT S FBLIMDT=0
- S DIR("A",1)=" This utility can be run anytime to detect claims that don't have all"
- S DIR("A",2)=" the required information. The user is able to specify a starting date"
- S DIR("A",3)=" for the report. If the date is specified then the utility shows only"
- S DIR("A",4)=" the claims that were received on this date or later."
- S DIR("A",5)=" "
- Q:$$SETLIMT()=1
- D PREPRPT
- Q
- ;
- ;/**
- ;specifies the starting date
- SETLIMT() ;*/
- N DUOUT,DIROUT,DIRUT,DTOUT
- N FBDT1 S FBDT1=0
- K ^TMP($J,"FBXIP27")
- S DIR("A")=" Do you want to specify the starting date for the report? "
- S DIR("?")=" Please answer Yes or No."
- S DIR("B")="YES",DIR(0)="YA^^"
- D ^DIR K DIR
- I $D(DUOUT)!($D(DIROUT)) Q 1
- I $D(DIRUT) Q 0
- I $G(Y)=0 S FBLIMDT=0 Q 0
- W !
- S DIR("A")=" Starting date for the report: "
- S DIR("?")=" Enter a date in proper format."
- S FBDT1=$$FMADD^XLFDT($$DT^XLFDT,-365*2,0,0,0)
- S DIR("B")=$$FMTE^XLFDT(FBDT1)
- S DIR(0)="DA^::EX^"
- D ^DIR K DIR
- I $D(DUOUT)!($D(DIROUT)) Q 1
- I $D(DIRUT) S Y=FBDT1
- S FBLIMDT=Y
- Q 0
- ;
- ;/**
- ;Prepares report for claims w/o required information
- ;
- PREPRPT ;*/
- N FBDTS,FBS,FBS1,FBV,FBP,FBVP,FBV1,FBP1,FBVP1,FBCNT,FBIND,FBTXTCNT,FBSTRDT
- S (FBS,FBS1,FBV,FBP,FBVP,FBV1,FBP1,FBVP1,FBCNT,FBTXTCNT)=0,(FBDTS,FBIND)=""
- S FBSTRDT=$G(XPDQUES("POS2"))
- S:$D(FBLIMDT) FBSTRDT=$G(FBLIMDT)
- K ^TMP($J,"FBXIP27")
- S FBS1=FBSTRDT-1 F S FBS1=$O(^FB583("B",FBS1)) Q:+FBS1=0 D
- . S FBS=0 F S FBS=$O(^FB583("B",FBS1,FBS)) Q:+FBS=0 D
- .. S FBDTS=$G(^FB583(FBS,0)) Q:FBDTS=""
- .. S FBCNT=FBCNT+1,FBIND=""
- .. I $P(FBDTS,"^",11)=1!($P(FBDTS,"^",11)=4) D
- ... I $P(FBDTS,"^",3)="" S FBIND=FBIND_"A"
- ... I $P(FBDTS,"^",10)="" S FBIND=FBIND_"B"
- .. I $P(FBDTS,"^",11)="",$P($G(^FB(162.92,+$P(FBDTS,"^",24),0)),"^",4)'<30 D
- ... I $P(FBDTS,"^",3)="" S FBIND=FBIND_"C"
- ... I $P(FBDTS,"^",10)="" S FBIND=FBIND_"D"
- .. I FBIND'="" S ^TMP($J,"FBXIP27",FBIND,FBS)=""
- .. S:FBIND="A" FBV=FBV+1
- .. S:FBIND="B" FBP=FBP+1
- .. S:FBIND="AB" FBVP=FBVP+1
- .. S:FBIND="C" FBV1=FBV1+1
- .. S:FBIND="D" FBP1=FBP1+1
- .. S:FBIND="CD" FBVP1=FBVP1+1
- ;
- D WBMES(" The following claims have been completed or dispositioned without")
- D WMES(" supplying all required information. It is necessary to review them")
- D WMES(" in order to supply the claims with all missed information.")
- I +FBSTRDT>0 S Y=FBSTRDT D DD^%DT,WBMES(" === STARTING DATE: "_Y_" ===")
- D WBMES(" === DISPOSITIONED CLAIMS ===")
- D REPTXT("A"," without VENDOR information ( "_FBV_" ) :")
- D REPTXT("B"," without PATIENT TYPE information ( "_FBP_" ) :")
- D REPTXT("AB"," without VENDOR and PATIENT TYPE information ( "_FBVP_" ) :")
- D WBMES(" === NON-DISPOSITIONED CLAIMS ===")
- D REPTXT("C"," without VENDOR information ( "_FBV1_" ) :")
- D REPTXT("D"," without PATIENT TYPE information ( "_FBP1_" ) :")
- D REPTXT("CD"," without VENDOR and PATIENT TYPE information ( "_FBVP1_" ) :")
- ;
- D PRINTREP
- D:$D(FBSNDML) SENDMAIL
- K ^TMP($J,"FBXIP27")
- Q
- ;
- ;
- ;/**
- ;prepares report text,
- ;list claims w/o required information
- REPTXT(TYPE,MESS1) ;*/
- I $D(^TMP($J,"FBXIP27")),+$O(^TMP($J,"FBXIP27",TYPE,0)) D
- . N FBDT,FBDA,FBMESS,FBTMP
- . D WBMES(MESS1)
- . D WBMES(" Claim Date Patient Vendor Submitted by")
- . D WMES(" ------------ -------------------- ---------------- --------------------")
- . S FBDA=0 F S FBDA=$O(^TMP($J,"FBXIP27",TYPE,FBDA)) Q:'FBDA D
- . . S FBMESS=$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",.01),1,12),12)_" "
- . . S FBMESS=FBMESS_$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",2),1,20),20)_" "
- . . S FBMESS=FBMESS_$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",1),1,16),16)_" "
- . . S FBMESS=FBMESS_$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",23),1,20),20)_" "
- . . D WMES(" "_FBMESS)
- Q
- ;/**
- ;writes into ^TMP
- WMES(FBSTR) ;*/
- S FBTXTCNT=FBTXTCNT+1
- S ^TMP($J,"FBXIP27","TXT",FBTXTCNT)=FBSTR
- Q
- ;
- ;/**
- ;writes into ^TMP with leading "" (it works like "!")
- WBMES(FBSTR) ;*/
- D WMES("")
- D WMES(FBSTR)
- Q
- ;
- ;/**
- ;prints report on the install screen
- PRINTREP ;*/
- Q:'$D(^TMP($J,"FBXIP27","TXT"))
- N CNT S CNT=0
- F S CNT=$O(^TMP($J,"FBXIP27","TXT",CNT)) Q:+CNT=0 D
- . D MES^XPDUTL($G(^TMP($J,"FBXIP27","TXT",CNT)))
- Q
- ;
- ;/**
- ;sends e-mail with report to installer
- ;
- SENDMAIL ;*/
- Q:'$D(^TMP($J,"FBXIP27","TXT"))
- N DIFROM,XMDUZ,XMSUB,XMTEXT,XMY
- S XMSUB="FB*3.5*27 Install: Claims w/o all necessary information."
- S XMDUZ=.5
- S XMTEXT="^TMP($J,""FBXIP27"",""TXT"","
- S XMY(DUZ)=""
- D ^XMD
- Q
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFBXIP27 4935 printed Mar 13, 2025@21:06:31 Page 2
- FBXIP27 ;WOIFO/SS-PATCH INSTALL ROUTINE ;8/27/01
- +1 ;;3.5;FEE BASIS;**27**;JAN 30, 1995
- +2 ;File #162.7 conversion routine
- +3 ;stub
- QUIT
- +4 ;
- +5 ;/**
- +6 ;post-install entry point
- POST27 ;*/
- +1 NEW FBSNDML
- SET FBSNDML=1
- +2 DO PREPRPT
- +3 QUIT
- +4 ;
- +5 ;/**
- +6 ;This utility can be run anytime to detect claims that don't have
- +7 ;all required information.
- +8 ;
- REPORT ;*/
- +1 NEW FBLIMDT
- SET FBLIMDT=0
- +2 SET DIR("A",1)=" This utility can be run anytime to detect claims that don't have all"
- +3 SET DIR("A",2)=" the required information. The user is able to specify a starting date"
- +4 SET DIR("A",3)=" for the report. If the date is specified then the utility shows only"
- +5 SET DIR("A",4)=" the claims that were received on this date or later."
- +6 SET DIR("A",5)=" "
- +7 if $$SETLIMT()=1
- QUIT
- +8 DO PREPRPT
- +9 QUIT
- +10 ;
- +11 ;/**
- +12 ;specifies the starting date
- SETLIMT() ;*/
- +1 NEW DUOUT,DIROUT,DIRUT,DTOUT
- +2 NEW FBDT1
- SET FBDT1=0
- +3 KILL ^TMP($JOB,"FBXIP27")
- +4 SET DIR("A")=" Do you want to specify the starting date for the report? "
- +5 SET DIR("?")=" Please answer Yes or No."
- +6 SET DIR("B")="YES"
- SET DIR(0)="YA^^"
- +7 DO ^DIR
- KILL DIR
- +8 IF $DATA(DUOUT)!($DATA(DIROUT))
- QUIT 1
- +9 IF $DATA(DIRUT)
- QUIT 0
- +10 IF $GET(Y)=0
- SET FBLIMDT=0
- QUIT 0
- +11 WRITE !
- +12 SET DIR("A")=" Starting date for the report: "
- +13 SET DIR("?")=" Enter a date in proper format."
- +14 SET FBDT1=$$FMADD^XLFDT($$DT^XLFDT,-365*2,0,0,0)
- +15 SET DIR("B")=$$FMTE^XLFDT(FBDT1)
- +16 SET DIR(0)="DA^::EX^"
- +17 DO ^DIR
- KILL DIR
- +18 IF $DATA(DUOUT)!($DATA(DIROUT))
- QUIT 1
- +19 IF $DATA(DIRUT)
- SET Y=FBDT1
- +20 SET FBLIMDT=Y
- +21 QUIT 0
- +22 ;
- +23 ;/**
- +24 ;Prepares report for claims w/o required information
- +25 ;
- PREPRPT ;*/
- +1 NEW FBDTS,FBS,FBS1,FBV,FBP,FBVP,FBV1,FBP1,FBVP1,FBCNT,FBIND,FBTXTCNT,FBSTRDT
- +2 SET (FBS,FBS1,FBV,FBP,FBVP,FBV1,FBP1,FBVP1,FBCNT,FBTXTCNT)=0
- SET (FBDTS,FBIND)=""
- +3 SET FBSTRDT=$GET(XPDQUES("POS2"))
- +4 if $DATA(FBLIMDT)
- SET FBSTRDT=$GET(FBLIMDT)
- +5 KILL ^TMP($JOB,"FBXIP27")
- +6 SET FBS1=FBSTRDT-1
- FOR
- SET FBS1=$ORDER(^FB583("B",FBS1))
- if +FBS1=0
- QUIT
- Begin DoDot:1
- +7 SET FBS=0
- FOR
- SET FBS=$ORDER(^FB583("B",FBS1,FBS))
- if +FBS=0
- QUIT
- Begin DoDot:2
- +8 SET FBDTS=$GET(^FB583(FBS,0))
- if FBDTS=""
- QUIT
- +9 SET FBCNT=FBCNT+1
- SET FBIND=""
- +10 IF $PIECE(FBDTS,"^",11)=1!($PIECE(FBDTS,"^",11)=4)
- Begin DoDot:3
- +11 IF $PIECE(FBDTS,"^",3)=""
- SET FBIND=FBIND_"A"
- +12 IF $PIECE(FBDTS,"^",10)=""
- SET FBIND=FBIND_"B"
- End DoDot:3
- +13 IF $PIECE(FBDTS,"^",11)=""
- IF $PIECE($GET(^FB(162.92,+$PIECE(FBDTS,"^",24),0)),"^",4)'<30
- Begin DoDot:3
- +14 IF $PIECE(FBDTS,"^",3)=""
- SET FBIND=FBIND_"C"
- +15 IF $PIECE(FBDTS,"^",10)=""
- SET FBIND=FBIND_"D"
- End DoDot:3
- +16 IF FBIND'=""
- SET ^TMP($JOB,"FBXIP27",FBIND,FBS)=""
- +17 if FBIND="A"
- SET FBV=FBV+1
- +18 if FBIND="B"
- SET FBP=FBP+1
- +19 if FBIND="AB"
- SET FBVP=FBVP+1
- +20 if FBIND="C"
- SET FBV1=FBV1+1
- +21 if FBIND="D"
- SET FBP1=FBP1+1
- +22 if FBIND="CD"
- SET FBVP1=FBVP1+1
- End DoDot:2
- End DoDot:1
- +23 ;
- +24 DO WBMES(" The following claims have been completed or dispositioned without")
- +25 DO WMES(" supplying all required information. It is necessary to review them")
- +26 DO WMES(" in order to supply the claims with all missed information.")
- +27 IF +FBSTRDT>0
- SET Y=FBSTRDT
- DO DD^%DT
- DO WBMES(" === STARTING DATE: "_Y_" ===")
- +28 DO WBMES(" === DISPOSITIONED CLAIMS ===")
- +29 DO REPTXT("A"," without VENDOR information ( "_FBV_" ) :")
- +30 DO REPTXT("B"," without PATIENT TYPE information ( "_FBP_" ) :")
- +31 DO REPTXT("AB"," without VENDOR and PATIENT TYPE information ( "_FBVP_" ) :")
- +32 DO WBMES(" === NON-DISPOSITIONED CLAIMS ===")
- +33 DO REPTXT("C"," without VENDOR information ( "_FBV1_" ) :")
- +34 DO REPTXT("D"," without PATIENT TYPE information ( "_FBP1_" ) :")
- +35 DO REPTXT("CD"," without VENDOR and PATIENT TYPE information ( "_FBVP1_" ) :")
- +36 ;
- +37 DO PRINTREP
- +38 if $DATA(FBSNDML)
- DO SENDMAIL
- +39 KILL ^TMP($JOB,"FBXIP27")
- +40 QUIT
- +41 ;
- +42 ;
- +43 ;/**
- +44 ;prepares report text,
- +45 ;list claims w/o required information
- REPTXT(TYPE,MESS1) ;*/
- +1 IF $DATA(^TMP($JOB,"FBXIP27"))
- IF +$ORDER(^TMP($JOB,"FBXIP27",TYPE,0))
- Begin DoDot:1
- +2 NEW FBDT,FBDA,FBMESS,FBTMP
- +3 DO WBMES(MESS1)
- +4 DO WBMES(" Claim Date Patient Vendor Submitted by")
- +5 DO WMES(" ------------ -------------------- ---------------- --------------------")
- +6 SET FBDA=0
- FOR
- SET FBDA=$ORDER(^TMP($JOB,"FBXIP27",TYPE,FBDA))
- if 'FBDA
- QUIT
- Begin DoDot:2
- +7 SET FBMESS=$$LJ^XLFSTR($EXTRACT($$GET1^DIQ(162.7,FBDA_",",.01),1,12),12)_" "
- +8 SET FBMESS=FBMESS_$$LJ^XLFSTR($EXTRACT($$GET1^DIQ(162.7,FBDA_",",2),1,20),20)_" "
- +9 SET FBMESS=FBMESS_$$LJ^XLFSTR($EXTRACT($$GET1^DIQ(162.7,FBDA_",",1),1,16),16)_" "
- +10 SET FBMESS=FBMESS_$$LJ^XLFSTR($EXTRACT($$GET1^DIQ(162.7,FBDA_",",23),1,20),20)_" "
- +11 DO WMES(" "_FBMESS)
- End DoDot:2
- End DoDot:1
- +12 QUIT
- +13 ;/**
- +14 ;writes into ^TMP
- WMES(FBSTR) ;*/
- +1 SET FBTXTCNT=FBTXTCNT+1
- +2 SET ^TMP($JOB,"FBXIP27","TXT",FBTXTCNT)=FBSTR
- +3 QUIT
- +4 ;
- +5 ;/**
- +6 ;writes into ^TMP with leading "" (it works like "!")
- WBMES(FBSTR) ;*/
- +1 DO WMES("")
- +2 DO WMES(FBSTR)
- +3 QUIT
- +4 ;
- +5 ;/**
- +6 ;prints report on the install screen
- PRINTREP ;*/
- +1 if '$DATA(^TMP($JOB,"FBXIP27","TXT"))
- QUIT
- +2 NEW CNT
- SET CNT=0
- +3 FOR
- SET CNT=$ORDER(^TMP($JOB,"FBXIP27","TXT",CNT))
- if +CNT=0
- QUIT
- Begin DoDot:1
- +4 DO MES^XPDUTL($GET(^TMP($JOB,"FBXIP27","TXT",CNT)))
- End DoDot:1
- +5 QUIT
- +6 ;
- +7 ;/**
- +8 ;sends e-mail with report to installer
- +9 ;
- SENDMAIL ;*/
- +1 if '$DATA(^TMP($JOB,"FBXIP27","TXT"))
- QUIT
- +2 NEW DIFROM,XMDUZ,XMSUB,XMTEXT,XMY
- +3 SET XMSUB="FB*3.5*27 Install: Claims w/o all necessary information."
- +4 SET XMDUZ=.5
- +5 SET XMTEXT="^TMP($J,""FBXIP27"",""TXT"","
- +6 SET XMY(DUZ)=""
- +7 DO ^XMD
- +8 QUIT
- +9 ;