| DELALLTF | 
$$DELALLTF(PAT)   ;Entry point to delete all Treating
Facilities for a single patient.
;INPUT  PAT - The patient's ICN
;OUTPUT 0 (zero) - If no errors
;       1^error description if an error
 
 | 
| VARIABLES | 
TYPE | 
VARIABLES DESCRIPTION | 
 
PAT | 
Input | 
PAT = ICN for the given patient
 
 | 
RETURNS | 
Output | 
This function returns either:
0 (zero) - If no errors
1^error description if an error
 
 | 
 
 | 
FILE | 
This subroutine is used to file data into the
TREATING FACILITY LIST (TFL - #391.91) file (via the ADT/HL7 PIVOT file) under
certain conditions.
 
 | 
| VARIABLES | 
TYPE | 
VARIABLES DESCRIPTION | 
 
PDFN | 
Input | 
The internal entry number of the patient in the
PATIENT (#2) file.
 
 | 
FSTRG | 
Input | 
This variable is three piece string delimited by an
'^'
1st piece: treating facility 2nd piece: last treatment date for the patient
3rd piece: Event Reason (ADT/HL7 EVENT REASON #391.72) file
 
 | 
TICN | 
Input | 
This variable acts as a boolean flag.  Do not update
the TFL file (via the PIVOT file) if TICN equals one.
 
 | 
 
 | 
$$DELETETF(PAT,INST) | 
If the legacy site is on the treating facility list
for a patient that it should be deleted.
 
 | 
| VARIABLES | 
TYPE | 
VARIABLES DESCRIPTION | 
 
PAT | 
Input | 
ICN of the patient
 
 | 
INST | 
Input | 
IEN of the institution to be deleted
 
 | 
$$DELETETF | 
Output | 
0 (zero) - If no errors 1^error description if there
was a problem
 
 | 
 
 | 
DELETE(TFIEN) | 
Used to delete specific entries in the TREATING
FACILITY LIST FILE (#391.91) when identification of the site is not enough.
 
 | 
| VARIABLES | 
TYPE | 
VARIABLES DESCRIPTION | 
 
TFIEN | 
Input | 
Internal entry number of a specific record in the
TREATING FACILITY LIST FILE (#391.91).
 
 | 
 
 |