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

LRMITSES.m

Go to the documentation of this file.
  1. LRMITSES ;SLC/STAFF - MICRO TREND ENTRY SELECTIONS ;10/18/92 16:03
  1. ;;5.2;LAB SERVICE;**96,257**;Sep 27, 1994
  1. ; from LRMITSE
  1. ;
  1. D SELECT K D,DIC,DIR,DFN,LRASK,LRDFN,LRDPF,LRPROMPT,LRPX,PNM,SSN,X,Y
  1. Q
  1. SELECT W !!!?10,"Types of reports to be generated."
  1. ; go thru the report types
  1. F LRASK="O","S","L","D","P","C" D Q:LREND
  1. .; if specific organisms are used on all reports, prompt only to print report
  1. .I $D(LRSORG),LRASK="O" D Q
  1. ..W ! K DIR S DIR(0)="Y",DIR("A")="Include report for organisms",DIR("B")="YES"
  1. ..S DIR("?")="Enter 'Y'es or 'N'o",DIR("??")=LRHELP
  1. ..S DIR("?",1)="You have already selected organisms for all report types."
  1. ..S DIR("?",2)="You may select whether or not to include a report grouped by organisms."
  1. ..D ^DIR I $D(DIRUT) S LREND=1 Q
  1. ..I 'Y K LRM("O")
  1. .S LRPROMPT=$S(LRASK="L":"Location",LRASK="O":"Organism",LRASK="D":"Physician",LRASK="P":"Patient",LRASK="C":"Col Samp",1:"Site/Spec") W !!,"Report by: ",LRPROMPT
  1. .S LRPX=$S($D(LRM(LRASK,"A")):"All",1:"No") K DIC,DIR,LRM(LRASK)
  1. .S DIR(0)="SAM^A:All;S:Selected;N:No",DIR("A")="(A)ll "_LRPROMPT_"s, (S)elected "_LRPROMPT_"s, or (N)o "_LRPROMPT_" Report? ",DIR("B")=LRPX
  1. .S DIR("?")="Enter 'A'll, 'S'elected, or 'N'o.",DIR("??")=LRHELP
  1. .S DIR("?",1)="Select 'A' to obtain a report grouped by all "_LRPROMPT_"s."
  1. .S DIR("?",2)="Select 'S' to obtain a report grouped for selected "_LRPROMPT_"s."
  1. .S DIR("?",3)="Select 'N' if you DO NOT want a report grouped by "_LRPROMPT_"."
  1. .S DIR("?",4)="Enter '^' to exit."
  1. .D ^DIR I $D(DIRUT) S LREND=1 Q
  1. .I Y="A" S LRM(LRASK,"A")=""
  1. .; if specific values are requested, obtain selections
  1. .I Y="S" D
  1. ..I LRASK="L" S DIC=44,DIC(0)="AEMOQ",DIC("A")="Select Location: " F D ^DIC Q:Y<1 S LRM(LRASK,"S",+Y)=$P(Y,U,2)
  1. ..I LRASK="O" S DIC=61.2,DIC(0)="AEMOQ",DIC("A")="Select Organism: ",DIC("S")="I $L($P(^(0),U,5)),$D(LROTYPE($P(^(0),U,5)))" F D ^DIC K DIC Q:Y<1 S LRM(LRASK,"S",+Y)=$P(Y,U,2)
  1. ..I LRASK="D" F S DIC=200,DIC(0)="AEQ",DIC("A")="Select Physician: ",D="AK.PROVIDER" D IX^DIC Q:Y<1 S LRM(LRASK,"S",+Y)=$P(Y,U,2)
  1. ..I LRASK="S" S DIC=61,DIC(0)="AEMOQ",DIC("A")="Select Site/Specimen: " F D ^DIC Q:Y<1 S LRM(LRASK,"S",+Y)=$P(Y,U,2)
  1. ..I LRASK="P" F D ^LRDPA Q:LRDFN=-1!$D(DUOUT)!$D(DTOUT) S LRM(LRASK,"S",DFN)=PNM_U_LRDFN
  1. ..I LRASK="C" S DIC=62,DIC(0)="AEMOQ",DIC("A")="Select Collection Sample: " F D ^DIC Q:Y<1 S LRM(LRASK,"S",+Y)=$P(Y,U,2)
  1. Q