source: FOIAVistA/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSODAWUT.m@ 1452

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1PSODAWUT ;BIRM/MFR - BPS (ECME) - DAW Utilities ;10/15/04
2 ;;7.0;OUTPATIENT PHARMACY;**148,260**;DEC 1997;Build 84
3 ;Reference to $$DAWEXT^PSSDAWUT supported by IA 4708
4 ;
5GETDAW(RX,RFL) ; Returns the DAW code for a specific Prescription/Fill
6 ;Input: (r) RX - Rx IEN (#52)
7 ; (o) RFL - Refill # (Default: most recent)
8 ;
9 I '$D(RFL) S RFL=$$LSTRFL^PSOBPSU1(RX)
10 ;
11 I 'RFL Q +$$GET1^DIQ(52,RX,81)
12 Q +$$GET1^DIQ(52.1,RFL_","_RX,81)
13 ;
14SAVDAW(RX,RFL,DAW) ; - Saves the DAW code for a specific Prescription/Fill
15 ;Input: (r) RX - Rx IEN (#52)
16 ; (o) RFL - Refill # (Default: most recent)
17 ;
18 I '$D(RFL) S RFL=$$LSTRFL^PSOBPSU1(RX)
19 ;
20 I $$GETDAW(RX,RFL)'=DAW D
21 . D RXACT^PSOBPSU2(RX,RFL,"DAW CODE changed from "_$$GETDAW(RX,RFL)_" to "_DAW_".","E")
22 ;
23 N DIE,DA,DR
24 S DR="81///"_+DAW
25 I 'RFL S DA=RX,DIE="^PSRX(" D ^DIE
26 I RFL,$D(^PSRX(RX,1,RFL,0)) S DIE="^PSRX("_RX_",1,",DA(1)=RX,DA=RFL D ^DIE
27 Q
28 ;
29EDTDAW(RX,RFL,DAW) ; - Edits the DAW code for a specific Prescription/Fill W/OUT SAVING IT
30 ;Input: (r) RX - Rx IEN (#52)
31 ; (o) RFL - Refill # (Default: most recent)
32 ; (o) DAW - Default DAW code (Default: from Rx file)
33 ;Output: $$EDTDAW - DAW code selected or "^" (up arrow)
34 ;
35 N DIR,Y,DA
36 I '$D(RFL) S RFL=$$LSTRFL^PSOBPSU1(RX)
37 ;
38 I '$D(DAW) S DAW=$$GETDAW(RX,RFL)
39 ;
40 I $$STATUS^PSOBPSUT(RX,RFL)="" Q
41 ;
42 S DIR(0)="52,81",DIR("B")=DAW D ^DIR I $D(DIRUT) S DAW="^" Q
43 S DAW=Y W " - ",$$DAWEXT^PSSDAWUT(DAW)
44 Q
Note: See TracBrowser for help on using the repository browser.