source: WorldVistAEHR/trunk/r/VISTA_OFFICE_EHR-VEPE/VEPERI6.m@ 701

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

initial load of WorldVistAEHR

File size: 979 bytes
Line 
1VEPERI6 ;DAOU/WCJ - Interface Utilities ;2-MAY-2005
2 ;;1.0;VOEB;;Jun 12, 2005
3 ;;;VISTA OFFICE/EHR;
4 ;;Per VHA Directive 10-93-142, this routine should not be modified.
5 ;
6 ;**Program Description**
7 ; Interface Utilities
8 ; Log Error
9 Q
10 ; Save errors to error file.
11 ; ERRFLAG - 0 just log
12 ; 1 log and stop processing
13 ; ERRTYP - grouping for reporting prpose
14 ; ERRMSG - free text error
15 ; HL7PTR - Points to the original message in file 772
16 ; HLP - Parsed HL7 message
17 ;
18FATALERR(ERRFLAG,ERRTYP,ERRMSG,HL7PTR,HLP) ;
19 ;
20 N NAME,FI,HL7DT
21 S NAME=$$GETDATA^VEPERI3("PID",1000,6)
22 S FI=$$GETDATA^VEPERI3("PID",1000,3)
23 S HL7DT=$$GETDATA^VEPERI3("MSH",1000,6)
24 S:'$D(HL7PTR) HL7PTR=""
25 ;
26 N ERRDT,DIC,X,DIE,Y,DA,DR
27 ;
28 S ERRDT=""""_$$NOW^XLFDT_""""
29 S DIC="^VEPER(19904.2,",DIC(0)="L",X=ERRDT
30 D ^DIC
31 S DIE=DIC,DA=+Y
32 K DR
33 S DR=".02///^S X=NAME;.03////"_HL7PTR_";.04////"_FI_";.05////"_ERRTYP_";.06////"_HL7DT_";1.01////"_ERRMSG D ^DIE
34 Q ERRFLAG_U_ERRTYP_U_ERRMSG
Note: See TracBrowser for help on using the repository browser.