source: WorldVistAEHR/trunk/r/GEN_MED_REC_IO-GMRY/GMRYED4.m@ 1556

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

initial load of WorldVistAEHR

File size: 3.8 KB
Line 
1GMRYED4 ;HIRMFO/YH - INTRAVENOUS INFUSION PROTOCOL ;10/16/96
2 ;;4.0;Intake/Output;**6**;Apr 25, 1997
3HANG ;DC CURRENT SOLUTION/ADD THE SAME SOLUTION - CONTINUED
4 D DC^GMRYED6 Q:GMROUT!($G(GMRZ(1))="") S GDCDT=$P(^GMR(126,DA(1),"IV",DA,0),"^",9),GMRVTYP=$P(^(0),"^",4)
5 S GMRDEL="",GX=GDCDT I '$D(^GMR(126,DA(1),"IV",DA,"IN",0)) S GLABEL="",GHLOC=GMRHLOC D DC^GMRYUT0 G ADD
6 I '$D(^GMR(126,DA(1),"IV",DA,"IN","C")) S GLABEL="",GHLOC=GMRHLOC D DC^GMRYUT0 G ADD
7 S GDT=$O(^GMR(126,DA(1),"IV",DA,"IN","C",0)) I GDT'>0 S GLABEL="",GHLOC=GMRHLOC D DC^GMRYUT0 G ADD
8 S GGDA=$O(^GMR(126,DA(1),"IV",DA,"IN","C",GDT,0)) I GGDA>0 W !,"Last reading for AMOUNT LEFT is "_$P(^GMR(126,DA(1),"IV",DA,"IN",GGDA,0),"^",2)_" mls"
9 S GLABEL="",GHLOC=GMRHLOC
10 I ($P(^GMR(126,DA(1),"IV",DA,"IN",GGDA,0),"^",2)>0) D
11 .S GHLOC=GMRHLOC,GLABEL="" D DC^GMRYUT0 S GGDA=+$P(^GMR(126,DA(1),"IV",DA,"IN",0),"^",3)
12 . ;; GMRY*4*6 - RJS TEST FOR GMROUT
13 .Q:GMROUT
14 .D IVINTK^GMRYUT8 W !,"Total solution absorbed for this bottle: "_$S($P(^GMR(126,DA(1),"IV",DA,"IN",GGDA,0),"^",2)["*":"UNKNOWN",1:($P(GDATA,"^",5)-GTOTAL)_" mls"),!
15ADD I GMROUT S $P(^GMR(126,DFN,"IV",DA(1),0),"^",9)="",$P(^(0),"^",10)="" W !,"DC canceled!!!",! Q
16 D ^GMRYSTCA Q:GMROUT
17 I GMRVTYP["L" S (GMRZ(2),GMRZ(3))="*"
18 W !!,"Adding "_GMRZ_" ("_GMRZ(1)_") "_$S(+GMRZ(2)>0:GMRZ(2)_" mls ",1:""),! S:GMRZ(3)'>0 GMRZ(3)=""
19RATE W !,"Infusion rate(ml/hr)"_$S(GMRZ(3)'="":" "_GMRZ(3)_" //",1:": ") S X="" R X:DTIME Q:'$T!(X["^") I X'=""&(X'?1.3N) S X="" D HELP G RATE
20 S:X="" X=GMRZ(3) S:X=""!(X=0) X="" I X'=""&((X<0)!(X>999)) D HELP G RATE
21RATE1 W !,"New infusion rate is "_$S(X>0:X,1:"UNKNOWN") ;S %=1 D YN^DICN W:%=0 !!,"If the infusion rate is not correct then enter N(o).",! G:%=0 RATE1 Q:%<0 G:%'=1 RATE S GMRZ(3)=X
22QUICK K DD S GSAVE=GMRVTYP,(X,GX)=GDCDT,DLAYGO=126.03,DA(1)=DFN,DIC="^GMR(126,"_DA(1)_",""IV"",",DIC(0)="ML" D WAIT^GMRYUT0 Q:GMROUT D FILE^DICN L -^GMR(126,DFN) K DIC,DLAYGO,DD S DA=+Y,GMRVTYP=GSAVE Q:Y'>0
23 S DIE="^GMR(126,"_DA(1)_",""IV"",",DR="2///^S X=GMRZ;3///^S X=GMRZ(1);4//^S X=GMRZ(2);11///^S X=GMRZ(3);6///^S X=""`""_DUZ;7///^S X=""`""_GMRHLOC;1///^S X=GSITE;17///^S X=GCATH(1)"
24 D WAIT^GMRYUT0 I 'GMROUT D ^DIE L -^GMR(126,DFN)
25 K DIE,DR Q
26 ;
27SELSITE ;SELECT IV SITE TO EDIT
28 S GSITE="",GMRX=0 F S GSITE=$O(^GMR(126,DFN,"IV","SITE",GSITE)) Q:GSITE="" S GMRY=0,GDT=0 F S GDT=$O(^GMR(126,DFN,"IV","SITE",GSITE,GDT)) Q:GDT'>0!(GMRY>0) S GDA=$O(^(GDT,0)) D CHCKDC
29 Q
30SEL S GSITE="" I GN=0 S GMROUT=1 K GN,GMRDATA Q
31 D SEL^GMRYUT13 Q
32CHCKDC I $P(^GMR(126,DFN,"IV",GDA,0),"^",9)="" S GMRX=GMRX+1,GMRY=1,GMRX(GMRX)=GSITE_"^"_GDA Q
33 Q
34LISTQUES ;
35 W !,"IV is defined as IV line/port/lock",! S GNN=0 F I=1:1 S X=$T(QUES+I) Q:X="" S GMRW=$P(X,";;",2) W !,$P(GMRW,"^"),!,?5,$P(GMRW,"^",3)
36 Q
37HELP W !!,"Enter a number between 0 and 999 at which the infusion takes place",!,"0 means that the rate is UNKNOWN",! Q
38LISTOP ;
39 F I=1:1:9 S X=$T(QUES+I) Q:X="" S GMRW=$P(X,";;",2),GNN($E(GMRW))=$E(GMRW,5,99),GNN=+GMRW W !,$P(GMRW,"^")
40QUES ;
41 ;;1. Start IV^STARTIV^Start a new IV line or heparin/saline lock/port.
42 ;;2. Solution: Replace/DC/Convert/Finish Solution^ADDSOL^DC current solution then replace a new solution to the selected IV line or convert the IV according to the user's choice.
43 ;;3. Replace Same Solution^HANG^Replace the same solution to a selected IV.
44 ;;4. DC IV/Lock/Port and Site^DCIV^Remove IV/lock/port from a selected IV site.
45 ;;5. Care/Maintenance/Flush^MAINTN^Check site condition, dressing change, tube change and flush.
46 ;;6. Add Additional Solution(s)^ADDONLY^Add additional solution(s) without discontinuing an existing one.
47 ;;7. Restart DC'd IV^RESTART^Restart an IV which was DC'd due to infiltration or other reasons.
48 ;;8. Adjust Infusion Rate^TITER^Adjust infusion rate for a selected IV.
49 ;;9. Flush^FLUSH^Flush all IV line(s) for a selected infusion site.
Note: See TracBrowser for help on using the repository browser.