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

Editorial updates #247

Merged
merged 14 commits into from
Jun 27, 2024
Merged
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 input/fsh/examples.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Usage: #example
* column[+]
* path = "gender"
* name = "gender"
* type = "string"
* type = "code"
* select[+]
* forEach = "name.where(use = 'official').first()"
* column[+]
Expand Down
2 changes: 1 addition & 1 deletion input/fsh/models.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Expression: "(forEach | forEachOrNull).count() <= 1"
Logical: ViewDefinition
Title: "View Definition"
Description: """
View definitions represent a tabular projection of a FHIR resource, where the columns and inclusion
A ViewDefinition represents a tabular projection of a FHIR resource, where the columns and inclusion
criteria are defined by FHIRPath expressions.
"""
* url 0..1 uri "Canonical identifier for this view definition, represented as a URI (globally unique)"
Expand Down
4 changes: 2 additions & 2 deletions input/ignoreWarnings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
# Publisher bug?
Error in constraint 'sql-expressions' with expression '(path | forEach | forEachOrNull | union).count() = 1': Cannot assign field "sourceDefinition" because "res" is null

# Not a real HL7 project
When HL7 is publishing a resource, the owning committee must be stated using the http://hl7.org/fhir/StructureDefinition/structuredefinition-wg extension
# Not an official HL7 project
When HL7 is publishing a resource, the owning committee must be stated using the http://hl7.org/fhir/StructureDefinition/structuredefinition-wg extension
4 changes: 2 additions & 2 deletions input/pagecontent/Binary-PatientAddresses-notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This will result in "patient_addresses" table as:
This will result in a "patient_addresses" table that looks like this:

| patient_id | street | use | city | zip |
|------------|--------------------------|----------|-------------|-------|
Expand All @@ -7,4 +7,4 @@ This will result in "patient_addresses" table as:
| 2 | 789 Brookside Ave\nApt 3 | home | Los Angeles | 90001 |
| 3 | 987 Pinehurst Rd\nApt 4 | home | Chicago | 60601 |
| 3 | 654 Evergreen Tce\nApt 5 | work | Houston | 77001 |
{:.table-data}
{:.table-data}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
This will result in "patient_and_contact_addresses" table as:
This will result in a "patient_and_contact_addresses" table that looks like
this:

| resource_id | street | city | zip | is_patient |
|-------------|--------------------------|-------------|-------|------------|
Expand All @@ -7,4 +8,5 @@ This will result in "patient_and_contact_addresses" table as:
| 1 | 456 Maplewood Dve\nApt 2 | New York | 10001 | false |
| 2 | 789 Brookside Ave\nApt 3 | Los Angeles | 90001 | true |
| 2 | 987 Pinehurst Rd\nApt 4 | Chicago | 60601 | false |
{:.table-data}

{:.table-data}
4 changes: 2 additions & 2 deletions input/pagecontent/Binary-PatientDemographics-notes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
This will result in a "patient_demographics" table as:
This will result in a "patient_demographics" table that looks like this:

| id | gender | given_name | family_name |
|----|--------|---------------|-------------|
| 1 | female | Malvina Gerda | Vicario |
| 2 | male | Yolotzin Adel | Bristow |
| 3 | other | Jin Gomer | Aarens |
{:.table-data}
{:.table-data}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This will result in a "patient_demographics" table that looks like this:

| id | gender | given_name | family_name |
|----|--------|---------------|-------------|
| 1 | female | Malvina Gerda | Vicario |
| 2 | male | Yolotzin Adel | Bristow |
| 3 | other | Jin Gomer | Aarens |
{:.table-data}
2 changes: 1 addition & 1 deletion input/pagecontent/Binary-UsCoreBloodPressures-notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This will result in a "us_core_blood_pressures" table as:
This will result in a "us_core_blood_pressures" table that looks like this:

