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

DG53757P.m

Go to the documentation of this file.
  1. DG53757P ;ALB/MRY - Add/Rename SURGICAL SPECIALTIES ; 6/4/07 11:05am
  1. ;;5.3;Registration;**757,1015**;Aug 13, 1993;Build 21
  1. ;
  1. EN ;
  1. S XPDABORT=""
  1. I '$G(DUZ)!($G(DUZ(0))'="@")!('$G(DT))!($G(U)'="^") D G ABRT
  1. . D BMES^XPDUTL("*****")
  1. . D MES^XPDUTL("Your Programming variables are not set up properly.")
  1. . D MES^XPDUTL("Installation aborted.")
  1. W !!,">> Environment check complete and okay."
  1. Q
  1. ;
  1. ABRT ;Abort transport, but leave in ^XTMP
  1. S XPDABORT=2 Q
  1. ;
  1. PRE ;pre-init
  1. ;kill off ^DD(45.01,3 field, refresh field found in Build
  1. ;inorder to remove SCREEN
  1. S DIK="^DD(45.01,",DA=3,DA(1)=45.01
  1. D ^DIK
  1. Q
  1. ;
  1. POST ;post-init
  1. N DGI,DGSPEC
  1. D BMES^XPDUTL("Updating Surgical Specialty (#45.3) File.....")
  1. F DGI=1:1 S DGSPEC=$P($T(SURGSP+DGI),";;",2) Q:DGSPEC="QUIT" D
  1. . D SURGTS
  1. Q
  1. ;
  1. SURGTS ;Add/Rename to new surgical specialties
  1. D BMES^XPDUTL(">>>"_$P(DGSPEC,U,3)_">>>")
  1. ;if oldcode exists and newcode exits, then error.
  1. I $D(^DIC(45.3,"B",$P(DGSPEC,U))),$D(^DIC(45.3,"B",$P(DGSPEC,U,2))) D ERROR Q
  1. ;if no oldcode, then add newcode.
  1. I '$D(^DIC(45.3,"B",$P(DGSPEC,U))) D ADD
  1. ;if oldcode exists, then edit oldcode to newcode.
  1. I $D(^DIC(45.3,"B",$P(DGSPEC,U))) D EDIT
  1. Q
  1. ;
  1. ERROR ;
  1. D MES^XPDUTL(" Entry not added to SURGICAL SPECIALTY File (#45.3). No further updating will occur.")
  1. D MES^XPDUTL(" Please contact Customer Service for assistance.")
  1. Q
  1. ;
  1. ADD ;add surgical specialty code
  1. N DIC,DIE,DGDA1,DLAYGO,DR,X,Y
  1. S DIC="^DIC(45.3,"
  1. S DIC(0)="LX"
  1. S X=$P(DGSPEC,U,2)
  1. S DLAYGO=45.3
  1. D ^DIC
  1. S DGDA1=Y
  1. I +DGDA1=-1 D Q
  1. .D MES^XPDUTL(" Entry not added to SURGICAL SPECIALTY File (#45.3). No furher updating will occur.")
  1. .D MES^XPDUTL(" Please contact Customer Service for assistance.")
  1. .Q
  1. I $P(DGDA1,U,3)'=1&($P(Y,U,2)'=$P(DGSPEC,U,2)) D Q
  1. .D MES^XPDUTL(" Entry exists in SURGICAL SPECIALTY File (#45.3), but with a different PTF Code #.")
  1. .D MES^XPDUTL(" No further updating will occur. Please review entry.")
  1. .Q
  1. D MES^XPDUTL(" Entry "_$S($P(DGDA1,U,3)=1:"added to",1:"exists in")_" SURGICAL SPECIALTY File (#45.3).")
  1. D MES^XPDUTL(" Updating SURGICAL SPECIALTY File fields.")
  1. S DIE=DIC
  1. S DR=".01///"_$P(DGSPEC,U,2)_";1///"_$P(DGSPEC,U,3)
  1. S DA=+DGDA1
  1. D ^DIE
  1. Q
  1. ;
  1. EDIT ;rename oldcode to newcode
  1. N DA,DIE,DR
  1. S DIE="^DIC(45.3,"
  1. S DIC(0)="X"
  1. S DA=$O(^DIC(45.3,"B",$P(DGSPEC,U),""))
  1. I +DA D
  1. .S DR=".01///"_$P(DGSPEC,U,2)
  1. .D ^DIE
  1. .D MES^XPDUTL(" Entry's code "_$P(DGSPEC,U)_" renamed to code "_$P(DGSPEC,U,2))
  1. .D MES^XPDUTL(" Updating SURGICAL SPECIALTY File fields.")
  1. Q
  1. SURGSP ;;OldCode^NewCode^Specialty
  1. ;;500^48^CARDIAC SURGERY
  1. ;;501^49^TRANSPLANTATION
  1. ;;502^78^ANESTHESIOLOGY
  1. ;;QUIT