source: FOIAVistA/trunk/r/HEALTH_SUMMARY-GMTS/GMTSLROB.m@ 1689

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

initial load of FOIAVistA 6/30/08 version

File size: 802 bytes
Line 
1GMTSLROB ; SLC/JER - Brief Lab Order ; 01/06/2003
2 ;;2.7;Health Summary;**28,58**;Oct 20, 1995
3MAIN ; Driver
4 N GMW,GMX,ICD,MAX,OC,SN
5 I $D(GMTSNDM),(GMTSNDM>0) S MAX=GMTSNDM
6 E S MAX=999
7 D ^GMTSLROE
8 I '$D(^TMP("LRO",$J)) Q
9 D WRTHDR
10 S (ICD,OC)=0 F S ICD=$O(^TMP("LRO",$J,ICD)) Q:'ICD!(OC'<MAX) S SN=0 F S SN=$O(^TMP("LRO",$J,ICD,SN)) Q:'SN!(OC'<MAX) D GET
11 K ^TMP("LRO",$J)
12 Q
13GET ; Get Data
14 S GMX=^TMP("LRO",$J,ICD,SN),OC=OC+1 I ICD>GMTS1,(ICD'>GMTS2) D WRT
15 Q
16WRTHDR ; Prints Header
17 D CKP^GMTSUP Q:$D(GMTSQIT) W "Collection DT",?18,"Test Name",?39,"Specimen",?51,"Urgency",?68,"Status",!
18 W:'$D(GMTSOBJ) !
19 Q
20WRT ; Writes Component
21 D CKP^GMTSUP Q:$D(GMTSQIT) D:GMTSNPG WRTHDR W $P(GMX,U),?18,$P($P(GMX,U,2),";",2),?39,$E($P($P(GMX,U,3),";",2),1,10),?51,$P(GMX,U,4),?68,$P(GMX,U,5),!
22 Q
Note: See TracBrowser for help on using the repository browser.