GMTSP8 ;SLC/SBW - HS Component Installation Routine ; 8/4/96 18:06
;;2.7;Health Summary;**8**;Oct 20, 1995
HSCOMP ; Install Health Summary component
Q:+$$VERSION^XPDUTL("GMTS")<2.7 ;Quit if HS 2.7 not installed
N DIC,DLAYGO,DINUM,X,Y,INCLUDE
D COMP1,COMP2
W !,"Installing new components in AD HOC Health Summary."
S INCLUDE=0 D ENPOST^GMTSLOAD
Q
COMP1 ;VITAL SIGNS OUTPATIENT component
N AD,DA,DIE,DR,GMX
S (DIC,DLAYGO)=142.1,DIC(0)="NXL",(X,GMX)="VITAL SIGNS OUTPATIENT",DINUM=75
S AD=$O(^GMT(142.1,"B",GMX,0)) I AD=75 W !,GMX," already exists in Health Summary Component (142.1) File!" Q
D ^DIC
FILE1 I +Y'>0 W !!,"Could not install ",GMX," component",! Q
W !,"Adding "_GMX_" component to HEALTH SUMMARY COMPONENT (142.1) file."
S DIE=DIC,DA=+Y,DR="1///^S X=""OUTPAT""_$C(59)_""GMTSVS"";3///VSO"
S DR=DR_";2///Y;4///Y;9///Vital Signs Outpat."
D ^DIE
S ^GMT(142.1,+DA,3.5,0)="^^7^7^"_DT_"^"
S ^GMT(142.1,+DA,3.5,1,0)="This component contains outpatient vital measurements extracted"
S ^GMT(142.1,+DA,3.5,2,0)="from the Vital/Measurements (Gen. Med. Rec. - Vitals) package. Time and maximum"
S ^GMT(142.1,+DA,3.5,3,0)="occurrence limits apply. Data presented includes: measurement"
S ^GMT(142.1,+DA,3.5,4,0)="date/time, blood pressure, (as SBP/DBP), pulse, temperature,"
S ^GMT(142.1,+DA,3.5,5,0)="height, weight, and respiratory rate."
S ^GMT(142.1,+DA,3.5,6,0)="Metric values will be displayed for temperature, height and weight."
S ^GMT(142.1,+DA,3.5,7,0)="If there are no outpatient measurements, a message will be displayed and"
S ^GMT(142.1,+DA,3.5,8,0)="the last non-outpatient measurements will be shown."
W !,"Component Installed.",!
D PDXINST(GMX)
Q
COMP2 ;VITAL SIGNS SELECTED OUTPATIENT component
N AD,DA,DIE,DR,GMX
S (DIC,DLAYGO)=142.1,DIC(0)="NXL",(X,GMX)="VITAL SIGNS SELECTED OUTPAT.",DINUM=76
S AD=$O(^GMT(142.1,"B",GMX,0)) I AD=76 W !,GMX," already exists in Health Summary Component (142.1) File!" Q
D ^DIC
FILE2 I +Y'>0 W !!,"Could not install ",GMX," component",! Q
W !,"Adding "_GMX_" component to HEALTH SUMMARY COMPONENT (142.1) file."
S DIE=DIC,DA=+Y,DR="1///^S X=""OUTPAT""_$C(59)_""GMTSVSS"";3///SVSO"
S DR=DR_";2///Y;4///Y;7///120.51;9///Vital Select Outpat."
S DR(2,142.17)=".01"
D ^DIE
S ^GMT(142.1,+DA,3.5,0)="^^10^10^"_DT_"^"
S ^GMT(142.1,+DA,3.5,1,0)="This component contains selected outpatient vital measurements"
S ^GMT(142.1,+DA,3.5,2,0)="extracted from the Vital/Measurements (Gen. Med. Rec. - Vitals) package."
S ^GMT(142.1,+DA,3.5,3,0)="Time and maximum occurrence limits apply and the user is allowed"
S ^GMT(142.1,+DA,3.5,4,0)="to select any of the vital measurement types defined in the"
S ^GMT(142.1,+DA,3.5,5,0)="GMRV Vital Type file (e.g., pulse, blood pressure, temperature, height,"
S ^GMT(142.1,+DA,3.5,6,0)="weight, and respiration rate). Data presented includes: measurement"
S ^GMT(142.1,+DA,3.5,7,0)="date/time, measurement type and measurement value,"
S ^GMT(142.1,+DA,3.5,8,0)="and metric values for temperature, height and weight."
S ^GMT(142.1,+DA,3.5,9,0)="If there is no outpatient measurements, a message will be shown and"
S ^GMT(142.1,+DA,3.5,10,0)="the last selected non-outpatient measurements will be shown."
S ^GMT(142.1,+DA,3.5,11,0)="Note: Formatted display is horizontal."
W !,"Component Installed.",!
;SELECTED COMPONENTS CAN'T BE USED IN PDX
Q
PDXINST(COMP) ;Set PDX up to use new HS components
N ERR,POINT,DASHES,DOTS,PDXCOMP
W !,"Installing ",COMP," into PDX Data Segments.",!
D INSTALL(COMP)
Q
INSTALL(COMP) ;Install component in Data Segment (#394.71) file
;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
GMTSP8 ;SLC/SBW - HS Component Installation Routine ; 8/4/96 18:06
+1 ;;2.7;Health Summary;**8**;Oct 20, 1995
HSCOMP ; Install Health Summary component
+1 ;Quit if HS 2.7 not installed
IF +$$VERSION^XPDUTL("GMTS")<2.7
QUIT
+2 NEW DIC,DLAYGO,DINUM,X,Y,INCLUDE
+3 DO COMP1
DO COMP2
+4 WRITE !,"Installing new components in AD HOC Health Summary."
+5 SET INCLUDE=0
DO ENPOST^GMTSLOAD
+6 QUIT
COMP1 ;VITAL SIGNS OUTPATIENT component
+1 NEW AD,DA,DIE,DR,GMX
+2 SET (DIC,DLAYGO)=142.1
SET DIC(0)="NXL"
SET (X,GMX)="VITAL SIGNS OUTPATIENT"
SET DINUM=75
+3 SET AD=$ORDER(^GMT(142.1,"B",GMX,0))
IF AD=75
WRITE !,GMX," already exists in Health Summary Component (142.1) File!"
QUIT
+4 DO ^DIC
FILE1 IF +Y'>0
WRITE !!,"Could not install ",GMX," component",!
QUIT
+1 WRITE !,"Adding "_GMX_" component to HEALTH SUMMARY COMPONENT (142.1) file."
+2 SET DIE=DIC
SET DA=+Y
SET DR="1///^S X=""OUTPAT""_$C(59)_""GMTSVS"";3///VSO"
+3 SET DR=DR_";2///Y;4///Y;9///Vital Signs Outpat."
+4 DO ^DIE
+5 SET ^GMT(142.1,+DA,3.5,0)="^^7^7^"_DT_"^"
+6 SET ^GMT(142.1,+DA,3.5,1,0)="This component contains outpatient vital measurements extracted"
+7 SET ^GMT(142.1,+DA,3.5,2,0)="from the Vital/Measurements (Gen. Med. Rec. - Vitals) package. Time and maximum"
+8 SET ^GMT(142.1,+DA,3.5,3,0)="occurrence limits apply. Data presented includes: measurement"
+9 SET ^GMT(142.1,+DA,3.5,4,0)="date/time, blood pressure, (as SBP/DBP), pulse, temperature,"
+10 SET ^GMT(142.1,+DA,3.5,5,0)="height, weight, and respiratory rate."
+11 SET ^GMT(142.1,+DA,3.5,6,0)="Metric values will be displayed for temperature, height and weight."
+12 SET ^GMT(142.1,+DA,3.5,7,0)="If there are no outpatient measurements, a message will be displayed and"
+13 SET ^GMT(142.1,+DA,3.5,8,0)="the last non-outpatient measurements will be shown."
+14 WRITE !,"Component Installed.",!
+15 DO PDXINST(GMX)
+16 QUIT
COMP2 ;VITAL SIGNS SELECTED OUTPATIENT component
+1 NEW AD,DA,DIE,DR,GMX
+2 SET (DIC,DLAYGO)=142.1
SET DIC(0)="NXL"
SET (X,GMX)="VITAL SIGNS SELECTED OUTPAT."
SET DINUM=76
+3 SET AD=$ORDER(^GMT(142.1,"B",GMX,0))
IF AD=76
WRITE !,GMX," already exists in Health Summary Component (142.1) File!"
QUIT
+4 DO ^DIC
FILE2 IF +Y'>0
WRITE !!,"Could not install ",GMX," component",!
QUIT
+1 WRITE !,"Adding "_GMX_" component to HEALTH SUMMARY COMPONENT (142.1) file."
+2 SET DIE=DIC
SET DA=+Y
SET DR="1///^S X=""OUTPAT""_$C(59)_""GMTSVSS"";3///SVSO"
+3 SET DR=DR_";2///Y;4///Y;7///120.51;9///Vital Select Outpat."
+4 SET DR(2,142.17)=".01"
+5 DO ^DIE
+6 SET ^GMT(142.1,+DA,3.5,0)="^^10^10^"_DT_"^"
+7 SET ^GMT(142.1,+DA,3.5,1,0)="This component contains selected outpatient vital measurements"
+8 SET ^GMT(142.1,+DA,3.5,2,0)="extracted from the Vital/Measurements (Gen. Med. Rec. - Vitals) package."
+9 SET ^GMT(142.1,+DA,3.5,3,0)="Time and maximum occurrence limits apply and the user is allowed"
+10 SET ^GMT(142.1,+DA,3.5,4,0)="to select any of the vital measurement types defined in the"
+11 SET ^GMT(142.1,+DA,3.5,5,0)="GMRV Vital Type file (e.g., pulse, blood pressure, temperature, height,"
+12 SET ^GMT(142.1,+DA,3.5,6,0)="weight, and respiration rate). Data presented includes: measurement"
+13 SET ^GMT(142.1,+DA,3.5,7,0)="date/time, measurement type and measurement value,"
+14 SET ^GMT(142.1,+DA,3.5,8,0)="and metric values for temperature, height and weight."
+15 SET ^GMT(142.1,+DA,3.5,9,0)="If there is no outpatient measurements, a message will be shown and"
+16 SET ^GMT(142.1,+DA,3.5,10,0)="the last selected non-outpatient measurements will be shown."
+17 SET ^GMT(142.1,+DA,3.5,11,0)="Note: Formatted display is horizontal."
+18 WRITE !,"Component Installed.",!
+19 ;SELECTED COMPONENTS CAN'T BE USED IN PDX
+20 QUIT
PDXINST(COMP) ;Set PDX up to use new HS components
+1 NEW ERR,POINT,DASHES,DOTS,PDXCOMP
+2 WRITE !,"Installing ",COMP," into PDX Data Segments.",!
+3 DO INSTALL(COMP)
+4 QUIT
INSTALL(COMP) ;Install component in Data Segment (#394.71) file
+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