【问题标题】:Cannot validate a contained resource with Simplifier.net无法使用 Simplifier.net 验证包含的资源
【发布时间】:2021-10-07 19:54:58
【问题描述】:

我们正在针对 SIMPLIFIER.NET 测试如下所示的 FHIR 资源。

这是一个包含任务的遭遇。由于遭遇不能直接引用任务,我们使用反向引用。

根据标准 R4,“对于引用容器的资源,引用是 '#'。”

问题在于 Simplifier 在这种情况下会引发异常,而 Confluence 和 Gazelle 不会:

问题是:FHIR 资源是否格式正确?

{

    "resourceType": "Encounter",

    "status": "planned",

    "contained": [{

        "resourceType": "Task",

        "status": "requested",

        "intent": "order",

        "note": [{

            "text": "Task 2"

        }],

        "id": "task1",

"encounter": { "reference": "#" }

    }],

    "class": {

        "display": "Pre Op"

    },

    "subject": {

        "reference": "Patient/83479"

    },

    "episodeOfCare": [{

        "reference": "EpisodeOfCare/FC93408C-6E0E-4003-B984-A6B4CE7334B8"

    }],

    "basedOn": [{

        "reference": "ServiceRequest/332276C4-12FA-4576-AE1D-6865C267BDD5"

    }],

    "participant": [{

        "individual": {

            "reference": "Practitioner/cea0b20a-e162-4065-a16d-766697e647ac"

        }

    }],

    "meta": {

        "lastUpdated": "2021-10-06T10:09:40.070-05:00"

    },

    "id": "B3E42476-A8FE-4848-9F2B-F3F9126E88C6"

}

【问题讨论】:

    标签: hl7-fhir


    【解决方案1】:

    The FHIRPath definition of the ref-1 invariant目前不允许从被包含的资源中引用容器资源,只能引用其他被包含的资源:

    reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))
    

    ticket for changing this in the FHIR specification 已提交并批准更改此设置,但尚未申请。

    【讨论】:

      猜你喜欢
      • 2020-08-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多