[613] | 1 | NURCES2 ;HIRMFO/YH-END OF SHIFT REPORT PART 3 - ITEMIZED I/O DATA ;7/15/97
|
---|
| 2 | ;;4.0;NURSING SERVICE;**2,24**;Apr 25, 1997
|
---|
| 3 | SETARRY ;SET DATA IN ^TMP($J,"GMRY", FOR EACH PATIENT
|
---|
| 4 | S (GDCIV,GQ,GQT,GMROUT)=0,GRPT=10 I '$D(^GMR(126,"B",DFN)) Q
|
---|
| 5 | S GSAVEH=0,DA(1)=$O(^GMR(126,"B",DFN,0)) K ^TMP($J,"GMRY")
|
---|
| 6 | F II="IN","OUT" D SAVE^GMRYRP2
|
---|
| 7 | D SAVEIV^GMRYRP2,IVM
|
---|
| 8 | D REPORT1^GMRYRP3 S NURTLTI=$S('$D(GTOTLI):"",1:GTOTLI),NURTLTO=$S('$D(GTOTLO):"",1:GTOTLO) D SETIV K GRPT,GSAVE Q
|
---|
| 9 | SETIV ;SET IV TEXT
|
---|
| 10 | D IV^NURCES3,IVTUBE
|
---|
| 11 | Q
|
---|
| 12 | IVM ;SET IV MAINTENANCE IN ^TMP($J,"GMRY"
|
---|
| 13 | Q:'$D(^GMR(126,DFN,"IVM","B"))
|
---|
| 14 | S GSITE="" F S GSITE=$O(^GMR(126,DA(1),"IVM","B",GSITE)) Q:GSITE="" S DA=$O(^(GSITE,0)) Q:DA'>0 D SCARE
|
---|
| 15 | Q
|
---|
| 16 | SCARE ;
|
---|
| 17 | Q:'$D(^GMR(126,DA(1),"IVM",DA,1,"B"))
|
---|
| 18 | S GSTRT=0 F S GSTRT=$O(^GMR(126,DA(1),"IVM",DA,1,"B",GSTRT)) Q:GSTRT'>0 S GMRINDT=GSTRT,GDAY=0 D NEXT^GMRYRP1 I '(GMRINDT<GMRSTRT!(GMRINDT>GMRFIN)) D SETSIFT^GMRYRP2 D
|
---|
| 19 | . S GDA=0 F S GDA=$O(^GMR(126,DA(1),"IVM",DA,1,"B",GSTRT,GDA)) Q:GDA'>0 D SETUT
|
---|
| 20 | Q
|
---|
| 21 | SETUT ;
|
---|
| 22 | S GSITE(GSITE)="" D FINDCA^GMRYCATH(.GSITE)
|
---|
| 23 | S GPORT=+$P($G(^GMR(126,DA(1),"IVM",DA,1,GDA,0)),"^",7),GPORT=$S($D(^GMR(126,DFN,"IV",GPORT,3)):$P(^(3),"^"),1:"")
|
---|
| 24 | S ^TMP($J,"GMRY",$P(GMRINDT,"."),GSHIFT,"IV",GMRINDT,GSTRT,"Z",GDA,1)=$P(^GMR(126,DA(1),"IVM",DA,1,GDA,0),"^",1,5)_"^"_$P(^(0),"^",6)_"^"_GSITE_"^"_GSITE(GSITE)_"^"_GPORT Q
|
---|
| 25 | IVTUBE ;OBTAIN LAST TUBING CHANGED
|
---|
| 26 | D SELSITE^GMRYMNT Q:'$D(GMRXY) K NURTUBE S N=0 F S N=$O(GMRXY(N)) Q:N'>0 D TUBING
|
---|
| 27 | K GDA,GYES,GCT,GDATA,GDT,GIVDT,GMRXY,GSITE,GST Q
|
---|
| 28 | TUBING S GSITE="",NURTUBE=0 F S GSITE=$O(GMRXY(N,GSITE)) Q:GSITE="" I GCT(GSITE)>0 S GYES=0,GDA=$S('$D(^GMR(126,DFN,"IVM","B",GSITE)):"",1:$O(^GMR(126,DFN,"IVM","B",GSITE,0))) D:GDA>0 CHANGED
|
---|
| 29 | Q
|
---|
| 30 | CHANGED ;
|
---|
| 31 | S GDA(1)=0 F S GDA(1)=$O(^GMR(126,DFN,"IVM",GDA,1,"C",GDA(1))) Q:GDA(1)'>0!GYES S GDA(2)=0 F S GDA(2)=$O(^GMR(126,DFN,"IVM",GDA,1,"C",GDA(1),GDA(2))) Q:GDA(2)'>0!GYES D CHANGED1
|
---|
| 32 | Q
|
---|
| 33 | CHANGED1 ;
|
---|
| 34 | I $D(^GMR(126,DFN,"IVM",GDA,1,GDA(2),0)),$P(^(0),"^",3)["Y" S NURTUBE(GSITE)=$P(^(0),"^"),GYES=1,NURTUBE=NURTUBE+1
|
---|
| 35 | Q
|
---|
| 36 | HEADER ; PRINTING OF HEADING ROUTINE
|
---|
| 37 | I $E(IOST)="C",NURSW1 W !,$C(7),"Enter <RET> to continue " R X:DTIME I '$T!(X="^") S NURQUIT=1 Q
|
---|
| 38 | S Y=(GMRFIN+.0001)_"00"
|
---|
| 39 | S NURPAGE=NURPAGE+1,NURSW1=1 W:NURPAGE>1 @IOF
|
---|
| 40 | W !,NURDT,?20,"END-OF-SHIFT REPORT",?40,"UNIT: ",NPWARD W ?$S(NOPT=1:90,NOPT=2:55,1:55),"TOUR: "_+$E($P(GMRSTRT,".",2),1,2)_":"_$E($P(GMRSTRT,".",2)_"00",3,4)_"-"_+$E($P(Y,".",2),1,2)_":",$E($P(Y,".",2),3,4)
|
---|
| 41 | W ?$S(NOPT=1:118,NOPT=2:72,1:72),"PAGE:",NURPAGE
|
---|
| 42 | W !,"ROOM-BED/NAME/SSN/",?25,"|ADMITTING DX/ |PT |LATEST VITALS" W:NOPT=1 ?68,"|PATIENT PROBLEMS"
|
---|
| 43 | W !,"SPECIALTY/DIET/ALLERGIES",?25,"|DATE/MDs",?42,"|CAT|" W:NOPT=1 ?68,"|",!,NURX,! W:NOPT=2 !,$E(NURX,1,79),!
|
---|
| 44 | Q
|
---|
| 45 | PTDATA ;
|
---|
| 46 | S NPT(1)=$S($P(VAIN(5),"^")'="":$P(VAIN(5),"^"),1:"")
|
---|
| 47 | S NPT(2)=$S(N1'=" BLANK":$E(N1,1,17),1:""),NPT(3)=NSSN,NPT=3 D FITLINE^NURCES5("Specialty: "_$P($G(VAIN(3)),"^",2),25,.NPT)
|
---|
| 48 | I GFH D FITLINE^NURCES5(NDIET,25,.NPT)
|
---|
| 49 | D ALLERGY^NURCES4
|
---|
| 50 | S NCL(1)=$S($D(NURCAT):NURCAT,1:"") S NADM=0 D INP^VADPT D FITLINE^NURCES5(VAIN(9),16,.NADM)
|
---|
| 51 | S Y=$P(VAIN(7),"^") S:Y'="" NADM=NADM+1,NADM(NADM)=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3) S Y=$P(Y,".",2) S:Y'="" NADM(NADM)=NADM(NADM)_"@"_$E(Y_"00",1,2) S Y=$E(Y,3,4) S:Y'="" NADM(NADM)=NADM(NADM)_":"_$E(Y_"0",1,2)
|
---|
| 52 | S NADM=NADM+1,NADM(NADM)=$P(VADM(4),"^")_" yrs. "_$S($P(VADM(5),"^",2)'="":$P(VADM(5),"^",2),1:" ")
|
---|
| 53 | I $P($G(VAIN(11)),"^",2)'="" D K G
|
---|
| 54 | . S G=0,NADM=NADM+1,NADM(NADM)=$P(VAIN(11),"^",2),G=$O(^VA(200,"B",NADM(NADM),0)),NADM=NADM+1,NADM(NADM)=" (A)"
|
---|
| 55 | . I G>0,$D(^VA(200,G,.13)) S G(1)=$P($G(^(.13)),"^",7),G(2)=$P($G(^(.13)),"^",8) D
|
---|
| 56 | . . I G(1)'="" S NADM=NADM+1,NADM(NADM)=G(1) D
|
---|
| 57 | . . . I $L(G(1))>11 S NADM=NADM+1,NADM(NADM)=" (V)"
|
---|
| 58 | . . . E S NADM(NADM)=NADM(NADM)_" (V)"
|
---|
| 59 | . . I G(2)'="" S NADM=NADM+1,NADM(NADM)=G(2) D
|
---|
| 60 | . . . I $L(G(2))>11 S NADM=NADM+1,NADM(NADM)=" (D)"
|
---|
| 61 | . . . E S NADM(NADM)=NADM(NADM)_" (D)"
|
---|
| 62 | I $P($G(VAIN(2)),"^",2)'="" D K G
|
---|
| 63 | . S G=0,NADM=NADM+1,NADM(NADM)=$P(VAIN(2),"^",2),G=$O(^VA(200,"B",NADM(NADM),0)),NADM=NADM+1,NADM(NADM)=" (P)"
|
---|
| 64 | . I G>0,$D(^VA(200,G,.13)) S G(1)=$P($G(^(.13)),"^",7),G(2)=$P($G(^(.13)),"^",8) D
|
---|
| 65 | . . I G(1)'="" S NADM=NADM+1,NADM(NADM)=G(1) D
|
---|
| 66 | . . . I $L(G(1))>11 S NADM=NADM+1,NADM(NADM)=" (V)"
|
---|
| 67 | . . . E S NADM(NADM)=NADM(NADM)_" (V)"
|
---|
| 68 | . . I G(2)'="" S NADM=NADM+1,NADM(NADM)=G(2) D
|
---|
| 69 | . . . I $L(G(2))>11 S NADM=NADM+1,NADM(NADM)=" (D)"
|
---|
| 70 | . . . E S NADM(NADM)=NADM(NADM)_" (D)"
|
---|
| 71 | S NVM(1)="" D VM^NURCES1 I GPACK,$D(NURTLTI) S:NURTLTI>0 NADM=NADM+1,NADM(NADM)="Intake: "_NURTLTI
|
---|
| 72 | I GPACK,$D(NURTLTO) S:NURTLTO>0 NADM=NADM+1,NADM(NADM)="Output: "_NURTLTO
|
---|
| 73 | K NURTLTI,NURTLTO Q
|
---|
| 74 | PRINT2 I $D(NPT(NN)),(NPT(NN)'="") W $E(NPT(NN),1,25)
|
---|
| 75 | W ?25,"|" I $D(NADM(NN)),(NADM(NN)'="") W $E(NADM(NN),1,16)
|
---|
| 76 | W ?42,"|" I $D(NCL(NN)),(NCL(NN)'="") W NCL(NN)
|
---|
| 77 | W ?46,"|" I $D(NVM(NN)),(NVM(NN)'="") W NVM(NN)
|
---|
| 78 | I NOPT=1 W ?68,"|" I $D(NPR(NN)),(NPR(NN)'="") W NPR(NN)
|
---|
| 79 | W ! Q
|
---|