Exemplo n.º 1
0
 public static async Task <ReviewPatient> ParseAsync(FileInfo file)
 {
     if (!file.Exists)
     {
         throw new ArgumentNullException("The file does not exist!");
     }
     return(new ReviewPatient(ReviewPatientFields.Parse(await PDFReader.Instance.Pdf2TxtAsync(file)), file));
 }
Exemplo n.º 2
0
 public static ReviewPatient Parse(FileInfo file)
 {
     if (!file.Exists)
     {
         throw new ArgumentNullException("The file does not exist!");
     }
     return(new ReviewPatient(ReviewPatientFields.Parse(PDFReader.Instance.Pdf2Txt(file)), file));
 }
Exemplo n.º 3
0
 public static bool TryParse(FileInfo file, out ReviewPatient reviewPatient)
 {
     if (ReviewPatientFields.TryParse(PDFReader.Instance.Pdf2Txt(file), out var fields))
     {
         reviewPatient = new ReviewPatient(fields, file);
         return(true);
     }
     else
     {
         reviewPatient = null;
         return(false);
     }
 }
Exemplo n.º 4
0
        public ReviewPatient(ReviewPatientFields fields, FileInfo file)
        {
            IsNull = fields is null;

            Fields = fields;

            FilePDF         = file;
            FileRadialogica = new FileInfo(file?.FullName.Substring(0, file.FullName.Length - 3) + "fulpkg");
            if (!FileRadialogica.Exists && !(Fields is null) && (file?.Directory != null))
            {
                FileRadialogica = new FileInfo(Path.Combine(file?.Directory.FullName, $"{Fields.Name}.fulpkg"));
            }
        }
Exemplo n.º 5
0
 public ReviewPatient(FileInfo file) :
     this(ReviewPatientFields.Parse(PDFReader.Instance.Pdf2Txt(file)), file)
 {
 }