Fix regex, change alertingKeywordText
This commit is contained in:
parent
f3015ea2f0
commit
af43e7e4fa
@ -1,4 +1,4 @@
|
||||
REGEX = r"SDS_ILS_BEGINN(#D#Leitstelle:\s+)(?P<number>\d*)(?P<sonderrechte>m|o|i)?(?P<fzg>RTW|NAW|KTW)? (?P<keyword>Trauma Gesicht/|Atemnot Akut|Trauma Extremit|Abdomen Akut|Person droht zu spr|Hilflose Person|\S*|) (?P<address>\D*)(.*) \$GPSN(.*)E(.*)SDS_ILS_ENDE"
|
||||
REGEX = r"SDS_ILS_BEGINN\s*(#D#Leitstelle:\s*)(?P<number>\d*)(?P<sonderrechte>m|o|i)?(?P<fzg>RTW|NAW|KTW)? (?P<keyword>Trauma Gesicht\/|Atemnot Akut|Trauma Extremit|Abdomen Akut|Person droht zu spr|Hilflose Person|\S*|)(?P<address>\D*)(.*) \$GPS\s*N(.*)E(.*)\s*SDS_ILS_ENDE"
|
||||
|
||||
import os
|
||||
import PyPDF2
|
||||
@ -37,7 +37,7 @@ def get_draeger_json(text):
|
||||
data["alertingKeyword"] = "Wachalarm"
|
||||
else:
|
||||
data["alertingKeyword"] = match[0][4]
|
||||
data["alertingKeywordText"] = match[0][1] + " " + match[0][4]
|
||||
data["alertingKeywordText"] = match[0][1] + match[0][2] + match[0][3] + " " + match[0][4]
|
||||
data["street"] = match[0][5]
|
||||
data["houseNumber"] = match[0][6]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user