【问题标题】:How can I GET a subset of appointments from a FHIR server?如何从 FHIR 服务器获取约会子集?
【发布时间】:2020-07-23 21:36:18
【问题描述】:

我正在从使用此template 的 FHIR 服务器检索 JSON 对象。它们看起来像这样:

  "resourceType": "Appointment",
  "id": "example",
  "text": {
    "status": "generated",
    "div": "\u003cdiv xmlns\u003d\"http://www.w3.org/1999/xhtml\"\u003eBrian MRI results discussion\u003c/div\u003e"
  },
  "status": "booked",
  "serviceCategory": [
    {
      "coding": [
        {
          "system": "http://example.org/service-category",
          "code": "gp",
          "display": "General Practice"
        }
      ]
    }
  ],
  "serviceType": [
    {
      "coding": [
        {
          "code": "52",
          "display": "General Discussion"
        }
      ]
    }
  ],
  "specialty": [
    {
      "coding": [
        {
          "system": "http://snomed.info/sct",
          "code": "394814009",
          "display": "General practice"
        }
      ]
    }
  ],
  "appointmentType": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/v2-0276",
        "code": "FOLLOWUP",
        "display": "A follow up visit from a previous appointment"
      }
    ]
  },
  "reasonReference": [
    {
      "reference": "Condition/example",
      "display": "Severe burn of left ear"
    }
  ],
  "priority": 5,
  "description": "Discussion on the results of your recent MRI",
  "start": "2013-12-10T09:00:00Z",
  "end": "2013-12-10T11:00:00Z",
  "created": "2013-10-10",
  "comment": "Further expand on the results of the MRI and determine the next actions that may be appropriate.",
  "basedOn": [
    {
      "reference": "ServiceRequest/myringotomy"
    }
  ],
  "participant": [
    {
      "actor": {
        "reference": "Patient/example",
        "display": "Peter James Chalmers"
      },
      "required": "required",
      "status": "accepted"
    },
    {
      "type": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
              "code": "ATND"
            }
          ]
        }
      ],
      "actor": {
        "reference": "Practitioner/example",
        "display": "Dr Adam Careful"
      },
      "required": "required",
      "status": "accepted"
    },
    {
      "actor": {
        "reference": "Location/1",
        "display": "South Wing, second floor"
      },
      "required": "required",
      "status": "accepted"
    }
  ],
  "meta": {
    "tag": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
        "code": "HTEST",
        "display": "test health data"
      }
    ]
  }
}

此资源是一个约会,我想获取所有具有特定演员的约会,所有特定患者或医生的约会。各个参与者在 JSON 对象中嵌套了几层。我不知道如何对这些嵌套元素执行 GET 请求。

我可以发出 GET 请求来获取这部分约会吗?还是通常的做法是自己获取所有约会并过滤它们?

【问题讨论】:

  • 邮递员只能调用您的 API 公开的内容。如果你公开这个 API,你就可以做到,如果你不这样做,你就做不到。

标签: json postman hl7-fhir


【解决方案1】:

您可以使用搜索选项来过滤 FHIR 查询的结果。可用于过滤约会的参数列在here 中,有关制定搜索的规则位于here

例如:

[base]/Appointment?actor=Patient/123&status=booked&date=ge2020-07-23

将为您提供从今天起已“预订”(即已确认)的患者所有已安排的未来预约。结果将是一个包含一堆条目的 Bundle 资源。每个条目都将包含一个 Appointment 实例。

【讨论】:

    猜你喜欢
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    • 2017-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多