source: WorldVistAEHR/trunk/r/CLINICAL_CASE_REGISTRIES-ROR/RORHIVUT.m@ 699

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

initial load of WorldVistAEHR

File size: 1.2 KB
Line 
1RORHIVUT ;HCIOFO/SG - HIV UTILITIES ; 9/14/05 8:15am
2 ;;1.5;CLINICAL CASE REGISTRIES;;Feb 17, 2006
3 ;
4 Q
5 ;
6 ;***** RETURNS THE CATEGORY SUBSCRIPT AND HEADER
7CAT(I) ;
8 ;;ALL^AIDS^HIV
9 ;;All Patients^AIDS OI^HIV+ (no AIDS OI)
10 ;
11 Q $P($P($T(CAT+1),";;",2),U,I)_U_$P($P($T(CAT+2),";;",2),U,I)
12 ;
13 ;***** RETURNS CLINICAL AIDS STATUS OF THE PATIENT
14 ;
15 ; IEN IEN of the registry record
16 ;
17 ; [DATE] Date that the status should be determined on.
18 ;
19 ; If not defined or not greater than 0 then the
20 ; date of Clinical AIDS is not checked.
21 ;
22 ; Return Values:
23 ; 0 No Clinical AIDS
24 ; 1 Clinical AIDS. The second "^"-piece will
25 ; contain the Clinical AIDS date
26 ;
27CLINAIDS(IEN,DATE) ;
28 N X S X=$P($G(^RORDATA(799.4,+IEN,0)),U,2,3)
29 Q:'X 0
30 I $G(DATE)>0 Q:$P(X,U,2)\1>DATE 0
31 Q "1"_U_$P(X,U,2)
32 ;
33 ;***** CHECKS IF THE ICR RECORD EXISTS
34 ;
35 ; IEN IEN of the registry record
36 ;
37 ; Return Values:
38 ; 0 Record does not exist
39 ; 1 The ICR record exists
40 ;
41ICRDEF(IEN) ;
42 Q $G(^RORDATA(799.4,+IEN,0))>0
43 ;
44 ;***** RETURNS NUMBER OF AVAILABLE CATEGORIES
45NCAT() ;
46 Q $L($P($T(CAT+1),";;",2),U)
Note: See TracBrowser for help on using the repository browser.