source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LR7OGMU.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: 886 bytes
Line 
1LR7OGMU ;SLC/STAFF- Interim report rpc memo utility ;6/6/97 16:15
2 ;;5.2;LAB SERVICE;**187,312**;Sep 27, 1994
3 ;
4NEWOLD(Y,DFN) ; from ORWLRR
5 N LRDFN
6 D DEMO^LR7OGU(DFN,.LRDFN)
7 S Y=$$NEWEST(LRDFN)_U_$$OLDEST(LRDFN)
8 Q
9 ;
10NEWEST(LRDFN) ;
11 N IDT,FIRSTCH,FIRSTMI
12 S (FIRSTCH,FIRSTMI)=""
13 S IDT=0 F S IDT=$O(^LR(LRDFN,"CH",IDT)) Q:IDT<1 I $P($G(^(IDT,0)),U,3) S FIRSTCH=9999999-IDT Q
14 S IDT=0 F S IDT=$O(^LR(LRDFN,"MI",IDT)) Q:IDT<1 S FIRSTMI=9999999-IDT Q
15 I FIRSTCH>FIRSTMI Q FIRSTCH
16 I FIRSTCH'>FIRSTMI Q FIRSTMI
17 Q ""
18 ;
19OLDEST(LRDFN) ;
20 N IDT,FIRSTCH,FIRSTMI
21 S (FIRSTCH,FIRSTMI)=""
22 S IDT="" F S IDT=$O(^LR(LRDFN,"CH",IDT),-1) Q:IDT="" I $P($G(^(IDT,0)),U,3) S FIRSTCH=9999999-IDT Q
23 S IDT="" F S IDT=$O(^LR(LRDFN,"MI",IDT),-1) Q:IDT="" S FIRSTMI=9999999-IDT Q
24 I FIRSTMI="" Q FIRSTCH
25 I FIRSTCH="" Q FIRSTMI
26 I FIRSTCH<FIRSTMI Q FIRSTCH
27 I FIRSTCH'<FIRSTMI Q FIRSTMI
28 Q ""
Note: See TracBrowser for help on using the repository browser.