source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SCCVDBU.m@ 1235

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1SCCVDBU ;ALB/RMO,TMP - Database Update Utilities; [ 03/23/95 11:08 AM ]
2 ;;5.3;Scheduling;**211**;Aug 13, 1993
3 ;
4UPD(SCFILE,SCIENS,SCDATA,SCERR) ;File data into an existing entry
5 ; Input -- SCFILE File or sub-file number
6 ; SCIENS Internal entry number(s)
7 ; SCDATA Data array to file
8 ; Output -- SCERR DEFINED=error
9 N SCFDA,SCFIELD
10 S SCFIELD=0
11 F S SCFIELD=$O(SCDATA(SCFIELD)) Q:'SCFIELD D
12 . S SCFDA(SCFILE,SCIENS_",",SCFIELD)=$G(SCDATA(SCFIELD))
13 D FILE^DIE("K","SCFDA","")
14 I $G(DIERR) S SCERR=U_$G(^TMP("DIERR",$J,$P(DIERR,U,2),"TEXT",1))
15 D CLEAN^DILF
16UPDQ Q
17 ;
18ADD(SCFILE,SCIENS,SCDATA,SCERR) ;File data into a new or existing entry
19 ; Input -- SCFILE File or sub-file number
20 ; SCIENS Internal entry number(s)
21 ; SCDATA Data array to file
22 ; Output -- SCERR DEFINED=error
23 N SCFDA,SCFIELD
24 S SCFIELD=0
25 F S SCFIELD=$O(SCDATA(SCFIELD)) Q:'SCFIELD D
26 . S SCFDA(SCFILE,SCIENS_",",SCFIELD)=$G(SCDATA(SCFIELD))
27 D UPDATE^DIE("","SCFDA","","")
28 I $G(DIERR) S SCERR=U_$G(^TMP("DIERR",$J,$P(DIERR,U,2),"TEXT",1))
29 D CLEAN^DILF
30ADDQ Q
31 ;
32WP(SCFILE,SCIENS,SCFIELD,SCDATA) ;File data into a single word processing field
33 ; Input -- SCFILE File or sub-file number
34 ; SCIENS Internal entry number(s)
35 ; SCFIELD Field number
36 ; SCDATA Data array to file
37 ; Output -- ;add- SCERR 0=error and 1=no error
38 D WP^DIE(SCFILE,SCIENS_",",SCFIELD,"AK","SCDATA(""WP"")","")
39 D CLEAN^DILF
40WPQ Q
Note: See TracBrowser for help on using the repository browser.