source: WorldVistAEHR/trunk/r/ICR_IMMUNOLOGY_CASE_REGISTRY-IMR/IMRLTST.m@ 619

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1IMRLTST ;HCIOFO/FAI-LOOKUP LAB TEST VALUES ;11/07/01 09:39;
2 ;;2.1;IMMUNOLOGY CASE REGISTRY;**9,5,16**;Feb 09, 1998
3TYPE ; Entry with IMRFN defined and pointers for local lab test name & NLT
4 ; FIND TYPE OF TEST EX:VIRAL LOAD
5 D HEAD,DATA,SORT
6 D KILL
7 Q
8DATA K IMRCD
9 I $G(IMRTSTLR)="" W !!,?13,"** SORRY NO LABORATORY REFERENCE IN PLACE **" Q
10 S (IMRTSTI,IMRTSTII)="",ILR=IMRTSTLR
11 D ^IMRTDSP
12CHEMS S LDT="" F S LDT=$O(^LR(ILR,"CH",LDT)) Q:LDT="" D LINK
13 Q
14LINK S DNAM="" F S DNAM=$O(IMRVALS(DNAM)),LDR="" Q:DNAM="" D
15 . F S LDR=$O(IMRVALS(DNAM,LDR)) Q:LDR="" S GRP=$P(IMRVALS(DNAM,LDR),U,1),TYP=$P(IMRVALS(DNAM,LDR),U,2),LNM=$P(IMRVALS(DNAM,LDR),U,3) D LVAL
16 Q
17LVAL S LRES=$P($G(^LR(ILR,"CH",LDT,DNAM)),U,1),DTRC=$P($G(^LR(ILR,"CH",LDT,0)),U,1),Y=DTRC D DD^%DT S DTAA=Y D PLBS
18 Q
19PLBS Q:LRES=""
20 Q:(LRES["CANC")!(LRES["canc")
21 Q:(DTRC["CANC")!(DTRC["canc")
22 S DTAA=$E(DTAA,1,18),LDO=$E(LDT,1,9)
23 S ^TMP($J,TYP,LDT,LRES,DNAM)=LNM_U_GRP_U_LDR_U_DTRC_U_DTAA
24 Q
25HEAD W !,?3,">>>>> Please wait. Searching for Viral Load & CD4 Values.....",!!,"Type of Test",?23,"Date/Time",?44,"Name",?70,"Result"
26 W !,"------------",?23,"---------",?44,"-----",?70,"------"
27 Q
28SORT I '$D(^TMP($J)) W !,"**NO DATA FOUND**" Q
29 S TY=""
30 S I="" F S I=$O(^TMP($J,I)) Q:I="" S T="" F J=0:0 S T=$O(^TMP($J,I,T)) Q:T'>0 S G="" F K=0:0 S G=$O(^TMP($J,I,T,G)) Q:G="" S H="" F M=0:0 S H=$O(^TMP($J,I,T,G,H)) Q:H="" D SCR
31 Q
32SCR S RC=^TMP($J,I,T,G,H),LN=$P(RC,U,1),IMDATE=$P(RC,U,5)
33 W:TY'=I !
34 W !,$E(I,1,14),?17,IMDATE,?41,$E(LN,1,23),?61,$E($J(G,15),1,20)
35 S TY=I
36 Q
37KILL ; kill variables
38 K ^TMP($J),CDAR,CDP,HVR,IMDATE,IMRCD4,IMRCD4D,IMRCD4E,IMRCD4X,IMRCDX,IMRCDXD,IMREDIT,IMRESULT,IMRLOOP,IMRPN,X,Y
39 K HIVNM,IMRLNODE,IMRLTEST,IMRP103,IMRSTN,IMRTSTI,IMRTSTII,IMRVLIEN,IMRXCAT,LCDD,LLOC,MDT,PLOW,RC
40 Q
Note: See TracBrowser for help on using the repository browser.