Closed ce-cox closed 2 years ago
That's easy. Just constrain your search with an ECL expression. For this case, you'd add a MINUS clause and the concept. You can use << to specify a concept AND its children.
To be clear, not importing certain items from the distribution(s) would be a mistake. You are much better simply excluding those from your search. I've just checked what those concepts refer to, and given that they reflect concepts reflecting the SNOMED metadata model itself, I suspect that you aren't using search correctly. I NEVER use search without some kind of constraint. For example, I might autocomplete on a type of problem or diagnosis, or on a type of country of birth, or on a medication, or on a procedure, etc. You almost always want to specify a search constraint. So don't remove what you don't need, simply specify what you do need!
Hi Mark My best effort so far is constraint=900000000000441003 MINUS (<< 408739003 AND << 900000000000441003 AND << 410663007) but it returns a match? as does 246061005 MINUS (<< 408739003 AND << 900000000000441003 AND << 410663007) I tried the not = operator but it doesn't parse 246061005 != (<< 408739003 AND << 900000000000441003 AND << 410663007)
Those don't look right. What are you trying to do?
It is very unlikely you will want to search the whole hierarchy.
See the ECL documentation and see the examples.
It would be good to exclude by module as they share the same one but sadly this fails as well 410663007 {{C moduleId != 900000000000012004}}
The implementation of concept filters is on the to-do list, but is trivial. I'm still not quite sure what you're trying to achieve however, as it sounds like you're making it more complicated than you need it to be. What are you searching for?
I have been told that the following codes must not be returned ( or their children ) when a search is run 410663007 | Concept history attribute (attribute) | 408739003 | Unapproved attribute (attribute) | 900000000000441003 | SNOMED CT Model Component (metadata) |
A search for what?
any code (conceptID) or description
As I said, we don't search for any code or description! You'll end up with a mess!
But if you insist,
<<138875005 gives you all concepts
<< 138875005 MINUS << 900000000000441003 will constrain a search to all concepts except those descending from the metadata code.
Again, you do not want to search the whole hierarchy.
SNOMED CT is a complex hierarchical terminology. If you let users search across the whole index in a user interface, you'll end up with a mess. You constrain your searches so that the search makes sense in context. e.g. an anatomical structure, a pharmaceutical product, a diagnosis, an ethnicity, a country of birth, an occupation.
We currently let a user search for a code which returns the description ( not preferred ) eg ../api/ct/266920004 returns {"ctActive":true,"ctCode":"266920004","ctDescription":"Occasional smoker"} However ../api/ct/410663007 ( or any of the children ) returns nothing With your system I will be adding the 'MINUS << 900000000000441003' part on the end so that the 3 codes can not be found or used. Many thanks for the assistance
Hi Mark I have been told that I need to exclude 3 codes and their children, eg 410663007 <- 246061005 from entering the patient record. Ideally this would be done when loading from TRUD, but alternatively is there a way to delete a conceptID and all children? If not could you exclude codes in a config file for the server or least preferable when searching ?