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

FHOMWOR1.m

Go to the documentation of this file.
FHOMWOR1 ;Hines OIFO/RTK OUTPATIENT MEALS/HL7 MSGING CONT ;04/22/05  9:15
 ;;5.5;DIETETICS;**2**;Jan 28, 2005
 ;
NA ;Number assign for outpatient meals orders (store OR# in FH field)
 I FHTYPE="A" D NAAO Q
 I FHTYPE="E" D NAEL Q
 I FHTYPE="T" D NATF Q
 I FHTYPE="R" D NARM Q
 I FHTYPE="I" D NAIP Q
 I FHTYPE="S" S FHSN=+FHRNUM D NASM Q
 I FHTYPE="G" S FHSN=+FHRNUM D NASMEL Q
 I FHTYPE="RMEDIT" D NARMED Q
 S TXT="BAD TYPE"  D GETOR^FHWOR,ERR^FHOMWOR Q
 Q
NAAO ;
 K DIE S DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""OP"","
 S DA=+FHRNUM,DR="13.5////^S X=FHORN" D ^DIE
 Q
NAEL ;
 K DIE S DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""OP"","
 S DA=+FHRNUM,DR="17.5////^S X=FHORN" D ^DIE
 Q
NATF ;
 K DIE S DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""OP"","
 S DA=+FHRNUM,DR="21.5////^S X=FHORN" D ^DIE
 Q
NARM ;
 F FHRNM=0:0 S FHRNM=$O(^FHPT(FHDFN,"OP","C",FHMPN,FHRNM)) Q:FHRNM'>0  D
 .K DIE S DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""OP"","
 .S DA=FHRNM,DR=".05////^S X=FHORN" D ^DIE
 .Q
 Q
NAIP ;
 K DIE S DIE="^FHPT(",DA=FHDFN,DR="20////^S X=FHORN" D ^DIE
 Q
NASM ;
 K DIE S DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""SM"","
 S DA=FHSN,DR="14////^S X=FHORN" D ^DIE
 Q
NASMEL ;
 K DIE S DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""SM"","
 S DA=FHSN,DR="11////^S X=FHORN" D ^DIE
 Q
NARMED ;
 K DIE S DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""OP"","
 S DA=+FHRNUM,DR=".05////^S X=FHORN" D ^DIE
 Q
OMD1IT ;
 F PIECE=3,4,5,6 S $P(^FH(119.9,1,0),U,PIECE)=""
 Q