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

FH55P8.m

Go to the documentation of this file.
  1. FH55P8 ;Hines OIFO/RTK - POST-INIT FOR PATCH FH*5.5*8 ;1/18/2007
  1. ;;5.5;DIETETICS;**8**;Jan 28, 2005;Build 28
  1. ;
  1. ITEM1 ;Convert existing CLINICIAN field entries into new multiple field
  1. D BMES^XPDUTL("Expand CLINICIAN field of NUTRITION LOCATION (#119.6)")
  1. D MES^XPDUTL(" file to a multiple and convert existing data...")
  1. F FHLIEN=0:0 S FHLIEN=$O(^FH(119.6,FHLIEN)) Q:FHLIEN'>0 D
  1. .S FHCFLG=0,FHLCLN=$P($G(^FH(119.6,FHLIEN,0)),U,2)
  1. .I FHLCLN="" Q
  1. .F FHCMIEN=0:0 S FHCMIEN=$O(^FH(119.6,FHLIEN,2,FHCMIEN)) Q:FHCMIEN'>0 D
  1. ..S FHCMLT=$P($G(^FH(119.6,FHLIEN,2,FHCMIEN,0)),U,1)
  1. ..I FHCMLT=FHLCLN S FHCFLG=1
  1. .I FHCFLG=1 Q ;already in CLINICIAN(S) multiple, don't add
  1. .S X=+FHLCLN K DIC,DO S DA(1)=FHLIEN,DIC="^FH(119.6,"_DA(1)_",2,"
  1. .S DIC(0)="L" D FILE^DICN I Y=-1 Q
  1. ITEM2 ;Set Allergy-type Food Preferences pointers to corresponding Allergy
  1. D BMES^XPDUTL("Map ALLERGY - TYPE entries in Food Preferences (#115.2)")
  1. D MES^XPDUTL(" file to corresponding GMR Allergies entries...")
  1. D MAP^FHSELA1
  1. ITEM3 ;Update Patient FP's based on any pre-existing Patient Food-type Allergies
  1. D BMES^XPDUTL("Updating Patient Food Preferences based on pre-existing")
  1. D MES^XPDUTL(" Allergy data...")
  1. S FHPST8=1 D UPDATE^FHSELA1
  1. ITEM4 ;
  1. K ^FH(114,"D")
  1. ;Set new AB cross-reference on Recipe (#114) file, Embedded Recipe mult
  1. F FHINIEN=0:0 S FHINIEN=$O(^FH(114,FHINIEN)) Q:FHINIEN'>0 D
  1. .I $O(^FH(114,FHINIEN,"R",0)) S DIK="^FH(114,FHINIEN,""R"",",DIK(1)=".01^AB",DA(1)=FHINIEN D ENALL^DIK
  1. K DA,X,Y,FHCFLG,FHLCLN,FHLIEN,FHCMIEN,FHCMLT,FHINIEN Q