source: FOIAVistA/trunk/r/HEALTH_SUMMARY-GMTS/GMTSLROS.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 1.0 KB
Line 
1GMTSLROS ; SLC/JER,KER - Lab Order Status Summary ; 09/21/2001
2 ;;2.7;Health Summary;**28,47**;Oct 20, 1995
3 ;
4MAIN ; Lab Order Status
5 N GMW,GMX,ICD,MAX,OC,SN
6 S MAX=$S(+($G(GMTSNDM))>0:+($G(GMTSNDM)),1:999)
7 D ^GMTSLROE I '$D(^TMP("LRO",$J)) Q
8 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
9 K ^TMP("LRO",$J)
10 Q
11GET ; Get Data from ^TMP("LRO",$J
12 S GMX=^TMP("LRO",$J,ICD,SN),OC=OC+1
13 I ICD>GMTS1,(ICD'>GMTS2) D CKP^GMTSUP Q:$D(GMTSQIT) W:OC>1&'(GMTSNPG) ! D WRT
14 Q
15WRT ; Write Data
16 N GMI,TSET,TEST S TSET="",$P(GMX,U,3)=$E($P(GMX,U,3),1,10)
17 F GMI=1:1:3 S $P(TEST,"-",GMI)=$S(GMI=3:$P(GMX,U,GMI+1),1:$P($P(GMX,U,GMI+1),";",2))
18 F Q:$L(TEST)<23 S TSET=$P(TEST,"-",$L(TEST,"-"))_" "_TSET,TEST=$P(TEST,"-",1,$L(TEST,"-")-1)
19 D CKP^GMTSUP Q:$D(GMTSQIT) W $P(GMX,U),?18,$E(TEST,1,20),?39,"Prov: ",$E($P($P(GMX,U,6),";",2),1,10),?56,"Ord'd: ",$P(GMX,U,7),!
20 D CKP^GMTSUP Q:$D(GMTSQIT) G:GMTSNPG WRT W ?18,$E(TSET,1,20),?39,"# ",$E($P(GMX,U,8),1,15),?56,"Avail: ",$P(GMX,U,9),!
21 Q
Note: See TracBrowser for help on using the repository browser.