Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: MPIFHL7

MPIFHL7.m

Go to the documentation of this file.
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