Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: FHORTR

FHORTR.m

Go to the documentation of this file.
  1. FHORTR ; HISC/NCA - Tubefeeding Product Search ;8/8/96 08:12
  1. ;;5.5;DIETETICS;;Jan 28, 2005
  1. SRCH(FHX) ; Search For Tubefeeding Product
  1. N DIC,FHY,X,Y
  1. S X=FHX,FHY=""
  1. W ! K DIC S DIC="^FH(118.2,",DIC(0)="EQM" D ^DIC G:"^"[X!$D(DTOUT) EXIT
  1. G:Y<1 EXIT
  1. S FHY=+Y
  1. EXIT Q FHY
  1. DISP ; Display Edited Tubefeeding
  1. N TC,TK S (TC,TK)=0 W !
  1. I $O(TUN(0))="" W !!,"No Tubefeeding Products Selected." Q
  1. F K=0:0 S K=$O(TUN(K)) Q:K<1 D
  1. .S TC=TC+$P(TUN(K),"^",4)+$P(TUN(K),"^",5)
  1. .S TK=TK+$P(TUN(K),"^",6),STR=$P(TUN(K),"^",2)
  1. .S PRO=$P(TUN(K),"^",1)
  1. .W !,"Product: ",$P($G(^FH(118.2,PRO,0)),"^",1),", "
  1. .W $S(STR=4:"Full",STR=2:"1/2",STR=1:"1/4",STR=3:"3/4",1:""),", "
  1. .W $P(TUN(K),"^",3)
  1. .Q
  1. W !!,"Total Kcal: ",TK,?36,"Total Quantity: ",TC
  1. Q
  1. HELP ; Help Prompt for Tubefeeding Product.
  1. W !!,"Hit return to take the default.",!,"Enter a ""@"" to delete the product, strength and quantity.",!,"Enter another product name to replace existing product name."
  1. W !,"To Replace, enter first few characters of the product name, e.g., SUS for SUSTACAL."
  1. W !,"Enter a ""^"" will Exit Completely."
  1. Q