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

ORQ10.m

Go to the documentation of this file.
  1. ORQ10 ; slc/dcm - Test this utility
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
  1. TEST ;Test utility
  1. N DIC,Y,GP,ORLIST,ORVP,ORL,X1,X2,X,FLAG,O2
  1. S (X1,X2,O2)=""
  1. ;W !,"Order # (optional): " R X:DTIME S O2=X I $L(X),'$D(^OR(100,X,0)) S O2="" W " Invalid order #" G TEST
  1. I O2,$D(^OR(100,O2,0)) S ORVP=$P(^(0),"^",2)
  1. I 'O2 K ^TMP("OR",$J) D ^ORUDPA
  1. I $O(Y(0)) S ORVP=+Y($O(Y(0)))_";DPT("
  1. Q:'$G(ORVP)
  1. LP S DIC=100.98,DIC(0)="AEQM" D ^DIC S GP=$S(+Y>0:+Y,1:"") G:'GP TEST
  1. CON W !!,"1 => All",?24,"6 => New",?45," 11 => Unsigned"
  1. W !,"2 => Active/Current",?24,"7 => Pending",?46,"12 => Flagged"
  1. W !,"3 => Discontinued",?24,"8 => Activity",?46,"13 => Verb/Phone"
  1. W !,"4 => Completed/Expired",?24,"9 => Expanded",?46,"14 => Verb/Phone Unsign"
  1. W !,"5 => Expiring",?23,"10 => Notifications"
  1. W !!,"Select CONTEXT: 1// " R X:DTIME Q:'$T!(X["^") S:X="" X=1
  1. I X'?1N.N!(X>14)!(X<1) W !,"Enter a number from 1 to 14 that matches the context list" G CON
  1. S FLAG=X D
  1. . S %DT="AETS",%DT("A")="Select Start Date: " D ^%DT S X1=$S(Y>0:Y,1:"") I Y<0,X["^" Q
  1. . S %DT="AETS",%DT("A")="Select End Date: " D ^%DT S X2=$S(Y>0:Y,1:"") I Y<0,X["^" Q
  1. W !,"What do you want stored: 1. Just the order #",!,?26,"2. Order # & text",!?26,"3. Order # & Reason for action",!?26,"4. Detailed Display fields"
  1. R !?8,"Enter choice: 1// ",X:DTIME S:X="" X=1 Q:X["^"
  1. S X3=$S(X=1:0,X=2:2,X=3:3,X=4:1,1:0)
  1. W !!,"For: "_$P(^DPT(+ORVP,0),"^"),?35," "_$P(Y,"^",2),?55,"Context #"_FLAG
  1. D EN^ORQ1(ORVP,GP,FLAG,"",X1,X2,X3)
  1. W !?5,"<"_$S($G(^TMP("ORR",$J,ORLIST,"TOT")):^("TOT"),1:0)_" Orders found>"
  1. I $G(^TMP("ORR",$J,ORLIST,"TOT")) W !,"Do you want to see the list of Orders" S %=1 D YN^DICN D
  1. . I %=1 W ! S IFN=0 F S IFN=$O(^TMP("ORR",$J,ORLIST,IFN)) Q:IFN<1 W !,^(IFN)
  1. K ^TMP("ORR",$J,ORLIST)
  1. D READ^ORUTL G LP
  1. Q
  1. ;
  1. STATUS(NUM) ; -- Returns name of status by number
  1. I NUM=1 Q "All"
  1. I NUM=2 Q "Current"
  1. I NUM=3 Q "Discontinued"
  1. I NUM=4 Q "Completed/Expired"
  1. I NUM=5 Q "Expiring"
  1. I NUM=6 Q "New"
  1. I NUM=7 Q "Pending"
  1. I NUM=8 Q "Activity"
  1. I NUM=9 Q "Expanded"
  1. I NUM=10 Q "Notifications"
  1. I NUM=11 Q "Unsigned"
  1. I NUM=12 Q "Flagged"
  1. I NUM=13 Q "Verbal/Phoned"
  1. I NUM=14 Q "Verbal/Phoned Unsigned"
  1. Q ""