source: WorldVistAEHR/trunk/r/ICR_IMMUNOLOGY_CASE_REGISTRY-IMR/IMRPLAB.m@ 1800

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1IMRPLAB ;HCIOFO/FAI-LOOKUP LAB TEST VALUES ;11/13/01 09:39;
2 ;;2.1;IMMUNOLOGY CASE REGISTRY;**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 Q:(DTRC<IMRHNBEG)!(DTRC>IMRHNEND)
23 S DTAA=$E(DTAA,1,18),LDO=$E(LDT,1,9)
24 S ^TMP("V",$J,TYP,LDT,LRES,DNAM)=LNM_U_GRP_U_LDR_U_DTRC_U_DTAA
25 Q
26HEAD W !,?3,">>>>> Please wait. Searching for Viral Load & CD4 Values.....",!!,"Type of Test",?23,"Date/Time",?44,"Name",?70,"Result"
27 W !,"------------",?23,"---------",?44,"-----",?70,"------"
28 Q
29SORT I '$D(^TMP("V",$J)) W !,"**NO DATA FOUND**" Q
30 S TY=""
31 S I="" F S I=$O(^TMP("V",$J,I)) Q:I="" S T="" F J=0:0 S T=$O(^TMP("V",$J,I,T)) Q:T'>0 S G="" F K=0:0 S G=$O(^TMP("V",$J,I,T,G)) Q:G="" S H="" F M=0:0 S H=$O(^TMP("V",$J,I,T,G,H)) Q:H="" D SCR
32 Q
33SCR S RC=^TMP("V",$J,I,T,G,H),LN=$P(RC,U,1),IMDATE=$P(RC,U,5)
34 W:TY'=I !
35 W !,$E(I,1,14),?17,IMDATE,?41,$E(LN,1,23),?61,$E($J(G,15),1,20)
36 S TY=I
37 Q
38KILL ; kill variables
39 K ^TMP("V",$J),CDAR,CDP,HVR,IMDATE,IMRCD4,IMRCD4D,IMRCD4E,IMRCD4X,IMRCDX,IMRCDXD,IMREDIT,IMRESULT,IMRLOOP,IMRPN,X,Y
40 K HIVNM,IMRLNODE,IMRLTEST,IMRP103,IMRSTN,IMRTSTI,IMRTSTII,IMRVLIEN,IMRXCAT,LCDD,LLOC,MDT,PLOW,RC
41 Q
Note: See TracBrowser for help on using the repository browser.