source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXEDILUD.m@ 1742

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1PXEDILUD ;ISL/PKR - Establish the details for looking up PCE device interface errors. ;6/7/96
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
3 ;
4 ;=======================================================================
5DT(BDATE,EDATE,TYPE) ;Date and time range.
6BDATE ;Select the beginning date.
7 N X,Y
8 K DIRUT,DTOUT,DUOUT
9 S DIR(0)="D^:DT:EPTX"
10 S DIR("A")="Enter beginning "_TYPE_" date and time"
11 S DIR("??")=U_"D BDHELP^PXEDILUD"
12 W !
13 D ^DIR K DIR
14 I Y=(U_U) S DTOUT=1
15 I $D(DTOUT)!($D(DUOUT)) Q
16 S BDATE=Y
17 I $E(Y,6,7)="00" W $C(7)," ?? Enter exact date" G BDATE
18 ;
19EDATE ;Select the ending date.
20 N NOW
21 S NOW=$$FMTE^XLFDT($$NOW^XLFDT,"1")
22 S DIR(0)="D^"_BDATE_":NOW:ESTX"
23 S DIR("A")="Enter the ending "_TYPE_" date and time"
24 S DIR("B")=NOW
25 S DIR("??")=U_"D EDHELP^PXEDILUD"
26 W !
27 D ^DIR K DIR
28 I $D(DUOUT) G BDATE
29 I Y=(U_U) S DTOUT=1
30 I $D(DTOUT)!($D(DUOUT)) Q
31 S EDATE=Y
32 I $E(Y,6,7)="00" W $C(7)," ?? Enter exact date" G EDATE
33 K DIRUT,DTOUT,DUOUT
34 Q
35 ;
36BDHELP ;Write the beginning date help.
37 W !!,"This is the beginning date and time for "_TYPE_"S that should be scanned"
38 W !,"for errors."
39 Q
40 ;
41EDHELP ;Write the ending date help.
42 W !!,"This is the ending date and time for "_TYPE_"S that should be scanned"
43 W !,"for errors."
44 Q
45 ;
46 ;=======================================================================
47EN(BEN,EEN) ;Error number range.
48BENUM ;Beginning error number.
49 ;Find the beginning and ending error numbers for the prompt.
50 N TBEN,TEEN
51 S TBEN=$O(^PX(839.01,0))
52 I TBEN="" D Q
53 . S (BEN,EEN)=0
54 S TEEN=$O(^PX(839.01,"A"),-1)
55 ;
56 N X,Y
57 K DIRUT,DTOUT,DUOUT
58 S DIR(0)="N^"_TBEN_":"_TEEN
59 S DIR("A")="Enter the beginning error number"
60 S DIR("B")=TBEN
61 S DIR("??")=U_"D BENHELP^PXEDILUD"
62 W !
63 D ^DIR K DIR
64 I Y=(U_U) S DTOUT=1
65 I $D(DTOUT)!($D(DUOUT)) Q
66 S BEN=Y
67 ;
68EENUM ;Ending error number.
69 S DIR(0)="N^"_BEN_":"_TEEN
70 S DIR("A")="Enter the ending error number"
71 S DIR("B")=TEEN
72 S DIR("??")=U_"D EENHELP^PXEDILUD"
73 W !
74 D ^DIR K DIR
75 I $D(DUOUT) G BENUM
76 I Y=(U_U) S DTOUT=1
77 I $D(DTOUT)!($D(DUOUT)) Q
78 S EEN=Y
79 K DIRUT,DTOUT,DUOUT
80 Q
81 ;
82BENHELP ;Write the beginning error number help.
83 W !!,"This is the beginning error number."
84 Q
85 ;
86EENHELP ;Write the ending error number help.
87 W !!,"This is the ending error number. If it is equal to the beginning error"
88 W !,"number then only one error number will be used. Otherwise all error numbers"
89 W !,"in the range specified by the beginning and ending error numbers will be used."
90 Q
91 ;
92 ;=======================================================================
93PAT ;Patient
94 N DIC,X,Y
95 S NPATIENT=0
96 S DIC("A")="Select Patient: "
97 S DIC("S")="I $D(^PX(839.01,""C"",Y))"
98NPAT S DIC=2
99 I NPATIENT>0 S DIC("A")="Select another Patient: "
100 S DIC(0)="AEQMZ"
101 D ^DIC
102 I Y=-1 G DPAT
103 I $D(DTOUT)!$D(DUOUT) Q
104 S NPATIENT=NPATIENT+1
105 S PATIENT(NPATIENT)=+$P(Y,U,1)
106 G NPAT
107 ;
108DPAT ;
109 Q
110 ;
Note: See TracBrowser for help on using the repository browser.