source: FOIAVistA/trunk/r/GEN_MED_REC_IO-GMRY/GMRYUT9.m@ 1470

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1GMRYUT9 ;HIRMFO/YH-LIST/SELECT IV LINES ;10/15/96
2 ;;4.0;Intake/Output;;Apr 25, 1997
3IVLINE ;
4 K GMRYZ S GN=0,GN(1)="" F S GN(1)=$O(GST(GSITE,GN(1))) Q:GN(1)="" S GN(2)=0 F S GN(2)=$O(GST(GSITE,GN(1),GN(2))) Q:GN(2)'>0 S GN=GN+1,GMRYZ(GN)=GN(2)_"^"_GN(1)
5 I GN=0 Q
6LIST W !!,GSITE_" - "_GSITE(GSITE),! F I=1:1:GN S GN(1)=GMRYZ(I) D WRITE
7 W !,GMESSG S GMRX="" R GMRX:DTIME I '$T!(GMRX["^") S GMROUT=1 Q
8 Q:GMRX="" I GMRX["?" W !,GMESSG,!,"or enter ^ to quit.",! G LIST
9 S GMRN=GN D VALIDAT
10 I '$D(GSEL) W !,"ERROR ENTRY, TRY AGAIN",! G LIST
11 S GMRYZ=$O(GSEL(0)) I GMRYZ'>0!('$D(GMRYZ(+GMRYZ))) W !,"ERROR ENTRY, TRY AGAIN",! G LIST
12 Q:$D(GFLUSH)
13 S $P(^GMR(126,DA(2),"IVM",DA(1),1,DA,0),"^",7)=+GMRYZ(GMRYZ),$P(^(0),"^",3)="Y"
14 ;ADD 1/10TH SECOND TO THE DATE/TIME FOR EACH ADDITIONAL TUBE CHANGED
15 F S GMRYZ=$O(GSEL(GMRYZ)) Q:GMRYZ'>0!GMROUT I $D(GMRYZ(GMRYZ)) D
16 .D WAIT^GMRYUT0 Q:GMROUT K DD S X=GX,DIC="^GMR(126,"_DA(2)_",""IVM"","_DA(1)_",1,",DIC(0)="ML" D FILE^DICN L -^GMR(126,DFN) Q:+Y'>0 S DA=+Y
17 .S $P(^GMR(126,DA(2),"IVM",DA(1),1,DA,0),"^",3)="Y",$P(^(0),"^",7)=+GMRYZ(GMRYZ)
18 .Q
19 Q
20WRITE W !,?3,I_". " S GN(2)=$P(GN(1),"^",2),GN(1)=+GN(1)
21 W " "_GST(GSITE,GN(2),GN(1),2)_$S(GN(2)'="BLANK":"("_GN(2)_")",1:"")
22 Q
23VALIDAT ;
24 F GMRX(1)=1:1 S GMRX(2)=$P(GMRX,",",GMRX(1)) Q:GMRX(2)="" D VAL1
25 Q
26VAL1 ;
27 I GMRX(2)["-" D VAL2 Q
28 S:GMRX(2)>0&(GMRX(2)<(GMRN+1)) GSEL(GMRX(2))=""
29 Q
30VAL2 ;
31 S GMRX(3)=$P(GMRX(2),"-") Q:GMRX(3)<1!(GMRX(3)>GMRN) S GMRX(4)=$P(GMRX(2),"-",2) S:GMRX(4)>GMRN GMRX(4)=GMRN F GMRX(5)=GMRX(3):1:GMRX(4) S GSEL(GMRX(5))=""
32 Q
33ADDRC S DR="1///^S X=GMRY;4///^S X=""`""_DUZ" D WAIT^GMRYUT0 I 'GMROUT D ^DIE L -^GMR(126,DFN)
34 K GMRX,DIE,DR Q
35KILLRC S DIK="^GMR(126,"_DA(2)_",""IVM"","_DA(1)_",1," D ^DIK K DIK W !!,"Data not completed, the record of site maintenance is deleted!!!",! Q
36PATIENT ;OBTAIN PATIENT WARD
37 D PT^GMRYUT0
38 I $D(GMRNUR) S X=$S($D(^NURSF(214,DFN,0)):+$P(^(0),"^",3),1:"") S X=$S(X>0&($D(^NURSF(211.4,+X,0))):+$P(^(0),"^"),1:"") S GMRWARD(1)=$S(X>0&($D(^SC(+X,0))):$P($P(^(0),"^"),"NUR ",2),1:"")
39 Q
Note: See TracBrowser for help on using the repository browser.