| id | patient_id | effective_date_time | sbp_quantity_system | sbp_quantity_code | sbp_quantity_unit | sbp_quantity_value | dbp_quantity_system | dbp_quantity_code | dbp_quantity_unit | dbp_quantity_value |
|----|------------|---------------------|---------------------------|-------------------|-------------------|--------------------|---------------------------|-------------------|-------------------|--------------------|
Expand Down
60 changes: 38 additions & 22 deletions input/pagecontent/StructureDefinition-ViewDefinition-intro.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,52 @@
A *view definition* is the central piece of the [View Layer](index.html#system-layers) and represents a tabular projection of FHIR resources with the columns and filtering criteria defined by [FHIRPath](https://hl7.org/fhirpath/) expressions. The ViewDefinition logical model is described below.
It is the central piece of the [View Layer](index.html#system-layers) and
represents a tabular projection of FHIR resources with the columns and filtering
criteria defined by [FHIRPath](https://hl7.org/fhirpath/) expressions. The
logical model is described below.

## Key ViewDefinition Elements
The key elements of the ViewDefinition are:
## Key Elements

### Resource
Each ViewDefinition instance is tied to a single FHIR [ResourceType](StructureDefinition-ViewDefinition-definitions.html#diff_ViewDefinition.resource),
such as *Patient* or *Observation*. It will then create zero to many rows for each resource
instance. [Examples](StructureDefinition-ViewDefinition-examples.html) include simple tabular
views of patients, unrolling patient addresses into an address table, specific views of needed
observations, and so on.

Each ViewDefinition instance is tied to a single
FHIR [resource type](StructureDefinition-ViewDefinition-definitions.html#diff_ViewDefinition.resource),
such as Patient or Observation. It will then create zero or more rows for
each resource
instance. [Examples](StructureDefinition-ViewDefinition-examples.html) include
simple tabular views of patients, unrolling patient addresses into an address
table, views of certain types of observations, and so on.

### Select
Each ViewDefinition instance has a [`select`](StructureDefinition-ViewDefinition-definitions.html#diff_ViewDefinition.select) that specifies the content and names for the `column`s in the view. The content for each `column` is defined with [FHIRPath](https://hl7.org/fhirpath/) expressions that return specific data elements from the FHIR resources.

Each ViewDefinition instance has
a [select](StructureDefinition-ViewDefinition-definitions.html#diff_ViewDefinition.select)
that specifies the content and names for the columns in the view. The content
for each column is defined with [FHIRPath](https://hl7.org/fhirpath/)
expressions that return specific data elements from the FHIR resources.

### Where
The ViewDefinition may include one or more [`where`](StructureDefinition-ViewDefinition-definitions.html#diff_ViewDefinition.where)s that may be used to further limit, or filter, the resources included in the view.
For instance, users may have different views for blood pressure observations or other observation types.

### Constant
The ViewDefinition may include one or more [`constant`](StructureDefinition-ViewDefinition-definitions.html#diff_ViewDefinition.constant)s, which are simply values that can be reused in FHIRPath expressions.
The ViewDefinition may include one or
more [where](StructureDefinition-ViewDefinition-definitions.html#diff_ViewDefinition.where)
clauses that may be used to further limit, or filter, the resources included in
the view. For instance, users may have different views for blood pressure
observations or other observation types.

### Constants

### Descriptive Fields
The ViewDefinition may include several other fields with `name`, `status`, and other descriptive information about the view as seen below.
The ViewDefinition may include one or
more [constants](StructureDefinition-ViewDefinition-definitions.html#diff_ViewDefinition.constant),
which are simply values that can be reused in FHIRPath expressions.

## Implementation
## View Runner

A system-specific *view runner* implementation can execute a *view definition* and
return the results as a table that can easily be used in the user's tech stack. See the
[system layers](index.html#system-layers) for details.
A *View Runner* implementation can execute a ViewDefinition and return the
results as a table that can be used for further processing using the user's
chosen tech stack. See [System Layers](index.html#system-layers) for details.

## Profiling
ViewDefinitions may be profiled to meet specific needs. For instance, the [ShareableViewDefinition](StructureDefinition-ShareableViewDefinition.html) profile
adds constraints for view definitions intended to be shared between systems. Implementers may create their
own ViewDefinition profiles for further specialized needs.

ViewDefinitions may be profiled to meet specific needs. For instance,
the [ShareableViewDefinition](StructureDefinition-ShareableViewDefinition.html)
profile adds constraints for ViewDefinitions intended to be shared between
systems. Implementers may create their own ViewDefinition profiles for further
specialized needs.
Loading
Loading