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

FHOMRC1.m

Go to the documentation of this file.
  1. FHOMRC1 ;Hines OIFO/RTK RECURRING MEALS CANCEL MEAL ;2/10/03 15:05
  1. ;;5.5;DIETETICS;**2,8**;Jan 28, 2005;Build 28
  1. ;
  1. CRM ; Cancel entire recurring meal
  1. D GETRM Q:FHFIND=0 Q:$G(NUM)<1
  1. CRM1 W ! K DIR S DIR("A")="Cancel which order (or ALL)?",DIR(0)="FO^1:80"
  1. D ^DIR
  1. Q:$D(DIRUT) S FHNUM=Y D RANGE^FHOMUTL I FHCLST="" D CRM1 Q
  1. W ! K DIR S DIR("A")="Are you sure? ",DIR(0)="YA",DIR("B")="Y" D ^DIR
  1. I Y=0!($D(DIRUT)) D END Q
  1. F A=1:1:NUM S FHC=$P(FHCLST,",",A) Q:FHC="" S FHRNUM=$P(FHLIST(FHC),U,1) D CANRM,CNRM100^FHOMRC2
  1. W " ... done" D END Q
  1. CANRM ;
  1. I $P($G(^FHPT(FHDFN,"OP",FHRNUM,0)),U,15)="C" Q
  1. I $G(FHORN)="" S FHORN=$P($G(^FHPT(FHDFN,"OP",FHRNUM,0)),U,12)
  1. K DIE S FHSTAT="C",DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""OP"",",DA=FHRNUM
  1. S DR="24////^S X=FHSTAT;.05////^S X=FHORN" D ^DIE
  1. S FHACT="C",FHOPTY="R" D SETAET^FHOMRO2
  1. Q
  1. CA ; Cancel Additional Order
  1. D GETRM Q:FHFIND=0 Q:$G(NUM)<1
  1. CA1 W ! K DIR S DIR("A")="Cancel which Additional Order (or ALL)?"
  1. S DIR(0)="FO^1:80" D ^DIR
  1. Q:$D(DIRUT) S FHNUM=Y D RANGE^FHOMUTL I FHCLST="" D CA1 Q
  1. W ! K DIR S DIR("A")="Are you sure? ",DIR(0)="YA",DIR("B")="Y" D ^DIR
  1. I Y=0!($D(DIRUT)) D END Q
  1. F A=1:1:NUM S FHC=$P(FHCLST,",",A) Q:FHC="" S FHRNUM=$P(FHLIST(FHC),U,1) D CANAO,CNAO100^FHOMRC2
  1. W " ... done" D END Q
  1. CANAO ;
  1. I '$D(^FHPT(FHDFN,"OP",FHRNUM,1)) Q
  1. I $P($G(^FHPT(FHDFN,"OP",FHRNUM,1)),U,5)="C" Q
  1. I $G(FHORN)="" S FHORN=$P($G(^FHPT(FHDFN,"OP",FHRNUM,1)),U,4)
  1. K DIE S FHSTAT="C",DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""OP"",",DA=FHRNUM
  1. S DR="13.6////^S X=FHSTAT;13.5////^S X=FHORN" D ^DIE
  1. S FHACT="C",FHOPTY="A" D SETAET^FHOMRO2 S FHORN=""
  1. Q
  1. CE ; Cancel Early/Late Tray
  1. D GETRM Q:FHFIND=0 Q:$G(NUM)<1
  1. CE1 W ! K DIR S DIR("A")="Cancel which Early/Late Tray (or ALL)?"
  1. S DIR(0)="FO^1:80" D ^DIR
  1. Q:$D(DIRUT) S FHNUM=Y D RANGE^FHOMUTL I FHCLST="" D CE1 Q
  1. W ! K DIR S DIR("A")="Are you sure? ",DIR(0)="YA",DIR("B")="Y" D ^DIR
  1. I Y=0!($D(DIRUT)) D END Q
  1. F A=1:1:NUM S FHC=$P(FHCLST,",",A) Q:FHC="" S FHRNUM=$P(FHLIST(FHC),U,1) D CANEL,CNEL100^FHOMRC2
  1. W " ... done" D END Q
  1. CANEL ;
  1. I '$D(^FHPT(FHDFN,"OP",FHRNUM,2)) Q
  1. I $P($G(^FHPT(FHDFN,"OP",FHRNUM,2)),U,6)="C" Q
  1. I $G(FHORN)="" S FHORN=$P($G(^FHPT(FHDFN,"OP",FHRNUM,2)),U,5)
  1. K DIE S FHSTAT="C",DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""OP"",",DA=FHRNUM
  1. S DR="17.6////^S X=FHSTAT;17.5////^S X=FHORN" D ^DIE
  1. S FHACT="C",FHOPTY="E" D SETAET^FHOMRO2 S FHORN=""
  1. Q
  1. CT ; Cancel Tubefeeding
  1. D GETRM Q:FHFIND=0 Q:$G(NUM)<1
  1. CT1 W ! K DIR S DIR("A")="Cancel which Tubefeeding (or ALL)?"
  1. S DIR(0)="FO^1:80" D ^DIR
  1. Q:$D(DIRUT) S FHNUM=Y D RANGE^FHOMUTL I FHCLST="" D CT1 Q
  1. W ! K DIR S DIR("A")="Are you sure? ",DIR(0)="YA",DIR("B")="Y" D ^DIR
  1. I Y=0!($D(DIRUT)) D END Q
  1. F A=1:1:NUM S FHC=$P(FHCLST,",",A) Q:FHC="" S FHRNUM=$P(FHLIST(FHC),U,1) D CANTF,CNTF100^FHOMRC2
  1. W " ... done" D END Q
  1. CANTF ;
  1. I '$D(^FHPT(FHDFN,"OP",FHRNUM,3)) Q
  1. I $P($G(^FHPT(FHDFN,"OP",FHRNUM,3)),U,5)="C" Q
  1. I $G(FHORN)="" S FHORN=$P($G(^FHPT(FHDFN,"OP",FHRNUM,3)),U,4)
  1. K DIE S FHSTAT="C",DA(1)=FHDFN,DIE="^FHPT("_DA(1)_",""OP"",",DA=FHRNUM
  1. S DR="21.6////^S X=FHSTAT;21.5////^S X=FHORN" D ^DIE
  1. S FHACT="C",FHOPTY="T" D SETAET^FHOMRO2 S FHORN=""
  1. Q
  1. GETRM ; Select patient and get recurring meals
  1. S FHORN="",FHPSDT="N" D GETOPT^FHOMUTL I FHFIND=0 Q
  1. K NUM D DISP^FHOMRR1 I $G(NUM)="" Q
  1. K FHPSDT Q
  1. END ;
  1. K A,FHFIND,FHCLST,FHC,FHCDT,FHPSDT,NUM
  1. Q