Is there any recognised way of expessing the logic of a piece of text in
"Oral liquid is only subsidised for oesophageal stricture for patients who
are in terminal care , or are too old to swallow tablets , or for patients
who are too young to swallow tablets"
could be encoded as:
<Rule Code="31" Type="Special Authority">
<Padding>Oral liquid is only subsidised for</Padding>
<Indication Ref="W">oesophageal stricture</Indication>
<Padding>for patients who are in</Padding>
<Indication Ref="X">terminal care</Indication>
<Padding>, or are</Padding>
<Indication Ref="Y">too old to swallow tablets</Indication>
<Padding>, or for patients who are</Padding>
<Indication Ref="Z">too young to swallow tablets</Indication>
I would like to be able to use a stylesheet to create boolean expression
from the above which would look like:
Eval ((W AND (X OR Y)) OR Z) where W,X,Y,Z are boolean variables that would
be have particular values for an individual patient.
The stylesheet needs to be completely general and recurse to an arbitary
depth. It seems like it would take a lot of work to build this from scratch
and I wondered if it was alrrady contained within MathML or some such.
By the way - is the above XML even valid? I cannot seem to find a
definative answer to whether it is legal for and element like <AND> to be
contained within itself.