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

PXRMHTED.m

Go to the documentation of this file.
  1. PXRMHTED ;;BP/WAT - Edit VA-HT PERIODIC EVALUATION ;08/13/13 07:26
  1. ;;2.0;CLINICAL REMINDERS;**19**;Feb 04, 2005;Build 187
  1. ; 10026 ^DIR | 10018 ^DIE
  1. ;This routine runs the option PXRM DEFINITION FREQUENCY EDIT. It permits a limited edit to the reminder frequency
  1. ;for the VA-HT PERIODIC EVALUATION reminder definition. The function findings are also automatically updated with
  1. ;the new frequency value.
  1. READ() ;reader call
  1. ;
  1. N DIR,X,Y
  1. K DIRUT
  1. S DIR(0)="F^^I X'=""90D""&(X'=""120D"")&(X'=""180D"")&(X'=""3M"")&(X'=""4M"")&(X'=""6M"") K X"
  1. S DIR("B")="180D"
  1. S DIR("A")="Enter a new REMINDER FREQUENCY"
  1. S DIR("A",1)=""
  1. S DIR("A",2)="The current frequency for this reminder definition is: "_$G(CURFREQ)
  1. S DIR("A",3)=""
  1. ;;
  1. S DIR("?")="90D (or 3M), 120D (or 4M), 180D (or 6M)"
  1. S DIR("?",1)="Choose one of the following frequencies for this reminder definition:"
  1. S DIR("?",2)=""
  1. D ^DIR K DIR
  1. I (Y="")!(Y="^") S DUOUT=1
  1. Q Y
  1. EDIT ;edit call
  1. ;
  1. N DA,DIE,DR,CURFREQ,NEWFREQ,DTOUT,DUOUT,FNSTR
  1. S DA(1)=$O(^PXD(811.9,"B","VA-HT PERIODIC EVALUATION",""))
  1. S DA=$O(^PXD(811.9,DA(1),7,0))
  1. S CURFREQ=^PXD(811.9,DA(1),7,DA,0) ;force numeric to remove unit letter
  1. S NEWFREQ=$$READ^PXRMHTED
  1. S:CURFREQ="3M" CURFREQ=90 ;ensure frequency in Days & numeric for use in function string
  1. S:CURFREQ="4M" CURFREQ=120
  1. S:CURFREQ="6M" CURFREQ=180
  1. Q:$D(DUOUT)!$D(DTOUT)
  1. S DIE="^PXD(811.9,"_DA(1)_",7,"
  1. S DR=".01///^S X=NEWFREQ"
  1. D ^DIE
  1. S DA=0
  1. S:NEWFREQ="3M" NEWFREQ=90
  1. S:NEWFREQ="4M" NEWFREQ=120
  1. S:NEWFREQ="6M" NEWFREQ=180
  1. F S DA=$O(^PXD(811.9,DA(1),25,DA)) Q:+DA=0 D
  1. .S FNSTR=^PXD(811.9,DA(1),25,DA,3) Q:$G(FNSTR)=""
  1. .S FNSTR=$$STRREP^PXRMUTIL(FNSTR,+CURFREQ,+NEWFREQ)
  1. .S DIE="^PXD(811.9,"_DA(1)_",25,"
  1. .S DR="3///^S X=FNSTR"
  1. .D ^DIE
  1. .S FNSTR=""
  1. W !!,"Done",!
  1. Q
  1. ;