Dear All,

The regex locator used to get an archetype from another archetype is too 
loose. Given the Archetype ID is something like :

openEHR-EHR-CLUSTER.address.v1

instead of :

archetype_id/value matches {/address\.v1/}

we should have (at the very least):

archetype_id/value matches {/CLUSTER\.address\.v1 /}

or (preferably)

archetype_id/value matches {/openEHR-EHR-CLUSTER\.address\.v1 /}


(A) address\.v1 matches no particular string exactly as the Archetype ID 
is openEHR-EHR-CLUSTER.address.v1

As such you have to match on anything prior to address. i.e.

openEHR-EHR-CLUSTER.address.v1 matches

but so would

openEHR-EHR-CLUSTER.person_address.v1

At the moment I am having to add a dot (\.) to each regex to bookend the 
start of the string.

e.g.:

    [xslt] Archetype found from pattern
    [xslt] p_pattern = address\.v1
    [xslt] v_Dotpattern = \.address\.v1               [xslt] Archetype 
name = openEHR-EHR-CLUSTER.address.v1

This is both dangerous and pointless as you either have a valid/useable 
regex or you don't.

B) As a result I am now having to split bar'ed regex'es such as:

checklist_item-general-cvs1.v1|checklist_item-general-cvs2.v1|checklist_item-general-cvs3.v2|checklist_item-general-cvs4.v2draft|checklist_item-general.v1|checklist_item-general.v2|checklist_item-general.v3
 


i.e. I am having to pre-process the regex instead of being able to apply 
it directly as a regex.


C) It is long term dangerous anyway as the only thing guaranteeing 
uniqueness of ID/Name is the filename in a given folder. This is fine 
until you consider folders such as "structure" where you could have 
ITEM_TREE.adam.v1 & SINGLE,LIST, or TABLE.adam.v1 ......

So if in the Structure folder then... /adam\v1/ could possibly be 
ambiguous. ie. if I am adding a "structure" archetype & I am show a 
choice of adam.v1,adam.v1,adam.v1 or adam.v1 which one do I want/should 
I add?
Seeing ITEM_TREE.adam.v1, SINGLE.adam.v1 etc would fix that potential 
problem.

D) Given the Archetype ID/Filename is openEHR-EHR-CLUSTER.address.v1 
then what is saved by not showing at the very least CLUSTER.address.v1 
in the drop down list & putting in a regex of: "CLUSTER\.address\.v1" ?

E) Going for a more exact regex in the first place then allows one to be 
more exact even in the looser cases e.g.

CLUSTER\.address\.v

or where you want to say "any CLUSTER exam".

F) If other sorts of Regex expression are required for use then I am not 
prepared to keep adding to the "regex pre-processor" to in effect create 
another regex processor.

Either the regex is correct or it's not. If it's not then don't use a 
regex.



Summary / Conclusion

1) I would like to see the Archetype designer creating regex's which 
include at the very least the RM_TYPE part of the name e.g. CLUSTER or 
ITEM_TREE.

Preferably it should be the entire Archetype ID as that is the actual 
string being matched.

This should be a design time thing and not a publishing problem.

This will allow the correct use of regex for model location.

Either that or change all the Archetype ID/Filenames from :

openEHR-EHR-CLUSTER.address.v1

to

address.v1



Adam



Adam

**********************************************************************
This message  may  contain  confidential  and  privileged information.
If you are not  the intended  recipient please  accept our  apologies.
Please do not disclose, copy or distribute  information in this e-mail
or take any  action in reliance on its  contents: to do so is strictly
prohibited and may be unlawful. Please inform us that this message has
gone  astray  before  deleting it.  Thank  you for  your co-operation.

NHSmail is used daily by over 100,000 staff in the NHS. Over a million
messages  are sent every day by the system.  To find  out why more and
more NHS personnel are  switching to  this NHS  Connecting  for Health
system please visit www.connectingforhealth.nhs.uk/nhsmail
**********************************************************************


Reply via email to