ORWMHV ;;SLC OIFO/CLA - My HealtheVet Indicator for CPRS GUI;[01/025/06]
;;3.0;ORDER ENTRY/RESULTS REPORTING;**215**;Dec 17, 1999
;
MHV(ORY,ORDFN) ; Returns "MHV" if patient has My HealtheVet data
;Ouput Variable
; ORY = 0 if patient does not have My HealtheVet (MHV) data
; = "MHV" if patient does have My HealtheVet data
;
N I,ORX
S ORY=0
;
; check for My HealtheVet data:
D TFL^VAFCTFU1(.ORX,ORDFN) ; DBIA #2990
S I=0 F S I=$O(ORX(I)) Q:'I D
.;pt has MHV treat fac (200MH) and event reason wasn't "discharge" (3):
.I $P(ORX(I),U)="200MH",$P(ORX(I),U,4)'=3 D
..S $P(ORY,U)="MHV",$P(ORY,U,2)="Patient has data in My HealtheVet"
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORWMHV 690 printed Nov 22, 2024@17:46:42 Page 2
ORWMHV ;;SLC OIFO/CLA - My HealtheVet Indicator for CPRS GUI;[01/025/06]
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**215**;Dec 17, 1999
+2 ;
MHV(ORY,ORDFN) ; Returns "MHV" if patient has My HealtheVet data
+1 ;Ouput Variable
+2 ; ORY = 0 if patient does not have My HealtheVet (MHV) data
+3 ; = "MHV" if patient does have My HealtheVet data
+4 ;
+5 NEW I,ORX
+6 SET ORY=0
+7 ;
+8 ; check for My HealtheVet data:
+9 ; DBIA #2990
DO TFL^VAFCTFU1(.ORX,ORDFN)
+10 SET I=0
FOR
SET I=$ORDER(ORX(I))
if 'I
QUIT
Begin DoDot:1
+11 ;pt has MHV treat fac (200MH) and event reason wasn't "discharge" (3):
+12 IF $PIECE(ORX(I),U)="200MH"
IF $PIECE(ORX(I),U,4)'=3
Begin DoDot:2
+13 SET $PIECE(ORY,U)="MHV"
SET $PIECE(ORY,U,2)="Patient has data in My HealtheVet"
End DoDot:2
End DoDot:1
+14 ;
+15 QUIT