Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify style properties as experimental #132

Open
wants to merge 20 commits into
base: into-hl7
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conformance-statement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If a server requires SMART on FHIR authorization for access, its conformance
statement must support automated dicovery of OAuth2 endpoints by including a
"complex" extension (that is, an extension with multiple components inside) on
the `Conformance.rest.security` element. Any time a client sees this extension,
it must be prepared to authorize using SMART's OAuth2-basead protocol.
it must be prepared to authorize using SMART's OAuth2-based protocol.

[The top-level extension uses the URL
`http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris`, with
Expand Down
49 changes: 49 additions & 0 deletions experimental.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
layout: main
title: "SMART on FHIR: Experimental features"
---

# Experimental features in SMART

This page documents features of SMART that aren't quite widely deployed or require a bit more attention to make it into the stable version of the SMART specification. These features are subject to change, but have been implemented by some systems.

## smart-app-styling-properties

The smart_style_url launch parameter provided alongside the access_token in the authorization flow can contain a url with the following json key/value pairs:

```
{
color_background: "#edeae3",
color_error: "#9e2d2d",
color_highlight: "#69b5ce",
color_modal_backdrop: "",
color_success: "#498e49",
color_text: "#303030",
dim_border_radius: "6px",
dim_font_size: "13px",
dim_spacing_size: "20px",
font_family_body: "Georgia, Times, 'Times New Roman', serif",
font_family_heading: "'HelveticaNeue-Light', Helvetica, Arial, 'Lucida Grande', sans-serif;"
}
```

The URL value itself is to be considered a version key for the contents of the SMART Style JSON:
hosts must return a new URL value in the `smart_style_url` launch context parameter if the contents
of this JSON is changed.

Style Property | Description
---------------|-------------
`color_background` | The color used as the background of the app.
`color_error` | The color used when UI elements need to indicate an area or item of concern or dangerous action, such as a button to be used to delete an item, or a display an error message.
`color_highlight` | The color used when UI elements need to indicate an area or item of focus, such as a button used to submit a form, or a loading indicator.
`color_modal_backdrop` | The color used when displaying a backdrop behind a modal dialog or window.
`color_success` | The color used when UI elements need to indicate a positive outcome, such as a notice that an action was completed successfully.
`color_text` | The color used for body text in the app.
`dim_border_radius` | The base corner radius used for UI element borders (0px results in square corners).
`dim_font_size` | The base size of body text displayed in the app.
`dim_spacing_size` | The base dimension used to space UI elements.
`font_family_body` | The list of typefaces to use for body text and elements.
`font_family_heading` | The list of typefaces to use for content heading text and elements.

SMART client apps that can adjust their styles should incorporate the above
property values into their stylesheets, but are not required to do so.
33 changes: 4 additions & 29 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,35 +115,10 @@ pointing to the app's registered launch URL and passing some context.

The following parameters are included:

<table class="table">
<thead>
<th colspan="3">Parameters</th>
</thead>
<tbody>
<tr>
<td><code>iss</code></td>
<td><span class="label label-success">required</span></td>
<td>

Identifies the EHR's FHIR endpoint, which the app can use to obtain
additional details about the EHR, including its authorization URL.

</td>
</tr>
<tr>
<td><code>launch</code></td>
<td><span class="label label-success">required</span></td>
<td>

Opaque identifier for this specific launch, and any EHR context associated
with it. This parameter must be communicated back to the EHR at authorization
time by passing along a <code>launch=123</code> parameter (see below).

</td>
</tr>
</tbody>
</table>

|Parameters|optionality|description|
|----------|-----------|-----------------------------------------------
|`iss`|required|Identifies the EHR's FHIR endpoint, which the app can use to obtain additional details about the EHR, including its authorization URL.|
|`launch`|required|Opaque identifier for this specific launch, and any EHR context associated with it. This parameter must be communicated back to the EHR at authorization time by passing along a `launch=123` parameter (see below).|

#### *For example*
A launch might cause the browser to redirect to:
Expand Down
43 changes: 5 additions & 38 deletions scopes-and-launch-context/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ scopes:
#### Requesting context with scopes

Requested Scope | Meaning
------|---------|-------------------
------|----------------------------
`launch/patient` | Need patient context at launch time (FHIR Patient resource)
`launch/encounter` | Need encounter context at launch time (FHIR Encounter resource)
`launch/location` | Need location context at launch time (FHIR Location resource)
Expand Down Expand Up @@ -176,6 +176,7 @@ Launch context parameter | Example value | Meaning
#### Notes on launch context parameters

<h5 id="launch-intent"><b>App Launch Intent</b> (optional)</h5>

`intent`: Some SMART apps might offer more than one context or user interface
that can be accessed during the SMART launch. The optional `intent` parameter
in the launch context provides a mechanism for the SMART host to communicate to
Expand Down Expand Up @@ -206,44 +207,10 @@ host. The meaning of intents must be negotiated between the app and the host.
SMART apps can check for the existence of this launch context parameter and
download the JSON file referenced by the URL value, if provided.

The URL should serve a "SMART Style" JSON object with one or more of the following properties:

```
{
color_background: "#edeae3",
color_error: "#9e2d2d",
color_highlight: "#69b5ce",
color_modal_backdrop: "",
color_success: "#498e49",
color_text: "#303030",
dim_border_radius: "6px",
dim_font_size: "13px",
dim_spacing_size: "20px",
font_family_body: "Georgia, Times, 'Times New Roman', serif",
font_family_heading: "'HelveticaNeue-Light', Helvetica, Arial, 'Lucida Grande', sans-serif;"
}
```
The URL should serve a "SMART Style" JSON object with properties describing the look and feel of the SMART host. Currently, [these property names](../experimental.md#SMART App styling properties) are experimental.

The URL value itself is to be considered a version key for the contents of the SMART Style JSON:
hosts must return a new URL value in the `smart_style_url` launch context parameter if the contents
of this JSON is changed.

Style Property | Description
---------------|-------------
`color_background` | The color used as the background of the app.
`color_error` | The color used when UI elements need to indicate an area or item of concern or dangerous action, such as a button to be used to delete an item, or a display an error message.
`color_highlight` | The color used when UI elements need to indicate an area or item of focus, such as a button used to submit a form, or a loading indicator.
`color_modal_backdrop` | The color used when displaying a backdrop behind a modal dialog or window.
`color_success` | The color used when UI elements need to indicate a positive outcome, such as a notice that an action was completed successfully.
`color_text` | The color used for body text in the app.
`dim_border_radius` | The base corner radius used for UI element borders (0px results in square corners).
`dim_font_size` | The base size of body text displayed in the app.
`dim_spacing_size` | The base dimension used to space UI elements.
`font_family_body` | The list of typefaces to use for body text and elements.
`font_family_heading` | The list of typefaces to use for content heading text and elements.

SMART client apps that can adjust their styles should incorporate the above
property values into their stylesheets, but are not required to do so.
SMART client apps that can adjust their styles should incorporate the
[property values](experimentalstylingproperties.md) into their stylesheets, but are not required to do so.

Optionally, if the client app detects a new version of the SMART Style object
(i.e. a new URL is returned the `smart_style_url` parameter), the client can
Expand Down