英文:
How to get reference item contents from xml to json in MS Fhir?
问题
In the xml file, there is a reference to a text that is being declared in the section tag. In the entry tag:
<text>
<reference value="#ITEM_GOALXXXXX" />
</text>
In the section tag above entry:
<tr ID="ITEM_GOALXXXXX">
<td>
<content ID="GOAL1170275107">
further evaluate chronic cough
</content>
</td>
<td>
<content styleCode="Bold">
Start Date:
</content>
11/9/21
</td>
<td>
<content styleCode="Bold">
End Date:
</content>
</td>
</tr>
To refer to this and get it under the description tag in MS Fhir:
"description": {
"text": "further evaluate chronic cough Start Date: 11/9/21 End Date:"
}
I tried referring through the Section template in MS Fhir but was not able to proceed with the code to get all the contents present in the <tr>
tag as text of the description. Section: Goal
英文:
Section Goal-
In the xml file there is a reference to a text that is being declared in the section tag,
In the entry tag-
<text>
.
<reference value="#ITEM_GOALXXXXX" />
</text>
In the section tag above entry-
<tr ID="ITEM_GOALXXXXX">
<td>
<content ID="GOAL1170275107">
further evaluate chronic cough
</content>
</td>
<td>
<content styleCode="Bold">
Start Date:
</content>
11/9/21
</td>
<td>
<content styleCode="Bold">
End Date:
</content>
</td>
</tr>
"description":
How to refer to this so that I can get it under description tag in MS Fhir?
{
"text": "further evaluate chronic cough Start Date:11/9/21End Date:"
},
`
I tried referring through Section template in Ms Fhir but was not able to proceed with the code to get all the contents present in the tr tag as text of description.
Section: Goal
答案1
得分: 0
如果文本仅出现在Composition.section.text
字段中,而不在Goal.description.text
中,您需要更改Composition资源,将文本手动复制到Goal.description.text
中。之后,您可以将Composition资源存储在MS FHIR服务器中,根据您的需求以JSON或XML格式检索它。如果您的XML符合FHIR标准,您还可以尝试查看服务器是否支持$convert操作。此操作将允许您将XML发送到服务器并获取JSON等效内容。
英文:
If the text is only present in the Composition.section.text
field and not in the Goal.description.text
where you (also) seem to want it, you will have to change the Composition resource and manually copy the text to the Goal.description.text
. After that, you can store your Composition resource in the MS FHIR Server and retrieve it as JSON or XML, depending on what you want. If your XML is valid FHIR, instead of storing the resource, you can also try and see if the server supports the $convert operation. This operation will let you send the XML to the server and get back the JSON equivalent.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论