在单个资源中插入多个观察值 - FHIR
Inserting multiple observation values in single resource - FHIR
我有这样的患者心率每小时信息
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": [
上面给出的示例针对一位患者和一个观察资源(心率)。我有 50 种不同观察资源类型的 20000 多名患者。
有没有办法让一个 json 代表 100 个值,而不是创建 100 个不同的 json 条目。如果有任何方法可以使用时间戳映射值数组,则在值数量中。这会节省很多时间。
对于单个观察类型和单个主题,如果观察是定期进行的,则可以使用 SampledData 数据类型作为 Observation.value。通常这是针对 EKG、胎儿心率监测器等频繁采样的东西,但没有什么能阻止您进行一个小时的采样周期。但是,如果您没有定期采样,则必须将每个采样捕获为一个不同的观察。原因是我们需要能够提取数据,但是用户选择查询它。数据需要以相同类型的细粒度组织输入,以后可能需要输出。您可能会查看批量数据 API,它使用 LD-JSON 来更有效地处理大量数据。
我有这样的患者心率每小时信息
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": [
上面给出的示例针对一位患者和一个观察资源(心率)。我有 50 种不同观察资源类型的 20000 多名患者。
有没有办法让一个 json 代表 100 个值,而不是创建 100 个不同的 json 条目。如果有任何方法可以使用时间戳映射值数组,则在值数量中。这会节省很多时间。
对于单个观察类型和单个主题,如果观察是定期进行的,则可以使用 SampledData 数据类型作为 Observation.value。通常这是针对 EKG、胎儿心率监测器等频繁采样的东西,但没有什么能阻止您进行一个小时的采样周期。但是,如果您没有定期采样,则必须将每个采样捕获为一个不同的观察。原因是我们需要能够提取数据,但是用户选择查询它。数据需要以相同类型的细粒度组织输入,以后可能需要输出。您可能会查看批量数据 API,它使用 LD-JSON 来更有效地处理大量数据。