Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

FHIR Opening Hours provide a standardized structured way to represent the opening hours of organization Unit / healthcare entity / Location. This feature allows provider, patients and others to access and exchange information about when the facility will open or close. Opening hours in FHIR are designed to accommodate the complex and varied schedules of healthcare facilities. Whether it’s hospital with round-the-clock services, a clinic with specific working hours or a pharmacy operating only during weekends, FHIR Opening Hours can represent these different scenarios accurately. This flexibility ensures that healthcare professionals and patients can easily access up-to-date information about the availability of services and plan and schedule their visit accordingly.

Example Schema

Code Block
languagejson
{
  "resourceType": "Location",
  ...,
  "hoursOfOperation": [
    {
      "daysOfWeek": ["<code"], //mon | tue | wed | thu | fri | sat | sun
      "allDay": <boolean>,   // Always available ? 24 hrs service
      "openingTime": "<time>", //Opening time of day (ignored if allDay = true)
      "closingTime": "<time>", //Closing time of day (ignored if allDay = true)
    }
  ]
}

Example Scenarios

The schema is flexible enough to accommodate different scenarios where the hours of operation might be different. We are discussion some of these below:

1. Location have different hours of operation on weekdays and weekends

Code Block
languagejson
{
  "resourceType": "Location",
  "id": "example-location",
  "status": "active",
  "name": "Example Hospital",
  "hoursOfOperation": [
    {
      "daysOfWeek": [
        "mon",
        "tue",
        "wed",
        "thu",
        "fri"
      ],
      "allDay": false,
      "openingTime": "08:00:00",
      "closingTime": "17:00:00"
    },
    {
      "daysOfWeek": [
        "sat",
        "sun"
      ],
      "allDay": false,
      "openingTime": "09:00:00",
      "closingTime": "13:00:00"
    }
  ]
}

2. Location is open 24/7

Code Block
languagejson
{
  "resourceType": "Location",
  "id": "example-location",
  "status": "active",
  "name": "Example Hospital",
  "hoursOfOperation": [
    {
      "daysOfWeek": [
        "mon",
        "tue",
        "wed",
        "thu",
        "fri",
        "sat",
        "sun"
      ],
      "allDay": true
    }
  ]
}

3. Location is opening every morning and evening

Code Block
languagejson
{
  "resourceType": "Location",
  "id": "example-location",
  "status": "active",
  "name": "Example Hospital",
  "hoursOfOperation": [
    {
      "daysOfWeek": [
        "mon",
        "tue",
        "wed",
        "thu",
        "fri",
        "sat",
        "sun"
      ],
      "allDay": false,
      "openingTime": "08:00:00",
      "closingTime": "12:00:00"
    },
    {
      "daysOfWeek": [
        "mon",
        "tue",
        "wed",
        "thu",
        "fri",
        "sat",
        "sun"
      ],
      "allDay": false,
      "openingTime": "17:00:00",
      "closingTime": "20:00:00"
    }
  ]
}

4. Location has different hours of operation for different services offered

Code Block
languagejson
{
  "resourceType": "Location",
  "id": "example-location",
  "status": "active",
  "name": "Example Hospital",
  "service": [
    {
      "type": {
        "coding": [
          {
            "system": "http://example.org/services",
            "code": "primary-care",
            "display": "Primary Care"
          }
        ]
      },
      "hoursOfOperation": [
        {
          "daysOfWeek": [
            "mon",
            "tue",
            "wed",
            "thu",
            "fri"
          ],
          "allDay": false,
          "openingTime": "08:00:00",
          "closingTime": "17:00:00"
        },
        {
          "daysOfWeek": [
            "sat"
          ],
          "allDay": false,
          "openingTime": "09:00:00",
          "closingTime": "13:00:00"
        }
      ]
    },
    {
      "type": {
        "coding": [
          {
            "system": "http://example.org/services",
            "code": "emergency",
            "display": "Emergency Services"
          }
        ]
      },
      "hoursOfOperation": [
        {
          "daysOfWeek": [
            "mon",
            "tue",
            "wed",
            "thu",
            "fri",
            "sat",
            "sun"
          ],
          "allDay": true
        }
      ]
    },
    {
      "type": {
        "coding": [
          {
            "system": "http://example.org/services",
            "code": "pharmacy",
            "display": "Pharmacy"
          }
        ]
      },
      "hoursOfOperation": [
        {
          "daysOfWeek": [
            "mon",
            "tue",
            "wed",
            "thu",
            "fri"
          ],
          "allDay": false,
          "openingTime": "09:00:00",
          "closingTime": "18:00:00"
        },
        {
          "daysOfWeek": [
            "sat"
          ],
          "allDay": false,
          "openingTime": "10:00:00",
          "closingTime": "14:00:00"
        }
      ]
    }
  ]
}

5. Hours of operation specific to a Practitioner or Group of Practitioners

Code Block
languagejson
{
  "resourceType": "Practitioner",
  "id": "example-practitioner",
  "name": [
    {
      "family": "Doe",
      "given": [
        "John"
      ],
      "prefix": [
        "Dr."
      ]
    }
  ],
  "practitionerRole": [
    {
      "role": {
        "coding": [
          {
            "system": "http://example.org/roles",
            "code": "primary-care",
            "display": "Primary Care Practitioner"
          }
        ]
      },
      "location": {
        "reference": "Location/example-location"
      },
      "availableTime": [
        {
          "daysOfWeek": [
            "mon",
            "tue",
            "wed",
            "thu",
            "fri"
          ],
          "allDay": false,
          "availableStartTime": "08:00:00",
          "availableEndTime": "17:00:00"
        }
      ]
    }
  ]
}

Note: if you have different scenarios that are not covered here, Please let us know.