https://github.com/cqframework/cql-translation-service
官網的說明:A microservice wrapper for the CQL to ELM conversion library and CQL formatter. 其實還蠻直覺的,就是一個CQL轉ELM的微服務。
Build Image...
即可,Dockerfile內容如下:簡單的docker compose檔案如下:
執行docker compose up
即可啟動
使用HTTP POST,C#程式碼如下:
配合firely-cql-sdkhttps://github.com/FirelyTeam/firely-cql-sdk
使用,以下參數必須修改:
Item | value | Description |
---|---|---|
locators | true | Indicates that the translator should include source code locators within output ELM |
signatures | Overloads | Indicates whether signatures should be included for invocations in the output ELM. Differing will include invocation signatures that differ from the declared signature. Overloads will include declaration signatures when the operator or function has more than one overload with the same number of arguments as the invocation |
result-types | true | Indicates that the translator should include result types in the output ELM |
從FHIR官方網站"Clinical Quality Framework Common FHIR Assetshttps://fhir.org/guides/cqf/common/index.html
可以知道,目前發展了三個CQL Library:FHIR ModelInfo、FHIR Helpers和FHIR Common。
但如同官網所描述:Note that FHIRCommon is not a "well-known" library name,因此include FHIRCommon version '4.0.1'
並不能正常運作。
目前可行替代方案是利用cql-translation-service提供的Multipart Translator Request功能,將所有CQL檔案(包含FHIRCommon.cql)一起傳入,之後將Response根據Boundary與Header切割成多個elm檔(JSON格式)。