Rong Chen wrote:
Rong Chen wrote:
>
>
>
> Andrew is right, both left square and right square are not
allowed in
> the search part of the http URL according to RFC1738. Just remove
> those "[]", the adl should parse. (and this is a known issue on the
> openEHR archetypes 
well, I started knowing about it 10 minutes ago;-) I have uploaded
changed versions of the demographic archetypes to the openEHR
repository. I will fix the ADL workbench today sometime, and the
change
will be in the next version (inside a week from now).
>
> Thomas, just a quick run of the latest java ADL parser on the latest
> openEHR archetypes turns out 37 failed in parsing out of total 82
> archetypes. Most of failures are due to invalid c_domain_type
what are the problems with c_domain_type?
missing property or list of c_dv_quantity:
openEHR-EHR-EVALUATION.goal.v1.adl, line 56
openEHR-EHR-EVALUATION.problem-diagnosis-histological.v1.adl , line 60
openEHR-EHR-EVALUATION.problem.v1.adl, line 121
openEHR-EHR-ITEM_TREE.medication-formulation.v1.adl, line 48
openEHR-EHR-ITEM_TREE.medication-vaccine.v1.adl, line 41
openEHR-EHR-ITEM_TREE.medication.v1.adl, line 39
openEHR-EHR-OBSERVATION.blood_pressure.v1.adl, line 62, 59
openEHR-EHR-OBSERVATION.laboratory-thyroid.v1.adl, line 102, 108, 114
Hm....some of these have
C_QUANTITY <>
which according to the specification is illegal, but the reference
parser doesn't complain. There is a semantic question here: if
C_QUANTITY is used to provide a custom constraint on QUANTITY; currently
the specification for C_QUANTITY has the invariants:
Overall_validity: list /= Void or property /= Void
Items_valid: list /= Void implies not list.is_empty
This means that at least property is there, or else the list part is
there. Which seems to make sense; but on the other hand, a C_QUANTITY
with no attributes set still says "the object here must be a QUANTITY,
but otherwise can do what it likes (i.e. what the reference model
allows)". Now the problem is that in an archetype editor will need to be
able to create C_QUANTITYs acording to what the user does - the user
might sometimes set the property only, other times set property, values
and units, or other times just units. But the user might just want to
say "this is a QUANTITY" and nothing else; now the editor could deal
with this by detecting it as a special case, and creating a node:
some_attr matches {
QUANTITY matches {*}
}
but it seems just as reasonable to allow it to create a C_QUANTITY node,
as it would have (usually) done for the other cases, but with no further
restrictions, which still is a valid constraint. This would mean
relaxing the invariants to:
Items_valid: list /= Void implies not list.is_empty
We should also probably force property to exist if units are used, and
also units to exist if magnitude is specified, which would mean changing
the invariants in C_QUANTITY_ITEM.
I see this as a good opportunity to revisit the semantics that were
originally defined - what is happening now is that with more
implementation and testing, we are hitting boundary cases (e.g. QUANTITY
matches {*}); we need to solve these in a sensible way, and the
specifications and implementations become stronger.
further thoughts?
- thomas beale