我正在尝试从我创建的以下 JSON 文件//自定义表中提取数据元素。数据是匿名的,来自 HIE FHIR 网站(来源:https://www.hl7.org/fhir/patent-example-f001-pieter.json.html)
CREATE TABLE hl7_pat AS SELECT
'
{
"resourceType": "Patient",
"id": "f001",
"text": {
"status": "generated"
},
"identifier": [
{
"use": "usual",
"system": "urn:oid:2.16.840.1.113883.2.4.6.3",
"value": "738472983"
},
{
"use": "usual",
"system": "urn:oid:2.16.840.1.113883.2.4.6.3"
}
],
"active": true,
"name": [
{
"use": "usual",
"family": "van de Heuvel",
"given": [
"Pieter"
],
"suffix": [
"MSc"
]
}
],
"telecom": [
{
"system": "phone",
"value": "0648352638",
"use": "mobile"
},
{
"system": "email",
"value": "[email protected]",
"use": "home"
}
],
"gender": "male",
"birthDate": "1944-11-17",
"deceasedBoolean": false,
"address": [
{
"use": "home",
"line": [
"Van Egmondkade 23"
],
"city": "Amsterdam",
"postalCode": "1024 RJ",
"country": "NLD"
}
],
"maritalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"code": "M",
"display": "Married"
}
],
"text": "Getrouwd"
},
"multipleBirthBoolean": true,
"contact": [
{
"relationship": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
"code": "C"
}
]
}
],
"name": {
"use": "usual",
"family": "Abels",
"given": [
"Sarah"
]
},
"telecom": [
{
"system": "phone",
"value": "0690383372",
"use": "mobile"
}
]
}
],
"communication": [
{
"language": {
"coding": [
{
"system": "urn:ietf:bcp:47",
"code": "nl",
"display": "Dutch"
}
],
"text": "Nederlands"
},
"preferred": true
}
],
"managingOrganization": {
"reference": "Organization/f001",
"display": "Burgers University Medical Centre"
}
}
' as raw;
我正在使用以下语法来尝试从中获取数据。
从 hl7_pat 中选择原始:资源类型;
上面的查询应该简单地返回“Patient”,但它返回 NULL。关于为什么这不起作用的任何建议?
我尝试运行: SELECT raw:resourceType FROM hl7_pat;但得到了 NULL 值。我期待见到“病人”