VistA-WorldVistAEHR/r/HEALTH_SUMMARY-GMTS/GMTSPOS2.m

34 lines
1.8 KiB
Mathematica
Raw Normal View History

2009-11-29 13:37:14 -05:00
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