简体   繁体   English

Azure FHIR:创建媒体资源时出错

[英]Azure FHIR: Error when creating a Media Resource

I want to create a Media resource in my Azure FHIR, I follow the standard definition on https://www.hl7.org/fhir/media.html (In summary, there are only 2 mandatory fields: status and Content) but It did not work!.我想在我的 Azure FHIR 中创建一个媒体资源,我遵循https://www.hl7.org/fhir/media.html上的标准定义(总而言之,只有 2 个必填字段:状态和内容)但是它不工作!。

I try the simplest possible example: { "resourceType": "Media", "id": "", "status": "unknown", "content": { "id": "a1", "contentType": "audio/mpeg", "data": "" } }我尝试了最简单的例子:{ "resourceType": "Media", "id": "", "status": "unknown", "content": { "id": "a1", "contentType": "audio /mpeg", "数据": "" } }

But Server shows an error: "Type checking the data: Encountered unknown element 'status' at location 'Resource.status[0]' while parsing"但服务器显示错误:“类型检查数据:解析时在位置‘Resource.status[0]’处遇到未知元素‘状态’”

When remove the status field, the server shows a different error: "Element with min. cardinality 1 cannot be null".删除状态字段时,服务器显示不同的错误:“最小基数为 1 的元素不能为空”。

Can anybody tell me what is the correct syntax for creating a Media Resource?谁能告诉我创建媒体资源的正确语法是什么?

Thanks谢谢

I have just attempted to reproduce that but I cannot.我只是试图重现它,但我不能。 When I do a当我做一个

POST https://<myservice>.azurehealthcareapis.com/Media

With a payload of:有效载荷为:

{ "resourceType": "Media", "id": "", "status": "unknown", "content": { "id": "a1", "contentType": "audio/mpeg", "data": "" } }

I get 201 CREATED and return payload of:我得到201 CREATED并返回以下有效载荷:

{
    "resourceType": "Media",
    "id": "7140a11a-dc59-4766-83f9-027a56d69551",
    "meta": {
        "versionId": "1",
        "lastUpdated": "2019-12-26T07:10:46.993+00:00"
    },
    "status": "unknown",
    "content": {
        "id": "a1",
        "contentType": "audio/mpeg"
    }
}

Could it be that your instance of the Azure API for FHIR is STU3, but you are using an R4 Media resource.可能是您的用于 FHIR 的 Azure API 实例是 STU3,但您使用的是 R4 媒体资源。 I believe the "status" element was added in R4.我相信“状态”元素是在 R4 中添加的。

Thanks Michael!谢谢迈克尔! I mixed up STU3 and R4.我混淆了 STU3 和 R4。

Followed correct version of Media: https://www.hl7.org/fhir/STU3/media.html , and it was solved!按照正确版本的媒体: https : //www.hl7.org/fhir/STU3/media.html ,它解决了!

{ "resourceType": "Media", "id": "d5af5eb3-1402-4249-987e-8ff1c09384b1", "meta": { "versionId": "1", "lastUpdated": "2019-12-27T03:41:16.288+00:00" }, "type": "photo", "content": { "id": "a1", "contentType": "audio/mpeg" } } { "resourceType": "Media", "id": "d5af5eb3-1402-4249-987e-8ff1c09384b1", "meta": { "versionId": "1", "lastUpdated": "2019-12-27T03:41 :16.288+00:00" }, "type": "photo", "content": { "id": "a1", "contentType": "audio/mpeg" } }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Azure API 中为 FHIR 创建多个包 - Creating multiple bundles in Azure API for FHIR 使用Azure作为媒体资源(CDN)时,如何纠正WPF应用程序中的错误? - How can I correct error in my WPF Application when using Azure as a media resource (CDN)? 创建 azure 资源时 -Confirm 的可接受参数 - Acceptable parameters for -Confirm when creating azure resource 在 Azure Monitor 工作簿中针对资源管理器创建查询时出现错误消息 - Error message when creating query against Resource Manager, in Azure Monitor Workbook 使用Azure Media Encoder编码时出错 - Error when encoding with Azure Media Encoder FHIR Server for Azure: Azure 多台服务器时的AD机制 - FHIR Server for Azure: Azure AD mechanism when there are multiple servers 在Azure中创建容器时出错 - Error when creating container in Azure 创建 Azure 媒体服务 v3 作业时的预设覆盖 - presetOverride when creating Azure Media Services v3 Job 使用 Azure CLI 创建新资源时的标签格式 - Tags format when creating new resource with Azure CLI 创建新的Azure资源组或应用程序服务计划/位置时出错 - Error creating a new Azure Resource Group or App service Plan/ Location
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM