source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRMITSPS.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1LRMITSPS ;SLC/STAFF - MICRO TREND PROCESS SETUP ;10/12/92 20:07
2 ;;5.2;LAB SERVICE;**257**;Sep 27, 1994
3 ; from LRMITSPO
4 ;
5 S LRMERGEV=$S(LRMERGE="S":LRSPECN,LRMERGE="C":LRCOLN,1:0)
6 ; setup data for each report type
7 ;MULTIDIVISIONAL PATCH LR*5.2*257 02/01
8 F LRTYPE="O;LRORGN;LRORGNM","S;LRSPECN;LRSPECNM","L;LRLOCN;LRLOCNM","D;LRDOCN;LRDOCNM","P;LRPATN;LRPATNM","C;LRCOLN;LRCOLNM","DIV;LRDIV;LRDIVNM" I $D(LRM($P(LRTYPE,";"))) D
9 .S LRRTYPE=$P(LRTYPE,";"),LRGPN=@$P(LRTYPE,";",2),LRGPNM=@$P(LRTYPE,";",3)
10 .; count patients for report type
11 .I $D(LRM(LRRTYPE,"A")) S ^TMP($J,"PAT",LRRTYPE,LRPATN)=""
12 .I $D(LRM(LRRTYPE,"S",LRGPN)) S ^TMP($J,"PAT",LRRTYPE,LRPATN)=""
13 .; setup isolate data
14 .S LRN1=$G(^TMP($J,LRRTYPE,LRGPNM,LRGPN,LRORGNM,LRORGN))
15 .I 'LRN1 D
16 ..S (LRN1,LRSEQN)=LRSEQN+1
17 ..S ^TMP($J,LRRTYPE,LRGPNM,LRGPN,LRORGNM,LRORGN)=LRN1
18 .S LRN2=$G(^TMP($J,LRN1,"P",LRPATNM,LRPATN,LRSPECNM,LRSPECN))
19 .I 'LRN2 D
20 ..S (LRN2,LRSEQN)=LRSEQN+1
21 ..S ^TMP($J,LRN1,"P",LRPATNM,LRPATN,LRSPECNM,LRSPECN)=LRN2
22 .S (LRN3,LRSEQN)=LRSEQN+1
23 .S ^(LRGPN)=$G(^TMP($J,LRRTYPE,LRGPNM,LRGPN))+1
24 .S ^TMP($J,LRN2,LRCDATE,LRSUBN)=LRN3_U_LRACC_U_LRPLOS_U_LRCOLN
25 .S ^TMP($J,"M",LRN1,LRPATN_";"_LRORGN_";"_LRMERGEV,-LRN3)=LRN2_U_LRCDATE_U_LRSUBN
26 .; setup bacteria antibiotic data
27 .S LRDN=0 F S LRDN=$O(LRANTIM(LRDN)) Q:LRDN<2 D
28 ..S LRANTINM=$P($G(^TMP($J,"A",LRDN)),U,2) Q:'$L(LRANTINM)
29 ..S ^TMP($J,LRN3,"A",LRANTINM)=LRANTIM(LRDN)
30 .; setup mycobatcteria antibiotic data
31 .S LRDN=0 F S LRDN=$O(LRTB(LRDN)) Q:LRDN<2 D
32 ..S LRANTINM=$P($G(^TMP($J,"T",LRDN)),U) Q:'$L(LRANTINM)
33 ..S ^TMP($J,LRN3,"T",LRANTINM)=LRTB(LRDN)
34 Q
Note: See TracBrowser for help on using the repository browser.