source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSMR1.m@ 1093

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

initial load of WorldVistAEHR

File size: 3.4 KB
Line 
1IBCNSMR1 ;ALB/AAS - MEDICARE BILLS ; 9-SEP-97
2 ;;2.0;INTEGRATED BILLING;**92,103**;21-MAR-94
3 ;
4% G RPRT^IBCNSMRA
5 ;
6BULL ; -- send bulletin
7 N CNT1,I,J,X,Y,IBSITE,IBT,IBGRP,XMDUZ,XMN,XMTEXT,XMY,XMSUB,XMZ,XCNP
8 K ^TMP($J,"IBT")
9 ;
10 S IBT="^TMP($J,""IBT"")"
11 S IBSITE=$P($$SITE^VASITE,"^",2,3)
12 S XMSUB="IB MRA ANALYSIS REPORT FOR "_$TR(IBSITE,"^","-")
13 S @IBT@(1)="ACTIVITY := $$MRA-ANALYSIS$$"
14 S @IBT@(2)="SITE := $$"_IBSITE_"$$"
15 S @IBT@(3)="SUMMARY DATA := "
16 S @IBT@(4)="$$0$$:"_+$G(CNT)_U_+$G(CNT(0))_U_+$G(CNT(1))_U_+$G(CNT(2))_U_+$G(CNT("OP"))_U_+$G(CNT("OP",0))_U_+$G(CNT("OP",1))_U_+$G(CNT("OP",2))_U_+$G(CNT("IN"))_U_+$G(CNT("IN",0))_U_+$G(CNT("IN",1))_U_+$G(CNT("IN",2))
17 S @IBT@(5)="$$1$$:"_+$G(CNT("B"))_U_+$G(CNT("B",0))_U_+$G(CNT("B",1))_U_+$G(CNT("B",2))_U_+$G(CNT("D"))_U_+$G(CNT("D",0))_U_+$G(CNT("D",1))_U_+$G(CNT("D",2))_U_+$G(CNT("P"))_U_+$G(CNT("P",0))_U_+$G(CNT("P",1))_U_+$G(CNT("P",2))
18 S @IBT@(5)=@IBT@(5)_U_+$G(CNT("N"))_U_+$G(CNT("N",0))_U_+$G(CNT("N",1))_U_+$G(CNT("N",2))
19 ;
20 S @IBT@(6)="$$2$$:"_+$G(CNT("C"))_U_+$G(CNT("C",0))_U_+$G(CNT("C",1))_U_+$G(CNT("C",2))_U_+$G(CNT("R"))_U_+$G(CNT("R",0))_U_+$G(CNT("R",1))_U_+$G(CNT("R",2))_U_+$G(CNT("W"))_U_+$G(CNT("W",0))_U_+$G(CNT("W",1))_U_+$G(CNT("W",2))
21 S @IBT@(6)=@IBT@(6)_U_+$G(CNT("T"))_U_+$G(CNT("T",0))_U_+$G(CNT("T",1))_U_+$G(CNT("T",2))
22 ;
23 S @IBT@(7)="$$3$$:"_+$G(CNT("X"))_U_+$G(CNT("X",0))_U_+$G(CNT("X",1))_U_+$G(CNT("X",2))_U_+$G(CNT("Z"))_U_+$G(CNT("Z",0))_U_+$G(CNT("Z",1))_U_+$G(CNT("Z",2))_U_+$G(CNT("A"))_U_+$G(CNT("A",0))_U_+$G(CNT("A",1))_U_+$G(CNT("A",2))
24 S @IBT@(7)=@IBT@(7)_U_+$G(CNT("F"))_U_+$G(CNT("F",0))_U_+$G(CNT("F",1))_U_+$G(CNT("F",2))
25 ;
26 S @IBT@(8)="$$4$$:"_+$G(CNT("M"))_U_+$G(CNT("M",0))_U_+$G(CNT("M",1))_U_+$G(CNT("M",2))_U_+$G(CNT("M","OP"))_U_+$G(CNT("M","OP",0))_U_+$G(CNT("M","OP",1))_U_+$G(CNT("M","OP",2))
27 S @IBT@(8)=@IBT@(8)_U_+$G(CNT("M","IN"))_U_+$G(CNT("M","IN",0))_U_+$G(CNT("M","IN",1))_U_+$G(CNT("M","IN",2))_U_+$G(CNT("M",4))_U_+$G(CNT("M",5))_U_+$G(CNT("M",6))_U_+$G(CNT("M",7))
28 ;
29 S @IBT@(9)="INSURANCE COMPANY TOTALS := "
30 S IBNM="",CNT1=10
31 F S IBNM=$O(CNT(3,IBNM)) Q:IBNM="" D
32 .S @IBT@(CNT1)="$$"_(CNT1-4)_"$$:"_IBNM_U_+$G(CNT(3,IBNM))_U_+$G(CNT(3,IBNM,0))_U_+$G(CNT(3,IBNM,1))_U_+$G(CNT(3,IBNM,2))
33 .S CNT1=CNT1+1
34 ;
35 S @IBT@(CNT1)="ANNUAL DATA := ",CNT1=CNT1+1
36 D SORT
37 ;
38 D SEND
39BULLQ Q
40 ;
41SEND S XMDUZ="INTEGRATED BILLING PACKAGE" ; ,XMTEXT="IBT("
42 S XMTEXT="^TMP($J,""IBT"","
43 K XMY S XMN=0
44 S XMY(DUZ)=""
45 S XMY("G.IB-MRA-SERVER@ISC-ALBANY.VA.GOV")=""
46 D ^XMD
47 K X,Y,IBI,IBT,IBGRP,XMDUZ,XMTEXT,XMY,XMSUB
48 K ^TMP($J,"IBT")
49 Q
50 ;
51SORT ; -- Run through list by insurance company
52 N I,J,K,L,M,N,P,X,Y,Z,ZZ
53 S I=0
54 F S I=$O(^TMP("IB-MRA-CNT",$J,I)) Q:I=""!(IBQUIT) D ;insur. co
55 .S J=0
56 .F S J=$O(^TMP("IB-MRA-CNT",$J,I,J)) Q:J=""!(IBQUIT) D ;year
57 ..S K=""
58 ..F S K=$O(^TMP("IB-MRA-CNT",$J,I,J,K)) Q:K=""!(IBQUIT) D ;bill type
59 ...S L=0
60 ...F S L=$O(^TMP("IB-MRA-CNT",$J,I,J,K,L)) Q:L=""!(IBQUIT) D ;proc
61 ....S M=0
62 ....F S M=$O(^TMP("IB-MRA-CNT",$J,I,J,K,L,M)) Q:M=""!(IBQUIT) D ;ar status
63 .....S N=0
64 .....F S N=$O(^TMP("IB-MRA-CNT",$J,I,J,K,L,M,N)) Q:N=""!(IBQUIT) S X=+$G(^(N)),Y=+$G(^(N,0)),Z=+$G(^(1)),ZZ=+$G(^(2)) D LINE ;ibstatus
65 ;......;S P=0 ;alive
66 ;......;F S P=$O(^TMP("IB-MRA-CNT",$J,I,J,K,L,M,N,P)) Q:P=""!(IBQUIT) S X=+$G(^(P)),Y=+$G(^(P,0)),Z=+$G(^(1)),ZZ=+$G(^(2)) D LINE
67 Q
68 ;
69LINE ;
70 S IBNM=$P($G(^DIC(36,I,0),"UNKNOWN"),"^")
71 S @IBT@(CNT1)="$$"_(CNT1-4)_"$$:"_IBNM_U_J_U_K_U_$P(M,"^",2)_U_N_U_X_U_Y_U_Z_U_ZZ
72 S CNT1=CNT1+1
73 Q
Note: See TracBrowser for help on using the repository browser.