GMTSPOS2 ;SLC/SBW - Set PDX up to use new HS components ;11/May/95
;;2.7;Health Summary;;Oct 20, 1995
EN ;ENTRY POINT
N DIE,DIF,NSPACE,PDXVER,X,XCN,XCNP
I +$$VERSION^XPDUTL("VAQ")<1.5 Q
W !!,"** Installing PDX Data Segments for Health Summary Components **"
S X="VAQUTL50" X ^%ZOSF("TEST") I $T G DOIT
W !!,"** VAQUTL50 routine not installed, will do so for you."
S X="GMTSPDXZ",XCNP=0,DIF="^UTILITY(""GMTSPDXZ""," X ^%ZOSF("LOAD") W !," Renaming GMTSPDXZ as VAQUTL50."
S X="VAQUTL50",XCN=2,DIE="^UTILITY(""GMTSPDXZ""," X ^%ZOSF("SAVE") K ^UTILITY("GMTSPDXA")
;
;DECLARE VARIABLES
DOIT N ERR,POINT,COMP,DASHES,DOTS,PDXCOMP
F COMP="PCE HEALTH FACTORS ALL","PCE OUTPATIENT ENCOUNTERS","PCE MEASUREMENTS NON-TABULAR","PCE IMMUNIZATIONS","PCE SKIN TESTS" D INSTALL
F COMP="PCE EDUCATION","PCE EDUCATION LATEST","PCE OUTPATIENT DIAGNOSIS","PCE EXAMS LATEST","PCE TREATMENTS PROVIDED" D INSTALL
F COMP="COMPENSATION AND PENSION EXAMS","DISCHARGE SUMMARY","DISCHARGE SUMMARY BRIEF","MAS ADT HISTORY EXPANDED","MEDICINE ABNORMAL BRIEF","MEDICINE BRIEF REPORT","MEDICINE FULL CAPTIONED","MEDICINE FULL REPORT" D INSTALL
F COMP="PROBLEM LIST ALL","PROBLEM LIST ACTIVE","PROBLEM LIST INACTIVE","MENTAL HEALTH PHYSICAL EXAM","SOCIAL WORK","LAB ELECTRON MICROSCOPY","ADVERSE REACTIONS/ALLERG BRIEF" D INSTALL
W !,"Done installing PDX Data Segments....",!
Q
INSTALL ;Install components
;CONVERT TO PDX SEGMENT NAME
S PDXCOMP=$$FIRSTUP^VAQUTL50(COMP)
;GET POINTER TO COMPONENT
S POINT=+$O(^GMT(142.1,"B",COMP,0))
I ('POINT) D Q
.W !!,$C(7),COMP," not found in HEALTH SUMMARY COMPONENT file."
.W !,PDXCOMP," not added to VAQ - DATA SEGMENT file.",$C(7)
;CREATE DATA SEGMENT USING DEFAULT TIME & OCCURRENCE LIMITS
S ERR=$$ADDSEG^VAQUTL50(POINT)
I (ERR<0) W !,?5,$P(ERR,"^",2),$C(7) Q
W !?3,PDXCOMP," added to VAQ - DATA SEGMENT file (#394.71)."
W !
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSPOS2 1900 printed Oct 16, 2024@18:00:12 Page 2
GMTSPOS2 ;SLC/SBW - Set PDX up to use new HS components ;11/May/95
+1 ;;2.7;Health Summary;;Oct 20, 1995
EN ;ENTRY POINT
+1 NEW DIE,DIF,NSPACE,PDXVER,X,XCN,XCNP
+2 IF +$$VERSION^XPDUTL("VAQ")<1.5
QUIT
+3 WRITE !!,"** Installing PDX Data Segments for Health Summary Components **"
+4 SET X="VAQUTL50"
XECUTE ^%ZOSF("TEST")
IF $TEST
GOTO DOIT
+5 WRITE !!,"** VAQUTL50 routine not installed, will do so for you."
+6 SET X="GMTSPDXZ"
SET XCNP=0
SET DIF="^UTILITY(""GMTSPDXZ"","
XECUTE ^%ZOSF("LOAD")
WRITE !," Renaming GMTSPDXZ as VAQUTL50."
+7 SET X="VAQUTL50"
SET XCN=2
SET DIE="^UTILITY(""GMTSPDXZ"","
XECUTE ^%ZOSF("SAVE")
KILL ^UTILITY("GMTSPDXA")
+8 ;
+9 ;DECLARE VARIABLES
DOIT NEW ERR,POINT,COMP,DASHES,DOTS,PDXCOMP
+1 FOR COMP="PCE HEALTH FACTORS ALL","PCE OUTPATIENT ENCOUNTERS","PCE MEASUREMENTS NON-TABULAR","PCE IMMUNIZATIONS","PCE SKIN TESTS"
DO INSTALL
+2 FOR COMP="PCE EDUCATION","PCE EDUCATION LATEST","PCE OUTPATIENT DIAGNOSIS","PCE EXAMS LATEST","PCE TREATMENTS PROVIDED"
DO INSTALL
+3 FOR COMP="COMPENSATION AND PENSION EXAMS","DISCHARGE SUMMARY","DISCHARGE SUMMARY BRIEF","MAS ADT HISTORY EXPANDED","MEDICINE ABNORMAL BRIEF","MEDICINE BRIEF REPORT","MEDICINE FULL CAPTIONED","MEDICINE FULL REPORT"
DO INSTALL
+4 FOR COMP="PROBLEM LIST ALL","PROBLEM LIST ACTIVE","PROBLEM LIST INACTIVE","MENTAL HEALTH PHYSICAL EXAM","SOCIAL WORK","LAB ELECTRON MICROSCOPY","ADVERSE REACTIONS/ALLERG BRIEF"
DO INSTALL
+5 WRITE !,"Done installing PDX Data Segments....",!
+6 QUIT
INSTALL ;Install components
+1 ;CONVERT TO PDX SEGMENT NAME
+2 SET PDXCOMP=$$FIRSTUP^VAQUTL50(COMP)
+3 ;GET POINTER TO COMPONENT
+4 SET POINT=+$ORDER(^GMT(142.1,"B",COMP,0))
+5 IF ('POINT)
Begin DoDot:1
+6 WRITE !!,$CHAR(7),COMP," not found in HEALTH SUMMARY COMPONENT file."
+7 WRITE !,PDXCOMP," not added to VAQ - DATA SEGMENT file.",$CHAR(7)
End DoDot:1
QUIT
+8 ;CREATE DATA SEGMENT USING DEFAULT TIME & OCCURRENCE LIMITS
+9 SET ERR=$$ADDSEG^VAQUTL50(POINT)
+10 IF (ERR<0)
WRITE !,?5,$PIECE(ERR,"^",2),$CHAR(7)
QUIT
+11 WRITE !?3,PDXCOMP," added to VAQ - DATA SEGMENT file (#394.71)."
+12 WRITE !
+13 QUIT