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

LRARCR1A.m

Go to the documentation of this file.
  1. LRARCR1A ;DALISC/CKA - ARCHIVED WKLD REP GENERATOR-SELECT ;
  1. ;;5.2;LAB SERVICE;**59**;August 31, 1995
  1. ;same as LRCAPR1A except now references archived files
  1. ACCN ;
  1. K DIC S DIC=68,DIC(0)="AEMQZ" D ^DIC Q:Y=-1 S LRX=$P(Y,U,2),LRAA=+Y Q
  1. DATE ;
  1. K LRSDT,LREDT
  1. D ^LRWU3 Q:$G(LREND) S LRSDT=(LRSDT-.5),LREDT=$S(LREDT'=1000000:LREDT,1:DT)
  1. S LRFRV=+LRSDT,LRFR=$P(+LRSDT,".") S LRFRD=$$DTF^LRAFUNC1(LRSDT)
  1. S LRTOV=+LREDT,LRTO=$P(+LREDT,".") S LRTOD=$$DTF^LRAFUNC1(LREDT)
  1. S LRDTH="From: "_LRFRD_" --- To: "_LRTOD
  1. Q
  1. SPEC ;
  1. K DIC S DIC="^LAB(61,"
  1. S DIC(0)="AEMQ",DIC("A")="Topography or Specimen : ALL/ "
  1. F I=1:1 D ^DIC Q:Y=-1 S LRSP(+Y)=+Y,DIC("A")=" Select another specimen: ",LRSP=I
  1. Q
  1. COLL ;
  1. K DIC S DIC="^LAB(62,",DIC(0)="AEMQ"
  1. F I=1:1 D ^DIC Q:Y=-1 S DIC("A")="Select another Collection Sample: ",LRCOL(+Y)=+Y,LRCOL=I
  1. Q
  1. TEST ;
  1. K DIC S DIC="^LAB(60,",DIC(0)="AEMQ"
  1. S DIC("A")="Select LABORATORY TEST: All//"
  1. F I=1:1 D ^DIC Q:Y=-1 S LRTSTS(+Y)=$P(Y,U),LRTSTS=I,DIC("A")=" Select another LAB test: "
  1. Q
  1. CAP ;
  1. K DIC S DIC="^LAM(",DIC(0)="AEMQ",DIC("A")="Select WKLD CODES: All//"
  1. F I=1:1 D ^DIC Q:Y=-1 S LRCAPS(+Y)=$P(^(0),U,2),LRCAPS=I,DIC("A")="Select another WKLD code:"
  1. Q
  1. INSTR ;
  1. K DIC S DIC=64.2
  1. S DIC(0)="AEMQ",DIC("A")="Select INSTRUMENT or WKLD SUFFIX CODE: All//"
  1. F I=1:1 D ^DIC Q:Y=-1 S LRCPSX($P(^LAB(64.2,+Y,0),U,2))=+Y,LRCPSX=I,DIC("A")="Select another "
  1. Q
  1. STAT ;
  1. K DIC S DIC=62.05,DIC(0)="AEMQ"
  1. S DIC("A")="Select URGENCY to be counted as STAT: ",DIC("B")="STAT"
  1. F I=1:1 D ^DIC Q:Y=-1 S LRSTAT(+Y)=$P(Y,U,2),LRSTAT(50+Y)=$P($G(^LAB(62.05,(50+Y),0)),U),DIC("A")="Select another: " K DIC("B")
  1. Q:'$D(LRSTAT) K DIC,DUOUT
  1. S %=2 W !!,"Do you want to look up only tests with a STAT urgency"
  1. S LRSTAT=0 D YN^DICN S:%=1 LRSTAT=1
  1. Q
  1. LOC ;
  1. K DIC S DIC="^SC(",DIC(0)="AEMQ",DIC("A")="Select LOCATION NAME: All//"
  1. F I=1:1 D ^DIC Q:Y=-1 S LRLOC(+Y)=$P(^(0),U),DIC("A")="Select another location: ",LRLOC=I
  1. Q
  1. IOPAT ;
  1. K DIR,Y S DIR(0)="SB^I:INPATIENTS;O:OUTPATIENTS;R:OTHER;A:ALL"
  1. S DIR("B")="ALL",DIR("A")="Select Patient Type: "
  1. S DIR("?")="-------------------------"
  1. S DIR("?",1)="The codes are as follows:"
  1. S DIR("?",2)="-------------------------"
  1. S DIR("?",3)=" I - INPATIENTS "
  1. S DIR("?",4)=" O - OUTPATIENTS "
  1. S DIR("?",5)=" R - OTHER PATIENTS "
  1. S DIR("?",6)=" A - ALL OF THE ABOVE"
  1. F D ^DIR D Q:($D(DUOUT))!($D(DTOUT))!(X="")
  1. . Q:($D(DUOUT))!($D(DTOUT))!(X="")
  1. . I Y="A" S LRIOPAT="IORA",X="" Q
  1. . S LRIOPAT=$S('$D(LRIOPAT):Y,LRIOPAT[Y:LRIOPAT,1:LRIOPAT_Y)
  1. . I (LRIOPAT["I")&(LRIOPAT["O")&(LRIOPAT["R") S LRIOPAT="IORA",DUOUT=1 Q
  1. . K DIR("B")
  1. . S DIR("A")="Select another Patient Type: "
  1. . S $P(DIR(0),U)="SBO"
  1. Q
  1. CONTROL ;
  1. S %=2
  1. W !!,"Do you want to see a break out of controls for the condensed"
  1. W " section:",!,"TESTS by INSTRUMENTS"
  1. S LRCTL=0
  1. D YN^DICN
  1. I %=0 W !!,"Enter YES if you want this extra section printed, NO if you don't." G CONTROL
  1. I %<0 S LREND=1 Q
  1. S:%=1 LRCTL=1
  1. Q
  1. REPTYP ;
  1. K DIR
  1. S DIR(0)="S^1:All workload;2:LMIP reportable workload;3:Non-LMIP workload"
  1. S DIR("A")="Enter the number for the workload data to report"
  1. S DIR("B")=1
  1. S DIR("?")=" reportable for LMIP."
  1. S DIR("?",1)="1 - will include all workload data in the file, period."
  1. S DIR("?",2)=" "
  1. S DIR("?",3)="2 - will include only workload which is associated with a"
  1. S DIR("?",4)=" WKLD code that is marked as reportable for LMIP uses."
  1. S DIR("?",5)=" "
  1. S DIR("?",6)="3 - will include any workload which is not marked as"
  1. D ^DIR
  1. I ($D(DTOUT))!($D(DUOUT)) S LREND=1 Q
  1. S LRRTYP=Y
  1. Q