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

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

initial load of WorldVistAEHR

File size: 2.7 KB
Line 
1DGPFANF ;ALB/KCL - PRF NATIONAL FLAG API'S ; 4/7/04 2:09pm
2 ;;5.3;Registration;**425,554**;Aug 13, 1993
3 ;
4 ;- no direct entry
5 QUIT
6 ;
7GETNF(DGPFIEN,DGPFNF) ;retrieve a single NATIONAL FLAG record
8 ;This function returns a single flag record from the PRF NATIONAL FLAG
9 ;file and returns it in an array format.
10 ;
11 ; Input:
12 ; DGPFIEN - (required) pointer to national flag record in the
13 ; PRF NATIONAL FLAG (#26.15) file
14 ; DGPFNF - (required) result array passed by reference
15 ;
16 ; Output:
17 ; Function Value - returns 1 on success, 0 on failure
18 ; DGPFNF - output array containing national flag record field
19 ; values.
20 ; Subscript Field# Data
21 ; -------------- ------- ---------------------
22 ; "FLAG" .01 internal^external
23 ; "STAT" .02 internal^external
24 ; "TYPE" .03 internal^external
25 ; "REVFREQ" .04 internal^external
26 ; "NOTIDAYS" .05 internal^external
27 ; "REVGRP" .06 internal^external
28 ; "TIUTITLE" .07 internal^external
29 ; "DESC",line#,0 1 character string
30 ; "PRININV",line#,0 2 character string
31 ;
32 N DGIENS ;IEN string for DIQ
33 N DGFLDS ;results array for DIQ
34 N DGERR ;error arrary for DIQ
35 N DGSUB ;pincipal investigator multiple subscript
36 N RESULT ;return function value
37 ;
38 S RESULT=0
39 ;
40 I $G(DGPFIEN)>0,$D(^DGPF(26.15,DGPFIEN)) D
41 . S DGIENS=DGPFIEN_","
42 . D GETS^DIQ(26.15,DGIENS,"**","IEZ","DGFLDS","DGERR")
43 . Q:$D(DGERR)
44 . ;
45 . ;-- build national flag array
46 . S DGPFNF("FLAG")=$G(DGFLDS(26.15,DGIENS,.01,"I"))_U_$G(DGFLDS(26.15,DGIENS,.01,"E"))
47 . S DGPFNF("STAT")=$G(DGFLDS(26.15,DGIENS,.02,"I"))_U_$G(DGFLDS(26.15,DGIENS,.02,"E"))
48 . S DGPFNF("TYPE")=$G(DGFLDS(26.15,DGIENS,.03,"I"))_U_$G(DGFLDS(26.15,DGIENS,.03,"E"))
49 . S DGPFNF("REVFREQ")=$G(DGFLDS(26.15,DGIENS,.04,"I"))_U_$G(DGFLDS(26.15,DGIENS,.04,"E"))
50 . S DGPFNF("NOTIDAYS")=$G(DGFLDS(26.15,DGIENS,.05,"I"))_U_$G(DGFLDS(26.15,DGIENS,.05,"E"))
51 . S DGPFNF("REVGRP")=$G(DGFLDS(26.15,DGIENS,.06,"I"))_U_$G(DGFLDS(26.15,DGIENS,.06,"E"))
52 . S DGPFNF("TIUTITLE")=$G(DGFLDS(26.15,DGIENS,.07,"I"))_U_$G(DGFLDS(26.15,DGIENS,.07,"E"))
53 . ;-- flag description word processing array
54 . M DGPFNF("DESC")=DGFLDS(26.15,DGIENS,1)
55 . K DGPFNF("DESC","E"),DGPFNF("DESC","I")
56 . ;-- principal investigator(s) multiple
57 . S DGSUB="" F S DGSUB=$O(DGFLDS(26.152,DGSUB)) Q:DGSUB="" D
58 . . S DGPFNF("PRININV",+DGSUB,0)=$G(DGFLDS(26.152,DGSUB,.01,"I"))_U_$G(DGFLDS(26.152,DGSUB,.01,"E"))
59 . ;
60 . S RESULT=1
61 ;
62 Q RESULT
Note: See TracBrowser for help on using the repository browser.