source: WorldVistAEHR/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSSMSTR.m@ 1806

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

initial load of WorldVistAEHR

File size: 1.0 KB
Line 
1PSSMSTR ;BIR/PWC-Send Master Drug File to External Interface ;04/05/04
2 ;;1.0;PHARMACY DATA MANAGEMENT;**82**;09/30/97
3 ;Reference to ^PS(59 supported by IA # 1976
4 ;
5 ;This routine will walk through the Drug file and send all drugs
6 ;to each dispensing machine for each outpatient site file.
7 ;It will only send to each site that has a dispensing machine running
8 ;HL7 V.2.4 and has the Master File Update enabled.
9 ;Task this job out
10 ;
11 S ZTRTN="BUILD^PSSMSTR",ZTDESC="MASTER DRUG FILE UPDATE",ZTIO=""
12 S ZTDTH=$H D NOW^%DTC S PSSDTM=% D ^%ZTLOAD
13 Q
14 ;
15BUILD N XX,DVER,DMFU,DNSNAM,DNSPORT
16 F XX=0:0 S XX=$O(^PSDRUG(XX)) Q:'XX D
17 . F YY=0:0 S YY=$O(^PS(59,YY)) Q:'YY D
18 .. S DVER=$$GET1^DIQ(59,YY_",",105,"I") Q:DVER'="2.4" ;HL7 2.4
19 .. S DMFU=$$GET1^DIQ(59,YY_",",105.2) Q:DMFU'="YES" ;enable MFU
20 .. S DNSNAM=$$GET1^DIQ(59,YY_",",2006) ;DNS name of dispense machine
21 .. S DNSPORT=$$GET1^DIQ(59,YY_",",2007) ;Port # of dispense machine
22 .. I DNSNAM'="" D DRG^PSSDGUPD(XX,"NEW",DNSNAM,DNSPORT)
23 K XX,YY,DVER,DMFU,DNSNAM,DNSPORT
24 Q
Note: See TracBrowser for help on using the repository browser.