source: FOIAVistA/trunk/r/HEALTH_DATA_AND_INFORMATICS-HDI/HDISVF06.m@ 757

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1HDISVF06 ;ALB/RMO - 7115.5 File Utilities/API Cont.; 1/11/05@7:04:00
2 ;;1.0;HEALTH DATA & INFORMATICS;;Feb 22, 2005
3 ;
4 ;---- Begin HDIS Status file (#7115.5) API(s) ----
5 ;
6GETIEN(HDISCODE,HDISTYPE,HDISSIEN) ;Get IEN for the Status by Status Type and Status Code
7 ; Input -- HDISCODE Status Code
8 ; HDISTYPE Status Type (Optional- Default 1=Client)
9 ; Output -- 1=Successful and 0=Failure
10 ; If Successful:
11 ; HDISSIEN HDIS Status file IEN
12 ;Initialize output
13 S HDISSIEN=""
14 ;Check for missing variable, exit if not defined
15 I $G(HDISCODE)="" G GETIENQ
16 ;Set Status Type to default of 1=Client, if needed
17 S HDISTYPE=$S('$D(HDISTYPE):1,1:HDISTYPE)
18 ;Check for entry by Status Type and Status Code
19 S HDISSIEN=$O(^HDIS(7115.5,"AC",HDISTYPE,HDISCODE,0))
20GETIENQ Q +$S($G(HDISSIEN)>0:1,1:0)
21 ;
22GETCODE(HDISSIEN,HDISCODE) ;Get Status Code for the Status by IEN
23 ; Input -- HDISSIEN HDIS Status file IEN
24 ; Output -- 1=Successful and 0=Failure
25 ; If Successful:
26 ; HDISCODE Status Code
27 ;Initialize output
28 S HDISCODE=""
29 ;Check for missing variable, exit if not defined
30 I $G(HDISSIEN)'>0 G GETCODEQ
31 ;Check for Status Code by IEN
32 I $D(^HDIS(7115.5,HDISSIEN,0)) S HDISCODE=$P(^(0),"^",2)
33GETCODEQ Q +$S($G(HDISCODE)'="":1,1:0)
34 ;
35 ;---- End HDIS Status file (#7115.5) API(s) ----
Note: See TracBrowser for help on using the repository browser.