简体   繁体   English

在单个资源中插入多个观察值 - FHIR

[英]Inserting multiple observation values in single resource - FHIR

I have hourly information for the patients heart rate like this我有这样的患者心率每小时信息

PID Hour HR
1   1    97
1   2    89
1   3    90
1   4    100
.....
.....
1   100  93

for each hour data i created json like this对于每小时的数据,我像这样创建了 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"
  }
}

I created a resource bundle with 100 jsons nested inside entry and i am able to push it inside fhir-server.我创建了一个资源包,其中包含 100 个 json 嵌套在条目中,并且我能够将其推送到 fhir-server 中。

{"resourceType": "Bundle", "type": "batch", "entry": [

The example given above is for one patient and one observation resource (heart-rate).上面给出的示例适用于一名患者和一个观察资源(心率)。 I have more than 20000 patients with 50 different observation resource types.我有超过 20000 名患者,拥有 50 种不同的观察资源类型。

Instead of creating 100 different json entries, is there any way to have one json representing 100 values.除了创建 100 个不同的 json 条目之外,有没有办法让一个 json 代表 100 个值。 in value quantity if there is any way to have array of values mapped with timestamp.如果有任何方法可以将值数组映射到时间戳,则在值数量中。 It would save lot of time.这会节省很多时间。

For a single observation type and a single subject, if the observations are being made on a regular periodic basis, you can use the SampledData data type as the Observation.value.对于单一观察类型和单一主题,如果定期进行观察,您可以使用 SampledData 数据类型作为 Observation.value。 Typically that's for things like EKGs, fetal heart rate monitors, etc. which are sampling on a frequent basis, but nothing stops you from having a sampling period of an hour.通常,这适用于经常采样的心电图、胎心率监测器等,但没有什么能阻止您进行一个小时的采样周期。 However, if you don't have regular sampling, you must capture each as a distinct Observation.但是,如果您没有定期采样,则必须将每个采样捕获为不同的 Observation。 The reason is that we need to be able to extract the data however the user chooses to query it.原因是我们需要能够提取数据,无论用户选择查询它。 The data needs to come in with the same sort of fine-grained organization that it might later need to go out.数据需要采用与以后可能需要 go 输出相同的细粒度组织。 You might look at the Bulk Data API which uses LD-JSON to allow more efficient processing of large volumes of data.您可以查看 Bulk Data API,它使用 LD-JSON 来更有效地处理大量数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM