Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PSSMSTR

PSSMSTR.m

Go to the documentation of this file.
  1. PSSMSTR ;BIR/PWC-Send Master Drug File to External Interface ;04/05/04
  1. ;;1.0;PHARMACY DATA MANAGEMENT;**82**;09/30/97
  1. ;Reference to ^PS(59 supported by IA # 1976
  1. ;
  1. ;This routine will walk through the Drug file and send all drugs
  1. ;to each dispensing machine for each outpatient site file.
  1. ;It will only send to each site that has a dispensing machine running
  1. ;HL7 V.2.4 and has the Master File Update enabled.
  1. ;Task this job out
  1. ;
  1. S ZTRTN="BUILD^PSSMSTR",ZTDESC="MASTER DRUG FILE UPDATE",ZTIO=""
  1. S ZTDTH=$H D NOW^%DTC S PSSDTM=% D ^%ZTLOAD
  1. Q
  1. ;
  1. BUILD N XX,DVER,DMFU,DNSNAM,DNSPORT
  1. F XX=0:0 S XX=$O(^PSDRUG(XX)) Q:'XX D
  1. . F YY=0:0 S YY=$O(^PS(59,YY)) Q:'YY D
  1. .. S DVER=$$GET1^DIQ(59,YY_",",105,"I") Q:DVER'="2.4" ;HL7 2.4
  1. .. S DMFU=$$GET1^DIQ(59,YY_",",105.2) Q:DMFU'="YES" ;enable MFU
  1. .. S DNSNAM=$$GET1^DIQ(59,YY_",",2006) ;DNS name of dispense machine
  1. .. S DNSPORT=$$GET1^DIQ(59,YY_",",2007) ;Port # of dispense machine
  1. .. I DNSNAM'="" D DRG^PSSDGUPD(XX,"NEW",DNSNAM,DNSPORT)
  1. K XX,YY,DVER,DMFU,DNSNAM,DNSPORT
  1. Q