IHTSDO / classification-service

Standalone Classification Service providing OWL Reasoning against SNOMED CT RF2 files.
Other
13 stars 1 forks source link

RF2 download is htm file #4

Closed waydes closed 1 year ago

waydes commented 2 years ago

I have used the classification server to classify our veterinary extension. When I download the file, it has a .htm extension. I thought it might just be a zip file, so changed the extension and 7-zip can not extract it. When I click on the .htm file, it opens in a browser, but it is obiously not a web page. Solution?

kaicode commented 2 years ago

The API endpoint GET /classifications/{classificationId}/results/rf2 returns a zip file containing RF2-like files. If you visit this endpoint directly in a browser or via a script the correct zip file should be downloaded. If this endpoint is accessed via the Swagger UI it may not work. I expect that may be the route of the problem you are experiencing?

waydes commented 2 years ago

When you say to visit the endpoint directly, do you mean for the Snowstorm port or the classification server port?

http://localhost:8089/classifications/735e0dd6-2035-427b-b38f-1cfc124a6f0f/results/rf2 or http://localhost:8080/classifications/735e0dd6-2035-427b-b38f-1cfc124a6f0f/results/rf2 or when you say to use the GET /classifications/{classificationId}/results/rf2 is that the classification-server api?

I am unclear as to what the directory structure should be to store the results. The documentation said the zip files should be stored under store/releases directory. Should the results of the classification be store under the store/classifications directory? Will be available directly or will the zip file to download have to be created when you download it?

On Tue, Jan 25, 2022 at 12:52 PM Kai Kewley @.***> wrote:

The API endpoint GET /classifications/{classificationId}/results/rf2 returns a zip file containing RF2 like files. If you visit this endpoint directly in a browser or via a script the correct RF2 zip file should be downloaded. If this endpoint is accessed via the Swagger UI it may not work. I expect that may be the route of the problem you are experiencing?

— Reply to this email directly, view it on GitHub https://github.com/IHTSDO/classification-service/issues/4#issuecomment-1021454293, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSUF34IPBGMTPY2F6MTTXDUX3PNNANCNFSM5MY5PY3Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

kaicode commented 2 years ago

If you would like to use the classification service directly then use the URL for that.

If you would like to use snowstorm and the classification service together then the classification should be started using the Snowstorm API and Snowstorm should download and process the results automatically. The completed classification should then be available via the Snowstorm API.

To answer your original one would need to know what URL you were accessing to get the .htm file and was it through the Swagger UI?

The store/releases directory is intended as a source for the classification service to load the previous releases from. When classifying an extension that would usually be the International Edition and the latest release of the Extension. There is no need for a directory structure in there, the archives can just be placed there. The classification request to the classification service should name those release files as they will be needed to correctly classify the content in the RF2 delta in the request.

The request details are formed automatically when calling the classification service from Snowstorm but you do have to set the names of the archives in the branch metadata of each code system in Snowstorm. See Snowstorm documentation SNOMED CT Extension / Edition Authoring.