GMV8PST ;HIOFO/FT-POST-INSTALLATION FOR GMRV*5*8 ;5/3/05 11:48
;;5.0;GEN. MED. REC. - VITALS;**8**;Oct 31, 2002
;
; This routine uses the following IAs:
; #1157 - ^XPDMENU calls (supported)
; #4639 - ^HDISVCMR calls (supported)
; #4651 - ^HDISVF09 calls (supported)
;
;
EN ; Driver subroutine
D AHDRN,AHDRE
D MENU,DEL,FIELD9,XREF1,XREF2,XREF3,ACCESS,KILL,HDIS
Q
;
N GMVOPT,GMVTXT
S GMVOPT="GMRV VMSITE"
S GMVTXT="Use the 'New Term Rapid Turnaround' process"
D OUT^XPDMENU(GMVOPT,GMVTXT)
Q
DEL ; Delete File 120.52, Field 999
; Get rid of data first
N DA,DIE,DR
S DA=0,DIE="^GMRD(120.52,",DR="999///@"
F S DA=$O(^GMRD(120.52,DA)) Q:'DA D
.D ^DIE
.K ^GMRD(120.52,DA,"CONV")
.Q
;get rid of field definition
N DA,DIK
S DIK="^DD(120.52,",DA=999,DA(1)=DA
D ^DIK
Q
FIELD9 ; Delete File 120.51, Field 9 (VITAL/MEASUREMENT) if it exists.
; Get rid of data first.
N DA
I $D(^DD(120.51,9,0)) D
.S DA=0
.F S DA=$O(^GMRD(120.51,DA)) Q:'DA D
..S $P(^GMRD(120.51,DA,0),U,8)=""
..Q
.Q
;get rid of field definition
N DA,DIK
S DA=9 D
.Q:'$D(^DD(120.51,DA,0))
.S DIK="^DD(120.51,",DA(1)=DA
.D ^DIK
.Q
Q
XREF1 ; Adds the AMASTERVUID index to file 120.51
N GMVXR,GMVRES,GMVOUT
S GMVXR("FILE")=120.51
S GMVXR("NAME")="AMASTERVUID"
S GMVXR("TYPE")="R"
S GMVXR("USE")="S"
S GMVXR("EXECUTION")="R"
S GMVXR("ACTIVITY")="IR"
S GMVXR("SHORT DESCR")="This cross-reference identifies the Master entry for a VUID."
S GMVXR("DESCR",1)="If multiple entries have the same VUID in the file, this cross-refernce "
S GMVXR("DESCR",2)="can be used to identify the Master entry for a VUID associated with a "
S GMVXR("DESCR",3)="Term/Concept."
S GMVXR("VAL",1)=99.99
S GMVXR("VAL",1,"SUBSCRIPT")=1
S GMVXR("VAL",1,"LENGTH")=30
S GMVXR("VAL",1,"COLLATION")="F"
S GMVXR("VAL",2)=99.98
S GMVXR("VAL",2,"SUBSCRIPT")=2
S GMVXR("VAL",2,"COLLATION")="F"
D CREIXN^DDMOD(.GMVXR,"SW",.GMVRES,"GMVOUT")
Q
XREF2 ; Adds the AMASTERVUID index to file 120.52
N GMVXR,GMVRES,GMVOUT
S GMVXR("FILE")=120.52
S GMVXR("NAME")="AMASTERVUID"
S GMVXR("TYPE")="R"
S GMVXR("USE")="S"
S GMVXR("EXECUTION")="R"
S GMVXR("ACTIVITY")="IR"
S GMVXR("SHORT DESCR")="This cross-reference identifies the Master entry for a VUID."
S GMVXR("DESCR",1)="If multiple entries have the same VUID in the file, this cross-refernce "
S GMVXR("DESCR",2)="can be used to identify the Master entry for a VUID associated with a "
S GMVXR("DESCR",3)="Term/Concept."
S GMVXR("VAL",1)=99.99
S GMVXR("VAL",1,"SUBSCRIPT")=1
S GMVXR("VAL",1,"LENGTH")=30
S GMVXR("VAL",1,"COLLATION")="F"
S GMVXR("VAL",2)=99.98
S GMVXR("VAL",2,"SUBSCRIPT")=2
S GMVXR("VAL",2,"COLLATION")="F"
D CREIXN^DDMOD(.GMVXR,"SW",.GMVRES,"GMVOUT")
Q
XREF3 ; Adds the AMASTERVUID index to file 120.53
N GMVXR,GMVRES,GMVOUT
S GMVXR("FILE")=120.53
S GMVXR("NAME")="AMASTERVUID"
S GMVXR("TYPE")="R"
S GMVXR("USE")="S"
S GMVXR("EXECUTION")="R"
S GMVXR("ACTIVITY")="IR"
S GMVXR("SHORT DESCR")="This cross-reference identifies the Master entry for a VUID."
S GMVXR("DESCR",1)="If multiple entries have the same VUID in the file, this cross-refernce "
S GMVXR("DESCR",2)="can be used to identify the Master entry for a VUID associated with a "
S GMVXR("DESCR",3)="Term/Concept."
S GMVXR("VAL",1)=99.99
S GMVXR("VAL",1,"SUBSCRIPT")=1
S GMVXR("VAL",1,"LENGTH")=30
S GMVXR("VAL",1,"COLLATION")="F"
S GMVXR("VAL",2)=99.98
S GMVXR("VAL",2,"SUBSCRIPT")=2
S GMVXR("VAL",2,"COLLATION")="F"
D CREIXN^DDMOD(.GMVXR,"SW",.GMVRES,"GMVOUT")
Q
ACCESS ; Set file access
N GMVFILE,GMVNODE
F GMVFILE=120.51,120.52,120.53 D
.F GMVNODE="AUDIT","DD","DEL","LAYGO","WR" D
..S ^DIC(GMVFILE,0,GMVNODE)="@"
..Q
.Q
Q
KILL ; Kill left over x-ref node
K ^DD(120.52,"IX",999)
Q
HDIS ; Call HDIS to begin the 'seeding' process
N DOMPTR,TMP
S TMP=$$GETIEN^HDISVF09("VITALS",.DOMPTR)
D EN^HDISVCMR(DOMPTR,"")
Q
AHDRN ; Create AHDRNEW Index on GMRV Vital Measurement file (#120.5) for use
; by Health Data Repository (HDR)
; Calls HDR API whenever a new entry is made in FILE 120.5
N GMVXR,GMVRES,GMVOUT
S GMVXR("ACTIVITY")=""
S GMVXR("FILE")=120.5
S GMVXR("NAME")="AHDRNEW"
S GMVXR("TYPE")="MU"
S GMVXR("USE")="A"
S GMVXR("EXECUTION")="F"
S GMVXR("SHORT DESCR")="INDEX for HDR"
S GMVXR("DESCR",1)="This cross-reference calls a Health Data Repository (HDR) API whenever a"
S GMVXR("DESCR",2)="new entry is created."
S GMVXR("DESCR",3)=" "
S GMVXR("DESCR",4)="No actual cross-reference nodes are set or killed."
S GMVXR("DESCR",5)=" "
S GMVXR("DESCR",6)="Calls to the VDEFQM routine are covered by Integration Agreement 4253."
S GMVXR("SET")="Q:$D(DIU(0))!($$TESTPAT^VADPT($P(^GMR(120.5,DA,0),U,2))) N ERR,GMVFLAG I $T(QUEUE^VDEFQM)]"""" S GMVFLAG=$$QUEUE^VDEFQM(""ORU^R01"",""SUBTYPE=VTLS^IEN=""_DA,.ERR)"
S GMVXR("KILL")="Q"
S GMVXR("WHOLE KILL")="Q"
S GMVXR("SET CONDITION")="I X1(1)="""",X2(1)'="""" S X=1"
S GMVXR("VAL",1)=.02
D CREIXN^DDMOD(.GMVXR,"k",.GMVRES,"GMVOUT")
I GMVRES="" D
.D BMES^XPDUTL("The AHDRNEW Index was not added to FILE 120.5. Please enter a Remedy ticket.")
.Q
Q
;
AHDRE ; Create AHDRERR Index on GMRV Vital Measurement file (#120.5) for use
; by Health Data Repository (HDR)
; Calls HDR API whenever a FILE 120.5 entry is marked as an error
N GMVXR,GMVRES,GMVOUT
S GMVXR("ACTIVITY")=""
S GMVXR("FILE")=120.5
S GMVXR("NAME")="AHDRERR"
S GMVXR("TYPE")="MU"
S GMVXR("USE")="A"
S GMVXR("EXECUTION")="F"
S GMVXR("SHORT DESCR")="INDEX for HDR"
S GMVXR("DESCR",1)="This cross-reference calls a Health Data Repository (HDR) API whenever a"
S GMVXR("DESCR",2)="FILE 120.5 entry is marked as entered-in-error."
S GMVXR("DESCR",3)=" "
S GMVXR("DESCR",4)="No actual cross-reference nodes are set or killed."
S GMVXR("DESCR",5)=" "
S GMVXR("DESCR",6)="Calls to the VDEFQM routine are covered by Integration Agreement 4253."
S GMVXR("SET")="Q:$D(DIU(0))!($$TESTPAT^VADPT($P(^GMR(120.5,DA,0),U,2))) N ERR,GMVFLAG I $T(QUEUE^VDEFQM)]"""" S GMVFLAG=$$QUEUE^VDEFQM(""ORU^R01"",""SUBTYPE=VTLS^IEN=""_DA,.ERR)"
S GMVXR("KILL")="Q"
S GMVXR("WHOLE KILL")="Q"
S GMVXR("SET CONDITION")="I X1(1)="""",X2(1)]"""" S X=1"
S GMVXR("VAL",1)=2
D CREIXN^DDMOD(.GMVXR,"k",.GMVRES,"GMVOUT")
I GMVRES="" D
.D BMES^XPDUTL("The AHDRERR Index was not added to FILE 120.5. Please enter a Remedy ticket.")
.Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMV8PST 6580 printed Nov 22, 2024@17:08:27 Page 2
GMV8PST ;HIOFO/FT-POST-INSTALLATION FOR GMRV*5*8 ;5/3/05 11:48
+1 ;;5.0;GEN. MED. REC. - VITALS;**8**;Oct 31, 2002
+2 ;
+3 ; This routine uses the following IAs:
+4 ; #1157 - ^XPDMENU calls (supported)
+5 ; #4639 - ^HDISVCMR calls (supported)
+6 ; #4651 - ^HDISVF09 calls (supported)
+7 ;
+8 ;
EN ; Driver subroutine
+1 DO AHDRN
DO AHDRE
+2 DO MENU
DO DEL
DO FIELD9
DO XREF1
DO XREF2
DO XREF3
DO ACCESS
DO KILL
DO HDIS
+3 QUIT
+4 ;
+1 NEW GMVOPT,GMVTXT
+2 SET GMVOPT="GMRV VMSITE"
+3 SET GMVTXT="Use the 'New Term Rapid Turnaround' process"
+4 DO OUT^XPDMENU(GMVOPT,GMVTXT)
+5 QUIT
DEL ; Delete File 120.52, Field 999
+1 ; Get rid of data first
+2 NEW DA,DIE,DR
+3 SET DA=0
SET DIE="^GMRD(120.52,"
SET DR="999///@"
+4 FOR
SET DA=$ORDER(^GMRD(120.52,DA))
if 'DA
QUIT
Begin DoDot:1
+5 DO ^DIE
+6 KILL ^GMRD(120.52,DA,"CONV")
+7 QUIT
End DoDot:1
+8 ;get rid of field definition
+9 NEW DA,DIK
+10 SET DIK="^DD(120.52,"
SET DA=999
SET DA(1)=DA
+11 DO ^DIK
+12 QUIT
FIELD9 ; Delete File 120.51, Field 9 (VITAL/MEASUREMENT) if it exists.
+1 ; Get rid of data first.
+2 NEW DA
+3 IF $DATA(^DD(120.51,9,0))
Begin DoDot:1
+4 SET DA=0
+5 FOR
SET DA=$ORDER(^GMRD(120.51,DA))
if 'DA
QUIT
Begin DoDot:2
+6 SET $PIECE(^GMRD(120.51,DA,0),U,8)=""
+7 QUIT
End DoDot:2
+8 QUIT
End DoDot:1
+9 ;get rid of field definition
+10 NEW DA,DIK
+11 SET DA=9
Begin DoDot:1
+12 if '$DATA(^DD(120.51,DA,0))
QUIT
+13 SET DIK="^DD(120.51,"
SET DA(1)=DA
+14 DO ^DIK
+15 QUIT
End DoDot:1
+16 QUIT
XREF1 ; Adds the AMASTERVUID index to file 120.51
+1 NEW GMVXR,GMVRES,GMVOUT
+2 SET GMVXR("FILE")=120.51
+3 SET GMVXR("NAME")="AMASTERVUID"
+4 SET GMVXR("TYPE")="R"
+5 SET GMVXR("USE")="S"
+6 SET GMVXR("EXECUTION")="R"
+7 SET GMVXR("ACTIVITY")="IR"
+8 SET GMVXR("SHORT DESCR")="This cross-reference identifies the Master entry for a VUID."
+9 SET GMVXR("DESCR",1)="If multiple entries have the same VUID in the file, this cross-refernce "
+10 SET GMVXR("DESCR",2)="can be used to identify the Master entry for a VUID associated with a "
+11 SET GMVXR("DESCR",3)="Term/Concept."
+12 SET GMVXR("VAL",1)=99.99
+13 SET GMVXR("VAL",1,"SUBSCRIPT")=1
+14 SET GMVXR("VAL",1,"LENGTH")=30
+15 SET GMVXR("VAL",1,"COLLATION")="F"
+16 SET GMVXR("VAL",2)=99.98
+17 SET GMVXR("VAL",2,"SUBSCRIPT")=2
+18 SET GMVXR("VAL",2,"COLLATION")="F"
+19 DO CREIXN^DDMOD(.GMVXR,"SW",.GMVRES,"GMVOUT")
+20 QUIT
XREF2 ; Adds the AMASTERVUID index to file 120.52
+1 NEW GMVXR,GMVRES,GMVOUT
+2 SET GMVXR("FILE")=120.52
+3 SET GMVXR("NAME")="AMASTERVUID"
+4 SET GMVXR("TYPE")="R"
+5 SET GMVXR("USE")="S"
+6 SET GMVXR("EXECUTION")="R"
+7 SET GMVXR("ACTIVITY")="IR"
+8 SET GMVXR("SHORT DESCR")="This cross-reference identifies the Master entry for a VUID."
+9 SET GMVXR("DESCR",1)="If multiple entries have the same VUID in the file, this cross-refernce "
+10 SET GMVXR("DESCR",2)="can be used to identify the Master entry for a VUID associated with a "
+11 SET GMVXR("DESCR",3)="Term/Concept."
+12 SET GMVXR("VAL",1)=99.99
+13 SET GMVXR("VAL",1,"SUBSCRIPT")=1
+14 SET GMVXR("VAL",1,"LENGTH")=30
+15 SET GMVXR("VAL",1,"COLLATION")="F"
+16 SET GMVXR("VAL",2)=99.98
+17 SET GMVXR("VAL",2,"SUBSCRIPT")=2
+18 SET GMVXR("VAL",2,"COLLATION")="F"
+19 DO CREIXN^DDMOD(.GMVXR,"SW",.GMVRES,"GMVOUT")
+20 QUIT
XREF3 ; Adds the AMASTERVUID index to file 120.53
+1 NEW GMVXR,GMVRES,GMVOUT
+2 SET GMVXR("FILE")=120.53
+3 SET GMVXR("NAME")="AMASTERVUID"
+4 SET GMVXR("TYPE")="R"
+5 SET GMVXR("USE")="S"
+6 SET GMVXR("EXECUTION")="R"
+7 SET GMVXR("ACTIVITY")="IR"
+8 SET GMVXR("SHORT DESCR")="This cross-reference identifies the Master entry for a VUID."
+9 SET GMVXR("DESCR",1)="If multiple entries have the same VUID in the file, this cross-refernce "
+10 SET GMVXR("DESCR",2)="can be used to identify the Master entry for a VUID associated with a "
+11 SET GMVXR("DESCR",3)="Term/Concept."
+12 SET GMVXR("VAL",1)=99.99
+13 SET GMVXR("VAL",1,"SUBSCRIPT")=1
+14 SET GMVXR("VAL",1,"LENGTH")=30
+15 SET GMVXR("VAL",1,"COLLATION")="F"
+16 SET GMVXR("VAL",2)=99.98
+17 SET GMVXR("VAL",2,"SUBSCRIPT")=2
+18 SET GMVXR("VAL",2,"COLLATION")="F"
+19 DO CREIXN^DDMOD(.GMVXR,"SW",.GMVRES,"GMVOUT")
+20 QUIT
ACCESS ; Set file access
+1 NEW GMVFILE,GMVNODE
+2 FOR GMVFILE=120.51,120.52,120.53
Begin DoDot:1
+3 FOR GMVNODE="AUDIT","DD","DEL","LAYGO","WR"
Begin DoDot:2
+4 SET ^DIC(GMVFILE,0,GMVNODE)="@"
+5 QUIT
End DoDot:2
+6 QUIT
End DoDot:1
+7 QUIT
KILL ; Kill left over x-ref node
+1 KILL ^DD(120.52,"IX",999)
+2 QUIT
HDIS ; Call HDIS to begin the 'seeding' process
+1 NEW DOMPTR,TMP
+2 SET TMP=$$GETIEN^HDISVF09("VITALS",.DOMPTR)
+3 DO EN^HDISVCMR(DOMPTR,"")
+4 QUIT
AHDRN ; Create AHDRNEW Index on GMRV Vital Measurement file (#120.5) for use
+1 ; by Health Data Repository (HDR)
+2 ; Calls HDR API whenever a new entry is made in FILE 120.5
+3 NEW GMVXR,GMVRES,GMVOUT
+4 SET GMVXR("ACTIVITY")=""
+5 SET GMVXR("FILE")=120.5
+6 SET GMVXR("NAME")="AHDRNEW"
+7 SET GMVXR("TYPE")="MU"
+8 SET GMVXR("USE")="A"
+9 SET GMVXR("EXECUTION")="F"
+10 SET GMVXR("SHORT DESCR")="INDEX for HDR"
+11 SET GMVXR("DESCR",1)="This cross-reference calls a Health Data Repository (HDR) API whenever a"
+12 SET GMVXR("DESCR",2)="new entry is created."
+13 SET GMVXR("DESCR",3)=" "
+14 SET GMVXR("DESCR",4)="No actual cross-reference nodes are set or killed."
+15 SET GMVXR("DESCR",5)=" "
+16 SET GMVXR("DESCR",6)="Calls to the VDEFQM routine are covered by Integration Agreement 4253."
+17 SET GMVXR("SET")="Q:$D(DIU(0))!($$TESTPAT^VADPT($P(^GMR(120.5,DA,0),U,2))) N ERR,GMVFLAG I $T(QUEUE^VDEFQM)]"""" S GMVFLAG=$$QUEUE^VDEFQM(""ORU^R01"",""SUBTYPE=VTLS^IEN=""_DA,.ERR)"
+18 SET GMVXR("KILL")="Q"
+19 SET GMVXR("WHOLE KILL")="Q"
+20 SET GMVXR("SET CONDITION")="I X1(1)="""",X2(1)'="""" S X=1"
+21 SET GMVXR("VAL",1)=.02
+22 DO CREIXN^DDMOD(.GMVXR,"k",.GMVRES,"GMVOUT")
+23 IF GMVRES=""
Begin DoDot:1
+24 DO BMES^XPDUTL("The AHDRNEW Index was not added to FILE 120.5. Please enter a Remedy ticket.")
+25 QUIT
End DoDot:1
+26 QUIT
+27 ;
AHDRE ; Create AHDRERR Index on GMRV Vital Measurement file (#120.5) for use
+1 ; by Health Data Repository (HDR)
+2 ; Calls HDR API whenever a FILE 120.5 entry is marked as an error
+3 NEW GMVXR,GMVRES,GMVOUT
+4 SET GMVXR("ACTIVITY")=""
+5 SET GMVXR("FILE")=120.5
+6 SET GMVXR("NAME")="AHDRERR"
+7 SET GMVXR("TYPE")="MU"
+8 SET GMVXR("USE")="A"
+9 SET GMVXR("EXECUTION")="F"
+10 SET GMVXR("SHORT DESCR")="INDEX for HDR"
+11 SET GMVXR("DESCR",1)="This cross-reference calls a Health Data Repository (HDR) API whenever a"
+12 SET GMVXR("DESCR",2)="FILE 120.5 entry is marked as entered-in-error."
+13 SET GMVXR("DESCR",3)=" "
+14 SET GMVXR("DESCR",4)="No actual cross-reference nodes are set or killed."
+15 SET GMVXR("DESCR",5)=" "
+16 SET GMVXR("DESCR",6)="Calls to the VDEFQM routine are covered by Integration Agreement 4253."
+17 SET GMVXR("SET")="Q:$D(DIU(0))!($$TESTPAT^VADPT($P(^GMR(120.5,DA,0),U,2))) N ERR,GMVFLAG I $T(QUEUE^VDEFQM)]"""" S GMVFLAG=$$QUEUE^VDEFQM(""ORU^R01"",""SUBTYPE=VTLS^IEN=""_DA,.ERR)"
+18 SET GMVXR("KILL")="Q"
+19 SET GMVXR("WHOLE KILL")="Q"
+20 SET GMVXR("SET CONDITION")="I X1(1)="""",X2(1)]"""" S X=1"
+21 SET GMVXR("VAL",1)=2
+22 DO CREIXN^DDMOD(.GMVXR,"k",.GMVRES,"GMVOUT")
+23 IF GMVRES=""
Begin DoDot:1
+24 DO BMES^XPDUTL("The AHDRERR Index was not added to FILE 120.5. Please enter a Remedy ticket.")
+25 QUIT
End DoDot:1
+26 QUIT