Drug alerts card

Drug recalls and shortages, most serious first: the product, the reason, the recall class and when it was issued.

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

Previews

Drug alerts
Canvas
Drug alerts
Corner
Drug alerts
Chip

Views and forms

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

Card views, themes and publishing. Browse the gallery.

Data and privacy

Feed: screenrig.drugalerts/v1.

Feed documents carry source attribution. The Player supplies the feed to the card.

Properties

For theme, background, accent and position, see 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

NameTypeDefaultValues and limitsDescription
titlestring"Drug alerts"maxLength: 40
showstring"all""all", "recalls", "shortages"Which alerts the board lists.
maxAgeDaysinteger90minimum: 1; maximum: 730Alerts issued longer ago than this are left out.
staleMinutesinteger1440minimum: 1; maximum: 10080A feed older than this shows how long ago it updated.
timeZonestring, nullnullIANA zone; null uses the screen's zone.

Dynamic properties

NameTypeDefaultValues and limitsDescription
alertsarray[]minItems: 0; maxItems: 40Alerts, the same document as the screenrig.drugalerts/v1 feed's alerts. The feed wins when present.
alerts[].kindstring"recall", "shortage"; Required
alerts[].drugstringminLength: 1; maxLength: 60; Required
alerts[].reasonstring""maxLength: 140
alerts[].classstring"""I", "II", "III", ""A recall's class, I the most serious.
alerts[].agencystring""maxLength: 24FDA, Health Canada.
alerts[].issuedstring""maxLength: 32Date or ISO 8601 instant.
alerts[].statusstring"ongoing""ongoing", "resolved"
footnotestring""maxLength: 140

Canvas example

Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.

{
  "id": "drug-alerts",
  "primitive": "card",
  "card": "drug-alerts",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "drug-alerts-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.

curl --request PUT "https://api.screenrig.ai/api/card-data/drug-alerts-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"alerts":[],"footnote":""}}'