source: FOIAVistA/trunk/r/GEN_MED_REC_IO-GMRY/GMRYSTCA.m@ 1140

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1GMRYSTCA ;HIRMFO/YH-IV SITE AND CATHETER SELECTION ;3/1/96
2 ;;4.0;Intake/Output;;Apr 25, 1997
3SITECATH ;ENTER INFUSION SITE/CATH TYPE
4 Q:GSITE'=""&(GCATH'="")&(GCATH(1)'="") N GHOLD
5 I GSITE'="",GDR'=1 S GHOLD=GCATH(2),GHOLD(1)=GCATH,(GHOLD(2),GHOLD(3))="" D:GCATH(1)="" FINDPORT(.GHOLD) Q:GMROUT S GCATH(1)=GHOLD(3) Q
6 E D
7 .N GMRZ D EN1^GMRYUT5 S X="" W ": " R X:DTIME I '$T!(X["^")!($L(X)>3) S:'$T!(X["^") GMROUT=1 S X="" Q
8 .I '(X=""!(X["?")) D EN2^GMRYUT5 S GSITE=X
9 Q:GMROUT I X=""!(X["?") W !!,"Enter the number of the site you want and a L for LEFT/R for RIGHT after",!,"the number. The default is L(eft).",!,"For example, 1L or 1 is LEFT HAND, 1R is RIGHT HAND.",! S X="",GSITE="" G SITECATH
10ENTER S (GHOLD,GHOLD(1),GHOLD(2),GHOLD(3),GCATH(1),GCATH(2))=""
11 I GCATH="" D CATH(.GHOLD) Q:GMROUT S GCATH=GHOLD(1) D FINDPORT(.GHOLD) S GCATH(1)=GHOLD(3),GCATH(2)=GHOLD Q
12 E S GHOLD(1)=GCATH,GHOLD=$O(^GMRD(126.74,"B",GCATH,0)) D FINDPORT(.GHOLD)
13 Q:GMROUT
14YN W !,GHOLD(1)_" "_GHOLD(3) ;S %=1 D YN^DICN W:%=0 !!,"Enter N(o) if the data is not correct.",! I %<1 S GMROUT=1 Q
15 S GCATH(1)=GHOLD(3),GCATH(2)=GHOLD
16 Q
17FINDPORT(JJ) ;
18 N GJ K GMRPORT
19 I JJ>0,$P($G(^GMRD(126.74,+JJ,1,0)),"^",4)>0 D Q:GMROUT
20 . S GJ=0,GJ(1)="" F S GJ(1)=$O(^GMRD(126.74,+JJ,1,"B",GJ(1))) Q:GJ(1)="" S GJ(2)=0 F S GJ(2)=$O(^GMRD(126.74,+JJ,1,"B",GJ(1),GJ(2))) Q:GJ(2)'>0 S GJ=GJ+1,GMRPORT(GJ)=GJ(2)_"^"_GJ(1)
21PORT . S JJ(4)=GJ Q:GJ'>0!($G(GOPT)["FLUSH")!GMROUT W ! F I=1:1:GJ W !,I_" "_$P(GMRPORT(I),"^",2)
22 . W !!,?3,"Select the port number used for medication infusion or ^ to quit: " S JJ(2)=0 R JJ(2):DTIME I '$T!(JJ(2)["^") S GMROUT=1
23 . Q:GMROUT I '$D(GMRPORT(+JJ(2))) W !,"ERROR ENTRY!" G PORT
24 . S JJ(3)=$P(GMRPORT(+JJ(2)),"^",2)
25 .Q
26 Q
27CATH(II) ;
28 N GTXT,GMRY,GMRZ,GMRN
29LISTC K GMRZ W !,"Select from the following IV CATHs",! S (GMRZ,GMRN)=0 F S GMRZ=$O(^GMRD(126.74,GMRZ)) Q:GMRZ'>0 S GMRN=GMRN+1,GMRY(GMRN)=GMRZ_"^"_$P(^(GMRZ,0),"^")_"^"_GMRN_". "
30 S GMRN(1)=(GMRN\2)+(GMRN#2) D LISTS^GMRYUT5 W !,"Select a number between 1 and "_GMRN_": " S X="" R X:DTIME I '$T!(X["^") S GMROUT=1 Q
31 I X=""!(X["?")!'(X>0&(X<(GMRN+1))) W !,"Enter a number between 1 and "_GMRN G LISTC
32 S II=+$P(GMRY(+X),"^"),II(1)=$P(^GMRD(126.74,II,0),"^")
33 Q
Note: See TracBrowser for help on using the repository browser.