# Extract archetypes **Category:** [Technical (archive)](https://discourse.openehr.org/c/technical-archive/156) **Created:** 2017-11-30 11:55 UTC **Views:** 12 **Replies:** 14 **URL:** https://discourse.openehr.org/t/extract-archetypes/15505 --- ## Post #1 by @system Hi, Since that it is so that some extract\-classes derive from Locatable, they can be used to use them as RM\-class for an archetype\-definition\. But how would the ArchetypeId look like, special the rmName\. Would it be something like openEHR\-Extract\-Extract\.\.\.\.\.\.\.\. ? Thanks in advance for answering Bert --- ## Post #2 by @yampeku Hi Bert, I would say that the "rm name" would be "EHR_Extract", as it is the way the package is called in the documentation [http://www.openehr.org/releases/RM/latest/docs/ehr_extract/ehr_extract.html](http://www.openehr.org/releases/RM/latest/docs/ehr_extract/ehr_extract.html) (notice that demographics and EHR are the other package names). After that you would put the corresponding class name to constraint Regards --- ## Post #3 by @yampeku Having said that, I'm not sure current regex for archetype ids allows the use of spaces or undescores on the rm part. I'll have to check that --- ## Post #4 by @system Thanks Diego, that seems a good suggestion based on good reasoning\. Bert --- ## Post #5 by @system The test package is called “test\_pkg” at least in adl2 – so underscores are supported\. Pieter --- ## Post #6 by @system I was too fast with my compliments ;-) In that case, we can leave the underscore out, It remains readable. Bert --- ## Post #7 by @yampeku underscore it is then! :D --- ## Post #8 by @system Quick and firm No objections Bert --- ## Post #9 by @system The ADL 1.4 identifier syntax is [here](http://www.openehr.org/releases/BASE/latest/docs/base_types/base_types.html#_syntaxes), and permits underscores. The ADL2 syntax for the type ARCHETYPE_HRID I think is not visible anywhere except code, so we'll need to remedy that. The [relevant code](https://github.com/openEHR/adl-tools/blob/1fc0e5c9432b3fca55d301652601838d9f78a32f/libraries/openehr/src/am/archetype/archetype_hrid.e#L50) shows that underscores are accepted as well. I would suggest using the proper specification name as various tools are starting to depend on consistent use of names across specifications, UML packages and classes, and archetypes. In fact I suspect that right now the ADL Workbench would not recognise an Extract archetype that didn't have EHR_EXTRACT as the RM class qualifier, because the [relevant BMM](https://github.com/openEHR/reference-models/tree/master/models/openEHR/Release-1.0.3/BMM) is named that way (I haven't checked though). I would go with the id template openEHR-EHR_EXTRACT-EXTRACT.something.v1.0.0. There are [examples](https://github.com/openEHR/adl-archetypes/tree/master/Example/openEHR/ehr_extract_template/Working/Archetypes/ehr_extract) already of this in the archetype test repo. - thomas --- ## Post #10 by @system I spoke too fast - the ARCHETYPE_HRID syntax is specified [here in the Archetype Identification spec.](http://www.openehr.org/releases/AM/latest/docs/Identification/Identification.html#_human_readable_identifier_hrid) --- ## Post #11 by @system So, there are also considerations I did not see\. I can live a few days more without having a definite policy ;\-\) But the classes are there and people will want to use them\. I think Thomas proposal is in line with the other rmNames, like EHR and DEMOGRAPHIC \(which are capitalized\), and therefor indeed EHR\_EXTRACT seems to me the best solution\. Sorry for agreeing with previous suggestions\. Bert --- ## Post #12 by @system I think the string matching should be case\-insensitive, and the current regexes allow for any case\. Various tools implementers would need to check to see if their tools match 'ehr\_extract' to 'EHR\_EXTRACT' etc\. \- thomas --- ## Post #13 by @system > > I think the string matching should be case\-insensitive, and the current regexes allow for any case\. Various tools implementers would need to check to see if their tools match 'ehr\_extract' to 'EHR\_EXTRACT' etc\. This is like Diego and Pieter also suggested\. Okay, thanks\. --- ## Post #14 by @system I agree about the case insensitivity\. Archie still does this case sensitive, so I just created https://github.com/openEHR/archie/issues/8 \( Pieter     I think the string matching should be case\-insensitive, and the current     regexes allow for any case\. Various tools implementers would need to     check to see if their tools match 'ehr\_extract' to 'EHR\_EXTRACT' etc\.          \- thomas --- ## Post #15 by @system Note that for class and property names, we tend to stick to typical programming convantions, which is - class - first letter capital - property / method name - first letter lower-case One reason to do this is to be able to distinguish a class name on its own, e.g. in an ADL archetype, and not mix it up with a property name. The ADL workbench does this, and I would argue we want to keep these rules. Nothing is ever completely simple... - thomas --- **Canonical:** https://discourse.openehr.org/t/extract-archetypes/15505 **Original content:** https://discourse.openehr.org/t/extract-archetypes/15505