source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNRXI1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1IBCNRXI1 ;BHAM ISC/DMK - Post-Installation procedure ;25-AUG-2004
2 ;;2.0;INTEGRATED BILLING;**276**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ; Description:
6 ; This is a part of the IB*2.0*276 post-installation procedure.
7 ; Its purpose is to review all PLAN file entries.
8 ; If PLAN APPLICATION sub-file, LOCAL ACTIVE? = 1 (active)
9 ; and USER EDITED LOCAL = "dummy" HL7 interface user, then
10 ; reinitialize LOCAL ACTIVE = 0.
11 ; Initial requirements called for initialization to 1, but this
12 ; has changed.
13 ;
14 ; Applicable files, sub-files, and fields:
15 ; 366.033 = PLAN APPLICATION sub-file
16 ; .03 = LOCAL ACTIVE?
17 ; .04 = USER EDITED LOCAL
18 ; .05 = DATE/TIME LOCAL EDITED
19 ;
201000 ; Control
21 ;
22 ; Call IBCNRXI2 to fix the USER EDITED LOCAL user
23 D EN^IBCNRXI2
24 ;
25 ; Compile List of plans that are being used
26 K ^TMP("IBCNRXI1",$J)
27 D COMPILE
28 ;
29 ; Initialization
30 N DATE,HL7DUZ,IEN,S
31 ;
32 D INIT
33 I HL7DUZ="" Q
34 ;
35 D GET1
36 K ^TMP("IBCNRXI1",$J)
37 Q
38 ;
39GET1 ; Get PLAN file (#366.03) IEN
40 S IEN(366.03)=0 F S IEN(366.03)=$O(^IBCNR(366.03,IEN(366.03))) Q:'IEN(366.03) D GET2
41 Q
42 ;
43GET2 ; Get PLAN APPLICATION sub-file (# 366.033) IEN
44 S IEN(366.033)=0 F S IEN(366.033)=$O(^IBCNR(366.03,IEN(366.03),3,IEN(366.033))) Q:'IEN(366.033) D GET3
45 Q
46 ;
47GET3 ; Check PLAN APPLICATION sub-file fields
48 S S=$G(^IBCNR(366.03,IEN(366.03),3,IEN(366.033),0))
49 I $P(S,U,3)=1,$P(S,U,4)=HL7DUZ,'$D(^TMP("IBCNRXI1",$J,IEN(366.03))) D FIX
50 Q
51 ;
52INIT ; Initialize local variables
53 I '$D(U) S U="^"
54 S HL7DUZ=$$FIND1^DIC(200,"","X","INTERFACE,IB IIV") Q:'HL7DUZ
55 S DATE("NOW")=$$NOW^XLFDT()
56 Q
57 ;
58FIX ; Reinitialize (fix) PLAN APPLICATION sub-file fields
59 S $P(S,U,3)=0
60 S $P(S,U,5)=DATE("NOW")
61 S ^IBCNR(366.03,IEN(366.03),3,IEN(366.033),0)=S
62 Q
63 ;
64COMPILE ; Build list of plans that are in use
65 N IEN02,GRP,PL
66 S IEN02=0 F S IEN02=$O(^BPSC(IEN02)) Q:+IEN02=0 D
67 . S GRP=$P($G(^BPSC(IEN02,1)),"^",4)
68 . I GRP="" Q
69 . S PL=$P($G(^IBA(355.3,GRP,6)),"^",1)
70 . I PL="" Q
71 . S ^TMP("IBCNRXI1",$J,PL)=""
72 Q
Note: See TracBrowser for help on using the repository browser.