source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRARCR1A.m@ 1259

Last change on this file since 1259 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1LRARCR1A ;DALISC/CKA - ARCHIVED WKLD REP GENERATOR-SELECT ;
2 ;;5.2;LAB SERVICE;**59**;August 31, 1995
3 ;same as LRCAPR1A except now references archived files
4ACCN ;
5 K DIC S DIC=68,DIC(0)="AEMQZ" D ^DIC Q:Y=-1 S LRX=$P(Y,U,2),LRAA=+Y Q
6DATE ;
7 K LRSDT,LREDT
8 D ^LRWU3 Q:$G(LREND) S LRSDT=(LRSDT-.5),LREDT=$S(LREDT'=1000000:LREDT,1:DT)
9 S LRFRV=+LRSDT,LRFR=$P(+LRSDT,".") S LRFRD=$$DTF^LRAFUNC1(LRSDT)
10 S LRTOV=+LREDT,LRTO=$P(+LREDT,".") S LRTOD=$$DTF^LRAFUNC1(LREDT)
11 S LRDTH="From: "_LRFRD_" --- To: "_LRTOD
12 Q
13SPEC ;
14 K DIC S DIC="^LAB(61,"
15 S DIC(0)="AEMQ",DIC("A")="Topography or Specimen : ALL/ "
16 F I=1:1 D ^DIC Q:Y=-1 S LRSP(+Y)=+Y,DIC("A")=" Select another specimen: ",LRSP=I
17 Q
18COLL ;
19 K DIC S DIC="^LAB(62,",DIC(0)="AEMQ"
20 F I=1:1 D ^DIC Q:Y=-1 S DIC("A")="Select another Collection Sample: ",LRCOL(+Y)=+Y,LRCOL=I
21 Q
22TEST ;
23 K DIC S DIC="^LAB(60,",DIC(0)="AEMQ"
24 S DIC("A")="Select LABORATORY TEST: All//"
25 F I=1:1 D ^DIC Q:Y=-1 S LRTSTS(+Y)=$P(Y,U),LRTSTS=I,DIC("A")=" Select another LAB test: "
26 Q
27CAP ;
28 K DIC S DIC="^LAM(",DIC(0)="AEMQ",DIC("A")="Select WKLD CODES: All//"
29 F I=1:1 D ^DIC Q:Y=-1 S LRCAPS(+Y)=$P(^(0),U,2),LRCAPS=I,DIC("A")="Select another WKLD code:"
30 Q
31INSTR ;
32 K DIC S DIC=64.2
33 S DIC(0)="AEMQ",DIC("A")="Select INSTRUMENT or WKLD SUFFIX CODE: All//"
34 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 "
35 Q
36STAT ;
37 K DIC S DIC=62.05,DIC(0)="AEMQ"
38 S DIC("A")="Select URGENCY to be counted as STAT: ",DIC("B")="STAT"
39 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")
40 Q:'$D(LRSTAT) K DIC,DUOUT
41 S %=2 W !!,"Do you want to look up only tests with a STAT urgency"
42 S LRSTAT=0 D YN^DICN S:%=1 LRSTAT=1
43 Q
44LOC ;
45 K DIC S DIC="^SC(",DIC(0)="AEMQ",DIC("A")="Select LOCATION NAME: All//"
46 F I=1:1 D ^DIC Q:Y=-1 S LRLOC(+Y)=$P(^(0),U),DIC("A")="Select another location: ",LRLOC=I
47 Q
48IOPAT ;
49 K DIR,Y S DIR(0)="SB^I:INPATIENTS;O:OUTPATIENTS;R:OTHER;A:ALL"
50 S DIR("B")="ALL",DIR("A")="Select Patient Type: "
51 S DIR("?")="-------------------------"
52 S DIR("?",1)="The codes are as follows:"
53 S DIR("?",2)="-------------------------"
54 S DIR("?",3)=" I - INPATIENTS "
55 S DIR("?",4)=" O - OUTPATIENTS "
56 S DIR("?",5)=" R - OTHER PATIENTS "
57 S DIR("?",6)=" A - ALL OF THE ABOVE"
58 F D ^DIR D Q:($D(DUOUT))!($D(DTOUT))!(X="")
59 . Q:($D(DUOUT))!($D(DTOUT))!(X="")
60 . I Y="A" S LRIOPAT="IORA",X="" Q
61 . S LRIOPAT=$S('$D(LRIOPAT):Y,LRIOPAT[Y:LRIOPAT,1:LRIOPAT_Y)
62 . I (LRIOPAT["I")&(LRIOPAT["O")&(LRIOPAT["R") S LRIOPAT="IORA",DUOUT=1 Q
63 . K DIR("B")
64 . S DIR("A")="Select another Patient Type: "
65 . S $P(DIR(0),U)="SBO"
66 Q
67CONTROL ;
68 S %=2
69 W !!,"Do you want to see a break out of controls for the condensed"
70 W " section:",!,"TESTS by INSTRUMENTS"
71 S LRCTL=0
72 D YN^DICN
73 I %=0 W !!,"Enter YES if you want this extra section printed, NO if you don't." G CONTROL
74 I %<0 S LREND=1 Q
75 S:%=1 LRCTL=1
76 Q
77REPTYP ;
78 K DIR
79 S DIR(0)="S^1:All workload;2:LMIP reportable workload;3:Non-LMIP workload"
80 S DIR("A")="Enter the number for the workload data to report"
81 S DIR("B")=1
82 S DIR("?")=" reportable for LMIP."
83 S DIR("?",1)="1 - will include all workload data in the file, period."
84 S DIR("?",2)=" "
85 S DIR("?",3)="2 - will include only workload which is associated with a"
86 S DIR("?",4)=" WKLD code that is marked as reportable for LMIP uses."
87 S DIR("?",5)=" "
88 S DIR("?",6)="3 - will include any workload which is not marked as"
89 D ^DIR
90 I ($D(DTOUT))!($D(DUOUT)) S LREND=1 Q
91 S LRRTYP=Y
92 Q
Note: See TracBrowser for help on using the repository browser.