我有这样的患者心率每小时信息
PID Hour HR
1 1 97
1 2 89
1 3 90
1 4 100
.....
.....
1 100 93
对于每个小时的数据,我像这样创建了 json
# For Hour 1
{
"resourceType": "Observation",
"id": "heart-rate",
"meta": {
"profile": [
"http://hl7.org/fhir/StructureDefinition/vitalsigns"
]
},
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "vital-signs",
"display": "Vital Signs"
}
],
"text": "Vital Signs"
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "8867-4",
"display": "Heart rate"
}
],
"text": "Heart rate"
},
"subject": {
"reference": "Patient/example"
},
"effectiveDateTime": "2020-04-21T00:00:00+05:30",
"valueQuantity": {
"value": 97,
"unit": "beats/minute",
"system": "http://unitsofmeasure.org",
"code": "/min"
}
}
# Hour 2
{
"resourceType": "Observation",
"id": "heart-rate",
"meta": {
"profile": [
"http://hl7.org/fhir/StructureDefinition/vitalsigns"
]
},
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "vital-signs",
"display": "Vital Signs"
}
],
"text": "Vital Signs"
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "8867-4",
"display": "Heart rate"
}
],
"text": "Heart rate"
},
"subject": {
"reference": "Patient/example"
},
"effectiveDateTime": "2020-04-21T01:00:00+05:30",
"valueQuantity": {
"value": 89,
"unit": "beats/minute",
"system": "http://unitsofmeasure.org",
"code": "/min"
}
}
我创建了一个资源包,其中包含 100 个 json 嵌套在条目中,并且我能够将其推送到 fhir-server 中。
{"resourceType": "Bundle", "type": "batch", "entry": [
上面给出的示例适用于一名患者和一个观察资源(心率)。我有超过 20000 名患者,拥有 50 种不同的观察资源类型。
有没有办法让一个 json 代表 100 个值,而不是创建 100 个不同的 json 条目。如果有任何方法可以将值数组映射到时间戳,则在值数量中。这会节省很多时间。