工作组: FHIR Infrastructure ![]() | 成熟度: 3 | 试用 | 安全级别: Business | 隔间: Not linked to any defined compartments |
Detailed Descriptions for the elements in the Subscription resource.在订阅型resource结构体中的元素的详细解释。
Subscription | |
Element Id | Subscription |
Definition | The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action. 订阅型resource用于定义用于记录推送到另一个服务端相关的信息. 订阅型resource一旦生成,在对应的resource有生成或修改满足订阅型资源所描述的,将会通过一种方式推送消息到被推送端,被推送端将会这些推送的信息作相应的业务操作。 |
Cardinality | 0..* |
Type | DomainResource |
Alternate Names | WebHook; Hook; Routing Rule |
Summary | true |
Subscription.status | |
Element Id | Subscription.status |
Definition | The status of the subscription, which marks the server state for managing the subscription. 订阅型resource的状态,这个状态标记当前推送端管理订阅型resource的状态。 |
Cardinality | 1..1 |
Terminology Binding | SubscriptionStatus (Required) |
Type | code |
Is Modifier | true (Reason: This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid)(原因: 本元素(status)不可或缺的原因为当一个订阅型resource生成时status的值为error时,这会被fhir服务端认为是无效的。 ) |
Summary | true |
Comments | A client can only submit subscription resources in the requested or off state. Only the server can move a subscription from requested to active, and then to error. Either the server or the client can turn a subscription off. 客户端提交的订阅型resource的status的值只能为requested或off,只有fhir服务端可以将订阅型resource的状态从requested改为active或者error,无效是客户端还是fhir服务端都可 把status的值改为off. This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid. status不可或缺是因为其值标记着当前资源是否有效。 |
Subscription.contact | |
Element Id | Subscription.contact |
Definition | Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting. contact元素用于订阅型资源对人类可用的联系方式的描述,主要用途在于系统管理员解决问题时(需要找相关负责人)用到。 |
Cardinality | 0..* |
Type | ContactPoint |
Summary | true |
Subscription.end | |
Element Id | Subscription.end |
Definition | The time for the server to turn the subscription off. fhir服务端将订阅型资源的status修改为off时的时间。 |
Cardinality | 0..1 |
Type | instant |
Summary | true |
Comments | The server is permitted to deviate from this time but should observe it. fhir服务端可以不用填写但最好填上。 |
Subscription.reason | |
Element Id | Subscription.reason |
Definition | A description of why this subscription is defined.这个订阅型resource存在的原因。 |
Cardinality | 1..1 |
Type | string |
Summary | true |
Subscription.criteria | |
Element Id | Subscription.criteria |
Definition | The rules that the server should use to determine when to generate notifications for this subscription. fhir服务端推送消息到被推送端的规则。 |
Cardinality | 1..1 |
Type | string |
Summary | true |
Comments | The rules are search criteria (without the [base] part). Like Bundle.entry.request.url, it has no leading "/". 这些规则为搜索条件(不需要带上基地址)就像Bundle.entry.request.url,不需要以“/”开头。 |
Subscription.error | |
Element Id | Subscription.error |
Definition | A record of the last error that occurred when the server processed a notification. 记录上次推送通知时的错误。 |
Cardinality | 0..1 |
Type | string |
Summary | true |
Subscription.channel | |
Element Id | Subscription.channel |
Definition | Details where to send notifications when resources are received that meet the criteria. 当满足条件时,要使用的推送方式。 |
Cardinality | 1..1 |
Summary | true |
Subscription.channel.type | |
Element Id | Subscription.channel.type |
Definition | The type of channel to send notifications on. 要使用的推送方式的类型。 |
Cardinality | 1..1 |
Terminology Binding | SubscriptionChannelType (Required) |
Type | code |
Summary | true |
Subscription.channel.endpoint | |
Element Id | Subscription.channel.endpoint |
Definition | The url that describes the actual end-point to send messages to. 推送通知使用的接入点。 |
Cardinality | 0..1 |
Type | url |
Summary | true |
Comments | For rest-hook, and websocket, the end-point must be an http: or https: URL; for email, a mailto: url, for sms, a tel: url, and for message the endpoint can be in any form of url the server understands (usually, http: or mllp:). The URI is allowed to be relative; in which case, it is relative to the server end-point (since there may be more than one, clients should avoid using relative URIs). 对于rest-hook和websocket方式,接入点的格式必须为http:url或https:url,对于email来说格式为mailto:url,对于短信来说为 tel:url,对于用message方式, 格式任意只要fhir服务端明白即可。(一般来说,为http:或mllp:开头)。URI可以是相对地址,这种情况下,它是相对fhir服务而言(为了不必要的麻烦,客户端最好避免使用相对URI) |
Subscription.channel.payload | |
Element Id | Subscription.channel.payload |
Definition | The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type "text/plain" may also be used for Email and SMS subscriptions. 内容的多媒体类型,可以是application/fhir+xml或application/fhir+json。如果payload元素没有那么意味着在通知里无内容,只是一个通知而已。 "text/plain"也可以用于email或sms的内容格式。 |
Cardinality | 0..1 |
Terminology Binding | MimeType (Required) |
Type | code |
Summary | true |
Comments | Sending the payload has obvious security implications. The server is responsible for ensuring that the content is appropriately secured. 直接发内容有安全隐患,推送端应该通过适当的方式加密数据。 |
Subscription.channel.header | |
Element Id | Subscription.channel.header |
Definition | Additional headers / information to send as part of the notification. 作为通知的额外header信息。 |
Cardinality | 0..* |
Type | string |
Summary | true |
Comments | Exactly what these mean depend on the channel type. They can convey additional information to the recipient and/or meet security requirements; for example, support of multiple headers in the outgoing notifications for rest-hook type subscriptions. 根据实际的推送方式不同header的内容不同。header可用于给被推送端的额外信息或者用于满足一些安全需要。比如说,对于rest-hook方式的推送(根据实际情况)可以加入多种不同的header. |