IHTSDO / snow-owl

Snow Owl Terminology Server. This version is no longer maintained. Please use the upstream version or the alternate Snowstorm Terminology Server.
Apache License 2.0
11 stars 1 forks source link

Can't figure out Proper Creation of New Concept and related mrcm rules for validation #69

Closed dhirendraps closed 5 years ago

dhirendraps commented 5 years ago

We are setting up the Authoring-Platform and completed the integration of authroing-service, termserver and all other supporting services. After doing international import on the main branch of termserver. While creating new concepts on the sub-branch and adding "is a(attribute)" to the concept, it will check the mrcm rules but unable to find it. We have already added the path of mrcm rules directory before starting the termserver. I am attaching the screenshot of my browser which will clear the test case i am trying. Please guide in understanding the flow of concept creation and the how to properly apply mrcm rules.

screenshot 50 _li

kaicode commented 5 years ago

Hi @dhirendraps, the MRCM XML file must be imported into Snow Owl before the MRCM API endpoints will work. Please see the documentation for that here. The XML file is available here.

To connect to the Snow Owl OSGi command line go onto the command line of the machine running Snow Owl and then use telnet to connect. With the default configuration this will work: telnet -l admin localhost 2501

dhirendraps commented 5 years ago

Hi @kaicode, thank you for your reply. We have already imported the MRCM XML file in Snow Owl through Snow Owl OSGI. But when I am trying to hit "GET /mrcm/{path}/attribute-values/{attributeId}" endpoint of MRCM API and passing value to the {path} till the path of the task marked on jira, then it is not able to find the resource.

eg. "https://snomed-authoring.mig.in/snowowl/snomed-ct/v2/mrcm/MAIN/NTP/NTP-2/attribute-values/116680003?termPrefix=foot*&expand=fsn()&offset=0&limit=50" For the given API endpoint, I am getting { developerMessage: "The requested instance resource (id = '116680003', type = 'MRCM predicate for attribute') does not exist and/or not yet created." message: "MRCM predicate for attribute with identifier '116680003' could not be found." status: 404 }

"https://snomed-authoring.mig.in/snowowl/snomed-ct/v2/mrcm/MAIN/NTP/attribute-values/116680003?termPrefix=foot*&expand=fsn()&offset=0&limit=50" For the Same API endpint with {path} as MAIN i am getting proper repsonse.

As we have imported our International RF2 file on MAIN, do we need to import those files on the sub-branches also?? Note: In Jira we have Created SCA Authoring Project and its Extension Base is MAIN, Key is NTP and the Task key is NTP-2.

kaicode commented 5 years ago

Hi @dhirendraps, the MRCM content is like content on a branch. After the MRCM content is imported onto the MAIN branch you can merge it to child branches to make it visible. In your example if you merge MAIN to MAIN/NTP and then merge MAIN/NTP to MAIN/NTP/NTP-2 then the MRCM content will be available on the NTP-2 branch.

dhirendraps commented 5 years ago

Thank you @kaicode, it is very helpful and solved my issue.

kaicode commented 5 years ago

I'm glad your implementation started working 😄

dhirendraps commented 5 years ago

Hi @kaicode , When i am trying to save the newly created concept. It is giving "Fatal error: Could not validate concept" and Response as : {"status":400,"code":0,"message":"No assertion groups configured for this branch.","developerMessage":"Input representation syntax or validation errors. Check input values."}

I have already integrated the RVF API through Orchestration service. How can i configure Assertion groups for a particular branch?

kaicode commented 5 years ago

Hi @dhirendraps, this error is related to the integration of the SNOMED Drools validation engine.

One or more assertion groups must be configured in the branch metadata so the Drools validation engine knows which rule sets to use for validation during save.

The SNOMED Drools Rules should be checked out into the Snow Owl installation directory, for example /opt/termserver/snomed-drools-rules. This location is configurable in snowowl_config.yml using snomed > drools > rulesDirectory. The rules are read into Snow OWL during startup.

A key/value pair needs to be set in the metadata of the MAIN branch to configure which rule assertion groups to run. Here is example branch metadata:

"metadata": {
    "assertionGroupNames": "common-authoring",
    "previousRelease": "20190131",
    "defaultReasonerNamespace": "",
    "classification.previousPackage": "prod_main_20190131_20181109133000.zip"
}
dhirendraps commented 5 years ago

Hi @kaicode,

Please let me know what current version of the components worked for Snomed International in production and also tell me about current version of Ansible.

And while running the termserver it not able to retrieve "cs_words.txt, gbTerms.txt and usTerms.txt" files from the location "/opt/termserver/resources/test-resources/". I have checked for the files they are not present at given location. I trying searching these files but not able to get them please provide these files.

When we start authoring platform it check's validation status for all the branches and sub-branches and it is not getting status.json at the given bucket. As i am using Offline S3ClientImpl and it not creating the status.json file. So my question for this is do we need to put status.json files manually for every branch. Please help me at this.

kaicode commented 5 years ago

Hi @dhirendraps,

The latest versions of components are listed on the Authoring Platform 3.3.0 release notes.

We store the test resource files in S3. I've created a copy in git gist, please take a copy of these files for your own deployment. The files required for the current production deployment are cs_words.txt, gbTerms.txt, usTerms.txt.

The Orchestration Service checks the branch status. If validation has never been run it may log a message but we currently ignore this. The authoring UI should show no validation icon against tasks which have never been validated.

I hope that helps.

dhirendraps commented 5 years ago

Hi @kaicode, while creating a concept if Use case: FSN as preferred for us and gb SYN as preferred for us and gb SYN as acceptable for us and gb

then concept get saved without issue. screenshot 55

Use case: FSN as preferred for us and gb SYN as acceptable for us and gb SYN as preferred for us and gb then concept through error "[2019-01-21 18:44:37.094] ERROR http-bio-8080-exec-2 c.b.snowowl.snomed.api.rest.ControllerExceptionMapper Exception during request processing com.b2international.snowowl.core.api.SnowowlRuntimeException: com.b2international.snowowl.core.api.SnowowlRuntimeException: com.google.common.cache.CacheLoader$InvalidCacheLoadException: CacheLoader returned null for key com.b2international.snowowl.datastore.server.internal.CDOTransactionContext@75c03dae." screenshot 54

Please help me in this.

kaicode commented 5 years ago

Hi @dhirendraps, I'm sorry I do not recognise this issue. You could either take a look at the Snow Owl source code which is available on github or get in touch with B2i Healthcare who are able to provide detailed support and debugging for this application.