source: WorldVistAEHR/trunk/r/PHARMACY_PRESCRIPTION_PRACTICE-PPP/PPPBLD4.m@ 1464

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1PPPBLD4 ;ALB/DMB - ADD NEW PATS TO FFX FROM CDROM ; 3/9/92
2 ;;1.0;PHARMACY PRESCRIPTION PRACTICE;**38**;APR 7,1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5NEWPAT ;
6 ;
7 N BFFXEND,BFFXSTRT,EXCARRY,INARRY,OUTARRY,LKUPERR,TMP,RESULT
8 N LOGMSG,STANO,UCI,ZERONODE,NOSSNERR
9 ;
10 S PPPMRT="NEWPAT_PPPBLD4"
11 S LKUPERR=-9003
12 S NOSSNERR=-9017
13 S BFFXSTRT=1012
14 S BFFXEND=1013
15 ;
16 ; Initialize the input, output and exclusion arrays.
17 ; Note: Leave off the ^ as we will add it later.
18 ;
19 S INARRY="TMP(""PPP"","_$J_",""IN"")"
20 S OUTARRY="TMP(""PPP"","_$J_",""OUT"")"
21 S EXCARRY="TMP(""PPP"","_$J_",""EXC"")"
22 S SSNARRY="^PPP(1020.7,""B"")"
23 ;
24 ; Log start of routine.
25 ;
26 S TMP=$$LOGEVNT^PPPMSC1(BFFXSTRT,PPPMRT)
27 ;
28 ;VMP OIFO BAY PINES;ELR;PPP*1*38
29 S X="MPIF001" X ^%ZOSF("TEST") I '$T D Q
30 .S TMP=$$LOGEVNT^PPPMSC1(LKUPERR,PPPMRT,"MPI not Installed")
31 .S PPPTMP(1)="CDROM^PPPBLD3 -> MPI not installed."
32 .S TMP=$$SNDBLTN^PPPMSC1("PPP NOTIFICATION","PRESCRIPTION PRACTICES","PPPTMP(")
33 .K PPPMRT,PPPTMP
34 ; Get the station number from the parameter file.
35 ;
36 S STANO=$P($G(^PPP(1020.1,1,0)),"^",9)
37 I STANO="" D Q
38 .S TMP=$$LOGEVNT^PPPMSC1(LKUPERR,PPPMRT,"Station Number Not Found")
39 .S PPPTMP(1)="CDROM^PPPBLD3 -> Station Number Not In Parameter File"
40 .S TMP=$$SNDBLTN^PPPMSC1("PPP NOTIFICATION","PRESCRIPTION PRACTICES","PPPTMP(")
41 .K PPPMRT,PPPTMP
42 ;
43 ; Get the UCI from Kernel.
44 ;VMP OIFO BAY PINES;ELR;PPP*1*38
45 ;removed getting uci and setting extended reference for "TMP" global
46 ;
47 ; Build the required variables
48 ;
49 S INARRY="^"_INARRY
50 S OUTARRY="^"_OUTARRY
51 S EXCARRY="^"_EXCARRY
52 S @EXCARRY@(STANO)=""
53 ; Check for SSN's to process
54 ;
55 I '$D(@SSNARRY) D Q
56 .S TMP=$$LOGEVNT^PPPMSC1(NOSSNERR,PPPMRT)
57 .K PPPMRT
58 ;
59 ; Copy the New SSN File to the inarry.
60 ;
61 S %X="^PPP(1020.7,""B"","
62 S %Y="^TMP(""PPP"","_$J_",""IN"","
63 D %XY^%RCR
64 ;
65 ; Now call the build routine.
66 ;
67 S RESULT=$$BFFX^PPPBLD1(INARRY,OUTARRY,EXCARRY,"")
68 ;
69 ;VMP OIFO BAY PINES;ELR;PPP*1*38
70 ;removed setting ZERO NODE MANUALLY USE ^DIK IN PPPBLD1A
71 ;
72 ; Log the end of the routine.
73 ;
74 S LOGMSG="Result: "_$P(RESULT,"^")_", New Entries: "_$P(RESULT,"^",2)_", Edited Entries: "_$P(RESULT,"^",3)
75 S TMP=$$LOGEVNT^PPPMSC1(BFFXEND,PPPMRT,LOGMSG)
76 K PPPMRT,PPPTMP,@INARRY,@OUTARRY,@EXCARRY
77 Q
Note: See TracBrowser for help on using the repository browser.