source: WorldVistAEHR/trunk/r/GEN_MED_REC_IO-GMRY/GMRYED3.m@ 701

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

initial load of WorldVistAEHR

File size: 3.1 KB
Line 
1GMRYED3 ;HIRMFO/YH-START IV AND IV MAINTENANCE ENTRY POINT ;9/10/92
2 ;;4.0;Intake/Output;;Apr 25, 1997
3EN1 ;SELECTE IV I/O AND IV MAINTENANCE
4 S (GMRVIDT,GDR,GMROUT)=0,GSITE="" D MASPT^GMRYRP5
5LIST W ! S (GMROUT,GNN)=0,DA=DFN D LISTOP^GMRYED4
6 W !!,"Select from 1 to ",GNN," (enter 1,3-5 etc.) or <RET> to exit: " R GNI:DTIME S:'$T!(GNI["^")!(GNI="") GMROUT=1 G:GMROUT Q
7 I (GNI["?") W ! D LISTQUES^GMRYED4 W !!,"Enter <RET> to continue or ^ to exit " R X:DTIME S:'$T!(X["^")!(X="") GMROUT=1 G:GMROUT Q
8 D VALIDAT^GMRYED1 I '$D(GTYP)!GMROUT(1) W $C(7)," ??" G LIST
9 S GGNN=0 F S GGNN=$O(GTYP(GGNN)) Q:GGNN'>0 I $D(GNN(GGNN)) S GOPT=$P(GNN(GGNN),"^",2) D @GOPT I GMROUT S GMROUT=0 Q
10Q K GPORT,X,Y,DD,DR,DIE,DIC,DLAYGO,%,GMRZZZ,GSAVE,GLINE,GMRX,GSAVE,GDCREAS,GIV,GMRDC,GMRVN,GIVDT,GREC,GSITE,GMRDA,GIN,GLEFT,GGDA,GMRY,GDCIV,GDCDT,DA,GDR,GDCIV,GADD,GGNN,GNN,GNI,GNUR,GOPT,GMRW,GTYP,GCT,GDATA,GMRXX,GMRZ,GNOW,GST G:GMROUT=0 LIST
11 D Q^GMRYED2 K GFLAG,GHLOC,GMRVTYP,GMRYY,GCATH Q
12 ;
13STARTIV ;
14 S GMROUT=0 W @IOF,!!,"*** START IV ***",! S GDCIV=0 D EN3^GMRYED1
15 K GFLAG Q
16 ;
17DCIV ;REMOVE IV FROM IV SITE
18 D DCIV^GMRYDCIV Q
19 ;
20MAINTN ;CARE/MAINTENANCE/FLUSH OPTION ENTRY POINT
21 S GMROUT=0,GDCIV=4 W @IOF,!!,"*** CARE/MAINTENANCE/FLUSH ***",! D SELSITE^GMRYMNT W:GMRXY=0 !!,"There are no sites with IV(s) running or DC'd within 24 hours.",! D:GMRXY>0 EN1^GMRYMNT K GSTDC,GST,GCT,GX,GMRXY Q
22 ;
23HANG ;D/C CURRENT SOLUTION/ADD THE SAME SOLUTION
24 S GMROUT=0,DA=DFN,GDCIV=5,GMRDC=0 W @IOF,!!,"*** REPLACE SAME SOLUTION ***",! D LISTIV^GMRYUT0,SEL^GMRYED4 Q:X="" I GMROUT D Q4^GMRYED6 Q
25 S GDR=0 I $G(GCATH)'="" S GCATH(2)=$S($D(^GMRD(126.74,"B",GCATH)):$O(^GMRD(126.74,"B",GCATH,0)),1:"")
26 D HANG^GMRYED4 D Q4^GMRYED6 Q
27 ;
28ADDONLY ;ADD ANOTHER SOLUTION (MULTIPLE SOLUTIONS FOR A LINE) WITHOUT DC CURRENT
29 S GDCIV=6,DA=DFN,(GMROUT,GMRDC)=0 W @IOF,!!,"*** ADD ADDITIONAL SOLUTION(S) ***",!! D SELSITE^GMRYMNT,SEL1^GMRYMNT Q:GMROUT!(GMRXY=0)!(X="") D DT^GMRYUT3 Q:GMROUT!(GX'>0)
30 ;ONLY ONE INFUSION SITE
31 I GMRXY=1 W !,GSITE(GSITE) D SITEIV
32 S GMROUT(1)=0,GMROUT(1)=$$ADM^GMRYUT12(.GMROUT,DFN,GX) Q:GMROUT
33 S GMRLINE=0
34SELECTP G:GMROUT QADD I GMRLINE>0,'$D(GMRPORT) G QADD
35 ;OBTAIN PORT/LUMEN
36 K GHOLD S GCATH=GSITE(GSITE),GCATH(1)="",GCATH(2)=$O(^GMRD(126.74,"B",GCATH,0)) S GHOLD=GCATH(2),(GHOLD(1),GHOLD(2),GHOLD(3))="" D FINDPORT^GMRYSTCA(.GHOLD) S GCATH(1)=GHOLD(3) I GMROUT K GX,GHOLD G QADD
37 K GHOLD S GMRLINE=0 D SOLTYPE^GMRYUT7 I 'GMROUT S GMRDEL="",GDR=3,GADD="Y" D ADDIV^GMRYED2 G SELECTP
38QADD D Q4^GMRYED6 K GST,GCT,GSDC,GMRLINE Q
39 Q
40 ;
41ADDSOL ;ADD IV SOLUTION
42 W @IOF,!!,"*** SOLUTION: REPLACE/DC/CONVERT/FINISH SOLUTION ***",! S GDCIV=0,GDCREAS=0
43 D ADDSOL1^GMRYED6 K GST,GCT,GDCDT,GDCREAS,%
44 Q
45TITER ;ADJUST INFUSION RATE FOR A SELECTED SOLUTION
46 D INFUSE^GMRYINFS Q
47 ;
48FLUSH ;FLUSH OPTION ENTRY POINT
49 D FLUSH^GMRYFLSH Q
50 ;
51RESTART ;RESTAT AN IV
52 W @IOF,!!,"*** RESTART DC'd IV ***" S (GMROUT,GDCIV)=0 D RESTART^GMRYUT10
53 Q
54SITEIV ;
55 S GDA="" F S GDA=$O(GST(GSITE,GDA)) Q:GDA="" W:GDA'="BLANK" !,?2,GDA S GPORT=GDA,GDA(1)=0 F S GDA(1)=$O(GST(GSITE,GDA,GDA(1))) Q:GDA(1)'>0 S GDATA=GST(GSITE,GDA,GDA(1),0) D WRITE^GMRYMNT
56 Q
Note: See TracBrowser for help on using the repository browser.