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

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

initial load of FOIAVistA 6/30/08 version

File size: 798 bytes
Line 
1DGPTFEE ;ALB/MRY - PTF VistA/FPPS (create/delete) DRIVER ; 2/11/04 1:12pm
2 ;;5.3;Registration;**605**;Aug 13, 1993
3 ;
4 Q
5 ;
6CREATE(DFN,DGDTTM,DGFLAG) ; create Fee PTF
7 ;Input
8 ; DFN := Patient ien
9 ; DGDTTM := Date.Time
10 ; DGFLAG := Fee patient flag (value is 1)
11 ;
12 ;Output
13 ; Y := returns newly created PTF ien (successful)
14 ; or, -1 (unsuccessful, patient ien not defined)
15 ;
16 N Y
17 I DGFLAG'=1 Q 0
18 S Y=DGDTTM_"^"_DGFLAG
19 D CREATE^DGPTFCR
20 Q Y
21 ;
22DELETE(DFN,DGDTTM) ; Delete Fee PTF entry
23 ;Input
24 ; DFN := Patient ien
25 ; DGDTTM := Date.Time
26 ;
27 ;Output
28 ; 1 := delete successful, -1 := unsuccessful
29 ;
30 N DA,DIK
31 S DA=$O(^DGPT("AFEE",DFN,DGDTTM,0))
32 I $S('$G(DA):1,$D(^DGP(45.84,DA)):1,$D(^DGP(45.83,"C",DA)):1,1:0) G ERR
33 S DIK="^DGPT(" D ^DIK
34 Q 1
35ERR Q -1
Note: See TracBrowser for help on using the repository browser.