source: WorldVistAEHR/trunk/r/E_CLAIMS_MGMT_ENGINE-BPS/BPSJVAL.m@ 1261

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

initial load of WorldVistAEHR

File size: 2.4 KB
RevLine 
[613]1BPSJVAL ;BHAM ISC/LJF - Pharmacy data entry ;2004-03-01
2 ;;1.0;E CLAIMS MGMT ENGINE;**1,2**;JUN 2004;Build 12
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 D ^BPSJVAL1
6 K DIR,X S DIR(0)="EO" D ^DIR
7 I X=U Q
8 D ^BPSJVAL2
9 Q
10 ;
11VAL1(VALCK) ; Application
12 N RETCODE,VERBOSE,IX2
13 ;
14 ; VALCK=0 = validation, HL7 trigger, no display
15 I '$G(VALCK) N RETCODE D Q RETCODE ; 0 means ok, '0 means invalid
16 . ;-validate and quit if ok
17 . S RETCODE=0 D VALIDATE^BPSJVAL1 I $G(BPSJVALR)=-1 S BPSJVALR=RETCODE
18 . I 'RETCODE Q
19 . ;-invalid data, send an email
20 . S MCT=1+$G(MCT),MSG(MCT)="ECME Application Registration HL7 Message not created."
21 . F IX2=1:1:RETCODE I $G(RETCODE(IX2))]"" D
22 .. S MCT=1+MCT,MSG(MCT)=$G(RETCODE(IX2))
23 . D MSG^BPSJUTL(.MSG,"ECME Application Registration")
24 ;
25 ; VALCK=1 = validation, HL7 trigger, display
26 I $G(VALCK)=1 N RETCODE D Q RETCODE ; 0 means ok, '0 means invalid
27 . S RETCODE=0,VERBOSE=1 D VALIDATE^BPSJVAL1
28 . I $G(BPSJVALR)=-1 S BPSJVALR=RETCODE
29 ;
30 ; VALCK=2 = validation, no HL7 trigger, display
31 I $G(VALCK)=2 N RETCODE D Q 1
32 . S RETCODE=0,VERBOSE=1 D VALIDATE^BPSJVAL1
33 . I $G(BPSJVALR)=-1 S BPSJVALR=RETCODE
34 ;
35 ; VALCK=3 = validation, no HL7 trigger, no display
36 I $G(VALCK)=3 N RETCODE D Q 1
37 . S RETCODE=0 D VALIDATE^BPSJVAL1
38 . I $G(BPSJVALR)=-1 S BPSJVALR=RETCODE
39 ;
40 Q
41 ;
42VAL2(VALCK,BPSJD) ; Pharmacies
43 N RETCODE,VERBOSE,IX2
44 ;
45 ; VALCK=0 = validation, HL7 trigger, no display
46 I '$G(VALCK) N RETCODE D Q RETCODE ; 0 means ok, '0 means invalid
47 . ;-validate and quit if ok
48 . S RETCODE=0 D VALIDATE^BPSJVAL2(BPSJD) I $G(BPSJVALR)=-1 S BPSJVALR=RETCODE
49 . I 'RETCODE Q
50 . ;-invalid data, send an email
51 . S MCT=1+$G(MCT),MSG(MCT)="ECME Pharmacy Registration HL7 Message not created."
52 . F IX2=1:1:RETCODE I $G(RETCODE(IX2))]"" D
53 .. S MCT=1+MCT,MSG(MCT)=$G(RETCODE(IX2))
54 . D MSG^BPSJUTL(.MSG,"ECME Pharmacy Registration")
55 ;
56 ; VALCK=1 = validation, HL7 trigger, display
57 I $G(VALCK)=1 N RETCODE D Q RETCODE ; 0 means ok, '0 means invalid
58 . S RETCODE=0,VERBOSE=1 D VALIDATE^BPSJVAL2(BPSJD)
59 . I $G(BPSJVALR)=-1 S BPSJVALR=RETCODE
60 ;
61 ; VALCK=2 = validation, no HL7 trigger, display
62 I $G(VALCK)=2 N RETCODE D Q 1
63 . S RETCODE=0,VERBOSE=1 D VALIDATE^BPSJVAL2(BPSJD)
64 . I $G(BPSJVALR)=-1 S BPSJVALR=RETCODE
65 ;
66 ; VALCK=3 = validation, no display, no HL7 trigger
67 I $G(VALCK)=3 N RETCODE D Q 1
68 . S RETCODE=0 D VALIDATE^BPSJVAL2(BPSJD)
69 . I $G(BPSJVALR)=-1 S BPSJVALR=RETCODE
70 ;
71 Q
Note: See TracBrowser for help on using the repository browser.