RE: Regex in Archetypes must include TYPE
I agree with Adam and Tom, if a REGEX is being used to specify the constraints on the slot then it should be a valid regular expression which allows each permissible archetype to be matched on the basis of its full archetype id as specified by the Archetype ID Syntax. John > -----Original Message----- > From: openehr-technical-bounces@openehr.org > [mailto:openehr-technical-bounces@openehr.org] On Behalf Of > Thomas Beale > Sent: 04 August 2008 12:12 > To: For openEHR technical discussions > Subject: Re: Regex in Archetypes must include TYPE > > Adam Flinton wrote: > >> > >> No need to do that, Adam, just wrap the regex within > parentheses. So > >> taking the example you gave, the correctly-wrapped regex would be: > >> > >> Include entries > >> > openEHR-EHR-CLUSTER\.(checklist_item-general-cvs1.v1|checklist_item-g > >> > eneral-cvs2.v1|checklist_item-general-cvs3.v2|checklist_item-general- > >> > cvs4.v2draft|checklist_item-general.v1|checklist_item-general.v2|chec > >> klist_item-general.v3) > >> > >> The code to generate this is trivial in any programming language > >> (assuming your programming language has the ability to concatenate > >> strings, which I reckon is a safe bet). Unless you're > programming in > >> assembly language, it's probably one simple line of code. > >> > >> > >> > > Hum. > > > > I agree that that would work but it's still wrong in > principle IMHO i.e. > > then the regex is still a pseudo/meta regex i.e. it requires > > processing to turn it into a valid regex. > > > > This would have to be duplicated in all the different > implementations > > etc.etc. > > > > > *All, > > I also agree with Adam. A regex should be able to be used > over a population of strings (identifiers in this case) and > have the effect of filtering out what you want. Having to put > the regex together first is inviting problems - some > implementations will forget, others will do it wrongly, the > specifications of how to do it will change.... > > Practically speaking this does not change the specifications, > but I suspect we should put some guidance in to the effect > that regexes based on full identifiers should be used in > archetype slots. > > - thomas > > * > > _______________________________________________ > openEHR-technical mailing list > openEHR-technical@openehr.org > http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical > *********************************************************************** This message may contain confidential and privileged information. If you are not the intended recipient you should 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 the sender that this message has gone astray before deleting it. Thank you. 2008 marks the 60th anniversary of the NHS. It's an opportunity to pay tribute to the NHS staff and volunteers who help shape the service, and celebrate their achievements. If you work for the NHS and would like an NHSmail email account, go to: www.connectingforhealth.nhs.uk/nhsmail *********************************************************************** _______________________________________________ openEHR-technical mailing list openEHR-technical@openehr.org http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical