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

BIEXPRT8.m

Go to the documentation of this file.
  1. BIEXPRT8 ;IHS/CMI/MWR - EXPORT IMMUNIZATION RECORDS; MAY 10, 2010
  1. ;;8.5;IMMUNIZATION;;SEP 01,2011
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; EXPORT IMMUNIZATION RECORDS: HFS ACCESS, OTHER PROMPTS.
  1. ;
  1. ;
  1. ;----------
  1. HFS(BIFLNM,BIPATH,BIOPEN,BIPOP) ;EP
  1. ;---> Return path, open Host File and test access.
  1. ;---> Parameters:
  1. ; 1 - BIFLNM (req) File name given by the user.
  1. ; 2 - BIPATH (ret) Path name set in Site Parameters.
  1. ; 3 - BIOPEN (opt) If BIOPEN=1, leave Device (Host File) open;
  1. ; otherwise, close Host File with %ZISC.
  1. ; 4 - BIPOP (ret) BIPOP=1 if failed to open Host File.
  1. ;
  1. S BIPOP=0
  1. ;---> No file name.
  1. I $G(BIFLNM)']"" D ERRCD^BIUTL2(102,,1) S BIPOP=1 Q
  1. ;
  1. ;---> No site parameter entry.
  1. I $G(^BISITE(DUZ(2),0))']"" D ERRCD^BIUTL2(103,,1) S BIPOP=1 Q
  1. ;
  1. ;---> Path not set.
  1. S BIPATH=$P(^BISITE(DUZ(2),0),U,14) N X S X="I"_"O(1)" K @X
  1. I BIPATH']"" D ERRCD^BIUTL2(104,,1) S BIPOP=1 Q
  1. ;
  1. ;---> Attempt to open Host File Server.
  1. S BIPOP=$$OPEN^%ZISH(BIPATH,BIFLNM,"W")
  1. ;
  1. ;---> If not valid PATH, will bomb with a <MODER>.
  1. ;---> Purpose here is to test Host File access before beginning search.
  1. I BIPOP D ^%ZISC,ERRCD^BIUTL2(101,,1) Q
  1. U IO W ""
  1. D:'$G(BIOPEN) ^%ZISC
  1. Q
  1. ;
  1. ;----------
  1. OKAY(BIPOP) ;EP
  1. ;---> Get final okay to continue.
  1. ;---> Parameters:
  1. ; 1 - BIPOP (ret) BIPOP=1 if DIRUT *or* if Not OK to proceed.
  1. ;
  1. D IO^BIO("Do you REALLY wish to export records now?")
  1. N A S BIPOP=0
  1. S A=" Enter YES to export records, enter NO to abort this process."
  1. D DIR^BIFMAN("Y",.Y,.BIPOP," Enter Yes or No","YES",A)
  1. I BIPOP!(Y=0) D Q
  1. .D IO^BIO("* NO RECORDS EXPORTED. *","!!?25")
  1. .D DIRZ^BIUTL3(.BIPOP) S BIPOP=1 ;---> If Y=0 flag "not okay".
  1. ;
  1. S A="Please hold while records are scanned. This may take awhile..."
  1. D IO^BIO(A,"!!?3")
  1. Q