source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/VASITE1.m@ 1800

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1VASITE1 ;ALB/AAS - LOAD VASITE FILE WITH DATA ; 10-FEB-92
2 ;;5.3;Registration;;Aug 13, 1993
3 ;
4% S:'$D(DTIME) DTIME=300 S U="^"
5 ; -load file 389.9
6 Q:$O(^VA(389.9,0))
7 ;D:'$D(VAPRIM) PRIM
8 W !!,"<<< Updating Time Sensitive Station Number file for all Medical Center divisions",!
9 S (VADIV,VACNT)=0 F S VADIV=$O(^DG(40.8,VADIV)) Q:'VADIV I '$D(VA(389.9,"C",VADIV)) D
10 .S VASITE=$P($G(^DG(40.8,VADIV,0)),U,2) I VASITE="" S VASITE=$P($G(^DIC(4,$P(^DG(40.8,VADIV,0),U,7),99)),U)
11 .I VASITE'?3N.AN W !!,"Division ",$P(^DG(40.8,VADIV,0),"^")," has station number in incorrect format",!,"and can't be added to file. Use the option 'Station Number (Time Sensitive)",!,"Enter/Edit' to complete entry." Q
12 .K DD,DO
13 .S VACNT=VACNT+1,X=VACNT,DIC(0)="L",DIC="^VA(389.9," D FILE^DICN Q:+Y<1 W ".."
14 .S DA=+Y,DR=".02////2800101;.03////"_VADIV_";.04////"_VASITE S:VASITE=+VASITE&('$D(VAPRIM)) DR=DR_";.05////1;",VAPRIM=1 S DIE="^VA(389.9,"
15 .D ^DIE
16 .K DIC,DIE,DA,DR
17 .Q
18 Q
19 ;
20PRIM S DIR(0)="N^.5:1.5:4",DIR("A")="PRIMARY DIVISION"
21 S DIR("A",1)="If you know your stations PRIMARY DIVISION, you may"
22 S DIR("A",2)="enter it now. If not it can be entered at a later time."
23 S DIR("A",3)="However, it must be entered before the Billing software is used.",DIR("A",4)=" "
24 D ^DIR K DIR Q:$D(DIRUT)
25 I +Y S VAPRIM=+Y
26 Q
27 ;
28NEW ; -- add new entry to time sensitive file when adding a new division
29 ; input: VASITE("NEW")=Y (after adding new entry)
30 ; =internal number in 40.8^name^1
31 ; -- called from DGPAR1
32 ;
33 N X,Y,DO,DD,DIC,DIE,DA,DR,DINUM S Y=VASITE("NEW")
34 S VASITE("OK")=0
35 G:'Y!('$P(Y,"^",3)) NEWQ
36 S VADIV=+Y I $D(^VA(389.9,"C",VADIV)) G NEWQ ;not a new entry.
37 ;
38 S VASITE=$P($G(^DG(40.8,VADIV,0)),U,2) I VASITE="" S VASITE=$P($G(^DIC(4,$P(^DG(40.8,VADIV,0),U,7),99)),U) I VASITE="" G NEWQ ;no station number or facility entered
39 ;
40 I VASITE'?3N.AN S $P(VASITE("OK"),"^",2)="Division "_$P(^DG(40.8,VADIV,0),"^")_" has station number in incorrect format." G NEWQ
41 ;
42ADD ; -add new entry
43 ;
44 L +^VA(389.9,0):10 I '$T S $P(VASITE("OK"),"^",2)="Another user appears to be adding an entry" G NEWQ
45 S X=$P($G(^VA(389.9,0)),"^",3)
46 L -^VA(389.9,0)
47 K DD,DO,DIC,DR S DLAYGO=389.9,DIC(0)="L",DIC="^VA(389.9,"
48 ;
49 F X=X:1 L:$D(VAIEN) -^VA(389.9,VAIEN) I X>0,'$D(^VA(389.9,X)) S VAIEN=X L +^VA(389.9,X,0) I $T,'$D(^VA(389.9,X,0)) S DINUM=X D FILE^DICN I +Y>0 D Q
50 .S VASITE("OK")=1
51 ;
52EDIT ;
53 S DA=+Y,DR=".02////"_DT_";.03////"_VADIV_";.04////"_VASITE,DIE="^VA(389.9,"
54 D ^DIE
55 ;
56NEWQ ;
57 I '+VASITE("OK") D
58 .W !!?5,">>> An unsuccessful attempt was made to also add a new entry to"
59 .W !?5," STATION NUMBER (TIME SENSITIVE) [#389.9] file for this division."
60 .I $P(VASITE("OK"),U,2)]"" W !?5," *** ",$P(VASITE("OK"),U,2)," ***"
61 .W !!?5,">>> Please contact your IRM service after entering division data.",!,*7
62 K VAIEN,VASITE,VADIV
63 Q
Note: See TracBrowser for help on using the repository browser.