MPIFHL7 ;BHM/RGY-Processing incoming hl7 message ;FEB 20, 1998
;;1.0; MASTER PATIENT INDEX VISTA ;**1,6,11**;30 Apr 99
IN ;
;Entry point used for MPIF CMOR RESPONSE protocol
; It process the inbound HL7 message to update CMOR
N I,PHONE,COMMENTS,STATUS,ID,SITE,NDATE,USER,INST,ICN,HLNODE,HLQUIT,RES,CMOR
S HLQUIT="",ID=""
F I=1:1 X HLNEXT Q:HLQUIT'>0 D
.I $P(HLNODE,HL("FS"),1)="NTE" D
..S PHONE=$P(HLNODE,HL("FS"),4)
..S COMMENTS=$P(HLNODE,HL("FS"),5)
..S STATUS=$P(HLNODE,HL("FS"),6)
..S ID=$P(HLNODE,HL("FS"),7)
..S SITE=$P(HLNODE,HL("FS"),8)
.I $P(HLNODE,HL("FS"),1)="EVN" D
..S NDATE=$P(HLNODE,HL("FS"),3)
..S USER=$P(HLNODE,HL("FS"),6)
.I $P(HLNODE,HL("FS"),1)="PID" S ICN=+$P(HLNODE,HL("FS"),3)
.I $P(HLNODE,HL("FS"),1)="PV1" S SITE=+$P(HLNODE,HL("FS"),4)
I $G(SITE) S SITE=$$LKUP^XUAF4(SITE)
N DFN
S RES=1,DFN=$$GETDFN^MPIF001(ICN)
S CMOR=$$GETVCCI^MPIF001(DFN)
;PROCESSING CMOR CHANGE REQUEST
D IN^MPIFREQ(SITE,USER,COMMENTS,NDATE,ICN,PHONE,ID)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMPIFHL7 1006 printed Dec 13, 2024@02:11:12 Page 2
MPIFHL7 ;BHM/RGY-Processing incoming hl7 message ;FEB 20, 1998
+1 ;;1.0; MASTER PATIENT INDEX VISTA ;**1,6,11**;30 Apr 99
IN ;
+1 ;Entry point used for MPIF CMOR RESPONSE protocol
+2 ; It process the inbound HL7 message to update CMOR
+3 NEW I,PHONE,COMMENTS,STATUS,ID,SITE,NDATE,USER,INST,ICN,HLNODE,HLQUIT,RES,CMOR
+4 SET HLQUIT=""
SET ID=""
+5 FOR I=1:1
XECUTE HLNEXT
if HLQUIT'>0
QUIT
Begin DoDot:1
+6 IF $PIECE(HLNODE,HL("FS"),1)="NTE"
Begin DoDot:2
+7 SET PHONE=$PIECE(HLNODE,HL("FS"),4)
+8 SET COMMENTS=$PIECE(HLNODE,HL("FS"),5)
+9 SET STATUS=$PIECE(HLNODE,HL("FS"),6)
+10 SET ID=$PIECE(HLNODE,HL("FS"),7)
+11 SET SITE=$PIECE(HLNODE,HL("FS"),8)
End DoDot:2
+12 IF $PIECE(HLNODE,HL("FS"),1)="EVN"
Begin DoDot:2
+13 SET NDATE=$PIECE(HLNODE,HL("FS"),3)
+14 SET USER=$PIECE(HLNODE,HL("FS"),6)
End DoDot:2
+15 IF $PIECE(HLNODE,HL("FS"),1)="PID"
SET ICN=+$PIECE(HLNODE,HL("FS"),3)
+16 IF $PIECE(HLNODE,HL("FS"),1)="PV1"
SET SITE=+$PIECE(HLNODE,HL("FS"),4)
End DoDot:1
+17 IF $GET(SITE)
SET SITE=$$LKUP^XUAF4(SITE)
+18 NEW DFN
+19 SET RES=1
SET DFN=$$GETDFN^MPIF001(ICN)
+20 SET CMOR=$$GETVCCI^MPIF001(DFN)
+21 ;PROCESSING CMOR CHANGE REQUEST
+22 DO IN^MPIFREQ(SITE,USER,COMMENTS,NDATE,ICN,PHONE,ID)
+23 QUIT