source: WorldVistAEHR/trunk/r/VOLUNTARY_TIMEKEEPING-ABSV/ABSVDENT.m@ 1154

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1ABSVDENT ;VAMC ALTOONA/CTB - FILE ENTER EDIT ;4/19/02 9:01 AM
2V ;;4.0;VOLUNTARY TIMEKEEPING;***25,26,29***;JULY 6, 1994
3 ;NEW ENTRY INTO DONATION FILE
4NEW ;
5 N DIC,CTBX,D0,DDER,DIG,DIH,DISYS,DIU,DIV,RCVD,ORG,ORGDA,COUNTER,DLAYGO,PLTR,SNAME
6 S X="This option creates a new Donation Entry*!" D MSG^ABSVQ
7 D ^ABSVSITE Q:'%
8 S DIC("A")="Select VOLUNTEER ORGANIZATION CODE: "
9 S DIC=503334,DIC(0)="AEMNZ" D ^DIC Q:Y<0
10 S ORG=$P(Y,"^",2),ORGDA=+Y,COUNTER="00000"_$$NEXTORG(ORGDA)
11 S %DT="AEX",%DT("A")="Select DATE RECEIVED: " D ^%DT
12 Q:($D(DTOUT)!(Y<0))
13 S RCVD=$P(Y,".",1)
14 S X=ABSV("SITE")_"-"_ORG_"-"_$E(COUNTER,$L(COUNTER)-3,$L(COUNTER))
15 S SNAME=$$XREF(X)
16 S DIC="^ABS(503340,",DIC(0)="EMZL",DLAYGO=DIC
17 S DIC("DR")="1///"_ORGDA_";2////"_RCVD_";.5////"_SNAME D FILE^DICN
18 K DIC("A"),DIC,DR Q:Y<0
19 W ! S X="THIS RECORD HAS BEEN ASSIGNED NUMBER "_$P(Y,"^",2)_"*" D MSG^ABSVQ
20 S DA=+Y,DR="[ABSV DONATIONS ENTER]",DIE="^ABS(503340,"
21 D ^DIE
22 I $G(PLTR)=1 D X^ABSVDPNT
23 QUIT
24NEXTORG(DA) N X
25 L +^ABS(503334,DA,0):10
26 S X=$P(^ABS(503334,DA,0),"^",6),X=X+1,$P(^ABS(503334,DA,0),"^",6)=X
27 L -^ABS(503334,DA,0)
28 QUIT X
29DELETE ;Delete a Donation Record Entered in Error
30 N DIC,Y,DA,ABSVXA,ABSVXB,%
31 D ^ABSVSITE Q:'%
32 S DIC=503340,DIC(0)="AEMNQ",DIC("A")="Select Donation Record to be Deleted: ",DIC("S")="I $P(^(0),""-"",1)=ABSV(""SITE"")" D ^DIC Q:Y<0 S DA=+Y
33 W !
34 S ABSVXA="You are about to PERMENANTLY remove Donation Record "_$P(Y,U,2),ABSVXA(1)="ARE YOU SURE",ABSVXB="",%=2 D ^ABSVYN
35 I %'=1 D NA^ABSVQ QUIT
36 W ! S ABSVXA="Last chance to abort permanent deletion of "_$P(Y,U,2),ABSVXA(1)="ARE YOU SURE",ABSVXB="",%=2 D ^ABSVYN
37 I %'=1 D NA^ABSVQ QUIT
38 S DIK=DIC D ^DIK
39 S X=" RECORD DELETED*" D MSG^ABSVQ
40 QUIT
41VIEW ;View a Single Donation Record
42 N DIC,DA,DIQ,Y,X,S,I,D0,DISYS,DIW,DIWT,DK
43 D ^ABSVSITE Q:'%
44 S DIC("S")="I $P(^(0),U,15)=ABSV(""INST"")"
45 S DIC=503340,DIC(0)="AEMNZQ" D ^DIC Q:'Y
46 S DA=+Y,DIQ=DIC D EN^DIQ
47 QUIT
48XREF(X) ;CROSS REFERENCE FOR .01 FIELD OF 503340
49 N Y,Z
50 S Z=$P(X,"-",1) I Z="" Q Z
51 S Y=$O(^ABS(503338,"C",Z,0))
52 Q Y
Note: See TracBrowser for help on using the repository browser.