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