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

PSS1P178.m

Go to the documentation of this file.
  1. PSS1P178 ;BP/CMF - PATCH PSS*1*178 Pre/Post-Init Rtn ;04/20/2010
  1. ;;1.0;PHARMACY DATA MANAGEMENT;**178**;9/30/97;Build 14
  1. ;
  1. ENV ;environment check
  1. S XPDABORT=""
  1. ;D PRODCHK(.XPDABORT) I XPDABORT=2 Q ;comment this line out after sprint 3
  1. D PROGCHK(.XPDABORT) ;checks programmer variables
  1. I XPDABORT="" K XPDABORT
  1. Q
  1. ;
  1. PRODCHK(XPDABORT) ;checks for test/production account
  1. I $$PROD^XUPROD DO
  1. . D BMES^XPDUTL("******")
  1. . D MES^XPDUTL("PSS*1*178 is not yet ready for production accounts.")
  1. . D MES^XPDUTL("Installation aborted.")
  1. . D MES^XPDUTL("******")
  1. . S XPDABORT=2
  1. Q
  1. ;
  1. PROGCHK(XPDABORT) ;checks for necessary programmer variables
  1. I '$G(DUZ)!($G(DUZ(0))'="@")!('$G(DT))!($G(U)'="^") DO
  1. . D BMES^XPDUTL("******")
  1. . D MES^XPDUTL("Your programming variables are not set up properly.")
  1. . D MES^XPDUTL("Installation aborted.")
  1. . D MES^XPDUTL("******")
  1. . S XPDABORT=2
  1. Q
  1. ;
  1. PRE ;; hook for pre install actions
  1. Q
  1. ;
  1. POST ;; hook for post install actions
  1. ;
  1. ;
  1. D BMES^XPDUTL("Now running Dose Unit and Dose Unit Conversion File updates...")
  1. ;
  1. MAIN ; Update entries in DOSE UNITS file (51.24)
  1. K XFAIL
  1. F CT=1:1:8 Q:'$G(CT) D @CT D BMES^XPDUTL("Update "_CT_" of 8 "_$S($G(XFAIL)=1:"FAILED",1:"PASSED")) K XFAIL
  1. K DIE,DR,DA,XFAIL,CT,XUMF
  1. D BMES^XPDUTL("-- UPDATE COMPLETE --")
  1. Q
  1. 1 ;Verify FDB DOSE Unit = APPLICATORFUL(S) Change as needed (2.6.23.2)
  1. ;
  1. ;^PS(51.24,2,0)="APPLICATORFUL(S)^APPLICATORFUL^1"
  1. ;
  1. K DIE,DR,DA
  1. S DA=2,XUMF=1
  1. S DIE="^PS(51.24,",DR="1////"_"APPLICATORFUL(S)"
  1. D ^DIE
  1. I $P($G(^PS(51.24,2,0)),"^",2)'="APPLICATORFUL(S)" S XFAIL=1 Q
  1. Q
  1. ;
  1. 2 ;Verify Synonym = APPLICATORFUL/S - Correct if needed Return Synonyms to correct state
  1. ;
  1. ;^PS(51.24,2,1,6,0)="APPLICATORFUL/S"
  1. ;
  1. K DIE,DR,DA
  1. S DA=6,DA(1)=2,XUMF=1
  1. S DIE="^PS(51.24,DA(1),1,",DR=".01////"_"APPLICATORFUL/S"
  1. D ^DIE
  1. I $G(^PS(51.24,2,1,6,0))'="APPLICATORFUL/S" S XFAIL=1 Q
  1. Q
  1. ;
  1. 3 ;Verify FDB DOSE Unit = SUPPOSITORY(IES) Change as needed (2.6.23.3)
  1. ;
  1. ;^PS(51.24,40,0)="SUPPOSITORY(IES)^SUPPOSITORY^1"
  1. ;
  1. K DIE,DR,DA
  1. S DA=40,XUMF=1
  1. S DIE="^PS(51.24,",DR="1////"_"SUPPOSITORY(IES)"
  1. D ^DIE
  1. I $P($G(^PS(51.24,40,0)),"^",2)'="SUPPOSITORY(IES)" S XFAIL=1 Q
  1. Q
  1. ;
  1. 4 ;Verify Synonym = SUPPOSITORY/IES and correct if needed
  1. ;
  1. ;^PS(51.24,40,1,4,0)="SUPPOSITORY/IES"
  1. ;
  1. K DIE,DR,DA
  1. S DA=4,DA(1)=40,XUMF=1
  1. S DIE="^PS(51.24,DA(1),1,",DR=".01////"_"SUPPOSITORY/IES"
  1. D ^DIE
  1. I $G(^PS(51.24,40,1,4,0))'="SUPPOSITORY/IES" S XFAIL=1 Q
  1. Q
  1. ;
  1. 5 ;CHANGE APPLICATORFUL/S to APPLICATORFUL(S) (2.6.21.10)
  1. ;
  1. ;^PS(51.25,3,0)="APPLICATORFUL/S"
  1. ;
  1. K DIE,DR,DA
  1. S DA=3,XUMF=1
  1. S DIE="^PS(51.25,",DR=".01////"_"APPLICATORFUL(S)"
  1. D ^DIE
  1. I $G(^PS(51.25,3,0))'="APPLICATORFUL(S)" S XFAIL=1 Q
  1. Q
  1. ;
  1. 6 ;CHANGE SUPPOSITORY/IES to SUPPOSITORY(IES) (2.6.21.9)
  1. ;
  1. ;^PS(51.25,9,1,18,0)="SUPPOSITORY/IES^1"
  1. ;
  1. K DIE,DR,DA
  1. S DA=18,DA(1)=9,XUMF=1
  1. S DIE="^PS(51.25,DA(1),1,",DR=".01////"_"SUPPOSITORY(IES)"
  1. D ^DIE
  1. I $P($G(^PS(51.25,9,1,18,0)),U,1)'="SUPPOSITORY(IES)" S XFAIL=1 Q
  1. Q
  1. ;
  1. 7 ;CHANGE SUPPOSITORY/IES to SUPPOSITORY(IES) (2.6.21.7)
  1. ;
  1. ;^PS(51.25,55,0)="SUPPOSITORY/IES"
  1. ;
  1. K DIE,DR,DA
  1. S DA=55,XUMF=1
  1. S DIE="^PS(51.25,",DR=".01////"_"SUPPOSITORY(IES)"
  1. D ^DIE
  1. I ($G(^PS(51.25,55,0)))'="SUPPOSITORY(IES)" S XFAIL=1 Q
  1. Q
  1. ;
  1. 8 ;APPLICATORFUL/S to APPLICATORFUL(S) (2.6.21.8)
  1. ;
  1. ;^PS(51.25,67,1,1,0)="APPLICATORFUL/S^1"
  1. ;
  1. K DIE,DR,DA
  1. S DA=1,DA(1)=67,XUMF=1
  1. S DIE="^PS(51.25,DA(1),1,",DR=".01////"_"APPLICATORFUL(S)"
  1. D ^DIE
  1. I $P($G(^PS(51.25,67,1,1,0)),U,1)'="APPLICATORFUL(S)" S XFAIL=1 Q
  1. Q
  1. ;
  1. ;
  1. RESET ;
  1. ;
  1. W !,"RESET 51.24!"
  1. ;
  1. R1 ;^PS(51.24,2,0)="APPLICATORFUL(S)^APPLICATORFUL^1"
  1. ;
  1. K DIE,DR,DA
  1. S DA=2,XUMF=1
  1. S DIE="^PS(51.24,",DR="1////"_"APPLICATORFUL"
  1. D ^DIE
  1. I $P($G(^PS(51.24,2,0)),"^",2)'="APPLICATORFUL" W !,"R1 FAILED!!",! G R2
  1. W !,"R1 PASSED!!"
  1. ;
  1. R2 ;^PS(51.24,2,1,6,0)="APPLICATORFUL/S"
  1. ;
  1. K DIE,DR,DA
  1. S DA=6,DA(1)=2,XUMF=1
  1. S DIE="^PS(51.24,DA(1),1,",DR=".01////"_"APPLICATORFUL/S"
  1. D ^DIE
  1. I $G(^PS(51.24,2,1,6,0))'="APPLICATORFUL/S" W !,"R2 FAILED!!" G R3
  1. W !,"R2 PASSED!!"
  1. ;
  1. R3 ;^PS(51.24,40,0)="SUPPOSITORY(IES)^SUPPOSITORY^1"
  1. ;
  1. K DIE,DR,DA
  1. S DA=40,XUMF=1
  1. S DIE="^PS(51.24,",DR="1////"_"SUPPOSITORY"
  1. D ^DIE
  1. I $P($G(^PS(51.24,40,0)),"^",2)'="SUPPOSITORY" W !,"R3 FAILED!!" G R4
  1. W !,"R3 PASSED!!"
  1. ;
  1. R4 ;
  1. ;^PS(51.24,40,1,4,0)="SUPPOSITORY/IES"
  1. ;Reset SUPPOSITORY(IES) TO SUPPOSITORY/IES for testing
  1. N DIE,DR,DA
  1. S DA=4,DA(1)=40,XUMF=1
  1. S DIE="^PS(51.24,DA(1),1,",DR=".01////"_"SUPPOSITORY/IES"
  1. D ^DIE
  1. I $G(^PS(51.24,40,1,4,0))'="SUPPOSITORY/IES" W !,"R4 Failed!" G R5
  1. W !,"R4 PASSED!!"
  1. ;
  1. W !!,"RESET 51.25!"
  1. ;
  1. R5 ;
  1. ;^PS(51.25,3,0)="APPLICATORFUL/S"
  1. ;RESET APPLICATORFUL(S) to APPLICATORFUL/S for testing
  1. ;
  1. K DIE,DR,DA
  1. S DA=3,XUMF=1
  1. S DIE="^PS(51.25,",DR=".01////"_"APPLICATORFUL/S"
  1. D ^DIE
  1. I $G(^PS(51.25,3,0))'="APPLICATORFUL/S" W !,"R5 Failed!" G R6
  1. W !,"R5 PASSED!!"
  1. ;
  1. R6 ;
  1. ;^PS(51.25,9,1,18,0)="SUPPOSITORY/IES^1"
  1. ;RESET SUPPOSITORY(IES) to SUPPOSITORY/IES
  1. ;
  1. N DIE,DR,DA
  1. S DA=18,DA(1)=9,XUMF=1
  1. S DIE="^PS(51.25,DA(1),1,",DR=".01////"_"SUPPOSITORY/IES"
  1. D ^DIE
  1. I $P($G(^PS(51.25,9,1,18,0)),U,1)'="SUPPOSITORY/IES" W !,"R6 Failed!" G R7
  1. W !,"R6 PASSED!!"
  1. ;
  1. R7 ;
  1. ;^PS(51.25,55,0)="SUPPOSITORY/IES"
  1. ;RESET SUPPOSITORY(IES) to SUPPOSITORY/IES
  1. ;
  1. ;^PS(51.25,55,0)="SUPPOSITORY/IES"
  1. ;
  1. K DIE,DR,DA
  1. S DA=55,XUMF=1
  1. S DIE="^PS(51.25,",DR=".01////"_"SUPPOSITORY/IES"
  1. D ^DIE
  1. I ($G(^PS(51.25,55,0)))'="SUPPOSITORY/IES" W !,"R7 Failed!" G R8
  1. W !,"R7 PASSED!!"
  1. ;
  1. R8 ;
  1. ;^PS(51.25,67,1,1,0)="APPLICATORFUL/S^1"
  1. ;RESET APPLICATORFUL(S) to APPLICATORFUL/S
  1. ;
  1. N DIE,DR,DA
  1. S DA=1,DA(1)=67,XUMF=1
  1. S DIE="^PS(51.25,DA(1),1,",DR=".01////"_"APPLICATORFUL/S"
  1. D ^DIE
  1. I $P($G(^PS(51.25,67,1,1,0)),U,1)'="APPLICATORFUL/S" W !,"R8 Failed!" Q
  1. W !,"R8 PASSED!!",!!!
  1. ;
  1. Q