
| Key: |
SPEC-260
|
| Type: |
Change Request
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Reporter: |
Thomas Beale
|
| Votes: |
1
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
| Change Description: |
The proposed solution is as below, and has the following features:
- the characters #, ( and ) are not allowed
- no part (i.e. any section between '-' or '.' delimiters) can be only 1 character long
- no name part can start with a digit
- allows upper case in the alphabetic parts of the id
- limiting the version part of the id to numbers (i.e. no letters)
- not allowing a leading '0' in the version identifier
The grammar published in the Support IM becomes:
# -------- production rules --------
archetype_id: qualified_rm_entity '.' domain_concept '.' version_id
qualified_rm_entity: rm_originator '-' rm_name '-' rm_entity
rm_originator: V_ALPHANUMERIC_NAME
rm_name: V_ALPHANUMERIC_NAME
rm_entity: V_ALPHANUMERIC_NAME
domain_concept: concept_name { '-' specialisation }*
concept_name: V_ALPHANUMERIC_NAME
specialisation: V_ALPHANUMERIC_NAME
version_id: 'v' V_NONZERO_DIGIT [ V_NUMBER ]
# -------- lexical patterns --------
V_ALPHANUMERIC_NAME: [a-zA-Z][a-zA-Z0-9_]+
V_NONZERO_DIGIT: [1-9]
V_NUMBER: [0-9]+
The PERL regular expression equivalent of the above is as follows:
[a-zA-Z]\w+(-[a-zA-Z]\w+){2}\.[a-zA-Z]\w+(-[a-zA-Z]\w+)*\.v[1-9]\d*
The classic regular expression equivalent of this is generated from the above with the following substitutions:
\w -> [a-zA-Z0-9_]
\d -> [0-9]
The explanatory text is improved as follows:
- move explanatory material next to grammar up to a dedicated subsection under section 4.2.2 Composite Identifiers;
- improve the text under section 4.2.2 generally
- add a warning that the non-conforming .v1draft form of the identifier may still need to be supported.
The proposed solution is as below, and has the following features:
- the characters #, ( and ) are not allowed
- no part (i.e. any section between '-' or '.' delimiters) can be only 1 character long
- no name part can start with a digit
- allows upper case in the alphabetic parts of the id
- limiting the version part of the id to numbers (i.e. no letters)
- not allowing a leading '0' in the version identifier
The grammar published in the Support IM becomes:
# -------- production rules --------
archetype_id: qualified_rm_entity '.' domain_concept '.' version_id
qualified_rm_entity: rm_originator '-' rm_name '-' rm_entity
rm_originator: V_ALPHANUMERIC_NAME
rm_name: V_ALPHANUMERIC_NAME
rm_entity: V_ALPHANUMERIC_NAME
domain_concept: concept_name { '-' specialisation }*
concept_name: V_ALPHANUMERIC_NAME
specialisation: V_ALPHANUMERIC_NAME
version_id: 'v' V_NONZERO_DIGIT [ V_NUMBER ]
# -------- lexical patterns --------
V_ALPHANUMERIC_NAME: [a-zA-Z][a-zA-Z0-9_]+
V_NONZERO_DIGIT: [1-9]
V_NUMBER: [0-9]+
The PERL regular expression equivalent of the above is as follows:
[a-zA-Z]\w+(-[a-zA-Z]\w+){2}\.[a-zA-Z]\w+(-[a-zA-Z]\w+)*\.v[1-9]\d*
The classic regular expression equivalent of this is generated from the above with the following substitutions:
\w -> [a-zA-Z0-9_]
\d -> [0-9]
The explanatory text is improved as follows:
- move explanatory material next to grammar up to a dedicated subsection under section 4.2.2 Composite Identifiers;
- improve the text under section 4.2.2 generally
- add a warning that the non-conforming .v1draft form of the identifier may still need to be supported.
|
| Impact Analysis: |
The impact should be minimal, since the grammar and regex changes above conform to all known archetypes, other than deprecated ones with '.v1draft' at the end. A warning statement in the spec has been made about these identifiers, and a separate guideline will be published on openEHR regarding fixing this situation.
The impact should be minimal, since the grammar and regex changes above conform to all known archetypes, other than deprecated ones with '.v1draft' at the end. A warning statement in the spec has been made about these identifiers, and a separate guideline will be published on openEHR regarding fixing this situation.
|
| Analyst: |
Eric Browne, Peter Gummer and Thomas Beale
|
|
There is currently a problem with the published regex for the ARCHETYPE_ID class in the openEHR support information model. It does not deal correctly with case, version ids, or special characters. In addition, the explanatroy text in section 4.2.2. does not correspond to the current reality of openEHR identifiers.
|
|
Description
|
There is currently a problem with the published regex for the ARCHETYPE_ID class in the openEHR support information model. It does not deal correctly with case, version ids, or special characters. In addition, the explanatroy text in section 4.2.2. does not correspond to the current reality of openEHR identifiers. |
Show » |
|
1. The spec should reflect the requirements.
There may be implications for existing archetypes if the specs are tightened, but only if and when implementations are tightened accordingly.
2. Requirement is to have single part +ive integer version number. There should be a "version" function to return the numeric component of the "version_id".
3. there is a problem with "specialisation" function for multi-specialised archetypes. What happens to the '-'?
e.g. if we have
"openehr-composition-SECTION.physical_examination-postnatal-dermatology.v1" , then the specialisation would be :
"postnatal-dermatology" and not "-postnatal-dermatology" , nor "-dermatology". This is probably not the intention.
Suggest this be addressed in parallel with changes to ??? to support specialisation.
4. Need statement about case-sensitivity.
5. none of the regex patterns in
SPEC-260match the Support IM Rev 1.6.0. In particular the following need addressing:-a. support for uppercase [a-z][A-Z]
b. correct handling of '_'.
c. correct handling of zero to many (*) and one to many (+).
d. version_id should not allow "v0". Therefore "version_id" regex should be "v[1-9][0-9]*" or possibly "[vV][1-9][0-9]*"
e. handling of non-alphanumerics ()/%$#& in the EBNF - what are requirements?
f. V_NAME vs NAME and V_NUMBER vs NUMBER in EBNF.NOTES