Fix parsing of single-prescription lines.
- VERBESSERT: 'Alternative' Verordnungen wurden nicht erkannt, wenn in der selben Zeile nicht auch eine 'kanonische' Verordnung stand.
This commit is contained in:
parent
0d4b60096a
commit
573cd743d1
@ -180,7 +180,7 @@ namespace zaaReloaded2.Medication
|
||||
string[] lines = Helpers.SplitParagraphs(text);
|
||||
foreach (string line in lines)
|
||||
{
|
||||
if (Prescription.IsCanonicalPrescriptionLine(line))
|
||||
if (Prescription.IsPotentialPrescriptionLine(line))
|
||||
{
|
||||
addition = Prescription.ManyFromLine(line);
|
||||
columns = System.Math.Max(columns, addition.Count);
|
||||
|
@ -40,9 +40,15 @@ namespace zaaReloaded2.Medication
|
||||
return canonicalRegex.IsMatch(line);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines if a line contains prescriptions, either canonical
|
||||
/// ones or alternative ones (in the form "Ramipril 5 mg \t alle 2 Tage").
|
||||
/// </summary>
|
||||
/// <param name="line">Line to examine.</param>
|
||||
/// <returns>True if the line potentially contains prescriptions.</returns>
|
||||
public static bool IsPotentialPrescriptionLine(string line)
|
||||
{
|
||||
return alternativeRegex.IsMatch(line);
|
||||
return unifiedRegex.IsMatch(line);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user