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

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1IBCEP7A ;ALB/TMP - Functions for fac level PROVIDER ID MAINT ;11-07-00
2 ;;2.0;INTEGRATED BILLING;**232,320**;21-MAR-94
3 ;
4IDNUM(IBIEN) ; Find site-default id # for id type
5 ; IBIEN = ien of prov ID type (file 355.97)
6 N IBID,Z0,Z1
7 S IBID=""
8 S Z0=$G(^IBE(355.97,IBIEN,0)),Z1=$G(^(1))
9 I $P(Z1,U,9) G IDNUMQ
10 I $P(Z0,U,4)'="" S IBID=$P(Z0,U,4) G IDNUMQ
11 I $P(Z1,U,4) S IBID=$P($G(^IBE(350.9,1,1)),U,5)
12 ;
13IDNUMQ Q IBID
14 ;
15ADDFAC(IBINS,IBEFTFL) ; Add a new fac id for an ins co
16 N IB,IBDIV,IBY,IBOK,IBRBLD,IBITYP,IBFORM,DIC,DIR,X,Y,DTOUT,DUOUT,DLAYGO,DO,DD,Z,Z0,DIE,DIK,DA,IBCAREUN,DR,I
17 S IBRBLD=0,IBY=-1
18 S IBOK=$$FACFLDS^IBCEP7C("",IBINS,.IBITYP,.IBFORM,.IBDIV,"A",.IBCAREUN,IBEFTFL)
19 I 'IBOK G ADDFQ
20 ;
21 S X=IBINS,DIC(0)="L",DIC="^IBA(355.92,"
22 S DIC("DR")=".04////"_IBFORM_$S($G(IBDIV):";.05////"_IBDIV,1:"")_";.06////"_IBITYP_$S($G(IBCAREUN)]""&($G(IBCAREUN)'="*N/A*"):";.03////"_IBCAREUN,1:"")_";.08////"_$G(IBEFTFL)
23 S DLAYGO=355.92
24 D FILE^DICN
25 K DIC,DLAYGO,DO,DD
26 S IBY=+Y
27 ;
28 ; Below is a very convoluted way to get the proper prompt on the screen. Tried using DIC("DR") above but
29 ; the file name was being added to the prompt.
30 S DIE=355.92
31 S DA=IBY
32 F I=1:1:3 L +^IBA(355.92,DA):5 Q:$T
33 E G ADDFQ
34 S DR=".07"_$S(IBEFTFL="E"!(IBEFTFL="A"):"Billing Provider Secondary ID",1:"VA Lab or Facility Secondary ID")
35 D ^DIE
36 I $G(DTOUT)!$G(DUOUT) D
37 . S DIK=355.92
38 . S DA=+IBY
39 . S IBY=0
40 . D ^DIK
41 L -^IBA(355.92,DA)
42 ;
43ADDFQ I IBY>0,$P($G(^IBA(355.92,IBY,0)),U,7)="" S DIK="^IBA(355.92,",DA=IBY D ^DIK S IBY=-1
44 I IBY'>0 S DIR("A",+$O(DIR("A"," "),-1)+1)="A NEW ID WAS NOT ADDED",IBRBLD=0
45 I IBY>0 S DIR("A",1)="A NEW ID WAS ADDED SUCCESSFULLY",IBRBLD=1 D
46 . Q:IBEFTFL'="A"
47 . N NEXTONE
48 . S NEXTONE=$$NEXTONE^IBCEP7()
49 . S ^TMP("IB_EDITED_IDS",$J,NEXTONE)=IBY_U_"ADD"_U_355.92
50 . S ^TMP("IB_EDITED_IDS",$J,NEXTONE,0)=^IBA(355.92,IBY,0)
51 S DIR(0)="EA",DIR("A")="PRESS RETURN TO CONTINUE: " W ! D ^DIR K DIR
52 Q IBRBLD
53 ;
54ADDID ;
55 N IBSAVTMP
56 S IBSAVTMP=$G(^TMP("IBCE_PRVFAC_MAINT_INS",$J))
57 D FACID^IBCEP2B(+IBCNS,"A")
58 S ^TMP("IBCE_PRVFAC_MAINT_INS",$J)=$G(IBSAVTMP)
59 S VALMBCK="R"
60 Q
61 ;
62IDPARAM ;
63 D FULL^VALM1
64 D EN^IBCEPB
65 S VALMBCK="R"
66 Q
67 ;
68VALFIDS ;
69 N IBSAVTMP
70 S IBSAVTMP=$G(^TMP("IBCE_PRVFAC_MAINT_INS",$J))
71 D FACID^IBCEP2B(+IBCNS,"LF")
72 S ^TMP("IBCE_PRVFAC_MAINT_INS",$J)=$G(IBSAVTMP)
73 S VALMBCK="R"
74 Q
Note: See TracBrowser for help on using the repository browser.