Python 中是否有任何函数可以将给定的 json 输入转换为 HL7 FHIR 格式。通过传递 Liquid 模板 (Shopify) 和输入源数据。
我不知道,但我纠正了;您很可能必须创建自己的。
查看有类似问题的人的示例:https://forums.librehealth.io/t/project-rest-json-to-fhir-json-mapping-implementation/1765/14
认为您正在寻找类似 fhir.resources 库之类的东西,您可以在其中为某种可以序列化的对象提供一些包含数据的字典。
from fhir.resources.organization import Organization
from fhir.resources.address import Address
data = {
"id": "f001",
"active": True,
"name": "Acme Corporation",
"address": [{"country": "Switzerland"}]
}
org = Organization(**data)
org.resource_type == "Organization"
附注但不太明白为什么你提到液体模板。
您可以使用 fhir-converter 作为起点。该项目目前实现的是CCDA->FHIR。