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

PSS102RP.m

Go to the documentation of this file.
PSS102RP ;OIFO BAY PINES/VGF - TEMP RTN TO UPDATE PLACE OF VISIT IN FILE 1020.2;3/30/04
 ;;1.0;PHARMACY DATA MANAGEMENT;**102**;9/30/97
 N PSSIEN,PSSDRG,PSSDRUGT,PSSSPCE,PSSDUZ,PSSLN,PSSDRUG
 N XMDUZ,XMSUB,XMTEXT,XMY
 S PSSDUZ=DUZ
 K ^TMP($J,"PSS102"),^XTMP("PSS102")
 S PSSIEN="" F  S PSSIEN=$O(^PS(50.7,PSSIEN)) Q:PSSIEN=""  D
 .S PSSDRG="" F  S PSSDRG=$O(^PS(50.7,PSSIEN,1,"B",PSSDRG)) Q:PSSDRG=""  D
 ..S PSSDRUGT=$G(^PS(51.7,PSSDRG,0))
 ..I $D(^PS(50.7,PSSIEN,2,"B",PSSDRUGT)) Q
 ..S ^XTMP("PSS102",PSSIEN,PSSDRUGT)=""
 I $O(^XTMP("PSS102",""))="" S ^XTMP("PSS102","NO DRUGS TO LIST","NO DRUGS TO LIST")=""
 S ^TMP($J,"PSS102")=""
 S ^TMP($J,"PSS102",0)=" "
 S ^TMP($J,"PSS102",1)=" "
 S ^TMP($J,"PSS102",2)="DRUG TEXT REPORT"
 S ^TMP($J,"PSS102",3)=" "
 S ^TMP($J,"PSS102",4)="This report will list the Drug Text entries in the Pharmacy"
 S ^TMP($J,"PSS102",5)="Orderable Item file (#50.7) which are not also set up as"
 S ^TMP($J,"PSS102",6)="Synonyms"
 S ^TMP($J,"PSS102",7)=" "
 S ^TMP($J,"PSS102",8)="DRUG NAME                    DRUG TEXT ENTRY"
 S ^TMP($J,"PSS102",9)="---------                    ---------------"
 S ^TMP($J,"PSS102",10)=" "
 S PSSLN=11,$P(PSSSPCE," ",25)=""
 S PSSIEN="" F  S PSSIEN=$O(^XTMP("PSS102",PSSIEN)) Q:PSSIEN=""  D
 .S PSSDRUG=$P($G(^PS(50.7,PSSIEN,0)),"^")
 .S PSSDRUGT="" F  S PSSDRUGT=$O(^XTMP("PSS102",PSSIEN,PSSDRUGT)) Q:PSSDRUGT=""  D
 ..S ^TMP($J,"PSS102",PSSLN)=$E(PSSDRUG_PSSSPCE,1,25)_"     "_$E(PSSDRUGT_PSSSPCE,1,25)
 ..S PSSLN=PSSLN+1
QUEUE ;Send report to user
 S XMSUB="PHARMACY DATA MANAGEMENT",XMTEXT="^TMP("_$J_","_"""PSS102"""_",",XMDUZ="PATCH PSS*1.0*102",XMY(PSSDUZ)=""
 D SENDMSG^XMXAPI(PSSDUZ,XMSUB,"^TMP("_$J_","_"""PSS102"""_")",PSSDUZ)
 K ^TMP($J)
 Q