如何使用扩展名扩展 FHIR 中的原始数据类型?
How to extend a primitive data type in FHIR with an extension?
我正在尝试整合 FHIR KBV_PR_Base_Observation_Heart_Rate
配置文件。在FHIR Resource的编码段,配置文件规定显示段要提供德语区的扩展。
https://fhir.kbv.de/StructureDefinition/KBV_PR_Base_Observation_Heart_Rate
怎样才能满足个人资料的要求?我不明白我应该如何在此处包含扩展名?
我尝试了以下方法,但验证器似乎不喜欢它(这也是合乎逻辑的,因为不再有原始数据类型):
code: {
coding: [{
system: 'http://loinc.org',
version: '2.69',
code: '8867-4',
display: {
value: 'Heart rate',
extension: {
url: 'https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Terminology_German',
anzeigenameCodeLoinc: {
extension: {
content: {
url: 'content',
valueString: 'Herzfrequenz',
},
},
},
},
},
}, {
system: 'http://snomed.info/sct',
version: '1.1.3',
code: '364075005',
display: {
value: 'Heart rate (observable entity)',
extension: {
url: 'https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Terminology_German',
anzeigenameCodeLoinc: {
extension: {
content: {
url: 'content',
valueString: 'Herzfrequenz',
},
},
},
},
},
}],
text: 'Heart rate',
},
验证器的输出:
Error @ Observation.code.coding[0].display (line 24, col25) : This property must be a simple value, not an object
Error @ Observation.code.coding[1].display (line 43, col25) : This property must be a simple value, not an object
没有扩展名:
code: {
coding: [{
system: 'http://loinc.org',
version: '2.69',
code: '8867-4',
display: 'Heart rate'
}, {
...
}],
text: 'Heart rate',
},
验证器输出:
Error @ Observation.code.coding[0].display (line 28, col8) : Observation.code.coding:loinc.display.extension:anzeigenameCodeLoinc: at least required = 1, but only found 0
Error @ Observation.code.coding[1].display (line 34, col8) : Observation.code.coding:codeSnomed.display.extension:anzeigenameCodeSnomed: at least required = 1, but only found 0
JSON 基元在 属性 名称 https://hl7.org/fhir/json.html#primitive 之前用 _
扩展。这是一个独立于显示值本身的字段。所以你的观察看起来像这样
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"version": "2.69",
"code": "8867-4",
"display": "Heart rate",
"_display": {
"extension": [{
"url": "https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Terminology_German",
"extension": [{
"url": "content",
"valueString": "Herzfrequenz"
}]
}]
}
},
{
"system": "http://snomed.info/sct",
"version": "1.1.3",
"code": "364075005",
"display": "Heart rate (observable entity)",
"_display": {
"extension": [{
"url": "https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Terminology_German",
"extension": [{
"url": "content",
"valueString": "Herzfrequenz"
}]
}]
}
}
],
"text": "Heart rate"
}
}
我正在尝试整合 FHIR KBV_PR_Base_Observation_Heart_Rate
配置文件。在FHIR Resource的编码段,配置文件规定显示段要提供德语区的扩展。
https://fhir.kbv.de/StructureDefinition/KBV_PR_Base_Observation_Heart_Rate
怎样才能满足个人资料的要求?我不明白我应该如何在此处包含扩展名?
我尝试了以下方法,但验证器似乎不喜欢它(这也是合乎逻辑的,因为不再有原始数据类型):
code: {
coding: [{
system: 'http://loinc.org',
version: '2.69',
code: '8867-4',
display: {
value: 'Heart rate',
extension: {
url: 'https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Terminology_German',
anzeigenameCodeLoinc: {
extension: {
content: {
url: 'content',
valueString: 'Herzfrequenz',
},
},
},
},
},
}, {
system: 'http://snomed.info/sct',
version: '1.1.3',
code: '364075005',
display: {
value: 'Heart rate (observable entity)',
extension: {
url: 'https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Terminology_German',
anzeigenameCodeLoinc: {
extension: {
content: {
url: 'content',
valueString: 'Herzfrequenz',
},
},
},
},
},
}],
text: 'Heart rate',
},
验证器的输出:
Error @ Observation.code.coding[0].display (line 24, col25) : This property must be a simple value, not an object
Error @ Observation.code.coding[1].display (line 43, col25) : This property must be a simple value, not an object
没有扩展名:
code: {
coding: [{
system: 'http://loinc.org',
version: '2.69',
code: '8867-4',
display: 'Heart rate'
}, {
...
}],
text: 'Heart rate',
},
验证器输出:
Error @ Observation.code.coding[0].display (line 28, col8) : Observation.code.coding:loinc.display.extension:anzeigenameCodeLoinc: at least required = 1, but only found 0
Error @ Observation.code.coding[1].display (line 34, col8) : Observation.code.coding:codeSnomed.display.extension:anzeigenameCodeSnomed: at least required = 1, but only found 0
JSON 基元在 属性 名称 https://hl7.org/fhir/json.html#primitive 之前用 _
扩展。这是一个独立于显示值本身的字段。所以你的观察看起来像这样
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"version": "2.69",
"code": "8867-4",
"display": "Heart rate",
"_display": {
"extension": [{
"url": "https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Terminology_German",
"extension": [{
"url": "content",
"valueString": "Herzfrequenz"
}]
}]
}
},
{
"system": "http://snomed.info/sct",
"version": "1.1.3",
"code": "364075005",
"display": "Heart rate (observable entity)",
"_display": {
"extension": [{
"url": "https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Terminology_German",
"extension": [{
"url": "content",
"valueString": "Herzfrequenz"
}]
}]
}
}
],
"text": "Heart rate"
}
}