Rahil wrote:
> Hi
>
> I am trying to parse an ADL file using the ADLParser API. However, the
> ADLParser is throwing up an error in the ADL file that Im passing it.
> The block of code where the error occurs is :
>
> ------------
> ELEMENT[at0008] occurrences matches {0..1} matches { -- Person
> value matches {
> TEXT matches {
> value matches {"Patient", "Relative"}
> }
> }
> }
> -----------
>
> and the line with the error is ------ value matches {"Patient",
> "Relative"}----. The compile time error thrown is
>
> ---------
> se.acode.openehr.parser.ParseException: Encountered "," at line 32,
> column 89.
> Was expecting one of:
> "}" ...
> "count" ...
> "quantity" ...
> .....
> ---------
>
> I cant understand what the problem is with the translation of multiple
> values as comma-separated value-sets. If I remove the values beyond the
> occurrence of the first comma, the problem disappears.
A string constraint can be expressed either by a fixed string or a
regular expression. If you want to limit the string value to either
"Patient" or "Relative", the correct syntax should be as following:
value matches {/Patient|Relative/}
Cheers,
Rong
>
> Will appreciate help with this.
>
> Thanks
> Regards
> Rahil
>
-
If you have any questions about using this list,
please send a message to d.lloyd at openehr.org