source: WorldVistAEHR/trunk/r/VOLUNTARY_TIMEKEEPING-ABSV/ABSVE.m@ 1739

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

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1ABSVE ;VAMC ALTOONA/CTB&CLH - POST DAILY ENTRIES ;4/13/00 3:12 PM
2V ;;4.0;VOLUNTARY TIMEKEEPING;**10,18**;JULY 6, 1994
3 ;ENTER DATA INTO TIME FILE
4 N %,%DT,%T,%W,%Y,ABSVX,DIR,DIRUT,DTOUT,DUOUT,DIROUT,C,COMB,DAY,DIC,DI,D0,DQ,DR,DUOUT,DIE,DATE,FIRST,ORG,DA,SER,VOL,I,N,X,Y,POP
5 D ^ABSVSITE G OUT^ABSVE3:'%
6 S FIRST=""
7DATE S DIR(0)="D^::AEXP",DIR("A")="Select Posting DATE"
8 D ^DIR
9 I $D(DIRUT) K DIRUT,DTOUT,DUOUT,DIROUT G OUT^ABSVE3
10 S DATE=Y
11 S DIC("A")="Select Volunteer: "
12TIME ;S DIC("S")="I $D(^ABS(503330,+Y,4,ABSV(""INST""),0)),$P(^(0),U,8)=""""",DIC=503330,DIC(0)="AEMZQ"
13 S DIC("S")="I $D(^ABS(503330,+Y,4,ABSV(""INST""),0))",DIC=503330,DIC(0)="AEMZQ"
14 D MDIV^ABSVSITE,^DIC K DIC
15 I Y<0,$D(FIRST) G OUT^ABSVE3
16 I Y<0 G DATE
17 I '$$ACTIVE^ABSVU2(+Y,ABSV("INST")) G:$D(FIRST) OUT^ABSVE3 G TIME
18 K FIRST
19 S ABSVX("VOLDA")=+Y,ABSVX("NAME")=$P(Y,"^",2)
20T1 K NEW
21 S DA=ABSVX("VOLDA") D PC1^ABSVE2,SEL1^ABSVE2 I Y="" D NEXT G TIME
22 S X=^ABS(503330,DA,1,$P(Y,"^",2),0)
23 S COMB=$P(X,"^",5),ORG=$P(X,"^",2),SER=$P(X,"^",4)
24 S Y=0 L +^ABS(503330,ABSVX("VOLDA")):10 I '$T S X="Someone else is accessing this record. Posting terminated." D MSG^ABSVQ,NEXT G TIME
25 F S Y=$O(^ABS(503331,"B",ABSVX("VOLDA"),Y)) Q:Y="" S X=$G(^ABS(503331,Y,0)) I $P(X,"^",3)=DATE,$P(X,"^",6)=COMB Q
26 I Y'>0 S X=ABSVX("VOLDA") S DIC="^ABS(503331,",DIC(0)="ML" D FILE^DICN,XREF S NEW=1
27 S DA=+Y,DR=4,DIE=503331 D ^DIE
28 L -^ABS(503330,ABSVX("VOLDA"))
29 I '$D(Y) S X="<Daily Record Completed.>*" D MSG^ABSVQ G Q
30 I $D(NEW) K NEW S X="This entry is incomplete and is being deleted.*" D MSG^ABSVQ S DIK=DIE D ^DIK K DIK G Q
31 S ABSVXA="ARE YOU SURE YOU WANT TO DELETE THIS ENTRY",ABSVXB="",%=1 D ^ABSVYN
32 I %'=1 S X=" <No action taken>*" D MSG^ABSVQ G Q
33 S DIK=DIE D ^DIK K DIK S X=" <Record Deleted>*" D MSG^ABSVQ
34Q D NEXT G TIME
35NEXT W !!!,"For ",$$FULLDAT^ABSVU2(DATE),":" S DIC("A")="Select Next Volunteer: " QUIT
36XREF S XX=$E(DATE,1,5)_"00^"_DATE_"^"_+ORG_"^^"_COMB_"^"_ABSV("SITE")_"^"_+SER,$P(^ABS(503331,+Y,0),"^",2,8)=XX K XX
37 S ^ABS(503331,"AD",DATE,+Y)="",^ABS(503331,"AC",+ORG,+Y)="",^ABS(503331,"AE",+SER,+Y)="",^ABS(503331,"AF",$E(DATE,1,5)_"00",+Y)=""
38 Q
Note: See TracBrowser for help on using the repository browser.