# Visiting status card

> Canonical HTML: https://screenrig.ai/docs/cards/visiting-status/

A ward's visiting rules at a glance: open, restricted or closed, today's hours, the rules for visitors and any outbreak notice.

Category: Health. Tags: Healthcare, Alerts and status.

## Previews

![Visiting status](/cards/visiting-status/v1/screenshots/canvas-bloom.webp?sha=e8efb1e074b10850426901643e191c9f5a2f9c563624110f875d41b3f461601a)

Canvas

![Visiting status](/cards/visiting-status/v1/screenshots/corner-bloom.webp?sha=3b0ae93467099e7d2196e7d8846d3fe545d10e23651666b4bba4f7ebca8ef284)

Corner

![Visiting status](/cards/visiting-status/v1/screenshots/chip-bloom.webp?sha=1ff83a7c17525adc1aaa49daca1fb7c32b51fe4df8bdc6466cc0394e370ccc1c)

Chip

## Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

[Card views, themes and publishing](/docs/cards/). [Browse the gallery](/apps/#cards).

## Data and privacy

This card uses its configured properties and live card data.

## Properties

For theme, background, accent and position, see [Common properties](/docs/cards/#common-properties).

Set static properties in `params`. Bind `data` to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in `params`. Nested rows describe the contents of their parent property.

### Static properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `title` | string | `"Visiting"` | maxLength: `40` |  |
| `ward` | string | `""` | maxLength: `40` | The ward or unit the rules belong to, beside the title. |
| `hour12` | boolean | `false` |  |  |
| `timeZone` | string, null | `null` |  | IANA zone; null uses the screen's zone. |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `status` | string | `"open"` | `"open"`, `"restricted"`, `"closed"` | open: visitors welcome in visiting hours. restricted: visitors welcome in visiting hours under the rules below. closed: no visiting, as in an outbreak. |
| `hours` | array | `[]` | minItems: `0`; maxItems: `7` | Visiting hours. Left empty, visiting runs all day while the status allows it. |
| `hours[].days` | array | `[]` | maxItems: `7` | The days these hours apply to. Left out or empty, every day. |
| `hours[].start` | string |  | maxLength: `8`; Required | Start in the screen's time zone: 14:00 or 2:00 PM. |
| `hours[].end` | string |  | maxLength: `8`; Required | End. Earlier than the start means past midnight. |
| `rules` | array | `[]` | minItems: `0`; maxItems: `6` | Short rules for visitors, one line each: Two visitors at a time. |
| `notice` | string | `""` | maxLength: `160` | A notice in the status colour: why visiting is restricted or closed. |

## Canvas example

Add this item to a playlist page’s `primitives`. [Publish the playlist and assign a screen](/docs/cards/#publish-a-card-canvas).

```json
{
  "id": "visiting-status",
  "primitive": "card",
  "card": "visiting-status",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "visiting-status-main"
}
```

## Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see [API authentication](/docs/authentication/).

```console
curl --request PUT "https://api.screenrig.ai/api/card-data/visiting-status-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"status":"open","hours":[],"rules":[],"notice":""}}'
```
