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

PSSP159.m

Go to the documentation of this file.
  1. PSSP159 ;BIRM/SJA-Pharmacy system site parameters ;09/24/10
  1. ;;1.0;PHARMACY DATA MANAGEMENT;**159**;9/30/97;Build 29
  1. ;
  1. Q
  1. POST ; delete data of the DEFAULT MED ROUTE FOR CPRS field (#80.7)
  1. K DIE,DA,DR S DIE=59.7,DR="80.7///@",DA=1 D ^DIE K DA,DIE,DR
  1. ;
  1. ; delete DD for the DEFAULT MED ROUTE FOR CPRS field (#80.7)
  1. S DIK="^DD(59.7,",DA=80.7,DA(1)=59.7 D ^DIK K DA,DIK
  1. ;
  1. ; if no default med route, no possible med routes and the USE DOSAGE FORM MED ROUTE LIST field is set to NO
  1. ; change the field to "YES" and generate mailman message.
  1. S MCT=1,PSSIEN=0 F S PSSIEN=$O(^PS(50.7,PSSIEN)) Q:'PSSIEN I $D(^(PSSIEN,0)) S PSSNODE0=$G(^PS(50.7,PSSIEN,0)) D
  1. .I $P(PSSNODE0,"^",13)="N",'$P($G(^PS(50.7,PSSIEN,0)),"^",6)&('$O(^PS(50.7,PSSIEN,3,0))) D
  1. ..S $P(^PS(50.7,PSSIEN,0),"^",13)="Y",^TMP($J,"PSSP159",MCT)=$J(PSSIEN,10)_" "_$E($P(PSSNODE0,"^"),1,20),MCT=MCT+1
  1. MAIL ; create mail message
  1. D BMES^XPDUTL(" Generating Mail Message....")
  1. N XMDUZ,XMSUB,XMTEXT,XMY,DIFROM
  1. S XMDUZ="Patch PSS*1*159 Post Install"
  1. F PSSFDS=0:0 S PSSFDS=$O(@XPDGREF@("PSSARX",PSSFDS)) Q:'PSSFDS S XMY(PSSFDS)=""
  1. S XMSUB="Pharmacy Orderable Item Updates",XMTEXT="PSSTMP("
  1. S PSSTMP(1)="Pharmacy Orderable Item Auto-change:",PSSTMP(2)=""
  1. S PSSTMP(3)="The USE DOSAGE FORM MED ROUTE LIST field of the following Orderable Items"
  1. S PSSTMP(4)="has been changed from NO to YES because these Orderable Items did not have the"
  1. S PSSTMP(5)="DEFAULT MED ROUTE and/or any POSSIBLE MED ROUTES populated. The medication"
  1. S PSSTMP(6)="routes associated with the Dosage Form for these Orderable Items will be "
  1. S PSSTMP(7)="displayed for selection in CPRS, as they were prior to this patch."
  1. S PSSTMP(8)=""
  1. S PSSTMP(9)="If you wish to make adjustments to the Medication Routes that display in CPRS "
  1. S PSSTMP(10)="for these Orderable Items, use the Edit Orderable Items [PSS EDIT ORDERABLE "
  1. S PSSTMP(11)="ITEMS] option."
  1. S PSSTMP(12)=""
  1. S PSSTMP(13)="",PSSTMP(14)="OI Number OI NAME",PSSTMP(15)="========== ===================="
  1. S CNT=15,X=0 F S X=$O(^TMP($J,"PSSP159",X)) Q:'X S CNT=CNT+1,PSSTMP(CNT)=$G(^(X))
  1. I '$O(^TMP($J,"PSSP159",0)) S CNT=16,PSSTMP(16)=" None Found"
  1. D ^XMD K PSSTMP,^TMP($J,"PSSP159")
  1. D BMES^XPDUTL(" Mail message sent.")
  1. Q