-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Description
In my hospital (CHU de Brest), ADICAP codes are written like this:
ADICAP :B.H.HP.A7A0
Cotations :
ZZQX217 R-AHC-100-A001 R-AHC-10-A015
In this case dots spells adicap structure and dictionnaries for (d1-d8) part of code.
Your regex in adicap ner is without dots, here
Are you ok if I propose this modified regex?
just add 3 conditionnal dots \.{0,1}
in d1_4 = r"[A-Z]\.{0,1}[A-Z]\.{0,1}[A-Z]{2}\.{0,1}"
d1_4 = r"[A-Z]\.{0,1}[A-Z]\.{0,1}[A-Z]{2}\.{0,1}"
d5_8_v1 = r"\d{4}"
d5_8_v2 = r"\d{4}|[A-Z][0-9A-Z][A-Z][0-9]"
d5_8_v3 = r"[0-9A-Z][0-9][09A-Z][0-9]"
d5_8_v4 = r"0[A-Z][0-9]{2}"
adicap_prefix = r"(?i)(codification|adicap)"
base_code = (
r"("
+ d1_4
+ r"(?:"
+ d5_8_v1
+ r"|"
+ d5_8_v2
+ r"|"
+ d5_8_v3
+ r"|"
+ d5_8_v4
+ r"))"
)
test :
Many thanks
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request