source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRLNC1.m@ 1801

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1LRLNC1 ;DALOI/CA-LOOKUP LOINC CODE ;1-OCT-1998
2 ;;5.2;LAB SERVICE;**215,278**;Sep 27,1994
3 ;Reference to ^DD supported by IA 10154
4 ;=================================================================
5 ; Ask VistA test to Lookup LOINC code in Lab Test file #60
6 W @IOF
7START ;entry point from option LR LOINC LOOKUP
8 D TEST
9 I $G(LREND) G EXIT
10 D SPEC
11 I $G(LREND) D EXIT G START
12ENT S DIC="^LAB(95.3,",DIC(0)="AEQMZ"
13 S DIC("B")=LRTEST_".."_$G(LRSPECL)
14 S DIC("A")="LOINC Name..Specimen: "
15 W !,$$CJ^XLFSTR(" Your initial lookup entry is ",IOM)
16 W !,$$CJ^XLFSTR(DIC("B"),IOM)
17 W !,$$CJ^XLFSTR("e.g. TEST NAME..SPECIMEN",IOM),!
18 D ^DIC
19 I $D(DIRUT) G START
20 I Y=-1 W !!,"NO MATCHES FOUND" G START
21 S LRCODE=+Y
22 D DISPL
23 G START
24EXIT K DA,DIC,DIE,DINUM,DIR,DIRUT,DR,DTOUT,I,LRCODE,LRDATA,LREND,LRLNC,LRLNC0,LRLOINC,LRELEC,LRIEN,LRNLT,LRSPEC,LRSPECL,LRSPECN,LRTIME,LRTEST,LRUNITS,S,Y
25 QUIT
26TEST W !! K DIR,DIRUT
27 S DIR(0)="PO^60:QNEMZ,",DIR("A")="VistA Lab Test to Lookup LOINC "
28 S DIR("?")="Select Lab test you wish to lookup LOINC Code"
29 D ^DIR K DIR
30 I $D(DIRUT)!'Y K DIRUT S LREND=1 Q
31 S LRIEN=+Y,LRTEST=$P(Y,U,2)
32 Q
33SPEC ; Ask Specimen- Lookup in Specimen multiple in Lab Test file #60
34 K DA,DIC,DIE,DR
35 S DA(1)=LRIEN
36 S DIC="^LAB(60,"_LRIEN_",1,"
37 S DIC(0)="AQEMZ"
38 S DIC("A")="Specimen source: "
39 S DIC("P")=$P(^DD(60.01,0),"^",2)
40 D ^DIC
41 I $D(DIRUT)!(Y=-1) K DIC,DA,DIRUT S LREND=1 Q
42 S LRSPEC=$P(Y,U,2),LRSPECN=Y(0,0)
43 ;Check to see if linked to file 64.061. If not, then let enter link.
44 I '$P($G(^LAB(61,LRSPEC,0)),U,9) D Q
45 .W !!,"There is not a LEDI HL7 code for "_LRSPECN,".",!
46 S LRELEC=$P($G(^LAB(61,LRSPEC,0)),U,9)
47 I 'LRELEC G SPEC
48 S LRSPECL=$P(^LAB(64.061,LRELEC,0),U,2)
49 Q
50DISPL ;Show LOINC entry selected in file 95.3
51 D DISPL^LRLNCC
52 Q
Note: See TracBrowser for help on using the repository browser.