RGADT2 ;HIRMFO/GJC-TFL FILE SEEDING ROUTINE (PD-MPI LOAD) ;09/21/99
Source file <RGADT2.m>
| Name | Comments | DBIA/ICR reference | 
|---|---|---|
| EN | ; entry point to check the TREATING FACILITY LIST (TFL-391.91) file
 ; for the proper LAST TREATMENT DATE. This code is part of the post ; init for RG*1*4. This can also be called from the EN1 entry point ; to determine the LAST TREATMENT DATE for a specific patient. ; Closely linked to the MFU event message broadcasts used to update ; the TFL (#391.91) file.  | 
|
| EN1(RGDFN,RGSUP) | ; determine the LAST TREATMENT DATE for a single
 ; patient called from our seeding process above. ; input: RGDFN - the dfn of the patient ; RGSUP - if 1, suppress add entries to the ADT HL7 PIVOT ; (#391.71) file for TF messaging - VAFCTFMF (optional) ; output: RGDATE - patient's DATE LAST TREATED ; RGENVR - event reason  | 
|
| KILL | ; kill and quit
 | 
|
| ADMDIS(DFN) | ; find the patient's last admission and discharge dates if
 ; they exist. ; Input: DFN - ien of the patient (file 2)  | 
|
| ENCDT(DFN,INPDT) | ; find the last patient check out date/time.  'ADFN'
 ; cross-reference accessed through DBIA: 2953 ; Input: DFN - ien of the patient (file 2) ; INPDT - date (if any) returned from the inpatient admission/ ; discharge subroutine  | 
|
| SETMSG | ; define the variables used to build a HL7 message (RGADT1)
 | 
|
| ; Send a completion email message to the user who installed this patch,
 ; RG*1*4. Show the number of records processed, elapsed time and the ; number of records processed per minute.  | 
||
| LOCICN(DFN,ICN) | ; check if this patient has a national ICN without having a
 ; local ICN. This function is used when an entire site (all patients) ; is seeding, or for individual patient seeding. ; note: IA 2070 covers the hit on the 'MPI' node ; IA 2701 covers the call to $$IFLOCAL^MPIF001  |