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

BPXRMIMF.m

Go to the documentation of this file.
  1. BPXRMIMF ; IHS/MSC/MGH - Handle immunization forecaster. ;18-Apr-2014 15:21;DU
  1. ;;2.0;CLINICAL REMINDERS;**1001,1002**;Feb 04, 2005;Build 15
  1. ;=================================================================
  1. ;This routine is designed to check and see if the forecaster has
  1. ;already run for this patient. If it has run, the data is current.
  1. ;If it hasn't run the forecaster is called to update the data
  1. ;=====================================================================
  1. CHECK(DFN,TEST,DATE,VALUE,TEXT) ;
  1. ;Check if forecaster already has already run
  1. N X,Y,TODAY,BIERR
  1. S TODAY=$$DT^XLFDT()
  1. I $D(^XTMP("BIPDUE",DFN)) D
  1. .I $G(^XTMP("BIPDUR",DFN))'=TODAY D RUN
  1. I '$D(^XTMP("BIPDUE",DFN)) D RUN
  1. Q
  1. RUN ;Run the forecaster
  1. I '$$FORECAS^BIUTL2(DUZ(2)) S TEST=1,VALUE="Forecasting not enabled",DATE=TODAY Q
  1. D UPDATE^BIPATUP(DFN,DT,.BIERR,1)
  1. I BIERR'="" S TEST=1,VALUE="Error on running forecaster",DATE=TODAY
  1. E S TEST=1,DATE=TODAY,VALUE="Immunization due"
  1. Q