source: FOIAVistA/trunk/r/VBECS-VBEC/VBECA3B.m@ 761

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1VBECA3B ;DALOI/RLM-API interfaces for CPRS ;9/20/00 12:44
2 ;;0.5;VBECS;**294**;Sep 6, 2000
3 ; This routine retrieves data maintained by a regulated medical
4 ; device. The routine must not be modified by anyone other than the
5 ; device manufacturer.
6 Q
7CPRS ;
8 K VBECBBD D CR,SPC,TRX
9 K VBECA,VBECB,VBECI
10 Q
11CR ;Component Request
12 K ^TMP("BBD",$J,"COMPONENT REQUEST")
13 S VBECA="" F S VBECA=$O(^TMP("VBDATA",$J,"COMPONENT REQUEST",VBECA)) Q:VBECA="" D
14 . S ^TMP("BBD",$J,"COMPONENT REQUEST",VBECA)=""
15 . F VBECI=.01,.04,.03,.05,.09,.08 S ^TMP("BBD",$J,"COMPONENT REQUEST",VBECA)=^TMP("BBD",$J,"COMPONENT REQUEST",VBECA)_$G(^TMP("VBDATA",$J,"COMPONENT REQUEST",VBECA,VBECI))_"^"
16 K VBECA,VBECB,VBECI
17 Q
18SPC ;Specimen
19 K ^TMP("BBD",$J,"SPECIMEN")
20 S VBECA="" F S VBECA=$O(^TMP("VBDATA",$J,"SPECIMEN",VBECA)) Q:VBECA="" D
21 . Q:$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,.03"))=""
22 . S ^TMP("BBD",$J,"SPECIMEN",VBECA)=""
23 . F VBECI=2.91,10.3,11.3 I $G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,"_VBECI))]"" S ^TMP("BBD",$J,"SPECIMEN",VBECA,VBECI)=$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,"_VBECI))
24 . F VBECI="63.012,.01","63.46,.01","63.46,.02","63.48,.01","63.199,.01" S VBECB=0 D
25 . . F S VBECB=$O(^TMP("VBDATA",$J,"SPECIMEN",VBECA,VBECI,VBECB)) Q:VBECB="" S ^TMP("BBD",$J,"SPECIMEN",VBECA,VBECI,VBECB)=$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,VBECI,VBECB))
26 . F VBECI=.03,.01,10,2.9,2.1,2.4,2.6,2.9,11,6 D
27 . . S VBDTA=$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,"_VBECI))
28 . . I VBECI=10,VBDTA="NOT DONE" S VBDTA="ND"
29 . . I VBECI=11,VBDTA="NOT DONE" S VBDTA="ND"
30 . . I (VBECI=2.1)!(VBECI=2.4)!(VBECI=2.6) S VBDTA=$S(VBDTA="N":"Neg",1:VBDTA)
31 . . I (VBECI=2.9)!(VBECI=6)!(VBECI=11) S VBDTA=$S(VBDTA?1"N".E:"Neg",VBDTA?1"P".E:"Pos",1:VBDTA)
32 . . S ^TMP("BBD",$J,"SPECIMEN",VBECA)=^TMP("BBD",$J,"SPECIMEN",VBECA)_VBDTA_"^"
33 . . ;S ^TMP("BBD",$J,"SPECIMEN",VBECA)=^TMP("BBD",$J,"SPECIMEN",VBECA)_$G(^TMP("VBDATA",$J,"SPECIMEN",VBECA,"63.01,"_VBECI))_"^"
34 K VBECA,VBECB,VBECI
35 Q
36TRX ;Units assigned/crossmatched
37 K ^TMP("BBD",$J,"CROSSMATCH")
38 S VBECA="" F S VBECA=$O(^TMP("VBDATA",$J,"CROSSMATCH",VBECA)) Q:VBECA="" F VBECI=.01,.04,.07,.08,.06,.16,3 S ^TMP("BBD",$J,"CROSSMATCH",VBECA)=$G(^TMP("BBD",$J,"CROSSMATCH",VBECA))_$G(^TMP("VBDATA",$J,"CROSSMATCH",VBECA,VBECI))_"^"
39 K VBECA,VBECB,VBECI
40 Q
41ZEOR ;VBECA3B
Note: See TracBrowser for help on using the repository browser.