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

FHIPST8.m

Go to the documentation of this file.
  1. FHIPST8 ; HISC/NCA - Main Routine For Ingredient Match ;4/11/94 13:55
  1. ;;5.0;Dietetics;;Oct 11, 1995
  1. MAT ; Get Updated Ingredient List and Match Entries
  1. W !!,"Updating Ingredient File with Nutrient Pointers ..."
  1. K ^TMP($J,"FHING") S CTR=1 F L=9:1:16 S ROU="^FHIPST"_L D @ROU
  1. F K=0:0 S K=$O(^TMP($J,"FHING",K)) Q:K<1 S Z1=$G(^(K)),NAM=$P(Z1,"^",1) D M1
  1. KIL K ^TMP($J,"FHING"),A,A1,A2,CTR,I,K,L,L1,NAM,ROU,Z1,Z2 Q
  1. M1 S Z2=$E(NAM,1,30) F L1=0:0 S L1=$O(^FHING("B",Z2,L1)) Q:L1<1 I $P(^FHING(L1,0),"^",1)=NAM G M2
  1. Q
  1. M2 S A1=$P(Z1,"^",2),A2=$P(Z1,"^",3)
  1. I A1 S:$P($G(^FHING(L1,0)),"^",21)="" $P(^FHING(L1,0),"^",21)=A1
  1. I A2 S:$P($G(^FHING(L1,0)),"^",22)="" $P(^FHING(L1,0),"^",22)=A2
  1. Q