【发布时间】:2021-07-08 23:17:24
【问题描述】:
我正在使用 Java。
我正在为我刚刚编写的 FHIR 代码编写测试。我想从现有的 Basic 对象中删除扩展。我正在从文件中读取该对象,因此我可以创建另一个文件而无需扩展名。但是Extensibility 页面上的 FHIR 规范非常有帮助地指出 "If a system modifies a resource it SHOULD remove any extensions that it does not understand from the modified element and its descendants, because it cannot know whether the modifications it has made might invalidate the value of the unknown extension" 他们只是没有就如何做到这一点提供任何建议,而且我在探索 Basic 对象时还没有找到一种方法。
【问题讨论】:
-
FHIR 对象只是 POJO,对吧?因此,删除它们应该像遍历扩展一样简单,如果它们未被识别,则将它们从数组中删除。我错过了什么吗?
-
谢谢@seesharper!我想我昨晚发布问题时很累!