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

QAQAHOC5.m

Go to the documentation of this file.
  1. QAQAHOC5 ;WCIOFO/ERC-Continuation of QAQAHOC3 ;7/22/98
  1. ;;1.7;QM Integration Module;**5**;07/25/1995
  1. ;
  1. EDITMAC ;if the macro is not valid, display message explaining that user
  1. ;should enter the macro again, then either use the same name to
  1. ;replace the old macro with the current, valid one, or to use a
  1. ;new name.
  1. W !!,"Your macro is no longer valid. Re-enter the macro now, and"
  1. W !,"when finished enter '[S' to save it at the prompt for the next"
  1. W !,"field. Enter the old macro name if you want to replace it with"
  1. W !,"the new criteria, or enter a completely new name."
  1. S DIR(0)="E" D ^DIR K DIR
  1. S Y=0
  1. Q
  1. STRIP ;if there are qualifiers on QAQFLD,strip them off
  1. N X
  1. S QAQFLD1=""
  1. F X=1:1:$L(QAQFLD) I "'!@#&+-"[$E(QAQFLD) S QAQFLD1=QAQFLD1_$E(QAQFLD),QAQFLD=$E(QAQFLD,2,999)
  1. Q
  1. STRIP2 ;if there are qualifiers on QAQPF, strip them out before comparing
  1. ;to QAQPM
  1. N QAQFIRST,QAQLAST,QAQLNTH,QAQPFQUL,X
  1. S QAQPFQUL=""
  1. S (QAQCC,QAQFIRST)=0
  1. S QAQPFX=QAQPF
  1. F X=1:1:$L(QAQPFX) S:"'!@#&+-"[$E(QAQPFX) QAQLNTH(X)=X,QAQPFQUL=QAQPFQUL_$E(QAQPF,X) S QAQPFX=$E(QAQPFX,2,999)
  1. S QAQPM=$TR(QAQPM,"~")
  1. I $G(QAQPFQUL)]"" D
  1. . F S QAQCC=$O(QAQLNTH(QAQCC)) Q:QAQCC'>0 S:$G(QAQFIRST)<1 QAQFIRST=QAQCC S QAQLAST=QAQCC
  1. . I $G(QAQFIRST)>0 D
  1. . . S QAQPF1=$E(QAQPF,1,QAQFIRST-1)
  1. . . S QAQPF2=$E(QAQPF,QAQLAST+1,999)
  1. . . I $G(QAQPM)'=($G(QAQPF1)_$G(QAQPF2)) S QAQPF1=$G(QAQPM1),QAQPF2=$G(QAQPM2)
  1. . . S QAQPFALL=$G(QAQPF1)_$G(QAQPFQUL)_$G(QAQPF2)
  1. . . I $G(QAQPFEND)]"" S QAQPFALL=$G(QAQPFALL)_";"_$G(QAQPFEND)
  1. I $G(QAQPFQUL)']"" D
  1. . I $G(QAQPF)'=$G(QAQPM) S QAQPF=$G(QAQPM)
  1. . S QAQPFALL=$G(QAQPF)_$S($G(QAQPFEND)]"":";"_QAQPFEND,1:"")
  1. S $P(^QA(740.1,QAQD0,"FLD",QAQEE,0),U,2)=$G(QAQPFALL)
  1. Q