source: WorldVistAEHR/trunk/r/FEE_BASIS-FB/FBXIP27.m@ 1639

Last change on this file since 1639 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 4.7 KB
Line 
1FBXIP27 ;WOIFO/SS-PATCH INSTALL ROUTINE ;8/27/01
2 ;;3.5;FEE BASIS;**27**;JAN 30, 1995
3 ;File #162.7 conversion routine
4 Q ;stub
5 ;
6 ;/**
7 ;post-install entry point
8POST27 ;*/
9 N FBSNDML S FBSNDML=1
10 D PREPRPT
11 Q
12 ;
13 ;/**
14 ;This utility can be run anytime to detect claims that don't have
15 ;all required information.
16 ;
17REPORT ;*/
18 N FBLIMDT S FBLIMDT=0
19 S DIR("A",1)=" This utility can be run anytime to detect claims that don't have all"
20 S DIR("A",2)=" the required information. The user is able to specify a starting date"
21 S DIR("A",3)=" for the report. If the date is specified then the utility shows only"
22 S DIR("A",4)=" the claims that were received on this date or later."
23 S DIR("A",5)=" "
24 Q:$$SETLIMT()=1
25 D PREPRPT
26 Q
27 ;
28 ;/**
29 ;specifies the starting date
30SETLIMT() ;*/
31 N DUOUT,DIROUT,DIRUT,DTOUT
32 N FBDT1 S FBDT1=0
33 K ^TMP($J,"FBXIP27")
34 S DIR("A")=" Do you want to specify the starting date for the report? "
35 S DIR("?")=" Please answer Yes or No."
36 S DIR("B")="YES",DIR(0)="YA^^"
37 D ^DIR K DIR
38 I $D(DUOUT)!($D(DIROUT)) Q 1
39 I $D(DIRUT) Q 0
40 I $G(Y)=0 S FBLIMDT=0 Q 0
41 W !
42 S DIR("A")=" Starting date for the report: "
43 S DIR("?")=" Enter a date in proper format."
44 S FBDT1=$$FMADD^XLFDT($$DT^XLFDT,-365*2,0,0,0)
45 S DIR("B")=$$FMTE^XLFDT(FBDT1)
46 S DIR(0)="DA^::EX^"
47 D ^DIR K DIR
48 I $D(DUOUT)!($D(DIROUT)) Q 1
49 I $D(DIRUT) S Y=FBDT1
50 S FBLIMDT=Y
51 Q 0
52 ;
53 ;/**
54 ;Prepares report for claims w/o required information
55 ;
56PREPRPT ;*/
57 N FBDTS,FBS,FBS1,FBV,FBP,FBVP,FBV1,FBP1,FBVP1,FBCNT,FBIND,FBTXTCNT,FBSTRDT
58 S (FBS,FBS1,FBV,FBP,FBVP,FBV1,FBP1,FBVP1,FBCNT,FBTXTCNT)=0,(FBDTS,FBIND)=""
59 S FBSTRDT=$G(XPDQUES("POS2"))
60 S:$D(FBLIMDT) FBSTRDT=$G(FBLIMDT)
61 K ^TMP($J,"FBXIP27")
62 S FBS1=FBSTRDT-1 F S FBS1=$O(^FB583("B",FBS1)) Q:+FBS1=0 D
63 . S FBS=0 F S FBS=$O(^FB583("B",FBS1,FBS)) Q:+FBS=0 D
64 .. S FBDTS=$G(^FB583(FBS,0)) Q:FBDTS=""
65 .. S FBCNT=FBCNT+1,FBIND=""
66 .. I $P(FBDTS,"^",11)=1!($P(FBDTS,"^",11)=4) D
67 ... I $P(FBDTS,"^",3)="" S FBIND=FBIND_"A"
68 ... I $P(FBDTS,"^",10)="" S FBIND=FBIND_"B"
69 .. I $P(FBDTS,"^",11)="",$P($G(^FB(162.92,+$P(FBDTS,"^",24),0)),"^",4)'<30 D
70 ... I $P(FBDTS,"^",3)="" S FBIND=FBIND_"C"
71 ... I $P(FBDTS,"^",10)="" S FBIND=FBIND_"D"
72 .. I FBIND'="" S ^TMP($J,"FBXIP27",FBIND,FBS)=""
73 .. S:FBIND="A" FBV=FBV+1
74 .. S:FBIND="B" FBP=FBP+1
75 .. S:FBIND="AB" FBVP=FBVP+1
76 .. S:FBIND="C" FBV1=FBV1+1
77 .. S:FBIND="D" FBP1=FBP1+1
78 .. S:FBIND="CD" FBVP1=FBVP1+1
79 ;
80 D WBMES(" The following claims have been completed or dispositioned without")
81 D WMES(" supplying all required information. It is necessary to review them")
82 D WMES(" in order to supply the claims with all missed information.")
83 I +FBSTRDT>0 S Y=FBSTRDT D DD^%DT,WBMES(" === STARTING DATE: "_Y_" ===")
84 D WBMES(" === DISPOSITIONED CLAIMS ===")
85 D REPTXT("A"," without VENDOR information ( "_FBV_" ) :")
86 D REPTXT("B"," without PATIENT TYPE information ( "_FBP_" ) :")
87 D REPTXT("AB"," without VENDOR and PATIENT TYPE information ( "_FBVP_" ) :")
88 D WBMES(" === NON-DISPOSITIONED CLAIMS ===")
89 D REPTXT("C"," without VENDOR information ( "_FBV1_" ) :")
90 D REPTXT("D"," without PATIENT TYPE information ( "_FBP1_" ) :")
91 D REPTXT("CD"," without VENDOR and PATIENT TYPE information ( "_FBVP1_" ) :")
92 ;
93 D PRINTREP
94 D:$D(FBSNDML) SENDMAIL
95 K ^TMP($J,"FBXIP27")
96 Q
97 ;
98 ;
99 ;/**
100 ;prepares report text,
101 ;list claims w/o required information
102REPTXT(TYPE,MESS1) ;*/
103 I $D(^TMP($J,"FBXIP27")),+$O(^TMP($J,"FBXIP27",TYPE,0)) D
104 . N FBDT,FBDA,FBMESS,FBTMP
105 . D WBMES(MESS1)
106 . D WBMES(" Claim Date Patient Vendor Submitted by")
107 . D WMES(" ------------ -------------------- ---------------- --------------------")
108 . S FBDA=0 F S FBDA=$O(^TMP($J,"FBXIP27",TYPE,FBDA)) Q:'FBDA D
109 . . S FBMESS=$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",.01),1,12),12)_" "
110 . . S FBMESS=FBMESS_$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",2),1,20),20)_" "
111 . . S FBMESS=FBMESS_$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",1),1,16),16)_" "
112 . . S FBMESS=FBMESS_$$LJ^XLFSTR($E($$GET1^DIQ(162.7,FBDA_",",23),1,20),20)_" "
113 . . D WMES(" "_FBMESS)
114 Q
115 ;/**
116 ;writes into ^TMP
117WMES(FBSTR) ;*/
118 S FBTXTCNT=FBTXTCNT+1
119 S ^TMP($J,"FBXIP27","TXT",FBTXTCNT)=FBSTR
120 Q
121 ;
122 ;/**
123 ;writes into ^TMP with leading "" (it works like "!")
124WBMES(FBSTR) ;*/
125 D WMES("")
126 D WMES(FBSTR)
127 Q
128 ;
129 ;/**
130 ;prints report on the install screen
131PRINTREP ;*/
132 Q:'$D(^TMP($J,"FBXIP27","TXT"))
133 N CNT S CNT=0
134 F S CNT=$O(^TMP($J,"FBXIP27","TXT",CNT)) Q:+CNT=0 D
135 . D MES^XPDUTL($G(^TMP($J,"FBXIP27","TXT",CNT)))
136 Q
137 ;
138 ;/**
139 ;sends e-mail with report to installer
140 ;
141SENDMAIL ;*/
142 Q:'$D(^TMP($J,"FBXIP27","TXT"))
143 N DIFROM,XMDUZ,XMSUB,XMTEXT,XMY
144 S XMSUB="FB*3.5*27 Install: Claims w/o all necessary information."
145 S XMDUZ=.5
146 S XMTEXT="^TMP($J,""FBXIP27"",""TXT"","
147 S XMY(DUZ)=""
148 D ^XMD
149 Q
150 ;
Note: See TracBrowser for help on using the repository browser.