source: FOIAVistA/trunk/r/DIETETICS-FH/FHDMP4.m@ 1757

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1FHDMP4 ; HISC/REL/NCA - Patient Data Log (cont) ;5/7/92 15:36
2 ;;5.5;DIETETICS;**1**;Jan 28, 2005
3 S LST=1 D:$Y>(S1-4) HDR^FHDMP G:QT="^" KIL^FHDMP W !,LN,!?28,"T U B E F E E D I N G S"
4 I SDT F K=0:0 S K=$O(^FHPT(FHDFN,"A",ADM,"TF",K)) Q:K<1 S D1=$P(^(K,0),"^",1) Q:D1=""!(D1'<SDT) S LST=K
5 S CT=0 F TF=LST-1:0 S TF=$O(^FHPT(FHDFN,"A",ADM,"TF",TF)) Q:TF<1 I $D(^(TF,0)) S X=^(0) D TF G:QT="^" KIL^FHDMP
6 I 'CT W !!,"No Tubefeedings ordered for this Admission"
7 W !
8 D:$Y>(S1-4) HDR^FHDMP G:QT="^" KIL^FHDMP W !,LN,!?23,"D I E T E T I C C O N S U L T S"
9 S CT=0 F K=0:0 S K=$O(^FHPT(FHDFN,"A",ADM,"DR",K)) Q:K<1 I $D(^(K,0)) S X=^(0) I $P(X,"^",1)'<SDT S CT=CT+1 D:$Y>(S1-6) HDR^FHDMP G:QT="^" KIL^FHDMP D CD
10 I 'CT W !!,"No Consultations ordered for this Admission"
11 W !
12 D:$Y>(S1-4) HDR^FHDMP G:QT="^" KIL^FHDMP W !,LN,!?24,"E A R L Y / L A T E T R A Y S"
13 S CT=0 F K=SDT:0 S K=$O(^FHPT(FHDFN,"A",ADM,"EL",K)) Q:K<1 S X=^(K,0),CT=CT+1 D:$Y>(S1-4) HDR^FHDMP G:QT="^" KIL^FHDMP D EL
14 I 'CT W !!,"No Early or Late Trays ordered for this Admission"
15 W ! G ^FHDMP5
16TF W !!,"Order # ",TF S CT=CT+1
17 F TF2=0:0 S TF2=$O(^FHPT(FHDFN,"A",ADM,"TF",TF,"P",TF2)) Q:TF2<1 S X1=^(TF2,0) D:$Y>(S1-8) HDR^FHDMP Q:QT="^" D TF1
18 Q:QT="^" W !,"Daily ML's: ",$P(X,"^",3),?42,"Daily KCals: ",$P(X,"^",7)
19 S Y=$P(X,"^",5) W:Y'="" !,"Comment: ",Y
20 S Y=$P(X,"^",1) W !,"Ordered: " D DTP S Y=$P(X,"^",10) W ?42,"By: ",$P($G(^VA(200,+Y,0)),"^",1)
21 S Y=$P(X,"^",11) W !,"Cancelled: " D DTP S Y=$P(X,"^",12) W ?42,"By: ",$P($G(^VA(200,+Y,0)),"^",1) Q
22TF1 S Y=$P(X1,"^",1) W !,"Product: ",$P($G(^FH(118.2,+Y,0)),"^",1),", "
23 S Y=$P(X1,"^",2) W $S(Y=4:"Full",Y=1:"1/4",Y=2:"1/2",1:"3/4")," Str., "
24 S FHTUBML=$P(X1,"^",3)
25 I FHTUBML["CC" S QUAFI=$P(FHTUBML,"CC",1),QUASE=$P(FHTUBML,"CC",2),FHTUBML=QUAFI_"ML"_QUASE
26 W FHTUBML
27 W !,"Product ML's: ",$P(X1,"^",4),?42,"Water ML's: ",$P(X1,"^",5) Q
28CD S Y=$P(X,"^",2) W !!,"Request: ",$P($G(^FH(119.5,+Y,0)),"^",1)
29 S Y=$P(X,"^",8) W ?62,"Status: ",$S(Y="A":"Active",Y="C":"Complete",Y="X":"Cancelled",1:"")
30 S Y=$P(X,"^",3) I Y'="" W !,"Comment: ",Y
31 S Y=$P(X,"^",5) W !,"Clinician: ",$P($G(^VA(200,+Y,0)),"^",1)
32 S Y=$P(X,"^",11) W ?62,"Type: ",$S(Y="I":"Initial",Y="F":"Follow-up",1:"")
33 S Y=$P(X,"^",1) W !,"Ordered: " D DTP S Y=$P(X,"^",7) W ?45,"By: ",$P($G(^VA(200,+Y,0)),"^",1)
34 S Y=$P(X,"^",9) W !,"Cleared: " D DTP S Y=$P(X,"^",10) W ?45,"By: ",$P($G(^VA(200,+Y,0)),"^",1) Q
35EL S Y=$P(X,"^",1) W !!,"Order: " D DTP S Y=$P(X,"^",2) W ?28,"Meal: ",$S(Y="B":"Breakfast",Y="N":"Noon",Y="E":"Evening",1:"")
36 S Y=$P(X,"^",4) W ?47,"Bagged: ",$S(Y="Y":"Yes",Y="N":"No",1:"") W ?62,"Time: ",$P(X,"^",3)
37 S Y=$P(X,"^",6) W !,"Ordered: " D DTP S Y=$P(X,"^",5) W ?28,"By: ",$P($G(^VA(200,+Y,0)),"^",1) Q
38DTP ; Printable Date/Time
39 Q:Y<1 W $J(+$E(Y,6,7),2)_"-"_$P("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"," ",+$E(Y,4,5))_"-"_$E(Y,2,3)
40 I Y["." S %=+$E(Y_"0",9,10) W $J($S(%>12:%-12,1:%),3)_":"_$E(Y_"000",11,12)_$S(%<12:"am",%<24:"pm",1:"m")
41 K % Q
Note: See TracBrowser for help on using the repository browser.