- DVBA171P ;ALB/SBW - PATCH DVBA*2.7*171 PRE/POST INSTALL UTILITIES ; 14/JUNE/2011
- ;;2.7;AMIE;**171**;Apr 10, 1995;Build 2
- ;
- ;No direct entry allowed
- Q
- ;
- PRE ;Main entry point for Pre-install items
- ;
- N DVBVERSS,DVBVERSN
- D BMES^XPDUTL("***** PRE-INSTALL PROCESSING *****")
- ; Get Template Patch Version Suffix
- D GETPATV(.DVBVERSS,.DVBVERSN)
- ; Deactivate older versions of CAPRI templates
- D DEACT(DVBVERSN)
- ;
- Q
- ;
- POST ;Main entry point for Post-install items
- ;
- N DVBVERSS,DVBVERSN
- D BMES^XPDUTL("***** POST-INSTALL PROCESSING *****")
- ; Get Template Patch Version Suffixes
- D GETPATV(.DVBVERSS,.DVBVERSN)
- ; Rename/Activate CAPRI templates that were loaded by the patch
- D ACTIVATE(DVBVERSS,DVBVERSN)
- ; updates for the AMIE EXAM (#396.6) file
- D AMIE
- Q
- ;
- GETPATV(DVBVERSS,DVBVERSN) ;Get Patch Version Suffix to be used
- ;
- ;OUTPUT:
- ; DVBVERSS - Incoming Patch Version Suffix (e.g. 999F)
- ; DVBVERSN - Rename Patch Version Suffix (e.g. 999 or 999T1)
- ; Version Suffix will be as follows:
- ; New entry to be renamed is Patch Number with a "F" (e.g 999F)
- ; Released patch will be just Patch Number (e.g 999)
- ; Test Patch will be Patch Number with a "T" and Test Patch
- ; Version Number (e.g. 999T1)
- ; Note that the Patch Version is appended to the Template Name with
- ; a "~" delimeter between name and version (e.g. DBQ Template
- ; Example~999T1).
- N DVBPAT
- ;
- ; Update the following variable to be the patch number
- ; ****** Change to the appropriate patch number *****
- S DVBPAT="171"
- ; ****** End user modification ******
- ;
- ; The Patch Version Suffix for new incoming CAPRI Template entries
- ; should be patch number followed by "F"
- S DVBVERSS=DVBPAT_"F"
- ;
- ; The Patch Version Suffix which will be appended for the Name
- ; (#.01) Field in the CAPRI Template Definition (#396.18) file
- ; entry to allow for template versioning.
- S:$D(^XTMP("XPDI",$G(XPDA),"BLD",$G(XPDBLD),6))>0 DVBATVER=$P($G(^XTMP("XPDI",$G(XPDA),"BLD",$G(XPDBLD),6)),U,1)
- S DVBVERSN=DVBPAT_$S($G(DVBATVER)>0:"T"_DVBATVER,1:"")
- ;
- Q
- ;
- DEACT(DVBVERSN) ;De-activate older versions of CAPRI templates
- ;
- ;Used to disable older versions of a template for those templates
- ;being exported with the patch based on the data in CAPRITXT
- ;subroutine.
- ; - Make sure to that all entries in the CAPRITXT subroutine are
- ; accurate.
- ; - This must be called as a pre-init or else it will disable the
- ; templates that are being loaded by the patch.
- ;INPUT
- ; DVBVERSN - Rename Patch Version Suffix (e.g. 999 or ~999)
- ; See GETPATV Subroutine comments for Version Suffix descriptions
- ;
- N DVBACTR,DVBAI,DVBLINE
- S DVBACTR=0
- ;
- D BMES^XPDUTL(" Disabling CAPRI templates...")
- D MES^XPDUTL("")
- ;
- F DVBAI=1:1 S DVBLINE=$P($T(CAPRITXT+DVBAI),";;",2) Q:DVBLINE="QUIT" D
- . N DVBAMSG
- . D DISABLE^DVBAUTLP($P(DVBLINE,";",1),DVBVERSN,.DVBACTR,.DVBAMSG)
- . ; Display status message returned if any
- . D:$D(DVBAMSG)>0 MES^XPDUTL(.DVBAMSG)
- ;
- D BMES^XPDUTL(" Number of CAPRI templates disabled: "_DVBACTR)
- Q
- ;
- ;
- ACTIVATE(DVBVERSS,DVBVERSN) ;Activate CAPRI templates that were loaded
- ;by the patch and updates Patch Version Suffix for versioning control.
- ;
- ;Used to activate/rename templates that were loaded by the patch.
- ; - Make sure to that all entries in the CAPRITXT subroutine are
- ; accurate.
- ; - Must be called as a post-init in order to rename those
- ; templates being loaded by the patch.
- ;
- ;INPUT
- ; DVBVERSS - Incoming Patch Version Suffix (e.g. 999F)
- ; DVBVERSN - Rename Patch Version Suffix (e.g. 999 or 999T1)
- ; Version Suffix will be as follows:
- ; See GETPATV Subroutine comments for Version Suffix descriptions
- ;
- N DVBACTR,DVBAI,DVBLINE
- ;
- S DVBACTR=0
- ;
- D BMES^XPDUTL(" Activating CAPRI templates...")
- D MES^XPDUTL("")
- ;
- F DVBAI=1:1 S DVBLINE=$P($T(CAPRITXT+DVBAI),";;",2) Q:DVBLINE="QUIT" D
- . N DVBAMSG
- . D RENAME^DVBAUTLP($P(DVBLINE,";",1),DVBVERSS,DVBVERSN,.DVBACTR,.DVBAMSG)
- . ; Display status message returned if any
- . D:$D(DVBAMSG)>0 MES^XPDUTL(.DVBAMSG)
- ;
- D BMES^XPDUTL(" Number of CAPRI templates activated: "_DVBACTR)
- Q
- ;
- ;
- AMIE ;Updates for the AMIE EXAM (#396.6) file
- ;
- ;Used to inactivate old entries and create new entries for
- ;designated worksheet updates
- ;
- D BMES^XPDUTL(" Update to AMIE EXAM (#396.6) file...")
- I '$D(^DVB(396.6)) D BMES^XPDUTL("Missing AMIE EXAM (#396.6) file") Q
- I $D(^DVB(396.6)) D
- . D INACT
- . D NEW
- Q
- ;
- ;
- INACT ;Inactivate old (current) exams
- ;
- N DVBAI,DVBLINE,DVBIEN,DVBEXM
- ;
- D BMES^XPDUTL(" Inactivating AMIE EXAM (#396.6) file entries...")
- D MES^XPDUTL("")
- F DVBAI=1:1 S DVBLINE=$P($T(AMIEOLD+DVBAI),";;",2) Q:DVBLINE="QUIT" D
- . N DVBAMSG
- . S DVBIEN=$P(DVBLINE,";",1)
- . S DVBEXM=$P(DVBLINE,";",2)
- . D INACTEXM^DVBAUTLP(DVBIEN,DVBEXM,.DVBAMSG)
- . ; Display status message returned if any
- . D:$D(DVBAMSG)>0 MES^XPDUTL(.DVBAMSG)
- . D MES^XPDUTL("")
- Q
- ;
- NEW ;Add new exam entries
- ;
- N DVBAI,DVBLINE,DVBIEN,DVBEXM,DVBPNM,DVBBDY,DVBROU,DVBSTAT,DVBWKS
- ;
- D BMES^XPDUTL(" Adding new AMIE EXAM (#396.6) file entries...")
- F DVBAI=1:1 S DVBLINE=$P($T(AMIENEW+DVBAI),";;",2) Q:DVBLINE="QUIT" D
- . N DVBAMSG
- . S DVBIEN=$P(DVBLINE,";",1) ;ien
- . S DVBEXM=$P(DVBLINE,";",2) ;exam name
- . S DVBPNM=$P(DVBLINE,";",3) ;print name
- . S DVBBDY=$P(DVBLINE,";",4) ;body system
- . S DVBROU=$P(DVBLINE,";",5) ;routine name
- . S DVBSTAT=$P(DVBLINE,";",6) ;status
- . S DVBWKS=$P(DVBLINE,";",8) ;worksheet number
- . D BMES^XPDUTL(" Attempting to add Entry #"_DVBIEN_"...")
- . D NEWEXAM^DVBAUTLP(DVBIEN,DVBEXM,DVBPNM,DVBBDY,DVBROU,DVBSTAT,DVBWKS,.DVBAMSG)
- . ; Display status message returned if any
- . D:$D(DVBAMSG)>0 MES^XPDUTL(.DVBAMSG)
- Q
- ;
- ; CAPRI TEMPLATE DEFINITIONS (#396.18) file entries to Dectivate
- ; and/or Rename. If old versions of the Templates exist they will
- ; be De-Activated. No harm is done if Template doesn't currently
- ; exist but it should still be included here in case multiple test
- ; versions are done which would required previous test patch
- ; version to be De-Activated.
- ; Only entries that are Versioned as ~###F (# = Patch Version
- ; Number) will be Renamed
- ;
- ; Data should be in internal format.
- ; Format: Template Name (250 chars)
- ; Note - Do not include Version Portion of name (i.e ~999T or ~999)
- CAPRITXT ;
- ;;DBQ INITIAL PTSD
- ;;DBQ MENTAL DISORDERS (OTHER THAN PTSD AND EATING DISORDERS)
- ;;DBQ REVIEW PTSD
- ;;QUIT
- ;
- ; AMIE EXAM (#396.6) file exam(s) to deactivate. Data should be in
- ; internal format.
- ; Format: ien;exam name (60 chars);
- AMIEOLD ;
- ;;305;DBQ INITIAL PTSD
- ;;307;DBQ MENTAL DISORDERS (EXCEPT PTSD AND EATING DISORDERS)
- ;;309;DBQ REVIEW PTSD;DBQ REVIEW PTSD
- ;;QUIT
- ;
- ; AMIE EXAM (#396.6) file exam(s) to activate (create or update).
- ; Data should be in internal format.
- ; format: ien;exam name (60 chars);print name;body system;routine;status;;wks#
- AMIENEW ;
- ;;327;DBQ INITIAL PTSD;DBQ INITIAL PTSD;14;DVBCQPT4;A; ; ;
- ;;328;DBQ MENTAL DISORDERS (EXCEPT PTSD AND EATING DISORDERS);DBQ MENTAL DISORDER;14;DVBCQMD3;A; ; ;
- ;;329;DBQ REVIEW PTSD;DBQ REVIEW PTSD;14;DVBCQPR4;A; ; ;
- ;;QUIT
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBA171P 7330 printed Mar 13, 2025@20:43:56 Page 2
- DVBA171P ;ALB/SBW - PATCH DVBA*2.7*171 PRE/POST INSTALL UTILITIES ; 14/JUNE/2011
- +1 ;;2.7;AMIE;**171**;Apr 10, 1995;Build 2
- +2 ;
- +3 ;No direct entry allowed
- +4 QUIT
- +5 ;
- PRE ;Main entry point for Pre-install items
- +1 ;
- +2 NEW DVBVERSS,DVBVERSN
- +3 DO BMES^XPDUTL("***** PRE-INSTALL PROCESSING *****")
- +4 ; Get Template Patch Version Suffix
- +5 DO GETPATV(.DVBVERSS,.DVBVERSN)
- +6 ; Deactivate older versions of CAPRI templates
- +7 DO DEACT(DVBVERSN)
- +8 ;
- +9 QUIT
- +10 ;
- POST ;Main entry point for Post-install items
- +1 ;
- +2 NEW DVBVERSS,DVBVERSN
- +3 DO BMES^XPDUTL("***** POST-INSTALL PROCESSING *****")
- +4 ; Get Template Patch Version Suffixes
- +5 DO GETPATV(.DVBVERSS,.DVBVERSN)
- +6 ; Rename/Activate CAPRI templates that were loaded by the patch
- +7 DO ACTIVATE(DVBVERSS,DVBVERSN)
- +8 ; updates for the AMIE EXAM (#396.6) file
- +9 DO AMIE
- +10 QUIT
- +11 ;
- GETPATV(DVBVERSS,DVBVERSN) ;Get Patch Version Suffix to be used
- +1 ;
- +2 ;OUTPUT:
- +3 ; DVBVERSS - Incoming Patch Version Suffix (e.g. 999F)
- +4 ; DVBVERSN - Rename Patch Version Suffix (e.g. 999 or 999T1)
- +5 ; Version Suffix will be as follows:
- +6 ; New entry to be renamed is Patch Number with a "F" (e.g 999F)
- +7 ; Released patch will be just Patch Number (e.g 999)
- +8 ; Test Patch will be Patch Number with a "T" and Test Patch
- +9 ; Version Number (e.g. 999T1)
- +10 ; Note that the Patch Version is appended to the Template Name with
- +11 ; a "~" delimeter between name and version (e.g. DBQ Template
- +12 ; Example~999T1).
- +13 NEW DVBPAT
- +14 ;
- +15 ; Update the following variable to be the patch number
- +16 ; ****** Change to the appropriate patch number *****
- +17 SET DVBPAT="171"
- +18 ; ****** End user modification ******
- +19 ;
- +20 ; The Patch Version Suffix for new incoming CAPRI Template entries
- +21 ; should be patch number followed by "F"
- +22 SET DVBVERSS=DVBPAT_"F"
- +23 ;
- +24 ; The Patch Version Suffix which will be appended for the Name
- +25 ; (#.01) Field in the CAPRI Template Definition (#396.18) file
- +26 ; entry to allow for template versioning.
- +27 if $DATA(^XTMP("XPDI",$GET(XPDA),"BLD",$GET(XPDBLD),6))>0
- SET DVBATVER=$PIECE($GET(^XTMP("XPDI",$GET(XPDA),"BLD",$GET(XPDBLD),6)),U,1)
- +28 SET DVBVERSN=DVBPAT_$SELECT($GET(DVBATVER)>0:"T"_DVBATVER,1:"")
- +29 ;
- +30 QUIT
- +31 ;
- DEACT(DVBVERSN) ;De-activate older versions of CAPRI templates
- +1 ;
- +2 ;Used to disable older versions of a template for those templates
- +3 ;being exported with the patch based on the data in CAPRITXT
- +4 ;subroutine.
- +5 ; - Make sure to that all entries in the CAPRITXT subroutine are
- +6 ; accurate.
- +7 ; - This must be called as a pre-init or else it will disable the
- +8 ; templates that are being loaded by the patch.
- +9 ;INPUT
- +10 ; DVBVERSN - Rename Patch Version Suffix (e.g. 999 or ~999)
- +11 ; See GETPATV Subroutine comments for Version Suffix descriptions
- +12 ;
- +13 NEW DVBACTR,DVBAI,DVBLINE
- +14 SET DVBACTR=0
- +15 ;
- +16 DO BMES^XPDUTL(" Disabling CAPRI templates...")
- +17 DO MES^XPDUTL("")
- +18 ;
- +19 FOR DVBAI=1:1
- SET DVBLINE=$PIECE($TEXT(CAPRITXT+DVBAI),";;",2)
- if DVBLINE="QUIT"
- QUIT
- Begin DoDot:1
- +20 NEW DVBAMSG
- +21 DO DISABLE^DVBAUTLP($PIECE(DVBLINE,";",1),DVBVERSN,.DVBACTR,.DVBAMSG)
- +22 ; Display status message returned if any
- +23 if $DATA(DVBAMSG)>0
- DO MES^XPDUTL(.DVBAMSG)
- End DoDot:1
- +24 ;
- +25 DO BMES^XPDUTL(" Number of CAPRI templates disabled: "_DVBACTR)
- +26 QUIT
- +27 ;
- +28 ;
- ACTIVATE(DVBVERSS,DVBVERSN) ;Activate CAPRI templates that were loaded
- +1 ;by the patch and updates Patch Version Suffix for versioning control.
- +2 ;
- +3 ;Used to activate/rename templates that were loaded by the patch.
- +4 ; - Make sure to that all entries in the CAPRITXT subroutine are
- +5 ; accurate.
- +6 ; - Must be called as a post-init in order to rename those
- +7 ; templates being loaded by the patch.
- +8 ;
- +9 ;INPUT
- +10 ; DVBVERSS - Incoming Patch Version Suffix (e.g. 999F)
- +11 ; DVBVERSN - Rename Patch Version Suffix (e.g. 999 or 999T1)
- +12 ; Version Suffix will be as follows:
- +13 ; See GETPATV Subroutine comments for Version Suffix descriptions
- +14 ;
- +15 NEW DVBACTR,DVBAI,DVBLINE
- +16 ;
- +17 SET DVBACTR=0
- +18 ;
- +19 DO BMES^XPDUTL(" Activating CAPRI templates...")
- +20 DO MES^XPDUTL("")
- +21 ;
- +22 FOR DVBAI=1:1
- SET DVBLINE=$PIECE($TEXT(CAPRITXT+DVBAI),";;",2)
- if DVBLINE="QUIT"
- QUIT
- Begin DoDot:1
- +23 NEW DVBAMSG
- +24 DO RENAME^DVBAUTLP($PIECE(DVBLINE,";",1),DVBVERSS,DVBVERSN,.DVBACTR,.DVBAMSG)
- +25 ; Display status message returned if any
- +26 if $DATA(DVBAMSG)>0
- DO MES^XPDUTL(.DVBAMSG)
- End DoDot:1
- +27 ;
- +28 DO BMES^XPDUTL(" Number of CAPRI templates activated: "_DVBACTR)
- +29 QUIT
- +30 ;
- +31 ;
- AMIE ;Updates for the AMIE EXAM (#396.6) file
- +1 ;
- +2 ;Used to inactivate old entries and create new entries for
- +3 ;designated worksheet updates
- +4 ;
- +5 DO BMES^XPDUTL(" Update to AMIE EXAM (#396.6) file...")
- +6 IF '$DATA(^DVB(396.6))
- DO BMES^XPDUTL("Missing AMIE EXAM (#396.6) file")
- QUIT
- +7 IF $DATA(^DVB(396.6))
- Begin DoDot:1
- +8 DO INACT
- +9 DO NEW
- End DoDot:1
- +10 QUIT
- +11 ;
- +12 ;
- INACT ;Inactivate old (current) exams
- +1 ;
- +2 NEW DVBAI,DVBLINE,DVBIEN,DVBEXM
- +3 ;
- +4 DO BMES^XPDUTL(" Inactivating AMIE EXAM (#396.6) file entries...")
- +5 DO MES^XPDUTL("")
- +6 FOR DVBAI=1:1
- SET DVBLINE=$PIECE($TEXT(AMIEOLD+DVBAI),";;",2)
- if DVBLINE="QUIT"
- QUIT
- Begin DoDot:1
- +7 NEW DVBAMSG
- +8 SET DVBIEN=$PIECE(DVBLINE,";",1)
- +9 SET DVBEXM=$PIECE(DVBLINE,";",2)
- +10 DO INACTEXM^DVBAUTLP(DVBIEN,DVBEXM,.DVBAMSG)
- +11 ; Display status message returned if any
- +12 if $DATA(DVBAMSG)>0
- DO MES^XPDUTL(.DVBAMSG)
- +13 DO MES^XPDUTL("")
- End DoDot:1
- +14 QUIT
- +15 ;
- NEW ;Add new exam entries
- +1 ;
- +2 NEW DVBAI,DVBLINE,DVBIEN,DVBEXM,DVBPNM,DVBBDY,DVBROU,DVBSTAT,DVBWKS
- +3 ;
- +4 DO BMES^XPDUTL(" Adding new AMIE EXAM (#396.6) file entries...")
- +5 FOR DVBAI=1:1
- SET DVBLINE=$PIECE($TEXT(AMIENEW+DVBAI),";;",2)
- if DVBLINE="QUIT"
- QUIT
- Begin DoDot:1
- +6 NEW DVBAMSG
- +7 ;ien
- SET DVBIEN=$PIECE(DVBLINE,";",1)
- +8 ;exam name
- SET DVBEXM=$PIECE(DVBLINE,";",2)
- +9 ;print name
- SET DVBPNM=$PIECE(DVBLINE,";",3)
- +10 ;body system
- SET DVBBDY=$PIECE(DVBLINE,";",4)
- +11 ;routine name
- SET DVBROU=$PIECE(DVBLINE,";",5)
- +12 ;status
- SET DVBSTAT=$PIECE(DVBLINE,";",6)
- +13 ;worksheet number
- SET DVBWKS=$PIECE(DVBLINE,";",8)
- +14 DO BMES^XPDUTL(" Attempting to add Entry #"_DVBIEN_"...")
- +15 DO NEWEXAM^DVBAUTLP(DVBIEN,DVBEXM,DVBPNM,DVBBDY,DVBROU,DVBSTAT,DVBWKS,.DVBAMSG)
- +16 ; Display status message returned if any
- +17 if $DATA(DVBAMSG)>0
- DO MES^XPDUTL(.DVBAMSG)
- End DoDot:1
- +18 QUIT
- +19 ;
- +20 ; CAPRI TEMPLATE DEFINITIONS (#396.18) file entries to Dectivate
- +21 ; and/or Rename. If old versions of the Templates exist they will
- +22 ; be De-Activated. No harm is done if Template doesn't currently
- +23 ; exist but it should still be included here in case multiple test
- +24 ; versions are done which would required previous test patch
- +25 ; version to be De-Activated.
- +26 ; Only entries that are Versioned as ~###F (# = Patch Version
- +27 ; Number) will be Renamed
- +28 ;
- +29 ; Data should be in internal format.
- +30 ; Format: Template Name (250 chars)
- +31 ; Note - Do not include Version Portion of name (i.e ~999T or ~999)
- CAPRITXT ;
- +1 ;;DBQ INITIAL PTSD
- +2 ;;DBQ MENTAL DISORDERS (OTHER THAN PTSD AND EATING DISORDERS)
- +3 ;;DBQ REVIEW PTSD
- +4 ;;QUIT
- +5 ;
- +6 ; AMIE EXAM (#396.6) file exam(s) to deactivate. Data should be in
- +7 ; internal format.
- +8 ; Format: ien;exam name (60 chars);
- AMIEOLD ;
- +1 ;;305;DBQ INITIAL PTSD
- +2 ;;307;DBQ MENTAL DISORDERS (EXCEPT PTSD AND EATING DISORDERS)
- +3 ;;309;DBQ REVIEW PTSD;DBQ REVIEW PTSD
- +4 ;;QUIT
- +5 ;
- +6 ; AMIE EXAM (#396.6) file exam(s) to activate (create or update).
- +7 ; Data should be in internal format.
- +8 ; format: ien;exam name (60 chars);print name;body system;routine;status;;wks#
- AMIENEW ;
- +1 ;;327;DBQ INITIAL PTSD;DBQ INITIAL PTSD;14;DVBCQPT4;A; ; ;
- +2 ;;328;DBQ MENTAL DISORDERS (EXCEPT PTSD AND EATING DISORDERS);DBQ MENTAL DISORDER;14;DVBCQMD3;A; ; ;
- +3 ;;329;DBQ REVIEW PTSD;DBQ REVIEW PTSD;14;DVBCQPR4;A; ; ;
- +4 ;;QUIT