source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LAMICRA.m@ 1754

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1LAMICRA ;SLC/DLG - VITEK AUTOINSTRUMENT LOAD OF SPECIAL CHARACTERS. ;7/20/90 09:36 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 W @$S($D(IOF):IOF,1:"#"),?5,"THIS ROUTINE ADDS DRUG CODES TO VITEK AUTOINSTRUMENT ENTRIES THAT"
4 W !,"COULD NOT BE ADDED THRU FILEMAN OR YOU WANT TO CHANGE.",!,?30,"NOTE",!,"THE DRUG MUST ALREADY HAVE BEEN ADDED TO FILE",!
5 W "ALL DRUG ENTRIES FOR A CARD TYPE WILL BE PROMPTED.",!,"IF YOU ENTER AN '^' YOU WILL BE ASKED IF YOU WANT TO EXIT."
6 W !?5,"ANSWER YES AND THE PROGRAM STOPS PROMPTING DRUGS FOR THAT CARD.",!?5,"ANSWER NO AND THE '^' WILL BE ADDED AS THE CODE FOR THAT DRUG.",!?5,"TAKE NOTE THAT A PRINTOUT OF THE DRUG CODES WILL NOT SHOW THE '^' CODE.",!
7START S DIC="^LAB(62.4,",DIC(0)="AEMQZL",DLAYGO=62.4 D ^DIC G:+Y<1 QUIT S LAINST=+Y
8 S DIC=DIC_LAINST_",7," D ^DIC I +Y<1 W "NOT VALID CARD TYPE TRY AGAIN.",! K DLAYGO G START
9 S LACARD=+Y,LACARDC=Y(0,0),LACARDN=$P(Y(0),"^",2)
10 S N=0,%=2 F I=0:0 S N=$O(^LAB(62.4,LAINST,7,LACARD,2,N)) Q:+N<1 D BLNK Q:%<2
11 G START
12BLNK S LACODEO=$P(^LAB(62.4,LAINST,7,LACARD,2,N,0),"^",4),LADRUG=$P(^LAB(62.06,+^(0),0),"^",1)
13 S:LACODEO="" LACODEO=$S($D(^LAB(62.4,LAINST,7,LACARD,2,"C","^")):"^",1:"")
14 W !,"CARD TYPE "_LACARDC_" "_LACARDN_" AND DRUG ",LADRUG," HAS CODE ",LACODEO,"//" R LACODE:DTIME
15 W ! I '$T!(LACODE="") W "OK, NOTHING ADDED OR CHANGED.",! Q
16B2 I LACODE="^" W $C(7),?10,"DO YOU WANT TO EXIT" S %=2 D YN^DICN W ! Q:%=1 Q:%=-1
17 I %=0 W "ENTER YES TO STOP CHECKING DRUGS. NO TO CONTINUE AND ADD '^' AS A VALID CODE.",! G B2
18 I LACODEO]"" K ^LAB(62.4,LAINST,7,LACARD,2,"C",LACODEO) W "OLD CODE ",LACODEO," DELETED FROM CROSS REFERENCE.",!
19 S $P(^LAB(62.4,LAINST,7,LACARD,2,N,0),"^",4)=$S(LACODE="^":"",1:LACODE) W "CODE ",LACODE,$P("^ NOT","^",LACODE="^"+1)," STORED IN GLOBAL NODE.",!
20 S ^LAB(62.4,LAINST,7,LACARD,2,"C",LACODE,N)=""
21 W "CODE ",LACODE," ADDED TO CROSS REFERENCE.",! Q
22QUIT K I,N,LACODE,LACODEO,LAINST,DLAYGO,LACARD,LACARDC,Y,LACARDN,LADRUG,% Q
Note: See TracBrowser for help on using the repository browser.