source: WorldVistAEHR/trunk/r/MASTER_PATIENT_INDEX_VISTA-MPIF/MPIFHL7.m@ 1211

Last change on this file since 1211 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 980 bytes
RevLine 
[613]1MPIFHL7 ;BHM/RGY-Processing incoming hl7 message ;FEB 20, 1998
2 ;;1.0; MASTER PATIENT INDEX VISTA ;**1,6,11**;30 Apr 99
3IN ;
4 ;Entry point used for MPIF CMOR RESPONSE protocol
5 ; It process the inbound HL7 message to update CMOR
6 N I,PHONE,COMMENTS,STATUS,ID,SITE,NDATE,USER,INST,ICN,HLNODE,HLQUIT,RES,CMOR
7 S HLQUIT="",ID=""
8 F I=1:1 X HLNEXT Q:HLQUIT'>0 D
9 .I $P(HLNODE,HL("FS"),1)="NTE" D
10 ..S PHONE=$P(HLNODE,HL("FS"),4)
11 ..S COMMENTS=$P(HLNODE,HL("FS"),5)
12 ..S STATUS=$P(HLNODE,HL("FS"),6)
13 ..S ID=$P(HLNODE,HL("FS"),7)
14 ..S SITE=$P(HLNODE,HL("FS"),8)
15 .I $P(HLNODE,HL("FS"),1)="EVN" D
16 ..S NDATE=$P(HLNODE,HL("FS"),3)
17 ..S USER=$P(HLNODE,HL("FS"),6)
18 .I $P(HLNODE,HL("FS"),1)="PID" S ICN=+$P(HLNODE,HL("FS"),3)
19 .I $P(HLNODE,HL("FS"),1)="PV1" S SITE=+$P(HLNODE,HL("FS"),4)
20 I $G(SITE) S SITE=$$LKUP^XUAF4(SITE)
21 N DFN
22 S RES=1,DFN=$$GETDFN^MPIF001(ICN)
23 S CMOR=$$GETVCCI^MPIF001(DFN)
24 ;PROCESSING CMOR CHANGE REQUEST
25 D IN^MPIFREQ(SITE,USER,COMMENTS,NDATE,ICN,PHONE,ID)
26 Q
Note: See TracBrowser for help on using the repository browser.