Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LRLNCLK

LRLNCLK.m

Go to the documentation of this file.
  1. LRLNCLK ;DALOI/RSH/FHS - LOOK UP LOINC CODE AND DISPLAY;31 -AUG-2001
  1. ;;5.2T9;LR;**1018**;Nov 17, 2004
  1. ;;5.2;LAB SERVICE;**232,278**;Sep 27,1994
  1. START ;
  1. D ENTERLNC
  1. I $G(LREND) D EXIT
  1. E G START
  1. Q
  1. ENTERLNC ;Enter LOINC code for lookup
  1. W !! K DIR S LREND=0,DIR(0)="PO^95.3:AQEMZ",DIR("A")="Enter LOINC Code/Name "
  1. S DIR("?")="You can see possible LOINC CODES/Specimen by entering the"
  1. S DIR("?",1)="LOINC Test Name..Specimen example( GLUCOSE..UR )"
  1. S DIR("?",2)=" "
  1. D ^DIR K DIR
  1. I $D(DUOUT)!($D(DTOUT))!(Y=-1) K DTOUT,DUOUT S LREND=1 Q
  1. S LRCODE=+Y
  1. SP D DISPL
  1. Q
  1. DISPL ;Show LOINC entry selected in file 95.3
  1. ;display header-system and class
  1. ;display LOINC code, component, property, time aspect, scale type and method type
  1. S DA=LRCODE
  1. S LRLNC0=^LAB(95.3,DA,0)
  1. F I=2,6,7,8,9,10,11,14,15 S LRLNC0(I)=$P(LRLNC0,U,I)
  1. S LRLNCNAM=$P($G(^LAB(95.3,DA,80)),U)
  1. W @IOF
  1. W !,"LOINC CODE: ",LRCODE_"-"_LRLNC0(15)," ",LRLNCNAM
  1. W !,"SYSTEM: ",$P($G(^LAB(64.061,+LRLNC0(8),0)),U),?40,"CLASS: ",$P($G(^LAB(64.061,+LRLNC0(11),0)),U)
  1. W:LRLNC0(2) !,"COMPONENT: ",$P($G(^LAB(95.31,+LRLNC0(2),0)),U)
  1. W:LRLNC0(6) !,"PROPERTY: ",$P($G(^LAB(64.061,+LRLNC0(6),0)),U)
  1. W:LRLNC0(7) !,"TIME ASPECT: ",$P($G(^LAB(64.061,+LRLNC0(7),0)),U)
  1. W:LRLNC0(9) !,"SCALE TYPE: ",$P($G(^LAB(64.061,+LRLNC0(9),0)),U)
  1. W:LRLNC0(10) !,"METHOD TYPE: ",$P($G(^LAB(64.2,+LRLNC0(10),0)),U)
  1. W:LRLNC0(14) !,"UNITS: ",$P($G(^LAB(64.061,+LRLNC0(14),0)),U)
  1. Q
  1. EXIT K DA,DIR,DIRUT,DTOUT,LRCODE,LREND,LRLNCNAM,LRLNC0,X,Y
  1. Q