- DVBA2824 ;ALB/KCL - PATCH DVBA*2.7*124 INSTALL UTILITIES ; 5/1/08
- ;;2.7;AMIE;**124**;Apr 10, 1995;Build 56
- ;
- PRE ;Pre-install entry point.
- ;
- ;Used to disable older versions of a template for those templates being
- ;exported with the patch.
- ; - Make sure to call the DISABLE procedure for each template name
- ; being exported in the patch.
- ; - This must be called as a pre-init or else it will disable the
- ; templates that are being loaded by the patch.
- ;
- N DVBVERSS,DVBVERSN
- ;
- ;what the template version will be in the incoming patch
- ;(version pulled from export account)
- S DVBVERSS="124F"
- ;what the final template version should be once the template is
- ;loaded by the patch on the target system
- S DVBVERSN="124"
- ;
- W !!!,"**** PRE-INSTALL PROCESSING ****",!
- W !,"Disabling templates...",!!
- ;
- D DISABLE("ACROMEGALY")
- D DISABLE("AID AND ATTENDANCE OR HOUSEBOUND EXAMINATION")
- D DISABLE("AMPUTATION") ;this template is being de-activated
- D DISABLE("ARRHYTHMIAS")
- D DISABLE("ARTERIES, VEINS AND MISCELLANEOUS")
- D DISABLE("AUDIO")
- D DISABLE("BONES (FRACTURES AND BONE DISEASE)")
- D DISABLE("BRAIN AND SPINAL CORD")
- D DISABLE("CHRONIC FATIGUE SYNDROME")
- D DISABLE("COLD INJURY PROTOCOL EXAMINATION")
- D DISABLE("CRANIAL NERVES")
- D DISABLE("CUSHINGS SYNDROME")
- D DISABLE("DENTAL AND ORAL")
- D DISABLE("DIABETES MELLITUS")
- D DISABLE("DIGESTIVE CONDITIONS, MISCELLANEOUS")
- D DISABLE("EAR DISEASE")
- D DISABLE("EATING DISORDERS")
- D DISABLE("ENDOCRINE, MISCELLANEOUS")
- D DISABLE("EPILEPSY AND NARCOLEPSY")
- D DISABLE("ESOPHAGUS AND HIATAL HERNIA")
- D DISABLE("EYE EXAMINATION")
- D DISABLE("FEET")
- D DISABLE("FIBROMYALGIA")
- D DISABLE("GENERAL MEDICAL EXAMINATION")
- D DISABLE("GENITOURINARY EXAMINATION")
- D DISABLE("GULF WAR GUIDELINES")
- D DISABLE("GYNECOLOGICAL CONDITIONS AND DISORDERS OF THE BREAST")
- D DISABLE("HAND, THUMB, AND FINGERS")
- D DISABLE("HEART")
- D DISABLE("HEMIC DISORDERS")
- D DISABLE("HIV-RELATED ILLNESS")
- D DISABLE("HYPERTENSION")
- D DISABLE("INFECTIOUS, IMMUNE, AND NUTRITIONAL DISABILITIES")
- D DISABLE("INITIAL EVALUATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD)")
- D DISABLE("INTESTINES (LARGE AND SMALL)")
- D DISABLE("JOINTS")
- D DISABLE("LIVER, GALL BLADDER, AND PANCREAS")
- D DISABLE("LYMPHATIC DISORDERS")
- D DISABLE("MEDICAL OPINION")
- D DISABLE("MENTAL DISORDERS (EXCEPT PTSD AND EATING DISORDERS)")
- D DISABLE("MOUTH, LIPS AND TONGUE")
- D DISABLE("MUSCLES")
- D DISABLE("NEUROLOGICAL DISORDERS, MISCELLANEOUS")
- D DISABLE("NOSE, SINUS, LARYNX, AND PHARYNX")
- D DISABLE("PERIPHERAL NERVES")
- D DISABLE("PRISONER OF WAR PROTOCOL EXAMINATION")
- D DISABLE("PULMONARY TUBERCULOSIS AND MYCOBACTERIAL DISEASES")
- D DISABLE("RECTUM AND ANUS")
- D DISABLE("RESIDUALS OF AMPUTATIONS")
- D DISABLE("RESPIRATORY (OBSTRUCTIVE, RESTRICTIVE, AND INTERSTITIAL)")
- D DISABLE("RESPIRATORY DISEASES, MISCELLANEOUS")
- D DISABLE("REVIEW EXAMINATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD)")
- D DISABLE("SCARS")
- D DISABLE("SENSE OF SMELL AND TASTE")
- D DISABLE("SKIN DISEASES (OTHER THAN SCARS)")
- D DISABLE("SOCIAL AND INDUSTRIAL SURVEY")
- D DISABLE("SPINE")
- D DISABLE("STOMACH, DUODENUM AND PERITONEAL ADHESIONS")
- D DISABLE("THYROID AND PARATHYROID DISEASES")
- Q
- ;
- POST ;Post-install entry point.
- ;
- ;Used to rename templates that were loaded by the patch.
- ; - Make sure to call POSTP procedure for each template
- ; name being loaded by the patch.
- ; - Must be called as a post-init in order to rename those
- ; templates being loaded by the patch.
- ;
- N DVBVERSS,DVBVERSN
- ;
- ;what the template version will be in the incoming patch
- ;(version pulled from export account)
- S DVBVERSS="124F"
- ;what the final template version should be once the template is
- ;loaded by the patch on the target system
- S DVBVERSN="124"
- ;
- W !!!,"**** POST-INSTALL PROCESSING ****",!
- W !,"Activating templates...",!!
- ;
- D POSTP("ACROMEGALY")
- D POSTP("AID AND ATTENDANCE OR HOUSEBOUND EXAMINATION")
- D POSTP("ARRHYTHMIAS")
- D POSTP("ARTERIES, VEINS AND MISCELLANEOUS")
- D POSTP("AUDIO")
- D POSTP("BONES (FRACTURES AND BONE DISEASE)")
- D POSTP("BRAIN AND SPINAL CORD")
- D POSTP("CHRONIC FATIGUE SYNDROME")
- D POSTP("COLD INJURY PROTOCOL EXAMINATION")
- D POSTP("CRANIAL NERVES")
- D POSTP("CUSHINGS SYNDROME")
- D POSTP("DENTAL AND ORAL")
- D POSTP("DIABETES MELLITUS")
- D POSTP("DIGESTIVE CONDITIONS, MISCELLANEOUS")
- D POSTP("EAR DISEASE")
- D POSTP("EATING DISORDERS")
- D POSTP("ENDOCRINE, MISCELLANEOUS")
- D POSTP("EPILEPSY AND NARCOLEPSY")
- D POSTP("ESOPHAGUS AND HIATAL HERNIA")
- D POSTP("EYE EXAMINATION")
- D POSTP("FEET")
- D POSTP("FIBROMYALGIA")
- D POSTP("GENERAL MEDICAL EXAMINATION")
- D POSTP("GENITOURINARY EXAMINATION")
- D POSTP("GULF WAR GUIDELINES")
- D POSTP("GYNECOLOGICAL CONDITIONS AND DISORDERS OF THE BREAST")
- D POSTP("HAND, THUMB, AND FINGERS")
- D POSTP("HEART")
- D POSTP("HEMIC DISORDERS")
- D POSTP("HIV-RELATED ILLNESS")
- D POSTP("HYPERTENSION")
- D POSTP("INFECTIOUS, IMMUNE, AND NUTRITIONAL DISABILITIES")
- D POSTP("INITIAL EVALUATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD)")
- D POSTP("INTESTINES (LARGE AND SMALL)")
- D POSTP("JOINTS")
- D POSTP("LIVER, GALL BLADDER, AND PANCREAS")
- D POSTP("LYMPHATIC DISORDERS")
- D POSTP("MEDICAL OPINION")
- D POSTP("MENTAL DISORDERS (EXCEPT PTSD AND EATING DISORDERS)")
- D POSTP("MOUTH, LIPS AND TONGUE")
- D POSTP("MUSCLES")
- D POSTP("NEUROLOGICAL DISORDERS, MISCELLANEOUS")
- D POSTP("NOSE, SINUS, LARYNX, AND PHARYNX")
- D POSTP("PERIPHERAL NERVES")
- D POSTP("PRISONER OF WAR PROTOCOL EXAMINATION")
- D POSTP("PULMONARY TUBERCULOSIS AND MYCOBACTERIAL DISEASES")
- D POSTP("RECTUM AND ANUS")
- D POSTP("RESIDUALS OF AMPUTATIONS")
- D POSTP("RESPIRATORY (OBSTRUCTIVE, RESTRICTIVE, AND INTERSTITIAL)")
- D POSTP("RESPIRATORY DISEASES, MISCELLANEOUS")
- D POSTP("REVIEW EXAMINATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD)")
- D POSTP("SCARS")
- D POSTP("SENSE OF SMELL AND TASTE")
- D POSTP("SKIN DISEASES (OTHER THAN SCARS)")
- D POSTP("SOCIAL AND INDUSTRIAL SURVEY")
- D POSTP("SPINE")
- D POSTP("STOMACH, DUODENUM AND PERITONEAL ADHESIONS")
- D POSTP("THYROID AND PARATHYROID DISEASES")
- ;
- ;re-build cross references
- D RBXREF
- Q
- ;
- POSTP(NM) ;Rename templates loaded by the patch.
- ;
- ;This procedure is used to lookup and rename a template in the
- ;CAPRI TEMPLATE DEFINITIONS (#396.18) file. This is done to rename
- ;the imported version of a template (i.e. ACROMEGALY~124F) to it's
- ;new name/version (i.e. ACROMEGALY~124T6).
- ;
- N DVBABIEN,DVBABIE2 ;ien of CAPRI TEMPLATE DEFINITIONS file
- N DVBABST ;template NAME field (i.e. ACROMEGALY~124F)
- N DVBABS2 ;template NAME field (i.e. ACROMEGALY~124T6)
- N DVBACH ;flag to indicate if template version is found or not
- ;
- S DVBABIEN=0
- ;
- ;main loop-walk through CAPRI TEMPLATE DEFINITIONS file entries
- F S DVBABIEN=$O(^DVB(396.18,DVBABIEN)) Q:'DVBABIEN D
- .S DVBABST=$P($G(^DVB(396.18,DVBABIEN,0)),"^",1) ;template name
- .;look for template versions just loaded by the patch (~124F)
- .I $P(DVBABST,"~",1)=NM I $P(DVBABST,"~",2)=DVBVERSS D
- ..S DVBABIE2=0,DVBACH=0
- ..;secondary loop-walk through CAPRI TEMPLATE DEFINITIONS file entries
- ..F S DVBABIE2=$O(^DVB(396.18,DVBABIE2)) Q:'DVBABIE2 D
- ...S DVBABS2=$P($G(^DVB(396.18,DVBABIE2,0)),"^",1) ;template name
- ...;if new version of template already exists in file, set flag
- ...I $P(DVBABS2,"~",1)=NM I $P(DVBABS2,"~",2)=DVBVERSN S DVBACH=1
- ..;if new version already exists, delete the imported version (abort rename)
- ..I DVBACH=1 D
- ...W "Found existing "_NM_". No modifications made.",!
- ...K ^DVB(396.18,DVBABIEN)
- ..;otherwise, if new version isn't found, rename imported template
- ..;name to the new version name (i.e. ACROMEGALY~124F --> ACROMEGALY~124t6)
- ..I DVBACH=0 D
- ...S $P(^DVB(396.18,DVBABIEN,0),"^",1)=NM_"~"_DVBVERSN
- ...W "Activated: "_$P($G(^DVB(396.18,DVBABIEN,0)),"^",1),!
- ;
- K DVBABIEN,DVBABST,DVBACH
- Q
- ;
- RBXREF ;Rebuild cross-references in (#396.18) file.
- ;
- W !!,"Cleaning up files and rebuilding 2 cross-references.",!,"This may take a few minutes.",!
- ;
- ;XRef: B
- W !!,"Rebuilding 'B' x-ref, CAPRI TEMPLATE DEFINITIONS file",!
- N DA,DIK,REGIEN,ROOT
- S ROOT=$$ROOT^DILFD(396.18,,1) K @ROOT@("B")
- S REGIEN=0
- F S REGIEN=$O(@ROOT@(REGIEN)) Q:'REGIEN D
- . S DIK=$$ROOT^DILFD(396.18,","_REGIEN_","),DIK(1)=".01^B"
- . S DA(1)=REGIEN D ENALL^DIK
- ;
- ;XRef: AV
- W !!,"Rebuilding 'AV' x-ref, CAPRI TEMPLATE DEFINITIONS file",!
- N DA,DIK,REGIEN,ROOT
- S ROOT=$$ROOT^DILFD(396.18,,1) K @ROOT@("AV")
- S REGIEN=0
- F S REGIEN=$O(@ROOT@(REGIEN)) Q:'REGIEN D
- . S DIK=$$ROOT^DILFD(396.18,","_REGIEN_","),DIK(1)=".01^AV"
- . S DA(1)=REGIEN D ENALL^DIK
- ;
- K DA,DIK,REGIEN,ROOT
- Q
- ;
- DISABLE(NM) ;Disable matching exam template entries.
- ;
- ;This procedure will find each entry in the CAPRI TEMPLATE DEFINITIONS
- ;(#396.18) file that matches the name (NM) of the template being exported.
- ;Once a matching entry is found, it will be disabled if the version
- ;suffix (i.e. ~124T5) does not match the version suffix that will be used
- ;for templates loaded by the patch on the target system (i.e. ~124T6).
- ;
- ;An entry will be disabled by doing the following:
- ; - Turning off the SELECTABLE BY USER? field. This will keep the entry
- ; from showing in the CAPRI GUI template list.
- ; - Looking at DE-ACTIVATION DATE field. If there's no date, set it to today.
- ;
- N DVBABIEN ;ien of CAPRI TEMPLATE DEFINITIONS file
- N DVBABST ;template NAME field (i.e. ACROMEGALY~124T5)
- N DVBACH ;flag used to indicate template was disabled
- ;
- S DVBABIEN=0
- ;
- ;walk through CAPRI TEMPLATE DEFINITIONS file entries
- F S DVBABIEN=$O(^DVB(396.18,DVBABIEN)) Q:'DVBABIEN D
- .S DVBABST=$P($G(^DVB(396.18,DVBABIEN,0)),"^",1) ;template name
- .;if name matches and version is different, then disable entry
- .I $P(DVBABST,"~",1)=NM I $P(DVBABST,"~",2)'=DVBVERSN D
- ..S DVBACH=0
- ..;turn SELECTABLE BY USER field off
- ..I $P(^DVB(396.18,DVBABIEN,6),"^",1)'="0" S $P(^DVB(396.18,DVBABIEN,6),"^",1)="0",DVBACH=1
- ..;set DE-ACTIVATION DATE field to TODAY
- ..I $P(^DVB(396.18,DVBABIEN,2),"^",2)="" S $P(^DVB(396.18,DVBABIEN,2),"^",2)=DT,DVBACH=1
- ..;output list of disabled templates
- ..I DVBACH=1 W "Disabled: "_DVBABST,!
- ;
- K DVBABIEN,DVBABST,DVBACH
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBA2824 10434 printed Mar 13, 2025@20:44:34 Page 2
- DVBA2824 ;ALB/KCL - PATCH DVBA*2.7*124 INSTALL UTILITIES ; 5/1/08
- +1 ;;2.7;AMIE;**124**;Apr 10, 1995;Build 56
- +2 ;
- PRE ;Pre-install entry point.
- +1 ;
- +2 ;Used to disable older versions of a template for those templates being
- +3 ;exported with the patch.
- +4 ; - Make sure to call the DISABLE procedure for each template name
- +5 ; being exported in the patch.
- +6 ; - This must be called as a pre-init or else it will disable the
- +7 ; templates that are being loaded by the patch.
- +8 ;
- +9 NEW DVBVERSS,DVBVERSN
- +10 ;
- +11 ;what the template version will be in the incoming patch
- +12 ;(version pulled from export account)
- +13 SET DVBVERSS="124F"
- +14 ;what the final template version should be once the template is
- +15 ;loaded by the patch on the target system
- +16 SET DVBVERSN="124"
- +17 ;
- +18 WRITE !!!,"**** PRE-INSTALL PROCESSING ****",!
- +19 WRITE !,"Disabling templates...",!!
- +20 ;
- +21 DO DISABLE("ACROMEGALY")
- +22 DO DISABLE("AID AND ATTENDANCE OR HOUSEBOUND EXAMINATION")
- +23 ;this template is being de-activated
- DO DISABLE("AMPUTATION")
- +24 DO DISABLE("ARRHYTHMIAS")
- +25 DO DISABLE("ARTERIES, VEINS AND MISCELLANEOUS")
- +26 DO DISABLE("AUDIO")
- +27 DO DISABLE("BONES (FRACTURES AND BONE DISEASE)")
- +28 DO DISABLE("BRAIN AND SPINAL CORD")
- +29 DO DISABLE("CHRONIC FATIGUE SYNDROME")
- +30 DO DISABLE("COLD INJURY PROTOCOL EXAMINATION")
- +31 DO DISABLE("CRANIAL NERVES")
- +32 DO DISABLE("CUSHINGS SYNDROME")
- +33 DO DISABLE("DENTAL AND ORAL")
- +34 DO DISABLE("DIABETES MELLITUS")
- +35 DO DISABLE("DIGESTIVE CONDITIONS, MISCELLANEOUS")
- +36 DO DISABLE("EAR DISEASE")
- +37 DO DISABLE("EATING DISORDERS")
- +38 DO DISABLE("ENDOCRINE, MISCELLANEOUS")
- +39 DO DISABLE("EPILEPSY AND NARCOLEPSY")
- +40 DO DISABLE("ESOPHAGUS AND HIATAL HERNIA")
- +41 DO DISABLE("EYE EXAMINATION")
- +42 DO DISABLE("FEET")
- +43 DO DISABLE("FIBROMYALGIA")
- +44 DO DISABLE("GENERAL MEDICAL EXAMINATION")
- +45 DO DISABLE("GENITOURINARY EXAMINATION")
- +46 DO DISABLE("GULF WAR GUIDELINES")
- +47 DO DISABLE("GYNECOLOGICAL CONDITIONS AND DISORDERS OF THE BREAST")
- +48 DO DISABLE("HAND, THUMB, AND FINGERS")
- +49 DO DISABLE("HEART")
- +50 DO DISABLE("HEMIC DISORDERS")
- +51 DO DISABLE("HIV-RELATED ILLNESS")
- +52 DO DISABLE("HYPERTENSION")
- +53 DO DISABLE("INFECTIOUS, IMMUNE, AND NUTRITIONAL DISABILITIES")
- +54 DO DISABLE("INITIAL EVALUATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD)")
- +55 DO DISABLE("INTESTINES (LARGE AND SMALL)")
- +56 DO DISABLE("JOINTS")
- +57 DO DISABLE("LIVER, GALL BLADDER, AND PANCREAS")
- +58 DO DISABLE("LYMPHATIC DISORDERS")
- +59 DO DISABLE("MEDICAL OPINION")
- +60 DO DISABLE("MENTAL DISORDERS (EXCEPT PTSD AND EATING DISORDERS)")
- +61 DO DISABLE("MOUTH, LIPS AND TONGUE")
- +62 DO DISABLE("MUSCLES")
- +63 DO DISABLE("NEUROLOGICAL DISORDERS, MISCELLANEOUS")
- +64 DO DISABLE("NOSE, SINUS, LARYNX, AND PHARYNX")
- +65 DO DISABLE("PERIPHERAL NERVES")
- +66 DO DISABLE("PRISONER OF WAR PROTOCOL EXAMINATION")
- +67 DO DISABLE("PULMONARY TUBERCULOSIS AND MYCOBACTERIAL DISEASES")
- +68 DO DISABLE("RECTUM AND ANUS")
- +69 DO DISABLE("RESIDUALS OF AMPUTATIONS")
- +70 DO DISABLE("RESPIRATORY (OBSTRUCTIVE, RESTRICTIVE, AND INTERSTITIAL)")
- +71 DO DISABLE("RESPIRATORY DISEASES, MISCELLANEOUS")
- +72 DO DISABLE("REVIEW EXAMINATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD)")
- +73 DO DISABLE("SCARS")
- +74 DO DISABLE("SENSE OF SMELL AND TASTE")
- +75 DO DISABLE("SKIN DISEASES (OTHER THAN SCARS)")
- +76 DO DISABLE("SOCIAL AND INDUSTRIAL SURVEY")
- +77 DO DISABLE("SPINE")
- +78 DO DISABLE("STOMACH, DUODENUM AND PERITONEAL ADHESIONS")
- +79 DO DISABLE("THYROID AND PARATHYROID DISEASES")
- +80 QUIT
- +81 ;
- POST ;Post-install entry point.
- +1 ;
- +2 ;Used to rename templates that were loaded by the patch.
- +3 ; - Make sure to call POSTP procedure for each template
- +4 ; name being loaded by the patch.
- +5 ; - Must be called as a post-init in order to rename those
- +6 ; templates being loaded by the patch.
- +7 ;
- +8 NEW DVBVERSS,DVBVERSN
- +9 ;
- +10 ;what the template version will be in the incoming patch
- +11 ;(version pulled from export account)
- +12 SET DVBVERSS="124F"
- +13 ;what the final template version should be once the template is
- +14 ;loaded by the patch on the target system
- +15 SET DVBVERSN="124"
- +16 ;
- +17 WRITE !!!,"**** POST-INSTALL PROCESSING ****",!
- +18 WRITE !,"Activating templates...",!!
- +19 ;
- +20 DO POSTP("ACROMEGALY")
- +21 DO POSTP("AID AND ATTENDANCE OR HOUSEBOUND EXAMINATION")
- +22 DO POSTP("ARRHYTHMIAS")
- +23 DO POSTP("ARTERIES, VEINS AND MISCELLANEOUS")
- +24 DO POSTP("AUDIO")
- +25 DO POSTP("BONES (FRACTURES AND BONE DISEASE)")
- +26 DO POSTP("BRAIN AND SPINAL CORD")
- +27 DO POSTP("CHRONIC FATIGUE SYNDROME")
- +28 DO POSTP("COLD INJURY PROTOCOL EXAMINATION")
- +29 DO POSTP("CRANIAL NERVES")
- +30 DO POSTP("CUSHINGS SYNDROME")
- +31 DO POSTP("DENTAL AND ORAL")
- +32 DO POSTP("DIABETES MELLITUS")
- +33 DO POSTP("DIGESTIVE CONDITIONS, MISCELLANEOUS")
- +34 DO POSTP("EAR DISEASE")
- +35 DO POSTP("EATING DISORDERS")
- +36 DO POSTP("ENDOCRINE, MISCELLANEOUS")
- +37 DO POSTP("EPILEPSY AND NARCOLEPSY")
- +38 DO POSTP("ESOPHAGUS AND HIATAL HERNIA")
- +39 DO POSTP("EYE EXAMINATION")
- +40 DO POSTP("FEET")
- +41 DO POSTP("FIBROMYALGIA")
- +42 DO POSTP("GENERAL MEDICAL EXAMINATION")
- +43 DO POSTP("GENITOURINARY EXAMINATION")
- +44 DO POSTP("GULF WAR GUIDELINES")
- +45 DO POSTP("GYNECOLOGICAL CONDITIONS AND DISORDERS OF THE BREAST")
- +46 DO POSTP("HAND, THUMB, AND FINGERS")
- +47 DO POSTP("HEART")
- +48 DO POSTP("HEMIC DISORDERS")
- +49 DO POSTP("HIV-RELATED ILLNESS")
- +50 DO POSTP("HYPERTENSION")
- +51 DO POSTP("INFECTIOUS, IMMUNE, AND NUTRITIONAL DISABILITIES")
- +52 DO POSTP("INITIAL EVALUATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD)")
- +53 DO POSTP("INTESTINES (LARGE AND SMALL)")
- +54 DO POSTP("JOINTS")
- +55 DO POSTP("LIVER, GALL BLADDER, AND PANCREAS")
- +56 DO POSTP("LYMPHATIC DISORDERS")
- +57 DO POSTP("MEDICAL OPINION")
- +58 DO POSTP("MENTAL DISORDERS (EXCEPT PTSD AND EATING DISORDERS)")
- +59 DO POSTP("MOUTH, LIPS AND TONGUE")
- +60 DO POSTP("MUSCLES")
- +61 DO POSTP("NEUROLOGICAL DISORDERS, MISCELLANEOUS")
- +62 DO POSTP("NOSE, SINUS, LARYNX, AND PHARYNX")
- +63 DO POSTP("PERIPHERAL NERVES")
- +64 DO POSTP("PRISONER OF WAR PROTOCOL EXAMINATION")
- +65 DO POSTP("PULMONARY TUBERCULOSIS AND MYCOBACTERIAL DISEASES")
- +66 DO POSTP("RECTUM AND ANUS")
- +67 DO POSTP("RESIDUALS OF AMPUTATIONS")
- +68 DO POSTP("RESPIRATORY (OBSTRUCTIVE, RESTRICTIVE, AND INTERSTITIAL)")
- +69 DO POSTP("RESPIRATORY DISEASES, MISCELLANEOUS")
- +70 DO POSTP("REVIEW EXAMINATION FOR POST-TRAUMATIC STRESS DISORDER (PTSD)")
- +71 DO POSTP("SCARS")
- +72 DO POSTP("SENSE OF SMELL AND TASTE")
- +73 DO POSTP("SKIN DISEASES (OTHER THAN SCARS)")
- +74 DO POSTP("SOCIAL AND INDUSTRIAL SURVEY")
- +75 DO POSTP("SPINE")
- +76 DO POSTP("STOMACH, DUODENUM AND PERITONEAL ADHESIONS")
- +77 DO POSTP("THYROID AND PARATHYROID DISEASES")
- +78 ;
- +79 ;re-build cross references
- +80 DO RBXREF
- +81 QUIT
- +82 ;
- POSTP(NM) ;Rename templates loaded by the patch.
- +1 ;
- +2 ;This procedure is used to lookup and rename a template in the
- +3 ;CAPRI TEMPLATE DEFINITIONS (#396.18) file. This is done to rename
- +4 ;the imported version of a template (i.e. ACROMEGALY~124F) to it's
- +5 ;new name/version (i.e. ACROMEGALY~124T6).
- +6 ;
- +7 ;ien of CAPRI TEMPLATE DEFINITIONS file
- NEW DVBABIEN,DVBABIE2
- +8 ;template NAME field (i.e. ACROMEGALY~124F)
- NEW DVBABST
- +9 ;template NAME field (i.e. ACROMEGALY~124T6)
- NEW DVBABS2
- +10 ;flag to indicate if template version is found or not
- NEW DVBACH
- +11 ;
- +12 SET DVBABIEN=0
- +13 ;
- +14 ;main loop-walk through CAPRI TEMPLATE DEFINITIONS file entries
- +15 FOR
- SET DVBABIEN=$ORDER(^DVB(396.18,DVBABIEN))
- if 'DVBABIEN
- QUIT
- Begin DoDot:1
- +16 ;template name
- SET DVBABST=$PIECE($GET(^DVB(396.18,DVBABIEN,0)),"^",1)
- +17 ;look for template versions just loaded by the patch (~124F)
- +18 IF $PIECE(DVBABST,"~",1)=NM
- IF $PIECE(DVBABST,"~",2)=DVBVERSS
- Begin DoDot:2
- +19 SET DVBABIE2=0
- SET DVBACH=0
- +20 ;secondary loop-walk through CAPRI TEMPLATE DEFINITIONS file entries
- +21 FOR
- SET DVBABIE2=$ORDER(^DVB(396.18,DVBABIE2))
- if 'DVBABIE2
- QUIT
- Begin DoDot:3
- +22 ;template name
- SET DVBABS2=$PIECE($GET(^DVB(396.18,DVBABIE2,0)),"^",1)
- +23 ;if new version of template already exists in file, set flag
- +24 IF $PIECE(DVBABS2,"~",1)=NM
- IF $PIECE(DVBABS2,"~",2)=DVBVERSN
- SET DVBACH=1
- End DoDot:3
- +25 ;if new version already exists, delete the imported version (abort rename)
- +26 IF DVBACH=1
- Begin DoDot:3
- +27 WRITE "Found existing "_NM_". No modifications made.",!
- +28 KILL ^DVB(396.18,DVBABIEN)
- End DoDot:3
- +29 ;otherwise, if new version isn't found, rename imported template
- +30 ;name to the new version name (i.e. ACROMEGALY~124F --> ACROMEGALY~124t6)
- +31 IF DVBACH=0
- Begin DoDot:3
- +32 SET $PIECE(^DVB(396.18,DVBABIEN,0),"^",1)=NM_"~"_DVBVERSN
- +33 WRITE "Activated: "_$PIECE($GET(^DVB(396.18,DVBABIEN,0)),"^",1),!
- End DoDot:3
- End DoDot:2
- End DoDot:1
- +34 ;
- +35 KILL DVBABIEN,DVBABST,DVBACH
- +36 QUIT
- +37 ;
- RBXREF ;Rebuild cross-references in (#396.18) file.
- +1 ;
- +2 WRITE !!,"Cleaning up files and rebuilding 2 cross-references.",!,"This may take a few minutes.",!
- +3 ;
- +4 ;XRef: B
- +5 WRITE !!,"Rebuilding 'B' x-ref, CAPRI TEMPLATE DEFINITIONS file",!
- +6 NEW DA,DIK,REGIEN,ROOT
- +7 SET ROOT=$$ROOT^DILFD(396.18,,1)
- KILL @ROOT@("B")
- +8 SET REGIEN=0
- +9 FOR
- SET REGIEN=$ORDER(@ROOT@(REGIEN))
- if 'REGIEN
- QUIT
- Begin DoDot:1
- +10 SET DIK=$$ROOT^DILFD(396.18,","_REGIEN_",")
- SET DIK(1)=".01^B"
- +11 SET DA(1)=REGIEN
- DO ENALL^DIK
- End DoDot:1
- +12 ;
- +13 ;XRef: AV
- +14 WRITE !!,"Rebuilding 'AV' x-ref, CAPRI TEMPLATE DEFINITIONS file",!
- +15 NEW DA,DIK,REGIEN,ROOT
- +16 SET ROOT=$$ROOT^DILFD(396.18,,1)
- KILL @ROOT@("AV")
- +17 SET REGIEN=0
- +18 FOR
- SET REGIEN=$ORDER(@ROOT@(REGIEN))
- if 'REGIEN
- QUIT
- Begin DoDot:1
- +19 SET DIK=$$ROOT^DILFD(396.18,","_REGIEN_",")
- SET DIK(1)=".01^AV"
- +20 SET DA(1)=REGIEN
- DO ENALL^DIK
- End DoDot:1
- +21 ;
- +22 KILL DA,DIK,REGIEN,ROOT
- +23 QUIT
- +24 ;
- DISABLE(NM) ;Disable matching exam template entries.
- +1 ;
- +2 ;This procedure will find each entry in the CAPRI TEMPLATE DEFINITIONS
- +3 ;(#396.18) file that matches the name (NM) of the template being exported.
- +4 ;Once a matching entry is found, it will be disabled if the version
- +5 ;suffix (i.e. ~124T5) does not match the version suffix that will be used
- +6 ;for templates loaded by the patch on the target system (i.e. ~124T6).
- +7 ;
- +8 ;An entry will be disabled by doing the following:
- +9 ; - Turning off the SELECTABLE BY USER? field. This will keep the entry
- +10 ; from showing in the CAPRI GUI template list.
- +11 ; - Looking at DE-ACTIVATION DATE field. If there's no date, set it to today.
- +12 ;
- +13 ;ien of CAPRI TEMPLATE DEFINITIONS file
- NEW DVBABIEN
- +14 ;template NAME field (i.e. ACROMEGALY~124T5)
- NEW DVBABST
- +15 ;flag used to indicate template was disabled
- NEW DVBACH
- +16 ;
- +17 SET DVBABIEN=0
- +18 ;
- +19 ;walk through CAPRI TEMPLATE DEFINITIONS file entries
- +20 FOR
- SET DVBABIEN=$ORDER(^DVB(396.18,DVBABIEN))
- if 'DVBABIEN
- QUIT
- Begin DoDot:1
- +21 ;template name
- SET DVBABST=$PIECE($GET(^DVB(396.18,DVBABIEN,0)),"^",1)
- +22 ;if name matches and version is different, then disable entry
- +23 IF $PIECE(DVBABST,"~",1)=NM
- IF $PIECE(DVBABST,"~",2)'=DVBVERSN
- Begin DoDot:2
- +24 SET DVBACH=0
- +25 ;turn SELECTABLE BY USER field off
- +26 IF $PIECE(^DVB(396.18,DVBABIEN,6),"^",1)'="0"
- SET $PIECE(^DVB(396.18,DVBABIEN,6),"^",1)="0"
- SET DVBACH=1
- +27 ;set DE-ACTIVATION DATE field to TODAY
- +28 IF $PIECE(^DVB(396.18,DVBABIEN,2),"^",2)=""
- SET $PIECE(^DVB(396.18,DVBABIEN,2),"^",2)=DT
- SET DVBACH=1
- +29 ;output list of disabled templates
- +30 IF DVBACH=1
- WRITE "Disabled: "_DVBABST,!
- End DoDot:2
- End DoDot:1
- +31 ;
- +32 KILL DVBABIEN,DVBABST,DVBACH
- +33 QUIT