source: WorldVistAEHR/trunk/r/GEN_MED_REC_IO-GMRY/GMRYFLSH.m@ 1693

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

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1GMRYFLSH ;HIRMFO/YH-FLUSH IV LINES FOR A SELECTED IV SITE ;6/5/96
2 ;;4.0;Intake/Output;;Apr 25, 1997
3FLUSH S (GMROUT,GDCIV)=0 W @IOF,!!,"*** FLUSH ***",!
4 D SELSITE^GMRYMNT,SEL1^GMRYMNT G:GMROUT!(GMRXY=0)!(X="") QUIT
5DT W ! S %DT("A")="Please enter DATE/TIME: ",%DT="AETXRS",%DT("B")="NOW" D ^%DT K %DT G:Y'>0 QUIT S GX=+Y D NOW^%DTC S GNOW=%
6 I GX>GNOW W !,"NO FUTURE DATE ALLOWED",! G DT
7 S GMROUT(1)=0,GMROUT(1)=$$ADM^GMRYUT12(.GMROUT,DFN,GX) Q:GMROUT
8 ;I GMROUT(1) S GMROUT=$$CONTNU^GMRYUT12(GMROUT,"FLUSH PORT/IV LINE") Q:GMROUT
9 D DOFLSH
10QUIT K G,GX,GMRZ,GMRYZ,GN,GMESSG,GFLUSH,GSEL Q
11SETDB ;
12 S GHLOC=GMRHLOC K DD S X=+GX,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 Q:Y'>0!GMROUT
13 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=""`""_GHLOC;1///^S X=GSITE;8///^S X=GX;9///^S X=""`""_DUZ;10///^S X=""FLUSHED"";17///^S X=GCATH(1)"
14 D WAIT^GMRYUT0 D:'GMROUT ^DIE K DIE,DR L:'GMROUT -^GMR(126,DFN)
15 S ^GMR(126,DA(1),"IV",DA,"IN",0)="^126.313IDA^1^1"
16 S ^GMR(126,DA(1),"IV",DA,"IN",1,0)=GX_"^0^^"_DUZ_"^"_GHLOC
17 S ^GMR(126,DA(1),"IV",DA,"IN","B",GX,1)="",^GMR(126,DA(1),"IV",DA,"IN","C",(9999999-GX),1)=""
18 Q
19ASKFLSH ;CALLED BY MAINTENANCE OPTION
20 ;G:GMROUT QUIT2 S %=2 W !,"Do you want to flush IV line" D YN^DICN Q:%'=1
21 D DOFLSH
22QUIT2 K GMRYZ,GN,GMESSG,GFLUSH,GSEL Q
23DOFLSH W ! S GMRVTYP="L",GOPT="" D LOCK^GMRYED5 Q:GMROUT
24 D LIST Q:GMROUT
25 I '$D(GMRPORT) S GCATH(1)="" D SETDB Q
26 S G=0 F S G=$O(GSEL(G)) Q:G'>0!GMROUT S GCATH(1)=$P(GMRPORT(G),"^",2) D SETDB
27 Q
28LIST ;
29 S GOPT="FLUSH",GHOLD=GCATH(2),(GHOLD(1),GHOLD(2),GHOLD(3))=0 D FINDPORT^GMRYSTCA(.GHOLD)
30 Q:'$D(GMRPORT)
31 W !,GSITE,!
32 S GMRN=GHOLD(4) K GHOLD Q:GMRN'>0
33LIST2 F I=1:1:GMRN W !,?2,I_" "_$P(GMRPORT(I),"^",2)
34 W !,?2,"Enter the number(s) of port/lumen for flush: " S GMRX="" R GMRX:DTIME
35 G:GMRX["?" LIST2
36 I '$T!(GMRX["^")!(GMRX="") S GMROUT=1 Q
37 D VALIDAT^GMRYUT9
38 I '$D(GSEL)!($O(GSEL(0))'>0) W !,"ERROR ENTRY, TRY AGAIN",! G LIST2
39 Q
Note: See TracBrowser for help on using the repository browser.