source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LAMSA1.m@ 975

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1LAMSA1 ;SLC/DLG - MICROSCAN PROCESS MIC/THERAPY RECORD ;3/7/91 09:47 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3M ;Process the M record (LRM = 1 only 1 card type)
4 S U="^",S=$S(LASPEC="Y":Y(9),1:Y(8)),X=$O(^LAB(62.4,TSK,7,LRM,2,"C",LADNA,0)) Q:X'>0 S LMDR=^LAB(62.4,TSK,7,LRM,2,X,0),LADN=$P(LMDR,U,2),STYLE=$P(^LAB(62.4,TSK,9),U,7)
5 S S2=$P(^LAB(61.2,ORG(LAISO),0),U,3) G:S2="" A1 S S2=$S(S2="N":"GRAM NEG",S2="P":"GRAM POS",1:"")
6 G:STYLE="F" A1 G AS4:LRSP="",AS:STYLE="I"
7A1 I $D(^LAB(62.06,"AI",LADN,LAMIC,"ANY","ANY"))#2 S S=^("ANY") G AS
8 I $D(^LAB(62.06,"AI",LADN,LAMIC,"ANY",LRSP))#2 S S=^(LRSP) G AS
9 I $D(^LAB(62.06,"AI",LADN,LAMIC,ORG(LAISO),"ANY"))#2 S S=^("ANY") G AS
10 I $D(^LAB(62.06,"AI",LADN,LAMIC,ORG(LAISO),LRSP))#2 S S=^(LRSP) G AS
11 G:S2="" A2
12 I $D(^LAB(62.06,"AI",LADN,LAMIC,S2,LRSP))#2 S S=^(LRSP) G AS
13 I $D(^LAB(62.06,"AI",LADN,LAMIC,S2,"ANY"))#2 S S=^("ANY") G AS
14A2 I $D(^LAB(62.06,"AI",LADN,LAMIC))#2 S S=^(LAMIC)
15AS I $D(^LAB(62.06,"AS",LADN,"ANY","ANY"))#2 S S=S_"^"_^("ANY") G AS1
16 I $D(^LAB(62.06,"AS",LADN,"ANY",LRSP))#2 S S=S_"^"_^(LRSP) G AS1
17AS4 I $D(^LAB(62.06,"AS",LADN,ORG(LAISO),"ANY"))#2 S S=S_"^"_^("ANY") G AS1
18 G:LRSP="" AS2 G:S2="" AS2
19 I $D(^LAB(62.06,"AS",LADN,ORG(LAISO),LRSP))#2 S S=S_"^"_^(LRSP) G AS1
20 I $D(^LAB(62.06,"AS",LADN,S2,"ANY"))#2 S S=S_"^"_^("ANY") G AS1
21AS3 I $D(^LAB(62.06,"AS",LADN,S2,LRSP))#2 S S=S_"^"_^(LRSP) G AS1
22AS2 I $D(^LAB(62.06,"AS",LADN))#2 S S=S_"^"_^(LADN)
23AS1 I $P(S,U,1)]"" S V=LAMIC_"^"_S X:$P(LMDR,U,3)]"" $P(LMDR,U,3) S ORG(LAISO,LADN)=V
24 K S2,S,K,STYLE
25DGT ;Add the dosage guide text to Comment
26 S X="For drug: "_Y(4)_" " F I=12,16,20,24 I Y(I)]"" S COMMO=COMMO+1,COMM(LAISO,1,COMMO)=X_Y(I)
27 Q
Note: See TracBrowser for help on using the repository browser.