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

DVBA173P.m

Go to the documentation of this file.
  1. DVBA173P ;ALB/SBW - PATCH DVBA*2.7*173 PRE/POST INSTALL UTILITIES ; 22/JUN/2011
  1. ;;2.7;AMIE;**173**;Apr 10, 1995;Build 2
  1. ;
  1. ;No direct entry allowed
  1. Q
  1. ;
  1. PRE ;Main entry point for Pre-install items
  1. ;
  1. N DVBVERSS,DVBVERSN
  1. D BMES^XPDUTL("***** PRE-INSTALL PROCESSING *****")
  1. ; Get Template Patch Version Suffix
  1. D GETPATV(.DVBVERSS,.DVBVERSN)
  1. ; Deactivate older versions of CAPRI templates
  1. D DEACT(DVBVERSN)
  1. ;
  1. Q
  1. ;
  1. POST ;Main entry point for Post-install items
  1. ;
  1. N DVBVERSS,DVBVERSN
  1. D BMES^XPDUTL("***** POST-INSTALL PROCESSING *****")
  1. ; Get Template Patch Version Suffixes
  1. D GETPATV(.DVBVERSS,.DVBVERSN)
  1. ; Rename/Activate CAPRI templates that were loaded by the patch
  1. D ACTIVATE(DVBVERSS,DVBVERSN)
  1. ; updates for the AMIE EXAM (#396.6) file
  1. D AMIE
  1. Q
  1. ;
  1. GETPATV(DVBVERSS,DVBVERSN) ;Get Patch Version Suffix to be used
  1. ;
  1. ;OUTPUT:
  1. ; DVBVERSS - Incoming Patch Version Suffix (e.g. 999F)
  1. ; DVBVERSN - Rename Patch Version Suffix (e.g. 999 or 999T1)
  1. ; Version Suffix will be as follows:
  1. ; New entry to be renamed is Patch Number with a "F" (e.g 999F)
  1. ; Released patch will be just Patch Number (e.g 999)
  1. ; Test Patch will be Patch Number with a "T" and Test Patch
  1. ; Version Number (e.g. 999T1)
  1. ; Note that the Patch Version is appended to the Template Name with
  1. ; a "~" delimeter between name and version (e.g. DBQ Template
  1. ; Example~999T1).
  1. N DVBPAT
  1. ;
  1. ; Update the following variable to be the patch number
  1. ; ****** Change to the appropriate patch number *****
  1. S DVBPAT="173"
  1. ; ****** End user modification ******
  1. ;
  1. ; The Patch Version Suffix for new incoming CAPRI Template entries
  1. ; should be patch number followed by "F"
  1. S DVBVERSS=DVBPAT_"F"
  1. ;
  1. ; The Patch Version Suffix which will be appended for the Name
  1. ; (#.01) Field in the CAPRI Template Definition (#396.18) file
  1. ; entry to allow for template versioning.
  1. N DVBATVER
  1. S:$D(^XTMP("XPDI",$G(XPDA),"BLD",$G(XPDBLD),6))>0 DVBATVER=$P($G(^XTMP("XPDI",$G(XPDA),"BLD",$G(XPDBLD),6)),U,1)
  1. S DVBVERSN=DVBPAT_$S($G(DVBATVER)>0:"T"_DVBATVER,1:"")
  1. ;
  1. Q
  1. ;
  1. DEACT(DVBVERSN) ;De-activate older versions of CAPRI templates
  1. ;
  1. ;Used to disable older versions of a template for those templates
  1. ;being exported with the patch based on the data in CAPRITXT
  1. ;subroutine.
  1. ; - Make sure to that all entries in the CAPRITXT subroutine are
  1. ; accurate.
  1. ; - This must be called as a pre-init or else it will disable the
  1. ; templates that are being loaded by the patch.
  1. ;INPUT
  1. ; DVBVERSN - Rename Patch Version Suffix (e.g. 999 or ~999)
  1. ; See GETPATV Subroutine comments for Version Suffix descriptions
  1. ;
  1. N DVBACTR,DVBAI,DVBLINE
  1. S DVBACTR=0
  1. ;
  1. D BMES^XPDUTL(" Disabling CAPRI templates...")
  1. D MES^XPDUTL("")
  1. ;
  1. F DVBAI=1:1 S DVBLINE=$P($T(CAPRITXT+DVBAI),";;",2) Q:DVBLINE="QUIT" D
  1. . N DVBAMSG
  1. . D DISABLE^DVBAUTLP($P(DVBLINE,";",1),DVBVERSN,.DVBACTR,.DVBAMSG)
  1. . ; Display status message returned if any
  1. . D:$D(DVBAMSG)>0 MES^XPDUTL(.DVBAMSG)
  1. ;
  1. D BMES^XPDUTL(" Number of CAPRI templates disabled: "_DVBACTR)
  1. Q
  1. ;
  1. ;
  1. ACTIVATE(DVBVERSS,DVBVERSN) ;Activate CAPRI templates that were loaded
  1. ;by the patch and updates Patch Version Suffix for versioning control.
  1. ;
  1. ;Used to activate/rename templates that were loaded by the patch.
  1. ; - Make sure to that all entries in the CAPRITXT subroutine are
  1. ; accurate.
  1. ; - Must be called as a post-init in order to rename those
  1. ; templates being loaded by the patch.
  1. ;
  1. ;INPUT
  1. ; DVBVERSS - Incoming Patch Version Suffix (e.g. 999F)
  1. ; DVBVERSN - Rename Patch Version Suffix (e.g. 999 or 999T1)
  1. ; Version Suffix will be as follows:
  1. ; See GETPATV Subroutine comments for Version Suffix descriptions
  1. ;
  1. N DVBACTR,DVBAI,DVBLINE
  1. ;
  1. S DVBACTR=0
  1. ;
  1. D BMES^XPDUTL(" Activating CAPRI templates...")
  1. D MES^XPDUTL("")
  1. ;
  1. F DVBAI=1:1 S DVBLINE=$P($T(CAPRITXT+DVBAI),";;",2) Q:DVBLINE="QUIT" D
  1. . N DVBAMSG
  1. . D RENAME^DVBAUTLP($P(DVBLINE,";",1),DVBVERSS,DVBVERSN,.DVBACTR,.DVBAMSG)
  1. . ; Display status message returned if any
  1. . D:$D(DVBAMSG)>0 MES^XPDUTL(.DVBAMSG)
  1. ;
  1. D BMES^XPDUTL(" Number of CAPRI templates activated: "_DVBACTR)
  1. Q
  1. ;
  1. ;
  1. AMIE ;Updates for the AMIE EXAM (#396.6) file
  1. ;
  1. ;Used to inactivate old entries and create new entries for
  1. ;designated worksheet updates
  1. ;
  1. D BMES^XPDUTL(" Update to AMIE EXAM (#396.6) file...")
  1. I '$D(^DVB(396.6)) D BMES^XPDUTL("Missing AMIE EXAM (#396.6) file") Q
  1. I $D(^DVB(396.6)) D
  1. . D INACT
  1. . D NEW
  1. Q
  1. ;
  1. ;
  1. INACT ;Inactivate old (current) exams
  1. ;
  1. N DVBAI,DVBLINE,DVBIEN,DVBEXM
  1. ;
  1. D BMES^XPDUTL(" Inactivating AMIE EXAM (#396.6) file entries...")
  1. D MES^XPDUTL("")
  1. F DVBAI=1:1 S DVBLINE=$P($T(AMIEOLD+DVBAI),";;",2) Q:DVBLINE="QUIT" D
  1. . N DVBAMSG
  1. . S DVBIEN=$P(DVBLINE,";",1)
  1. . S DVBEXM=$P(DVBLINE,";",2)
  1. . D INACTEXM^DVBAUTLP(DVBIEN,DVBEXM,.DVBAMSG)
  1. . ; Display status message returned if any
  1. . D:$D(DVBAMSG)>0 MES^XPDUTL(.DVBAMSG)
  1. . D MES^XPDUTL("")
  1. Q
  1. ;
  1. ;
  1. NEW ;Add new exam entries
  1. ;
  1. N DVBAI,DVBLINE,DVBIEN,DVBEXM,DVBPNM,DVBBDY,DVBROU,DVBSTAT,DVBWKS
  1. ;
  1. D BMES^XPDUTL(" Adding new AMIE EXAM (#396.6) file entries...")
  1. F DVBAI=1:1 S DVBLINE=$P($T(AMIENEW+DVBAI),";;",2) Q:DVBLINE="QUIT" D
  1. . N DVBAMSG
  1. . S DVBIEN=$P(DVBLINE,";",1) ;ien
  1. . S DVBEXM=$P(DVBLINE,";",2) ;exam name
  1. . S DVBPNM=$P(DVBLINE,";",3) ;print name
  1. . S DVBBDY=$P(DVBLINE,";",4) ;body system
  1. . S DVBROU=$P(DVBLINE,";",5) ;routine name
  1. . S DVBSTAT=$P(DVBLINE,";",6) ;status
  1. . S DVBWKS=$P(DVBLINE,";",8) ;worksheet number
  1. . D BMES^XPDUTL(" Attempting to add Entry #"_DVBIEN_"...")
  1. . D NEWEXAM^DVBAUTLP(DVBIEN,DVBEXM,DVBPNM,DVBBDY,DVBROU,DVBSTAT,DVBWKS,.DVBAMSG)
  1. . ; Display status message returned if any
  1. . D:$D(DVBAMSG)>0 MES^XPDUTL(.DVBAMSG)
  1. Q
  1. ;
  1. ;
  1. ; CAPRI TEMPLATE DEFINITIONS (#396.18) file entries to Dectivate
  1. ; and/or Rename. If old versions of the Templates exist they will
  1. ; be De-Activated. No harm is done if Template doesn't currently
  1. ; exist but it should still be included here in case multiple test
  1. ; versions are done which would required previous test patch
  1. ; version to be De-Activated.
  1. ; Only entries that are Versioned as ~###F (# = Patch Version
  1. ; Number) will be Renamed
  1. ;
  1. ; Data should be in internal format.
  1. ; Format: Template Name (250 chars)
  1. ; Note - Do not include Version Portion of name (i.e ~999T or ~999)
  1. CAPRITXT ;
  1. ;;DBQ AMPUTATIONS
  1. ;;DBQ ARTERY AND VEIN CONDITIONS (VASCULAR DISEASES INCLUDING VARICOSE VEINS)
  1. ;;DBQ ELBOW AND FOREARM CONDITIONS
  1. ;;DBQ FLATFOOT (PES PLANUS)
  1. ;;DBQ FOOT MISCELLANEOUS (OTHER THAN FLATFOOT PES PLANUS)
  1. ;;DBQ HAND AND FINGER CONDITIONS
  1. ;;DBQ HIP AND THIGH CONDITIONS
  1. ;;DBQ MUSCLE INJURIES
  1. ;;DBQ TEMPOROMANDIBULAR JOINT (TMJ) CONDITIONS
  1. ;;DBQ WRIST CONDITIONS
  1. ;;QUIT
  1. ;
  1. ;
  1. ; AMIE EXAM (#396.6) file exam(s) to deactivate. Data should be in
  1. ; internal format.
  1. ; Format: ien;exam name (60 chars);
  1. AMIEOLD ;
  1. ;There are no DBQs to be deactivated.
  1. ;;QUIT
  1. ;
  1. ; AMIE EXAM (#396.6) file exam(s) to activate (create or update).
  1. ; Data should be in internal format.
  1. ; format: ien;exam name (60 chars);print name (25 Chars);body system;routine;status;;wks#
  1. AMIENEW ;
  1. ;;349;DBQ AMPUTATIONS;DBQ AMPUTATIONS;16;DVBCQAM1;A; ; ;
  1. ;;346;DBQ ARTERY AND VEIN CONDITIONS;DBQ ARTERY AND VEIN;6;DVBCQAV1;A; ; ;
  1. ;;341;DBQ ELBOW AND FOREARM CONDITIONS;DBQ ELBOW AND FOREARM;16;DVBCQEL1;A; ; ;
  1. ;;342;DBQ FLATFOOT (PES PLANUS);DBQ FLATFOOT;16;DVBCQFF1;A; ; ;
  1. ;;347;DBQ FOOT MISCELLANEOUS (OTHER THAN FLATFOOT PES PLANUS);DBQ FOOT MISC;16;DVBCQFM1;A; ; ;
  1. ;;344;DBQ HAND AND FINGER CONDITIONS;DBQ HAND AND FINGER;16;DVBCQHF1;A; ; ;
  1. ;;340;DBQ HIP AND THIGH CONDITIONS;DBQ HIP AND THIGH;16;DVBCQHP1;A; ; ;
  1. ;;348;DBQ MUSCLE INJURIES;DBQ MUSCLE INJURIES;16;DVBCQMI1;A; ; ;
  1. ;;345;DBQ TEMPOROMANDIBULAR JOINT (TMJ) CONDITIONS;DBQ TEMPOROMANDIBULA(TMJ);16;DVBCQTJ1;A; ; ;
  1. ;;343;DBQ WRIST CONDITIONS;DBQ WRIST CONDITIONS;16;DVBCQWR1;A; ; ;
  1. ;;QUIT