Drug review

Planned feature for SFM version 4

SFM will provide access to drug review information for patients through the DrugReviewInfo endpoint. This allows querying based on parameters such as the number of treatments, last drug review date, and planned medication review date.

Endpoint

The endpoint is accessed via:

GET /api/Basic?_query=drugReviewInfo

Purpose

The purpose of this endpoint is to provide a detailed view of drug review information, including the number of treatments, last review date, planned review date, and other relevant details.

Query Parameters

Parameter Type Required Description
numberOfTreatments int No Minimum number of active treatments a patient must have.
lastDrugReview datetime No ISO 8601 format. Patient filter, last drug review dates before this date.
plannedDrugReview datetime No ISO 8601 format. Patient filter, planned drug review dates after this date.

Profile

Sfm Drug Review Info

id0..1string
id0..1string
extension0..0Extension
url1..1Fixed Value
valueStringstring
id0..1string
extension0..0Extension
url1..1Fixed Value
valueIntegerinteger
id0..1string
extension0..0Extension
url1..1Fixed Value
valueIntegerinteger
id0..1string
extension0..0Extension
url1..1Fixed Value
valueDateTimedateTime
id0..1string
extension0..0Extension
url1..1Fixed Value
valueStringstring
id0..1string
extension0..0Extension
url1..1Fixed Value
valueDateTimedateTime
url1..1Fixed Value

Retrieval on Datashare

The actual retrieval of drug review data is performed using a named query on Basic. Parameters may include the registered patient identifier or a combination of treatments and timestamps:

GET [base]/Basic?_query=drugReviewInfo&numberOfTreatments=(min count)
GET [base]/Basic?_query=drugReviewInfo&lastDrugReview=lt(timestamp)
GET [base]/Basic?_query=drugReviewInfo&plannedDrugReview=gt(timestamp)

Note that SFM will return all matching entries based on the given parameters, and the number of items may grow during a typical session.

Example Request

GET /api/Basic?_query=drugReviewInfo&numberOfTreatments=3&lastDrugReview=2023-01-01T00:00:00Z&plannedDrugReview=2024-01-01T00:00:00Z

Example Response

{
  "total": 1,
  "entry": [
    {
      "resourceType": "Basic",
      "id": "patient-id",
      "meta": {
        "profile": [
          "<http://hl7.org/fhir/StructureDefinition/SfmDrugReviewInfo>"
        ],
        "lastUpdated": "2024-06-20T10:00:00Z"
      },
      "extension": [
        {
          "url": "<http://hl7.org/fhir/StructureDefinition/SfmDrugReviewInfo>",
          "extension": [
            {
              "url": "patientFhirId",
              "valueString": "patient-fhir-id"
            },
            {
              "url": "numberOfMedications",
              "valueInteger": 3
            },
            {
              "url": "numberOfFixedUsageMedications",
              "valueInteger": 1
            },
            {
              "url": "lastReview",
              "valueDateTime": "2023-06-15T00:00:00Z"
            },
            {
              "url": "lastReviewComment",
              "valueString": "Patient is responding well to the treatment."
            },
            {
              "url": "plannedReview",
              "valueDateTime": "2024-06-15T00:00:00Z"
            }
          ]
        }
      ]
    }
  ]
}

Usage Examples

Search by Number of Treatments

GET /Basic?_query=drugReviewInfo&numberOfTreatments=(nrOfTreatments)

Search by Number of Treatments and Minimum Last Drug Review Date

GET /Basic?_query=drugReviewInfo&numberOfTreatments=(nrOfTreatments)&lastDrugReview=(lastDrugReview)

Search by Number of Treatments and Maximum Planned Drug Review Date

GET /Basic?_query=drugReviewInfo&numberOfTreatments=(nrOfTreatments)&plannedDrugReview=(plannedDrugReview)

Search by Number of Treatments, Minimum Last Drug Review Date, and Maximum Planned Drug Review Date

GET /Basic?_query=drugReviewInfo&numberOfTreatments=(nrOfTreatments)&lastDrugReview=(lastDrugReview)&plannedDrugReview=(plannedDrugReview)

All requests require appropriate authorization headers:

Host: (host)
Content-Type: application/json
Accept: application/json
Authorization: Bearer (token)