SwanseaUniversityMedical / concept-library

Concept Library
https://conceptlibrary.saildatabank.com
GNU General Public License v3.0
8 stars 2 forks source link

Review and update phenoflow links if necessary #1667

Closed DSThayer closed 2 months ago

DSThayer commented 3 months ago

Message from Martin:

Just wanted to quickly follow up on the below to let you know that (finally!) our migration to the new GitHub-backed version of Phenoflow is complete. As such, if you're still keen to update the Phenoflow links on the HDR library, then you should be able to use the same endpoint as before, but now searching on the 'PHXX' ID from the library, e.g.:

curl -X POST https://kclhi.org/phenoflow/phenotype/all --header 'Content-Type: application/json' --data-raw '{"importedId":"PH222"}'

From this call, you'll get a response that also has a similar structure to what was returned previously, but with some additional fields:

{ "github_url": "https://github.com/phenoflow/Obstructive-and-reflux-uropathy---e0e470b0-1798-11ef-9de4-4d4ea830ad16", "url": "https://kclhi.org/phenoflow/workflows/github.com/phenoflow/Obstructive-and-reflux-uropathy---e0e470b0-1798-11ef-9de4-4d4ea830ad16/blob/read-potential-cases-fhir/Obstructive-and-reflux-uropathy.cwl", "short_url": "https://kclhi.org/phenoflow/Obstructive-and-reflux-uropathy---e0e470b0-1798-11ef-9de4-4d4ea830ad16" }

The 'url' field is what I think you used before from the response to populate the 'implementation' field on the library, and you are welcome to do so again. I've also included a direct link to GitHub, where Phenoflow phenotypes are now stored, should you wish to use that instead (probably more stable in the long term). I've also included a short URL, should the main URL be too long, but the cost of the shortening is making some assumptions about the content of the phenotype, which may not always hold. I've documented all of this here: API Documentation - Common Workflow Language Viewer (kclhi.org).